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

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]

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!