[Edit] Specific forum banning.
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #1
[Edit] Specific forum banning.
http://mods.mybb.com/view/specific-forum...http://mods.mybb.com/view/specific-forum-banning-desig

Could somebody edit this plugin in some way that moderators can only select forums where they have permission to moderate?

The plugin currenly allows moderators to ban users from specific forums, but I want the plugin to allow moderators to ban users from specific forums where they are moderators in.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
12-02-2011 12:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #2
RE: [Edit] Specific forum banning.
Try to replace:

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator() != true)

with:

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator($post['fid']) != true)


Not tested.

12-03-2011 02:47 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #3
RE: [Edit] Specific forum banning.
(12-03-2011 02:47 AM)TriTop Wrote:  Try to replace:

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator() != true)

with:

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator($post['fid']) != true)


Not tested.


Didn't worked Erf

Maybe it has something with this?:

PHP Code:
$forum_select = build_forum_jump("", $fid, 1, '', 0, '', "fid");


and:

PHP Code:
$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, '', "fid");


Tried without any luck..


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
12-07-2011 09:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #4
RE: [Edit] Specific forum banning.
Ok. This works. Replace:

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator() != true)
	{
		return;
	}

with:

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator($mybb->input['fid']) != true)
	{
		error('Sorry, you have no permission to ban here!');
	}

12-12-2011 03:12 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #5
RE: [Edit] Specific forum banning.
Yes id does work Yipi, thanks TriTop!!!

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
12-14-2011 01:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
mobert Offline
Junior Member
**
Posts: 1
Joined: Aug 2011
Post: #6
RE: [Edit] Specific forum banning.
This does not work for me. When i do this, i get a "Sorry you have no permission to ban here!" message on every page in the modCP.
01-09-2012 11:47 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #7
RE: [Edit] Specific forum banning.
Oh me too :/ It was all right at the first time..

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
01-09-2012 01:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #8
RE: [Edit] Specific forum banning.
My 30 second guess would be to use this replacement instead

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator($mybb->input['fid']) != true)


My Blog
01-09-2012 08:59 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #9
RE: [Edit] Specific forum banning.
(01-09-2012 08:59 PM)ZiNgA BuRgA Wrote:  My 30 second guess would be to use this replacement instead

PHP Code:
if($mybb->input['action'] != "specificbanuser" || is_moderator($mybb->input['fid']) != true)


Using just that part of the edit, you may say it works better, as it now allows us use the modcp, but it shows a blank page if mods choose a forum where they have not permission to ban.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
01-15-2012 02:24 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #10
RE: [Edit] Specific forum banning.
Get someone else to write a proper fix for it then.

My Blog
01-15-2012 03:53 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: