[geeklog-cvs] geeklog-1.3/public_html usersettings.php,1.73,1.74

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Sun Sep 7 19:51:37 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv25336/public_html

Modified Files:
	usersettings.php 
Log Message:
User Preferences Block to select authors to exclude now uses a multi-select list box instead of a sequential list of checkboxes. This is best for large user sites so that you don't have 100's of checkboxes.

Index: usersettings.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** usersettings.php	7 Sep 2003 17:41:39 -0000	1.73
--- usersettings.php	7 Sep 2003 23:51:35 -0000	1.74
***************
*** 515,520 ****
          $where .= "uid = '1'";
          $preferences->set_var ('lang_authors', $LANG04[56]);
!         $preferences->set_var ('exclude_author_checklist',
!             COM_checkList($_TABLES['users'],'uid,username',$where,$A['aids']));
      } else {
          $preferences->set_var ('lang_authors', '');
--- 515,538 ----
          $where .= "uid = '1'";
          $preferences->set_var ('lang_authors', $LANG04[56]);
! 
!         $query = DB_query( "SELECT uid,username FROM {$_TABLES['users']} ORDER BY username" );
!         $nrows = DB_numRows($query );
!         $authors = explode(" ",$A['aids']);
! 
!         for( $i = 0; $i < $nrows; $i++ ) {
!             $B = DB_fetchArray($query);
!             $selauthors .= '<option value="' . $B['uid'] . '"';
!             if(in_array(sprintf("%d", $B['uid']), $authors)) {
!                $selauthors .= ' selected';
!             }
!             $selauthors .= '>' . $B['username'] . '</option>' . LB;
!         }
! 
!         if (DB_count($_TABLES['topics']) > 10) {
!             $Selboxsize = intval(DB_count($_TABLES['topics']) * 1.5);
!         } else {
!             $Selboxsize = 15;
!         }
!         $preferences->set_var ('exclude_author_checklist', '<select name="selauthors[]" multiple size='. $Selboxsize. '>' . $selauthors . '</select>');
      } else {
          $preferences->set_var ('lang_authors', '');
***************
*** 832,836 ****
  
      $TIDS = @array_values($A[$_TABLES['topics']]);
!     $AIDS = @array_values($A[$_TABLES['users']]);
      $BOXES = @array_values($A["{$_TABLES['blocks']}"]);
      $ETIDS = @array_values($A['etids']);
--- 850,854 ----
  
      $TIDS = @array_values($A[$_TABLES['topics']]);
!     $AIDS = @array_values($A['selauthors']);
      $BOXES = @array_values($A["{$_TABLES['blocks']}"]);
      $ETIDS = @array_values($A['etids']);





More information about the geeklog-cvs mailing list