Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Activity Modification Details »»
Activity Modification
Version: 2.80, by WetWired WetWired is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 08-07-2005 Last Update: 02-04-2007 Installs: 472
DB Changes Uses Plugins Template Edits
Translations  
No support by the author.

For vB3.7, see The vB3.7 version

This is the plugin/vB3.5/vB3.6 version of this hack

This mod was developed on vB3.6.4, and tested for compatibility with vB3.5.4

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).

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 activity above the configured threshold, they are promoted from Junior Member to Member. When they log in with the configured amount of time as Member, they are promoted to Senior Member. You can configure the mod to also add secondary usergroups when these promotions happen.

Complexity
This modification requires 1 XML import, modification to 3 templates, and the addition of some CSS, depending on what options you choose

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). 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. By configuration, 1 query may be added to each page load to find the logged in user's "activity today". By configuration, 1 query may be added to each member profile view to find that member's "activity today".

Upgradability
This modification will import your settings and data from the 3.0/hack version

Frequently Asked Questions
  • I installed this mod using the Download/Upload Plugin page and there was an error/it doesn't seem to work
    To install this mod, you need to use the Add/Import Product link on the Manage Products page
  • I just installed and everyone's activity seems low
    1. Part of the activity calculation is what days users visited on. This information isn't collected before the mod is installed, so no user can have 100% activity untill you've been running the mod for the full period of time you have it set to monitor
    2. Please realize that there is no "roll over" for activity; if you have it set to look at 4 posts per day, your users must post 4 posts on each individual day to obtain 100%.
  • I founded this forum, but I don't have 100% longevity
    Somehow a user's join date has been set before yours. When you install, the mod looks for the earliest join date to use to find longevity, but you can change the baseline date. To change the "Start of board" time, go to Maintenance>Activity Maintenance>Set Start of Board, enter your user number in the text field, then click Set Start of Board
  • I'm using the images template version, but the images don't show up
    Be sure to upload one of the activity directories from activityimages.zip to the misc directory for each of your styles. To find a style's misc directory, goto the Style Manager, then from the dropdown next to the style, choose Stylevars. The setting Miscellaneous Images Folder contains the path to that style's misc directory, where you need to upload the activity directory
  • Can I use activity for promotions?
    The project to build a full-blown promotion hack for use with this mod has been cancelled, after losing all of my work, however a much simpler system that adds secondary groups based on two thresholds has been added to the main hack.
  • Can you make X number get split up into digits?
    I understand where you're coming from with this one, but I just can't figure out a way to work this that would be simple to use.
  • The tooltips don't wrap and get cut off with FireFox
    The same thing happens to other vB tooltips (the thumbnail ones, for example). If you know a way to add line breaks to FF tooltips without scripting, please let me know.
Change log

Note: To upgrade, with the old version still installed, go to the Add/Import Product link on the Manage Products page, select the XML file for the new version, choose Yes for overwrite, then click Import.

2.80 release update
  • Added AdminCP option to disable display of activity ranks (ranktext)
  • Modified template changes to support the above change (for most people, your templates should work as is)
  • Modified template changes for image horizontal postbit to always locate activity information in the upper right of the postbit, so it doesn't move arround from post to post (if you're happy with how it is now, no need to update)
2.80 rc3 update
  • You can now control the number of entries on the Top Activity board from the adminCP
  • Top Activity templates are properly cached
  • Changes for XHTML 1.0 validation (requires template reedits if you want XHTML validation)
2.80 rc1 update
  • Added improved built-in Top Activity page
  • Added option for activity breakdown in activity bar tooltip
  • Added option to promote users when their activity is calculated instead of just when they visit to help admins that are having trouble with the promotion system
  • Fixed issue with maintenance section with other languages. It should display correctly now for all languages.
  • Added admin help in 3.6.x
  • Added 3.6.x version and link in product list
  • No template changes since 2.70 (there are new templates, however)
2.71 update
  • Corrected a bug where users on forums with "Weeks reflected" set to 1 could not reach 100% activity
2.70 update
  • Full info available to MEMBERINFO template
  • Full info available for the logged-in user (see template customization in install file)
  • Fixed % issue with different vB versions
  • "Midnight" for activity hack is configurable. Note that it may be desirable to set this to a time other than true midnight for your users.
  • Options to control calculation of activity today in MEMBERINFO and for logged-in user
  • Simple promotion system adds secondary usergroups when members are promoted in the ranktext system
  • Reworking of internals
  • Default templates should not try to display activity information when it is unavailable (a generic fix that covers vbA gallery)
