[Solved]: Removing buttons // not working [Solved]: Removing buttons // not working
 

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

[Solved]: Removing buttons // not working

Started by raindance, July 31, 2009, 08:33:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raindance

I know this has been asked and answered but I' wondering if it can be done without a plug in?

I copied over sample theme to my new theme KP and uploaded. I am trying to comment out the buttons Album list    Last uploads    Last comments    Most viewed    Top rated    My Favorites    Search

But when I add // before  these lines, it breaks.

addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{MY_GAL_LNK}','{MY_GAL_TITLE}','{MY_GAL_TGT}','my_gallery',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{MEMBERLIST_LNK}','{MEMBERLIST_TITLE}','{MEMBERLIST_TGT}','allow_memberlist',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{MY_PROF_LNK}','{MY_PROF_TITLE}','{MY_PROF_TGT}','my_profile',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{ADM_MODE_LNK}','{ADM_MODE_TITLE}','{ADM_MODE_TGT}','enter_admin_mode',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{USR_MODE_LNK}','{USR_MODE_TITLE}','{USR_MODE_TGT}','leave_admin_mode',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer);
   addbutton($sys_menu_buttons,'{FAQ_LNK}','{FAQ_TITLE}','{FAQ_TGT}','faq',$template_sys_menu_spacer);
  // addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
   addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');

I was able to add one before login, sometimes it works sometimes not. When i add to any others, and sometimes with login, i get the error:

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

           <!-- BEGIN home -->
       <a href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</a> <img src="themes/KP/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
 <!-- END home -->  <!-- BEGIN allow_memberlist -->
       <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a> <img src="themes/KP/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
 <!-- END allow_memberlist -->        <!-- BEGIN upload_pic -->
       <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a> <img src="themes/KP/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
 <!-- END upload_pic -->  <!-- BEGIN register -->
       <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a> <img src="themes/KP/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
 <!-- END register -->  <!-- BEGIN faq -->
       <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a> <img src="themes/KP/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
 <!-- END faq -->  


Any help appreciated.

Thanks


raindance

It looks like with a little further looking this issue has been well described here
http://forum.coppermine-gallery.net/index.php/topic,26897.0.html

i will try those solutions.  thanks.

raindance

Solved by commenting out the entire menu in the html template as someone else suggested in a previous post. Apologies for forum clutter.