[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.656,1.657
Oliver
ospiess at qs1489.pair.com
Thu Sep 27 21:24:31 EDT 2007
Update of /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv81288
Modified Files:
lib-common.php
Log Message:
introducing right_blocks_in_fotter setting
Index: lib-common.php
===================================================================
RCS file: /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.656
retrieving revision 1.657
diff -C2 -d -r1.656 -r1.657
*** lib-common.php 28 Sep 2007 00:21:29 -0000 1.656
--- lib-common.php 28 Sep 2007 01:24:29 -0000 1.657
***************
*** 234,239 ****
*function.php or in lib-custom.php. Therefore they are NOT TO BE CHANGED HERE.
*/
! $_CONF['left_blocks_in_footer'] = 0;
! $_CONF['right_blocks_in_footer'] = 1;
/**
--- 234,239 ----
*function.php or in lib-custom.php. Therefore they are NOT TO BE CHANGED HERE.
*/
! $_CONF['left_blocks_in_footer'] = 0; // use left blocks in header
! $_CONF['right_blocks_in_footer'] = 1; // use right blocks in footer
/**
***************
*** 854,858 ****
'menuitem_last' => 'menuitem_last.thtml',
'menuitem_none' => 'menuitem_none.thtml',
! 'leftblocks' => 'leftblocks.thtml'
));
--- 854,859 ----
'menuitem_last' => 'menuitem_last.thtml',
'menuitem_none' => 'menuitem_none.thtml',
! 'leftblocks' => 'leftblocks.thtml',
! 'rightblocks' => 'rightblocks.thtml'
));
***************
*** 1112,1116 ****
if( $_CONF['left_blocks_in_footer'] == 1 )
{
- $header->set_var( 'geeklog_blocks', '' );
$header->set_var( 'left_blocks', '' );
}
--- 1113,1116 ----
***************
*** 1143,1148 ****
if( empty( $lblocks ))
{
- $header->set_var( 'geeklog_blocks', '' );
$header->set_var( 'left_blocks', '' );
}
else
--- 1143,1148 ----
if( empty( $lblocks ))
{
$header->set_var( 'left_blocks', '' );
+ $header->set_var( 'geeklog_blocks', '' );
}
else
***************
*** 1150,1153 ****
--- 1150,1197 ----
$header->set_var( 'geeklog_blocks', $lblocks );
$header->parse( 'left_blocks', 'leftblocks', true );
+ $header->set_var( 'geeklog_blocks', '');
+ }
+ }
+
+ if( $_CONF['right_blocks_in_footer'] == 1 )
+ {
+ $header->set_var( 'right_blocks', '' );
+ $header->set_var( 'geeklog_blocks', '' );
+ }
+ else
+ {
+ $rblocks = '';
+
+ /* 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 ))
+ {
+ $rblocks = $function( $what[1], 'right' );
+ }
+ else
+ {
+ $rblocks = COM_showBlocks( 'right', $topic );
+ }
+ }
+ else if( $what <> 'none' )
+ {
+ // Now show any blocks -- need to get the topic if not on home page
+ $rblocks = COM_showBlocks( 'right', $topic );
+ }
+
+ if( empty( $rblocks ))
+ {
+ $header->set_var( 'right_blocks', '' );
+ $header->set_var( 'geeklog_blocks', '' );
+ }
+ else
+ {
+ $header->set_var( 'geeklog_blocks', $rblocks, true );
+ $header->parse( 'right_blocks', 'rightblocks', true );
}
}
***************
*** 1190,1204 ****
function COM_siteFooter( $rightblock = -1, $custom = '' )
{
! global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
! if( $rightblock < 0 )
{
! if( isset( $_CONF['show_right_blocks'] ))
! {
! $rightblock = $_CONF['show_right_blocks'];
! }
! else
{
! $rightblock = false;
}
}
--- 1234,1252 ----
function COM_siteFooter( $rightblock = -1, $custom = '' )
{
! global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic, $LANG_BUTTONS;
! // use the right blocks here only if not in header already
! if ($_CONF['right_blocks_in_footer'] == 1)
{
! if( $rightblock < 0)
{
! if( isset( $_CONF['show_right_blocks'] ))
! {
! $rightblock = $_CONF['show_right_blocks'];
! }
! else
! {
! $rightblock = false;
! }
}
}
***************
*** 1253,1256 ****
--- 1301,1313 ----
$footer->set_var( 'geeklog_url', 'http://www.geeklog.net/' );
$footer->set_var( 'geeklog_version', VERSION );
+ // Now add variables for buttons like e.g. those used by the Yahoo theme
+ $footer->set_var( 'button_home', $LANG_BUTTONS[1] );
+ $footer->set_var( 'button_contact', $LANG_BUTTONS[2] );
+ $footer->set_var( 'button_contribute', $LANG_BUTTONS[3] );
+ $footer->set_var( 'button_sitestats', $LANG_BUTTONS[7] );
+ $footer->set_var( 'button_personalize', $LANG_BUTTONS[8] );
+ $footer->set_var( 'button_search', $LANG_BUTTONS[9] );
+ $footer->set_var( 'button_advsearch', $LANG_BUTTONS[10] );
+ $footer->set_var( 'button_directory', $LANG_BUTTONS[11] );
/* Check if an array has been passed that includes the name of a plugin
***************
*** 1270,1283 ****
$rblocks = COM_showBlocks( 'right', $topic );
}
- if( $rightblock && !empty( $rblocks ))
- {
- $footer->set_var( 'geeklog_blocks', $rblocks );
- $footer->parse( 'right_blocks', 'rightblocks', true );
- }
- else
- {
- $footer->set_var( 'geeklog_blocks', '' );
- $footer->set_var( 'right_blocks', '' );
- }
if( $_CONF['left_blocks_in_footer'] == 1 )
--- 1327,1330 ----
***************
*** 1304,1314 ****
if( empty( $lblocks ))
{
- $footer->set_var( 'geeklog_blocks', '' );
$footer->set_var( 'left_blocks', '' );
}
else
{
! $footer->set_var( 'geeklog_blocks', $lblocks );
$footer->parse( 'left_blocks', 'leftblocks', true );
}
}
--- 1351,1401 ----
if( empty( $lblocks ))
{
$footer->set_var( 'left_blocks', '' );
+ $footer->set_var( 'geeklog_blocks', '');
}
else
{
! $footer->set_var( 'geeklog_blocks', $lblocks);
$footer->parse( 'left_blocks', 'leftblocks', true );
+ $footer->set_var( 'geeklog_blocks', '');
+ }
+ }
+
+ if( $_CONF['right_blocks_in_footer'] == 1 && $rightblock)
+ {
+ $rblocks = '';
+
+ /* 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 ))
+ {
+ $rblocks = $function( $what[1], 'right' );
+ }
+ else
+ {
+ $rblocks = COM_showBlocks( 'right', $topic );
+ }
+ }
+ else if( $what <> 'none' )
+ {
+ // Now show any blocks -- need to get the topic if not on home page
+ $rblocks = COM_showBlocks( 'right', $topic );
+ }
+
+ if( empty( $rblocks ))
+ {
+ $footer->set_var( 'geeklog_blocks', '');
+ $footer->set_var( 'right_blocks', '' );
+ }
+ else
+ {
+ $footer->set_var( 'geeklog_blocks', $rblocks);
+ $footer->parse( 'right_blocks', 'rightblocks', true );
+ $footer->set_var( 'geeklog_blocks', '');
}
}
More information about the geeklog-cvs
mailing list