Log in

View Full Version : Profile Enhancements - Username Image


Spank
12-07-2008, 10:00 PM
Hi all, this is a very basic template edit to allow username images.
I'm not a coder, so I'm hoping that the more experienced members will help out in perfecting this.

What does this mod do?

This mod allows you to change the username display on the postbit to an image. If a URL is added to the profile field it will display the image, if it is left blank the normal text username is displayed.

What doesn't this mod do?

Nothing else. I'm hoping that some of the more experienced can help turn this into a full modification with usergroup controls, size limit controls, browse local files and upload controls, etc. If you are able to help out with this, please let me know :)



This runs off of the User Profile Fields in vb, I would suggest you make it not user editable, as I'm not sure if there are any security risks with allowing your members to insert a URL to an image.

Install instructions are in the zip. If you use, please be kind enough to mark as installed.

------------------
Updates
------------------
.02 - Missing </a> added. This made the rank part of the profile link.
.03 - Added instructions for applying the username image to user's profile and who's online.
.04 - Added height restriction to image tag.

arauf
12-08-2008, 12:06 AM
where is zip ? ?

Spank
12-08-2008, 12:18 AM
It's coming

exel
12-08-2008, 01:20 AM
Thanks, works GREAT!

wAnBoA
12-08-2008, 06:41 AM
Nice. Installed
How do we add the image in the active users online in past 24hrs list as well?

Spank
12-08-2008, 06:56 AM
I'll look at other locations to add this later on today.

Spank
12-08-2008, 09:30 AM
I've updated the mod to include instructions for adding the username image to users' profiles and to who's online.



Nice. Installed
How do we add the image in the active users online in past 24hrs list as well?

Because the Member's who have visited Mod has it's own variables, it's more difficult to apply this. I'll look into it, but I can't promise anything on this.

shadowevil
12-08-2008, 09:38 AM
screenshot or demo ??

Spank
12-08-2008, 10:01 AM
screenshot or demo ??

Not really needed as all it does is replace the username text with whatever image you link it to. Once I install on my live board though, I can put up a demo link.

wAnBoA
12-09-2008, 03:56 AM
I've updated the mod to include instructions for adding the username image to users' profiles and to who's online.

Because the Member's who have visited Mod has it's own variables, it's more difficult to apply this. I'll look into it, but I can't promise anything on this.



Thanks. I think to who's online is great enough. Thanks dude....

Q-v-n-s-Q
12-09-2008, 05:40 AM
any demo?? i see, it's added another field.

Spank
12-09-2008, 10:03 AM
Yes it adds a profile field to the usercp. In the field you put the full URL to the image you want to use to display your username.

Spank
12-13-2008, 04:30 AM
.04 update contains image restriction in the img tag. This is useful if you are allowing your members to add their own image in the usercp, so they can't put up a huge image to distort the page.

Remember to mark installed if you use.

MOF
12-29-2008, 06:08 PM
Can you add an image example?

Spank
12-31-2008, 10:03 AM
Screenshot added

sheryjutt
01-05-2009, 05:17 PM
It's Not Work For Me

Spank
01-05-2009, 09:34 PM
What's not working?

proudgreenyin
01-06-2009, 12:55 AM
works great m8, thanks

Ev!L ErN!E
01-08-2009, 11:13 PM
So any coders out there willing to help out with this and make a full out mod???? please!!!! and thanks Spank for the template edits.

Gizmix
02-08-2009, 03:41 PM
Very Niace!

tinhbanonline
02-16-2009, 05:47 AM
can anyone do user image to forumhome, forumdisplay, showthread .........?

tinhbanonline
02-16-2009, 04:45 PM
can you help me do the Username Image that can show in all forumhome, displayforum ........????

Spank
02-16-2009, 09:06 PM
Not at the moment no, it's a bit more complicated to do those.

kartik786
02-22-2009, 02:10 PM
you know how you can make this modification more productive?

A lot of people when they come on the forum, leave their email id in it.. then some dumb spammer grabs those email ids with softwares and makes them vulnerable to spam

This mod of yours can actually turn those email ids into images and protect them from the robots that grab email ids.

Hope you'll take this suggestion and release a mod to that extent.

Regards.

WorldDomination
04-28-2009, 03:11 AM
I found a small error.
To display it in the member profiles, it does not work, instead of displaying the image of the users profile your viewing it displays yours. Can anyone help fix this? I've tried editing the code but no luck.

Spank
04-28-2009, 06:00 AM
Hmmm you're right, not sure why I didn't notice this, I'll try and look into fixing it, not got a great deal of time spare at the mo, but I'll do it as soon as I get chance.

WorldDomination
04-28-2009, 03:37 PM
Hmmm you're right, not sure why I didn't notice this, I'll try and look into fixing it, not got a great deal of time spare at the mo, but I'll do it as soon as I get chance.

