Custom footer? Custom footer?
 

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

Custom footer?

Started by mungous, June 03, 2005, 05:48:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mungous

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

kegobeer

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

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)
// Function for writing a pagefooter
function pagefooter()


Before the last
}

Insert

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

Joachim Müller

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

mungous

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  :)
// 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

donnoman

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.