I wish to customize my index page, eg. following the FAQ advice:
How can I add some output directly before the line "Powered by Coppermine"?
Edit /themes/yourtheme/theme.php, look for echo $template_footer and add the stuff you want to output in a line before it, like print '<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>';
But I can't find the HTML codes in this page when I open it with dreamweaver.
How do I get to see the code? Is this the way to amend the codes of a page?
Pse advise.
thanks.
Don't use dreamweaver. Use a simple editor such as notepad.
if you don't have "function pagefooter()" on your theme.php then copy this:
// Function for writing a pagefooter
function pagefooter()
{
//global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
global $template_footer;
$custom_footer = cpg_get_custom_include($CONFIG['custom_footer_path']);
if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
cpg_debug_output();
}
$template_vars = array(
'{CUSTOM_FOOTER}' => $custom_footer,
'{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
);
$template_footer=$template_footer.'<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>'; //Mod for custom MYlink
echo template_eval($template_footer, $template_vars);
}
to your theme.php and change the line with "//Mod for custom MYlink" comment (I add your span ...)
I'm not familiar with PHP. I just want to make sure.
Pse check whether I've done it correctly:
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.8
$Source$
$Revision: 3116 $
$Author: gaugau $
$Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Function for writing a pagefooter
function pagefooter()
{
//global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
global $template_footer;
$custom_footer = cpg_get_custom_include($CONFIG['custom_footer_path']);
if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
cpg_debug_output();
}
$template_vars = array(
'{CUSTOM_FOOTER}' => $custom_footer,
'{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
);
$template_footer=$template_footer.'<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>'; //Mod for custom MYlink
echo template_eval($template_footer, $template_vars);
}
?>
Pse advise - and do I just save as theme.php ?
yes, but first you need to change the url and title of your link
thank you so much !! :-*