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: [Solved]: New templates don't work at places...  (Read 3844 times)

0 Members and 1 Guest are viewing this topic.

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
[Solved]: New templates don't work at places...
« on: June 29, 2008, 07:03:49 pm »

Hi there,

I've recently downloaded Coppertime for my new website and I tried to change the visual apparence of the gallery. I've altered classic/theme.php to create my own templates (left_menu) and (right_menu).

I've written in templates.html {LEFT_MENU} at the right place, and it worked.
I've done the same for the right menu, but if I put it after {GALLERY}, it doesn't work and it reads {RIGHT_MENU}.

Let me show you :

http://img167.imageshack.us/my.php?image=capturedb5.jpg


Would you know what I should do to make it work ?

Thank you !


PS : Sorry for my English, I'm French, and I hope I've been understandable enough !
« Last Edit: June 29, 2008, 09:46:37 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: New templates don't work at places...
« Reply #1 on: June 29, 2008, 07:16:20 pm »

Tags before {GALLERY} are processed by pageheader() and tags after {GALLERY} are processed by pagefooter().
Logged

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: New templates don't work at places...
« Reply #2 on: June 29, 2008, 07:45:59 pm »

OK, thanks, I'm gonna try this !
Logged

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: New templates don't work at places...
« Reply #3 on: June 29, 2008, 08:08:43 pm »

Hum, this is what I put in theme.php :

Code: [Select]
function pagefooter()
{
    //global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

   
            include('footer.php');   // ==> mon include de news
      static $footerpage;
      $footerpage = ob_get_contents();
      ob_clean();
 
          include('menu_droit.php');   // ==> mon include de news
      static $menu_droit;
      $menu_droit = ob_get_contents();
      ob_clean();
 



    $template_vars = array(
        '{CUSTOM_FOOTER}' => $custom_footer,
        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',

// start : mon bloc de news 
 '{MENU_DROIT}'   => $menu_droit, 
  '{FOOTER}'   => $footerpage, 
// end mon bloc de news

    );

    echo template_eval($template_footer, $template_vars);
}

And this is what I've got :

I've finally have my famous menu, but all is upside down. Even when I don't write {RIGHT_MENU} in template.html the page looks like that... Would you know what I ought to do ?

Thanks !
Logged

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: New templates don't work at places...
« Reply #4 on: June 29, 2008, 08:09:36 pm »

Oups, sorry, I forgot the link for the screenshot :

http://img185.imageshack.us/img185/3587/capture2bb6.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]
« Last Edit: June 30, 2008, 07:46:10 am by Joachim Müller »
Logged

Nibbler

  • Guest
Re: New templates don't work at places...
« Reply #5 on: June 29, 2008, 08:10:01 pm »

Add an ob_start() call before each include line.
Logged

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: New templates don't work at places...
« Reply #6 on: June 29, 2008, 08:16:20 pm »

Quote
Parse error: syntax error, unexpected T_INCLUDE in /homepages/33/d197330614/htdocs/alphav6/3/galerie/themes/classic/theme.php on line 96

 :(
Logged

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: New templates don't work at places...
« Reply #7 on: June 29, 2008, 08:17:49 pm »

Oh, sorry, i forgot the ";" !

Thanks It works, thank you so much !
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: New templates don't work at places...
« Reply #8 on: June 29, 2008, 08:23:41 pm »

@Gtalegende: Don't hotlink imagges. Attach them next time.  ;)
Logged
Read Docs and Search the Forum before posting. - Soporte en espaņol
--*--
Fabricio Ferrero's Website

Catching up! :)

Gtalegende

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: New templates don't work at places...
« Reply #9 on: June 29, 2008, 08:24:22 pm »

OK, sorry about that...
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.