Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Custom footer?  (Read 3116 times)

0 Members and 1 Guest are viewing this topic.

mungous

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Custom footer?
« on: June 03, 2005, 05:48:40 am »

I really don't know much about PHP, and I've been trying for a while to add a global footer of my own to my gallery. Tried searching through some files but couldn't find anything, how do I do this? Thanks  ???
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Custom footer?
« Reply #1 on: June 03, 2005, 05:53:40 am »

Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

bit bit spears

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 240
    • TangibleBrit.com
Re: Custom footer?
« Reply #2 on: June 03, 2005, 06:09:14 am »

Hey, I don't know if it is of any help, but here is an easier way to achieve what you want.

Find the code: (in your theme.php file)
Code: [Select]
// Function for writing a pagefooter
function pagefooter()

Before the last
Code: [Select]
}
Insert
Code: [Select]
echo <<<EOT
Add any html you want here that you want to appear
EOT;

I hope that helps you out! If you have any questions, feel free to reply! :D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Custom footer?
« Reply #3 on: June 03, 2005, 06:52:26 am »

hm, adding static html by using the pagefooter function is not recommended. Just edit themes/yourtheme/template.html and add any html that you can think of. Only dynamic content (i.e. PHP stuff) should go into themes/yourtheme/theme.php
Logged

mungous

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Custom footer?
« Reply #4 on: June 11, 2005, 10:16:34 am »

Thanks everyone, I tried editing the template.html file but everytime I modify something it's like the .css file doesn't exist, it only shows plain old text  ???.

And bit bit should it look like this? If so it didn't work, if not please correct me  :)
Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats;
    global $template_footer;
    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }
    echo $template_footer;
echo <<<EOT
Add any html you want here that you want to appear
EOT;
}

Thanks
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Custom footer?
« Reply #5 on: June 11, 2005, 05:50:05 pm »

The reason the css doesn't show up when you edit the template.html file while its inside the theme directory is because the template.html references the css file as if it were be running from the coppermine root folder. Which is absolutely correct, you don't want to edit the css stylesheet definition since that IS where it needs to be.

So when I need to open up a template.html for serious gui editing, I make a copy of it in the coppermine root (so the stylesheet is properly relative to my template.html), make my edits, then copy it back.

When I've done theme development from scratch, I've been known to copy the template.html to the themes name at the coppermine root such as (powerbookg4.html) then created a batch file in coppermine's root to copy powerboog4.html to templates/powerbookg4/template.html.

That way I can easily edit the template with css intact, and its quick to copy it back to the production location, and I can have multiple theme template.html's in my root without them conflicting.

FYI: if you opt to just copy template.html to the coppermine root without renaming it: YOU CAN'T LEAVE IT THERE, there are some code provisions that will try to load the template.html from the coppermine root which will foul up your currently selected theme.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.