Merging from accidental branch split
authorDan
Sun, 10 May 2009 14:44:50 -0400
changeset 961 e5abd87bccef
parent 960 e74741b8360b (diff)
parent 956 25b1bdce985b (current diff)
child 962 ceeecb160aec
Merging from accidental branch split
--- a/includes/paths.php	Tue May 05 22:06:23 2009 -0400
+++ b/includes/paths.php	Sun May 10 14:44:50 2009 -0400
@@ -1115,4 +1115,28 @@
   
 }
 
+/**
+ * Register a special page.
+ * @param string urlname of the page ("Administration" in "Special:Administration")
+ * @param string Page title; if in the right format, will be treated as a l10n string identifier
+ * @param bool If true, page is visible (shown in lists/search). Otherwise, hidden. Defaults to true.
+ */
+
+function register_special_page($urlname, $name, $visible = true)
+{
+  global $paths;
+  
+  return $paths->add_page(Array(
+      'name' => $name,
+      'urlname' => $urlname,
+      'namespace' => 'Special',
+      'special' => 0,
+      'visible' => $visible ? 1 : 0,
+      'comments_on' => 0,
+      'protected' => 1,
+      'delvotes' => 0,
+      'delvote_ips' => '',
+    ));
+}
+
 ?>
--- a/includes/template.php	Tue May 05 22:06:23 2009 -0400
+++ b/includes/template.php	Sun May 10 14:44:50 2009 -0400
@@ -336,15 +336,17 @@
   function get_css($s = false)
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
-    if(!defined('ENANO_TEMPLATE_LOADED'))
-      $this->load_theme($session->theme, $session->style);
+    $this->init_vars();
+    
     $path = ( $s ) ? 'css/'.$s : 'css/'.$this->style.'.css';
+    
     if ( !file_exists(ENANO_ROOT . '/themes/' . $this->theme . '/' . $path) )
     {
       echo "/* WARNING: Falling back to default file because file $path does not exist */\n";
       $path = 'css/' . $this->style_list[0] . '.css';
     }
-    return '<enano:no-opt>' . $this->process_template($path) . '</enano:no-opt>';
+    
+    return $this->process_template($path);
   }
   function load_theme($name = false, $css = false)
   {
@@ -639,6 +641,9 @@
         'STYLE_ID' => $this->style
       ));
     
+    // Add the site description sidebar block
+    $this->sidebar_widget($lang->get('sidebar_title_about'), '<p>' . htmlspecialchars(getConfig('site_desc')) . '</p>');
+    
     $this->theme_initted = true;
   }
   
@@ -873,7 +878,7 @@
     // Protect button
     if ( $conds['protect'] )
     {
-      switch($this->page->ns->page_protected)
+      switch($this->page->ns->cdata['protected'])
       {
         case PROTECT_FULL: $protect_status = $lang->get('onpage_btn_protect_on'); break;
         case PROTECT_SEMI: $protect_status = $lang->get('onpage_btn_protect_semi'); break;
@@ -885,7 +890,7 @@
       $t0 = $label->run();
       
       $menubtn->assign_vars(array(
-          'FLAGS' => 'accesskey="p" onclick="ajaxProtect(' . $this->page->ns->page_protected . '); return false;" id="tb_ajax_protect_btn" title="' . $lang->get('onpage_tip_protect') . '"',
+          'FLAGS' => 'accesskey="p" onclick="ajaxProtect(' . $this->page->ns->cdata['protected'] . '); return false;" id="tb_ajax_protect_btn" title="' . $lang->get('onpage_tip_protect') . '"',
           'HREF' => makeUrl($local_page, 'do=protect', true),
           'TEXT' => $lang->get('onpage_btn_protect_change')
         ));
@@ -2863,8 +2868,9 @@
     }
     return $ds;
   }
