MyBB Community Forums

Full Version: {$post['groupimage']} causes unnecessary break
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I want to have my groupimage in one line with the username and online status.
Unfortunately, {$post['groupimage']} causes a <br> to appear, so when a user has a group image there is one unnecessary empty line between the username and the group name.

My member_profile_groupimage looks like this:

<img src="{$displaygroup['image']}" alt="{$usertitle}" title="{$usertitle}" />

Why does it make a <br> appear? How can I make it stop?
Did you also make the changes in postbit/postbit classic ?
in the postbit templates {$post['onlinestatus']} should be next to {$post['profilelink']} (like below)
<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />

in general, {$post['groupimage']} is placed next to {$post['userstars']}
If the template with the code for the usegroup doesn't have a <br/> tag then look as m. Says, in the postbit template.
I did make changes to postbit classic:
It looks like this:

	<div class="author_information">
			
		<strong><span class="largetext">{$post['profilelink']}</span></strong>{$post['onlinestatus']}{$post['groupimage']}
		<br />
		<span class="smalltext">{$post['usertitle']}</span>
		
	</div>


However, whenever the user has a group image, there are two <br> elements there.
If I remove the <br /> above, a user with a group image gets a normal line break, a user without one gets no line breaks.
Can you give us your forum url so we can check it better?
It's added in inc/functions_post.php (lines 228-231)


		if($mybb->settings['postlayout'] == "classic")
		{
			$post['groupimage'] .= "<br />";
		}
(2016-08-28, 08:50 PM)limu Wrote: [ -> ]It's added in inc/functions_post.php (lines 228-231)


		if($mybb->settings['postlayout'] == "classic")
		{
			$post['groupimage'] .= "<br />";
		}

That's nasty.

Please MyBB, I assume you take note of this but you CAN'T do this in 2.0, PLEASE.
Ouuuuch.
Well, thank you for the help limu, that solves it.
This is my first forum and I'm loving MyBB for all its functions but I must say I'm finding the way templates work really daunting - especially for tricks like this one, which should be right in the template, I think??
(2016-08-28, 08:50 PM)limu Wrote: [ -> ]It's added in inc/functions_post.php (lines 228-231)


		if($mybb->settings['postlayout'] == "classic")
		{
			$post['groupimage'] .= "<br />";
		}

+1 for removing this code and adding the break to postbit_classic template.