coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Gtalegende on June 29, 2008, 07:03:49 PM

Title: [Solved]: New templates don't work at places...
Post by: Gtalegende 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 !
Title: Re: New templates don't work at places...
Post by: Nibbler on June 29, 2008, 07:16:20 PM
Tags before {GALLERY} are processed by pageheader() and tags after {GALLERY} are processed by pagefooter().
Title: Re: New templates don't work at places...
Post by: Gtalegende on June 29, 2008, 07:45:59 PM
OK, thanks, I'm gonna try this !
Title: Re: New templates don't work at places...
Post by: Gtalegende on June 29, 2008, 08:08:43 PM
Hum, this is what I put in theme.php :

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 !
Title: Re: New templates don't work at places...
Post by: Gtalegende 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]
Title: Re: New templates don't work at places...
Post by: Nibbler on June 29, 2008, 08:10:01 PM
Add an ob_start() call before each include line.
Title: Re: New templates don't work at places...
Post by: Gtalegende on June 29, 2008, 08:16:20 PM
QuoteParse error: syntax error, unexpected T_INCLUDE in /homepages/33/d197330614/htdocs/alphav6/3/galerie/themes/classic/theme.php on line 96

:(
Title: Re: New templates don't work at places...
Post by: Gtalegende on June 29, 2008, 08:17:49 PM
Oh, sorry, i forgot the ";" !

Thanks It works, thank you so much !
Title: Re: New templates don't work at places...
Post by: Fabricio Ferrero on June 29, 2008, 08:23:41 PM
@Gtalegende: Don't hotlink imagges. Attach them next time.  ;)
Title: Re: New templates don't work at places...
Post by: Gtalegende on June 29, 2008, 08:24:22 PM
OK, sorry about that...