Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
{$post['groupimage']} causes unnecessary break
#1
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?
Reply
#2
Did you also make the changes in postbit/postbit classic ?
Reply
#3
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']}
Reply
#4
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 don't give support on PM.
Reply
#5
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.
Reply
#6
Can you give us your forum url so we can check it better?
I don't give support on PM.
Reply
#7
It's added in inc/functions_post.php (lines 228-231)


		if($mybb->settings['postlayout'] == "classic")
		{
			$post['groupimage'] .= "<br />";
		}
Reply
#8
(08-28-2016, 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.
I don't give support on PM.
Reply
#9
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??
Reply
#10
(08-28-2016, 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.
What goes around comes around
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)