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
  #42  
Old 05-12-2005, 02:22 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a setting in the options.
AdminCP>vBulletin Options>Activity Hack>Find today's activity for all users

If you don't put the ranktext part into the memberinfo or postbit templates, then noone will see or be affected by the ranking system.
Reply With Quote
  #43  
Old 05-12-2005, 02:37 PM
GrusPer GrusPer is offline
 
Join Date: Dec 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Greetings
Has put this code
But at me the problem with date base writes that
At me date the base is with
Prefix\Table vb3_mos_ ******
That to me to do what to correct a code

================
Database error in vBulletin 3.0.5:

Invalid SQL: UPDATE user SET activity='54',activitydate='1115856000' WHERE userid=127
mysql error: Table 'grusper_ryzom.user' doesn't exist

mysql error number: 1146
Reply With Quote
  #44  
Old 05-12-2005, 11:59 PM
GrusPer GrusPer is offline
 
Join Date: Dec 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody help me ? pl ppl
Reply With Quote
  #45  
Old 05-14-2005, 06:44 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have updated the activity.php in the original post. Redownload this file and upload it to your server, and the problem should go away.
Reply With Quote
  #46  
Old 05-14-2005, 08:54 PM
GrusPer GrusPer is offline
 
Join Date: Dec 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Database error in vBulletin 3.0.5:

Invalid SQL: SELECT COUNT(*) AS num FROM vb3_mos_post LEFT JOIN thread on post.threadid=thread.threadid LEFT JOIN forum on thread.forumid=forum.forumid WHERE ((forum.options&4096))AND(post.userid=1)AND(post.d ateline>=1116028800)
mysql error: Table 'grusper_ryzom.thread' doesn't exist

mysql error number: 1146

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

Updated again. Apparently I missed the TABLE_PREFIXes on the joins. It should work now.
Reply With Quote
  #48  
Old 05-15-2005, 06:49 PM
GrusPer GrusPer is offline
 
Join Date: Dec 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool thx - all works
big thx WetWired
Reply With Quote
  #49  
Old 05-16-2005, 04:12 AM
GrusPer GrusPer is offline
 
Join Date: Dec 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no no cool
on bug here
----
At attempt of viewing of a subject where ALREADY there is YOUR answer base gives out a mistake.
----------


Database error in vBulletin 3.0.5:

Invalid SQL: SELECT COUNT(*) AS num FROM vb3_mos_post LEFT JOIN vb3_mos_thread on post.threadid=thread.threadid LEFT JOIN vb3_mos_forum on thread.forumid=forum.forumid WHERE ((forum.options&4096))AND(post.userid=117)AND(post .dateline>=1116201600)
mysql error: Unknown table 'forum' in where clause

mysql error number: 1109
Reply With Quote
  #50  
Old 05-16-2005, 09:07 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In your activity.php, find:
PHP Code:
      $visitlog=$DB_site->query_first("SELECT COUNT(*) AS num FROM '.TABLE_PREFIX.'post LEFT JOIN '.TABLE_PREFIX.'thread on post.threadid=thread.threadid LEFT JOIN '.TABLE_PREFIX.'forum on thread.forumid=forum.forumid WHERE ((forum.options&$_FORUMOPTIONS[countposts]))AND(post.userid=".$userid.")AND(post.dateline>=".($checkend-($days+1)*ACTHACK_ONE_WEEK).")AND(post.dateline<".($checkend-$days*ACTHACK_ONE_WEEK).")"); 
and replace by:
PHP Code:
      $visitlog=$DB_site->query_first("SELECT COUNT(*) AS num FROM '.TABLE_PREFIX.'post AS post LEFT JOIN '.TABLE_PREFIX.'thread AS thread on post.threadid=thread.threadid LEFT JOIN '.TABLE_PREFIX.'forum AS forum on thread.forumid=forum.forumid WHERE ((forum.options&$_FORUMOPTIONS[countposts]))AND(post.userid=".$userid.")AND(post.dateline>=".($checkend-($days+1)*ACTHACK_ONE_WEEK).")AND(post.dateline<".($checkend-$days*ACTHACK_ONE_WEEK).")"); 
Find:
PHP Code:
        $poststoday=$DB_site->query_first('SELECT COUNT(*) AS num FROM '.TABLE_PREFIX.'post LEFT JOIN '.TABLE_PREFIX.'thread on post.threadid=thread.threadid LEFT JOIN '.TABLE_PREFIX.'forum on thread.forumid=forum.forumid WHERE ((forum.options&'.$_FORUMOPTIONS[countposts].'))AND(post.userid='.$post['userid'].')AND(post.dateline>='.$startofday.')'); 
and replace by:
PHP Code:
        $poststoday=$DB_site->query_first('SELECT COUNT(*) AS num FROM '.TABLE_PREFIX.'post AS post LEFT JOIN '.TABLE_PREFIX.'thread AS thread on post.threadid=thread.threadid LEFT JOIN '.TABLE_PREFIX.'forum AS forum on thread.forumid=forum.forumid WHERE ((forum.options&'.$_FORUMOPTIONS[countposts].'))AND(post.userid='.$post['userid'].')AND(post.dateline>='.$startofday.')'); 
Reply With Quote
  #51  
Old 05-16-2005, 11:48 AM
GrusPer GrusPer is offline
 
Join Date: Dec 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$poststoday=...........

And what picture should be in
today1.gif ?
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:38 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.04541 seconds
  • Memory Usage 2,324KB
  • 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_php
  • (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