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 (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-07-2001 Last Update: Never Installs: 2
 
No support by the author.

Hello,
This hack will display members that have 0 posts, or are inactive, or are active in the memberlist.
(members that are longer than one month registered, and haven't been posted for a month will be displayed)

Tested on php 4.0.4pl1 and vB 2.0.1
I am still trying to make a hack to display the top 10 thread starters, if somebody can make this, please reply.

01. memberlist.php

Find,
PHP Code:
  if ($what=="datejoined") {
    
$orderby="joindate";
    
$direction="DESC";
  } 
Under it add,
PHP Code:
// memberlist hack v1.0 by demolition, aka addict
  
if ($what=="0-posters") {
    
$condition.=" AND posts<'1'";
    
$orderby="";
    
$direction="";
  }
  if (
$what=="active") {
    
$condition.=" AND posts>'0'";
    
$orderby="posts";
    
$direction="DESC";
  }
  if (
$what=="inactive") {
    
$lastmonth mktime (0,0,0,date("m")-1,date("d"),date("Y"));
    
$lastmonth2 date("Y-m-d"$lastmonth);
    
$condition.=" AND joindate<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."') AND lastpost<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."')";
    
$orderby="posts";
    
$direction="DESC";
  }
// end memberlist hack v1.0 by demolition, aka addict 
02. open index.php

Find,
PHP Code:
$numbermembers=$numbersmembers['users']; 
Under it add,
PHP Code:
// memberlist hack v1.0 by demolition, aka addict
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
$nonposters=$snonposters['users'];
$activemembers=$numbermembers-$nonposters;

$lastmonth mktime (0,0,0,date("m")-1,date("d"),date("Y"));
$lastmonth2 date("Y-m-d"$lastmonth);
$sinactive=$DB_site->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE joindate<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."') AND lastpost<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."')");
$inactive=$sinactive['users'];
// end memberlist hack v1.0 by demolition, aka addict 
03. open your forumhome template, and place this code somewhere.
Code:
<A HREF="memberlist.php?s=$session[sessionhash]&what=0-posters">$nonposters 0-posters</A> | 
<A HREF="memberlist.php?s=$session[sessionhash]&what=active">$activemembers active members</A> | 
<A HREF="memberlist.php?s=$session[sessionhash]&what=inactive">$inactive non-active members</A>
04. done

Show Your Support

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

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

[QUOTE]Originally posted by ShadowTech
One small bug I noticed ... the Active users also counts the Non-Active in the total number.

I dunno if it is just me.. so someone else who installed this .. add up the 3 numbers (0-posters, Active + Non active) and see if it's the same as your total registered members.

I tried changing the
PHP Code:
$activemembers=$numbermembers-$nonposters
to
PHP Code:
$activemembers=$numbermembers-$nonposters-$inactive

or

$activemembers=$numbermembers-($nonposters+$inactive); 
but it still didn't give me the right number for Active - inactive. All the original code is doing i removing the 0-posters from the total registered to get active.. so if a board has a lot of inactive members that have at least posted one.. you'll get some numbers that add up to a lot higher than total registered.

Again.. it's just a small bug.. but would be great to see a fix.
Reply With Quote
  #13  
Old 08-18-2001, 08:50 PM
Clueless
Guest
 
Posts: n/a
Default

How do you reset this hack for a new month ??

I mean i've just been setting the board up and installed this hack and it shows 9 of my members as 0-posters ??? which i need to reset it to so 0 0-posters ???????
Reply With Quote
  #14  
Old 10-11-2001, 05:48 PM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly

I'm having the same problem.
Yea.
I'm having the problem with the active + inactive != total
Reply With Quote
  #15  
Old 10-11-2001, 06:03 PM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i changed the calculation to this:

PHP Code:
$activemembers=$numbermembers-$inactive
and it seems to work, that is, inactive+active=total
Reply With Quote
  #16  
Old 10-14-2001, 07:41 PM
DarkManX_19
Guest
 
Posts: n/a
Default

would it be possible to add the number of users that have been banned or restricted???
Reply With Quote
  #17  
Old 07-22-2002, 09:18 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

erm well its not working right because some of the inactive members are in the active members screen aswell someone help
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 11:42 PM.


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.04788 seconds
  • Memory Usage 2,280KB
  • Queries Executed 21 (?)
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
  • (1)bbcode_code
  • (7)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
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (4)postbit_onlinestatus
  • (7)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete