Disabling Moderator Inheritance
wnd Offline
Junior Member
**
Posts: 8
Joined: May 2010
Post: #1
Disabling Moderator Inheritance
I'm trying to figure out how to prevent moderators from being inherited from a parent forum.

I managed to disallow the ability itself, but now I'm having trouble with modifying the cache so that the moderator no longer displays as a moderator of that forum.

I've modified class_datacache.php, specifically the build_moderators function, in a way that prevents the parent forum's moderators from being added to the moderator list of that forum:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
private function build_moderators($moderators=array(), $pid=0)
	{
		if($this->moderators_forum_cache[$pid])
		{
			foreach($this->moderators_forum_cache[$pid] as $main)
			{
				foreach($main as $forum)
				{
					$forum_mods = '';
					if($this->moderators[$forum['fid']])
					{
						$forum_mods = $this->moderators[$forum['fid']];
					}
					$this->built_moderators[$forum['fid']] = $forum_mods;
					$this->build_moderators($forum_mods, $forum['fid']);
				}
			}
		}
	}


However, even after rebuilding the cache with this new change, the moderator still continues to appear. What am I missing? I've looked at the function update_moderators above it, but it doesn't seem to have anything adding the parent moderators to the subforums.

(If this is in the wrong forum, a move would be appreciated.)

(This post was last modified: 07-02-2011 07:19 AM by wnd.)
07-02-2011 07:16 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Disabling Moderator Inheritance - wnd - 07-02-2011 07:16 AM
RE: Disabling Moderator Inheritance - wnd - 07-02-2011, 11:02 AM

 Standard Tools
Forum Jump: