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: noob question  (Read 5253 times)

0 Members and 1 Guest are viewing this topic.

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
noob question
« on: May 23, 2006, 08:23:04 pm »

Hi so I have setup coppermine, bridged it with my punbb forum and now would like to start customizing it and integrating it.

Don't bite my head of as I'm sure I coud spend a little while searching and find the solution but hey I'm asking anyway.

I want my html menubar with my logo links etc to be above the coppermine gallery....in punbb you simply stick the html code in a file called main.tpl and you can basically stick punbb forum in your site.

Is there a simple main.tpl equivalent in coppermine where I can stick the html code of my sites menubar?


I did a little searching and the answer diddn't jump out at me so I'm asking. :)
Cheers

Nick
« Last Edit: May 23, 2006, 09:45:58 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: noob question
« Reply #1 on: May 23, 2006, 09:41:19 pm »

template.html
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: noob question
« Reply #2 on: May 23, 2006, 09:43:04 pm »

cool thanks....just working out how to make it run php but i guess i can work that out now
Logged

Nibbler

  • Guest
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: noob question
« Reply #4 on: May 23, 2006, 09:47:21 pm »

oh...that's a bummer :)

is there a commonly used workaround for this?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: noob question
« Reply #5 on: May 24, 2006, 12:08:51 am »

start reading our docs - they are there because we consider them to be mandatory to be read before asking questions. I'm sorry if you're too lazy to read them - in that pareticular case, I'm too lazy to answer your questions.
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: noob question
« Reply #6 on: May 24, 2006, 12:11:54 am »

no worries I've been reading them

I see I have to use the theme.php file with function pageheader($.....

in order to put php in there....I am doing it now.  Although it is kinda tricky because the php doesn't seem to be functioning 100% as it should.
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: noob question
« Reply #7 on: May 24, 2006, 12:35:30 am »

hi

so sorry to ask again but I am fairly sure that this isn't in the manuals....so I have a php file that I have included by using this mod to the theme.php file:

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

if(empty($custom_header)){
include('MYPHPFILE.php');
static $custom_header;
$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);
}

The Php file consists of an 'if' and 'else' statement...when run on its own the php file will run fine except when included in the theme.php file it only seems to execute the 'if' and not the 'else' statement because even if the 'if' is a negative it still behaves as if it is a possitive and the 'else' doesn't get a chance to run.

Any help on the would be great and sorry if it is a question that is repeated somewhere in the docs/forums.

Cheers

Nick
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: noob question
« Reply #8 on: May 24, 2006, 12:51:30 am »

im going ot post the above as a new topic as I doubt anyone will look at this now it says problem solved on it.
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
'if' and 'else' malfunction when including php into theme.php
« Reply #9 on: May 24, 2006, 12:52:56 am »

sorry to ask again but I am fairly sure that this isn't in the manuals....so I have a php file that I have included by using this mod to the theme.php file:

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

if(empty($custom_header)){
include('MYPHPFILE.php');
static $custom_header;
$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);
}

The Php file consists of an 'if' and 'else' statement...when run on its own the php file will run fine except when included in the theme.php file it only seems to execute the 'if' and not the 'else' statement because even if the 'if' is a negative it still behaves as if it is a possitive and the 'else' doesn't get a chance to run.

Any help on the would be great and sorry if it is a question that is repeated somewhere in the docs/forums.

Cheers

Nick
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: 'if' and 'else' malfunction when including php into theme.php
« Reply #10 on: May 24, 2006, 05:09:48 am »

it is a problem with the cookie of my site...it seems to return the value guest even if I am logged in...the cookie works fine in the coppermine directory just not when it's called from a file in the coppermine directory!!


Any ideas?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: noob question
« Reply #11 on: May 24, 2006, 07:20:17 am »

im going ot post the above as a new topic as I doubt anyone will look at this now it says problem solved on it.
merged again. Don't!
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 16 queries.