Ignore:
Timestamp:
Jul 1, 2014, 11:23:45 AM (10 years ago)
Author:
mistic100
Message:

add menu_link parameter, add identifier for menu link

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GuestBook/main.inc.php

    r28841 r28883  
    1212
    1313// TODO akismet
    14 global $prefixeTable;
     14global $conf, $prefixeTable;
    1515
    1616define('GUESTBOOK_ID',      basename(dirname(__FILE__)));
     
    1919define('GUESTBOOK_ADMIN',   get_root_url().'admin.php?page=plugin-' . GUESTBOOK_ID);
    2020define('GUESTBOOK_URL',     get_absolute_root_url() . make_index_url(array('section' => 'guestbook')));
     21
     22$conf['guestbook'] = safe_unserialize($conf['guestbook']);
    2123
    2224include_once(GUESTBOOK_PATH . 'include/events.inc.php');
     
    2931  add_event_handler('get_admin_plugin_menu_links', 'gb_admin_menu');
    3032}
     33else
     34{
     35  add_event_handler('loc_end_section_init', 'gb_section_init');
     36  add_event_handler('loc_end_index', 'gb_index');
     37}
    3138
    32 add_event_handler('blockmanager_apply', 'gb_menubar_apply', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
    33 
    34 add_event_handler('loc_end_section_init', 'gb_section_init');
    35 add_event_handler('loc_end_index', 'gb_index');
     39if ($conf['guestbook']['menu_link'])
     40{
     41  add_event_handler('blockmanager_apply', 'gb_menubar_apply', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
     42}
    3643
    3744
    3845function guestbook_init()
    3946{
    40   global $conf;
    41   $conf['guestbook'] = safe_unserialize($conf['guestbook']);
    42  
    4347  load_language('plugin.lang', GUESTBOOK_PATH);
    4448}
Note: See TracChangeset for help on using the changeset viewer.