Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Printable List of Usernames with UserIDs Details »»
Printable List of Usernames with UserIDs
Version: 1.00, by Sven Sven is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-08-2002 Last Update: Never Installs: 3
 
No support by the author.

Not a "real" Hack, more a kind of code modification.

As I'm in the process of importing a large UBB Board (1200+ Members) into a large vBulletin Board (800+ Members) with a lot of double users I needed a script that would help me to identify the Usernames and IDs of the existing vBulletin Users.
There is an option to display this list built in the bbimport.php but it will present a form and you have to scroll alot to identify a userID from a given username.
What I wanted is a printable version and here is what I coded:
PHP Code:
<?php
error_reporting
(7);
chdir ("./../admin");
include (
"./../admin/global.php");
    echo 
"<b>$bbtitle Members:</b>";
    
$vbusers $DB_site->query("SELECT userid,username,importuserid FROM user ORDER BY username");
    echo 
"<table border=1><tr><td><b>Username</b></td><td><b>UserID</b></td></tr>";
    while (
$vbuser $DB_site->fetch_array($vbusers)) {
        echo 
"<tr><td><font size=2>$vbuser[username]</font></td><td><font size=2>$vbuser[userid]</font></td></tr>";
    }
    echo 
"</table>";
?>
Eventually this may help some of you if you're facing a situation as I'm currently doing

Place attached file into the vBulletin/admin directory

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-09-2002, 08:18 PM
Robert9 Robert9 is offline
 
Join Date: Oct 2001
Location: super
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it doesn't work on my vbb

he reported an mysql error!

can you help me?

Quote:
Database error in vBulletin Control Panel 2.2.0:

Invalid SQL: SELECT userid,username,importuserid FROM user ORDER BY username
mysql error: Unknown column 'importuserid' in 'field list'

mysql error number: 1054

Date: Sunday 10th of March 2002 12:20:32 AM
Script: http://www.*********.***/admin/listuser.php
Referer:
Reply With Quote
  #3  
Old 03-10-2002, 01:05 AM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is because that column doesn't exist in the database. Try this



PHP Code:
<?php
error_reporting
(7);
chdir ("./../admin");
include (
"./../admin/global.php");
    echo 
"<b>$bbtitle Members:</b>";
    
$vbusers $DB_site->query("SELECT userid,username FROM user ORDER BY username");
    echo 
"<table border=1><tr><td><b>Username</b></td><td><b>UserID</b></td></tr>";
    while (
$vbuser $DB_site->fetch_array($vbusers)) {
        echo 
"<tr><td><font size=2>$vbuser[username]</font></td><td><font size=2>$vbuser[userid]</font></td></tr>";
    }
    echo 
"</table>";
?>
$vbuser[importeduserid] is not even used so the above works exactly the same.
Reply With Quote
  #4  
Old 03-10-2002, 04:57 AM
Robert9 Robert9 is offline
 
Join Date: Oct 2001
Location: super
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it works, THANKX!
Reply With Quote
  #5  
Old 03-10-2002, 05:10 AM
Robert9 Robert9 is offline
 
Join Date: Oct 2001
Location: super
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and is it possible to make another row with the usertitle?

i think for admins it is much beter, because usernmae and id doesen't say so much to an admin with a big board!
Reply With Quote
  #6  
Old 03-11-2002, 09:26 AM
SaintDog SaintDog is offline
 
Join Date: Nov 2001
Location: Tennessee
Posts: 1,975
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EDIT:

Nevermind, I got it to display and order by IP address. This will help me out greatly. Thanks for the hack, I just added onto it to suit my needs.

Thanks again,

Saintdog
Reply With Quote
  #7  
Old 03-30-2003, 10:59 AM
AllMadden.net AllMadden.net is offline
 
Join Date: Mar 2003
Location: New York
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um...which php does the code go into? Or do we just upload the attached php file and run that?
Reply With Quote
  #8  
Old 03-30-2003, 11:07 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-11-02 at 05:26 AM SaintDog said this in Post #6
EDIT:

Nevermind, I got it to display and order by IP address. This will help me out greatly. Thanks for the hack, I just added onto it to suit my needs.

Thanks again,

Saintdog
Could you let us in on what you changed it to? might be good to have.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05259 seconds
  • Memory Usage 2,281KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete