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
-
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!
-
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".
-
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!
-
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.
-
split from unrelated thread http://forum.coppermine-gallery.net/index.php?topic=26695.0
Marking as solved
-
Thanks for the info!