Advanced search  

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]

Pages: [1]   Go Down

Author Topic: question about adding header  (Read 4696 times)

0 Members and 1 Guest are viewing this topic.

MI

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
question about adding header
« on: July 04, 2005, 07:22:04 am »

I read the faq about adding a header but I don't understand where I put my info. 

This is what the faq said to edit:

function pageheader($section, $meta = '')
{
   global $CONFIG, $THEME_DIR;
   global $template_header, $lang_charset, $lang_text_dir;

   if(empty($custom_header)){
      include('/path/your_file.php');
      static $custom_header = ob_get_contents();
      ob_clean();
   }

   header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
   user_save_profile();

   $template_vars = array(
      '{LANG_DIR}' => $lang_text_dir,
      '{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
      '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
      '{META}' => $meta,
      '{GAL_NAME}' => $CONFIG['gallery_name'],
      '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
      '{MAIN_MENU}' => theme_main_menu(),
      '{ADMIN_MENU}' => theme_admin_mode_menu(),
      '{CUSTOM_HEADER}' => $custom_header,
   );

   echo template_eval($template_header, $template_vars);

This is the header I want to add:

<p align="center"><a href="http://www.beyondpaper.net/">
<img border="0" src="http://i3.photobucket.com/albums/y79/irimomof3/bpheader.jpg" width="625" height="166"></a></p>

<p>&nbsp;</p>

<p>&nbsp;&nbsp; <font size="5" face="Tempus Sans ITC">

<b><a href="http://www.beyondpaper.net/forum/"><font color="#000000">Forum</font></a>&nbsp;

<a href="http://www.beyondpaper.net/gallery"><font color="#000000">Gallery</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/shop/"><font color="#000000">Shop</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/bpteam.htm"><font color="#000000">Our Team</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/contests.htm"><font color="#000000">Contests</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/links.htm"><font color="#000000">Resources</font></a></b></font></p>
 

My question is where does the info I want to put in there fit in?   I know it has been said before but I don't understand.   :\'(
}
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

MI

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: question about adding header
« Reply #2 on: July 04, 2005, 09:10:17 pm »

Thanks for answering,  but like I said above I have gone through the search and don't understand.  Sorry man,  I just thought I could get a little help.  :\'(
Logged

Nibbler

  • Guest
Re: question about adding header
« Reply #3 on: July 04, 2005, 09:14:16 pm »

Save the stuff you want to add into a file, and enter the path to that file into include('/path/your_file.php');
Logged

MI

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: question about adding header
« Reply #4 on: July 04, 2005, 10:30:27 pm »

Ok, I just wanted to make sure I understand this right.   This is the info I want to add:

p align="center"><a href="http://www.beyondpaper.net/">
<img border="0" src="http://i3.photobucket.com/albums/y79/irimomof3/bpheader.jpg" width="625" height="166"></a></p>

<p>&nbsp;</p>

<p>&nbsp;&nbsp; <font size="5" face="Tempus Sans ITC">

<b><a href="http://www.beyondpaper.net/forum/"><font color="#000000">Forum</font></a>&nbsp;

<a href="http://www.beyondpaper.net/gallery"><font color="#000000">Gallery</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/shop/"><font color="#000000">Shop</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/bpteam.htm"><font color="#000000">Our Team</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/contests.htm"><font color="#000000">Contests</font></a>&nbsp;&nbsp;

<a href="http://www.beyondpaper.net/links.htm"><font color="#000000">Resources</font></a></b></font></p>
 
So I save this into a file that I make up and save upload it to my control panel?  And then put the file name in the path :  ('/path/your_file.php');
and that's it?   Does it have to be saved as a php file?
Logged

Nibbler

  • Guest
Re: question about adding header
« Reply #5 on: July 04, 2005, 10:33:07 pm »

Save it as an html file if it is just html.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: question about adding header
« Reply #6 on: July 04, 2005, 10:39:28 pm »

If all you are doing is adding static HTML, just edit the template.html file and put your code where you want it.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

MI

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: question about adding header
« Reply #7 on: July 04, 2005, 11:26:47 pm »

I treid to add it before I saw post from kegobeer and I got a parse error so I changed it back to what I thought was the original file and I am still getting a parse error:

Parse error: parse error, unexpected '{' in /home/scrap4/public_html/gallery/themes/water_drop/theme.php on line 2


THis is what I changed and how it looks:

function pageheader($section, $meta = ")
{   
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;

 
if(empty($custom_header)){
include('/path/bpheader.htm');
      static $custom_header = ob_get_contents();
      ob_clean();
   }

 header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND

PHY ONL UNI COM NAV INT DEM PRE"');
   user_save_profile();
       
 $template_vars = array('{LANG_DIR}' => $lang_text_dir,

       '{TITLE}' => $CONFIG['gallery_name'] . ' - ' .

$section,        '{CHARSET}' => $CONFIG['charset'] ==

'language file' ? $lang_charset : $CONFIG['charset'],   

     '{META}' => $meta,        '{GAL_NAME}' =>

$CONFIG['gallery_name'],        '{GAL_DESCRIPTION}' =>

$CONFIG['gallery_description'],        '{MAIN_MENU}' =>

theme_main_menu(),        '{ADMIN_MENU}' =>

theme_admin_mode_menu()
 '{CUSTOM_HEADER}' => $custom_header,

        );    echo template_eval($template_header,

$template_vars);
}

what can I do?
« Last Edit: July 05, 2005, 12:39:10 am by MI »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: question about adding header
« Reply #8 on: July 05, 2005, 12:53:03 am »

Upload a fresh copy of the theme.php file.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

MI

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: question about adding header
« Reply #9 on: July 05, 2005, 12:55:36 am »

where do I find that, I thought I had saved one but I didn't
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: question about adding header
« Reply #10 on: July 05, 2005, 01:03:42 am »

Download 1.3.3 from our site.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

MI

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: question about adding header
« Reply #11 on: July 05, 2005, 01:19:42 am »

Thank you!!  I got it back up.  :) ;D :)
« Last Edit: July 05, 2005, 01:39:07 am by MI »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: question about adding header
« Reply #12 on: July 05, 2005, 08:37:38 am »

edit themes/yourtheme/template.html, find
Code: [Select]
<body>and add after it (in a new line)
Code: [Select]
<p align="center"><a href="http://www.beyondpaper.net/">
<img border="0" src="http://i3.photobucket.com/albums/y79/irimomof3/bpheader.jpg" width="625" height="166"></a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; <font size="5" face="Tempus Sans ITC">
<b><a href="http://www.beyondpaper.net/forum/"><font color="#000000">Forum</font></a>&nbsp;
<a href="http://www.beyondpaper.net/gallery"><font color="#000000">Gallery</font></a>&nbsp;&nbsp;
<a href="http://www.beyondpaper.net/shop/"><font color="#000000">Shop</font></a>&nbsp;&nbsp;
<a href="http://www.beyondpaper.net/bpteam.htm"><font color="#000000">Our Team</font></a>&nbsp;&nbsp;
<a href="http://www.beyondpaper.net/contests.htm"><font color="#000000">Contests</font></a>&nbsp;&nbsp;
<a href="http://www.beyondpaper.net/links.htm"><font color="#000000">Resources</font></a></b></font></p>
and you should be fine. As suggested above: you're adding plain html, no need to edit theme.php or doing complicated stuff.

Side-note: <font size="5" face="Tempus Sans ITC"> is a silly thing to have in the first place - nearly nobody has this font installed. I strongly recommend learning some html basics.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.