News:

Wondering if this will always be free?  See why free is better.

Main Menu

ST Shop

Started by Diego Andrés, June 13, 2009, 06:06:35 AM

Previous topic - Next topic

Diego Andrés

Link to the mod




ST Shop for SMF
Developed by: Diego Andrés
Original Developer: Sleepy Arcade™
Original Idea: Daniel15



Introduction
ST Shop allows you to add a shop to your forum and gives you a wide variety of options to customize your shop for your users experience.

Features
  • Enable shop
    • You can use the shop features as a standalone points system
  • Custom credits/currency
  • Add/Edit shop items
    • Image
    • Price
    • Categories
    • Stock
  • Purchase items from the shop
  • Custom categories
  • Trade center
  • Shop logs
    • Transaction logs
    • Bank logs
    • Trade logs
    • Gift logs
    • Sent credits logs
  • Casino/games room
    • Special game pass access to play
  • Inventories
    • Display inventories in your profile post
    • Select your favorite items to display
  • Shop stats

Localization
English


Changelog
GitHub

ST Shop Modules
Modules and Addons Discussion

SMF Tricks - Free & Premium Responsive Themes for SMF.

mrtrc266

WOOOHOOOO!!! Awesome Job wdm. I know you have workin workin day and night on this for a loooonnnnng time. Congrats on getting this released, it's been a blast helping test everything. This is a HUGE Improvement from the original SHOP Mod with many new features. It's only gonna get better from here. Many thanks Daniel for the concept and to all the people who've contributed to the Shop Mod and items over the years.

Awesome Job at taking this to the next level!


Garou

Having played around with this a little during the development stage I have to say you've come a long way and its very well done. A lot of sites will have a lot of fun with this.  :)

Amun

YAY IT IS HERE!!!! Since I saw your comment about the shop on your points mod thread I been checking daily for it's release and now it is here! I am so excited to try this out :D

Thank you x a million for this :D :D :D
:D :D :D

JBlaze

Nice mod. You should have a link to it in this topic though...
Jason Clemons
Former Team Member 2009 - 2012

SA™

Quote from: JBlaze on June 14, 2009, 01:12:58 PM
Nice mod. You should have a link to it in this topic though...

what you mean the link n my sig ?

and hank everybody for the comments:)
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

mrtrc266

Quote from: sleepy-arcade.ath.cx on June 14, 2009, 01:42:51 PM
Quote from: JBlaze on June 14, 2009, 01:12:58 PM
Nice mod. You should have a link to it in this topic though...

what you mean the link n my sig ?

and hank everybody for the comments:)

A link to the Mod on your first post here right before the description

Link to Mod

ArkServer

Quote from: mrtrc266 on June 14, 2009, 02:16:43 PM
Quote from: sleepy-arcade.ath.cx on June 14, 2009, 01:42:51 PM
Quote from: JBlaze on June 14, 2009, 01:12:58 PM
Nice mod. You should have a link to it in this topic though...

what you mean the link n my sig ?

and hank everybody for the comments:)

A link to the Mod on your first post here right before the description

Link to Mod

thats, and some screenshots would be nice.

Afro


SA™

heres a few screenie and i updated the first post with the link to mod
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Amun

Upon successful steal I get this message:

Unknown column 'username' in 'where clause'
File: /home/darkvoid/public_html/Sources/shop2/items/Steal.php
Line: 89

nothing happens and item remains. If steal fails no error message.
:D :D :D

SA™

can i see your Steal.php ? plaease
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Afro


DELHI_BOY

Plz make it for smf2 rc1-1 also

mrtrc266

Quote from: DELHI_BOY on June 18, 2009, 01:17:57 AM
Plz make it for smf2 rc1-1 also

This is for SMF RC1-1, I have it installed on SMF RC1-1 and it works perfectly.

What exaclty is the problem? Do you get any errors, if so what are the error messages?

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Amun

#16
Quote from: sleepy-arcade.ath.cx on June 17, 2009, 01:55:42 AM
can i see your Steal.php ? plaease


<?php

