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: theme.html -> Theme.php  (Read 4878 times)

0 Members and 1 Guest are viewing this topic.

eclipselv

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
theme.html -> Theme.php
« on: March 24, 2005, 12:23:15 am »

I need to change the extension of the theme.html file to theme.php.
I have php code that I need to place in the header.

Can someone please tell me the fille that calls this theme.html file so that I can change the extension.

thanks
ELV
« Last Edit: March 24, 2005, 04:21:02 am by TranzNDance »
Logged

Nibbler

  • Guest
Re: theme.html -> Theme.php
« Reply #1 on: March 24, 2005, 12:27:42 am »

Don't even go there. Use a custom header as described in the documentation.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Logged

eclipselv

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme.html -> Theme.php
« Reply #3 on: March 24, 2005, 04:18:44 am »

thanks for the info.

ELV
Logged

eclipselv

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme.html -> Theme.php
« Reply #4 on: March 25, 2005, 11:21:18 pm »

OK......
Im not all that great with php, I am learning and willing to learn.

I inserted the code in the place the faq specified.
It tells me the following:
Quote
Parse error: parse error, unexpected '(', expecting ',' or ';' in /home/arf/public_html/gallery/themes/default/theme.php on line 779
The line it is refering to is:
Quote
static $custom_header = ob_get_contents();

If I remove the () the gallery dispays but the header does not show up.

header.php is in root dir.
The code below is the what I have in my theme.php file.
Here is the link to the gallery: http://www.autoracingforums.net/gallery/

As you can see, it gives me a parse error.....
Any help on this would be very much appreciated.

EclipseLV

Code: [Select]
function pageheader($section, $meta = '')
{
   global $CONFIG, $THEME_DIR;
   global $template_header, $lang_charset, $lang_text_dir;

   if(empty($custom_header)){
      include('home/arf/public_html/header.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);
}
Logged

Nibbler

  • Guest
Re: theme.html -> Theme.php
« Reply #5 on: March 25, 2005, 11:27:06 pm »

Split that line into 2 lines:

Code: [Select]
static $custom_header;
$custom_header = ob_get_contents();
Logged

eclipselv

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme.html -> Theme.php
« Reply #6 on: March 26, 2005, 12:08:09 am »

ok thanks....
Well the gallery is shoing now, but still no header.

thanks for your help.
EclipseLV
Logged

Nibbler

  • Guest
Re: theme.html -> Theme.php
« Reply #7 on: March 26, 2005, 12:15:21 am »

If the path to the header is supposed to be a full server path then it needs to start with a '/' . If I go to http://www.autoracingforums.net/header.php all I get is a blank page.
Logged

eclipselv

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme.html -> Theme.php
« Reply #8 on: March 26, 2005, 12:20:57 am »

yah i must have been updating the second you tried to access it. its up i just seen it.

I added the "/" a while ago....

I even doublechecked that the theme is selected in the confic.
When I edit the template.html, the changes show up.

this is what I have now....  and thank you for your help.

Code: [Select]
{
   global $CONFIG, $THEME_DIR;
   global $template_header, $lang_charset, $lang_text_dir;

   if(empty($custom_header)){
      include('/home/arf/public_html/header.php');
      static $custom_header;
      $custom_header = ob_get_contents();
      ob_clean();
   }
« Last Edit: March 26, 2005, 12:26:17 am by eclipselv »
Logged

eclipselv

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: theme.html -> Theme.php
« Reply #9 on: March 26, 2005, 12:35:52 am »

Thanks for the help....
I have to just use html for now in the template.html file.

If someone knows how to get the php header to work, please let me know.

thanks to all.

EclipseLV
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.