Not Solved added moderator name's colour
#21
Not Solved
I could look at it but no promises Wink
Reply
#22
Not Solved
Here is the plugin
http://mods.mybb.com/archive/view/username-style
If you could get it to work on 1.6 would be good.
when you activate the plugin you will see any moderators you have listed get change to moderator guest.
Reply
#23
Not Solved
First change the compatibility of the plugin.

Next replace the usernamestyle_build_forumbits_forum function with this one.

function usernamestyle_build_forumbits_forum(&$forum)
{
	global $db, $mybb, $lang, $templates, $moderatorcache, $modlistsetting;
	
	// Moderator column is not off
	$mybb->settings['modlist'] = $modlistsetting;
	
	if($mybb->settings['modlist'] != 0)
	{
		$moderators = "";
		$done_moderators = array(
					"users" => array(),
					"groups" => array()
				);
		$parentlistexploded = explode(',', $forum['parentlist']);
		foreach($parentlistexploded as $mfid)
		{
			if(is_array($moderatorcache[$mfid]))
			{
				foreach($moderatorcache[$mfid] as $modtype)
				{
					foreach($modtype as $moderator)
					{
						if($moderator['isgroup'])
						{
							if(in_array($moderator['id'], $done_moderators['groups']))
							{
								continue;
							}
							$moderators .= $comma.htmlspecialchars_uni($moderator['title']);
							$done_moderators['groups'][] = $moderator['id'];
						}
						else
						{
							if(in_array($moderator['id'], $done_moderators['users']))
							{
								continue;
							}
							$moderators .= "{$comma}<a href=\"".get_profile_link($moderator['id'])."\">".format_name(htmlspecialchars_uni($moderator['username']),$moderator['usergroup'],$moderator['displaygroup'])."</a>";
							$done_moderators['users'][] = $moderator['id'];
						}
						$comma = ", ";
					}
				}
			}
		}
		$comma = "";
		
		if($moderators)
		{
			eval("\$forum['modlist'] = \"".$templates->get("forumbit_moderators")."\";");
		}
		else
		{
			$forum['modlist'] = "";
		}
	}
	
	// To avoid overwriting by original code segment
	$mybb->settings['modlist'] = 0;
	
	// Format lastposter name
	$query = $db->simple_select("users", "usergroup, displaygroup", "uid = '".$forum['lastposteruid']."'");
	$user = $db->fetch_array($query);
	
	$forum['lastposter'] = format_name($forum['lastposter'], $user['usergroup'], $user['displaygroup']);
}

Note: This will only fix this in the forumbit, I did not check and did not fix anything else. For that please contact the plugin author.
Reply
#24
Not Solved
Thanks dude,
i've been trying to get an answer for that since 1.6 was launched as i use this plugin i edited the file as above and now it works, it was only the forumbit that was broke in the plugin that was the only reason i never used it.
Reply
#25
Not Solved Thumbs Up 
(2010-11-20, 08:53 PM)- G33K - Wrote: Just use notepad or wordpad to edit the files and then upload them to your ftp.

bro,it's work.thank you so much for everything.
Reply
#26
Not Solved
hi there..

need some favour...how about group?do i need to edit the same file?
Reply
#27
Not Solved
anybody?
Reply
#28
Not Solved
(2011-04-11, 04:51 PM)fid Wrote: hi there..

need some favour...how about group?do i need to edit the same file?
im too interested %)
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)