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
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
  #42  
Old 12-24-2002, 04:52 AM
BlackDeath BlackDeath is offline
 
Join Date: Dec 2002
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks. this works for 2.28 great.
Reply With Quote
  #43  
Old 01-04-2003, 06:10 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if this thread is still active - but Thanks Firefly! It works on v2.2.8.

Is there a way to have it list all users that have access to a specific forum - not just those that are set specifically for that forum. For instance, members in my "Board" group have access to the "board" forum, but they only show up in the "List by Access" if I manually clicked "yes" in their permissions.

Is there a way to list all?

LadyFyre - What sort of errors are you having?
Reply With Quote
  #44  
Old 01-10-2003, 02:08 AM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*blush*

Bump

Anyone? :$ It'd be really handy for me. Unless someone has a hack that adds "usergroups" that has leaders to add their own members (much like vB3's usergroups/forum permissions) type.

:$ Anyone?
Reply With Quote
  #45  
Old 01-10-2003, 10:33 AM
LeeCHeSSS's Avatar
LeeCHeSSS LeeCHeSSS is offline
 
Join Date: Dec 2001
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Jawelin
Just a tip:
what about
1) choose a forum from a combo-list (best ordered the same way in jump-combo is, not alphabetically), fixing a parameter, this way.
Even though this is a pretty old hack, can someone try and point me out how to change the dropdown list as suggested above?
Reply With Quote
  #46  
Old 02-16-2003, 08:06 PM
ego ego is offline
 
Join Date: Jan 2003
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is also interested to me!
Reply With Quote
  #47  
Old 05-13-2003, 01:29 PM
Kohhal's Avatar
Kohhal Kohhal is offline
 
Join Date: Feb 2002
Location: Dublin, Ireland
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, I've been looking for this
(Installed on 2.2.9)
Reply With Quote
  #48  
Old 11-07-2003, 04:50 AM
HP409ss HP409ss is offline
 
Join Date: Mar 2002
Location: SF Bay Area
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Hack! Helped me out allot!!!!
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 09:38 AM.


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.06485 seconds
  • Memory Usage 2,314KB
  • Queries Executed 22 (?)
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)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
  • (2)pagenav_pagelink
  • (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_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