MyBB Community Forums

Full Version: Mymood Plugin support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
http://community.mybb.com/post-743063.html

can some 1 tell me what part of this code is preventing me from being able to minimize maximize board stats and forums check the post above for more info

// Run plugin
function my_mood_run($post)
{
	global $db, $mybb, $usergroup, $groupscache, $templates;
	
    $templates->cache['index'] = str_replace('{$headerinclude}', '{$headerinclude}<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
',$templates->cache['index']);
	
	$enable = $mybb->settings['my_mood_1'];
	$mymusergroup = $mybb->user['usergroup'];
	$xmymusergroup = explode(",",$mybb->settings['my_mood_2']);
	$mymuser = $post['uid'];
	$xmymuser = explode(",",$mybb->settings['my_mood_3']);

	if ($enable != '0')
	{
		if (!in_array($mymusergroup,$xmymusergroup) && (!in_array($mymuser,$xmymuser)))
		{
			$query = $db->query("select * FROM ".TABLE_PREFIX."profilefields WHERE name='My Mood'");
			$get = $db->fetch_array($query);
			$fid = $get['fid'];
			$return = "fid".$fid;
			if ($post[$return] != '') 
			{
				$post['my_mood'] = '<a href="'.$mybb->settings['bburl'].'/usercp.php?action=profile"><img src="'.$mybb->settings['bburl'].'/images/moods/'.$post[$return].'.gif" title="'.$post[$return].'" align="center" style="vertical-align: middle;"></a>';
			}
		}
	}
}
Edit: found to be duplicate thread for :
jQuery Twice mymood plugin problem please fix for me Big Grin

__________________________________________________

find below jQuery code in headerinclude template
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

add below code in a new line after the above code AND save the template
<script type="text/javascript">jQuery.noConflict();</script>