MyBB Community Forums

Full Version: Avatar Clashing with the ranks.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I think this image will be self explanatory.

I think the image is to big. The Min. size for an avatar is 100x100.

why would it be doing this?

[Image: WTF.jpg]
In the template 'postbit_classic' search for:
{$post['useravatar']}<br />
and change to:
<br />{$post['useravatar']}<br />

ACP > Templates & Style > Templates > (click your theme's templates) > Postbit Templates > postbit_classic
Fixed, but now I have a space between my Admin rank and Founder rank.
Can you post a link to your website, please?
You have to edit the plugin you are using for Additional Group Images. Open plugin file and remove <br/> from the end of the code.
(2011-06-04, 08:23 AM)Yaldaram Wrote: [ -> ]You have to edit the plugin you are using for Additional Group Images. Open plugin file and remove <br/> from the end of the code.

There is no <br/> at the end see.

<?php

$plugins->add_hook('member_profile_end', 'aui_profile');
$plugins->add_hook('postbit', 'aui_post');

function aui_info()
{
	return array(
		'name'			=> 'Additional Usergroup Images',
		'description'	=> 'Show images from aditional usergroups.',
		'website'		=> 'http://www.coderzplanet.net/',
		'author'		=> 'Jammerx2',
		'authorsite'	=> 'http://www.coderzplanet.net/',
		'version'		=> '1.1',
		'guid'        => '630162f1cbb89183bc3cdd59b05f6701'
	);
}

function aui_activate()
{
	global $db, $mybb;
	require MYBB_ROOT.'/inc/adminfunctions_templates.php';

	find_replace_templatesets("member_profile", '#'.preg_quote('{$groupimage}').'#', "{\$groupimage}{\$gi}");

}

function aui_deactivate()
{
	global $mybb, $db;
	require MYBB_ROOT.'/inc/adminfunctions_templates.php';

	find_replace_templatesets("member_profile", '#'.preg_quote('{$gi}').'#', '',0);

}

function aui_profile()
{
	global $templates, $theme, $xfire, $memprofile, $mybb, $db, $memprofile, $gi;
	$gids = $memprofile['additionalgroups'];
	$gids = explode(",",$gids);
	$gi = "";
	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 != "")
	{
	$gi = $gi."<img src='$aui'><br />";
	}	
	}
}

function aui_post($post)
{
	global $templates, $theme, $xfire, $memprofile, $mybb, $db, $auigi, $gi, $aui, $memprofile;
	$gids = $post['additionalgroups'];
	$gids = explode(",",$gids);
	$gi = "";
	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 != "")
	{
	if($mybb->user['classicpostbit'] == 1)
	{
	$post['groupimage'] = $post['groupimage']."<img src='$aui'><br />";
	}
	else
	{
	$post['groupimage'] = $post['groupimage']."<br /><img src='$aui'>";
	}
	}	
	}
	
}
?>
Find;
$gi = $gi."<img src='$aui'><br />";
Replace with;
$gi = $gi."<img src='$aui'>";
Did not solve it. So I guess this can't be fixed. :/
Find;
$post['groupimage'] = $post['groupimage']."<img src='$aui'><br />";
Replace with;
$post['groupimage'] = $post['groupimage']."<img src='$aui'>";
Sweet Yaldaram, You are my hero Big Grin. It worked. Big GrinDDDDD
Pages: 1 2