Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 09:10 am EST
Geeklog Forums
site admin with right block
Status: offline
lbpp
Forum User
Chatty
Registered: 06/10/05
Posts: 57
I seem to have changed every footer line in every page i could find and still when i log in as the site admin i dont get the right side of blocks. Is there something i am missing? Perhaps i need to add the footer code to a place i cant find? Any help on this one?
5
6
Quote
Status: offline
lbpp
Forum User
Chatty
Registered: 06/10/05
Posts: 57
you would think that is the OBVIOUS answer... I am quite sure I have not missed anything. I have opened EVERY file in all admin directories and changed every COM_siteFooter call that was on the page. This problem is exclusive to the "site admin" only which has made tracking it down a problem. I find it hard to believe that this problem does not exist for anyone else. Please help it is making me fustrated... HELP!!!
7
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Actually, I suggest you follow Gavin's (drshakagee) advise from this thread. Makes things much easier.
Sorry that I didn't think of that myself ...
bye, Dirk
Sorry that I didn't think of that myself ...
bye, Dirk
8
7
Quote
Status: offline
lbpp
Forum User
Chatty
Registered: 06/10/05
Posts: 57
I tried what he suggested and it sitll does NOT work. The right blocks show for everyone else in every situation but NEVER for the site admin with uid=2. Here is what i put in my lib.common.php as he suggested.
function COM_siteFooter( $rightblock = true, $custom = '' )
{
$rightblock = true;
global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
// If the theme implemented this for us then call their version instead.
$function = $_CONF['theme'] . '_siteFooter';
if( function_exists( $function ))
{
return $function( $rightblock );
}
// Set template directory
$footer = new Template( $_CONF['path_layout'] );
// Set template file
$footer->set_file( array(
'footer' => 'footer.thtml',
'rightblocks' => 'rightblocks.thtml',
'leftblocks' => 'leftblocks.thtml'
));
// Do variable assignments
DB_change( $_TABLES['vars'], 'value', 'value + 1', 'name', 'totalhits', '', true );
$footer->set_var( 'site_url', $_CONF['site_url']);
$footer->set_var( 'layout_url',$_CONF['layout_url']);
$footer->set_var( 'site_mail', "mailto:{$_CONF['site_mail']}" );
$footer->set_var( 'site_name', $_CONF['site_name'] );
$footer->set_var( 'site_slogan', $_CONF['site_slogan'] );
$rdf = substr_replace( $_CONF['rdf_file'], $_CONF['site_url'], 0,
strlen( $_CONF['path_html'] ) - 1 );
$footer->set_var( 'rdf_file', $rdf );
$footer->set_var( 'rss_url', $rdf );
$year = date( 'Y' );
$copyrightyear = $year;
if( !empty( $_CONF['copyrightyear'] ))
{
$copyrightyear = $_CONF['copyrightyear'];
}
$footer->set_var( 'copyright_notice', ' ' . $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] . '<br> '
. $LANG01[94] );
$footer->set_var( 'copyright_msg', $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] );
$footer->set_var( 'current_year', $year );
$footer->set_var( 'lang_copyright', $LANG01[93] );
$footer->set_var( 'trademark_msg', $LANG01[94] );
$footer->set_var( 'powered_by', $LANG01[95] );
$footer->set_var( 'geeklog_url', 'http://www.geeklog.net/' );
$footer->set_var( 'geeklog_version', VERSION );
/* 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( $custom ))
{
$function = $custom['0'];
if( function_exists( $function ))
{
$rblocks = $function( $custom['1'], 'right' );
}
}
elseif( $rightblock )
{
$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 )
{
$lblocks = '';
/* 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( $custom ))
{
$function = $custom[0];
if( function_exists( $function ))
{
$lblocks = $function( $custom[1], 'left' );
}
}
else
{
$lblocks = COM_showBlocks( 'left', $topic );
}
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 );
}
}
// Global centerspan variable set in index.php
if( isset( $GLOBALS['centerspan'] ))
{
$footer->set_var( 'centerblockfooter-span', '</td></tr></table>' );
}
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
$footer->set_var( 'execution_time', $exectime );
$footer->set_var( 'execution_textandtime', $exectext );
// Actually parse the template and make variable substitutions
$footer->parse( 'index_footer', 'footer' );
// Return resulting HTML
return $footer->finish( $footer->get_var( 'index_footer' ));
}
Then he says "well if you want to do it properly do it this other way". So i try that. First off there is NO functions.inc file that is see in my theme dir, only "functions.php" so i open that up and "cut and paste" the above code from my lib.common, leaving no COM_siteFooter function in lib.common. Here is what my functions.php now looks like.
<?php
$result = DB_query ("SELECT onleft,name FROM {$_TABLES['blocks']} WHERE is_enabled = 1");
$nrows = DB_numRows ($result);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray ($result);
if ($A['onleft'] == 1) {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-left.thtml,blockfooter-left.thtml';
} else {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-right.thtml,blockfooter-right.thtml';
}
}
$_BLOCK_TEMPLATE['customlogin'] = 'customlogin-header.thtml,customlogin-footer.thtml';
$_BLOCK_TEMPLATE['whats_related_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
$_BLOCK_TEMPLATE['story_options_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
function lbpp_siteFooter( $rightblock = true, $custom = '' )
{
$rightblock = true;
global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
// If the theme implemented this for us then call their version instead.
$function = $_CONF['theme'] . '_siteFooter';
if( function_exists( $function ))
{
return $function( $rightblock );
}
// Set template directory
$footer = new Template( $_CONF['path_layout'] );
// Set template file
$footer->set_file( array(
'footer' => 'footer.thtml',
'rightblocks' => 'rightblocks.thtml',
'leftblocks' => 'leftblocks.thtml'
));
// Do variable assignments
DB_change( $_TABLES['vars'], 'value', 'value + 1', 'name', 'totalhits', '', true );
$footer->set_var( 'site_url', $_CONF['site_url']);
$footer->set_var( 'layout_url',$_CONF['layout_url']);
$footer->set_var( 'site_mail', "mailto:{$_CONF['site_mail']}" );
$footer->set_var( 'site_name', $_CONF['site_name'] );
$footer->set_var( 'site_slogan', $_CONF['site_slogan'] );
$rdf = substr_replace( $_CONF['rdf_file'], $_CONF['site_url'], 0,
strlen( $_CONF['path_html'] ) - 1 );
$footer->set_var( 'rdf_file', $rdf );
$footer->set_var( 'rss_url', $rdf );
$year = date( 'Y' );
$copyrightyear = $year;
if( !empty( $_CONF['copyrightyear'] ))
{
$copyrightyear = $_CONF['copyrightyear'];
}
$footer->set_var( 'copyright_notice', ' ' . $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] . '<br> '
. $LANG01[94] );
$footer->set_var( 'copyright_msg', $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] );
$footer->set_var( 'current_year', $year );
$footer->set_var( 'lang_copyright', $LANG01[93] );
$footer->set_var( 'trademark_msg', $LANG01[94] );
$footer->set_var( 'powered_by', $LANG01[95] );
$footer->set_var( 'geeklog_url', 'http://www.geeklog.net/' );
$footer->set_var( 'geeklog_version', VERSION );
/* 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( $custom ))
{
$function = $custom['0'];
if( function_exists( $function ))
{
$rblocks = $function( $custom['1'], 'right' );
}
}
elseif( $rightblock )
{
$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 )
{
$lblocks = '';
/* 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( $custom ))
{
$function = $custom[0];
if( function_exists( $function ))
{
$lblocks = $function( $custom[1], 'left' );
}
}
else
{
$lblocks = COM_showBlocks( 'left', $topic );
}
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 );
}
}
// Global centerspan variable set in index.php
if( isset( $GLOBALS['centerspan'] ))
{
$footer->set_var( 'centerblockfooter-span', '</td></tr></table>' );
}
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
$footer->set_var( 'execution_time', $exectime );
$footer->set_var( 'execution_textandtime', $exectext );
// Actually parse the template and make variable substitutions
$footer->parse( 'index_footer', 'footer' );
// Return resulting HTML
return $footer->finish( $footer->get_var( 'index_footer' ));
}
?>
When i try this i get an error as well. There must be something im missing or perhaps this is a bug of some sorts. Any ideas anyone???
Text Formatted Code
function COM_siteFooter( $rightblock = true, $custom = '' )
{
$rightblock = true;
global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
// If the theme implemented this for us then call their version instead.
$function = $_CONF['theme'] . '_siteFooter';
if( function_exists( $function ))
{
return $function( $rightblock );
}
// Set template directory
$footer = new Template( $_CONF['path_layout'] );
// Set template file
$footer->set_file( array(
'footer' => 'footer.thtml',
'rightblocks' => 'rightblocks.thtml',
'leftblocks' => 'leftblocks.thtml'
));
// Do variable assignments
DB_change( $_TABLES['vars'], 'value', 'value + 1', 'name', 'totalhits', '', true );
$footer->set_var( 'site_url', $_CONF['site_url']);
$footer->set_var( 'layout_url',$_CONF['layout_url']);
$footer->set_var( 'site_mail', "mailto:{$_CONF['site_mail']}" );
$footer->set_var( 'site_name', $_CONF['site_name'] );
$footer->set_var( 'site_slogan', $_CONF['site_slogan'] );
$rdf = substr_replace( $_CONF['rdf_file'], $_CONF['site_url'], 0,
strlen( $_CONF['path_html'] ) - 1 );
$footer->set_var( 'rdf_file', $rdf );
$footer->set_var( 'rss_url', $rdf );
$year = date( 'Y' );
$copyrightyear = $year;
if( !empty( $_CONF['copyrightyear'] ))
{
$copyrightyear = $_CONF['copyrightyear'];
}
$footer->set_var( 'copyright_notice', ' ' . $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] . '<br> '
. $LANG01[94] );
$footer->set_var( 'copyright_msg', $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] );
$footer->set_var( 'current_year', $year );
$footer->set_var( 'lang_copyright', $LANG01[93] );
$footer->set_var( 'trademark_msg', $LANG01[94] );
$footer->set_var( 'powered_by', $LANG01[95] );
$footer->set_var( 'geeklog_url', 'http://www.geeklog.net/' );
$footer->set_var( 'geeklog_version', VERSION );
/* 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( $custom ))
{
$function = $custom['0'];
if( function_exists( $function ))
{
$rblocks = $function( $custom['1'], 'right' );
}
}
elseif( $rightblock )
{
$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 )
{
$lblocks = '';
/* 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( $custom ))
{
$function = $custom[0];
if( function_exists( $function ))
{
$lblocks = $function( $custom[1], 'left' );
}
}
else
{
$lblocks = COM_showBlocks( 'left', $topic );
}
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 );
}
}
// Global centerspan variable set in index.php
if( isset( $GLOBALS['centerspan'] ))
{
$footer->set_var( 'centerblockfooter-span', '</td></tr></table>' );
}
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
$footer->set_var( 'execution_time', $exectime );
$footer->set_var( 'execution_textandtime', $exectext );
// Actually parse the template and make variable substitutions
$footer->parse( 'index_footer', 'footer' );
// Return resulting HTML
return $footer->finish( $footer->get_var( 'index_footer' ));
}
Then he says "well if you want to do it properly do it this other way". So i try that. First off there is NO functions.inc file that is see in my theme dir, only "functions.php" so i open that up and "cut and paste" the above code from my lib.common, leaving no COM_siteFooter function in lib.common. Here is what my functions.php now looks like.
Text Formatted Code
<?php
$result = DB_query ("SELECT onleft,name FROM {$_TABLES['blocks']} WHERE is_enabled = 1");
$nrows = DB_numRows ($result);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray ($result);
if ($A['onleft'] == 1) {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-left.thtml,blockfooter-left.thtml';
} else {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-right.thtml,blockfooter-right.thtml';
}
}
$_BLOCK_TEMPLATE['customlogin'] = 'customlogin-header.thtml,customlogin-footer.thtml';
$_BLOCK_TEMPLATE['whats_related_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
$_BLOCK_TEMPLATE['story_options_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
function lbpp_siteFooter( $rightblock = true, $custom = '' )
{
$rightblock = true;
global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
// If the theme implemented this for us then call their version instead.
$function = $_CONF['theme'] . '_siteFooter';
if( function_exists( $function ))
{
return $function( $rightblock );
}
// Set template directory
$footer = new Template( $_CONF['path_layout'] );
// Set template file
$footer->set_file( array(
'footer' => 'footer.thtml',
'rightblocks' => 'rightblocks.thtml',
'leftblocks' => 'leftblocks.thtml'
));
// Do variable assignments
DB_change( $_TABLES['vars'], 'value', 'value + 1', 'name', 'totalhits', '', true );
$footer->set_var( 'site_url', $_CONF['site_url']);
$footer->set_var( 'layout_url',$_CONF['layout_url']);
$footer->set_var( 'site_mail', "mailto:{$_CONF['site_mail']}" );
$footer->set_var( 'site_name', $_CONF['site_name'] );
$footer->set_var( 'site_slogan', $_CONF['site_slogan'] );
$rdf = substr_replace( $_CONF['rdf_file'], $_CONF['site_url'], 0,
strlen( $_CONF['path_html'] ) - 1 );
$footer->set_var( 'rdf_file', $rdf );
$footer->set_var( 'rss_url', $rdf );
$year = date( 'Y' );
$copyrightyear = $year;
if( !empty( $_CONF['copyrightyear'] ))
{
$copyrightyear = $_CONF['copyrightyear'];
}
$footer->set_var( 'copyright_notice', ' ' . $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] . '<br> '
. $LANG01[94] );
$footer->set_var( 'copyright_msg', $LANG01[93] . ' © '
. $copyrightyear . ' ' . $_CONF['site_name'] );
$footer->set_var( 'current_year', $year );
$footer->set_var( 'lang_copyright', $LANG01[93] );
$footer->set_var( 'trademark_msg', $LANG01[94] );
$footer->set_var( 'powered_by', $LANG01[95] );
$footer->set_var( 'geeklog_url', 'http://www.geeklog.net/' );
$footer->set_var( 'geeklog_version', VERSION );
/* 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( $custom ))
{
$function = $custom['0'];
if( function_exists( $function ))
{
$rblocks = $function( $custom['1'], 'right' );
}
}
elseif( $rightblock )
{
$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 )
{
$lblocks = '';
/* 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( $custom ))
{
$function = $custom[0];
if( function_exists( $function ))
{
$lblocks = $function( $custom[1], 'left' );
}
}
else
{
$lblocks = COM_showBlocks( 'left', $topic );
}
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 );
}
}
// Global centerspan variable set in index.php
if( isset( $GLOBALS['centerspan'] ))
{
$footer->set_var( 'centerblockfooter-span', '</td></tr></table>' );
}
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
$footer->set_var( 'execution_time', $exectime );
$footer->set_var( 'execution_textandtime', $exectext );
// Actually parse the template and make variable substitutions
$footer->parse( 'index_footer', 'footer' );
// Return resulting HTML
return $footer->finish( $footer->get_var( 'index_footer' ));
}
?>
When i try this i get an error as well. There must be something im missing or perhaps this is a bug of some sorts. Any ideas anyone???
7
7
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Check your site preferences at the bottom for News box Configuration make sure nothing is clicked. Since you don't have a user block just go to http://www.yourgeeklogsite.com/usersettings.php?mode=preferences I don't know if that is really the problem but it seems to be a good place to start. If that isn't the problem how about you try a different theme and see if it still behaves wrongly, if it doesn't then it's a problem with the theme.
Yes I am mental.
Yes I am mental.
6
7
Quote
Status: offline
lbpp
Forum User
Chatty
Registered: 06/10/05
Posts: 57
Quote by drshakagee: Check your site preferences at the bottom for News box Configuration make sure nothing is clicked. Since you don't have a user block just go to http://www.yourgeeklogsite.com/usersettings.php?mode=preferences I don't know if that is really the problem but it seems to be a good place to start. If that isn't the problem how about you try a different theme and see if it still behaves wrongly, if it doesn't then it's a problem with the theme.
tried the news box config and that was fine... nothing was checked. Checked every box and still the same result. As far as the theme being the problem i already thought of that and tried it with a theme i did not build and the problem persists. Also as a note i am using the Menu plugin... perhaps this has something to do with it...
6
9
Quote
Status: offline
lbpp
Forum User
Chatty
Registered: 06/10/05
Posts: 57
ok it HAS to be a bug with either geeklog's handling of the admin UID=2 or there is a conflict with the Menu plugin using UID=2. I logged in as another user and set the admin UID=2 to a non root user and i STILL did not get any of the right blocks or any of the left ones that should be there. WHen i make any other user a root they get all their menus fine. So then i log in to the Admin account and it is still the same, i only get the "admin only" menu. This cant be right... PLEASE HELP!!
9
8
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by lbpp:
Then he says "well if you want to do it properly do it this other way". So i try that. First off there is NO functions.inc file that is see in my theme dir, only "functions.php" so i open that up and "cut and paste" the above code from my lib.common, leaving no COM_siteFooter function in lib.common....
When i try this i get an error as well. There must be something im missing or perhaps this is a bug of some sorts. Any ideas anyone???
putting a custom com_sitefooter into your theme's functions file is not how you did it according to the above. first, leave the function in libcommon and just COPY it, do not CUT it. once your COPY is in the functions file, you need to rename it properly according the drshakagee's instructions. Then he says "well if you want to do it properly do it this other way". So i try that. First off there is NO functions.inc file that is see in my theme dir, only "functions.php" so i open that up and "cut and paste" the above code from my lib.common, leaving no COM_siteFooter function in lib.common....
When i try this i get an error as well. There must be something im missing or perhaps this is a bug of some sorts. Any ideas anyone???
5
7
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by lbpp: you would think that is the OBVIOUS answer... I am quite sure I have not missed anything. I have opened EVERY file in all admin directories and changed every COM_siteFooter call that was on the page. This problem is exclusive to the "site admin" only which has made tracking it down a problem. I find it hard to believe that this problem does not exist for anyone else. Please help it is making me fustrated... HELP!!!
why did you limit your search to the admin directories? if you want right blocks on the public/index.php page, whether you are admin or not, then you'll have to look there as well.
5
5
Quote
All times are EST. The time is now 09:10 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content