Recent Topics

1 Jan 10, 2008 14:54    

My b2evolution Version: 2.x

Hi there,

My client has asked me to remove the tools link in the admin section of his b2evo install because he thinks his customers will frown upon the anti spam list that is shown there.

Fair enough.

Looking through the code of _adminUI_general.class.php I get the impression that this is something the programmers thought of too. But I cannot find a setting in the admin allowing me to switch it off.

Should I change something in the code then? And if so, what? I am not a programmer.

Preferably I want the admin to see the tools link but the users to not see it.

Here's that code section from _adminUI_general.class.php

Thanks!

		if( $current_User->check_perm( 'options', 'view' ) )
		{	// Permission to view settings:
			// FP> This assumes that we don't let regular users access the tools, including plugin tools.
				$this->add_menu_entries( NULL, array(
						'tools' => array(
							'text' => T_('Tools'),
							'href' => 'admin.php?ctrl=crontab',
							'entries' =>  array(
								'cron' => array(
									'text' => T_('Scheduler'),
									'href' => 'admin.php?ctrl=crontab' ),
								'system' => array(
									'text' => T_('System'),
									'href' => 'admin.php?ctrl=system' ),
									),
								),
							) );

				if( $current_User->check_perm( 'spamblacklist', 'view' ) )
				{	// Permission to view antispam:
					$this->add_menu_entries( 'tools', array(
									'antispam' => array(
										'text' => T_('Antispam'),
										'href' => 'admin.php?ctrl=antispam'	),
									) );
				}

				$this->add_menu_entries( 'tools', array(
							'' => array(	// fp> '' is dirty
								'text' => T_('Misc'),
								'href' => 'admin.php?ctrl=tools' ),
						) );
		}
		elseif( $current_User->check_perm( 'spamblacklist', 'view' ) )
		{	// Permission to view antispam but NOT tools:
			// Give it it's own tab:
			$this->add_menu_entries( NULL, array(
						'tools' => array(
							'text' => T_('Tools'),
							'href' => 'admin.php?ctrl=antispam',
							'entries' =>  array(
								'antispam' => array(
									'text' => T_('Antispam'),
									'href' => 'admin.php?ctrl=antispam'	),
								),
						),
					) );
		}

2 Jan 10, 2008 15:27

draxeiro wrote:

My b2evolution Version: 2.x

Looking through the code of _adminUI_general.class.php I get the impression that this is something the programmers thought of too. But I cannot find a setting in the admin allowing me to switch it off.

Should I change something in the code then? And if so, what? I am not a programmer.

Preferably I want the admin to see the tools link but the users to not see it.

Simply tinker with the rights of the user. If tour posters are in the "Blogger group" they cannot see the advanced section of the Dashboard. *That* is what you noticed when you wrote.

I get the impression that this is something the programmers thought of too.

Is this information sufficient for the time being? If not, please report back to the forum.

Good luck

3 Jan 10, 2008 15:49

I did, basically everything is switched off except posting rights.

The user cannot do anything else.

But he/she still sees the tools link, and if he clicks on it the anti-spam list is shown.

Basically I don't want this link to be shown, so that people won't find themselves on that page either.

If you take a look at the code, and read the comments the programmers left it would seem the possibility is there to not show the tools menu. But so far I have not been able to figure out how.

5 Jan 10, 2008 16:24

Strangest thing is that when I click users I only see a list of the users but not the groups.

There is a link to make a new group, but not to edit an exisiting one.

Or am I looking in the wrong menu?

7 Jan 10, 2008 16:35

Found it, went there via the group permission tab at blog settings.

But that was indeed the way to switch off the link.

Thanks a lot!!!

8 Jan 10, 2008 16:38

Hi Afwas,

You're totally right. Do I feel dumb now, I totally overlooked that! ;)

9 Jan 10, 2008 16:44

¥åßßå wrote:

No worries ;)

¥


Form is loading...