Random banner in the header of all pages Random banner in the header of all pages
 

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

Random banner in the header of all pages

Started by v8central, June 15, 2005, 03:27:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

v8central

I've read a few posts that say "read the docs" on how to do this, but I'm new to PHP and I can't find the exact steps in the docs either.

I'm using the Classic theme, and I would like to place a banner at the top of every page.  The code is included on a lot of other pages on my site, but they are written in ASP.  I know I have to convert the banner code to PHP, but I can't get anything included in the template.html and I don't understand where to make the changes in template.php

If anyone can help it would be greatly appreciated :)

snork13

well, i would need to see the code, but you should be able to add to the template.html file within the theme you use.

--snork13

v8central

I've tried this ...


<body>
<table border="4" cellspacing="2" cellpadding="3" width="100%" bordercolor="#000000">
<tr>
        <td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td>
<!--#include file="top.inc"-->                               
                                <br /><a href="index.php"><img src="/v8central.jpg" 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>


and this :


<body>
<table border="4" cellspacing="2" cellpadding="3" width="100%" bordercolor="#000000">
<tr>
        <td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td>
<?php
srand
((double)microtime()*1000000); 
echo 
rand(0,100); 
?>
                               
                                <br /><a href="index.php"><img src="/v8central.jpg" 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>


neither work.  The other (normal) HTML changes work well, but I need the ability to do an SSI or some PHP code

snork13


v8central

I think I have it - progress at least :)

Will post later, work beckons atm

Thanks for the help :)

Joachim Müller

you can't use PHP nor SSI in template.html, so your first suggestions are bound not to work. Snork13 is right: do as he suggests.