Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Menü ändern/anpassen  (Read 5266 times)

0 Members and 1 Guest are viewing this topic.

svfreaks

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Menü ändern/anpassen
« on: July 21, 2010, 12:34:27 am »

Hallo,

meine 3 Frage für heute :D
Ich würde gerne mein Menü anpassen, u.a. auch so, dass ich den Menü-Punkt "Kontakt" durch Forum ersetze, wie geht das?
Habe schon gesucht und gefunden, dass man etwas in include/themes.inc.php etwas ändern muss, nur was und vorallem wo habe ich überhaupt nicht verstanden, zur Info: Ich benutze rainy_day als Theme ;)

Link zur Page:
svfreaks.square7.ch/space

Vielen Dank :)

lg
Logged

Αndré

  • Administrator
  • Coppermine addict
  • ****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Menü ändern/anpassen
« Reply #1 on: July 21, 2010, 07:54:56 am »

Ich schlage vor, dass du dir dringend mal die Doku durchliest und verstehst. Alle Fragen die du bisher gestellt hast, sind in der Doku erklärt und wurden hier im Forum auch schon mehrfach behandelt (Suche benutzen).


Habe schon gesucht und gefunden, dass man etwas in include/themes.inc.php etwas ändern muss
Das ist falsch. Alles was du in dieser Datei ändern kannst, kannst du auch in der Datei theme.php deines Themes vornehmen. Siehe Doku.


Kopiere folgenden Inhalt in die Datei theme.php deines Themes und passe es nach deinen Wünschen an:
Code: [Select]
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);
}

// HTML template for sub_menu
$template_sub_menu = $template_sys_menu;

if (!defined('THEME_HAS_NO_SYS_MENU_BUTTONS')) {

  // HTML template for template sys_menu spacer

  $template_sys_menu_spacer = '<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}{HREF_ATTRIBUTES}
    addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{CONTACT_LNK}','{CONTACT_TITLE}','{CONTACT_TGT}','contact',$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);
    if (array_key_exists('allowed_albums', $USER_DATA) && is_array($USER_DATA['allowed_albums']) && count($USER_DATA['allowed_albums'])) {
      addbutton($sys_menu_buttons,'{UPL_APP_LNK}','{UPL_APP_TITLE}','{UPL_APP_TGT}','upload_approval',$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,'{SIDEBAR_LNK}','{SIDEBAR_TITLE}','{SIDEBAR_TGT}','sidebar',$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,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
    addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');
    // Login and Logout don't have a spacer as only one is shown, and either would be the last option.



  $sys_menu_buttons = CPGPluginAPI::filter('sys_menu',$sys_menu_buttons);
  $params = array('{BUTTONS}' => assemble_template_buttons($template_sys_menu_button,$sys_menu_buttons));
  $template_sys_menu = template_eval($template_sys_menu,$params);
}


Ich benutze rainy_day als Theme
http://documentation.coppermine-gallery.net/de/theme_create.htm#theme_create_rename
« Last Edit: July 21, 2010, 08:01:50 am by Αndré »
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.