Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Dodger57 on January 09, 2010, 07:49:41 am

Title: [Closed]: SSI - including site items in template.html
Post by: Dodger57 on January 09, 2010, 07:49:41 am
Hi all,

I just downloaded and installed cpg14x and everything went great~!  :D

For my custom theme I followed the instructions and copied an existing theme and modified it. I took one of my existing site pages and added the following where I wanted the gallery to appear:

Code: [Select]
      {SYS_MENU} <br /> {SUB_MENU}

This works perfectly - and it looks just like my site.

Now the problem is this - since I can't rename the file to template.php I can't use my usual php includes to pull in the menus, footer ect... like I normally would. So I thought, since I already have Apache set to parse ssi as .html I would use the

Code: [Select]
<!--#include virtual=".../includes/" -->
to bring them in. Funny thing tho - this is not working with the Coppermine themes. I tested it outside the theme directory and it works - but there is something preventing it from working within the theme system. Is this, in fact, the case here? The paths are correct, the server supports ssi and includes ... ???

Would someone be so kind as to explain how to get it working if possible? I can, if I have to, hard code the menus and what-not in but if possible would like to continue to use the global includes.

Thanks so much for any advise on this. :)

Title: Re: SSI - including site items in template.html
Post by: Joachim Müller on January 10, 2010, 09:31:12 am
You can't use SSI due to the nature of the template system. Use the custom header and footer feature instead to include your menus and navigation as outlined in the docs ( You might also want to take a look at the more detailed section in the preliminary documentation about cpg1.5.x ( that applies to this feature as well.

I followed the instructions
Not really, no: read up Board rules / Forum policies: Post Links (,55415.msg270616.html#msg270616).


P.S. Not related, but just a tip from someone who has been around on the PHP scene for long: never name your include "", as that will allow malevolent people to see your code. Instead, name your include "" to make sure that it get's parsed.
Title: Re: SSI - including site items in template.html
Post by: Dodger57 on January 10, 2010, 02:56:35 pm
Hi - thanks for the reply.  :)

I did explore the custom header and footer feature - it's clumsy and requires that I create and maintain an addition instance of the standard menus, footer, etc.... in my particular case I might as well simply code the items in.

The whole template system seems rather clumsy, I mean this in the sense that php includes can't be used, I would love to see a more direct inject friendly system in the future? :)

I never direct source-unknown traffic to any of my sites unless absolutely necessary - in this case it was not necessary that you view my gallery - obviously you knew and addressed my issue without the visit. ;) Had this required a pair of eyes on the code it would have been different.

Thanks for the tip on the includes.

thanks again!
Title: Re: SSI - including site items in template.html
Post by: Joachim Müller on January 10, 2010, 06:08:40 pm
The template system coppermine is using is loosely related to phpbb's template system: it was borrowed from phpBB when cpg1.0 was originally created. I agree that the overall template system would maybe be designed differently if coppermine would be designed from scratch today, but I doubt that allowing PHP includes would be an option if it was re-designed now. There is a reason why the template system was designed the way it is now, and we will discuss this with people who treat us with respect and who know their way around. And thanks for your nice words on clumisness and such, they go down well for developers, as do your personal thoughts on our board rules mean anything in this aspect. I'll give you another clue for possible future support calls on open source boards: it's not a bright idea to insult developers if you want them to look into your suggestions in the future. Usually, they are only human (the number of super-human beings among open source developers is over-estimated) and will do the opposite of what you're up to: they will not talk with you, nor will they bear your suggestions in mind when decisions are made in the design stage of an application. And BTW: SSI and PHP's include command are two different animals.
Title: Re: SSI - including site items in template.html
Post by: Dodger57 on January 10, 2010, 06:24:46 pm
Oh good grief ... there is a difference between criticism and insulting comments - I suggest you learn that difference so that you don't come across so sensitive next time someone offers their honest opinion on something. Seriously. What was all that?

I believe that I have been respectfully polite in my question and comments but if you disagree I offer a sincere apology for the confusion. I think it is a fine gallery or I wouldn't be wasting my time with it. There are literally hundreds to choose from - I have shopped several dozens before deciding to give Coppermine a try. I am not displeased and only offered my opinion on the template system (clumsy is  a pretty mild adjective, if I were really contemptuous of the system I certainly could have come up with something with a little more bite!) - and I know understand more about it and can deal with it.

I understand the differences in the ssi and php includes. Was that an insult coming my way?  ;)

My aim was to suggest being able to inject include code into existing web template (php, html, whatever...) to pull the gallery functions into that page - instead of having to customize existing themes. That's all. :)

Thank you for your replies - have a good day.

Title: Re: SSI - including site items in template.html
Post by: Phill Luckhurst on January 10, 2010, 09:26:47 pm
You choice to ignore the board rules does tend to get our backs up. Due to a number of problems in the past and for various other reasons the Coppermine team have made the decision to require a link for anyone requesting support. A lot of water has gon under the bridge and decisions like this are not taken lightly. There are exceptions to this but in your case you were asked to supply a link, understood that request but chose to ignore it. That isn't the best way to act is it?

I'm closing this thread as I can only see it degrading from here.