Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: Template error  (Read 10715 times)

0 Members and 1 Guest are viewing this topic.

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Template error
« 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
« Last Edit: October 19, 2006, 04:06:13 pm by Sami »
Logged

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #1 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.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #2 on: October 12, 2006, 04:33:29 pm »

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

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #3 on: October 13, 2006, 10:58:40 am »

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #4 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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #5 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template error
« Reply #6 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).
Logged

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #7 on: October 16, 2006, 12:17:04 pm »

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

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #8 on: October 16, 2006, 01:26:59 pm »

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

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #9 on: October 16, 2006, 01:47:27 pm »

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

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #10 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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #11 on: October 16, 2006, 03:59:12 pm »

Sorry for the troubles. New zip attached
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #12 on: October 16, 2006, 05:41:42 pm »

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

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #13 on: October 16, 2006, 05:48:08 pm »

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

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #14 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)
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #15 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 ?
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #16 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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #17 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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Stephano87

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Template error
« Reply #18 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.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Template error
« Reply #19 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 ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board
Pages: [1] 2   Go Up
 

Page created in 0.023 seconds with 19 queries.