How to add my HTML to the theme.tpl file

DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sun, 2005-08-07 10:25

I know this should be easy to do, but I can’t seem to work out how or where to add my own header html into the theme.tpl file.

I have spent the last four hours messing around, but have not been successful! My header consists of 16 navigation buttons. I also want to put a background image on every page.

I guess if someone could send me a sample customized theme.tpl then I could compare before and after.

Also, the instructions say ‘If you want to customize this file, do not edit it directly since future upgrades may overwrite it. Instead, copy it into a new directory called "local" and edit that version. Gallery will look for that file first and use it if it exists.‘

Well, where exactly do I put that new ‘local’ directory?

Thanks in advance,

Damien

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-08-07 11:35

you want to do something like http://www.nei.ch/gallery/ ?

what i did: copied themes/matrix/templates/theme.tpl to themes/matrix/templates/local/theme.tpl
then i edited this copy, i've added a css link in the <head> section and after the <body> i've added my page header.

adding a background image is a matter of css body { background:....}.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sun, 2005-08-07 14:00

Yes, something like that. Thanks for explanation... Little by little I am getting it together... Now I have the location correct!

I don’t really understand about CSS too much...

The navigation buttons I have have rollovers that I made in GoLive. In Gallery 1 I just copied the nav HTML into the wrapperheader and made a few adjustments and it worked.

I have now worked out how to get the buttons to show up but I can’t seem to get the rollovers to work.

In Gallery One, I added the following and the rollovers would work..

******
<meta http-equiv="content-type" content="text/html;charset=iso-2022-jp">
<meta name="generator" content="Adobe GoLive 6">
<title>Navigation Menu</title>
<csactionitem name="B75C2F2F33"></csactionitem>
<csscriptdict import>
<script language="JavaScript1.2" src="../../Cambodia%20Kids/GeneratedItems/CSScriptLib.js"></script>
</csscriptdict>
<csactiondict>
<script><!--
var preloadFlag = false;
function preloadImages() {
if (document.images) {
over_Button01 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image01dark.gif');
over_Button02 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image02dark.gif');
over_Button03 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image03dark.gif');
over_Button04 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image04dark.gif');
over_Button05 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image05dark.gif');
over_Button06 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image06dark.gif');
over_Button07 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image07dark.gif');
over_Button08 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image08dark.gif');
over_Button09 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image09dark.gif');
over_Button10 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image10dark.gif');
over_Button11 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image11dark.gif');
over_Button12 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image12dark.gif');
over_Button13 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image13dark.gif');
over_Button14 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image14dark.gif');
over_Button15 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image15dark.gif');
over_Button16 = newImage(/*URL*/'../../Cambodia%20Kids/Images/Components/Contents/CCHNavButtons/cch_buttons_image16dark.gif');
preloadFlag = true;
}
}
CSInit[CSInit.length] = new Array(CSNSFix);

// --></script>
</csactiondict>
<csactions>
<csaction name="B75C2F2F33" class="Netscape CSS Fix" type="onload"></csaction>
</csactions>
</head>

******

In Gallery 2 I just get this error...

Fatal error: Smarty error: [in gallery:themes/matrix/templates/theme.tpl line 48]: syntax error: unbalanced parenthesis in if statement (Smarty_Compiler.class.php, line 1251) in /home/cambodia/public_html/Gallery2/lib/smarty/Smarty.class.php on line 1088

I suspect it is something to do with CSS but I am stuck!

Any further help would be greatly appreciated!

Damien