I'm fairly sure it has to do with that small snippet of coding for the 'MEMBERINFO', but I can't seem to get it right. I either get it so it displays no images, or your image and the person name, or nothing.

philkillz
05-18-2009, 07:12 PM
Okay i fixed it to the point of it working on Posts only, Although as for member profiles...it either does not show at all, or shows the same image on every profile.

tehone
06-09-2009, 06:25 AM
When i add user title goes big and links to profile... Help?

Spank
06-10-2009, 01:24 AM
When i add user title goes big and links to profile... Help?

Can you post the contents of your postbit/postbit legacy?

tehone
06-10-2009, 09:20 AM
<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]
</div></if>
</div>

is it coz im using on 3.8.2?

Spank
06-10-2009, 10:52 AM
I've tested it with 3.8.x and it works show that shouldn't be a problem.I can't see from what you've posted anything that would cause your problem.

tehone
06-11-2009, 05:18 AM
Same.... So you can't help me? Also i noticed the user title code is underneath this maybe it is joining the code

Spank
06-11-2009, 07:40 AM
it probably is, can you post that part of the template.

tehone
06-12-2009, 04:29 AM
Hers whole template:

$template_hook[postbit_start]
<if condition="
/* Never show the tcat for these */
!in_array(THIS_SCRIPT, ($exclude_scripts = array('private'))) &&

/* Don't show the first one for these */
(!in_array(THIS_SCRIPT, array('announcement', 'showthread'))

/* Always show the tcat for these */
|| $GLOBALS['first_postbit'] == true || $GLOBALS['extra_thread_tcat'] || $show['threadedmode'] || $show['hybridmode'])">
<div class="tcat_top">
<div class="tcat_left"></div>

<div class="tcat_right">
<div class="tcat_right_inner">
</div>
</div>
$mgc_cb_evo_postbit
<div class="tcat_text">
<div class="tcat_text_inner">
<if condition="$post['title']">$post[title]<else />Re: $thread[title]</if>
</div>
</div>
</div>
</if>
<if condition="!in_array(THIS_SCRIPT, $exclude_scripts)">
<div class="tborder_big">
<div class="tborder_big_right">
</if>
<if condition="$GLOBALS['first_postbit'] = true"></if>
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>

<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" class="checkbox" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>

<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">

<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]
</div></if>
</div>



<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>&nbsp;
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
$post[iplogged]
$template_hook[postbit_userinfo_left]

</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->

$template_hook[postbit_messagearea_start]

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

$template_hook[postbit_signature_start]
$ad_location[ad_showthread_firstpost_sig]

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
<if condition="$GLOBALS['use_sig_overflow']">
<div class="overflow_parent">
<div class="overflow_child">
$post[signature]
</div>
</div>
<else />
$post[signature]
</if>
</div>
<!-- / sig -->
</if>

$template_hook[postbit_signature_end]

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont">
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
<em>
<if condition="$show['postedithistory']">
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]" 4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>
<else />
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>
</if>
<if condition="$post['edit_reason']">
$vbphrase[reason]: $post[edit_reason]
</if>
</em>
</div>
<!-- / edit note -->
</if>

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['spam']">
<img src="$stylevar[imgdir_misc]/spam_detected.png" alt="$vbphrase[spam_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<if condition="$show['managepost']">
<a href="postings.php?$session[sessionurl]do=managepost&amp;p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a>
<else />
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
$template_hook[postbit_controls]
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</td>
</tr>
</table>
<if condition="!in_array(THIS_SCRIPT, $exclude_scripts)">
</div>
</div>
<div class="tbottom">
<div class="tbottom_left"></div>
<div class="tbottom_right"></div>
</div>
</if>
$template_hook[postbit_end]

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
</if>
$template_hook[postbit_user_popup]
</table>
</div>
<!-- / post $post[postid] popup menu -->

Spank
06-12-2009, 10:48 PM
Ok, replace it with this one:


$template_hook[postbit_start]
<if condition="
/* Never show the tcat for these */
!in_array(THIS_SCRIPT, ($exclude_scripts = array('private'))) &&

/* Don't show the first one for these */
(!in_array(THIS_SCRIPT, array('announcement', 'showthread'))

/* Always show the tcat for these */
|| $GLOBALS['first_postbit'] == true || $GLOBALS['extra_thread_tcat'] || $show['threadedmode'] || $show['hybridmode'])">
<div class="tcat_top">
<div class="tcat_left"></div>

