MyBB Community Forums

Full Version: Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

Question 1

If a user doesn't have a custom title/rank, it seems to leave a space for it on the postbit. How do I make it so it doesn't leave a line/space even if the user doesn't have a title?

[Image: postbits.jpg]

As you can see the top post profile has a rank and the one directly underneath doesnt. I don't want it to leave a line between the username and the "from" part.

Question 2

Also, how do I make it so it doesn't show the "from" if the user has not filled the LOCATION profile field?

Many thanks!
You can probably do this with Template Conditionals Plugin.: Install this: http://community.mybb.com/thread-31860.html

Now Open postbit and postbit_classic templates and find;
{$post['usertitle']}
and Replace it with the following;
<if $post['usertitle'] != "" then>
{$post['usertitle']}
</if>

Similarly you can do this with the Location custom profile field.
1) Use this plugin: http://mybbhacks.zingaburga.com/showthread.php?tid=260 and replace the following in 'postbit_classic'. Search for:
{$post['usertitle']}<br />
and replace with:
<if !empty($post['usertitle']) then>
{$post['usertitle']}<br />
</if>

2) In the template 'post_author_user' add this:
<if !empty($post['fidX']) then>
From: {$post['fidX']}
</if>
Where X is the ID of the custom field.
Brilliant, thanks!

For the fact, both answers were fine!
You're welcome Knerba Smile
Yaldaram, since you seem experienced in this... tehehe! There is one more thing I'd like to do using this plugin.

I would like members profiles to add "This user is a (usergroupname)". Of course if someone visits a profile page of someone who doesn't belong to a group, then this would not show.

Many thanks in advance!!
(2011-06-10, 05:57 PM)Knerba Wrote: [ -> ]I would like members profiles to add "This user is a (usergroupname)". Of course if someone visits a profile page of someone who doesn't belong to a group, then this would not show.

I guess you meant to show "This user belongs to [Usergroup Name]" on profile pages ?
Yes, if that member they are viewing belongs to a group. :-)
(2011-06-10, 06:23 PM)Knerba Wrote: [ -> ]Yes, if that member they are viewing belongs to a group. :-)

It is showing by default. See the profile page of any user of your forums and Just below the username, there would be his Usergroup name.
Sorry I should have better specified. I know it shows by default by I want to add a little bit before the (usergroup) shows.

Pages: 1 2