use a php template in different directory? use a php template in different directory?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

use a php template in different directory?

Started by marksie1988, September 11, 2007, 12:32:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

marksie1988

is it possible to setup a template on a website using php and use the tags that the template.html file uses and somehow redirect the gallery so that when that template is loaded the gallery items will load?

basically i have a template here > http://tcos.evildoom.ecwhost.com/gal/

this is php which i use for all my websites as you can see the tags do not work. so what i am wondering is, is it possible to make them work and if so how?

do i need to include a specific file?

Please Help the N00B
Thanks
Steve

atmorell

Hello,

Coppermine won't resolve your placeholders. Please let me know if you manage to do it anyway (resolve the placeholders)

http://forum.coppermine-gallery.net/index.php?topic=46734.0

Maybe you could use more than one template(html) file like I did.

Best regards.
Asbjørn Morell.

marksie1988

there must be a way even if i can change the file that says the theme directory is ... to the directory i actualy want it to be?

Sami

You can't use CPG's placeholder on an external file , cause that file should be parsed with CPG theme system to resolve the placeholders
‍I don't answer to PM with support question
Please post your issue to related board

marksie1988

yes i know that but how do you set it so that that file is parsed with the system or is it just a no go

Joachim Müller

Actually, it isn't being "parsed" as in an interpreter language. You simply can't do what you're up to, and there's no reason to do so imo. Just leave the placeholder tokens (the stuff in curly brackets) where they are suppossed to reside in (themes/yourtheme/template.html). After all, you're probably only up to design a coppermine theme that nicely blends into the overall look of your entire website (and maybe contains dynamical menu items). To accomplish this, use the coppermine feature that was designed specifically for this purpose: custom_header and custom_footer_include.
You'll just need to break up your existing overall menu (the stuff that resides in http://tcos.evildoom.ecwhost.com/gal/) into bits: you'll need to insert the tables of your overall site layout there and your overall menu on the left sidebar.
Looking at http://tcos.evildoom.ecwhost.com/gal/ I can see that you're using a load of JavaScript (which is not a bright idea for a menu btw., as search engine spiders will not be able to follow the links there).
Bottom line: use a custom theme that matches your overall site's design. I created a preliminary coppermine theme for your that does this (basically based on your HTML plus the stylesheet taken from the hardwired theme). Use it instead of trying to fiddle with the replacement tokens as a base. You'll just need to tweak the stylesheet a bit more.

Attachment "cpg1.4.x_theme_tcos.zip" contains your theme that I built for you, attachment "screenshot.jpg" shows your custom theme in action on my testbed.

Joachim

marksie1988

oh wow i didnt know that you could get it to look like that thats well good thankyou so much for this

i shall take a look at the code and learn from it im just not used to templating with galleries like that :) thanks :)