Template error - Failed to find block 'my_friends' Template error - Failed to find block 'my_friends'
 

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 - Failed to find block 'my_friends'

Started by zac, September 04, 2006, 03:01:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zac

Hi Stramm, thanks for working so hard on this.  It looks to be a really great modification.. however so far I have only managed to screw up my project.  After installing and running the update I now recieve this message:

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


I tried to dig through the  beefy 29 page over here:

http://forum.coppermine-gallery.net/index.php?topic=28367.0

but I got lost. 

I am running CPG 1.4.9
Thanks to anyone for any support with this.

zac

As usual.. five minutes after I give up and ask the question... I find the answer:

QuoteOpen the theme.php of the theme you want to modify and find the var $template_sys_menu_button. If the theme is using the new layout of the sys menu (you can see that if there are already lines existing like the codeline below) then just add the code below where you want it to appeare (maybe after the home link)

Code:

addbutton($sys_menu_buttons,'{MY_BUDDY_LNK}','','{MY_BUDDY_TGT}','my_friends',$template_sys_menu_spacer);



If the theme's using the old style then add something similar to the following and adapt the html to fit your layout
Code:

<!-- BEGIN my_friends -->
                                                <li class="sidebar_menu"><a href="{MY_BUDDY_TGT}" title="{MY_BUDDY_LNK}" class="navmenu">{MY_BUDDY_LNK}</a></li>
<!-- END my_friends -->




It works and this is indeed an excellent hack.. so many things I have wanted from CPG for sometime now.  THANKS!