Recent Topics

1 Apr 01, 2008 17:31    

My b2evolution Version: Not Entered

Hello everyone...

I would like to know how to display the toolbar to users in group 1, or admin users only. I read on another post that I need to

check if the user has admin access before displaying it

I presume I need to alter either _toolbar.inc.php or _html_header.inc in my skins folder.

can someone help me out?
thanks

version 2.4.1

2 Apr 01, 2008 18:04

This is from _html_header.inc.php:

<?php
// ---------------------------- TOOLBAR INCLUDED HERE ----------------------------
require $skins_path.'_toolbar.inc.php';
// ------------------------------- END OF TOOLBAR --------------------------------

echo "\n";
if( is_logged_in() )
{
	echo '<div id="bgcontainer" class="skin_wrapper_loggedin">';
}
else
{
	echo '<div id="bgcontainer" class="skin_wrapper_anonymous">';
}
echo "\n";
?>
<!-- Start of bgcontainer -->


I think you can do something with this code ... B)

Good luck

3 Apr 02, 2008 03:51

<?php
// ---------------------------- TOOLBAR INCLUDED HERE ----------------------------
require $skins_path.'_toolbar.inc.php';

// ------------------------------- END OF TOOLBAR --------------------------------

echo "\n";
if( is_logged_in() )
switch( $current_User->group_ID ) 
{
     case 1 :
	echo '<div id="skin_wrapper" class="skin_wrapper_loggedin">';
}
else
{
	echo '<div id="skin_wrapper" class="skin_wrapper_anonymous">';
}
echo "\n";
?>

I came up with this, but it only just allows the admin to see the div class skin_wrapper_loggedin, and doesn't actually disable to toolbar for other users.

4 Apr 02, 2008 08:49

<?php
if( is_logged_in() )
{
  switch( $current_User->group_ID ) 
  {
     case 1 :
      // ---------------------------- TOOLBAR INCLUDED HERE ----------------------------
      require $skins_path.'_toolbar.inc.php';
      // ------------------------------- END OF TOOLBAR --------------------------------
      break;
  }
}
?>

¥

6 May 25, 2008 11:02

that worked pretty well (:, thanks ¥åßßå, that toolbar doesnot actually look fine in ie and also my users are not able to do a thing, just subscrp and profile, as i already have those links somewhere else i didnt need the toolbar for users , ty cheers ;)


Form is loading...