coppermine-gallery.com/forum

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

Title: Removing menu buttons in Rainy Day
Post by: Alex53 on June 13, 2006, 12:22:36 PM
After reading some posts here I am trying to remove some buttons from the sub menu (?) from the rainy day template, namely last comments, last uploads, most viewed, etc. They dont seem fitting for a shop gallery. In fact if there is a good shop template out there please stop me now!

Anyway, I copied this from my sample template into the rainy day theme.php and commented the addbutton lines for the items I did not want. The result was a blank page. No errors, just blank.

if (!defined('THEME_HAS_NO_SUB_MENU_BUTTONS')) {

  // HTML template for template sub_menu spacer
  $template_sub_menu_spacer = $template_sys_menu_spacer;

  // HTML template for template sub_menu buttons
  $template_sub_menu_button= $template_sys_menu_button;

  // HTML template for template sub_menu buttons
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');

  $params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
  $template_sub_menu = template_eval($template_sub_menu,$params);
}



Could anyone help me, since its a known template maybe you can just tell me what to paste where. Coppermine version is 148.

Thanks!
Title: Re: Removing menu buttons in Rainy Day
Post by: Alex53 on June 13, 2006, 12:39:42 PM
Oh and I also want to remove the line that says; '84 files in 3 albums with 0 comments viewed 5 times' at the top of the album list, and the line that says '12 files, last one added on Jun 12, 2006' in the description of each album. Maybe there are easier ways to do this than editing the template, please enlighten me :)
Title: Re: Removing menu buttons in Rainy Day
Post by: Gizmo on June 13, 2006, 12:52:25 PM
You should read a bit more carefully in the future. There are dozens of posts on this button removal subject but here's one that will do what you want. The final_extract plugin works great for this theme and there's even a Sticky at the top of this board: http://forum.coppermine-gallery.net/index.php?topic=25197.0 (http://forum.coppermine-gallery.net/index.php?topic=25197.0). Here's another post to also help you along: http://forum.coppermine-gallery.net/index.php?topic=32394.0 (http://forum.coppermine-gallery.net/index.php?topic=32394.0).

There's a one question rule in the forum so you'll have to post them separately but they have been asked many times as well so I bet you'll find the answer if you search for them.

Gizmo
Title: Re: Removing menu buttons in Rainy Day
Post by: Sami on June 13, 2006, 12:55:19 PM
- 1 question per post ;)
- you should put this code at the beginning of the theme.php right after define stuff

function addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer) {
  $menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer);
}
    addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');

and then do your comment out