MyBB Community Forums

Full Version: Edit Member's Reputation Number?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I was wondering how I can adjust a member's reputation number Huh

I recently converted from a different software and was wanting to make everyone's reputation count the same as it was on our old version.
I don't believe you can, just checked the admincp and there is no option I could find, only way I can think of is a plugin.
Maybe there is an SQL query I could run?
The Merge System doesn't port reputation points at this time.
(2013-04-16, 08:48 PM)Nathan Malcolm Wrote: [ -> ]The Merge System doesn't port reputation points at this time.

I know that, but there has to be a way to adjust the number (like with a SQL query or something).
Each rep is associated with the user receiving and the user giving (and for post rep ofc the post for which rep was given)-- if you want to change a person's reputation you would need to physically insert those reps (with the correct associations) into the DB-- keep in mind that you don't have to associate the user giving the rep but if you don't it will show up as N/A

This script is an example of giving a particular user 100 rep points and associating the rep with UID 1:

<?php

define('IN_MYBB', 1);
require "global.php";

global $db;

$rep = array
(
	"uid"					=>	5,
	"adduid"				=>	1,
	"pid"					=>	0,
	"reputation"			=>	100,
	"dateline"				=>	TIME_NOW
);

$db->insert_query('reputation', $rep);

?>

adduid = the user giving rep
uid = the user receiving rep
pid = the post associated (zero means none)
reputation = the amount of points for this particular rep
dateline = when the rep was given

Even with this info it wouldn't be easy to replicate the exact chain of reps but you could simply restore the numbers.
Thanks for the help! Where would I put that PHP code though and how would I execute it?
^ you can add such php files to the main folder of your MyBB files (where global.php exists) and run it by visiting its URL. however
above code works for adding reputation to a single member. if you want to add reputation to all members then it needs a loop code.
(2013-04-17, 02:28 AM).m. Wrote: [ -> ]^ you can add such php files to the main folder of your MyBB files (where global.php exists) and run it by visiting its URL. however
above code works for adding reputation to a single member. if you want to add reputation to all members then it needs a loop code.

thanks :-) Do you have an example of one?
You would only be able to use a loop if you had an array filled with the values in question.

The best course of action (what I would do) is to develop a simple reputation page in ACP where you could input UIDs and change their reputation to the number it was before (one at a time) . . .

A more elegant solution would be to examine the previous rep table (from the old forum software) and create a PHP script to 'convert' the old reps to the new style reps and insert them into the database-- and I have no idea whether the other DB is storing reps in a way that would make that feasible.

Just trying to help.
Pages: 1 2