/**********************************************************************************

* SMFShop item                                                                    *

***********************************************************************************

* SMFShop: Shop MOD for Simple Machines Forum                                     *

* =============================================================================== *

* Software Version:           SMFShop 3.0 (Build 12)                              *

* $Date:: 2007-08-04 11:56:24 +0200 (za, 04 aug 2007)                           $ *

* $Id:: Steal.php 125 2007-08-04 09:56:24Z 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_Steal extends itemTemplate

{

function getItemDetails()

{

$this->authorName 'Daniel15';

$this->authorWeb 'http://www.dansoftaustralia.net/';

$this->authorEmail '[email protected]';



$this->name 'Steal Credits';

$this->desc 'Try to steal credits from another member!';

$this->price 50;



$this->require_input true;

$this->can_use_item true;

}



function getAddInput()

{

global $item_info;

if ($item_info[1] == 0$item_info[1] = 40;

return 'For steal, user <b>does NOT need to, and shouldn\'t</b> know the probability! It\'s more fun this way :-)<br />Probability of successful steal: <input type="text" name="info1" value="' $item_info[1]  . '" />%';

}



function getUseInput()

{

global $context$scripturl$settings$txt;

return 'Steal From: <input type="text" name="stealfrom" size="50" />

<a href="' 
$scripturl '?action=findmember;input=username;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><br />';

}



function onUse()

{

global $db_prefix$context$user_info$item_info$smcFunc;



// Check some inputs

if (!isset($_POST['stealfrom']) || $_POST['stealfrom'] == '') die('ERROR: Please enter a username to steal from!');



// This code from PersonalMessage.php5. It trims the " characters off the membername posted, 

// and then puts all names into an array

$_POST['stealfrom'] = strtr($_POST['stealfrom'], array('\\"' => '"'));

preg_match_all('~"([^"]+)"~'$_POST['stealfrom'], $matches);

$userArray array_unique(array_merge($matches[1], explode(','preg_replace('~"([^"]+)"~'''$_POST['stealfrom']))));



// We only want the first memberName found

$user $userArray[0];



// Get a random number between 0 and 100

$try mt_rand(0100);



// If successful

if ($try $item_info[1])

{

// Get stealee's (person we're stealing from) money count

$result $smcFunc['db_query'](''"

SELECT cash

FROM {db_prefix}members

WHERE member_name = 
{$user}");



// If user doesn't exist

if ($smcFunc['db_num_rows']($result) == 0)

die('ERROR: The specified user doesn\'t exist!');



$row $smcFunc['db_fetch_assoc']($result);



// Get random amount between 0 and amount of money stealee has

$steal_amount mt_rand(0$row['cash']);



// Take this money away from stealee...

$final_value1 =  $steal_amount $row['cash'];

        
updateMemberData($user, array('cash' => $final_value1));



//...and give to stealer (robber)

$final_value1 =  $steal_amount $user_info['cash'];

        
updateMemberData($context['user']['id'], array('cash' => $final_value1));





if ($steal_amount 50)

return 'Steal successful, although you only stole ' $steal_amount '!';

else

return 'Successfully stole ' $steal_amount ' from ' $user '! It\'s their fault they don\'t have their money in the bank!';

}

else

{

// If reducing Karma doesn't work, replace

// 'karma_bad = karma_bad + 10' with 'karma_good = karma_good - 10'



updateMemberData($context['user']['id'], array('karma_bad' => (int) 10));



   return 'Steal <b>unsuccessful!</b> Your Karma is now reduced by 10!';

}

}

}



?>




I should mention where I wrote 'username' in the error is the actual user name of the member. If that makes sense ;p
:D :D :D

DELHI_BOY

When i click on "Apply Mod", it show error in package.
It was 1 test failed in profile.template.php
Rest were sucessfully tested. So, i did nt installed it. Help me to install it.

SA™

@DELHI_BOY  go ahead and install it the profile template error is only adding the user cash to there profile it work with out it

if you install it you can post the profile.templete.php here and i can make the edit for you


@Amun try the attached steal.php
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

DELHI_BOY

I installed it and here profile.template.php
plz edit it for me.

Advertisement: