[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.370,1.371

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sat Sep 4 15:45:26 EDT 2004


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

Modified Files:
	lib-common.php 
Log Message:
Introduced "personal-event-today" and "site-event-today" class names that can be used to highlight events for the current day in the Upcoming Events block.


Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.370
retrieving revision 1.371
diff -C2 -d -r1.370 -r1.371
*** lib-common.php	29 Aug 2004 03:44:03 -0000	1.370
--- lib-common.php	4 Sep 2004 19:45:24 -0000	1.371
***************
*** 913,925 ****
      }
  
!     /* Check if an array has been passed that includes the name of a plugin function or custom function
!     *  This can be used to take control over what blocks are then displayed
!     */
!      if (is_array($what))
      {
          $function = $what['0'];
!         if (function_exists($function)) {
!             $lblocks = $function($what['1'],'left');
!             if ($lblocks != '') {
                  $header->set_var( 'geeklog_blocks', $lblocks);
                  $header->parse( 'left_blocks', 'leftblocks', true );
--- 913,928 ----
      }
  
!     /* Check if an array has been passed that includes the name of a plugin
!      * function or custom function
!      * This can be used to take control over what blocks are then displayed
!      */
!     if( is_array( $what ))
      {
          $function = $what['0'];
!         if( function_exists( $function ))
!         {
!             $lblocks = $function( $what['1'], 'left' );
!             if( $lblocks != '' )
!             {
                  $header->set_var( 'geeklog_blocks', $lblocks);
                  $header->parse( 'left_blocks', 'leftblocks', true );
***************
*** 972,976 ****
  *
  */
! function COM_siteFooter( $rightblock = false, $custom='')
  {
      global $_CONF, $LANG01, $_PAGE_TIMER, $_TABLES, $topic;
--- 975,979 ----
  *
  */
! function COM_siteFooter( $rightblock = false, $custom = '' )
  {
      global $_CONF, $LANG01, $_PAGE_TIMER, $_TABLES, $topic;
***************
*** 1028,1039 ****
      $footer->set_var( 'execution_textandtime', $exectext );
  
!     /* Check if an array has been passed that includes the name of a plugin function or custom function
!     *  This can be used to take control over what blocks are then displayed
!     */
!     if (is_array($custom)) 
      {
          $function = $custom['0'];
!         if (function_exists($function)) {
!             $rblocks = $function($custom['1'],'right');
          }
      } 
--- 1031,1044 ----
      $footer->set_var( 'execution_textandtime', $exectext );
  
!     /* Check if an array has been passed that includes the name of a plugin
!      * function or custom function
!      * This can be used to take control over what blocks are then displayed
!      */
!     if( is_array( $custom )) 
      {
          $function = $custom['0'];
!         if( function_exists( $function ))
!         {
!             $rblocks = $function( $custom['1'], 'right' );
          }
      } 
***************
*** 4084,4087 ****
--- 4089,4106 ----
                  $abbrDate2 = strftime( $dateonly, $theTime2 );
  
+                 $todaysEvent = false;
+                 if( date( 'Ymd', $theTime1 ) == date( 'Ymd', time()))
+                 {
+                     $todaysEvent = true;
+                     if( $z == 2 )
+                     {
+                         $todaysClassName = 'personal-event-today';
+                     }
+                     else
+                     {
+                         $todaysClassName = 'site-event-today';
+                     }
+                 }
+ 
                  // If either of the dates [start/end] change, then display a new header.
                  if( $oldDate1 != $abbrDate1 OR $oldDate2 != $abbrDate2 )
***************
*** 4106,4109 ****
--- 4125,4133 ----
                              $retval .= '<br>';
                          }
+                         if( $todaysEvent )
+                         {
+                             $retval .= '<span class="' . $todaysClassName
+                                     . '">';
+                         }
                          $retval .= '<b>' . $dayName1 . '</b> <small>'
                                  . $abbrDate1 . '</small>';
***************
*** 4114,4117 ****
--- 4138,4145 ----
                              $retval .= ' - <br><b>' . $dayName2 . '</b> <small>' . $abbrDate2 . '</small>';
                          }
+                         if( $todaysEvent )
+                         {
+                             $retval .= '</span>';
+                         }
                      }
  
***************
*** 4123,4127 ****
                  {
                      // Display the url now!
!                     $newevent = '<a href="' . $_CONF['site_url'] . '/calendar_event.php?';
  
                      if( $z == 2 )
--- 4151,4156 ----
                  {
                      // Display the url now!
!                     $newevent = '<a href="' . $_CONF['site_url']
!                               . '/calendar_event.php?';
  
                      if( $z == 2 )
***************
*** 4130,4134 ****
                      }
  
!                     $newevent .= 'eid=' . $theEvent['eid'] . '">' . stripslashes( $theEvent['title'] ) . '</a>';
                      $newevents[] = $newevent;
                  }
--- 4159,4169 ----
                      }
  
!                     $newevent .= 'eid=' . $theEvent['eid'] . '"';
!                     if( $todaysEvent )
!                     {
!                         $newevent .= ' class="' . $todaysClassName . '"';
!                     }
!                     $newevent .= '>' . stripslashes( $theEvent['title'] )
!                               . '</a>';
                      $newevents[] = $newevent;
                  }




More information about the geeklog-cvs mailing list