Einfach ans Ende, vor dem
?>
folgendes einfügen:
function assemble_template_buttons($template_buttons,$buttons)
{
$counter=0;
$output='';
foreach ($buttons as $button) {
if (isset($button[4])) {
$spacer=$button[4];
} else {
$spacer='';
}
$params = array(
'{SPACER}' => $spacer,
'{BLOCK_ID}' => $button[3],
'{HREF_TGT}' => $button[2],
'{HREF_TITLE}' => $button[1],
'{HREF_LNK}' => $button[0],
'{HREF_ATTRIBUTES}' => $button[5]
);
$output.=template_eval($template_buttons, $params);
}
return $output;
}
function addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer,$href_attrib='')
{
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer,$href_attrib);
}
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}{HREF_ATTRIBUTES}
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,'rel="nofollow"');
//addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer,'rel="nofollow"');
addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer,'rel="nofollow"');
addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer,'rel="nofollow"');
addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer,'rel="nofollow"');
if ($CONFIG['browse_by_date'] != 0) {
addbutton($sub_menu_buttons, '{BROWSEBYDATE_LNK}', '{BROWSEBYDATE_TITLE}', '{BROWSEBYDATE_TGT}', 'browse_by_date', $template_sub_menu_spacer, 'rel="nofollow" class="greybox"');
}
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
$sub_menu_buttons = CPGPluginAPI::filter('sub_menu',$sub_menu_buttons);
$params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
$template_sub_menu = template_eval($template_sub_menu,$params);
}