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

Reply
 
Thread Tools
User Forum Activeness Hack v1.0 Details »»
User Forum Activeness Hack v1.0
Version: 1.00, by g-force2k2 g-force2k2 is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-02-2002 Last Update: Never Installs: 65
 
No support by the author.

Yet another hack by g-force2k2 (yeah i know aren't we all gettign sick of it by now )

Edit: Download the latest attachment [ Here ]

Thanks bunches to Neo for the fix

well this one wasn't requested but i myself was trying to plain around with mysql and all and i came up with a new hack

What does this hack do?
// +++++++++++++++++++++
Simply shows what forum the user is most active in and the percentage of his posts in that forum compared to overall

What to do?
// +++++++++++++++++++++
File Modifications (2)
Template Modifications (1)
Templates to Add (1)

It's a fairly easy hack to install maybe 1-2 minutes max but i like how it looks shows on the getinfo template when viewing another member's profile... simple yet wicked

Instructions in the .php file attached below just open in a text editor

Notice i didn't include this on the postbit template because it would up the query count by a fair amount so i figured the getinfo would be suffice... If you like this hack i'd be greatful if you clicked install... regards and enjoy

g-force2k2

Show Your Support

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

Comments
  #42  
Old 09-04-2002, 10:02 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working properly not showing in Getinfo template
Reply With Quote
  #43  
Old 09-04-2002, 10:03 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i mean it is now showing anything to do with activity in the getinfo template below Posts
Reply With Quote
  #44  
Old 09-18-2002, 08:13 AM
PsYc PsYc is offline
 
Join Date: Mar 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i found an error according to your hack

if a member has 0 Posts, but he or she posts in a forum which doesn't count any posts you get a division by zero

Warning: Division by zero in /is/htdocs/62144/www.yourdomain.com/board/vb/member.php on line 1620

on that line i got this:

$f_posts = floor(($t_post[ppforum] / $userinfo[posts]) * 100);

but i think it has to do with the full code in there

hope you'll find a clue for this
Reply With Quote
  #45  
Old 09-18-2002, 01:12 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wolfe make sure you have the $forumactive variable in the getinfo template...

PsYc open the getinfo template find:

PHP Code:
    $f_posts floor(($t_post[ppforum] / $userinfo[posts]) * 100); 
replace it with:

PHP Code:
    if($t_posts[ppforum] > 0) {
             
$f_posts floor(($t_post[ppforum] / $userinfo[posts]) * 100);
            } else {
               
$f_posts 0;
            } 
that should do the trick... regards...

g-force2k2
Reply With Quote
  #46  
Old 09-18-2002, 01:15 PM
dong dong is offline
 
Join Date: May 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack

maybe it would be nice if it would also calculate most active forum of thread starts of a user
Reply With Quote
  #47  
Old 09-18-2002, 01:27 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dong haven't tested it yet... but give it a shot regards...

g-force2k2
Reply With Quote
  #48  
Old 09-18-2002, 01:45 PM
dong dong is offline
 
Join Date: May 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice

but some typo ORDER BY ppforum should be ORDER BY tforum


and the procentage stays on 0
cos (($t_thread[tforum] / $userinfo[posts]) * 100) is not right i think
maybe (($t_thread[tforum] / $userinfo[threads]) * 100) is better
Reply With Quote
  #49  
Old 09-18-2002, 01:53 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh yea whoops

the first change is correct.. but you have to add in this query too

PHP Code:
$threads $DB_site->query_first("
  SELECT COUNT(threadid) AS total
  FROM thread
  WHERE postuserid='
$bbuserinfo[userid]'");
$userinfo[threads] = $threads[total]; 
regards just add this query above the others...

g-force2k2
Reply With Quote
  #50  
Old 09-18-2002, 02:06 PM
dong dong is offline
 
Join Date: May 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

jup
and this line:
PHP Code:
if(!$t_post[tforum]) { 
should be:
PHP Code:
if(!$t_thread[tforum]) { 
nice addon
thx
Reply With Quote
  #51  
Old 09-18-2002, 03:10 PM
dong dong is offline
 
Join Date: May 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by g-force2k2

PHP Code:
$threads $DB_site->query_first("
  SELECT COUNT(threadid) AS total
  FROM thread
  WHERE postuserid='
$bbuserinfo[userid]'");
$userinfo[threads] = $threads[total]; 
it should be:
PHP Code:
$threads $DB_site->query_first("
  SELECT COUNT(threadid) AS total
  FROM thread
  WHERE postuserid='
$userinfo[userid]'");
$userinfo[threads] = $threads[total]; 
otherwise it uses the total threads of the user that is checking the profile
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 05:01 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.07226 seconds
  • Memory Usage 2,312KB
  • 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
  • (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
  • (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