Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Random banner in the header of all pages  (Read 3640 times)

0 Members and 1 Guest are viewing this topic.

v8central

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Random banner in the header of all pages
« on: June 15, 2005, 03:27:01 pm »

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 :)
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: Random banner in the header of all pages
« Reply #1 on: June 15, 2005, 05:06:12 pm »

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
Logged

v8central

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Random banner in the header of all pages
« Reply #2 on: June 15, 2005, 10:46:16 pm »

I've tried this ...

Code: [Select]
<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 :

Code: [Select]
<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
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: Random banner in the header of all pages
« Reply #3 on: June 15, 2005, 11:25:25 pm »

Logged

v8central

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Random banner in the header of all pages
« Reply #4 on: June 15, 2005, 11:57:39 pm »

I think I have it - progress at least :)

Will post later, work beckons atm

Thanks for the help :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random banner in the header of all pages
« Reply #5 on: June 16, 2005, 08:02:47 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.