Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
The Activity Hack v2.1 Details »»
The Activity Hack v2.1
Version: 2.1, by WetWired WetWired is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-20-2004 Last Update: 05-15-2005 Installs: 27
DB Changes
Is in Beta Stage  
No support by the author.

vB3.5 and vB3.6 users click here

There will be no additional releases of the vB3/hack version; this mod has moved on to vB3.5 as a plugin (see here)

I've been using a less-configurable version of this hack on my forum for over a year. After constant pestering from certain people, here is a version IMO fit for public consumption; consider it a Christmas gift.

Description
This hack adds an activity metric for users to your forum; this metric takes into account a variable number of weeks. Also provided is a Junior/Normal/Senior member system based on this metric, and a longevity metric (user registered time as a percent of the amount of time the first user has been registered).

See zelaron.com for an example of what can be done with this.

Visiting each day and posting the configured amount of times per day for the configured number of weeks will yeild 100% activity. Posts are checked individually for each day, so days cannot be skipped then spammed up afterwards. The weight of visiting for the day relative to posting is configurable. Weeks are weighted so the most recent has a bigger impact on the activity percent than the most distant.

When a user logs in with 50% activity, they are promoted from Junior Member to Member. When they log in 3 months from that time, they are promoted to Senior Member.

Complexity
This hack edits 6 files and 3 templates. The hack adds one table, four fields to the user table, as well as its own settings and phrases.

Technical
This hack adds 1 query to showthread for each user who posts in that page (or only 1 for the logged in user by configuration). 1 query per thread is performed to find join date of first user (this will be changed to a setting in a future version). In addition, the first time a member's post or profile is accessed during a day (GMT), 3 queries are performed to find that user's activity depending on configuration.

Notice
When you first install this hack, no user will have 100% activity because whether or not a user visited on a day is not recorded untill after installation. You may want to set the number of weeks to two at first and increase it as time passes and the visit log fills.

Support
Please click the install link if you install this hack
This hack is in beta because remaining bugs will only become evident over time due to the nature of this hack. I will support this hack in this thread.

3/30/2005
Added barsamples.zip, sample activity and longevity bar images.

Update v2.1
I have fixed the activity calculation so that it adds a fixed 3 queries instead of 16 to 48. To update, simply upload the new activity.php

Show Your Support

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

Comments
  #12  
Old 12-28-2004, 06:14 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what - this hack adds 32 queries when viewing posts - if so then it aint worth installing then.
Reply With Quote
  #13  
Old 12-29-2004, 01:17 AM
djjeffa's Avatar
djjeffa djjeffa is offline
 
Join Date: Aug 2004
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look good ill wait abit and then install lol
Reply With Quote
  #14  
Old 12-29-2004, 05:45 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh , I got a little problem (again) :
I want to use the $acthack_postsd[] thing , but I can't find much instructions about that one , any help on how to use it?

Thanks
Reply With Quote
  #15  
Old 12-30-2004, 03:51 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lasto
what - this hack adds 32 queries when viewing posts - if so then it aint worth installing then.
As I said in the post immediately above yours, it's on install. At view, it's two queries plus 2 per user who hasn't had activity updated that day. The dynamic of this is a max of 32 queries per page, which will happen a bit after midnight when the old data is discarded, and 2 queries per page the rest of the day.

I am open to suggestions as to how to further reduce the number of queries. Currently, to find the activity for a user, I need to query the visitlog for visitation data, query the post table to find out when they posted, and query the user table to store the activity information so that it won't be calculated again. The only possibility I can think of is if I can do all the activity for the whole page in two queries and hope that the cost of these two queries is little enough to make them every load instead of storing the results to avoid performing the process over and over; however, I am no SQL wizzard and figuring out how to reduce the process to a flat 2 queries was a stretch of my ability.
Reply With Quote
  #16  
Old 12-30-2004, 03:59 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Deaths
Heh , I got a little problem (again) :
I want to use the $acthack_postsd[] thing , but I can't find much instructions about that one , any help on how to use it?
All you need to do is enable it in the settings, then use the array in the names of the images, for example, if you made the images
postcleftcap.gif
postcrightcap.gif
postcs.gif
postc0.gif
postc1.gif
postc2.gif
postc3.gif
postc4.gif
postc5.gif
postc6.gif
postc7.gif
postc8.gif
postc9.gif

then, you could use code like this:
<img src="postcleftcap.gif" /><img src="postc$acthack_postsd[1].gif" /><img src="postc$acthack_postsd[2].gif" /><img src="postc$acthack_postsd[3].gif" /><img src="postc$acthack_postsd[4].gif" /><img src="postc$acthack_postsd[5].gif" /><img src="postc$acthack_postsd[6].gif" /><img src="postc$acthack_postsd[7].gif" /><img src="postc$acthack_postsd[8].gif" /><img src="postc$acthack_postsd[9].gif" /><img src="postcrightcap.gif" />
of course, you would want to include the path to the images and width and height attributes so your page loads cleanly. The hack generates 9 digits and represents left padded digits with an 's' .
Reply With Quote
  #17  
Old 12-30-2004, 04:32 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot , now its perfect!
Reply With Quote
  #18  
Old 01-01-2005, 11:30 PM
djjeffa's Avatar
djjeffa djjeffa is offline
 
Join Date: Aug 2004
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Deaths
Thanks a lot , now its perfect!
i cant even open these when I dlthem why not put them into one zip file?
Reply With Quote
  #19  
Old 01-04-2005, 02:29 PM
MikaK's Avatar
MikaK MikaK is offline
 
Join Date: Nov 2004
Location: Helsinki, Finland
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Handy hack. *installs*. A word of warning for noobs: There is quite a few .TABLE_PREFIX.es missing from the code. These cause sql errors in case of a sqlprfix used and solving the mess might be quite a frustrating task without at least basic knowledge of php and sql. Aside of that - cool, as said.

=M=
Reply With Quote
  #20  
Old 01-04-2005, 02:49 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you WW for releases this to the public, after a year of nagging you.

[high]* Logikos clicks install[/high]
Reply With Quote
  #21  
Old 01-05-2005, 04:15 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MikaK
Handy hack. *installs*. A word of warning for noobs: There is quite a few .TABLE_PREFIX.es missing from the code. These cause sql errors in case of a sqlprfix used and solving the mess might be quite a frustrating task without at least basic knowledge of php and sql. Aside of that - cool, as said.

=M=
Is this just in the installer or in the code for the hack itself? As of 2.1, I was fairly certain that I had updated all the queries in activity.php to use TABLE_PREFIX
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 08:42 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.05404 seconds
  • Memory Usage 2,315KB
  • 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
  • (4)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