Quote:
Today at 11:35 AM Jagang said this in Post #2212
Bitsys, could you expand on that a little? What type of "custom modifications" would be needed and to what files? I just need a place to start looking.
|
In newthread.php and newreply.php, find:
PHP Code:
$DB_site->query("UPDATE user SET xp=xp+$battleopt[expperpost] WHERE userid='$bbuserinfo[userid]'");
That is the query used to give the user experience. To determine the length of the message and store it in a variable, use the following code:
PHP Code:
$messagelength = strlen($message);
You could change the query to something like:
PHP Code:
$DB_site->query("UPDATE user SET xp=xp+" . intval($battleopt['expperpost'] * strlen($message) / 100) . " WHERE userid='$bbuserinfo[userid]'");
This would give the user the full amount of exp per post if the message was exactly 100 characters. If the message was 200 characters, then the user would get twice the amount of normal xp per post, etc.
You could always put a cap on the amount of exp people get could get so that people didn't make a post that contained the same characers over and over again.
Please note that I have not tested any of the above code.