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
-
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
-
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.
-
post a link to gallery with custom theme
-
http://www.afterconcept.com/natuurmedia/index.php
-
change your default theme to something alse and then edit your current theme as suggested on sticky
-
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.
-
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).
-
I've attached the theme.php. thanks for your time :)
-
Sorry, but where did you attach that?
-
Strange it didn't upload it. Another attempt...
-
I can't unpack your zip file (it's cruppted) , Also your zip file must contain whole theme not just theme.php
-
Sorry for the troubles. New zip attached
-
this time you forgot to put template.html on pack !!!
-
DOH! I can't believe I'm having a hard time zipping something :o
-
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)
-
Okey , you don't have sys menu and sub menu on template.html , don't want to have menu at all ?
-
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
-
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
-
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.
-
Rename theme.txt (attachment) to theme.php and use it instead of yours
and about header , it's depend on how you code it ;)
-
Sorry but I can't see the attachment anywhere?
-
Sorry, I forgot !
-
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.
-
What is your default theme on config?
-
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!!!