[geeklog-cvs] geeklog-1.3/system lib-story.php,1.13,1.14

blaine at iowaoutdoors.org blaine at iowaoutdoors.org
Wed Dec 22 11:10:32 EST 2004


Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv23745/system

Modified Files:
	lib-story.php 
Log Message:
Added new function COM_convertDate2Timestamp to convert a MySQL date-time string format YYYY-MM-DD HH:MM:SS to a UNIX Timestamp

Correction so that archive template is not used unless date is > archivedate timestamp.

Index: lib-story.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-story.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** lib-story.php	18 Dec 2004 14:15:36 -0000	1.13
--- lib-story.php	22 Dec 2004 16:10:30 -0000	1.14
***************
*** 330,333 ****
--- 330,335 ----
      }
  
+     $t = explode(' ',$A['expire']);     // Need to convert text date/time to a timestamp
+     $archiveDateTime = COM_convertDate2Timestamp($t[0],$t[1]);
      if( $A['featured'] == 1 )
      {
***************
*** 336,340 ****
          $article->parse( 'finalstory', 'featuredarticle' );
      }
!     elseif ($A['statuscode'] == 10)
      {
          $article->parse( 'story_bodyhtml', 'archivestorybodytext', true );
--- 338,342 ----
          $article->parse( 'finalstory', 'featuredarticle' );
      }
!     elseif ($A['statuscode'] == 10 AND $archiveDateTime <= time() )
      {
          $article->parse( 'story_bodyhtml', 'archivestorybodytext', true );




More information about the geeklog-cvs mailing list