plugins/SpecialUserPrefs.php
changeset 103 a8891e108c95
parent 85 7c68a18a27be
child 119 9de392a67964
child 133 af0f6ec48de3
equal deleted inserted replaced
102:d807dcd7aed7 103:a8891e108c95
    37     $userprefs_menu[$section] = Array(Array(
    37     $userprefs_menu[$section] = Array(Array(
    38       'text' => $text,
    38       'text' => $text,
    39       'link' => $link
    39       'link' => $link
    40       ));
    40       ));
    41   }
    41   }
       
    42 }
       
    43 
       
    44 $plugins->attachHook('compile_template', 'userprefs_jbox_setup($button, $tb, $menubtn);');
       
    45 
       
    46 function userprefs_jbox_setup(&$button, &$tb, &$menubtn)
       
    47 {
       
    48   global $db, $session, $paths, $template, $plugins; // Common objects
       
    49   
       
    50   if ( $paths->namespace != 'Special' || $paths->cpage['urlname_nons'] != 'Preferences' )
       
    51     return false;
       
    52   
       
    53   $tb .= "<ul>$template->toolbar_menu</ul>";
       
    54   $template->toolbar_menu = '';
       
    55   
       
    56   $button->assign_vars(array(
       
    57       'TEXT' => 'list of registered members',
       
    58       'FLAGS' => '',
       
    59       'PARENTFLAGS' => '',
       
    60       'HREF' => makeUrlNS('Special', 'Memberlist')
       
    61     ));
       
    62   
       
    63   $tb .= $button->run();
    42 }
    64 }
    43 
    65 
    44 function userprefs_menu_html()
    66 function userprefs_menu_html()
    45 {
    67 {
    46   global $userprefs_menu;
    68   global $userprefs_menu;