MyBB Community Forums

Full Version: Adding Reputation to Certain User/Usergroups
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello! I am using ARS (Advanced Reputation System) and I tried to increase Reputations for certain usergroups, it always return to the same.

Meaning, if Mr A has 0 reputation at first, I insert 1000 to him, it appears as 1000 reputation points. But when he try to give reputation, his reputation returns back to 0 again.

I am using MySQL queries to insert more reputation...Below are the codes I use.

For Users
UPDATE mybb_users set reputation=reputation+1000 WHERE uid=4

For UserGroups
UPDATE mybb_users set reputation=reputation+1000 WHERE usergroups=4
This is totally normal in the plugin. I've made it so, that the reputation is recounted everytime someone adds or removes or changes reputation points. Only reputations that are in the reputations table will get counted. The number will then be stored in the users table. This will prevent fake reputations and wrong calculations. If you really want to add it using a query, then you must also add a new row in the reputations table. You can make it invisible if you like (by setting 'showtoall' to 'no').
Hm any idea what Query I should run to add reputation?
Basically I wish to use Reputation Points as a kind of prize for my memebers, thats why I need a query that would help me to increase it.
INSERT INTO mybb_reputation (uid, pid, adduid, reputation, dateline, comments, reported, reason, showtoall, reportedby) VALUES	(UID,'0','','1000',UNIX_TIMESTAP,'','no','','no','')
Wher UID stands, you write the uid of the user.
I am getting this error...

Quote:MySQL said: Documentation
#1054 - Unknown column 'UNIX_TIMESTAP' in 'field list'
Ow sorry, it's UNIX_TIMESTAMP. At least I think it is. If it still doens't work, just use 0 instead.
Grr..

#1054 - Unknown column 'reported' in 'field list'
:/
Then the plugin is not activated. Try activating the plugin.
It is..
Do u mean the recount tool or what ?
Because the Plugin IS activated.
Strange. If the plugin is activated, then the fields should exist.
Upload the attached file to your forum dir and browse to it. After it's complete, you can remove it again. This file will make sure that all required fields exist. And if they don't exist, it will create them.

When running the file, it should say something like this:
Loading global.php.
--> global.php loaded

Checking if the field 'reported' exists
--> The field 'reported' doesn't exist.
Checking if the field 'reason' exists
--> The field 'reason' doesn't exist.
Checking if the field 'showtoall' exists
--> The field 'showtoall' doesn't exist.
Checking if the field 'reportedby' exists
--> The field 'reportedby' doesn't exist.
Starting to add fields in the reputations table.
--> The field(s) 'reported', 'reason', 'showtoall', 'reportedby' are successfully added.

Checking if the field 'reportwarnings' exists
--> The field 'reportwarnings' doesn't exist.
Starting to add fields in the users table.
--> The field(s) 'reportwarnings' are successfully added.

Ready. You can now remove this file again.
If it doesn't or especially when the last line doesn't show saying it's ready, contact me.
Pages: 1 2