2.51 update
  • Updated phrases for vb3.5.1
  • Updated options activity refresh for vb3.5.1
  • Fixed problem with activity-based ranks
2.50 Release update
  • Added fix for reversed posts field in images version templates when user is using a right-to-left language. (Manually update the postbit and postbit_legacy templates)
Beta 6 update
  • Added extra checks for excessive activity
  • User activity is now automatically refreshed when settings changes make it neccessary
  • Fixed guest bug
Beta 5 update
  • Removed the query added to PM views in beta 4
  • Removed the post digits setting; it causes trouble since the majority of users seem to be using the image version, and the load impact is slight anyway.
Beta 4 update
  • Fixed the problem where activity panel displayed incorrect information in PMs
  • Moved start of board into settings, removed 1 query from showthread, view PM, view user note
Beta 3 update
  • Fixed a critical issue with activity caching. Everyone should update
  • Fixed an issue with a query not working when using table prefixes
  • Added template modification instructions
  • Added image template mod version screenshot
Beta 2 update
  • There was an issue with % signs in the phrases, this has been corrected.
  • Screen shots added.
Changes from the hack version
  • Thresholds for promotions are configurable
  • Ranktext system is configured from the options page instead of by a file
  • You can now prune the visit log from the adminCP (Under Maintenance>Activity Maintenance)
Support

Please click the install link if you install this hack
I will support this hack in this thread on about a weekly basis.

Show Your Support

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

Comments
  #192  
Old 01-13-2006, 02:21 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Live Wire
Add a new hook to global_start with this code:

PHP Code:
$user['activity'] = intval($vbulletin->userinfo['wwu002activity'] / $GLOBALS['WWU002maxPoints'] * 100) . '%'
Now that should make it so you can use $user[activity] in any template.
Almost. Your code doesn't take into account the first visit of the day, where the data in userinfo may not be up to date yet. This code should handle that situation:
Code:
if(isset($WWU002activityPoints)){
  $user['activity']=intval($WWU002activityPoints/$WWU002maxPoints*100).'%';  
}else if($vbulletin->userinfo['userid']){
  $user['activity']=intval($vbulletin->userinfo['wwu002activity']/$WWU002maxPoints*100).'%';  
}else{//(isset($WWU002activityPoints))
  $user['activity']='N/A';
}//endif(isset($WWU002activityPoints))
Reply With Quote
  #193  
Old 01-27-2006, 12:27 AM
Lance Carbuncle Lance Carbuncle is offline
 
Join Date: Oct 2004
Location: California
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I got the activity to show up on my Welcome block thanks to everyone's help here....

Would it be possible to integrate this with usergroup promotions? I am trying to find a way to only allow active users the ability to post in the free classifieds (photopost classifieds) which is integrated with vbulletin usergroups...

For example.... only people who maintain a 20% activity level would be included in a custom usergroup, and if their activity falls below this, they drop out of the usergroup until their activity increases to the set level again....... I now require XX amounts of posts to be able to use the classifieds, but find people just post junk until they reach this level and then stop contributing... This feature would take care of that problem....

I know this might be asking a lot....but i am willing to hire someone to do this if it is possible within reason.... Anyone? I think this would be an awesome feature that coule be used in many ways. I also would not have to keep it to myself if someone wants to code it and share it on my dime.

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

At one point, I had started work on such a system, but I accidentally wiped it out. The biggest issue is with demotions. A user's activity only gets updated when they visit or when their posts or profile is viewed. This means that it's possible to come back after a month of inactivity and have the old usergroup untill the next time promotions are run. It is, of course, possible to just do activity for everyone at once, however the process would be very server intensive, which is why I do it the way it is now.

Glad to hear that you got it sorted out on your own; sorry I hadn't gotten the chance to look into it for you yet.
Reply With Quote
  #195  
Old 01-27-2006, 11:47 AM
luroca luroca is offline
 
