Trying to add this in template.html and it just wont have it Trying to add this in template.html and it just wont have it
 

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

Trying to add this in template.html and it just wont have it

Started by usavio, September 01, 2004, 10:00:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

usavio

Hey, i am trying to add this in template.html http://www.usavio.com/how.html and it just wont work. It all goes mad, and i just can't get it to work.

Any help appreciated.

Thanks

Joachim Müller

as you didn't provide the theme you were going to add your code, and you didn't specify where it is supposed to go, I'll demonstrate this with the classic theme. Edit themes/classic/template.html and change it like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/classic/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.1 2004/06/11 09:20:08 tarique Exp $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20" bgcolor="#CCCCCC">
<tr>
        <td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td><a href="index.php"><img src="themes/classic/images/site_logo.png" alt="" border="0" /><br /></a></td>
                                <td width="100%" align="center">
                                        <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}
                                </td>
                        </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
                 <tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
                  {THEME_SELECT_LIST}</td>
                  </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
                                </td>
                        </tr>
                </table>
                </td>
        </tr>
</table>
<table width="760" height="71" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/bottom01.gif">
  <tr>
    <td align="center"> <div align="center">
        <table width="400" border="0" cellpadding="4" cellspacing="0" class="text">
          <tr>
            <td width="70"><img src="../images/spacer.gif" width="1" height="1"></td>

            <td width="330"><font color="#FFFFFF">Copyright &copy;2004, Usavio.com.
              All rights reserved.</font></td>
          </tr>
        </table>
        <table width="650" border="0" cellpadding="0" cellspacing="0" class="text">
          <tr align="center">
            <td width="143"><u><font color="#FFFFFF">Hosting</font></u></td>
            <td width="91"><u><font color="#FFFFFF">Domains</font></u></td>

            <td width="105"><u><font color="#FFFFFF">Image Hosting </font></u></td>
            <td width="95"><u><font color="#FFFFFF">Usavio Store</font></u></td>
            <td width="104"><u><font color="#FFFFFF">eBay Auctions</font></u></td>
            <td width="112"><u><font color="#FFFFFF">Some Service</font></u></td>
          </tr>
        </table>
      </div></td>

  </tr>
</table>
&nbsp;
<p></p>
</body>
</html>
Notice the dots in front of your image tags? When refering to folders in a coppermine theme, you have to understand that relative links will have to be seen from the coppermine root folder, not the theme folder your template file resides in. In above example, I'm refering to your image folder being one level up (on the same level as your coppermine root). If you want to refer to pics inside your theme's images folder, use <img src="themes/classic/images/yourpic.jpg" alt="" border="0" />instead. For details, or if doesn't fix your issue, post a link to your actual coppermine page, together with reference to the theme you are going to use.

Joachim

usavio

Hello,

Thank you for the help.

The item shows now with your above code. But the links go a little mad aswell as the cat images disappear. Also, it shows the image below the 'page' i would like it to be just above or even below the copyright.

You can see the site here: usavio.com/pics

Thanks

Joachim Müller

Why don't you insert your code into http://www.usavio.com/pics/themes/classic/template.html - it currently only contains<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/classic/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.1 2004/06/11 09:20:08 tarique Exp $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20" bgcolor="#FF9900">
<tr>
        <td valign="top" bordercolor="#000000" bgcolor="#FFFFFF" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td><a href="http://usavio.com"><img src="themes/classic/images/site_logo.png" alt="" border="0" /><br /></a></td>
                                <td width="100%" align="center">
                                        <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}
                                </td>
                        </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
                 <tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
                  {THEME_SELECT_LIST}</td>
                  </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
                                </td>
                        </tr>
                </table>
                </td>
        </tr>
</table>
</body>
</html>
It'd be much easier if you showed us the code you actually have come up with, instead of playing hide and seek (e.g. not posting links one can click on, not posting the full code file that doesn't work for you). It's hard to talk about this theoretically, without any actual code.

Joachim

usavio

Hello.

Code i am tryin to add and to get working in template.html

