i want something that lets users shake off some bad karma for a fee...i have the karma separated as 10/-10 and i wish for the -10 side to change loli think it would be great
SET karmaBad = karmaBad - {$item_info[1]}
im not an expert yet,sorry
i dont know how to make a mod..
<?php/*********************************************************************************** SMFShop item ************************************************************************************* SMFShop: Shop MOD for Simple Machines Forum ** =============================================================================== ** Software Version: SMFShop 3.0 (Build 12) ** $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007) $ ** $Id:: IncreaseKarma.php 79 2007-01-18 08:26:55Z daniel15 $ ** Software by: DanSoft Australia (http://www.dansoftaustralia.net/)** Copyright 2005-2007 by: DanSoft Australia (http://www.dansoftaustralia.net/)** Support, News, Updates at: http://www.dansoftaustralia.net/ ** ** Forum software by: Simple Machines (http://www.simplemachines.org) ** Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) ** 2001-2006 by: Lewis Media (http://www.lewismedia.com) ************************************************************************************* This program is free software; you may redistribute it and/or modify it under ** the terms of the provided license as published by Simple Machines LLC. ** ** This program is distributed in the hope that it is and will be useful, but ** WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY ** or FITNESS FOR A PARTICULAR PURPOSE. ** ** See the "license.txt" file for details of the Simple Machines license. ** The latest version of the license can always be found at ** http://www.simplemachines.org. ***********************************************************************************/if (!defined('SMF')) die('Hacking attempt...');class item_RemoveBadKarma extends itemTemplate{ function getItemDetails() { $this->authorName = 'zsw'; $this->authorWeb = 'http://www1.freewebs.com/sgasquad/joinsga.htm'; $this->authorEmail = 'zsw007@hotmail.com'; $this->name = 'Remove Bad Karma by xxx'; $this->desc = 'Remove your Bad Karma by xxx'; $this->price = 200; $this->require_input = false; $this->can_use_item = true; $this->addInput_editable = true; } // See 'AddToPostCount.php' for info on how this works function getAddInput() { global $user_info; if ($item_info[1] == 0) $item_info[1] = 5; return 'Amount to remove bad Karma by: <input type="text" name="info1" value="' . $item_info[1] . '" />'; } function onUse() { global $db_prefix, $ID_MEMBER, $item_info; db_query(" UPDATE {$db_prefix}members SET karmaBad = karmaBad - {$item_info[1]} WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__); return 'Successfully removed your bad Karma by ' . $item_info[1] . '!'; }}?>