View Full Version : Show user ID# on profile
My Hattiesburg
09-11-2012, 05:25 PM
Any way to show the user's ID# on their profile page? Viewable only by admins, of course.
Eosian
09-11-2012, 06:16 PM
The User ID is publicly visible in multiple places in your forum. In particular it's already visible in the URL of the member profile and any place you hover over a username.
Example:
https://vborg.vbsupport.ru/member.php?u=480258
There's your userid, right there in the URL of your profile.
If you click on your username in your post you can also see your userid in every one of the drop down options, because it's a parameter of nearly anything that involves you. Your user ID is neither secret, nor hard to obtain.
What exactly are you trying to accomplish that you don't already have?
My Hattiesburg
09-12-2012, 04:07 PM
Dang, that's one of those things that "if it had been a snake it would have bit me".
CoffeeLovesYou
09-14-2012, 02:34 PM
If you really want to do this (regardless of what Eosian said)
Go into your MEMBERINFO template
Find $vbphrase[edit_user_profile]
You should see
<if condition="$show['edit_profile']">
<li class="thead"><a href="moderator.php?$session[sessionurl]do=useroptions&u=$userinfo[userid]">$vbphrase[edit_user_profile]</a></li>
</if>
Below that, add;
<li class="thead">$prepared[username]'s UserID: $prepared[userid]</li>
So it should now say;
<if condition="$show['edit_profile']">
<li class="thead"><a href="moderator.php?$session[sessionurl]do=useroptions&u=$userinfo[userid]">$vbphrase[edit_user_profile]</a></li>
</if>
<li class="thead">$prepared[username]'s UserID: $prepared[userid]</li>
If you want it to just say UserID: # instead of My Hattiesburg's UserID: #, use this code.
<li class="thead">UserID: $prepared[userid]</li>
Enjoy.
(note: that's for VB3.8, not sure about the latest version, if you're using vB4, but it might still work)
qpurser
09-17-2012, 05:46 AM
As the userID is not a real secret I added this info to my postbit_legacy template and used this expression. Code is for vB4:
<div class="bppostbit">UserID: {vb:raw post.userid}</div>
Gholsie
03-09-2013, 03:47 PM
hey guys, I just visited this thread and made some adjustments to make this work for vb4.2.0 pl 3 today. Here's how to add member numbers to your member profile.
Edit MEMBERINFO template.
Find "edit_user_profile"
Below that, find "userinfo"
Add this to the list:
<br>Member #CZCC-{vb:raw prepared.userid}
In my case, I am adding "Member #CZCC-" to the description before the number shows. So, my users will ultimately see this:
Member #CZCC-235234
Hope this helps someone else. Thanks for the other tips!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.