MyBB Community Forums
{$post['groupimage']} causes unnecessary break - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: {$post['groupimage']} causes unnecessary break (/thread-198982.html)



{$post['groupimage']} causes unnecessary break - mikemayday - 2016-08-28

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?


RE: {$post['groupimage']} causes unnecessary break - thelovelyone - 2016-08-28

Did you also make the changes in postbit/postbit classic ?


RE: {$post['groupimage']} causes unnecessary break - .m. - 2016-08-28

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']}


RE: {$post['groupimage']} causes unnecessary break - eNvy - 2016-08-28

If the template with the code for the usegroup doesn't have a <br/> tag then look as m. Says, in the postbit template.


RE: {$post['groupimage']} causes unnecessary break - mikemayday - 2016-08-28

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.


RE: {$post['groupimage']} causes unnecessary break - eNvy - 2016-08-28

Can you give us your forum url so we can check it better?


RE: {$post['groupimage']} causes unnecessary break - limu - 2016-08-28

It's added in inc/functions_post.php (lines 228-231)


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



RE: {$post['groupimage']} causes unnecessary break - eNvy - 2016-08-28

(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.


RE: {$post['groupimage']} causes unnecessary break - mikemayday - 2016-08-28

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??


RE: {$post['groupimage']} causes unnecessary break - Ashley1 - 2018-08-21

(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.