[geeklog-cvs] geeklog-1.3/system lib-custom.php,1.10,1.11

blaine at iowaoutdoors.org blaine at iowaoutdoors.org
Wed Nov 3 09:54:46 EST 2004


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

Modified Files:
	lib-custom.php 
Log Message:
Added a few more comments on how to use for the function custom_showBlocks

Index: lib-custom.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-custom.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** lib-custom.php	9 Oct 2004 20:42:26 -0000	1.10
--- lib-custom.php	3 Nov 2004 14:54:43 -0000	1.11
***************
*** 270,276 ****
  
  /**
! * Custom function to retrieve and return a formatted block that is enabled.
! * @param   array      $showblocks         An array of block names to retrieve and format
! * @return   string  Formated HTML containing site footer and optionally right blocks
  */
  function custom_showBlocks($showblocks) {
--- 270,287 ----
  
  /**
! * Custom function to retrieve and return a formatted list of blocks
! * Can be used when calling COM_siteHeader or COM_SiteFooter
! 
! * Example: 
! * 1: Setup an array of blocks to display
! * 2: Call COM_siteHeader or COM_siteFooter
! *
! *  $myblocks = array ('site_menu','site_news','poll_block');
! 
! * COM_siteHeader( array('COM_showCustomBlocks',$myblocks) ) ;
! * COM_siteFooter( true, array('COM_showCustomBlocks',$myblocks));
! 
! * @param   array   $showblocks    An array of block names to retrieve and format
! * @return  string                 Formated HTML containing site footer and optionally right blocks
  */
  function custom_showBlocks($showblocks) {
***************
*** 278,282 ****
      $retval = '';
      foreach($showblocks as $block) {
!         $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help FROM {$_TABLES['blocks']} WHERE name='$block' and is_enabled = '1'";
          $result = DB_query($sql);
          if (DB_numRows($result) == 1) {
--- 289,293 ----
      $retval = '';
      foreach($showblocks as $block) {
!         $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help FROM {$_TABLES['blocks']} WHERE name='$block'";
          $result = DB_query($sql);
          if (DB_numRows($result) == 1) {




More information about the geeklog-cvs mailing list