Author Topic: Remove bad karma  (Read 11396 times)

Offline Alundra

Remove bad karma
« on: September 27, 2007, 07:52:25 am »
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 lol

i think it would be great

Offline Alundra

Re: Remove bad karma
« Reply #1 on: September 27, 2007, 07:53:45 am »
LOL!!
im sorry...i put this in the wrong topic  :-\

now i feel REALLY blonde lol

Offline zsw007

Re: Remove bad karma
« Reply #2 on: October 09, 2007, 05:40:16 am »
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 lol

i think it would be great

you could just do
Code: [Select]
SET karmaBad = karmaBad - {$item_info[1]}ect
Quote from: zsw007
im not an expert yet,sorry

Applaud me if you like my post(which means i helped you), i like Applauds :P

Offline Alundra

Re: Remove bad karma
« Reply #3 on: October 09, 2007, 06:24:07 am »
i dont know how to make a mod..
 ???

Offline zsw007

Re: Remove bad karma
« Reply #4 on: October 13, 2007, 06:40:40 am »
i dont know how to make a mod..
 ???

im not an expert either, but try this:

name the file RemoveBadKarma.php

Code: [Select]
<?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] . '!';
}

}

?>



if this is not right, someone please correct me  :)
« Last Edit: October 14, 2007, 08:17:52 am by zsw007 »
Quote from: zsw007
im not an expert yet,sorry

Applaud me if you like my post(which means i helped you), i like Applauds :P

Offline Alundra

Re: Remove bad karma
« Reply #5 on: October 15, 2007, 11:39:27 am »
WOOOO!!
IT WORKED!!


DUDE YOU RULE!!

:D :D :D :D :D :D :D :D :D:D :D

Offline feildmaster

Re: Remove bad karma
« Reply #6 on: October 17, 2007, 02:08:36 pm »
lol, i was thinking do something like that, but if you used the sum value of it, it would add soooo much more fame.

like... 1000 good karma - 900 bad = 100. then get rid of bad would do... a 900 jump up. so it depends on what u would use.

Offline mike dijital

Re: Remove bad karma
« Reply #7 on: October 17, 2008, 11:52:06 am »
Works great on 1.1.6!

Offline KaanSef

Re: Remove bad karma
« Reply #8 on: July 12, 2010, 04:57:40 am »
Advanced Reputation System mod?modified?