<div class="tcat_right">
<div class="tcat_right_inner">
</div>
</div>
$mgc_cb_evo_postbit
<div class="tcat_text">
<div class="tcat_text_inner">
<if condition="$post['title']">$post[title]<else />Re: $thread[title]</if>
</div>
</div>
</div>
</if>
<if condition="!in_array(THIS_SCRIPT, $exclude_scripts)">
<div class="tborder_big">
<div class="tborder_big_right">
</if>
<if condition="$GLOBALS['first_postbit'] = true"></if>
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>

<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" class="checkbox" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>

<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">

<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]</if></a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</div></if>
</div>



<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>&nbsp;
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
$post[iplogged]
$template_hook[postbit_userinfo_left]

</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->

$template_hook[postbit_messagearea_start]

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

$template_hook[postbit_signature_start]
$ad_location[ad_showthread_firstpost_sig]

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
<if condition="$GLOBALS['use_sig_overflow']">
<div class="overflow_parent">
<div class="overflow_child">
$post[signature]
</div>
</div>
<else />
$post[signature]
</if>
</div>
<!-- / sig -->
</if>

$template_hook[postbit_signature_end]

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont">
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
<em>
<if condition="$show['postedithistory']">
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]" 4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>
<else />
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>
</if>
<if condition="$post['edit_reason']">
$vbphrase[reason]: $post[edit_reason]
</if>
</em>
</div>
<!-- / edit note -->
</if>

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['spam']">
<img src="$stylevar[imgdir_misc]/spam_detected.png" alt="$vbphrase[spam_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<if condition="$show['managepost']">
<a href="postings.php?$session[sessionurl]do=managepost&amp;p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a>
<else />
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
$template_hook[postbit_controls]
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</td>
</tr>
</table>
<if condition="!in_array(THIS_SCRIPT, $exclude_scripts)">
</div>
</div>
<div class="tbottom">
<div class="tbottom_left"></div>
<div class="tbottom_right"></div>
</div>
</if>
$template_hook[postbit_end]

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
</if>
$template_hook[postbit_user_popup]
</table>
</div>
<!-- / post $post[postid] popup menu -->

There was an </a> and </if> the wrong way round.

tehone
06-12-2009, 11:59 PM
Didn't seem to work =/

tehone
06-13-2009, 12:36 AM
dw i fixed it thanks for help!

WorldDomination
06-23-2009, 04:26 PM
Member Profile one still doesnt work right? Any help?

philkillz
06-23-2009, 04:37 PM
teh, your a retard you can't even fix those things.

Hahah

farazfaraz
06-23-2009, 05:08 PM
don't work good!
why?!

revolink24
06-28-2009, 05:16 PM
teh, your a retard you can't even fix those things.

Hahah

don't work good!
why?!

Same.... So you can't help me? Also i noticed the user title code is underneath this maybe it is joining the code

How can these people afford vBulletin....???

Cfreyna
07-29-2009, 10:00 PM
It is not working for me. The images don't show up in the posts, but when I go to my profile I see the image. If I go to any other persons profile I see my username image as their username.

WorldDomination
07-31-2009, 06:08 AM
It is not working for me. The images don't show up in the posts, but when I go to my profile I see the image. If I go to any other persons profile I see my username image as their username.
Yeah this MOD does not work properly.

Skyrider
12-07-2009, 11:36 AM
Yup.. This plugin works great for within posts/threads.. But it doesn't work properly in membersinfo & whosonlinebit. It shows your chosen image on your account on every single username:

https://vborg.vbsupport.ru/

Possible someone can fix this or provide the code to fix this? Much appreciated. Using vbulletin 3.8.x

~Skyrider

kamakazy_kid
03-27-2010, 02:07 PM
Ok everyone, for those using 3.8.x using postbit Legacy

*******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['field6']"><img src="$post[field6]" border="0"/> <else />$post[musername]</if></a>
</div></if>
</div>

Skyrider
05-26-2010, 01:09 PM
Anyone that is able to convert it to vb4?

Taurus1
09-25-2010, 11:11 PM
Anyone that is able to convert it to vb4?

I'm with you on this. Really need it for vb4......O, please someone!

JohnT
11-18-2010, 01:27 AM
I followed all the installation instructions, however, there is a border around the username image, and the custom title size is increased. Can somebody help?

Skyrider
04-02-2011, 08:14 AM
Would someone be so kind to convert this to vB4 please? I really like feature.

Mark.B
04-27-2011, 10:23 PM
Well I don't personally use this mod but was asked if I'd look at converting the template code.

I can't say if this will work for converting the whole mod as I haven't looked at the zip files, but the template code would need to be this:

<div id="postmenu_{vb:raw post.postid}">
<vb:if condition="$show['profile']">
<a href="member.php?{vb:raw session.sessionurl}u={vb:raw post.userid}"><vb:if condition="$post['field6']">
<img src="{vb:raw post.field6}" border="0" /> <vb:else />{vb:raw post.musername}</vb:if></a>
</div></vb:if>
</div>

