Chelsea_vbulletin3_import31917
New Member
I'm looking for a fix to the username image on my forum i have tried using a template add on but i don't want my images to show up in who's online also it has a border around the image.
Example of what i want: Round of Promotions - Sythe.Org Forums
Edits used which didn't work to my needs:
If anyone can find a way to fix this i would be truly grateful.
Example of what i want: Round of Promotions - Sythe.Org Forums
Edits used which didn't work to my needs:
Code:
First of all you need to create a new profile field, so in your AdminCP scroll down to User Profile Fields, and select Add New User Profile Field.
Then select Sing line text box. Then fill out the details as follows:
Title: Username Image
Description: Have your username displayed as an image. Enter the full URL to the image location (including the http://)
Profile Field Category: (If you have created categories you can select whatever, if not it's not important)
Default Value: THIS MUST BE LEFT BLANK
Max length of allowed user input: You can leave this as the default.
Field length: You can leave this as default
Profile Field Type: Make sure single line text box is selected
Display order: (Anything you like)
Field required: No
Field Editable by user: ( I would highly reccommend setting this to no as this is in beta, this way only admins will be able to add an image for someone)
Private Field: No
Field Searchable on Members List: No
Show on Members List: No
Regular Expression: Leave blank
Which page displays this option: Edit Your Details
Then press Save.
It will then take you to a list of profile fields, where you should now see Username Image. Make sure you make a note of the field name (field#).
Next go to:
AdminCP > Styles & Templates > Style Manager > Click on the dropdown box for the style you want to apply this to, and selct Edit Templates.
Scroll down the list to Postbit Templates and double click on this
The scroll down to Postbit (or Posbit Legacy if you use vertical postbits)
*******FIND:*******
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
********AND REPLACE WITH*******
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]"><if condition="$post['field5']"><img src="$post[field5]" /> <else />$post[musername]</a></if>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
---
WHERE YOU SEE FIELD5 REPLACE THIS WITH THE FIELD NAME OF YOUR USERNAME IMAGE PROFILE FIELD.
---
############################################Further Locations you can replace username text with the username image#################################################
-------On Member's profile:-------
*********Open template Member info templates > MEMBERINFO *******
*******FIND:*******
$prepared[musername]
*******AND REPLACE WITH:*******
<if condition="$bbuserinfo['field5']"><img src="$bbuserinfo[field5]" /> <else />$prepared[musername] </if>
-------In Who's online-------
*******Open template Who's online templates > whosonlinebit*******
*******FIND:*******
<a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]
*******AND REPLACE WITH:*******
<a href="member.php?$session[sessionurl]u=$userinfo[userid]"><if condition="$bbuserinfo['field5']"><img src="$bbuserinfo[field5]" /> <else />$userinfo[musername]</if>
If anyone can find a way to fix this i would be truly grateful.