Not Solved Additional Usergroup Images - Broken Images
#4
Not Solved
You can easily fix yourself:
  1. Open "aui.php" file.
  2. Replace aui_profile function with:
    function aui_profile()
    {
    	global $templates, $theme, $xfire, $memprofile, $mybb, $db, $memprofile, $gi;
    	$gids = $memprofile['additionalgroups'];
    	$gids = explode(",",$gids);
    	$gi = "";
    	
    	if(!empty($mybb->user['language']))
    	{
    		$language = $mybb->user['language'];
    	}
    	else
    	{
    		$language = $mybb->settings['bblanguage'];
    	}
    	
    	foreach($gids as $gid)
    	{
    		$getaui=$db->query("SELECT image FROM ".TABLE_PREFIX."usergroups WHERE gid='".$gid."'");
    		$getaui=$db->fetch_array($getaui);
    		$aui = $getaui['image'];
    		
    		if($aui != "")
    		{
    			$aui = str_replace("{lang}", $language, $aui);
    			$aui = str_replace("{theme}", $theme['imgdir'], $aui);
    			$gi = $gi."<img src='$aui' /><br />";
    		}
    	}
    }
  3. Replace aui_post function with:
    function aui_post($post)
    {
    	global $templates, $theme, $xfire, $memprofile, $mybb, $db, $auigi, $gi, $aui, $memprofile;
    	$gids = $post['additionalgroups'];
    	$gids = explode(",",$gids);
    	$gi = "";
    	
    	if(!empty($mybb->user['language']))
    	{
    		$language = $mybb->user['language'];
    	}
    	else
    	{
    		$language = $mybb->settings['bblanguage'];
    	}
    	
    	foreach($gids as $gid)
    	{
    		$getaui = $db->query("SELECT image FROM ".TABLE_PREFIX."usergroups WHERE gid='".$gid."'");
    		$getaui = $db->fetch_array($getaui);
    		$aui = $getaui['image'];
    		if($aui != "")
    		{
    			$aui = str_replace("{lang}", $language, $aui);
    			$aui = str_replace("{theme}", $theme['imgdir'], $aui);
    			
    			if($mybb->user['classicpostbit'] == 1)
    			{
    				$post['groupimage'] = $post['groupimage']."<img src='$aui' /><br />";
    			}
    			else
    			{
    				$post['groupimage'] = $post['groupimage']."<br /><img src='$aui' />";
    			}
    		}	
    	}
    }
  4. Save. Smile
It is also XHTML compliant now.
Reply


Messages In This Thread
RE: Additional Usergroup Images - Broken Images - by cfillion - 2012-02-21, 04:05 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)