That's the straight conversion of the template code in the mod. At a guess, you would look for {vb:raw memberaction_dropdown}, delete that, and put the above code in there instead.

However, the issue you're going to have by doing that, is that, while the above will work, it will stop the default memberinfo dropdowns from appearing at all.

To sort that, the conversion needs to go into the memberaction_dropdown template, but that's going to be more complicated since that template is used in various places and uses different variables.

In short, it's a more complicated conversion than it looks due to the substantial changes in the way vB4 displays usernames in the postbit compared to vb3.

My solution for this would be the same as what I did for a similar mod that I do use...and that's the make a copy of the relevant code from the memberaction_dropdown template, add this mod to it, and stick it into the postbit template in place of {vb:raw memberaction_dropdown}.

I hope that makes sense, and I hope it points people in the right direction.

Skyrider
05-19-2011, 10:25 AM
Well I don't personally use this mod but was asked if I'd look at converting the template code.

I can't say if this will work for converting the whole mod as I haven't looked at the zip files, but the template code would need to be this:

<div id="postmenu_{vb:raw post.postid}">
<vb:if condition="$show['profile']">
<a href="member.php?{vb:raw session.sessionurl}u={vb:raw post.userid}"><vb:if condition="$post['field6']">
<img src="{vb:raw post.field6}" border="0" /> <vb:else />{vb:raw post.musername}</vb:if></a>
</div></vb:if>
</div>

That's the straight conversion of the template code in the mod. At a guess, you would look for {vb:raw memberaction_dropdown}, delete that, and put the above code in there instead.

However, the issue you're going to have by doing that, is that, while the above will work, it will stop the default memberinfo dropdowns from appearing at all.

To sort that, the conversion needs to go into the memberaction_dropdown template, but that's going to be more complicated since that template is used in various places and uses different variables.

In short, it's a more complicated conversion than it looks due to the substantial changes in the way vB4 displays usernames in the postbit compared to vb3.

My solution for this would be the same as what I did for a similar mod that I do use...and that's the make a copy of the relevant code from the memberaction_dropdown template, add this mod to it, and stick it into the postbit template in place of {vb:raw memberaction_dropdown}.

I hope that makes sense, and I hope it points people in the right direction.
Thanks, I replaced it with your code and I'm afraid it doesn't work:

I've attached a screenshot. As for the ZIP file, it only contains the changes:

Hi folks, if you're reading this you want to change the username to an image, well follow the simple steps below to do this.
Don't forget to mark as installed on the modification thread.

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['field11']"><img src="$post[field5]" width="120" height="30" /> <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.
WHERE YOU SEE width="120" height="30", change the values to the size you want to display.
---

############################################Furthe r 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]" width="120" height="30"/> <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]" width="120" height="30" /> <else />$userinfo[musername]</if>
################################################## ################################################## ################################################## ################
That's it!

^What's inside it.

boothole
06-13-2011, 03:24 PM
Great job, SPANK! I like it !! DL'ed - installed and voted for MOTM

Skyrider
06-14-2011, 11:07 AM
I guess no one is able to convert it to vb4 properly.

Skyrider
08-01-2011, 05:57 AM
Can someone please convert this to vB4?

Skyrider
08-04-2011, 08:43 AM
I'll be willing to pay 10usd for it :p

MegaManSec
10-24-2011, 04:42 AM
I'v made this mod work for vbulletin 4.1.5

Find "Postbit" in styles,

find:

<div class="username_container">
<vb:if condition="$post['userid']">
{vb:raw memberaction_dropdown}
{vb:raw post.onlinestatus}

And replace it with:

<div class="username_container">
<vb:if condition="$post['userid']">
<div id="postmenu_{vb:raw post.postid}">
<vb:if condition="$show['profile']">
<a href="member.php?{vb:raw session.sessionurl}u={vb:raw post.userid}">
<vb:if condition="$post['field5']">
<img src="{vb:raw post.field5}" border="0" /></a>
<vb:else />{vb:raw memberaction_dropdown}</a>
</vb:if></vb:if>
{vb:raw post.onlinestatus}
</div>

You'll have to add your own fields, you can do that by going to admincp->User Profile Fields->Add new | then replace field5 in the code with fieldNUMBER which you made the new field

if you have any questions, or need some help, add me on skype: theflash178

Thanks, Loaep :)

rbutterworth
05-12-2012, 02:00 AM
I'm hoping that some of the more experienced can help turn this into a full modification with usergroup controls, size limit controls, browse local files and upload controls, etc. If you are able to help out with this, please let me know

+1

This would solve a lot of complexity

Jerit2012
03-04-2013, 06:54 AM
is this work for 4.2?. Please