View Full Version : Credits question


wlang
03-01-2005, 04:06 AM
Is there a setting under the admin setting that will allow you to give people credits. I see you can go into the users account under view users and add credits but it doesnt add credits to the account. Is there another way to do this or do I have to change the settings somewhere in order to let the admin give credits out.

Thanks in advance for the help.

Jafo
03-01-2005, 06:14 AM
Hmm now this is odd. Let me take a look and see what I can find.

Jafo
03-01-2005, 06:34 AM
This is a bug. To fix it, open functions.cgi and find the function called register_user and find this line:


mysql_query("INSERT INTO " . $dbprefix . "credits (user_id, credits ) VALUES ( '$status[0]', '$cred_register')") or die("Could Not Add user profile". mysql_error());

Change to:

mysql_query("INSERT INTO " . $dbprefix . "credits (user_id, credits ) VALUES ( '$pr_id', '$cred_register')") or die("Could Not Add user profile". mysql_error());

This will affect only new users.

In order for this to take affect for current users, you will need to add their user ID to the user_id field of the credits table. If anyone needs a script to automate this, let me know and I can write it up, otherwise, just delete the affected users and re-register them.

Was not caught in beta testing, my apologies.

Jafo
03-01-2005, 06:38 AM
And to further answer your question, you can have users automatically receive credits upon registration. See the cred_register variable in the change settings section of the admin control panel.

wlang
03-01-2005, 07:04 AM
ty for the fix, that seemed to fix the problem.

gijs
03-01-2005, 04:20 PM
Jafo,

I registered by hand today my 217 existing members... You can imagine that I will be very helped if you could automate adding their user ID to the user_id field of the credits table.

Thanks

Gijsbert

tradesort
03-01-2005, 05:34 PM
Jafo,

In order to remove the credits features, remove the "my account" link on the left toolbar and make all ads free of being featured? Will this take care of removing the feature?

I can think of something to put in the "featyred ads" on the main screen, but I'll cross that bridge when it comes.

Many thanks, super script!