Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: use a php template in different directory?  (Read 4328 times)

0 Members and 1 Guest are viewing this topic.

marksie1988

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
use a php template in different directory?
« on: September 11, 2007, 12:32:24 am »

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
« Last Edit: September 12, 2007, 07:35:50 am by GauGau »
Logged

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: use a php template in different directory?
« Reply #1 on: September 11, 2007, 10:08:52 am »

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.
Logged

marksie1988

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: use a php template in different directory?
« Reply #2 on: September 11, 2007, 12:08:47 pm »

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?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: use a php template in different directory?
« Reply #3 on: September 11, 2007, 01:38:34 pm »

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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

marksie1988

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: use a php template in different directory?
« Reply #4 on: September 11, 2007, 01:48:29 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: use a php template in different directory?
« Reply #5 on: September 11, 2007, 05:02:36 pm »

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
Logged

marksie1988

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: use a php template in different directory?
« Reply #6 on: September 11, 2007, 05:57:33 pm »

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 :)
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.