forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: mungous on June 03, 2005, 05:48:40 am

Title: Custom footer?
Post by: mungous 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  ???
Title: Re: Custom footer?
Post by: kegobeer on June 03, 2005, 05:53:40 am
http://coppermine.sourceforge.net/faq.php#customHeader
Title: Re: Custom footer?
Post by: bit bit spears 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
Title: Re: Custom footer?
Post by: Joachim Müller 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
Title: Re: Custom footer?
Post by: mungous 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
Title: Re: Custom footer?
Post by: donnoman 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.