vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Show user ID# on profile (https://vborg.vbsupport.ru/showthread.php?t=287748)

My Hattiesburg 09-11-2012 05:25 PM

Show user ID# on profile
 
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
Code:

<if condition="$show['edit_profile']">
                                                <li class="thead"><a href="moderator.php?$session[sessionurl]do=useroptions&amp;u=$userinfo[userid]">$vbphrase[edit_user_profile]</a></li>
                                        </if>

Below that, add;
Code:

<li class="thead">$prepared[username]'s UserID: $prepared[userid]</li>
So it should now say;

Code:

<if condition="$show['edit_profile']">
                                                <li class="thead"><a href="moderator.php?$session[sessionurl]do=useroptions&amp;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.

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:

Code:

<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:
Code:

<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!


All times are GMT. The time now is 02:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00988 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete