61
General SMFShop Discussion / Re: Shop Ideas
« on: April 23, 2006, 12:49:41 am »
see Daniel , Interest has started in the profile item images.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: KarmaBash.php
// Item
//VERSION: 1.1 (Build 4)
//DATE: 10th April 2005
//Author Tazpot
//Helped by Basil Beard
class item_KarmaBash extends itemTemplate {
function getItemDetails() {
$this->name = "Karma Bash";
$this->desc = "Bash 10 points of another members karma";
$this->price = 50;
$this->require_input = true;
$this->can_use_item = true;
}
function getUseInput() {
global $context, $scripturl, $settings, $txt;
return "Karma Bash: <input type='text' name='bashwho' size='50'>
<a href='{$scripturl}?action=findmember;input=bashwho;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a>";
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$result = db_query("UPDATE {$db_prefix}members
SET karmaBad = karmaBad + 10
WHERE membername = '{$_POST['bashwho']}'"
,__FILE__, __LINE__);
return "Successfully bashed 10 karma points from {$_POST['bashwho']}!";
$result = db_query("SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '{$_POST[‘bashwho’]}'", __FILE__, __LINE__);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$pmfrom = array(
'id' => 1,
'name' => 'Tazpot',
'username' => 'Tazpot'
);
$pmto = array(
'to' => array($row['ID_MEMBER']),
'bcc' => array()
);
sendpm($pmto, 'You have been bashed', "{$user} bashed 10 points off your karma! [i] You do not need to reply to this automated message[/i]", 0, $pmfrom);
return "You have bashed {$_POST['bashwho']} for 10 points off their karma!";
}
}
?>
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: KarmaBash.php
// Item
//VERSION: 1.1 (Build 4)
//DATE: 10th April 2005
class item_KarmaBash extends itemTemplate {
function getItemDetails() {
$this->name = "Karma Bash";
$this->desc = "Bash 10 points of another members karma";
$this->price = 50;
$this->require_input = true;
$this->can_use_item = true;
}
function getUseInput() {
global $context, $scripturl, $settings, $txt;
return "Karma Bash: <input type='text' name='bashwho' size='50'>
<a href='{$scripturl}?action=findmember;input=bashwho;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a>";
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$result = db_query("UPDATE {$db_prefix}members
SET karmaBad = karmaBad + 10
WHERE membername = {$_POST['bashwho']}",
__FILE__, __LINE__);
return "Successfully bashed 10 karma points from {$_POST['bashwho']}!";
$result = db_query("SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '{$_POST[‘bashwho’]}'", __FILE__, __LINE__);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$pmfrom = array(
'id' => 1,
'name' => 'Tazpot',
'username' => 'Tazpot'
);
$pmto = array(
to' => array($row['ID_MEMBER']),
'bcc' => array()
);
sendpm($pmto, 'You have been bashed', “{$user} bashed 10 points off your karma."”! [i] You do not need to reply to this automated message”, 0, $pmfrom);
}
}
?>