Version: 1.00, by X-Fan
Developer Last Online: Apr 2005
Version: 2.2.x
Rating:
Released: 09-14-2003
Last Update: Never
Installs: 6
Is in Beta Stage
No support by the author.
G'day all,
This is my first released hack for vBulletin, so please be gentle with me! I'm not a hacker myself by any stretch of the imagination, as this hack is basically adapted from another. As always, back-up your files and your database before installing. It works on my heavily-hacked v2.3.0 board, and should (in theory) work on any board that Lesane's Store Hack works on, but better safe than sorry!
This hack is only useful for those boards that use both the Store and g-force2k2's Warning Hack v2.1, though I'm sure it could quite easily be adapted to work with other such warnings systems.
Hack Name: Store Redemption Hack v1.0 for vBulletin 2.x.x
Hack Author: X-Fan (x-fan@bigpond.net.au)
Inspired by: Dark Jim's More Private Messages Quota Hack
Thanks to: N9ne and Mist for their help in getting this hack working!
Required: g-force2k2's Warning Hack v2.1
First Release: 15 September 2003
Description: This add-on for Lesane's Store Hack will give users the opportunity to redeem themselves by paying for a warning point to be removed from their account.
Installation is pretty simple. There's one query to run, three templates to make, and one file to edit.
Here's hoping your users appreciate the opportunity to redeem themselves! If you use this hack, please don't forget to click install. Any questions, feel free to ask.
Cheers,
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Ah, you don't have the Store Staff Discount hack installed.
Okay, in store.php, find:
PHP Code:
// ###################### Start Remove Warning Verify ####################### if ($action=="removewarn") { $contest = $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'"); $storeid=$contest[id]; $costpercent=$DB_site->query_first("SELECT storecost FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]"); $cost=round($contest[costs] * ($costpercent[storecost]/100)); $need=$points - $cost;
if ($cost>$points) { eval("standarderror(\"".gettemplate('store_error')."\");"); } $warns = $DB_site->query_first("SELECT warninglvl FROM user WHERE userid=$bbuserinfo[userid]"); if ($warns['warninglvl'] < 1 or empty($warns['warninglvl'])) { eval("standarderror(\"".gettemplate('store_removewarn_error')."\");"); } $oldwarnings=$warns[warninglvl]; $newwarnings=$oldwarnings-1; eval("dooutput(\"".gettemplate("store_removewarn_verify")."\");"); } // ###################### Start Remove Warning ####################### if ($action=="removewarndo") { $contest = $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'"); $title=$contest[title]; $costpercent=$DB_site->query_first("SELECT storecost FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]"); $cost=round($contest[costs] * ($costpercent[storecost]/100));
if ($cost>$points) { eval("standarderror(\"".gettemplate('store_error')."\");"); } else { $DB_site->query("UPDATE user SET warninglvl=warninglvl-1,storep=storep-$cost WHERE userid='$bbuserinfo[userid]'"); $changestorenow = $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='removewarn'"); $moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]"); $money = $moneycheck[storep]; eval("dooutput(\"".gettemplate("store_removewarn_done")."\");"); } }
And replace with:
PHP Code:
// ###################### Start Remove Warning Verify ####################### if ($action=="removewarn") { $contest = $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'"); $storeid=$contest[id]; $cost=$contest[costs]; $need=$points - $cost;
if ($cost>$points) { eval("standarderror(\"".gettemplate('store_error')."\");"); } $warns = $DB_site->query_first("SELECT warninglvl FROM user WHERE userid=$bbuserinfo[userid]"); if ($warns['warninglvl'] < 1 or empty($warns['warninglvl'])) { eval("standarderror(\"".gettemplate('store_removewarn_error')."\");"); } $oldwarnings=$warns[warninglvl]; $newwarnings=$oldwarnings-1; eval("dooutput(\"".gettemplate("store_removewarn_verify")."\");"); } // ###################### Start Remove Warning ####################### if ($action=="removewarndo") { $contest = $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'"); $title=$contest[title]; $cost=$contest[costs];
if ($cost>$points) { eval("standarderror(\"".gettemplate('store_error')."\");"); } else { $DB_site->query("UPDATE user SET warninglvl=warninglvl-1,storep=storep-$cost WHERE userid='$bbuserinfo[userid]'"); $changestorenow = $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='removewarn'"); $moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]"); $money = $moneycheck[storep]; eval("dooutput(\"".gettemplate("store_removewarn_done")."\");"); } }
That should work. I'll update the install instructions to take this into account as well.
Well, sorry, but I had to ask. I can't think of any reason why it wouldn't be showing up. Just make sure you followed the steps in the txt file as listed and you shouldn't have any problems.