Author Topic: Girly items for the very lazy- part 2  (Read 5801 times)

Offline Organic

Girly items for the very lazy- part 2
« on: January 30, 2008, 05:19:13 am »
Like I said in part 1, these are not advanced. They're just here to save the lazy folks a few minutes of editing. If you want the cool graphics I use for them, let me know your email address & I'll package them up for you.

Pet Rock- save as petrockItem.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:: testitem.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.                                                  *
**********************************************************************************/

// This is just to make sure that the item is used through SMF, and people aren't accessing it directly
// Additionally, this is used elsewhere in SMF (in almost all the files)
if (!defined('SMF'))
die('Hacking attempt...');

/*
 * This is a very simple item example. For a slightly more advanced example
 * (one that gets input from the user), please see testitem2.php
 * Note that all items should try to follow the SMF Coding Guidelines, available
 * from http://custom.simplemachines.org/mods/guidelines.php
 *
 * Your class should always be called item_filename, eg. if your file is 
 * myCoolItem.php then the class should be called 'item_myCoolItem'. This 
 * class should always extend itemTemplate.
 */
class item_petrockItem extends itemTemplate
{

// When this function is called, you should set all the item's
// variables (see inside this example)
function getItemDetails()
{

// The author's name
$this->authorName 'Organic';
// The author's website
$this->authorWeb '';
// The author's email address
$this->authorEmail 'gettinggeeky@gmail.com';

// --- Values changeable from within the SMFShop admin panel ---
// The name of the item
$this->name 'Pet Rock';
// The item's description
$this->desc 'The groovy gift made popular in the 1970s.';
// The item's price
$this->price 5;

// --- Unchageable values ---
// These values can not be changed when adding the item, they are stuck on what you set them to here.

// Whether the item requires input or not. In this case, we don't need
// any input
$this->require_input false;
// Set this to 'false' if the item is unusable. This is good for display
// items, such as rocks :).
$this->can_use_item false;
}

// Since this item requires no input, we don't need to have a getUseInput function
// here (see the testitem2.php file if you want to make an item that needs input)

// This is where all the fun begins. This function is called when 
// the user actually uses the item. Return stuff, DON'T ECHO!
function onUse()
{
return 'Hello, I am a test!<br />This is all the test item does!!';
}
}


?>



2 dozen red roses- save as rosesItem.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:: testitem.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.                                                  *
**********************************************************************************/

// This is just to make sure that the item is used through SMF, and people aren't accessing it directly
// Additionally, this is used elsewhere in SMF (in almost all the files)
if (!defined('SMF'))
die('Hacking attempt...');

/*
 * This is a very simple item example. For a slightly more advanced example
 * (one that gets input from the user), please see testitem2.php
 * Note that all items should try to follow the SMF Coding Guidelines, available
 * from http://custom.simplemachines.org/mods/guidelines.php
 *
 * Your class should always be called item_filename, eg. if your file is 
 * myCoolItem.php then the class should be called 'item_myCoolItem'. This 
 * class should always extend itemTemplate.
 */
class item_rosesItem extends itemTemplate
{

// When this function is called, you should set all the item's
// variables (see inside this example)
function getItemDetails()
{

// The author's name
$this->authorName 'Organic';
// The author's website
$this->authorWeb '';
// The author's email address
$this->authorEmail 'gettinggeeky@gmail.com';

// --- Values changeable from within the SMFShop admin panel ---
// The name of the item
$this->name '2 dozen red roses';
// The item's description
$this->desc '24 long-stem roses would brighten the day of anyone that receives them.';
// The item's price
$this->price 65;

// --- Unchageable values ---
// These values can not be changed when adding the item, they are stuck on what you set them to here.

// Whether the item requires input or not. In this case, we don't need
// any input
$this->require_input false;
// Set this to 'false' if the item is unusable. This is good for display
// items, such as rocks :).
$this->can_use_item false;
}

// Since this item requires no input, we don't need to have a getUseInput function
// here (see the testitem2.php file if you want to make an item that needs input)

// This is where all the fun begins. This function is called when 
// the user actually uses the item. Return stuff, DON'T ECHO!
function onUse()
{
return 'Hello, I am a test!<br />This is all the test item does!!';
}
}


?>



Teddy Bear- save as teddyItem.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:: testitem.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.                                                  *
**********************************************************************************/

// This is just to make sure that the item is used through SMF, and people aren't accessing it directly
// Additionally, this is used elsewhere in SMF (in almost all the files)
if (!defined('SMF'))
die('Hacking attempt...');

/*
 * This is a very simple item example. For a slightly more advanced example
 * (one that gets input from the user), please see testitem2.php
 * Note that all items should try to follow the SMF Coding Guidelines, available
 * from http://custom.simplemachines.org/mods/guidelines.php
 *
 * Your class should always be called item_filename, eg. if your file is 
 * myCoolItem.php then the class should be called 'item_myCoolItem'. This 
 * class should always extend itemTemplate.
 */
class item_teddyItem extends itemTemplate
{

// When this function is called, you should set all the item's
// variables (see inside this example)
function getItemDetails()
{

// The author's name
$this->authorName 'Organic';
// The author's website
$this->authorWeb '';
// The author's email address
$this->authorEmail 'gettinggeeky@gmail.com';

// --- Values changeable from within the SMFShop admin panel ---
// The name of the item
$this->name 'Teddy Bear';
// The item's description
$this->desc 'A special friend to hug at the end of a rough day.';
// The item's price
$this->price 30.00;

// --- Unchageable values ---
// These values can not be changed when adding the item, they are stuck on what you set them to here.

// Whether the item requires input or not. In this case, we don't need
// any input
$this->require_input false;
// Set this to 'false' if the item is unusable. This is good for display
// items, such as rocks :).
$this->can_use_item false;
}

// Since this item requires no input, we don't need to have a getUseInput function
// here (see the testitem2.php file if you want to make an item that needs input)

// This is where all the fun begins. This function is called when 
// the user actually uses the item. Return stuff, DON'T ECHO!
function onUse()
{
return 'Hello, I am a test!<br />This is all the test item does!!';
}
}


?>



Offline eugeniu

Re: Girly items for the very lazy- part 2
« Reply #1 on: February 08, 2008, 12:41:42 pm »
So basically all of this is exactly what we could have done apart from not having any pictures to go along with it?

Offline Organic

Re: Girly items for the very lazy- part 2
« Reply #2 on: February 09, 2008, 07:58:31 am »
Yep.

Offline rparlett

Re: Girly items for the very lazy- part 2
« Reply #3 on: February 13, 2008, 04:15:19 am »
Thanks for these cool items. :D

Offline Lil_Mermaid_Girl

Re: Girly items for the very lazy- part 2
« Reply #4 on: June 07, 2008, 12:44:43 pm »
I'm sorry if this is a stupid question, but I'm very new to smf shop. What exactly happens or does a member get when if they were to buy one of these items?