vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Search user by userid in AdminCP (https://vborg.vbsupport.ru/showthread.php?t=66623)

mtha 06-27-2004 10:00 PM

Search user by userid in AdminCP
 
=============================================
Search user by userid in AdminCP
=============================================

Support Vbulletin version: 3.0.1

Features:
This tiny hack allows you to search user by userid in AdminCP, when using "Search for Users"
/forum/admincp/user.php?do=modify
It will only find the exact userid input

File to edit: 1
includes/adminfunctions_user.php

Difficulty: Very easy

=============================================
Screenshot: attached

Installation: attached

https://vborg.vbsupport.ru/

???`S?LV?R???` 06-28-2004 10:05 AM

nice :)

MindTrix 06-28-2004 10:08 AM

Nice little add on, cheers

Lily 06-28-2004 01:27 PM

Worked like a charm! Thank you so much! :up:

SaN-DeeP 06-28-2004 01:45 PM

nice one :)

hope, all this nifty things can be added to newer versions too :)
improves the admincp

mtha 06-28-2004 06:11 PM

just tired of using /member.php?u=uid and my friend just as how to find out who someone is if we only know by id :D

it should be there as a default :D

all-the-vb 06-28-2004 08:07 PM

nice hack
All-the-vb clicks install ;)

glenvw 07-13-2004 04:41 PM

I have never undes=rstood why this is not a standard feature.

marcel-ea 07-14-2004 11:35 PM

add this to admincp/index.php

PHP Code:

  construct_nav_option('</a></div><center><form action="user_s_id.php" method="post" style="display:inline">
  <input type="hidden" name="s" value="' 
$session['sessionhash'] . '" />
  <input type="hidden" name="do" value="find" />
  <input type="text" class="bginput" name="userid_s" size="15" tabindex="1" />
  <input type="submit" value=" ' 
$vbphrase['find'] . ' " class="button" tabindex="1" />
  </form></center><a href="">'
,'','<br />');
  
construct_nav_group("Search for UserID"'<br />'); 


this needs only one click and its look nice :)
Don?t worry code is english

mtha 07-15-2004 03:52 AM

Quote:

Originally Posted by marcel-ea
add this to admincp/index.php

PHP Code:

  construct_nav_option('</a></div><center><form action="user_s_id.php" method="post" style="display:inline">
  <input type="hidden" name="s" value="' 
$session['sessionhash'] . '" />
  <input type="hidden" name="do" value="find" />
  <input type="text" class="bginput" name="userid_s" size="15" tabindex="1" />
  <input type="submit" value=" ' 
$vbphrase['find'] . ' " class="button" tabindex="1" />
  </form></center><a href="">'
,'','<br />');
  
construct_nav_group("Search for UserID"'<br />'); 


this needs only one click and its look nice :)
Don?t worry code is english

- There's NO default file called user_s_id.php
- I myself prefer not to add the member searching to menu. However, you can make modifications to suit your need.

marcel-ea 07-15-2004 05:57 PM

sorry safe this as user_s_id.php in you admincp folder

Quote:

<?php

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('CVS_REVISION', '$RCSfile: user.php,v $ - $Revision: 1.236 $');
define('NO_REGISTER_GLOBALS', 1);
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('cpuser', 'forum', 'timezone', 'user');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
require_once('./includes/adminfunctions_profilefield.php');
require_once('./includes/adminfunctions_user.php');
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminusers'))
{
print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
log_admin_action(iif($_REQUEST['userid'] != 0, 'user id = ' . $_REQUEST['userid']));
// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
print_cp_header("Suchen nach UserID");
$user_res = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user AS user WHERE userid='$_REQUEST[userid_s]' ORDER by userid DESC");

while($user_row = $DB_site->fetch_array($user_res)){
echo "
<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"90%\" class=\"tborder\">
<tr>
<td class=\"alt1\" colspan=\"2\"><div class=\"smallfont\"><div style=\"float: right;\"><a href=\"user.php?do=edit&userid=$user_row[userid]\">Bearbeiten</a></div></div><div class=\"normalfont\"><b
>$user_row[username]</b></div></td>
</tr>
</table>
<br />";
}
print_cp_footer();

?>

sv1cec 09-09-2004 05:55 PM

Is the txt file OK? I download it tonight and it cannot be opened by my editor.

I used Notepad and it has some text in there, but I can't read it properly.

Rgds

-----
John

CANCEL THAT, I FIGURE IT OUT.

Megareus Rex 09-10-2004 10:02 AM

this.is.a.godsend :)

*hurriedly installs, but messes up the php code and crashes his forum :p*

mtha 09-11-2004 06:02 PM

Quote:

Originally Posted by Megareus Rex
this.is.a.godsend :)

*hurriedly installs, but messes up the php code and crashes his forum :p*

this is not a complicated hack, and it should not do any harm to your forum, except for the includes/adminfunctions_user.php when you change user's profile from AdminCP.


Hope you sort things out :)

sv1cec 10-05-2004 08:38 AM

Quote:

Originally Posted by mtha
this is not a complicated hack, and it should not do any harm to your forum, except for the includes/adminfunctions_user.php when you change user's profile from AdminCP.


Hope you sort things out :)

OK, if you want to add this same functionality, in the first page of your AdminCP (where you are normally given the option to search by the user name in the Quick User Finder), do the followings:

Open file admincp/index.php, and find:

PHP Code:

    print_label_row($vbphrase['quick_user_finder'], 

Right above it, add:

PHP Code:

print_label_row($vbphrase['userid'], '
        <form action="user.php" method="post" style="display:inline">
        <input type="hidden" name="s" value="' 
$session['sessionhash'] . '" />
        <input type="hidden" name="do" value="find" />
        <input type="text" class="bginput" name="user[userid]" tabindex="1" size="30" />
        <input type="submit" value="' 
$vbphrase['find'] . '" class="button" tabindex="1" />
        </form>
        '
'''top''user[userid]'); 

Just a small mod, to make our lives easier.

Rgds
-------------
John

mtha 10-06-2004 05:29 AM

Quote:

Originally Posted by sv1cec
OK, if you want to add this same functionality, in the first page of your AdminCP (where you are normally given the option to search by the user name in the Quick User Finder) ...

Just a small mod, to make our lives easier.

Rgds
-------------
John

Nice, I like this spot :) thanks


All times are GMT. The time now is 03:07 AM.

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.01129 seconds
  • Memory Usage 1,774KB
  • 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
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)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