[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.700,1.701

Blaine Lang blaine at qs1489.pair.com
Sat May 31 14:38:50 EDT 2008


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

Modified Files:
	lib-common.php 
Log Message:
Removed blockid feature as it was causing an issue with non-english based like chinese.
Removed hardcoded UL element from code for the COM_admin, COM_user and COM_topic block related functions
Added a new blockheader/footer set of templates for a listblock which is now used for the 3 noted blocks
Changed the CSS define to style the menu links for the 3 noted blocks so that it no longer uses a blockid,

Index: lib-common.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.700
retrieving revision 1.701
diff -C2 -d -r1.700 -r1.701
*** lib-common.php	17 May 2008 17:30:28 -0000	1.700
--- lib-common.php	31 May 2008 18:38:48 -0000	1.701
***************
*** 1488,1511 ****
      $block->set_var( 'block_title', stripslashes( $title ));
  
-     // Set a blockid
-     if (!isset($GLOBALS['siteblocks'])) $GLOBALS['siteblocks'] = array();
-     $blockid = stripslashes ($title);
-     $blockid = COM_sanitizeID($title);
-     // Check if there is already a block of the same name
-     if (in_array($blockid,$GLOBALS['siteblocks'])) {
-         // Now, in the unlikely chance there are multiple matching blocks
-         for ($i=2; $i <= 5; $i++) {   // there can't be more then 5 blocks of the same name
-             $nblockid = "{$blockid}{$i}";
-             if (!in_array($nblockid,$GLOBALS['siteblocks'])) {
-                 $blockid = $nblockid;
-                 $GLOBALS['siteblocks'][] = $blockid;
-                 break;
-             }
-         }
-     } else {
-         $GLOBALS['siteblocks'][] = $blockid;
-     }
-     $block->set_var( 'blockid', $blockid);
- 
      if( !empty( $helpfile ))
      {
--- 1488,1491 ----
***************
*** 2111,2115 ****
                                      'inactive' => 'topicoption_off.thtml' ));
      }
!     $retval = '<ul>';
      $sections->set_var( 'xhtml', XHTML );
      $sections->set_var( 'site_url', $_CONF['site_url'] );
--- 2091,2095 ----
                                      'inactive' => 'topicoption_off.thtml' ));
      }
! 
      $sections->set_var( 'xhtml', XHTML );
      $sections->set_var( 'site_url', $_CONF['site_url'] );
***************
*** 2228,2232 ****
          }
      }
!     $retval .= '</ul>';
      return $retval;
  }
--- 2208,2212 ----
          }
      }
! 
      return $retval;
  }
***************
*** 2280,2284 ****
          $retval .= COM_startBlock( $title, $help,
                             COM_getBlockTemplate( 'user_block', 'header' ));
-         $retval .= '<ul>';
  
          // This function will show the user options for all installed plugins
--- 2260,2263 ----
***************
*** 2332,2336 ****
          $usermenu->set_var( 'option_url', $url );
          $retval .= $usermenu->parse( 'item', 'option' );
-         $retval .= '</ul>';
          $retval .=  COM_endBlock( COM_getBlockTemplate( 'user_block', 'footer' ));
      }
--- 2311,2314 ----
***************
*** 2471,2475 ****
          $retval .= COM_startBlock( $title, $help,
                             COM_getBlockTemplate( 'admin_block', 'header' ));
-         $retval .= "<ul>";
  
          $topicsql = '';
--- 2449,2452 ----
***************
*** 2784,2788 ****
              $retval .= $link;
          }
!         $retval .= "</ul>";
          $retval .= COM_endBlock( COM_getBlockTemplate( 'admin_block', 'footer' ));
      }
--- 2761,2765 ----
              $retval .= $link;
          }
! 
          $retval .= COM_endBlock( COM_getBlockTemplate( 'admin_block', 'footer' ));
      }




More information about the geeklog-cvs mailing list