vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   The Activity Hack v2.1 (https://vborg.vbsupport.ru/showthread.php?t=73145)

WetWired 12-20-2004 10:00 PM

The Activity Hack v2.1
 
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

jamesk 12-21-2004 05:42 AM

Great Hack and I love the template you're using, It's different.
Does this include the activity bar that you are using on the forum post profile?
I like the Longevity bar too. Is there a hack for that as well?

Boofo 12-21-2004 07:03 AM

Why don't you use the datastore and save all of those queries? ;)

WetWired 12-21-2004 12:12 PM

Quote:

Originally Posted by Boofo
Why don't you use the datastore and save all of those queries? ;)

How would you suggest that I do that? I already use two techniques to minimize queries to the minimum possible. Currently, I use a results cache to insure that activity is only ever computed once per user per page view; I also only compute activity once per day per user, and that only if the information needs to be displayed.

WetWired 12-21-2004 12:14 PM

Quote:

Originally Posted by jamesk
Great Hack and I love the template you're using, It's different.
Does this include the activity bar that you are using on the forum post profile?
I like the Longevity bar too. Is there a hack for that as well?

This hack includes support for image based activity and longevity bars, but you must supply the images yourself.

Gio~Logist 12-21-2004 12:20 PM

That's an extremely nice hack, and looks extra good on YOUR forums with that nice postbit.

dndog 12-21-2004 04:44 PM

Its a great hack, but it just wont work for busy forums. Those queries would kill my board.

/me would click install if the queries could be greatly reduced.

WetWired 12-22-2004 01:09 AM

I have much improved activity calculation. It now takes two queries to find the activity, and one to update it in the user table (so it doesn't get calced again during that day).

lange 12-25-2004 03:49 PM

I love this hack but 32 queries seems too much. I'll test it on a test forum.

Thanks for your Chrismast gift.

WetWired 12-25-2004 11:35 PM

Quote:

Originally Posted by lange
I love this hack but 32 queries seems too much. I'll test it on a test forum.

Thanks for your Chrismast gift.

32 queries to install. It's done by a script, so it shouldn't even be mentioned in the description.


All times are GMT. The time now is 12:14 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.01250 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete