MyBB Community Forums

Full Version: Add image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello guys, how can i add image for user title? not just text?
Users & Groups >> Groups >> Your Group >> Group Image enter there images/your_image.(extention)

Remember to upload your image to ./images folder Smile
not group image bro i mean custom user title ? Big Grin.
How about you test this baby out:

Profile:
<img src="images/{$memprofile['usergroup']}.png" height="" width="" border="" title="" alt="" />

Postbit
<img src="images/{$post['usergroup']}.png" height="" width="" border="" title="" alt="" />
sorry but iam still newbie in adding these scripts. i mean where i should add this? Big Grin.
Create an image save it: group_name.png move the image to images folder.

Now those codes should show image!

Remember that you have to create image with the same name for each group!!!!!!!!!!!
no i mean where i should add these codes

Profile:
PHP Code:
<img src="images/{$memprofile['usergroup']}.png" height="" width="" border="" title="" alt="" />

Postbit
PHP Code:
<img src="images/{$post['usergroup']}.png" height="" width="" border="" title="" alt="" />
Postbit template replace: {$post['usertitle']}
member_profile template replace: ({$usertitle})
http://www.clan-genesis.com/images/.jpg the image url is this and in custom user title field it says "mod" hmm?
If you have 5 groups:

1.
2.
3.
4.
5.


Then you have to create 5 images and save then inside images folder!!!

1.png
2.png
3.png
4.png
5.png


Postbit template find: {$post['usertitle']}

Add below:
<img src="images/{$post['usergroup']}.png" height="" width="" border="" title="" alt="" /> 


member_profile template find: ({$usertitle})

Add below:
<img src="images/{$memprofile['usergroup']}.png" height="" width="" border="" title="" alt="" />

The way it works is {$memprofile['usergroup']} and {$post['usergroup']} returns user group (1,2,3,4,5) so the rest is easy!!!!

path_to_the_image/{$memprofile['usergroup']}.(extension)
Pages: 1 2