[geeklog-cvs] geeklog-1.3/public_html calendar.php,1.41,1.42 calendar_event.php,1.31,1.32 comment.php,1.70,1.71 lib-common.php,1.352,1.353 links.php,1.33,1.34 pollbooth.php,1.24,1.25 profiles.php,1.33,1.34 search.php,1.53,1.54 stats.php,1.27,1.28 submit.php,1.69,1.70 users.php,1.81,1.82 usersettings.php,1.98,1.99

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Fri Aug 6 04:55:39 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv11011

Modified Files:
	calendar.php calendar_event.php comment.php lib-common.php 
	links.php pollbooth.php profiles.php search.php stats.php 
	submit.php users.php usersettings.php 
Log Message:
Introduced pagetitle as a second parameter for COM_siteHeader()


Index: submit.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/submit.php,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** submit.php	5 Aug 2004 12:54:46 -0000	1.69
--- submit.php	6 Aug 2004 08:55:36 -0000	1.70
***************
*** 770,783 ****
      switch ($type) {
          case 'event':
!             $_CONF['pagetitle'] = $LANG12[4];
              break;
          case 'link':
!             $_CONF['pagetitle'] = $LANG12[5];
              break;
          default:
!             $_CONF['pagetitle'] = $LANG12[6];
              break;
      }
!     $display .= COM_siteHeader();
      $display .= submissionform($type, $mode, $month, $day, $year, $hour, $topic); 
  }
--- 770,783 ----
      switch ($type) {
          case 'event':
!             $pagetitle = $LANG12[4];
              break;
          case 'link':
!             $pagetitle = $LANG12[5];
              break;
          default:
!             $pagetitle = $LANG12[6];
              break;
      }
!     $display .= COM_siteHeader ('menu', $pagetitle);
      $display .= submissionform($type, $mode, $month, $day, $year, $hour, $topic); 
  }

Index: search.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/search.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** search.php	5 Aug 2004 12:54:46 -0000	1.53
--- search.php	6 Aug 2004 08:55:36 -0000	1.54
***************
*** 40,49 ****
  
  if ($HTTP_GET_VARS['mode'] == 'search') {    
!     $_CONF['pagetitle'] = $LANG09[11];
!     $display = COM_siteHeader();
      $display .= $searchObj->doSearch();
  } else {
!     $_CONF['pagetitle'] = $LANG09[1];
!     $display = COM_siteHeader();
      $display .= $searchObj->showForm();
  }
--- 40,47 ----
  
  if ($HTTP_GET_VARS['mode'] == 'search') {    
!     $display = COM_siteHeader('menu', $LANG09[11]);
      $display .= $searchObj->doSearch();
  } else {
!     $display = COM_siteHeader ('menu', $LANG09[1]);
      $display .= $searchObj->showForm();
  }

Index: calendar_event.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/calendar_event.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** calendar_event.php	5 Aug 2004 12:54:46 -0000	1.31
--- calendar_event.php	6 Aug 2004 08:55:35 -0000	1.32
***************
*** 426,431 ****
      if (!empty ($eid)) {
          if ($mode == 'personal' AND DB_count($_TABLES['events'],'eid',$eid) == 0) {
!             $_CONF['pagetitle'] = $LANG30[38];
!             $display .= COM_siteHeader('menu');
              $display .= COM_startBlock($LANG30[38]);
              $datesql = "SELECT * FROM {$_TABLES['personal_events']} WHERE eid = '$eid'";
--- 426,430 ----
      if (!empty ($eid)) {
          if ($mode == 'personal' AND DB_count($_TABLES['events'],'eid',$eid) == 0) {
!             $display .= COM_siteHeader('menu', $LANG30[38]);
              $display .= COM_startBlock($LANG30[38]);
              $datesql = "SELECT * FROM {$_TABLES['personal_events']} WHERE eid = '$eid'";
***************
*** 438,447 ****
          } else {
              if (strpos ($LANG30[9], '%') === false) {
!                 $_CONF['pagetitle'] = $LANG30[9];
              } else {
!                 $_CONF['pagetitle'] = sprintf ($LANG30[9], $_CONF['site_name']);
              }
!             $display .= COM_siteHeader ('menu');
!             $display .= COM_startBlock ($_CONF['pagetitle']);
  
              $datesql = "SELECT *,datestart AS start,dateend AS end FROM {$_TABLES['events']} WHERE eid = '$eid'";
--- 437,446 ----
          } else {
              if (strpos ($LANG30[9], '%') === false) {
!                 $pagetitle = $LANG30[9];
              } else {
!                 $pagetitle = sprintf ($LANG30[9], $_CONF['site_name']);
              }
!             $display .= COM_siteHeader ('menu', $pagetitle);
!             $display .= COM_startBlock ($pagetitle);
  
              $datesql = "SELECT *,datestart AS start,dateend AS end FROM {$_TABLES['events']} WHERE eid = '$eid'";
***************
*** 457,464 ****
          }
  
!         $_CONF['pagetitle'] = $LANG30[10] . ' ' . strftime ($_CONF['shortdate'],
!                               mktime (0, 0, 0, $month, $day, $year));
!         $display .= COM_siteHeader ('menu');
!         $display .= COM_startBlock ($_CONF['pagetitle']);
  
          $thedate = sprintf ('%4d-%02d-%02d', $year, $month, $day);
--- 456,463 ----
          }
  
!         $pagetitle = $LANG30[10] . ' ' . strftime ($_CONF['shortdate'],
!                                          mktime (0, 0, 0, $month, $day, $year));
!         $display .= COM_siteHeader ('menu', $pagetitle);
!         $display .= COM_startBlock ($pagetitle);
  
          $thedate = sprintf ('%4d-%02d-%02d', $year, $month, $day);

Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** users.php	5 Aug 2004 12:54:46 -0000	1.81
--- users.php	6 Aug 2004 08:55:36 -0000	1.82
***************
*** 98,103 ****
      $A = DB_fetchArray($result);
  
!     $_CONF['pagetitle'] = $LANG04[1] . ' ' . $A['username'];
!     $retval .= COM_siteHeader ('menu');
      if ($msg > 0) {
          $retval .= COM_showMessage ($msg);
--- 98,102 ----
      $A = DB_fetchArray($result);
  
!     $retval .= COM_siteHeader ('menu', $LANG04[1] . ' ' . $A['username']);
      if ($msg > 0) {
          $retval .= COM_showMessage ($msg);

Index: links.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/links.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** links.php	5 Aug 2004 12:54:46 -0000	1.33
--- links.php	6 Aug 2004 08:55:36 -0000	1.34
***************
*** 35,44 ****
  // $Id$
  
! require_once('lib-common.php');
  
  // MAIN
  
! $_CONF['pagetitle'] = $LANG06[1];
! $display = COM_siteHeader();
  
  if (empty ($_USER['username']) &&
--- 35,43 ----
  // $Id$
  
! require_once ('lib-common.php');
  
  // MAIN
  
! $display = COM_siteHeader ('menu', $LANG06[1]);
  
  if (empty ($_USER['username']) &&

Index: profiles.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/profiles.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** profiles.php	5 Aug 2004 12:54:46 -0000	1.33
--- profiles.php	6 Aug 2004 08:55:36 -0000	1.34
***************
*** 102,117 ****
              $retval .= COM_refresh($_CONF['site_url'] . '/index.php?msg=27');
  		} else {
!             $_CONF['pagetitle'] = $LANG04[81];
! 			$retval .= COM_siteHeader('menu')
! 				.COM_errorLog($LANG08[3],2)
! 				.contactform($uid,$subject,$message)
! 				.COM_siteFooter();
  		}
  	} else {
!         $_CONF['pagetitle'] = $LANG04[81];
! 		$retval .= COM_siteHeader('menu')
! 			.COM_errorLog($LANG08[4],2)
! 			.contactform($uid,$subject,$message)
! 			.COM_siteFooter();
  	}
  
--- 102,115 ----
              $retval .= COM_refresh($_CONF['site_url'] . '/index.php?msg=27');
  		} else {
!             $retval .= COM_siteHeader ('menu', $LANG04[81])
!                     . COM_errorLog ($LANG08[3], 2)
!                     . contactform ($uid, $subject, $message)
!                     . COM_siteFooter ();
  		}
  	} else {
!         $retval .= COM_siteHeader ('menu', $LANG04[81])
!                 . COM_errorLog ($LANG08[4], 2)
!                 . contactform ($uid, $subject, $message)
!                 . COM_siteFooter ();
  	}
  
***************
*** 358,363 ****
                                      . '/article.php?story=' . $sid);
          } else {
!             $_CONF['pagetitle'] = $LANG08[17];
!             $display .= COM_siteHeader() . mailstoryform($sid) . COM_siteFooter();
          }
          break;