Join Date: Jul 2002
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired
A user's activity only gets updated when they visit or when their posts or profile is viewed. This means that it's possible to come back after a month of inactivity and have the old usergroup untill the next time promotions are run. It is, of course, possible to just do activity for everyone at once, however the process would be very server intensive
Perhaps with a diary cron this issue can be solved?
If promotion/demotion can be added to this hack I?ll install it.

In any case, excellent hack
Reply With Quote
  #196  
Old 01-27-2006, 02:46 PM
Lance Carbuncle Lance Carbuncle is offline
 
Join Date: Oct 2004
Location: California
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired
A user's activity only gets updated when they visit or when their posts or profile is viewed. This means that it's possible to come back after a month of inactivity and have the old usergroup untill the next time promotions are run. It is, of course, possible to just do activity for everyone at once, however the process would be very server intensive, which is why I do it the way it is now.
Thanks for the feedback WetWired... I am having a little trouble understanding what you are saying here, so maybe you can comment one more time........When are the promotions run now? Is this part of your script, or a vbulletin action.... Would it be possible to run a promotion check for a single user upon there visit, or is the problem that vbulletin would have to run all promotions to check one? (I am speaking al a layperson here and have no idea of coding or how things work, just a mechanic's view of the computer world LOL) Could vbulletin be set to run promotions once every evening for all users at a user set time (low visit period) if it uses a lot of resources?


OOps.... reading it again, I guess it would be the activity you would want to run a scheduled update for? and then promotions?

Thanks Again, Lance
Reply With Quote
  #197  
Old 01-31-2006, 07:30 AM
nexus851 nexus851 is offline
 
Join Date: Oct 2005
Location: LA
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in my post_legacy graphic... under longevity, it says this:

"User has been a member for 76114f the board's existence....etc.."

Why does it say "76114f"???? shouldnt that be a variable of some kind, i followed the instructions, but it still says it... sometimes it says another large number, but basically it seems like i left a variable out or something, any ideas????

NEVERMIND, fixed! thanks!
Reply With Quote
  #198  
Old 01-31-2006, 08:12 AM
nexus851 nexus851 is offline
 
Join Date: Oct 2005
Location: LA
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired
Almost. Your code doesn't take into account the first visit of the day, where the data in userinfo may not be up to date yet. This code should handle that situation:
Code:
if(isset($WWU002activityPoints)){
  $user['activity']=intval($WWU002activityPoints/$WWU002maxPoints*100).'%';  
}else if($vbulletin->userinfo['userid']){
  $user['activity']=intval($vbulletin->userinfo['wwu002activity']/$WWU002maxPoints*100).'%';  
}else{//(isset($WWU002activityPoints))
  $user['activity']='N/A';
}//endif(isset($WWU002activityPoints))
i tried using the code above to add to my welcome block, but it doesnt seem to work. It gives me a "0%"....

I set the code as a plugin in global_start hook and used the variable "$user[activity]" in my template but just only gives me 0%


anyone know why it doesnt work?
Reply With Quote
  #199  
Old 01-31-2006, 10:03 PM
username12 username12 is offline
 
Join Date: Jan 2006
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Answered my own question.
Reply With Quote
  #200  
Old 02-01-2006, 12:00 PM
mrcrx mrcrx is offline
 
Join Date: Jun 2004
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed the file as it said. It shows up as active and it shows up in the admin control panel also. but I dont see anything on the forum. Any help. Im very new at this.
Reply With Quote
  #201  
Old 02-03-2006, 12:54 AM
nexus851 nexus851 is offline
 
Join Date: Oct 2005
Location: LA
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired
Almost. Your code doesn't take into account the first visit of the day, where the data in userinfo may not be up to date yet. This code should handle that situation:
Code:
if(isset($WWU002activityPoints)){
  $user['activity']=intval($WWU002activityPoints/$WWU002maxPoints*100).'%';  
}else if($vbulletin->userinfo['userid']){
  $user['activity']=intval($vbulletin->userinfo['wwu002activity']/$WWU002maxPoints*100).'%';  
}else{//(isset($WWU002activityPoints))
  $user['activity']='N/A';
}//endif(isset($WWU002activityPoints))

help, this doesnt work when i use $user[activity] in my template.. it just spits out "0"...... i did everything requested above.. anyone help please!
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 02:05 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.07844 seconds
  • Memory Usage 2,340KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_php
  • (5)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
  • (2)pagenav_pagelinkrel
  • (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