Advertisement:

Author Topic: ST Shop for SMF  (Read 191191 times)

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,248
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
ST Shop for SMF
« on: June 13, 2009, 06:06:35 AM »
Link to Mod



ST Shop for SMF
[Próximamente]
Developed by Diego Andrés
Original Author: SA™
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



Changelog
GitHub



License
Code: [Select]
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0
If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/

The contents of this package are subject to the Mozilla Public License Version
2.0 (the "License"); you may not use this package except in compliance with
the License. You may obtain a copy of the License at
https://www.mozilla.org/MPL/
 *
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
« Last Edit: July 17, 2015, 08:26:05 PM by Diego Andrés »

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: SA Shop 0.2.2 Beta 4.1
« Reply #1 on: June 13, 2009, 10:43:04 PM »
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!
 
 

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: SA Shop 0.2.2 Beta 4.1
« Reply #2 on: June 14, 2009, 10:41:11 AM »
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.  :)

Offline Amun

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
    • DarkVoid Poetry
Re: SA Shop 0.2.2 Beta 4.1
« Reply #3 on: June 14, 2009, 01:05:44 PM »
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

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,158
  • Gender: Male
    • @fragicide on Twitter
Re: SA Shop 0.2.2 Beta 4.1
« Reply #4 on: June 14, 2009, 01:12:58 PM »
Nice mod. You should have a link to it in this topic though...
Jason Clemons
Former Lead Customizer/Support Specialist
Twitter | Facebook | Instagram

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Shop 0.2.2 Beta 4.1
« Reply #5 on: June 14, 2009, 01:42:51 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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: SA Shop 0.2.2 Beta 4.1
« Reply #6 on: June 14, 2009, 02:16:43 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
 

Offline ArkServer

  • SMF Hero
  • ******
  • Posts: 1,831
  • My posts are my own
    • BlushyFace | A spoopy and creppy site
Re: SA Shop 0.2.2 Beta 4.1
« Reply #7 on: June 14, 2009, 03:24:41 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.

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SA Shop 0.2.2 Beta 4.1
« Reply #8 on: June 14, 2009, 05:03:00 PM »
any screenshot

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Shop 0.2.2 Beta 4.1
« Reply #9 on: June 14, 2009, 05:10:11 PM »
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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline Amun

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
    • DarkVoid Poetry
Re: SA Shop 0.2.2 Beta 4.1
« Reply #10 on: June 16, 2009, 05:13:32 PM »
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

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Shop 0.2.2 Beta 4.1
« Reply #11 on: June 17, 2009, 01:55:42 AM »
can i see your Steal.php ? plaease
http://samods.github.io/SAChatBar/

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

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: SA Shop 0.2.2 Beta 4.1
« Reply #12 on: June 17, 2009, 04:12:47 AM »
cool mod..

Offline DELHI_BOY

  • Jr. Member
  • **
  • Posts: 105
Re: SA Shop 0.2.2 Beta 4.1
« Reply #13 on: June 18, 2009, 01:17:57 AM »
Plz make it for smf2 rc1-1 also

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: SA Shop 0.2.2 Beta 4.1
« Reply #14 on: June 18, 2009, 01:37:15 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?

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Shop 0.2.2 Beta 4.1
« Reply #15 on: June 18, 2009, 01:47:19 AM »
SMF Versions supported
SMF 2.0 RC1-1 is supported by SA Shop .

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

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

Offline Amun

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
    • DarkVoid Poetry
Re: SA Shop 0.2.2 Beta 4.1
« Reply #16 on: June 18, 2009, 01:48:49 PM »
can i see your Steal.php ? plaease

Code: [Select]
<?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 'dansoft@dansoftaustralia.net';



$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
« Last Edit: June 18, 2009, 01:52:41 PM by Amun »
:D :D :D

Offline DELHI_BOY

  • Jr. Member
  • **
  • Posts: 105
Re: SA Shop 0.2.2 Beta 4.1
« Reply #17 on: June 18, 2009, 03:51:00 PM »
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.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Shop 0.2.2 Beta 4.1
« Reply #18 on: June 18, 2009, 04:37:36 PM »
@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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline DELHI_BOY

  • Jr. Member
  • **
  • Posts: 105
Re: SA Shop 0.2.2 Beta 4.1
« Reply #19 on: June 19, 2009, 07:14:30 AM »
I installed it and here profile.template.php
plz edit it for me.