Ignore:
Timestamp:
Aug 28, 2008, 2:32:39 AM (16 years ago)
Author:
rvelices
Message:
  • based on test_menu by grum (thanks to you) - integration of dynamic menu bar to pwg
  • the menubar is composed now of dynamic blocks that can be ordered/hidden
  • plugins can add their own blocks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/AMenuManager/amm_aip.class.inc.php

    r2468 r2488  
    190190  public function init_events()
    191191  {
    192     add_event_handler('menubar_file', array(&$this, 'plugin_public_menu') );
    193192    add_event_handler('loc_end_page_header', array(&$this->css, 'apply_CSS'));
    194193  }
     
    238237
    239238        case 'setmenu_modspecial_sections_list':
    240           $result=$this->ajax_amm_setmenu_mod_section_list('amm_sections_modspecial');
     239          $result=$this->ajax_amm_setmenu_mod_section_list('amm_sections_modspecials');
    241240          break;
    242241        case 'setmenu_modspecial_sections_showhide':
    243           $result=$this->ajax_amm_setmenu_mod_section_showhide('amm_sections_modspecial', $_REQUEST['fItem']);
     242          $result=$this->ajax_amm_setmenu_mod_section_showhide('amm_sections_modspecials', $_REQUEST['fItem']);
    244243          break;
    245244
     
    326325      'AMM_AJAX_URL_LIST' => $this->page_link."&ajaxfct=",
    327326      'show_icons_selected' => $this->my_config['amm_links_show_icons'],
    328       'active_selected' => $this->my_config['amm_links_active'],
    329327      'lang_selected' => $user['language'],
    330328      'fromlang' => substr($user['language'],0,2)
     
    460458  {
    461459    $this->my_config['amm_links_show_icons']=$_POST['famm_links_show_icons'];
    462     $this->my_config['amm_links_active']=$_POST['famm_links_active'];
    463460    $languages=get_languages();
    464461    foreach($languages as $key => $val)
     
    474471  protected function action_randompic_modify_config()
    475472  {
    476     $this->my_config['amm_randompicture_active']=$_POST['famm_randompicture_active'];
    477473    $this->my_config['amm_randompicture_showname']=$_POST['famm_randompicture_showname'];
    478474    $this->my_config['amm_randompicture_showcomment']=$_POST['famm_randompicture_showcomment'];
     
    542538    $template_datas=array(
    543539      'lnk_list' => $this->page_link.'&fAMM_tabsheet=links',
    544       'active_selected' => $this->my_config['amm_randompicture_active'],
    545540      'showname_selected' => $this->my_config['amm_randompicture_showname'],
    546541      'showcomment_selected' => $this->my_config['amm_randompicture_showcomment'],
     
    703698  protected function action_create_modify_personalised()
    704699  {
    705     global $menu, $user;
     700    global $user;
    706701
    707702    if($_POST['famm_modeedit']=='create')
     
    734729      }
    735730    }
    736 
    737     if($_POST['famm_modeedit']=='create')
    738     {
    739       $menu->register('mbAMM_personalised'.$id, ($_POST['famm_personalised_nfo']=='')?$_POST['famm_personalised_title_'.$user['language']]:$_POST['famm_personalised_nfo'], 0, 'AMM');
    740     }
    741 
    742 
    743 
    744731  }
    745732
     
    813800  {
    814801    $numurl=$this->get_count_url();
    815     $sql="INSERT INTO ".$this->tables['urls']." (id, label, url, mode, icon, position, visible)
    816           VALUES ('', '".$datas['label']."', '".$datas['url']."', '".$datas['mode']."',
     802    $sql="INSERT INTO ".$this->tables['urls']." (label, url, mode, icon, position, visible)
     803          VALUES ('".$datas['label']."', '".$datas['url']."', '".$datas['mode']."',
    817804                  '".$datas['icon']."', '".$numurl."', '".$datas['visible']."')";
    818805    return(pwg_query($sql));
     
    10541041  private function ajax_amm_personalised_delete($sectionid)
    10551042  {
    1056     global $menu;
    1057 
    10581043    if(!$this->adviser_abort())
    10591044    {
    10601045      $this->delete_personalised($sectionid);
    1061       $menu->unregister('mbAMM_personalised'.$sectionid);
    10621046    }
    10631047    return($this->ajax_amm_personalised_list());
Note: See TracChangeset for help on using the changeset viewer.