![]() |
Hi Dark!
Is it possible to add the winning lottery number to prior drawings? Our users buy tickets and then after no one wins, they have no way to check what the winning number was! The current system does not Thanks!! http://www.unix.com/credits.php?do=banking |
Quote:
Quote:
|
Quote:
Cheers and thanks again for a great core product.:D |
Is this compatible with the Living Avatar system?
|
Quote:
if you are using living avatars 1.*, i have integration instructions (2.* has built in integration with vbcredits) or, you can use vBCommerce and the Living Avatars itemtype to sell living avatars items directly through your shop. |
Thanks, I'll look into that later... downloaded and marked as installed.
|
Hi,
Thanks for the great product! I have few issues though. I am unable to find the original code in navbar to replace with your code. I searched the whole code by keywords "pmwarning", "pmpercent" but there is nothing with these keywords in my navbar file. The closest code I found (with if condition and with "PM") is this: <if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if> Is this the one to be replaced with your code? It still looks different as does not have inboxfull or other variables in the one you mentioned. |
Quote:
|
why my credits not align left ?
how to fix it im already revert all template and setup follow the instruction :( |
FWIW, Added new field winnumber to MySQL table credits_lottery to record winning number after each lottery. Code mod below:
Code:
# diff credits_daily.php credits_daily.php.back2 |
Quote:
I get some type of warning and the forum skin turned white minus the banner. Quote:
|
edited: my IT guy rebooted it.
|
Quote:
Quote:
Quote:
|
Quote:
I'll check the database when the current drawing happens the end of this week. If it works, I'll finish add to the lottery output. Cheers. |
Quote:
Quote:
|
Hi Dark!
We need to stop giving credits to users without activity for the past two years. Where would we add some PHP code like this: Code:
// 60 * 60 * 24 * 365 * 2 = 63072000 Code:
<if condition="$userinfo[lastactivity] < (TIMENOW - 63072000)"> Thanks!! |
Quote:
If it works, just follow the instructions in post 890 above. Cheers. |
Quote:
or you can add that check to the includes/functions_credits.php award_credits function, and then the includes/cron/credits_daily.php file to change this query PHP Code:
|
Quote:
I don't think we will move the users to another usergroup, because if they become active again, which they often do, then we have to move them back. That that would not work for us. So, I think I'll add the check to credits_daily.php as you suggested. I might add a new vB Option in the AdminCP for this instead of hardcoding our two year rule. Thanks again. |
Hi Dark,
I looked at that line in credits_daily.php. Perhaps my post was not clear, or I am missing something, or simply am making a mistake. I want users who have been inactive for two years to receive no credit for anything (especially credit for having their old posts viewed, since we get a lot of traffic). Does this one line in credits_daily.php "do it all", in other words, it is the one line that adds user credits for post views, posts, etc.? Code:
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits + CASE$pcsql ELSE 0 END WHERE credits_canearn = 1") Code:
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits + CASE$cdtsql ELSE 0 END, credits_numrefs = credits_numrefs + CASE$refsql ELSE 0 END WHERE credits_canearn = 1 AND usergroupid IN (" . implode(', ', $goodug) . ")") Thanks! |
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? |
Update; I ended up with a simple vB cron file that does this once a day:
Quote:
|
to simplify, you could add just this one query to the bottom of credits_daily
PHP Code:
|
Great idea, thanks!
Quote:
But I don't understand it, ROTFL :D |
:p 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. |
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" :D |
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 |
Quote:
|
is this support point per forum?
i need a points system that support Point Per forum to set point per forums |
yep, it has forum overrides
|
Hi
we have a ads board and we want members need to "spend" X points per classified ads they post there, possible for your module? so posting is actually deducting points instead of earning |
Yes, it certainly possible (anything is possible!)
If you want to see this in action, visit this link and try to post a "New Thread" as a registered user. |
Hi Dark,
Any idea why this vbcredits query appears so many times in the mysql-slow.log (low query log)? This vbcredits query dominates our slow queries log (slow query time is a big 10 sec). Not sure why. Stats from the last hour or so: Quote:
|
Hi (again) Dark,
Nevermind, sorry. I see the issue. We have this set: --log-queries-not-using-indexes Command Line Format --log-queries-not-using-indexes Config File Format log-queries-not-using-indexes Option Sets Variable Yes, log_queries_not_using_indexes Variable Name log_queries_not_using_indexes Variable Scope Global Dynamic Variable Yes Deprecated 5.1.29, by slow-query-log Value Set Type boolean If you are using this option with the slow query log enabled, queries that are expected to retrieve all rows are logged. See Section 5.2.4, “The Slow Query Log”. This option does not necessarily mean that no index is used. For example, a query that uses a full index scan uses an index but would be logged because the index would not limit the number of rows. |
hello..
i just installed this one ye.. and got this error.. with 3.7 Quote:
iam getting this errror.. Quote:
|
I've got a very large forum that runs on a cluster of multiple servers.. How does vbCredits run in a multiple server environment with over 425,000 members? Will we run into any problems using this system, or should everything work out alright?
|
Quote:
http://www.vbcredits.com/forum/showthread.php?t=945 Quote:
Quote:
to install on vb3.6, install the vb3.6 version of vbcredits instead Quote:
|
hmmm.... it won't install on my master/slave server environ as is. it keeps trying to write to my slaves. I will try some other stuff and let you know if anything works.
|
Not sure if this has been covered before...too many posts to search.
Anyway... When purchasing raffle tickets, I noticed that you will receive an error if you hit the Enter key instead of clicking on Purchase. It causes a database error with the below message: Code:
Database error in vBulletin 3.8.3: |
Hi, I have a question about this hack. I've successfully installed it on my forums and it's working perfectly fine. But I have a query.
Is there a way to calculate the total amount of credits for a particular user group? I have 4 different "teams" in my forum, and I'm thinking of displaying the total amount of credits each group has accumulated, but I'm not sure how to do that. Help will be greatly appreciated thanks! =) |
All times are GMT. The time now is 03:42 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|