Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-16-2001 Last Update: Never Installs: 78
 
No support by the author.

This was requested by David Copeland.
He wanted to be able to list all users that have or don't have access to a certain forum.
This is very very easy to install, you just need to add one block of code and a link!

Demo:
http://www.vbulletin.com/forum/attac...&postid=172632

Install:
In user.php (admin folder), add this code:
PHP Code:
  echo "<li><a href=\"user.php?s=$session[sessionhash]&action=findaccess\">List by access masks</a></li>\n"
right after
PHP Code:
  echo "<li><a href=\"user.php?s=$session[sessionhash]&action=find\">List all users</a></li>\n"
Still in user.php, add this code:
PHP Code:
// ###################### Start Find by Access #######################
if ($action=="dofindaccess") {

  if (
$checkaccess!="1" and $checkaccess!="0") {
    
$action "findaccess";
  } else {
    
$lists $DB_site->query("SELECT * FROM access");
    
$inquery "";

    while (
$list $DB_site->fetch_array($lists)) {
      if (
$list[forumid]==$forumfrom and $list[accessmask]==$checkaccess) {
        if (
$inquery) {
          
$inquery .= ",";
        }
        
$inquery .= "$list[userid]";
      }
    }

    if (
$inquery=="") {
      echo 
"No users found.";
      
$action "findaccess";
    } else {
      
$users $DB_site->query("SELECT userid,username,usergroupid,password,email,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,posts FROM user WHERE userid IN ($inquery)");

      echo 
"<p>Click username to view forum profile.</p>";
      
doformheader("","");

      echo 
"<tr class='tblhead'>";

      echo 
"<td><p><b><span class='tblhead'>Name</span></b></p></td>";
      echo 
"<td><p><b><span class='tblhead'>Options</span></b></p></td>";
      echo 
"<td><p><b><span class='tblhead'>Email</span></b></p></td>";
      echo 
"<td><p><b><span class='tblhead'>Password</span></b></p></td>";
      echo 
"<td><p><b><span class='tblhead'>Join Date</span></b></p></td>";
      echo 
"<td><p><b><span class='tblhead'>Last Visit</span></b></p></td>";
      echo 
"<td><p><b><span class='tblhead'>Posts</span></b></p></td>";

      echo 
"</tr>\n";

      while (
$user=$DB_site->fetch_array($users)) {

        echo 
"<tr class='".getrowbg()."'>";

        echo 
"<td><p><a href='../member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]' target='_blank'>$user[username]</a>&nbsp;</p></td>";
        echo 
"<td><p>".
              
makelinkcode("edit","user.php?s=$session[sessionhash]&action=edit&userid=$user[userid]").
              
makelinkcode("email password","user.php?s=$session[sessionhash]&action=emailpassword&email=$user[email]").
              
makelinkcode("remove","user.php?s=$session[sessionhash]&action=remove&userid=$user[userid]").
              
makelinkcode("edit access masks","user.php?s=$session[sessionhash]&action=editaccess&userid=$user[userid]").
              
"</p></td>";
        echo 
"<td><p><a href='mailto:$user[email]'>$user[email]</a>&nbsp;</p></td>";
        echo 
"<td><p>$user[password]&nbsp;</p></td>";
        echo 
"<td><p>$user[joindate]</p></td>";
        echo 
"<td><p>$user[lastvisit]</p></td>";
        echo 
"<td><p>$user[posts]</p></td>";

        echo 
"</tr>\n";

      }
      echo 
"</table></td></tr></table></form>";
    }
  }

}

// ###################### Start List by Access #######################

if ($action=="findaccess") {

  
doformheader("user","dofindaccess");

  
maketableheader("List Users by Access Masks","",0);
  echo 
"<tr class='firstalt'><td colspan=2><p>Here you can list all users that match the settings you set below.</p></td></tr>\n";

  
maketableheader("Forum Select");

  
makeforumchoosercode("Forum you'd like to order by:",forumfrom);
  
makeyesnocode("Does the user has access to that forum?",checkaccess,"2");
  echo 
"</p></td></tr>\n";

  
doformfooter("List users");

right before
PHP Code:
cpfooter();
?> 
The end.
See, I told you it's easy!
Now you have a link for this under Users => Find => List by access masks (under List all users).

By the way, I know that one part of the code there could be combined with the other search part, but this is just as good.
Sue me.
Feedback please.

Show Your Support

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

Comments
  #12  
Old 09-17-2001, 12:11 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In case others also didn't get it, this doesn't search by usergroups and permissions.
*sound of disappointment*
It searches for users that were given special access to this forum or another.
Just go here http://www.forums.com/admin/user.php...ccess&userid=1 and see what I mean.
Reply With Quote
  #13  
Old 09-17-2001, 12:18 PM
orca's Avatar
orca orca is offline
 
Join Date: Oct 2001
Location: Switzerland
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I got it now. I can be so stupid sometimes . Right now, I didn't realize that you meant the custom URL with http://www.forums.com/....
Reply With Quote
  #14  
Old 09-17-2001, 03:21 PM
[VbbFr]Elie
Guest
 
Posts: n/a
Default

Yes May be some can need to use it but it's really for specific search
Reply With Quote
  #15  
Old 12-09-2001, 09:11 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack it would come in handy. does this work for 2.2.1?

thanks
Reply With Quote
  #16  
Old 12-10-2001, 12:48 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sweet... I am gonna install this now.
Reply With Quote
  #17  
Old 12-10-2001, 01:08 AM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Reeve of shinra
sweet... I am gonna install this now.

i am not sure this hack works for 2.2.1
Reply With Quote
  #18  
Old 12-10-2001, 03:27 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thats okay we didnt upgrade yet -- were waiting for ver 3.
(that means hurry up lol).
Reply With Quote
  #19  
Old 01-03-2002, 07:20 PM
igowoofwoof igowoofwoof is offline
 
Join Date: Dec 2001
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you cannot apply this crack with version 2.2.1. Can you please make an update for this, thank you
Reply With Quote
  #20  
Old 01-04-2002, 09:05 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
In case others also didn't get it, this doesn't search by usergroups and permissions.
*sound of disappointment*
It searches for users that were given special access to this forum or another.
Just go here http://www.forums.com/admin/user.php...ccess&userid=1 and see what I mean.
Hi FireFly. First of all, thanks for this great hack (not crack!!!), which works perfectly on 2.2.1.... I installed it a long ago, and I asked about even a long ago...

Hwr. I'm keepin'it up 'cause I need some enhancement:

I know (guess...) it would be VERY VERY difficult to check all the concurrent permissions at usergroup lever along with the access table ones, but I was thinking about....

Well, how do you figure out a select (with UNION, I think) to search for all the groups (and the users within, of course...);
I mean search the chosen forum in forumpermission, find out the usergroupid, then all the users...
It should be simple enough, less - at least to me - the UNION SELECT clause removing dupes... ...

Could you investigate and give me (us) any tip to follow this path ?

Main problem lasting I think should be the forum categories: inheritance - even in your hack - is not checked... Infact, if I choose a forum category and in the access table I haven't that forumid, my search is empty! ....

Please, read and answer...

Thanks very very much.

Bye
Reply With Quote
  #21  
Old 01-05-2002, 06:55 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll see what I can come up with Jawelin, but I can't promise anything.
Reply With Quote
Reply

Thread Tools

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 03:09 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.04658 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
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
  • (4)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
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete