[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.350,1.351

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Wed Aug 4 14:42:44 EDT 2004


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

Modified Files:
	lib-common.php 
Log Message:
Don't display "Site Events" headline in the Upcoming Events block when personal calendars are off (feature request #151)


Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.350
retrieving revision 1.351
diff -C2 -d -r1.350 -r1.351
*** lib-common.php	2 Aug 2004 06:04:12 -0000	1.350
--- lib-common.php	4 Aug 2004 18:42:41 -0000	1.351
***************
*** 1087,1091 ****
          if( empty( $charset ))
          {
!             $charset = "iso-8859-1";
          }
      }
--- 1087,1091 ----
          if( empty( $charset ))
          {
!             $charset = 'iso-8859-1';
          }
      }
***************
*** 1654,1658 ****
      if( !empty( $logentry ))
      {
!         $timestamp = strftime( "%c" );
  
          switch( $actionid )
--- 1654,1658 ----
      if( !empty( $logentry ))
      {
!         $timestamp = strftime( '%c' );
  
          switch( $actionid )
***************
*** 2781,2785 ****
                  '<input type="hidden" name="mode" value="' . $_REQUEST['mode'] . '">' );
      }
!     else if( $type == "poll" )
      {
          $commentbar->set_var( 'parent_url', 
--- 2781,2785 ----
                  '<input type="hidden" name="mode" value="' . $_REQUEST['mode'] . '">' );
      }
!     else if( $type == 'poll' )
      {
          $commentbar->set_var( 'parent_url', 
***************
*** 3422,3428 ****
  function COM_makesid()
  {
!     $sid = date( "YmdHis" );
!     srand(( double )microtime() * 1000000 );
!     $sid .= rand( 0,999 );
  
      return $sid;
--- 3422,3428 ----
  function COM_makesid()
  {
!     $sid = date( 'YmdHis' );
!     srand(( double ) microtime() * 1000000 );
!     $sid .= rand( 0, 999 );
  
      return $sid;
***************
*** 3588,3592 ****
              if( $topic_anon == 2 )
              {
!                 $daycheck = strftime( "%A", $A['day'] );
                  if( $day != $daycheck )
                  {
--- 3588,3592 ----
              if( $topic_anon == 2 )
              {
!                 $daycheck = strftime( '%A', $A['day'] );
                  if( $day != $daycheck )
                  {
***************
*** 3595,3599 ****
                          $daylist = COM_makeList( $oldnews );
                          $daylist = preg_replace( "/(\015\012)|(\015)|(\012)/",
!                                                  "", $daylist );
                          $string .= $daylist . '<br>';
                      }
--- 3595,3599 ----
                          $daylist = COM_makeList( $oldnews );
                          $daylist = preg_replace( "/(\015\012)|(\015)|(\012)/",
!                                                  '', $daylist );
                          $string .= $daylist . '<br>';
                      }
***************
*** 3615,3619 ****
          {
              $daylist = COM_makeList( $oldnews );
!             $daylist = preg_replace( "/(\015\012)|(\015)|(\012)/", "", $daylist );
              $string .= $daylist;
              $string = addslashes( $string );
--- 3615,3619 ----
          {
              $daylist = COM_makeList( $oldnews );
!             $daylist = preg_replace( "/(\015\012)|(\015)|(\012)/", '', $daylist );
              $string .= $daylist;
              $string = addslashes( $string );
***************
*** 3901,3905 ****
      global $RDFinsideitem, $RDFtag, $RDFtitle, $RDFlink, $RDFheadlines;
  
!     if( $name == "ITEM" )
      {
          $RDFtitle = str_replace( '$', '$', $RDFtitle );
--- 3901,3905 ----
      global $RDFinsideitem, $RDFtag, $RDFtitle, $RDFlink, $RDFheadlines;
  
!     if( $name == 'ITEM' )
      {
          $RDFtitle = str_replace( '$', '$', $RDFtitle );
***************
*** 3979,3983 ****
              {
                  $errmsg = sprintf(
!                     "Parse error in %s: %s at line %d",
                      $rdfurl,
                      xml_error_string( xml_get_error_code( $xml_parser )),
--- 3979,3983 ----
              {
                  $errmsg = sprintf(
!                     'Parse error in %s: %s at line %d',
                      $rdfurl,
                      xml_error_string( xml_get_error_code( $xml_parser )),
***************
*** 4184,4189 ****
          if( $z == 2 )
          {
!             $allEvents = DB_query($personaleventsql);
!             $numRows = DB_numRows($allEvents);
              $totalrows = $totalrows + $numRows;
  
--- 4184,4189 ----
          if( $z == 2 )
          {
!             $allEvents = DB_query( $personaleventsql );
!             $numRows = DB_numRows( $allEvents );
              $totalrows = $totalrows + $numRows;
  
***************
*** 4198,4201 ****
--- 4198,4205 ----
              $headline = false;
          }
+         if( $_CONF['personalcalendars'] == 0 )
+         {
+             $headline = true; // no headline needed
+         }
  
          while( $theRow <= $numRows AND $numDays < $range )
***************
*** 4231,4235 ****
                  $startDate = $theEvent['datestart'];
                  $theTime1 = strtotime( $startDate );
!                 $dayName1 = strftime( "%A", $theTime1 );
                  $abbrDate1 = strftime( $dateonly, $theTime1 );
  
--- 4235,4239 ----
                  $startDate = $theEvent['datestart'];
                  $theTime1 = strtotime( $startDate );
!                 $dayName1 = strftime( '%A', $theTime1 );
                  $abbrDate1 = strftime( $dateonly, $theTime1 );
  
***************
*** 4237,4241 ****
                  $endDate = $theEvent['dateend'];
                  $theTime2 = strtotime( $endDate );
!                 $dayName2 = strftime( "%A", $theTime2 );
                  $abbrDate2 = strftime( $dateonly, $theTime2 );
  
--- 4241,4245 ----
                  $endDate = $theEvent['dateend'];
                  $theTime2 = strtotime( $endDate );
!                 $dayName2 = strftime( '%A', $theTime2 );
                  $abbrDate2 = strftime( $dateonly, $theTime2 );
  
***************
*** 4750,4754 ****
          $timestamp = strftime( $_CONF['daytime'] );
          if ($plugin != '') {
!             $var = 'PLG_'.$plugin.'_MESSAGE'.$msg;
              global $$var;
              $message = $$var;
--- 4754,4758 ----
          $timestamp = strftime( $_CONF['daytime'] );
          if ($plugin != '') {
!             $var = 'PLG_' . $plugin . '_MESSAGE' . $msg;
              global $$var;
              $message = $$var;
***************
*** 4760,4764 ****
              . '<table><tr><td><img src="' . $_CONF['layout_url']
              . '/images/sysmessage.gif" border="0" align="top" alt=""></td>'
!             . '<td style="padding:5px;">'. $message . '</td></tr></table>'
              . COM_endBlock( COM_getBlockTemplate( '_msg_block', 'footer' ));
      }
--- 4764,4768 ----
              . '<table><tr><td><img src="' . $_CONF['layout_url']
              . '/images/sysmessage.gif" border="0" align="top" alt=""></td>'
!             . '<td style="padding:5px;">' . $message . '</td></tr></table>'
              . COM_endBlock( COM_getBlockTemplate( '_msg_block', 'footer' ));
      }
***************
*** 5501,5505 ****
             ( $_CONF['searchloginrequired'] == 0 ))) {
          // add a link to "search by author"
!         if( $_CONF["contributedbyline"] == 1 )
          {
              $author = DB_getItem( $_TABLES['users'], 'username', "uid = $uid" );
--- 5505,5509 ----
             ( $_CONF['searchloginrequired'] == 0 ))) {
          // add a link to "search by author"
!         if( $_CONF['contributedbyline'] == 1 )
          {
              $author = DB_getItem( $_TABLES['users'], 'username', "uid = $uid" );
***************
*** 5717,5721 ****
  /**
  * Detect links in a plain-ascii texts and turn them into clickable links.
! * Will detect links starting with "http:", "https:", "ftp:", and "www".
  *
  * Derived from a newgroup posting by Andreas Schwarz in
--- 5721,5725 ----
  /**
  * Detect links in a plain-ascii texts and turn them into clickable links.
! * Will detect links starting with "http:", "https:", "ftp:", and "www.".
  *
  * Derived from a newgroup posting by Andreas Schwarz in
***************
*** 5957,5961 ****
  
  // Now include all plugin functions
! foreach ($_PLUGINS as $pi_name) {
      require_once( $_CONF['path'] . 'plugins/' . $pi_name . '/functions.inc' );
  }
--- 5961,5966 ----
  
  // Now include all plugin functions
! foreach( $_PLUGINS as $pi_name )
! {
      require_once( $_CONF['path'] . 'plugins/' . $pi_name . '/functions.inc' );
  }




More information about the geeklog-cvs mailing list