coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: warath on February 22, 2006, 05:05:58 PM

Title: Custom Footer/Header include files
Post by: warath on February 22, 2006, 05:05:58 PM
What variables are available to custom footer.php, or header.php scripts?
I wish to know: if thumbnails are being displayed (which i can do by testing the script name), but then I want to know what the Album name is!
A work around I have for now is testing the $_GET['album'] value.
But would like to know what variables I have access to from coppermine.

Thanks
Title: Re: Custom Footer/Header include files
Post by: Joachim Müller on February 23, 2006, 08:06:29 AM
there's no list available, you'll have to look at the code.
Title: Re: Custom Footer/Header include files
Post by: warath on February 23, 2006, 04:39:45 PM
Well, I tried using variables in thumbnails.php, but they don't work, so obviously I can't simply look at the code.
Any specific spots I should start??

Thanks,
Title: Re: Custom Footer/Header include files
Post by: Nibbler on February 23, 2006, 04:49:58 PM
In the pageheader you have access to


    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;


For the pagefooter you have


    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;


In both you also have access to the superglobals and any defined constants. You can add a var_dump(get_defined_vars()) in the function if you want a complete list.
Title: Re: Custom Footer/Header include files
Post by: warath on February 23, 2006, 04:52:00 PM
Sweet, thank you Nibbler!  :)