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
  #2  
Old 07-08-2001, 09:29 PM
AS_Eagle_1 AS_Eagle_1 is offline
 
Join Date: Nov 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Hack,
If u wanna see it visit our Board
(its on f2s till our webserver is rdy for php4)
i've translate it in german but u can see it working.

but there ist a small error in your code:

Quote:
<A HREF="memberlist.php?s=$session[sessionhash]&what=lamers">$nonposters 0-posters</A> |
it must be:

Quote:
<A HREF="memberlist.php?s=$session[sessionhash]&what=0-posters">$nonposters 0-posters</A> |
sorry for my bad english

greets
AS_Eagle_1
(Sascha)
Reply With Quote
  #3  
Old 07-08-2001, 10:08 PM
DEMOLiTiON
Guest
 
Posts: n/a
Default

lol, forgot that sorry

btw, how did you do that clan listing in your memberlist?
Reply With Quote
  #4  
Old 07-08-2001, 10:37 PM
AS_Eagle_1 AS_Eagle_1 is offline
 
Join Date: Nov 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this clan listing is verry simple.
i've greated a user profile field and make it as a necesarry field.
then i've added a new colume in the memberlist template and added in the memberlistbit
Quote:
<td bgcolor="#DFDFDF" align="center"><normalfont>$userinfo[field5]</normalfont></td>
[field5] must be replace with the id of the userfield.

if u wanna show the content of this field in the posts under the usrs name like location read this thread:
http://www.vbulletin.com/forum/showt...ld+%24userinfo
Reply With Quote
  #5  
Old 07-08-2001, 10:44 PM
DEMOLiTiON
Guest
 
Posts: n/a
Default

cool thnx
Reply With Quote
  #6  
Old 07-20-2001, 01:40 AM
Kengan's Avatar
Kengan Kengan is offline
 
Join Date: Nov 2001
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

COOL HACK !!
Reply With Quote
  #7  
Old 07-20-2001, 04:17 AM
stefanh3 stefanh3 is offline
 
Join Date: Oct 2001
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe you'de like to combine it with my activity rate hack posted some time ago:
http://www.vbulletin.com/forum/showt...threadid=19227
Reply With Quote
  #8  
Old 07-20-2001, 04:59 AM
Ajnabi Ajnabi is offline
 
Join Date: Nov 2001
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this could be a nice hack to add to my board..

thx
Reply With Quote
  #9  
Old 07-23-2001, 12:52 AM
ShadowTech ShadowTech is offline
 
Join Date: Feb 2002
Location: Ohio, USA
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #10  
Old 07-27-2001, 12:08 PM
Sinclair Sinclair is offline
 
Join Date: Oct 2001
Location: Germany: Berlin
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I?ve modified this hack, now it shows users with one post.

01. memberlist.php

find
PHP Code:

  
if ($what=="0-posters") {
    
$condition.=" AND posts<'1'";
    
$orderby="";
    
$direction="";
  } 
under it add

PHP Code:
  if ($what=="oneposters") {
    
$condition.=" AND posts<'2' AND posts>'0'";
    
$orderby="";
    
$direction="";
  } 
02. index.php

find

PHP Code:
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
$nonposters=$snonposters['users'];
$activemembers=$numbermembers-$nonposters
under it add:

PHP Code:
$soneposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) FROM user WHERE posts=1');
$oneposters=$soneposters['users']; 
03. forumhome template

find:
Quote:
<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>
under it add:

Quote:
<A HREF="memberlist.php?s=$session[sessionhash]&what=oneposters">$oneposters Users with one post</A>
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 02:39 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.04444 seconds
  • Memory Usage 2,327KB
  • Queries Executed 23 (?)
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
  • (10)bbcode_php
  • (5)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (7)postbit_onlinestatus
  • (10)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