Show Posts

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.


Messages - tazpot

Pages: 1 ... 3 4 [5]
61
General SMFShop Discussion / Re: Shop Ideas
« on: April 23, 2006, 12:49:41 am »
 :D see Daniel , Interest has started in the profile item images.   O0

62
Items / Re: Some Name Alteration Items
« on: April 22, 2006, 08:49:26 am »
 ;D Nice one SKETCHi i might use some of those when i get chance  O0

63
Items / Karma Bash item
« on: April 21, 2006, 05:59:02 am »
After a look at Basil Beards unofficial item tutorial i have created my first item and would like to share it with you. To use this item copy the code and save it as  KarmaBash.php then add it to...   smf/sources/shop/items 
It is an item to remove 10 karma points of another member.  :buck2:

Code: [Select]
<?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($resultMYSQL_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!";
}
}
?>


64
 ;D cheers Captain for a great tutorial i think using it i have already learnt a lot as this was my first ever attempt at php at all. As soon as i get chance i will add this to my board and let you know how i got on. O0

65
What do you think of this ? it is my first attempt at knocking a new item together and thought that rather than test it on the site i would get you guy's to give it the once over first and point out any obvious errors.

Code: [Select]
<?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($resultMYSQL_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);
}
}

?>

I have used bits of code from increasekarma.php and fiddled with it a bit. Any tips or advice would be great.

66
Aye captain that be a fine tutorial for the young noobs like myself. This shipmate is gonna be trying to learn to code in php and what a great place to start.

By the way i have been to your site and had a look around, very impressive shop i must say. O0

67
General SMFShop Discussion / Re: Shop Ideas
« on: April 16, 2006, 08:44:31 pm »
Hey Daniel any luck with the forum profile image thing that i asked about?
and do you have like a noobs guide on creating new items ie make one item effect another or whatever?  8)

68
General SMFShop Discussion / Re: Shop Ideas
« on: April 13, 2006, 03:56:23 am »
That would be great. 8)
And i don't mind beta testing it for you if you want as me site is very new and people are expecting the odd change whilst i fine tune and adjust it.  www.taffyshack.cjb.net
I have started to fill the shop with stuff but most are just images that i would like to be displayed on members profiles so that they mean something and not just sitting in their inventories. O0

69
General SMFShop Discussion / Re: Shop Ideas
« on: April 11, 2006, 05:06:57 am »
That looks like exactly what i am after, simply the ability to have items displayed so users can show off their purchases.

Obviously you are a very busy person but if you get chance then i think it would make a great addon item. O0 

Thanks Daniel  keep up the good work

70
General SMFShop Discussion / Re: Shop Ideas
« on: April 07, 2006, 06:22:49 am »
Firstly i think your SMFshop is brilliant and a very good way of keeping a board interesting.

Something i think might add to it is the ability for a purchased item (i.e an image about smilie size) to be displayed on a users postings under their avatar in the forums. I have seen this done using your shop but i can't find any mention of it here and assume they did it themselves by fiddling with the code.
 I have no experience in this mind boggling field and would love to hear your thoughts or guidance in doing this.

p.s the site i have seen it done is at  www.matchbox360.co.uk       Thanks   Tazpot

Pages: 1 ... 3 4 [5]