Hello everyone :)
I'm doing some changes in theme.php of the classic theme.
I'd like not to show the default HTML comments like
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN thumb_cell -->
but if I delete them, I get errors like:
Failed to find block 'thumb_cell'(#(<!-- BEGIN thumb_cell -->)(.*?)(<!-- END thumb_cell -->)#s)
Is it possible to hide them in some way?
thanx.
Bonjour,
you don't deléte in red
<!-- BEGIN album_list -->
<a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
<!-- END album_list -->
search in the board i have find it ,but i don't remenber where (may be in théme.php) :P
don't delete the html comments, coppermine will need it. Instead, comment out the stuff that actually displays things. In above example, change it to<!-- BEGIN album_list -->
<!--<a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />-->
<!-- END album_list -->
GauGau
As far as I understand your post you want to get rid of the comments in the output. As you have experienced already this can't be done by removing the comments from the theme file, since Coppermine needs them. What I did in Coppermine 1-2 is, I edited the routine where the template is evaluated.
Open the file /include/functions.inc.php with an editor, look for
// Eval a template (substitute vars with values)
function template_eval(&$template, &$vars)
Below you'll find the following:
{
return strtr($template, $vars);
}
Change it to:
{
return ereg_replace("<!--([^-]*([^-]|-([^-]|-[^>])))*-->", "", strtr($template, $vars));
}
HTH,
Aleks
PS. Just a suggestion for the developers: How about adding this to the package? Preferreably with the option to turn it on/off for debugging?
that's not what I was suggesting. The comment markers are used by the coppermine theme engine internally. The dev team recommends commenting out links to items the users don't want to appear on their pages (e.g. menu items). Replacing things when the theme get's parsed will even lead to more confusion.
GauGau
QuoteReplacing things when the theme get's parsed will even lead to more confusion.
That's why I thought of making it optional, but you're probably right anyway ;D
Aleks.