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: Adding to the Gallery title bar (split topic, breadcrumb issue, heredoc syntax)  (Read 3970 times)

0 Members and 1 Guest are viewing this topic.

tgontz

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38

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!
« Last Edit: January 23, 2006, 09:06:25 pm by GauGau »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Another question. Adding to the Gallery title bar
« Reply #1 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".
Logged

tgontz

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Another question. Adding to the Gallery title bar
« Reply #2 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!
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Another question. Adding to the Gallery title bar
« Reply #3 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Another question. Adding to the Gallery title bar
« Reply #4 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
Logged

tgontz

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38

Thanks for the info!
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.