The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBCredits - Ultimate Points System Details »» | |||||||||||||||||||||||||
vBCredits is the ultimate points system for your vBulletin!
Click here for the vB3.6 compatible version Yes, this also works for vB3.8! Thank you to everyone who voted us MOTM Features:
Just follow the directions carefully in the zip based on whether you are clean installing or upgrading Fully integrated with vBulletin and easily integrated with third party scripts: Many hacks allow you to specify a points system by entering the table and column for the points data. Use TABLE: user COLUMN: credits when integrating vBCredits with such hacks (note: you may need to include your table prefix with some hacks)! If you are unsure about integration - ask me! Why is this version not the gold version yet? vBCredits 1.4rc1 went through a long bugtesting process at the official site, and rc2 is largely bug free in its entirety. However, *it is missing most of the admin help and post/thread deletion actions are temporarily removed while I figure out how to fix them. Footnotes: Thank you for using vBCredits, I would be happy to hear your feedback and correct anything that comes up. For more tailored support, please indicate you have installed this hack, and if you like it you can nominate this for MOTM. Use of this free hack requires that you retain the copyright line at the bottom of the forum (PM me otherwise). If you do not agree with this, please do not use vBCredits - thank you for your understanding and support! Show Your Support
|
Comments |
#902
|
|||
|
|||
Hi Dark!
Maybe this is better, just add this to credits_daily.php ? $twoyearsago = time() - 63072000; $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = 0 WHERE lastactivity < $twoyearsago"); and also, this: $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits_canearn = 0 WHERE lastactivity < $twoyearsago"); So, the first query zeros out all the old credits of users inactive for more than two years, the second query turns off all credit earnings for the same group. However, I need to turn credits_canearn back on when a user become active again, something like: $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits_canearn = 1 WHERE lastactivity > $twoyearsago"); Thoughts? |
#903
|
|||
|
|||
Update; I ended up with a simple vB cron file that does this once a day:
Quote:
|
#904
|
||||
|
||||
to simplify, you could add just this one query to the bottom of credits_daily
PHP Code:
|
#905
|
|||
|
|||
Great idea, thanks!
Quote:
But I don't understand it, ROTFL |
#906
|
||||
|
||||
well its a combination of a couple sql tricks. the first sets the canearn flag to 1 or 0 (true or false, but it gets typecasted to int because thats the column type) based on the activity date.
the second multiplies your credits against that flag... if you can earn credits, then its 1 * your credits = your credits stay the same. if you cant earn credits, then its 0 = your credits are now 0. |
#907
|
|||
|
|||
Oh, so the () around the lastactivity condition makes it boolean?
Wow! I would call you Master, and me Grasshopper, but I don't want to end up in the closet of a hotel room in Bangkok with ropes "everywhere" |
#908
|
||||
|
||||
in response to the... first part
the > makes it boolean, but the column (credits_canearn) is int, so boolean true becomes int 1 and boolean false becomes int 0. the parens are just for clarification |
#909
|
|||
|
|||
Clever. Thanks!
|
#910
|
||||
|
||||
is this support point per forum?
i need a points system that support Point Per forum to set point per forums |
#911
|
||||
|
||||
yep, it has forum overrides
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|