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
  #32  
Old 03-03-2002, 11:30 AM
JonC JonC is offline
 
Join Date: Nov 2001
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does This work on 2.2.2 ?
Reply With Quote
  #33  
Old 03-21-2002, 11:58 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this work for 2.2.4?
Reply With Quote
  #34  
Old 04-23-2002, 11:35 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works great in 2.2.5. and was just what I was looking for.

With just a few minor alterations and another previously added hack that gave mods the ability to edit access masks, this also works for mods.

Kudos and many thanks go out to Firefly and PPN.
Reply With Quote
  #35  
Old 05-12-2002, 01:27 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

install it in 225. working good.
Reply With Quote
  #36  
Old 05-16-2002, 10:58 PM
ohgenki ohgenki is offline
 
Join Date: Apr 2002
Location: Singapore
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dear FireFly or rest,

Sorry to ask this question, how come my registered members still can access to the forum topic that i do not want them to access? I already try a lot of unchecked in the CP and double check the script. Kindly advise me.

Thank you.
Reply With Quote
  #37  
Old 06-05-2002, 11:38 PM
Twig Deez's Avatar
Twig Deez Twig Deez is offline
 
Join Date: Nov 2001
Location: Aotearoa
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep, works good for me, too.
Reply With Quote
  #38  
Old 09-14-2002, 10:58 AM
Gutty Gutty is offline
 
Join Date: Jul 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what about 2.2.7????
Reply With Quote
  #39  
Old 09-20-2002, 04:44 PM
bouncer18 bouncer18 is offline
 
Join Date: Mar 2002
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good to go on 2.2.7
Reply With Quote
  #40  
Old 10-22-2002, 01:41 PM
Legacy's Avatar
Legacy Legacy is offline
 
Join Date: Apr 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works on 2.2.8
Reply With Quote
  #41  
Old 12-05-2002, 01:39 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm....it won't work on 2.2.8 for me
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 08:47 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.10275 seconds
  • Memory Usage 2,334KB
  • 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
  • (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
  • (11)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