Template error Template error
 

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

Template error

Started by Stephano87, October 12, 2006, 11:10:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stephano87

I am trying to build my own theme for Coppermine, but I keep running into this error:


Template error
Failed to find block 'documentation'(#(<!-- BEGIN documentation -->)(.*?)(<!-- END documentation -->)#s) in :

<div align="left">
<table cellpadding="0" cellspacing="1">
<tr>
<td class="admin_menu"><a href="editpics.php?mode=upload_approval" title="">{UPL_APP_LNK}</a></td>
<td class="admin_menu"><a href="config.php" title="">{CONFIG_LNK}</a></td>
<td class="admin_menu"><a href="albmgr.php{CATL}" title="">{ALBUMS_LNK}</a></td>
<td class="admin_menu"><a href="catmgr.php" title="">{CATEGORIES_LNK}</a></td>
<td class="admin_menu"><a href="usermgr.php" title="">{USERS_LNK}</a></td>
<td class="admin_menu"><a href="groupmgr.php" title="">{GROUPS_LNK}</a></td>
<td class="admin_menu"><a href="reviewcom.php" title="">{COMMENTS_LNK}</a></td>
<td class="admin_menu"><a href="searchnew.php" title="">{SEARCHNEW_LNK}</a></td>
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
</tr>
</table>
</div>


After reading the sticky and documentation, I've changed my admin menu to include this:

// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
<!-- BEGIN admin_approval -->
                                <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
[b]<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->[/b]
                        </tr>
                </table>
                </div>

EOT;


I'm still getting the same error. How come cpg somehow overlooks the lines or something?

Thanks a lot for your help,

Stephano87

Stephano87

It seems I'm not able to edit posts... Forgot to add:

When I access my site in the usual way (just the index.php) it gives the error, but it will just work when I do index.php?theme=mytheme.

Sami

post a link to gallery with custom theme
‍I don't answer to PM with support question
Please post your issue to related board


Sami

change your default theme to something alse and then edit your current theme as suggested on sticky
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

The strange thing is I've done that already, and I didn't see any difference. Copy and pasted from the sample theme, still the same thing. I've never edited those lines either.

Joachim Müller

http://www.afterconcept.com/natuurmedia/?theme=classic works as expected, so your custom theme is broken. If you want supporters to look into your custom theme, you should zip it and attach it to your posting (using "additional options" when composing your message).

Stephano87

I've attached the theme.php. thanks for your time :)

Sami

Sorry, but where did you attach that?
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

Strange it didn't upload it. Another attempt...

Sami

I can't unpack your zip file (it's cruppted) , Also your zip file must contain whole theme not just theme.php
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

Sorry for the troubles. New zip attached

Sami

this time you forgot to put template.html on pack !!!
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

DOH! I can't believe I'm having a hard time zipping something  :o

Stephano87

I'm sorry for being pushy, but I have a deadline coming up. I would really appreciate it if someone could look into this. I just can't find where the problem is. (latest files are attached here)

Sami

Okey , you don't have sys menu and sub menu on template.html , don't want to have menu at all ?
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

I have replaced those with the menu in my custom header for more flexibility. Do the tags need to be there? I can just hide them with css then

Sami

okey , then you should put them back and use empty variable for them under them.php like this
for sys menu

$template_sys_menu = <<<EOT
<!-- BEGIN home -->

<!-- END home -->
<!-- BEGIN my_gallery -->

<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->

<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->

<!-- END my_profile -->
<!-- BEGIN faq -->

<!-- END faq -->
<!-- BEGIN enter_admin_mode -->

<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->

<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->

<!-- END upload_pic -->

<!-- END register -->
<!-- BEGIN login -->

<!-- END login -->
<!-- BEGIN logout -->

<!-- END logout -->
EOT;


and use this for sub menu

$template_sub_menu = <<<EOT
                                       
<!-- BEGIN custom_link -->

<!-- END custom_link -->
<!-- BEGIN album_list -->

<!-- END album_list -->
                                       

EOT;


BTW , you should create static links for those menu on custom header
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

thanks for looking into this. I've put the tags back in the template, but where do those codes go in the theme.php I replaced all those addbutton lines but that didn't solve the error.

btw. what do you mean with the static links? if its about the
<?php
if (USER_ID){

echo'<li><a href="logout.php">Uitloggen</a></li>';

} else {
{
 
    
echo'<li><a href="login.php">Inloggen</a></li>
     <li><a href="index.php?file=photo_shop/photo_shop_register">Registreren</a></li>'
;

        
}
}
?>

That should be that way, or can't I use variables in the header? It works pretty well.

Sami

Rename theme.txt (attachment) to theme.php and use it instead of yours
and about header , it's depend on how you code it ;)
‍I don't answer to PM with support question
Please post your issue to related board