[geeklog-cvs] Geeklog-1.x/system lib-custom.php, 1.41, 1.42 lib-custom.php.dist, 1.2, 1.3

Michael Jervis mjervis at qs1489.pair.com
Sun Aug 17 10:16:07 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv3453/system

Modified Files:
	lib-custom.php lib-custom.php.dist 
Log Message:
Auto detect block tempaltes for left and right and fail over to them when rendering blocks for left and right.

Index: lib-custom.php.dist
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-custom.php.dist,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lib-custom.php.dist	25 Nov 2007 06:55:07 -0000	1.2
--- lib-custom.php.dist	17 Aug 2008 14:16:03 -0000	1.3
***************
*** 393,397 ****
          if (DB_numRows($result) == 1) {
              $A = DB_fetchArray($result);
!             $retval .= COM_formatBlock($A,$noboxes);
          }
      }
--- 393,402 ----
          if (DB_numRows($result) == 1) {
              $A = DB_fetchArray($result);
!             if ($A['onleft'] == 1) {
!                 $side = 'left';
!             } else {
!                 $side = 'right';
!             }
!             $retval .= COM_formatBlock($A, $noboxes, $side);
          }
      }

Index: lib-custom.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-custom.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** lib-custom.php	1 Aug 2008 18:49:09 -0000	1.41
--- lib-custom.php	17 Aug 2008 14:16:03 -0000	1.42
***************
*** 392,400 ****
  
      foreach($showblocks as $block) {
!         $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help,allow_autotags FROM {$_TABLES['blocks']} WHERE name='$block'";
          $result = DB_query($sql);
          if (DB_numRows($result) == 1) {
              $A = DB_fetchArray($result);
!             $retval .= COM_formatBlock($A,$noboxes);
          }
      }
--- 392,405 ----
  
      foreach($showblocks as $block) {
!         $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help,allow_autotags,onleft FROM {$_TABLES['blocks']} WHERE name='$block'";
          $result = DB_query($sql);
          if (DB_numRows($result) == 1) {
              $A = DB_fetchArray($result);
!             if ($A['onleft'] == 1) {
!                 $side = 'left';
!             } else {
!                 $side = 'right';
!             }
!             $retval .= COM_formatBlock($A,$noboxes, $side);
          }
      }




More information about the geeklog-cvs mailing list