coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: michiel on June 13, 2006, 12:44:25 PM

Title: Error: custom link
Post by: michiel on June 13, 2006, 12:44:25 PM
Using CPG 1.3.3. I have developed my site http://www.dwaalgasten.nl/fotoblog (http://www.dwaalgasten.nl/fotoblog). I have made my own template. Now I would like to make a second album, and decided to start all over with CPG 1.4.8. I want the lay-out to be exactly the same, so I copied parts of my old theme.php file into the new one (see below). However, I get an error message at my new site http://www.dwaalgasten.nl/frummel (http://www.dwaalgasten.nl/frummel)
QuoteTemplate error
Failed to find block 'custom_link'(#(<!-- BEGIN custom_link -->)(.*?)(<!-- END custom_link -->)#s) in :
. In my old file there was no reference to a custom_link. Can anybody help me? Thanks!!

// HTML template for sub menu
$template_sub_menu = <<<EOT


                <span class="topmenu">
                        <ul><li><a href="{LASTUP_TGT}"><img src="themes/classic/images/navigatorfotonieuw.gif" width="127"/></a></li>
<!-- BEGIN album_list -->
                        <li><a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}"><img src="themes/classic/images/navigatorfotoalbums.gif" width="127"/></a></li
>
<!-- END album_list -->
<li><a href="http://www.dwaalgasten.nl"><img src="themes/classic/images/navigatorfotoweblog.gif" width="127"/></a></li
><li><a href="mailto:foto@dwaalgasten.nl"><img src="themes/classic/images/navigatorfotocontact.gif" width="127"/></a></li></ul>
<!-- BEGIN allow_memberlist -->

                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a>  ::

<!-- END allow_memberlist -->
<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a> ::
<!-- END my_gallery -->

<!-- BEGIN my_profile -->

                        <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a> ::

<!-- END my_profile -->

<!-- BEGIN faq -->

                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a> ::

<!-- END faq -->
EOT;
Title: Re: Error: custom link
Post by: Gizmo on June 13, 2006, 01:05:02 PM
Here's a Sticky that deals with this issue of "Template error - failed to find block BLOCK_ID": http://forum.coppermine-gallery.net/index.php?topic=26897.0 (http://forum.coppermine-gallery.net/index.php?topic=26897.0). Read the Stickies at the top of this board for further theme upgrade questions then post if you need help.

Cheers,

Gizmo
Title: Re: Error: custom link
Post by: Sami on June 13, 2006, 01:10:31 PM
- first read documentation (http://coppermine-gallery.net/demo/cpg14x/docs/theme/edit_theme.html)
you should have somthing like this(this is for Hardwire not yours)
// HTML template for sub menu
$template_sub_menu = <<<EOT

                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN custom_link -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
<!-- END custom_link -->
<!-- BEGIN album_list -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
<!-- END album_list -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                       <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                       <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{LASTCOM_TGT}" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{TOPN_TGT}" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{TOPRATED_TGT}" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{FAV_TGT}" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{SEARCH_TGT}" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" alt="" /></td>
                                </tr>
                        </table>

EOT;

on your theme.php
if it's not there copy and paste this to your theme and change the path and look to fit yours
Title: Re: Error: custom link
Post by: Joachim Müller on June 13, 2006, 05:46:29 PM
Another mandatory read when upgrading cpg1.3.x themes to cpg1.4.x: http://coppermine-gallery.net/demo/cpg14x/docs/theme/