forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Stephano87 on October 12, 2006, 11:10:14 am

Title: Template error
Post by: Stephano87 on October 12, 2006, 11:10:14 am
I am trying to build my own theme for Coppermine, but I keep running into this error:

Code: [Select]
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:

Code: [Select]
// 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
Title: Re: Template error
Post by: Stephano87 on October 12, 2006, 11:13:54 am
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.
Title: Re: Template error
Post by: Sami on October 12, 2006, 04:33:29 pm
post a link to gallery with custom theme
Title: Re: Template error
Post by: Stephano87 on October 13, 2006, 10:58:40 am
http://www.afterconcept.com/natuurmedia/index.php
Title: Re: Template error
Post by: Sami on October 13, 2006, 12:46:43 pm
change your default theme to something alse and then edit your current theme as suggested on sticky
Title: Re: Template error
Post by: Stephano87 on October 13, 2006, 03:32:17 pm
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.
Title: Re: Template error
Post by: Joachim Müller on October 13, 2006, 03:59:46 pm
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).
Title: Re: Template error
Post by: Stephano87 on October 16, 2006, 12:17:04 pm
I've attached the theme.php. thanks for your time :)
Title: Re: Template error
Post by: Sami on October 16, 2006, 01:26:59 pm
Sorry, but where did you attach that?
Title: Re: Template error
Post by: Stephano87 on October 16, 2006, 01:47:27 pm
Strange it didn't upload it. Another attempt...
Title: Re: Template error
Post by: Sami on October 16, 2006, 02:18:57 pm
I can't unpack your zip file (it's cruppted) , Also your zip file must contain whole theme not just theme.php
Title: Re: Template error
Post by: Stephano87 on October 16, 2006, 03:59:12 pm
Sorry for the troubles. New zip attached
Title: Re: Template error
Post by: Sami on October 16, 2006, 05:41:42 pm
this time you forgot to put template.html on pack !!!
Title: Re: Template error
Post by: Stephano87 on October 16, 2006, 05:48:08 pm
DOH! I can't believe I'm having a hard time zipping something  :o
Title: Re: Template error
Post by: Stephano87 on October 17, 2006, 01:55:21 pm
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)
Title: Re: Template error
Post by: Sami on October 17, 2006, 06:23:27 pm
Okey , you don't have sys menu and sub menu on template.html , don't want to have menu at all ?
Title: Re: Template error
Post by: Stephano87 on October 18, 2006, 11:52:45 am
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
Title: Re: Template error
Post by: Sami on October 18, 2006, 12:21:53 pm
okey , then you should put them back and use empty variable for them under them.php like this
for sys menu
Code: [Select]
$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
Code: [Select]
$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
Title: Re: Template error
Post by: Stephano87 on October 18, 2006, 01:03:03 pm
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
Code: [Select]
<?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.
Title: Re: Template error
Post by: Sami on October 18, 2006, 05:32:09 pm
Rename theme.txt (attachment) to theme.php and use it instead of yours
and about header , it's depend on how you code it ;)
Title: Re: Template error
Post by: Stephano87 on October 19, 2006, 01:15:44 pm
Sorry but I can't see the attachment anywhere?
Title: Re: Template error
Post by: Sami on October 19, 2006, 01:57:40 pm
Sorry, I forgot !
Title: Re: Template error
Post by: Stephano87 on October 19, 2006, 03:49:16 pm
Thanks for your efforts, the error is still there tho??? if I put the ?theme=natuurmedia part behind the url, it works untill i clear cookies. it seems like it's trying to display another theme then I have set? Otherwise I'm affraid I'd have to rebuild it.
Title: Re: Template error
Post by: Sami on October 19, 2006, 03:58:18 pm
What is your default theme on config?
Title: Re: Template error
Post by: Stephano87 on October 19, 2006, 04:01:24 pm
Okay I have found out what the error was. somehow the admin panel of my custom theme is messed up and it kept resetting to the water_drop theme, which I gimped when I uploaded stuff to the wrong folder. So I went to admin.php?theme=classic, and set the theme to my custom theme and then cleared cookies. It's working great now! Sorry for my stupiditys. this problem really gave me some headaches, 'm glad it's solved.

Sami thanks a load for the support!!!