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
  #22  
Old 09-03-2002, 04:59 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually Neo all you did was do an order by... the actually query itself already selected both the posts in that forum that they replied in most as well as the forumid... so i fail to see what your code change did? regards...

g-force2k2
Reply With Quote
  #23  
Old 09-03-2002, 06:21 PM
Webmasta XT's Avatar
Webmasta XT Webmasta XT is offline
 
Join Date: Mar 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome hack..
Reply With Quote
  #24  
Old 09-03-2002, 07:56 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by g-force2k2
Actually Neo all you did was do an order by... the actually query itself already selected both the posts in that forum that they replied in most as well as the forumid... so i fail to see what your code change did? regards...

g-force2k2
well try the queries in in your MySQL of choise and you will see what I mean... I can give you a example...

using it without the ORDER BY I get for user number 81


PHP Code:
ppforum  |  forumid
------------------------
   
9              2 
adding the ORDER BY I get for user number 81

PHP Code:
ppforum  |  forumid
------------------------
   
756              7 
now what do you think would be more correct?
Reply With Quote
  #25  
Old 09-03-2002, 08:14 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes thank you neo for visual i see what you mean now regards and thanks a bunch... file updated

g-force2k2
Reply With Quote
  #26  
Old 09-03-2002, 08:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also changed this line:

PHP Code:
$f_posts floor(($t_post[ppforum] / $userinfo[posts]) * 100); 
To this:

PHP Code:
$f_posts round(($t_post[ppforum] / $userinfo[posts]) * 100,2); 
for a more accurate count.

I am still having problems with the code for the Admins and Mods being the only ones able to see it.
Reply With Quote
  #27  
Old 09-03-2002, 09:00 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo try this then... open member.php

find:

PHP Code:
    eval("\$forumactive = \"".gettemplate('getinfo_forumactive')."\";"); 
replace with:

PHP Code:
    if($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) {
      eval(
"\$forumactive = \"".gettemplate('getinfo_forumactive')."\";");
      } else {
        
$forumactive "";
      } 
that should do the trick regards...

g-force2k2
Reply With Quote
  #28  
Old 09-03-2002, 09:07 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked, thanks. Just to verify, this is what the code should look like for me now, right?

PHP Code:
// +++++++ User Most Active Forum Hack [ g-force2k2 ] +++++++
  // thanks to neo for the query fix :)
  
$t_post $DB_site->query_first("
    SELECT COUNT(postid) AS ppforum, thread.forumid AS forumid
    FROM post
    LEFT JOIN thread ON thread.threadid = post.threadid
    WHERE userid = '
$userinfo[userid]'
    GROUP BY(forumid)
    ORDER BY ppforum 
    DESC LIMIT 1"
);

    if(empty(
$t_post[ppforum])) {
      
$forumactive "";
    } else {
      
$f_name $DB_site->query_first("
        SELECT title
        FROM forum
        WHERE forumid = '
$t_post[forumid]'");
    
$f_posts round(($t_post[ppforum] / $userinfo[posts]) * 100,2);
    
$p_type iif($t_post[ppforum] == 1,'Post','Posts');

    if(
$bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) {
      eval(
"\$forumactive = \"".gettemplate('getinfo_forumactive')."\";");
      } else {
        
$forumactive "";
      }
    }
// +++++++ User Most Active Forum Hack [ g-force2k2 ] +++++++ 
And what did you think of the change for the percentage?
Reply With Quote
  #29  
Old 09-03-2002, 09:09 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes... and the percentage is nice too regards...

question is does it work correctly though how you wanted it to?

g-force2k2
Reply With Quote
  #30  
Old 09-03-2002, 09:13 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, now the private forum shows up like it is supposed to and the percentage will be more noticeable on boards with more messages.
Reply With Quote
  #31  
Old 09-03-2002, 09:15 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I do have one more question, though, is there a way to exclude certain forums (like with forumid)?
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 11:50 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.08740 seconds
  • Memory Usage 2,328KB
  • 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
  • (4)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