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)

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 07:18 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.01182 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete