forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: tgontz on January 23, 2006, 05:22:26 pm

Title: Adding to the Gallery title bar (split topic, breadcrumb issue, heredoc syntax)
Post by: tgontz on January 23, 2006, 05:22:26 pm
I am also trying to add the search feature to the bread crumb area. However, when I attempt to do this, my gallery will not load. All I get is a blank screen.

Here is what I did:

I copied the following from the sample theme:
Code: [Select]
EOT;
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
        <tr>
                <td colspan="3" align="left" class="tableh1"><span class="statlink"><b>{BREADCRUMB}</b></span></td>
        </tr>
<!-- END breadcrumb -->


I then pasted it into my Classic theme, will now looks like this:
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.2
  $Source: /cvsroot/coppermine/devel/themes/classic/theme.php,v $
  $Revision: 1.71 $
  $Author: gaugau $
  $Date: 2005/10/25 01:16:24 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

EOT;
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
        <tr>
                <td colspan="3" align="left" class="tableh1"><span class="statlink"><b>{BREADCRUMB}</b></span></td>
        </tr>
<!-- END breadcrumb -->
?>

What am I doing wrong?

Thanks!
Title: Re: Another question. Adding to the Gallery title bar
Post by: Paver on January 23, 2006, 05:52:16 pm
You're missing the EOT; line, before the ?> line.

The syntax <<<EOT means to include all the following text up to but not including a line which only includes the text specified, in this case "EOT".
Title: Re: Another question. Adding to the Gallery title bar
Post by: tgontz on January 23, 2006, 06:16:45 pm
That did the trick! Thank you!

Now, onto a related question:

Do I/should I start and end each section that I am going to edit with EOT; ?

OR do I just need EOT; at end before the ?>

Thanks!
Title: Re: Another question. Adding to the Gallery title bar
Post by: Paver on January 23, 2006, 06:27:11 pm
For each & every variable you copy from sample/theme.php that has an "EOT" at the beginning, you need to copy down to the following EOT; line.  That's how you copy from sample/theme.php.  For functions, you need to copy down to the closing brace for the function.

If you want to create your own variables and use this syntax, look up "heredoc syntax" on php.net.
Title: Re: Another question. Adding to the Gallery title bar
Post by: Joachim Müller on January 23, 2006, 09:04:54 pm
split from unrelated thread http://forum.coppermine-gallery.net/index.php?topic=26695.0
Marking as solved
Title: Re: Adding to the Gallery title bar (split topic, breadcrumb issue, heredoc syntax)
Post by: tgontz on January 24, 2006, 02:39:52 pm
Thanks for the info!