Adding to the Gallery title bar (split topic, breadcrumb issue, heredoc syntax) Adding to the Gallery title bar (split topic, breadcrumb issue, heredoc syntax)
 

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

Main Menu

Adding to the Gallery title bar (split topic, breadcrumb issue, heredoc syntax)

Started by tgontz, January 23, 2006, 05:22:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tgontz

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:
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:
<?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!

Paver

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".

tgontz

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!

Paver

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.

Joachim Müller