Version: 1.00, by Iguacu
Developer Last Online: Aug 2004
Version: 2.2.x
Rating:
Released: 03-09-2002
Last Update: Never
Installs: 72
No support by the author.
This hack adds to Shinra Points hack by PalmeroftheTurks. I take no credit for his great hack. You do need it installed for mine, though.Mine adds to the field you used for that hack for each post or new reply. You can have different values for new threads and new replies. I was originally told that someone had already posted this, but after receiving quite a few IMs and PMs I am reposting it.
So anyways, tweak it if you want, I'm a PHP newbie and it's my first hack.
Tested on:
2.2.4
2.2.1
I don't see any reason why it shouldn't work on any other vB above 2.0
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Yes, I have been wondering this for awhile to since I got the hack from Iguacu. Somebody please make it so quick reply and quick thread give you points
ok, I don't know about quick thread, but i fixed the quick reply box...but I have another problem...when someone edits a post, it adds too....i have no idea how to fix that, and i don't think it was because of what i did...
anyways....
Find in root/showthread:
PHP Code:
if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}
Add under it
PHP Code:
// start gil
$pointfield="field5"; // set this to the point field you used for the points hack
$giladd=3; // set this to the amount of gil you want a user to receive per newthread
$gilstr=$DB_site->query_first("SELECT $pointfield FROM userfield WHERE userid='$bbuserinfo[userid]'");
$gil=$gilstr[$pointfield];
$gilamt=$gilstr[$pointfield];
if ($gil='') {
$gil=0;
}else {
$postgil = ($gilamt + $giladd);
$DB_site->query("UPDATE userfield SET field5='$postgil' WHERE userid='$bbuserinfo[userid]'");
}
with your values set, etc...
That fixes the quick reply box problem, but I don't know why it adds when you edit too...
Ok, undo what I said above if you did it, cuz now when you refresh a page, it adds on, and when you re-visit a thread you've posted in, it adds 15(in my case, 3x the reg amount)
So, take out [php]// start gil
$pointfield="field5"; // set this to the point field you used for the points hack
$giladd=3; // set this to the amount of gil you want a user to receive per newthread
$gilstr=$DB_site->query_first("SELECT $pointfield FROM userfield WHERE userid='$bbuserinfo[userid]'");
$gil=$gilstr[$pointfield];
$gilamt=$gilstr[$pointfield];
if ($gil='') {
$gil=0;
}else {
$postgil = ($gilamt + $giladd);
$DB_site->query("UPDATE userfield SET field5='$postgil' WHERE userid='$bbuserinfo[userid]'");
}
[\php From your showthread.php.
Ok, undo what I said above if you did it, cuz now when you refresh a page, it adds on, and when you re-visit a thread you've posted in, it adds 15(in my case, 3x the reg amount)
So, take out
PHP Code:
// start gil
$pointfield="field5"; // set this to the point field you used for the points hack
$giladd=3; // set this to the amount of gil you want a user to receive per newthread
$gilstr=$DB_site->query_first("SELECT $pointfield FROM userfield WHERE userid='$bbuserinfo[userid]'");
$gil=$gilstr[$pointfield];
$gilamt=$gilstr[$pointfield];
if ($gil='') {
$gil=0;
}else {
$postgil = ($gilamt + $giladd);
$DB_site->query("UPDATE userfield SET field5='$postgil' WHERE userid='$bbuserinfo[userid]'");
}