plugins/SpecialUserFuncs.php
changeset 590 03a60844c7c5
parent 586 234ddd896555
child 591 2529833a7731
equal deleted inserted replaced
589:88d4ed0a2898 590:03a60844c7c5
    22  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    22  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    23  */
    23  */
    24  
    24  
    25 global $db, $session, $paths, $template, $plugins; // Common objects
    25 global $db, $session, $paths, $template, $plugins; // Common objects
    26 
    26 
    27 $plugins->attachHook('session_started', '
    27 $plugins->attachHook('session_started', 'SpecialUserFuncs_paths_init();');
       
    28 
       
    29 function SpecialUserFuncs_paths_init()
       
    30 {
    28   global $paths;
    31   global $paths;
    29     $paths->add_page(Array(
    32   $paths->add_page(Array(
    30       \'name\'=>\'specialpage_log_in\',
    33     'name'=>'specialpage_log_in',
    31       \'urlname\'=>\'Login\',
    34     'urlname'=>'Login',
    32       \'namespace\'=>\'Special\',
    35     'namespace'=>'Special',
    33       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    36     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    34       ));
    37     ));
    35     $paths->add_page(Array(
    38   $paths->add_page(Array(
    36       \'name\'=>\'specialpage_log_out\',
    39     'name'=>'specialpage_log_out',
    37       \'urlname\'=>\'Logout\',
    40     'urlname'=>'Logout',
    38       \'namespace\'=>\'Special\',
    41     'namespace'=>'Special',
    39       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    42     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    40       ));
    43     ));
    41     $paths->add_page(Array(
    44   $paths->add_page(Array(
    42       \'name\'=>\'specialpage_register\',
    45     'name'=>'specialpage_register',
    43       \'urlname\'=>\'Register\',
    46     'urlname'=>'Register',
    44       \'namespace\'=>\'Special\',
    47     'namespace'=>'Special',
    45       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    48     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    46       ));
    49     ));
    47     $paths->add_page(Array(
    50   $paths->add_page(Array(
    48       \'name\'=>\'specialpage_preferences\',
    51     'name'=>'specialpage_preferences',
    49       \'urlname\'=>\'Preferences\',
    52     'urlname'=>'Preferences',
    50       \'namespace\'=>\'Special\',
    53     'namespace'=>'Special',
    51       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    54     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    52       ));
    55     ));
    53     
    56   
    54     $paths->add_page(Array(
    57   $paths->add_page(Array(
    55       \'name\'=>\'specialpage_contributions\',
    58     'name'=>'specialpage_contributions',
    56       \'urlname\'=>\'Contributions\',
    59     'urlname'=>'Contributions',
    57       \'namespace\'=>\'Special\',
    60     'namespace'=>'Special',
    58       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    61     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    59       ));
    62     ));
    60     
    63   
    61     $paths->add_page(Array(
    64   $paths->add_page(Array(
    62       \'name\'=>\'specialpage_change_theme\',
    65     'name'=>'specialpage_change_theme',
    63       \'urlname\'=>\'ChangeStyle\',
    66     'urlname'=>'ChangeStyle',
    64       \'namespace\'=>\'Special\',
    67     'namespace'=>'Special',
    65       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    68     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    66       ));
    69     ));
    67     
    70   
    68     $paths->add_page(Array(
    71   $paths->add_page(Array(
    69       \'name\'=>\'specialpage_activate_account\',
    72     'name'=>'specialpage_activate_account',
    70       \'urlname\'=>\'ActivateAccount\',
    73     'urlname'=>'ActivateAccount',
    71       \'namespace\'=>\'Special\',
    74     'namespace'=>'Special',
    72       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    75     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    73       ));
    76     ));
    74     
    77   
    75     $paths->add_page(Array(
    78   $paths->add_page(Array(
    76       \'name\'=>\'specialpage_captcha\',
    79     'name'=>'specialpage_captcha',
    77       \'urlname\'=>\'Captcha\',
    80     'urlname'=>'Captcha',
    78       \'namespace\'=>\'Special\',
    81     'namespace'=>'Special',
    79       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    82     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    80       ));
    83     ));
    81     
    84   
    82     $paths->add_page(Array(
    85   $paths->add_page(Array(
    83       \'name\'=>\'specialpage_password_reset\',
    86     'name'=>'specialpage_password_reset',
    84       \'urlname\'=>\'PasswordReset\',
    87     'urlname'=>'PasswordReset',
    85       \'namespace\'=>\'Special\',
    88     'namespace'=>'Special',
    86       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    89     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    87       ));
    90     ));
    88     
    91   
    89     $paths->add_page(Array(
    92   $paths->add_page(Array(
    90       \'name\'=>\'specialpage_member_list\',
    93     'name'=>'specialpage_member_list',
    91       \'urlname\'=>\'Memberlist\',
    94     'urlname'=>'Memberlist',
    92       \'namespace\'=>\'Special\',
    95     'namespace'=>'Special',
    93       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    96     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    94       ));
    97     ));
    95       
    98     
    96     $paths->add_page(Array(
    99   $paths->add_page(Array(
    97       \'name\'=>\'specialpage_language_export\',
   100     'name'=>'specialpage_language_export',
    98       \'urlname\'=>\'LangExportJSON\',
   101     'urlname'=>'LangExportJSON',
    99       \'namespace\'=>\'Special\',
   102     'namespace'=>'Special',
   100       \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
   103     'special'=>0,'visible'=>0,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
   101       ));
   104     ));
   102       
   105     
   103     $paths->add_page(Array(
   106   $paths->add_page(Array(
   104       \'name\'=>\'specialpage_avatar\',
   107     'name'=>'specialpage_avatar',
   105       \'urlname\'=>\'Avatar\',
   108     'urlname'=>'Avatar',
   106       \'namespace\'=>\'Special\',
   109     'namespace'=>'Special',
   107       \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
   110     'special'=>0,'visible'=>0,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
   108       ));
   111     ));
   109       
   112 }
   110     ');
       
   111 
   113 
   112 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
   114 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
   113 
   115 
   114 $__login_status = '';
   116 $__login_status = '';
   115 
   117