MyBB Community Forums

Full Version: Add Userbars to Postbit without 2 Groups.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay so a lot of people use plugins to have multiple group images appear on the postbit, lets say you are an administrator and you've made a developer group just so you can have two userbars. This tutorial will show a quicker way in which you can add multiple images to the postbit without the need for having two user groups. All you need is a plugin which in effect, a lot of people already use.

Okay so to start off you will want to have PHP in Templates, if you do not have the plugin you can download it here.
Now log in to the Admin Control Panel and navigate to your theme and postbit/postbit_classic.
AdminCP > Templates & Style > Templates > your-template > Postbit Templates > postbit or postbit_classic

Now in that template locate the following;
{$post['groupimage']}

Add the following under it;
<if $post['uid'] == 1 then><img src="IMAGE"></if>

  1. The number one (1) is the user ID you want to use.
  2. Replace the word IMAGE with the link to the userbar.
Upon adding that code with the updated user id and the image save the template and should look like below.
[attachment=38529]
I feel this could also be useful for founder and owner ranks, without the need for any additional groups.
You can achieve the same effect using Template Conditionals instead.
http://mybbhacks.zingaburga.com/showthread.php?tid=464
(2017-03-10, 12:56 AM)Nasyr Wrote: [ -> ]Okay so a lot of people use plugins to have multiple group images appear on the postbit, lets say you are an administrator and you've made a developer group just so you can have two userbars. This tutorial will show a quicker way in which you can add multiple images to the postbit without the need for having two user groups. All you need is a plugin which in effect, a lot of people already use.

Okay so to start off you will want to have PHP in Templates, if you do not have the plugin you can download it here.
Now log in to the Admin Control Panel and navigate to your theme and postbit/postbit_classic.
AdminCP > Templates & Style > Templates > your-template > Postbit Templates > postbit or postbit_classic

Now in that template locate the following;
{$post['groupimage']}

Add the following under it;
<if $post['uid'] == 1 then><img src="IMAGE"></if>

  1. The number one (1) is the user ID you want to use.
  2. Replace the word IMAGE with the link to the userbar.
Upon adding that code with the updated user id and the image save the template and should look like below.

How would I add this option into the memberlist_group_image and the user profile? I would change the <if $post['uid'] == 1 then> to <if ***** == 1 then> ? What would go in the stars?