http://www.usavio.com/how.html

<table width="760" height="71" border="0" align="center" cellpadding="0" cellspacing="0" background="/images/bottom01.gif">
  <tr>
    <td align="center"> <div align="center">
        <table width="400" border="0" cellpadding="4" cellspacing="0" class="text">
          <tr>
            <td width="70"><img src="/images/spacer.gif" width="1" height="1"></td>

            <td width="330"><font color="#FFFFFF">Copyright &copy;2004, Usavio.com.
              All rights reserved.</font></td>
          </tr>
        </table>
        <table width="650" border="0" cellpadding="0" cellspacing="0" class="text">
          <tr align="center">
            <td width="143"><u><font color="#FFFFFF">Hosting</font></u></td>
            <td width="91"><u><font color="#FFFFFF">Domains</font></u></td>

            <td width="105"><u><font color="#FFFFFF">Image Hosting </font></u></td>
            <td width="95"><u><font color="#FFFFFF">Usavio Store</font></u></td>
            <td width="104"><u><font color="#FFFFFF">eBay Auctions</font></u></td>
            <td width="112"><u><font color="#FFFFFF">Some Service</font></u></td>
          </tr>
        </table>
      </div></td>

  </tr>
</table>


The Final code i have

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/classic/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.1 2004/06/11 09:20:08 tarique Exp $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20" bgcolor="#FF9900">
<tr>
        <td valign="top" bordercolor="#000000" bgcolor="#FFFFFF" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td><a href="http://usavio.com"><img src="themes/classic/images/site_logo.png" alt="" border="0" /><br /></a></td>
                                <td width="100%" align="center">
                                        <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}
                                </td>
                        </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
                 <tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
                  {THEME_SELECT_LIST}</td>
                  </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
                                </td>
                        </tr>
                </table>
                <p>&nbsp;</p></td>
        </tr>
</table>
<table width="984" height="71" border="0" align="center" cellpadding="0" cellspacing="0" background="/images/bottom01.gif">
  <tr>
    <td width="984" align="center"> <div align="center">
        <table width="400" border="0" cellpadding="4" cellspacing="0" class="text">
          <tr>
            <td width="70"><img src="/images/spacer.gif" width="1" height="1"></td>
            <td width="330"><font color="#FFFFFF">Copyright &copy;2004, Usavio.com.
              All rights reserved.</font></td>
          </tr>
        </table>
        <table width="650" border="0" cellpadding="0" cellspacing="0" class="text">
          <tr align="center">
            <td width="143"><u><font color="#FFFFFF">Hosting</font></u></td>
            <td width="91"><u><font color="#FFFFFF">Domains</font></u></td>
            <td width="105"><u><font color="#FFFFFF">Image Hosting </font></u></td>
            <td width="95"><u><font color="#FFFFFF">Usavio Store</font></u></td>
            <td width="104"><u><font color="#FFFFFF">eBay Auctions</font></u></td>
            <td width="112"><u><font color="#FFFFFF">Some Service</font></u></td>
          </tr>
        </table>
      </div></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>


Before: http://usavio.com/a.GIF

After: http://usavio.com/b.GIF


Also, the logo diasappears and the links text colour goes to blue.

Thanks, appreciated

Joachim Müller

Look, this is getting very hard. Why don't you create a new folder within the themes folder (call it "foobar" or whatever), copy everything you have in your current theme folder over to the new folder, edit the new template.html file and replace every place where "classic" is shown by "foobar". You can then have every piece of code you want to have later inside this new theme, and nobody will notice if it displayes errors, as the regular visitors of your site will still see the regular theme. Only you (and we from this board) can see the "foobar" theme by adding "theme=foobar" to the address bar in the url.

Joachim

usavio

Oh good idea, sorry i didn't think of that.

I am sorry. Anyway, http://www.usavio.com/pics/index.php?theme=classics we can now see that the links appear correctly as well as the logo (unlike before)

But there it is, a live view.

Thanks i appreciate your help


EDIT: I think for some reason it is working now?  8)

Joachim Müller