-  function get_css($s = false) {
-    if($s)
+  function get_css($s = false)
+  {
+    if ( $s )
       return $this->process_template('css/'.$s);
     else
       return $this->process_template('css/'.$this->style.'.css');
--- a/language/english/core.json	Tue May 05 22:06:23 2009 -0400
+++ b/language/english/core.json	Sun May 10 14:44:50 2009 -0400
@@ -536,6 +536,7 @@
       title_tools: 'Tools',
       title_search: 'Search',
       title_links: 'Links',
+      title_about: 'About',
       
       btn_home: 'Home',
       btn_createpage: 'Create a page',
--- a/plugins/PrivateMessages.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/PrivateMessages.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_privatemessages_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -24,17 +24,9 @@
  
 global $db, $session, $paths, $template, $plugins; // Common objects
 
-// $plugins->attachHook('session_started', 'PrivateMessages_paths_init();');
-
 function PrivateMessages_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-      'name'=>'specialpage_private_messages',
-      'urlname'=>'PrivateMessages',
-      'namespace'=>'Special',
-      'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('PrivateMessages', 'specialpage_private_messages');
 }
 
 function page_Special_PrivateMessages()
--- a/plugins/SpecialAdmin.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialAdmin.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialadmin_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -29,19 +29,9 @@
 function SpecialAdmin_paths_init()
 {
   global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_administration',
-    'urlname'=>'Administration',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
   
-  $paths->add_page(Array(
-    'name'=>'specialpage_manage_sidebar',
-    'urlname'=>'EditSidebar',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('Administration', 'specialpage_administration');
+  register_special_page('EditSidebar', 'specialpage_manage_sidebar');
 }
 
 $plugins->attachHook('base_classes_initted', 'SpecialAdmin_include();');
--- a/plugins/SpecialCSS.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialCSS.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialcss_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -24,17 +24,10 @@
  
 global $db, $session, $paths, $template, $plugins; // Common objects
 
-// $plugins->attachHook('session_started', 'SpecialCSS_paths_init();');
-
 function SpecialCSS_paths_init()
 {
   global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_css',
-    'urlname'=>'CSS',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>0,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('CSS', 'specialpage_css', false);
 }
 
 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
--- a/plugins/SpecialGroups.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialGroups.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialgroups_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -26,13 +26,7 @@
 
 function SpecialGroups_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_groupcp',
-    'urlname'=>'Usergroups',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('Usergroups', 'specialpage_groupcp');
 }
 
 function page_Special_Usergroups()
--- a/plugins/SpecialLog.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialLog.php	Sun May 10 14:44:50 2009 -0400
@@ -24,13 +24,7 @@
 
 function SpecialLog_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_log',
-    'urlname'=>'Log',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('Log', 'specialpage_log');
 }
 
 function page_Special_Log()
--- a/plugins/SpecialPageFuncs.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialPageFuncs.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialpagefuncs_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -28,55 +28,13 @@
 
 function SpecialPageFuncs_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_create_page',
-    'urlname'=>'CreatePage',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_all_pages',
-    'urlname'=>'AllPages',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_special_pages',
-    'urlname'=>'SpecialPages',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_about_enano',
-    'urlname'=>'About_Enano',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_gnu_gpl',
-    'urlname'=>'GNU_General_Public_License',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_tag_cloud',
-    'urlname'=>'TagCloud',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_autofill',
-    'urlname'=>'Autofill',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('CreatePage', 'specialpage_create_page');
+  register_special_page('AllPages', 'specialpage_all_pages');
+  register_special_page('SpecialPages', 'specialpage_special_pages');
+  register_special_page('About_Enano', 'specialpage_about_enano');
+  register_special_page('GNU_General_Public_License', 'specialpage_gnu_gpl');
+  register_special_page('TagCloud', 'specialpage_tag_cloud');
+  register_special_page('Autofill', 'specialpage_autofill', false);
 }
 
 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
--- a/plugins/SpecialSearch.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialSearch.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialsearch_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -26,20 +26,8 @@
 
 function SpecialSearch_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_search_rebuild',
-    'urlname'=>'SearchRebuild',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_search',
-    'urlname'=>'Search',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('SearchRebuild', 'specialpage_search_rebuild');
+  register_special_page('Search', 'specialpage_search');
 }
 
 function page_Special_SearchRebuild()
--- a/plugins/SpecialUpdownload.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialUpdownload.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialupdownload_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -29,22 +29,10 @@
 
 function SpecialUpDownload_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_upload_file',
-    'urlname'=>'UploadFile',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('UploadFile', 'specialpage_upload_file');
+  register_special_page('DownloadFile', 'specialpage_download_file');
+}
   
-  $paths->add_page(Array(
-    'name'=>'specialpage_download_file',
-    'urlname'=>'DownloadFile',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-}
-
 function page_Special_UploadFile()
 {
   global $db, $session, $paths, $template, $plugins; // Common objects
--- a/plugins/SpecialUserFuncs.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialUserFuncs.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialuserfuncs_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
@@ -28,87 +28,18 @@
 
 function SpecialUserFuncs_paths_init()
 {
-  global $paths;
-  $paths->add_page(Array(
-    'name'=>'specialpage_log_in',
-    'urlname'=>'Login',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  $paths->add_page(Array(
-    'name'=>'specialpage_log_out',
-    'urlname'=>'Logout',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  $paths->add_page(Array(
-    'name'=>'specialpage_register',
-    'urlname'=>'Register',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  $paths->add_page(Array(
-    'name'=>'specialpage_preferences',
-    'urlname'=>'Preferences',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_contributions',
-    'urlname'=>'Contributions',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_change_theme',
-    'urlname'=>'ChangeStyle',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_activate_account',
-    'urlname'=>'ActivateAccount',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_captcha',
-    'urlname'=>'Captcha',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_password_reset',
-    'urlname'=>'PasswordReset',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-  
-  $paths->add_page(Array(
-    'name'=>'specialpage_member_list',
-    'urlname'=>'Memberlist',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-    
-  $paths->add_page(Array(
-    'name'=>'specialpage_language_export',
-    'urlname'=>'LangExportJSON',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>0,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
-    
-  $paths->add_page(Array(
-    'name'=>'specialpage_avatar',
-    'urlname'=>'Avatar',
-    'namespace'=>'Special',
-    'special'=>0,'visible'=>0,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
-    ));
+  register_special_page('Login', 'specialpage_log_in');
+  register_special_page('Logout', 'specialpage_log_out');
+  register_special_page('Register', 'specialpage_register');
+  register_special_page('Preferences', 'specialpage_preferences');
+  register_special_page('Contributions', 'specialpage_contributions');
+  register_special_page('ChangeStyle', 'specialpage_change_theme');
+  register_special_page('ActivateAccount', 'specialpage_activate_account');
+  register_special_page('Captcha', 'specialpage_captcha');
+  register_special_page('PasswordReset', 'specialpage_password_reset');
+  register_special_page('Memberlist', 'specialpage_member_list');
+  register_special_page('LangExportJSON', 'specialpage_language_export', false);
+  register_special_page('Avatar', 'specialpage_avatar', false);
 }
 
 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
@@ -1641,7 +1572,9 @@
   }
   
   // offset
-  $offset = ( isset($_GET['offset']) && strval(intval($_GET['offset'])) === $_GET['offset']) ? intval($_GET['offset']) : 0;
+  $perpage = 25;
+  $page = (( isset($_GET['offset']) && strval(intval($_GET['offset'])) === $_GET['offset']) ? intval($_GET['offset']) : 1) - 1;
+  $offset = $page * $perpage;
   
   // sort order
   $sortkeys = array(
@@ -1719,11 +1652,11 @@
                </tr>';
                
   // determine number of rows
-  $q = $db->sql_query('SELECT u.user_id FROM '.table_prefix.'users AS u WHERE ' . $username_where . ' AND u.username != \'Anonymous\';');
+  $q = $db->sql_query('SELECT COUNT(u.user_id) FROM '.table_prefix.'users AS u WHERE ' . $username_where . ' AND u.username != \'Anonymous\';');
   if ( !$q )
     $db->_die();
   
-  $num_rows = $db->numrows();
+  list($num_rows) = $db->fetchrow_num();
   $db->free_result();
   
   if ( !empty($finduser_url) )
@@ -1731,7 +1664,7 @@
     switch ( $num_rows )
     {
       case 0:
-        $str = $lang->get('userfuncs_ml_msg_matches_zero'); break;
+        $str = ''; /* $lang->get('userfuncs_ml_msg_matches_zero'); */ break;
       case 1:
         $str = $lang->get('userfuncs_ml_msg_matches_one'); break;
       default:
@@ -1742,14 +1675,15 @@
   
   // main selector
   $pgsql_additional_group_by = ( ENANO_DBLAYER == 'PGSQL' ) ? ', u.username, u.reg_time, u.email, u.user_level, u.user_has_avatar, u.avatar_type, x.email_public' : '';
-  $q = $db->sql_unbuffered_query('SELECT \'\' AS infobit, u.user_id, u.username, u.reg_time, u.email, u.user_level, u.user_has_avatar, u.avatar_type, x.email_public, COUNT(c.comment_id) AS num_comments FROM '.table_prefix.'users AS u
+  $q = $db->sql_query('SELECT \'\' AS infobit, u.user_id, u.username, u.reg_time, u.email, u.user_level, u.user_has_avatar, u.avatar_type, x.email_public, COUNT(c.comment_id) AS num_comments FROM '.table_prefix.'users AS u
                                     LEFT JOIN '.table_prefix.'users_extra AS x
                                       ON ( u.user_id = x.user_id )
                                     LEFT JOIN ' . table_prefix . 'comments AS c
                                       ON ( u.user_id = c.user_id )
                                     WHERE ' . $username_where . ' AND u.username != \'Anonymous\'
                                     GROUP BY u.user_id' . $pgsql_additional_group_by . '
-                                    ORDER BY ' . $sort_sqllet . ' ' . $target_order . ';');
+                                    ORDER BY ' . $sort_sqllet . ' ' . $target_order . '
+                                    LIMIT ' . $perpage . ' OFFSET ' . $offset . ';');
   if ( !$q )
     $db->_die();
   
@@ -1763,56 +1697,61 @@
     'infobit' => array($formatter, 'infobit')
     );
   
-  $html = paginate(
-            $q,                                                                                                       // MySQL result resource
-            '<tr>
-               <td class="{_css_class}">{user_id}</td>
-               <td class="{_css_class}" style="text-align: left;">{username}</td>
-               <td class="{_css_class}">{user_level}</td>
-               <td class="{_css_class}">{email}</small></td>
-               <td class="{_css_class}">{reg_time}</td>
-             </tr>
-             <tr>
-               <td colspan="5" class="row3" style="text-align: left;">
-                 <div id="ml_moreinfo_{user_id}" style="display: none;">
-                   {infobit}
+  $result_url = makeUrlNS('Special', 'Memberlist', ( str_replace('%', '%%', $finduser_url) ) . 'letter=' . $startletter . '&offset=%s&sort=' . $sortby . '&orderby=' . $target_order );
+  $paginator = generate_paginator($page, ceil($num_rows / $perpage), $result_url);
+  
+  if ( $num_rows > 0 )
+  {
+    if ( $num_rows > $perpage )
+      echo $paginator;
+    
+    echo '<div class="tblholder">
+                <table border="0" cellspacing="1" cellpadding="4" style="text-align: center;">
+                  ' . $headings;
+                  
+    $i = 0;
+    while ( $row = $db->fetchrow($q) )
+    {
+      $i++;
+      $cls = ( $i % 2 == 0 ) ? 'row2' : 'row1';
+      echo '<tr>';
+      echo '<td class="' . $cls . '">' . $row['user_id'] . '</td>';
+      echo '<td class="' . $cls . '" style="text-align: left;">' . $formatter->username($row['username'], $row) . '</td>';
+      echo '<td class="' . $cls . '">' . $formatter->user_level($row['user_level'], $row) . '</td>';
+      echo '<td class="' . $cls . '">' . $formatter->email($row['email'], $row) . '</td>';
+      echo '<td class="' . $cls . '">' . $formatter->reg_time($row['reg_time'], $row) . '</td>';
+      echo '</tr>';
+      echo '<tr>';
+      echo '<td colspan="5" class="row3" style="text-align: left;">
+                 <div id="ml_moreinfo_' . $row['user_id'] . '" style="display: none;">
+                   ' . $formatter->infobit(true, $row) . '
                  </div>
-               </td>
-             </tr>
-             ',                                                                                                       // TPL code for rows
-             $num_rows,                                                                                               // Number of results
-             makeUrlNS('Special', 'Memberlist', ( str_replace('%', '%%', $finduser_url) ) . 'letter=' . $startletter . '&offset=%s&sort=' . $sortby . '&orderby=' . $target_order ), // Result URL
-             $offset,                                                                                                 // Start at this number
-             25,                                                                                                      // Results per page
-             $formatters,                                                                                             // Formatting hooks
-             '<div class="tblholder">
-                <table border="0" cellspacing="1" cellpadding="4" style="text-align: center;">
-                  ' . $headings . '
-                 ',                                                                                                   // Header (printed before rows)
-             '  ' . $headings . '
+               </td>';
+      echo '</tr>';
+    }
+    
+    echo '  ' . $headings . '
                  </table>
               </div>
-              ' .
-              '<div style="float: left;">
-                <form action="' . makeUrlNS('Special', 'Memberlist') . '" method="get" onsubmit="if ( !submitAuthorized ) return false;">'
-               . ( urlSeparator == '&' ? '<input type="hidden" name="title" value="' . htmlspecialchars( $paths->page ) . '" />' : '' )
-               . ( $session->sid_super ? '<input type="hidden" name="auth"  value="' . $session->sid_super . '" />' : '')
-               . '<p>' . $lang->get('userfuncs_ml_lbl_finduser') . ' ' . $template->username_field('finduser') . ' <input type="submit" value="' . $lang->get('userfuncs_ml_btn_go') . '" /><br />
-                  <small>' . $lang->get('userfuncs_ml_tip_wildcard') . '</small></p>'
-               . '</form>
-               </div>'                                                                                                // Footer (printed after rows)
-          );
-  
-  if ( $num_rows < 1 )
-  {
-    echo ( isset($_GET['finduser']) ) ? '<p>' . $lang->get('userfuncs_ml_err_nousers_find') . '</p>' :
-                                        '<p>' . $lang->get('userfuncs_ml_err_nousers') . '</p>';
+              ';
+    
+    if ( $num_rows > $perpage )
+      echo $paginator;
   }
   else
   {
-    echo $html;
+    echo '<h2 class="emptymessage">' . $lang->get('log_msg_no_results') . '</h2>';
   }
   
+  echo '<div style="float: left;">
+          <form action="' . makeUrlNS('Special', 'Memberlist') . '" method="get" onsubmit="if ( !submitAuthorized ) return false;">'
+         . ( urlSeparator == '&' ? '<input type="hidden" name="title" value="' . htmlspecialchars( $paths->page ) . '" />' : '' )
+         . ( $session->sid_super ? '<input type="hidden" name="auth"  value="' . $session->sid_super . '" />' : '')
+         . '<p>' . $lang->get('userfuncs_ml_lbl_finduser') . ' ' . $template->username_field('finduser') . ' <input type="submit" value="' . $lang->get('userfuncs_ml_btn_go') . '" /><br />
+            <small>' . $lang->get('userfuncs_ml_tip_wildcard') . '</small></p>'
+         . '</form>
+         </div>';
+  
   $template->footer();
 }
 
--- a/plugins/SpecialUserPrefs.php	Tue May 05 22:06:23 2009 -0400
+++ b/plugins/SpecialUserPrefs.php	Sun May 10 14:44:50 2009 -0400
@@ -5,7 +5,7 @@
   "Plugin URI"   : "http://enanocms.org/",
   "Description"  : "plugin_specialuserprefs_desc",
   "Author"       : "Dan Fuhry",
-  "Version"      : "1.1.5",
+  "Version"      : "1.1.6",
   "Author URI"   : "http://enanocms.org/"
 }
 **!*/
--- a/themes/enanium/css/babygrand.css	Tue May 05 22:06:23 2009 -0400
+++ b/themes/enanium/css/babygrand.css	Sun May 10 14:44:50 2009 -0400
@@ -215,7 +215,7 @@
   background-color: #292929;
 }
 
-div.sidebar.right a.closebtn {
+div.sidebar a.closebtn {
   display: block;
   float: right;
   margin-right: 10px;
@@ -226,11 +226,24 @@
   cursor: pointer;
 }
 
+div.sidebar.left a.closebtn {
+  color: #f0f0f0;
+  background-color: #404040;
+  margin-right: 0px;
+  -moz-border-radius: 0 0 0 4px;
+  line-height: 19px;
+}
+
 div.right-sidebar-hidden {
   margin-left: 10px;
   display: none;
 }
 
+div.left-sidebar-hidden {
+  display: none;
+  position: absolute;
+}
+
 div.right-sidebar-hidden a.openbtn {
   display: block;
   float: right;
@@ -242,6 +255,17 @@
   cursor: pointer;
 }
 
+div.left-sidebar-hidden a.openbtn {
+  display: block;
+  float: left;
+  margin-top: 1.8em;
+  color: #456798;
+  background-color: #f0f0f0;
+  padding: 5px 4px;
+  -moz-border-radius: 0 4px 4px 0;
+  cursor: pointer;
+}
+
 div.slider {
   margin-bottom: 7px;
 }
@@ -394,3 +418,12 @@
 ul.userpage_links li a:visited, ul.userpage_links li a:hover {
   color: #202020 !important;
 }
+
+/*
+ * Some table stuff
+ */
+
+div.tblholder th a {
+  text-decoration: underline;
+  color: #f0f0f0 !important;
+}
--- a/themes/enanium/header.tpl	Tue May 05 22:06:23 2009 -0400
+++ b/themes/enanium/header.tpl	Sun May 10 14:44:50 2009 -0400
@@ -56,9 +56,13 @@
     <table border="0" cellspacing="0" cellpadding="0" id="body-wrapper">
     <tr>
       <td valign="top" id="cell-sbleft">
-        <div class="left sidebar">
+        <div class="left sidebar" id="enanium_sidebar_left">
+          <a class="closebtn" onclick="enanium_toggle_sidebar_left(); return false;">&laquo;</a>
           {SIDEBAR_LEFT}
         </div>
+        <div class="left-sidebar-hidden" id="enanium_sidebar_left_hidden">
+          <a class="openbtn" onclick="enanium_toggle_sidebar_left(); return false;">&raquo;</a>
+        </div>
         <!-- HOOK sidebar_left_post -->
       </td>
       <td valign="top" id="cell-content">
@@ -79,6 +83,7 @@
             {SIDEBAR_LINK}
             {ADMIN_LINK}
             <!-- END auth_admin -->
+            <li><a href="{url:Special:Memberlist|escape}">{lang:specialpage_member_list}</a></li>
           </ul>
           <span class="menuclear"></span>
         </div>
--- a/themes/enanium/js/inlinerename.js	Tue May 05 22:06:23 2009 -0400
+++ b/themes/enanium/js/inlinerename.js	Sun May 10 14:44:50 2009 -0400
@@ -1,24 +1,40 @@
 // Sidebar collapse
-function enanium_toggle_sidebar_right()
+function enanium_toggle_sidebar(side)
 {
-  if ( document.getElementById('enanium_sidebar_right').style.display == 'none' )
+  if ( document.getElementById('enanium_sidebar_' + side).style.display == 'none' )
   {
     // show
-    document.getElementById('enanium_sidebar_right').style.display = 'block';
-    document.getElementById('enanium_sidebar_right_hidden').style.display = 'none';
-    createCookie('right_sidebar', 'open', 365);
+    document.getElementById('enanium_sidebar_' + side).style.display = 'block';
+    document.getElementById('enanium_sidebar_' + side + '_hidden').style.display = 'none';
+    createCookie(side + '_sidebar', 'open', 365);
   }
   else
   {
     // hide
-    document.getElementById('enanium_sidebar_right').style.display = 'none';
-    document.getElementById('enanium_sidebar_right_hidden').style.display = 'block';
-    createCookie('right_sidebar', 'collapsed', 365);
+    document.getElementById('enanium_sidebar_' + side).style.display = 'none';
+    document.getElementById('enanium_sidebar_' + side + '_hidden').style.display = 'block';
+    createCookie(side + '_sidebar', 'collapsed', 365);
   }
 }
 
+function enanium_toggle_sidebar_right()
+{
+  enanium_toggle_sidebar('right');
+}
+
+function enanium_toggle_sidebar_left()
+{
+  enanium_toggle_sidebar('left');
+}
+
 addOnloadHook(function()
   {
+    if ( readCookie('left_sidebar') == 'collapsed' )
+    {
+      document.getElementById('enanium_sidebar_left').style.display = 'none';
+      document.getElementById('enanium_sidebar_left_hidden').style.display = 'block';
+    }
+    
     if ( readCookie('right_sidebar') == 'collapsed' )
     {
       document.getElementById('enanium_sidebar_right').style.display = 'none';