--- 356,362 ----
                                      . '/article.php?story=' . $sid);
          } else {
!             $display .= COM_siteHeader ('menu', $LANG08[17])
!                      . mailstoryform ($sid)
!                      . COM_siteFooter ();
          }
          break;
***************
*** 377,382 ****
          $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
          if ($uid > 1) {
!             $_CONF['pagetitle'] = $LANG04[81];
!             $display .= COM_siteHeader ()
                       . contactform ($uid)
                       . COM_siteFooter ();
--- 376,380 ----
          $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
          if ($uid > 1) {
!             $display .= COM_siteHeader ('menu', $LANG04[81])
                       . contactform ($uid)
                       . COM_siteFooter ();

Index: pollbooth.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/pollbooth.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** pollbooth.php	5 Aug 2004 12:54:46 -0000	1.24
--- pollbooth.php	6 Aug 2004 08:55:36 -0000	1.25
***************
*** 170,175 ****
  
  if (empty($qid)) {
!     $_CONF['pagetitle'] = $LANG07[4];
!     $display .= COM_siteHeader() . polllist();
  } else if ($aid == 0) {
      $display .= COM_siteHeader();
--- 170,174 ----
  
  if (empty($qid)) {
!     $display .= COM_siteHeader ('menu', $LANG07[4]) . polllist ();
  } else if ($aid == 0) {
      $display .= COM_siteHeader();

Index: usersettings.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/usersettings.php,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** usersettings.php	1 Aug 2004 18:59:04 -0000	1.98
--- usersettings.php	6 Aug 2004 08:55:36 -0000	1.99
***************
*** 447,463 ****
  
          $themeFiles = COM_getThemes ();
!         // first, some theme name beautifying ...
!         $themes = array ();
!         foreach ($themeFiles as $themeFile) {
!             $themeName = str_replace ('_', ' ', $themeFile);
!             $themes[$themeFile] = ucwords ($themeName);
!         }
!         asort ($themes);
!         foreach ($themes as $themeFile => $themeName) {
!             $selection .= '<option value="' . $themeFile . '"';
!             if ($usertheme == $themeFile) {
                  $selection .= ' selected="selected"';
              }
!             $selection .= '>' . $themeName . '</option>' . LB;
          }
          $selection .= '</select>';
--- 447,469 ----
  
          $themeFiles = COM_getThemes ();
!         usort ($themeFiles,
!                create_function ('$a,$b', 'return strcasecmp($a,$b);'));
! 
!         foreach ($themeFiles as $theme) {
!             $selection .= '<option value="' . $theme . '"';
!             if ($usertheme == $theme) {
                  $selection .= ' selected="selected"';
+             } 
+             $words = explode ('_', $theme);
+             $bwords = array ();
+             foreach ($words as $th) {
+                 if ((strtolower ($th{0}) == $th{0}) &&
+                     (strtolower ($th{1}) == $th{1})) {
+                     $bwords[] = strtoupper ($th{0}) . substr ($th, 1);
+                 } else {
+                     $bwords[] = $th;
+                 }
              }
!             $selection .= '>' . implode (' ', $bwords) . '</option>' . LB;
          }
          $selection .= '</select>';
***************
*** 1010,1014 ****
      case 'preferences':
      case 'comments':
!         $display .= COM_siteHeader('menu');
          $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
          if ($msg > 0) {
--- 1016,1020 ----
      case 'preferences':
      case 'comments':
!         $display .= COM_siteHeader ('menu', $LANG01[49]);
          $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
          if ($msg > 0) {
***************
*** 1019,1023 ****
          break;
      case 'edit':
!         $display .= COM_siteHeader('menu');
          $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
          if ($msg > 0) {
--- 1025,1029 ----
          break;
      case 'edit':
!         $display .= COM_siteHeader ('menu', $LANG04[16]);
          $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
          if ($msg > 0) {

Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** comment.php	5 Aug 2004 12:54:46 -0000	1.70
--- comment.php	6 Aug 2004 08:55:35 -0000	1.71
***************
*** 811,816 ****
          }
          if (!empty ($type)) {
!             $_CONF['pagetitle'] = $LANG03[1];
!             $display .= COM_siteHeader()
                  . commentform ($_USER['uid'], $title, '', $sid, $pid, $type,
                                 $mode, $postmode)
--- 811,815 ----
          }
          if (!empty ($type)) {
!             $display .= COM_siteHeader('menu', $LANG03[1])
                  . commentform ($_USER['uid'], $title, '', $sid, $pid, $type,
                                 $mode, $postmode)

Index: calendar.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/calendar.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** calendar.php	5 Aug 2004 12:54:46 -0000	1.41
--- calendar.php	6 Aug 2004 08:55:35 -0000	1.42
***************
*** 334,342 ****
  
  if ($mode == 'personal') {
!     $_CONF['pagetitle'] = $LANG12[40];
  } else {
!     $_CONF['pagetitle'] = $LANG12[39];
  }
- $display .= COM_siteHeader ('menu');
  
  // Set mode back to master if user refreshes screen after their session expires
--- 334,341 ----
  
  if ($mode == 'personal') {
!     $display .= COM_siteHeader ('menu', $LANG12[40]);
  } else {
!     $display .= COM_siteHeader ('menu', $LANG12[39]);
  }
  
  // Set mode back to master if user refreshes screen after their session expires

Index: stats.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/stats.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** stats.php	5 Aug 2004 12:54:46 -0000	1.27
--- stats.php	6 Aug 2004 08:55:36 -0000	1.28
***************
*** 57,63 ****
  // MAIN
  
! $_CONF['pagetitle'] = $LANG10[1];
! $display .= COM_siteHeader() . COM_startBlock($LANG10[1]);
! 
  
  $stat_templates = new Template($_CONF['path_layout'] . 'stats');
--- 57,61 ----
  // MAIN
  
! $display .= COM_siteHeader ('menu', $LANG10[1]) . COM_startBlock ($LANG10[1]);
  
  $stat_templates = new Template($_CONF['path_layout'] . 'stats');

Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.352
retrieving revision 1.353
diff -C2 -d -r1.352 -r1.353
*** lib-common.php	5 Aug 2004 12:54:46 -0000	1.352
--- lib-common.php	6 Aug 2004 08:55:35 -0000	1.353
***************
*** 1008,1021 ****
  * <tr><td colspan="3">Footer</td></table>
  *
! * @param        string      $what       If 'none' then no left blocks are returned, if 'menu' (default) then right blocks are returned
  * @see function COM_siteFooter
- * @return   string  This returns formated HTML containing the site header
  *
  */
  
! function COM_siteHeader( $what = 'menu' )
  {
!     global $_CONF, $_USER, $LANG01, $_COM_VERBOSE, $topic, $LANG_BUTTONS, $LANG_CHARSET;
!     global $_TABLES, $HTTP_POST_VARS, $HTTP_GET_VARS;
  
      // If the theme implemented this for us then call their version instead.
--- 1008,1022 ----
  * <tr><td colspan="3">Footer</td></table>
  *
! * @param    string  $what       If 'none' then no left blocks are returned, if 'menu' (default) then right blocks are returned
! * @param    string  $pagetitle  optional content for the page's <title>
! * @return   string              Formated HTML containing the site header
  * @see function COM_siteFooter
  *
  */
  
! function COM_siteHeader( $what = 'menu', $pagetitle = '' )
  {
!     global $_CONF, $_TABLES, $_USER, $LANG01, $LANG_BUTTONS, $LANG_CHARSET,
!            $topic, $_COM_VERBOSE, $HTTP_POST_VARS, $HTTP_GET_VARS;
  
      // If the theme implemented this for us then call their version instead.
***************
*** 1065,1070 ****
      }
  
!     $pagetitle = '';
!     if( isset( $_CONF['pagetitle'] ))
      {
          $pagetitle = $_CONF['pagetitle'];
--- 1066,1070 ----
      }
  
!     if( empty( $pagetitle ) && isset( $_CONF['pagetitle'] ))
      {
          $pagetitle = $_CONF['pagetitle'];




More information about the geeklog-cvs mailing list