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.
Nice mod. You should have a link to it in this topic though...
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:)
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 (http://custom.simplemachines.org/mods/index.php?mod=1794)
Plz make it for smf2 rc1-1 also
SMF Versions supported
SMF 2.0 RC1-1 is supported by SA Shop .
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 = '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(0, 100);
// 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!';
}
}
}
?>
//shop Start
$txt['whoall_shop_bank'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=bank">Banco do Shopping</a>';
$txt['whoall_shop_gift'] = 'Enviando um <a href="' . $scripturl . '?action=shop;sa=gift">Presente</a>';
$txt['whoall_shop_inventory2'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=inventory2">inventário</a> de algum usuário';
$txt['whoall_shop_inventory'] = 'Vendo o seu <a href="' . $scripturl . '?action=shop;sa=inventory">Inventário</a>';
$txt['whoall_shop_buy'] = 'Comprando itens no <a href="' . $scripturl . '?action=shop;sa=buy">Shopping do Fórum</a>';
$txt['whoall_shop'] = 'Vendo o <a href="' . $scripturl . '?action=shop">Shopping do Fórum</a>';
$txt['whoall_gameroom'] = 'Jogando no <a href="' . $scripturl . '?action=shop;sa=gameroom">Salão de jogos</a>';
$txt['shop_settingsm'] = 'Configurações';
$txt['MoneySettings'] = 'Créditos';
$txt['shop_admin_invent'] = 'Inventário';
$txt['itemsssss'] = 'Itens';
$txt['AddItems'] = 'Adicionar itens';
$txt['RestockItems'] = 'Repor itens';
$txt['shop_admin_catlist'] = 'Categorias';
$txt['MainSettings'] = 'Configurações';
$txt['shop_procredit'] = 'Créditos';
$txt['shop_shop2'] = 'SA Shopping';
$txt['shop_tab_main'] ='Shopping';
$txt['permissionname_view_shop'] = 'Acessar o shopping';
$txt['permissionname_view_buy'] = 'Autorizado a comprar itens';
$txt['permissionhelp_view_buy'] = 'Se o usuário é autorizado a comprar itens';
$txt['cannot_view_buy'] = 'Você não pode comprar itens.';
$txt['permissionhelp_view_shop'] = 'Se o usuário é autorizado a acessar o shopping';
$txt['cannot_view_shop'] = 'Você não pode acessar o shopping.';
$txt['permissiongroup_shop'] = 'Shopping';
$txt['permissionname_view_gameroom'] = 'Acesso ao salão de jogos';
$txt['permissionhelp_view_gameroom'] = 'Se o usuário é autorizado a acessar o salão de jogos';
$txt['cannot_view_gameroom'] = 'Você não pode acessar o salão de jogos.';
$txt['permissionname_view_trade'] = 'Acesso ao centro de trocas';
$txt['permissionhelp_view_trade'] = 'Se o usuário é autorizado a acessar o centro de trocas';
$txt['cannot_view_trade'] = 'Você não pode acessar o centro de trocas.';
$txt['permissionname_view_bank'] = 'Acesso ao banco';
$txt['permissionhelp_view_bank'] = 'Se o usuário é autorizado a acessar o banco';
$txt['cannot_view_bank'] = 'Você não pode acessar o banco.';
$txt['permissionname_view_gift'] = 'Autorizado a dar presentes';
$txt['permissionhelp_view_gift'] = 'Se o usuário é autorizado a dar presentes';
$txt['cannot_view_gift'] = 'Você não pode dar presentes.';
$txt['permissionname_view_othersinv'] = 'Autorizado a ver o inventário dos outros usuários';
$txt['permissionhelp_view_othersinv'] = 'Se o usuário é autorizado a ver o inventário dos outros usuários';
$txt['cannot_view_othersinv'] = 'Você não pode ver este inventário.';
//shop End
// Now create the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=shop;sa=buy;sort=' . $_REQUEST['start'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $kittens, 10);
$context['start'] = $_REQUEST['start'];
// Now create the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=shop;sa=buy;cat='.$cat.';sort=' . $_REQUEST['start'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $kittens, 10);
$context['start'] = $_REQUEST['start'];
by the way is Modifications.portuguese_brazilian-utf8 one language or two different ones ? like is it Modifications.brazilian-utf8 and Modifications.portuguese-utf8 or just Modifications.portuguese_brazilian-utf8??
//shop Start
$txt['whoall_shop_bank'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=bank">Banco do Shopping</a>';
$txt['whoall_shop_gift'] = 'Enviando um <a href="' . $scripturl . '?action=shop;sa=gift">Presente</a>';
$txt['whoall_shop_inventory2'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=inventory2">inventário</a> de algum usuário';
$txt['whoall_shop_inventory'] = 'Vendo o seu <a href="' . $scripturl . '?action=shop;sa=inventory">Inventário</a>';
$txt['whoall_shop_buy'] = 'Comprando itens no <a href="' . $scripturl . '?action=shop;sa=buy">Shopping do Fórum</a>';
$txt['whoall_shop'] = 'Vendo o <a href="' . $scripturl . '?action=shop">Shopping do Fórum</a>';
$txt['whoall_gameroom'] = 'Jogando no <a href="' . $scripturl . '?action=shop;sa=gameroom">Salão de jogos</a>';
$txt['shop_settingsm'] = 'Configurações';
$txt['MoneySettings'] = 'Créditos';
$txt['shop_admin_invent'] = 'Inventário';
$txt['itemsssss'] = 'Itens';
$txt['AddItems'] = 'Adicionar itens';
$txt['RestockItems'] = 'Repor itens';
$txt['shop_admin_catlist'] = 'Categorias';
$txt['MainSettings'] = 'Configurações';
$txt['shop_procredit'] = 'Créditos';
$txt['shop_shop2'] = 'SA Shopping';
$txt['shop_tab_main'] ='Shopping';
$txt['permissionname_view_shop'] = 'Acessar o shopping';
$txt['permissionname_view_buy'] = 'Autorizado a comprar itens';
$txt['permissionhelp_view_buy'] = 'Se o usuário é autorizado a comprar itens';
$txt['cannot_view_buy'] = 'Você não pode comprar itens.';
$txt['permissionhelp_view_shop'] = 'Se o usuário é autorizado a acessar o shopping';
$txt['cannot_view_shop'] = 'Você não pode acessar o shopping.';
$txt['permissiongroup_shop'] = 'Shopping';
$txt['permissionname_view_gameroom'] = 'Acesso ao salão de jogos';
$txt['permissionhelp_view_gameroom'] = 'Se o usuário é autorizado a acessar o salão de jogos';
$txt['cannot_view_gameroom'] = 'Você não pode acessar o salão de jogos.';
$txt['permissionname_view_trade'] = 'Acesso ao centro de trocas';
$txt['permissionhelp_view_trade'] = 'Se o usuário é autorizado a acessar o centro de trocas';
$txt['cannot_view_trade'] = 'Você não pode acessar o centro de trocas.';
$txt['permissionname_view_bank'] = 'Acesso ao banco';
$txt['permissionhelp_view_bank'] = 'Se o usuário é autorizado a acessar o banco';
$txt['cannot_view_bank'] = 'Você não pode acessar o banco.';
$txt['permissionname_view_gift'] = 'Autorizado a dar presentes';
$txt['permissionhelp_view_gift'] = 'Se o usuário é autorizado a dar presentes';
$txt['cannot_view_gift'] = 'Você não pode dar presentes.';
$txt['permissionname_view_othersinv'] = 'Autorizado a ver o inventário dos outros usuários';
$txt['permissionhelp_view_othersinv'] = 'Se o usuário é autorizado a ver o inventário dos outros usuários';
$txt['cannot_view_othersinv'] = 'Você não pode ver este inventário.';
//shop End
Thanks for the fix, but let's warn users this code is duplicated, so I changed twice...no only once you need change one is for the shop buy and the other is for yout inventory
Thanks for the fix, but let's warn users this code is duplicated, so I changed twice...no only once you need change one is for the shop buy and the other is for yout inventory
//shop Start
$txt['whoall_shop_bank'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=bank">Banco do Shopping</a>';
$txt['whoall_shop_gift'] = 'Enviando um <a href="' . $scripturl . '?action=shop;sa=gift">Presente</a>';
$txt['whoall_shop_inventory2'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=inventory2">inventário</a> de algum usuário';
$txt['whoall_shop_inventory'] = 'Vendo o seu <a href="' . $scripturl . '?action=shop;sa=inventory">Inventário</a>';
$txt['whoall_shop_buy'] = 'Comprando itens no <a href="' . $scripturl . '?action=shop;sa=buy">Shopping do Fórum</a>';
$txt['whoall_shop'] = 'Vendo o <a href="' . $scripturl . '?action=shop">Shopping do Fórum</a>';
$txt['whoall_gameroom'] = 'Jogando no <a href="' . $scripturl . '?action=shop;sa=gameroom">Salão de jogos</a>';
$txt['shop_settingsm'] = 'Configurações';
$txt['MoneySettings'] = 'Créditos';
$txt['shop_admin_invent'] = 'Inventário';
$txt['itemsssss'] = 'Itens';
$txt['AddItems'] = 'Adicionar itens';
$txt['RestockItems'] = 'Repor itens';
$txt['shop_admin_catlist'] = 'Categorias';
$txt['MainSettings'] = 'Configurações';
$txt['shop_procredit'] = 'Créditos';
$txt['shop_shop2'] = 'SA Shopping';
$txt['shop_tab_main'] ='Shopping';
$txt['permissionname_view_shop'] = 'Acessar o shopping';
$txt['permissionname_view_buy'] = 'Autorizado a comprar itens';
$txt['permissionhelp_view_buy'] = 'Se o usuário é autorizado a comprar itens';
$txt['cannot_view_buy'] = 'Você não pode comprar itens.';
$txt['permissionhelp_view_shop'] = 'Se o usuário é autorizado a acessar o shopping';
$txt['cannot_view_shop'] = 'Você não pode acessar o shopping.';
$txt['permissiongroup_shop'] = 'Shopping';
$txt['permissionname_view_gameroom'] = 'Acesso ao salão de jogos';
$txt['permissionhelp_view_gameroom'] = 'Se o usuário é autorizado a acessar o salão de jogos';
$txt['cannot_view_gameroom'] = 'Você não pode acessar o salão de jogos.';
$txt['permissionname_view_trade'] = 'Acesso ao centro de trocas';
$txt['permissionhelp_view_trade'] = 'Se o usuário é autorizado a acessar o centro de trocas';
$txt['cannot_view_trade'] = 'Você não pode acessar o centro de trocas.';
$txt['permissionname_view_bank'] = 'Acesso ao banco';
$txt['permissionhelp_view_bank'] = 'Se o usuário é autorizado a acessar o banco';
$txt['cannot_view_bank'] = 'Você não pode acessar o banco.';
$txt['permissionname_view_gift'] = 'Autorizado a dar presentes';
$txt['permissionhelp_view_gift'] = 'Se o usuário é autorizado a dar presentes';
$txt['cannot_view_gift'] = 'Você não pode dar presentes.';
$txt['permissionname_view_othersinv'] = 'Autorizado a ver o inventário dos outros usuários';
$txt['permissionhelp_view_othersinv'] = 'Se o usuário é autorizado a ver o inventário dos outros usuários';
$txt['cannot_view_othersinv'] = 'Você não pode ver este inventário.';
//shop End
//shop Start
$txt['whoall_shop_bank'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=bank">Banco do Shopping</a>';
$txt['whoall_shop_gift'] = 'Enviando um <a href="' . $scripturl . '?action=shop;sa=gift">Presente</a>';
$txt['whoall_shop_inventory2'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=inventory2">inventário</a> de algum usuário';
$txt['whoall_shop_inventory'] = 'Vendo o seu <a href="' . $scripturl . '?action=shop;sa=inventory">Inventário</a>';
$txt['whoall_shop_buy'] = 'Comprando itens no <a href="' . $scripturl . '?action=shop;sa=buy">Shopping do Fórum</a>';
$txt['whoall_shop'] = 'Vendo o <a href="' . $scripturl . '?action=shop">Shopping do Fórum</a>';
$txt['whoall_gameroom'] = 'Jogando no <a href="' . $scripturl . '?action=shop;sa=gameroom">Salão de jogos</a>';
$txt['shop_settingsm'] = 'Configurações';
$txt['MoneySettings'] = 'Créditos';
$txt['shop_admin_invent'] = 'Inventário';
$txt['itemsssss'] = 'Itens';
$txt['AddItems'] = 'Adicionar itens';
$txt['RestockItems'] = 'Repor itens';
$txt['shop_admin_catlist'] = 'Categorias';
$txt['MainSettings'] = 'Configurações';
$txt['shop_procredit'] = 'Créditos';
$txt['shop_shop2'] = 'SA Shopping';
$txt['shop_tab_main'] ='Shopping';
$txt['permissionname_view_shop'] = 'Acessar o shopping';
$txt['permissionname_view_buy'] = 'Autorizado a comprar itens';
$txt['permissionhelp_view_buy'] = 'Se o usuário é autorizado a comprar itens';
$txt['cannot_view_buy'] = 'Você não pode comprar itens.';
$txt['permissionhelp_view_shop'] = 'Se o usuário é autorizado a acessar o shopping';
$txt['cannot_view_shop'] = 'Você não pode acessar o shopping.';
$txt['permissiongroup_shop'] = 'Shopping';
$txt['permissionname_view_gameroom'] = 'Acesso ao salão de jogos';
$txt['permissionhelp_view_gameroom'] = 'Se o usuário é autorizado a acessar o salão de jogos';
$txt['cannot_view_gameroom'] = 'Você não pode acessar o salão de jogos.';
$txt['permissionname_view_trade'] = 'Acesso ao centro de trocas';
$txt['permissionhelp_view_trade'] = 'Se o usuário é autorizado a acessar o centro de trocas';
$txt['cannot_view_trade'] = 'Você não pode acessar o centro de trocas.';
$txt['permissionname_view_bank'] = 'Acesso ao banco';
$txt['permissionhelp_view_bank'] = 'Se o usuário é autorizado a acessar o banco';
$txt['cannot_view_bank'] = 'Você não pode acessar o banco.';
$txt['permissionname_view_gift'] = 'Autorizado a dar presentes';
$txt['permissionhelp_view_gift'] = 'Se o usuário é autorizado a dar presentes';
$txt['cannot_view_gift'] = 'Você não pode dar presentes.';
$txt['permissionname_view_othersinv'] = 'Autorizado a ver o inventário dos outros usuários';
$txt['permissionhelp_view_othersinv'] = 'Se o usuário é autorizado a ver o inventário dos outros usuários';
$txt['cannot_view_othersinv'] = 'Você não pode ver este inventário.';
//shop End
ERROR: Cannot open Sources/shop/items dir!
there is a few items overn my site i dont know if thee is one to do what you want i cant rember now lol
i sure custom title one is there by default ? could be wrong tho lol
[/quote
hi sleepy, i posted on your site but i dont think you check your posts im not sure..
but i am trying to make it, so where someone buys a item, they get the item, and a link is allowed in the item, but hidden until boughten, understand?
buy item >> unhide link
ive been trying to figure this out, but it will be a link to other sites, and i cant figure this out, can you help me plz, i added you on msn, kiefer-rules...
byby
Fatal error: require() [function.require]: Failed opening required '/home/twitch/public_html/forum/Sources/shop2/items/ChangeUsername.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/twitch/public_html/forum/Sources/shop2/Shop.php on line 429
it saying it looking for a file the file being ChangeUsername.php is that in sources/shop2/items?Nope where do i get that file?
yup thx i knew bout that one
SA Shop 0.4 realsed added rc2 support
realy i cant replicate this any way point is an integer not a string i think float will be better ill do sommore testing wioth that jusdtm to make sure
die($string)
instead offatal_error($string,$log)
ast3r1x (http://smf.houseofsmoky.com/index.php?action=profile;u=9)Games Room Images
You need to buy a ticket to able to access it even if you are the admin.
ast3r1x (http://smf.houseofsmoky.com/index.php?action=profile;u=9)Games Room Images
hey SA, I was looking at your shop mod again and I wondered what the games room part of the shop is supposed to do?
~thanks
//shop Start
$txt['Shop_ver'] = 'Versión/Creditos';
$txt['whoall_shop_bank'] = 'Viendo el <a href="' . $scripturl . '?action=shop;sa=bank">Banco</a>';
$txt['whoall_shop_gift'] = 'Enviando un<a href="' . $scripturl . '?action=shop;sa=gift">Regalo</a>';
$txt['whoall_shop_inventory2'] = 'Miembros viendo el <a href="' . $scripturl . '?action=shop;sa=inventory2">Inventorio</a>';
$txt['whoall_shop_inventory'] = 'Viendo su <a href="' . $scripturl . '?action=shop;sa=inventory">Inventorio</a>';
$txt['whoall_shop_buy'] = 'Comprando items en <a href="' . $scripturl . '?action=shop;sa=buy">la Tienda</a>';
$txt['whoall_shop'] = 'Viendo la <a href="' . $scripturl . '?action=shop">Tienda</a>';
$txt['whoall_gameroom'] = 'Jugando en la <a href="' . $scripturl . '?action=shop;sa=gameroom">Sala de juegos</a>';
$txt['shop_mainten'] = 'Mantenimiento';
$txt['shop_admin_usergroup'] = 'Funciones de rangos';
$txt['View_Inventory2'] ='Ver inventorio';
$txt['View_Inventory'] ='Ver inventorio';
$txt['shop_settingsm'] = 'Configuración principal';
$txt['MoneySettings'] = 'Configuración de dinero';
$txt['shop_admin_invent'] = 'Inventario';
$txt['itemsssss'] = 'Items';
$txt['AddItems'] = 'Ańadir Items';
$txt['RestockItems'] = 'Restaurar Items';
$txt['shop_admin_catlist'] = 'Categorías';
$txt['MainSettings'] = 'Car. Principales';
$txt['shop_procredit'] = 'Creditos';
$txt['shop_shop2'] = 'Tienda SA';
$txt['shop_tab_main'] ='Tienda';
$txt['permissiongroup_simple_shop'] = 'Tienda';
$txt['permissionname_view_shop'] = 'Acceso a la Tienda';
$txt['permissionname_view_buy'] = 'Permitirles comprar items';
$txt['permissionhelp_view_buy'] = 'El usuario tiene permiso de comprar items';
$txt['cannot_view_buy'] = 'No puedes comprar items';
$txt['permissionhelp_view_shop'] = 'Tiene acceso a la Tienda';
$txt['cannot_view_shop'] = 'No puedes ver la tienda.';
$txt['permissiongroup_shop'] = 'Tienda';
$txt['permissionname_view_gameroom'] = 'Acceder a la Sala de Juegos';
$txt['permissionhelp_view_gameroom'] = 'Los usuarios tienen acceso a la Sala de Juegos';
$txt['cannot_view_gameroom'] = 'No puedes entrar a la Sala de Juegos.';
$txt['permissionname_view_trade'] = 'Acceder al Centro de Intercambios';
$txt['permissionhelp_view_trade'] = 'El usuario tiene acceso al Centro de Intercambios';
$txt['cannot_view_trade'] = 'No puedes entrar al Centro de Intercambios.';
$txt['permissionname_view_bank'] = 'Acceder al Banco';
$txt['permissionhelp_view_bank'] = 'Los usuarios tienen acceso al Banco';
$txt['cannot_view_bank'] = 'No puedes acceder al Banco.';
$txt['permissionname_view_gift'] = 'Permitir enviar regalos';
$txt['permissionhelp_view_gift'] = 'El usuario tiene acceso a enviar Regalos';
$txt['cannot_view_gift'] = 'No puedes enviar Regalos.';
$txt['permissionname_view_othersinv'] = 'Acceder al inventario de otros usuarios';
$txt['permissionhelp_view_othersinv'] = 'Si el usuario tiene acceso a ver el inventario de otros usuarios';
$txt['cannot_view_othersinv'] = 'No puedes acceder al inventario de otros.';
//shop End
SA Shop 0.4.2 Realsed
<li class="postcount">',$txt['shop_procredit'],':', $context['member']['cash'], '</li>';
Thanks
$result = $smcFunc['db_query']('', '
SELECT cash
FROM {db_prefix}members
WHERE member_name = '.$user.'');
$result = $smcFunc['db_query']('', '
SELECT cash
FROM {db_prefix}members
WHERE member_name = {string:name}',
array(
'name' => $user,
)
);
hmm untested but try
sources/shop2/items/steal.php
findCode: [Select]$result = $smcFunc['db_query']('', '
SELECT cash
FROM {db_prefix}members
WHERE member_name = '.$user.'');
replace withCode: [Select]$result = $smcFunc['db_query']('', '
SELECT cash
FROM {db_prefix}members
WHERE member_name = {string:name}',
array(
'name' => $user,
)
);
<?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(0, 100);
// 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 real_name = {string:name}',
array(
'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(1, $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!';
}
}
}
?>
this one seems to work for me
//updateMemberData($user, array('cash' => $final_value1));
bperry921 im sry thats my own fault doing so many things at once
i commented to it see it that was the problem only i coulda sware that i fixed the problem and uncommented that
illtake another look tommorow for you again sry bout that
here you go i forgot updatemember() function only expects integers and i was trying to pass a string threw it
here you go i forgot updatemember() function only expects integers and i was trying to pass a string threw it
Thanks, seems to work as expected now... I have some things for you to fix in the Battle mod too, but will get to that later, must sleep now and will post that in the right thread too, have a merry christmas dude
// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'],'</li>';
// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'],'</li>';
echo '
<li class="postcount">',$txt['shop_procredit'],': ', $message['member']['cash'], '</li>';
<?php
//File: AddMembergroup.php
// Item
class item_AddMembergroup extends itemTemplate {
function getItemDetails() {
$this->name = "Add Membergroup";
$this->desc = "Allows you to add yourself to a membergroup!";
$this->price = 1;
$this->require_input = false;
$this->can_use_item = true;
}
function getAddInput() {
global $db_prefix;
$selectBox = '<select name="info1">';
// Get all non post-based membergroups
$result = db_query("SELECT ID_GROUP, groupName
FROM {$db_prefix}membergroups
WHERE minPosts = -1",
__FILE__, __LINE__);
// For each membergroup, add it to the list
while ($row = mysql_fetch_assoc($result)) {
$selectBox .= "<option value='{$row['ID_GROUP']}'>{$row['groupName']}</option>";
}
$selectBox .= "</select>";
return "Membergroup: ".$selectBox;
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$additionalGroups = mysql_fetch_array(db_query("SELECT `additionalGroups` FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__),MYSQL_ASSOC);
if($additionalGroups['additionalGroups']) {
$additionalGroups['additionalGroups'] = $additionalGroups['additionalGroups'].",".$item_info[1];
} else {
$additionalGroups['additionalGroups'] = $item_info[1];
}
echo $additionalGroups['additionalGroups'];
$result = db_query("UPDATE {$db_prefix}members SET additionalGroups = '{$additionalGroups['additionalGroups']}'
WHERE ID_MEMBER={$ID_MEMBER}",__FILE__, __LINE__);
return "You have joined new membergroup {$item_info[1]}!!";
}
}
?>
here you go i forgot updatemember() function only expects integers and i was trying to pass a string threw it
Thanks, seems to work as expected now... I have some things for you to fix in the Battle mod too, but will get to that later, must sleep now and will post that in the right thread too, have a merry christmas dude
Update, a very minor problem I think, doesn't seem to interfere with functionality, not positive about that though... I'm getting the following error message in the SMF error log at every successful steal... I double checked and that field and index do exist in the smf_members database table(http://rjventure.com/images/smfhelpticket25.png)
Merry Christmas dude
that item wont work cos it needs updating use the one in this post
http://sa-mods.ath.cx/battle2/index.php?topic=152.msg903#msg903
hmm i dont think so whats it not doing?
Little question:
The credit system now works on all boards.
Is there a way to exclude the count of the credit system on certain boards?
TY
Yes, but it may not be a very good solution for you depending on what you are trying to do...
You can go into Admin/Boards and modify the board in question to not "count posts" near bottom of dialogue screen, just uncheck the box and save...
I don't care too much for doing it this way because if you do that, the users lose out on their SMF post count as well as the shop credits.
Yes, but it may not be a very good solution for you depending on what you are trying to do...
You can go into Admin/Boards and modify the board in question to not "count posts" near bottom of dialogue screen, just uncheck the box and save...
I don't care too much for doing it this way because if you do that, the users lose out on their SMF post count as well as the shop credits.
That would be perfect, but the only thing that does is stop the post count, credits are still counted when members post.
the part your looking for isnt included in this yet but it is in the dev version i have here i just have a few bugs to sort with it then ill update the package with it
can i see the download item in question pleaese?
Will this work for 2.0 RC2?
that seems to work for me?
neither do i relay but attach the filedownload2.php here and ill a take a look
the part your looking for isnt included in this yet but it is in the dev version i have here i just have a few bugs to sort with it then ill update the package with it
neither do i relay but attach the filedownload2.php here and ill a take a look
ok, here it is, i might add that I've got a couple other files set up with this item and they seem to be ok, they are both .pdf's though, will double check those too while while I'm waiting for you to look at filedownload2.php
Little question:
The credit system now works on all boards.
Is there a way to exclude the count of the credit system on certain boards?
TY
An Error Has Occurred!
You need a valid arcade pass to play in the arcade. Visit the store.
// Now we need our items
$result = $smcFunc['db_query'] ('','
SELECT itemid, name, `description`, price, count, image, catid, status, input_needed, sold
FROM {db_prefix}shop_item
WHERE catid = {int:cat}
LIMIT {int:start}, 10',
array(
'cat' => $cat,
'start' => $context['start'],
)
);
// Now we need our items
$result = $smcFunc['db_query'] ('','
SELECT itemid, name, `description`, price, count, image, catid, status, input_needed, sold
FROM {db_prefix}shop_item
WHERE catid = {int:cat} AND status = {int:one}
LIMIT {int:start}, 10',
array(
'cat' => $cat,
'one' => 1,
'start' => $context['start'],
)
);
It's designed for virtual items that are created by Admin for sale in the virtual shop, bought with virtual money if that's what you meanThanks, misunderstood the shop concept, thought it would be something I could use for members to sell and buy their own personal stuff.
It's designed for virtual items that are created by Admin for sale in the virtual shop, bought with virtual money if that's what you meanThanks, misunderstood the shop concept, thought it would be something I could use for members to sell and buy their own personal stuff.
Little question:
The credit system now works on all boards.
Is there a way to exclude the count of the credit system on certain boards?
TY
Any news on this?
i done this allready latest version
Now for some reason, I cannot post on my forum, while other members seem to be able to!!
Ok, before doing anything to your site, I was able to confirm this bug on a clean 2.0 RC3 test forum. I noticed SA Shop mod is still in beta, so you should report this as a bug, since I was able to replicate the error.
what is is for smf2 rc3 only
Compatible With: 2.0 RC3
lol yeah thats the one it is early here :P
@F34R i anserd this on my site
@udemon369 upload the attached file to you forum the same place as your ssi.php and point to it in your brouser and it will set every one cash to 0
opps didt attach it lol ssi.php in where you installed your forum
Doesn't seem to for me. I uninstalled and then reinstalled but still no job.
I am on SMF2.0 RC2 using the default template.
I have put the following code into display.template.php but it won't show the number of credits. If I put the code to show Prefix and Suffix then it shows so not sure why it won't show the number of credits.
if (!isset($context['disabled_fields']['posts']))
{
{
echo '
<dt>', $txt['profile_posts'], ': </dt>
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
echo '
<dt>',$txt['shop_procredit'],': </dt>
<dd>', $modSettings['shopprefix'], $context['member']['cash'], $modSettings['shopsurfix'], '</dd>';
if (isset($context['member']['subaccounts_posts']))
echo '
<dt>', $txt['subaccount_posts'], '</dt>
<dd>', $context['member']['subaccounts_posts'], ' (', $context['member']['subaccounts_posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
}
769:
foreach ($regOptions['register_vars'] as $var => $val)
770:
{
771:
$type = 'string';
772:
if (in_array($var, $knownInts))
773:
$type = 'int';
774:
elseif (in_array($var, $knownFloats))
775:
$type = 'float';
776:
elseif ($var == 'birthdate')
777:
$type = 'date';
778:
779:
$column_names[$var] = $type;
780:
$values[$var] = $val;
781:
}
782:
783:
// Register them into the database.
784:
$smcFunc['db_insert']('',
785:
'{db_prefix}members',
786:
$column_names,
787:
$values,
788:
array('id_member')
==>789:
);
790:
$memberID = $smcFunc['db_insert_id']('{db_prefix}members', 'id_member');
791:
792:
// Update the number of members and latest member's info - and pass the name, but remove the 's.
793:
if ($regOptions['register_vars']['is_activated'] == 1)
794:
updateStats('member', $memberID, $regOptions['register_vars']['real_name']);
795:
else
796:
updateStats('member');
797:
798:
// Theme variables too?
799:
if (!empty($theme_vars))
800:
{
801:
$inserts = array();
802:
foreach ($theme_vars as $var => $val)
803:
$inserts[] = array($memberID, $var, $val);
804:
$smcFunc['db_insert']('insert',
805:
'{db_prefix}themes',
806:
array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
807:
$inserts,
808:
array('id_member', 'variable')
809:
);
8: Undefined index: shopRegAmountFile: /home/coldysha/public_html/Sources/Subs-Members.php
Line: 669
this mod doesnt use money it uses cash as the collum name can you post you Subs-Members.php pls
index.php?action=post2;start=0;board=1
Wrong value type sent to the database. Integer expected. (point)
Function: createPost
File: /home/glb/public_html/BRS/Sources/Subs-Post.php
Line: 1895
index.php?action=post2;start=0;board=1Wrong value type sent to the database. Integer expected. (point)Function: createPostFile: /home/glb/public_html/BRS/Sources/Subs-Post.phpLine: 1895
for the download item see this
http://www.sa-mods.info/index.php?topic=46.0
this shop is based on smf shop so it will use the same items with a few edits tho the download item will work strait outQuoteindex.php?action=post2;start=0;board=1Wrong value type sent to the database. Integer expected. (point)Function: createPostFile: /home/glb/public_html/BRS/Sources/Subs-Post.phpLine: 1895
what did you do to get that error
i will lok in to the other ones when i have more time on my hands
0.4.9 realsed
added permission to admin the shop
fixed item display order in shop veiw
the items are pretty much the same i did update the lottery and pets mods but they still need more work there is also a few other i updated at my dev site
you can keep the money if you want to doa manulal edit to you database r i can write a script todo this if you prefere
// What a monstrous array...
//Set variable for LIMIT amount $row = 0; $max = $modSettings['ShopIpDisMax']; //Begin database query $request3 = $smcFunc['db_query']('', ' SELECT it.description, it.image, it.catid, inv.itemid FROM {db_prefix}shop_property AS inv INNER JOIN {db_prefix}shop_item AS it ON (inv.itemid = it.itemid) WHERE inv.userid = {int:id} LIMIT {int:max}', array( 'id' => $profile['id_member'], 'max'=> $max )); //Start with an empty array $profile['shopitems']['shopitems'] = array(); //Loop through all items while ($row = $smcFunc['db_fetch_assoc']($request3)) { // Add item to the array $profile['shopitems']['shopitems'][] = array( 'image' => $row['image'], 'desc' => $row['description'], ); } $smcFunc['db_free_result']($request3);
$avatar_width = '';
$avatar_height = '';
}
there still isYeah but the topic here says 0.4.7 as latest....
that line should be there try serching forCode: [Select]$avatar_width = '';
$avatar_height = '';
}
and add what needs to be added after it
.../smf/index.php?action=enotify8:
Undefined index: shop_menu_button
File: .../smf/Sources/Subs.php
Line: 4524
==>681:
$context['page_index'] = constructPageIndex($scripturl . '?action=shop;sa=inventory;next2='.$_SESSION['name_posted'].';sort=' . $_REQUEST['start'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $puppys, 10);
682:
$context['start'] = $_REQUEST['start'];
683:
$_SESSION['just_posted_name'] = false;
684:
}
685:
else{
1856:
// Bonus
1857:
// no, BBCCode won't count
==>1858:
$plaintext = preg_replace('[\[(.*?)\]]', ' ', $_POST['message']);
1859:
// convert newlines to spaces
1860:
$plaintext = str_replace(array('<br />', "\r", "\n"), ' ', $plaintext);
1861:
// convert multiple spaces into one
1862:
$plaintext = preg_replace('/\s+/', ' ', $plaintext);
1863:
When I go to install the old one I'm getting about 7 errors on the uninstall page...modify much?
post up you subs.php
http://.../smf/index.php?action=enotify
Undefined index: shop_menu_button
File: /...l/smf/Sources/Subs.php
Line: 4524
Thanks for looking SS. I uploaded your updated subs.php, but I still can't transfer cash to anyone!That has to do with the eNotify mod.
I've looked through the admin area, just in case I was missing something obvious (though as admin I should have all access), but no joy.
Still getting the errors too, though perhaps this is something to do with the enotify mod I have installed rather than the shop?Quotehttp://.../smf/index.php?action=enotify
Undefined index: shop_menu_button
File: /...l/smf/Sources/Subs.php
Line: 4524
remind me what happens when you try to transfer cash? it works fine on my localhost
http://tomecity.com/smf/index.php?
8:Undefined index: shop_menu_button
File: /...l/smf/Sources/Subs.php
Line: 4524
http://tomecity.com/smf/index.php?action=admin;area=logs;sa=errorlog;desc
8: Undefined index: shop_menu_button
File: /...l/smf/Sources/Subs.php
Line: 4524
Everything else is working fine. All the forums give cash as they are supposed to.
'label' => 'Main',
Fatal error: require_once() [function.require]: Failed opening required '/home/pretendusername/i.editedthiswebsitename.com/Sources/shop2/ShopAdmin.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/pretendusername/i.editedthiswebsitename.com/Sources/Admin.php on line 550
<?php
/**********************************************************************************
* SMFShop item *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum *
* =============================================================================== *
* Software Version: SMFShop 3.0 (Build 12) *
* $Date:: 2007-01-18 09:26:55 +0100 (do, 18 jan 2007) $ *
* $Id:: testitem2.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 test item that gets some input from the person using it.
* Most likely, you'll base your item off this one.
* 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_amxadmin extends itemTemplate
{
function getItemDetails()
{
$this->authorName = 'Daniel15';
$this->authorWeb = 'http://www.dansoftaustralia.net/';
$this->authorEmail = 'dansoft@dansoftaustralia.net';
$this->name = 'add admin';
$this->desc = 'add admin to server';
$this->price = 2500;
}
function getUseInput()
{
return 'New Username: <input type="text" name="newusername" size="50" />
Steam Id: <input type="text" name="steamid" size="20" />
<div align="center"><br>
<input type="radio" name="group1" value="1"> Rated* Main<br>
<input type="radio" name="group1" value="2"> 24/7 de_dust2<br>
<input type="radio" name="group1" value="3"> Rated snow <br>
<input type="radio" name="group1" value="4"> Rated Stealth <br>
</div>
NOTE: Due to the way SMF works, you may need to use the "Forgot your Password" feature to reset your password after changing your username.';
}
function onUse()
{
//global $context;
if (!isset($_POST['newusername']) || $_POST['newusername'] == '')
die('ERROR: Please enter a new username!');
if (!isset($_POST['steamid']) || $_POST['newusername'] == '')
die('ERROR: Please enter a valid steam id!');
$con = mysql_connect("localhost","mydb","passwordremovedfornow");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("rxwebserver_amxbans", $con);
$v=1;
$password ='';
$access ='cej';
$flags = 'ce';
$ashow=1;
$days=15;
$created=time();
$expired=1296000 + time();
$sban = "no";
$selected_radio = $_POST['group1'];
if ($selected_radio == "1") {
$v = 1;
}
else if ($selected_radio == "2") {
$v = 2;
}
else if ($selected_radio == "3") {
$v = 3;
}
else if ($selected_radio == "4") {
$v = 4;
}
$id = mysql_insert_id();
$sql=mysql_query("INSERT INTO amx_amxadmins (id, username,password,access,flags,steamid,nickname,ashow,created,expired,days)
VALUES
('$id','$_POST[nickname]','','$access','$flags','$_POST[steamid]','$_POST[nickname]','.$ashow.','$created',
'$expired',
'$days')")or die (mysql_error());
$adminid=mysql_insert_id();
$query=mysql_query("INSERT INTO `amx_admins_servers`
(`admin_id`,`server_id`,`custom_flags`,`use_static_bantime`)
VALUES
('$adminid','$v','','$sban')
") or die (mysql_error());
//$resultt = mysql_query ($sqll);
mysql_close($con);
return 'admin added';
//updateMemberData($context['user']['id'], array('member_name' => $_POST['newusername']));
//return 'Successfully changed your username to ' . $_POST['newusername'];
}
}
?>
any help is greatly appreciated thanksSA Shop 0.7 relased
added send gift/cash to post profile
added send gift/cash to profile
added core supprt
now uses integration hook for less edits
fixed undefined index just posted name
Is there any demo of this? Been looking in the post/thread and on the mod but cannot find any links do either demo's or live ones.
Would be nice to see somehing before installing it. :)
http://www.myfreshgames.cz.cc/index.php?action=shop
yeah but the regular members isn't an option on the 2 forums i haveI was replying to SA, since (*whispers)...
UPDATE smf_members SET cash = 0, cashBank = 0
How do you remove the shop links from the miniprofile? There use to be an option in the settings, didn't there?
echo'<li><a href="', $scripturl, '?action=shop;sa=inventory;next2=', $message['member']['username'], '">',$txt['View_Inventory'],'</a></li>
<li><a href="', $scripturl, '?action=shop;sa=gift;u=', $message['member']['username'], '">Send '.$modSettings['shopsurfix'].'/Gift </a></li>';
// Begin shop Mod
echo '
<li>', $modSettings['shopprefix'], $message['member']['cash'], $modSettings['shopsurfix'], ' </li>';
echo'<li><a href="', $scripturl, '?action=shop;sa=inventory;next2=', $message['member']['username'], '">',$txt['View_Inventory'],'</a></li>
<li><a href="', $scripturl, '?action=shop;sa=gift;u=', $message['member']['username'], '">Send '.$modSettings['shopsurfix'].'/Gift </a></li>';
echo '<li>';
if ($modSettings['ShopIpDis'] == 1 && $modSettings['ShopIpPos'] == 0)
{
if (count($message['member']['shopitems']) != 0)
{
foreach ($message['member']['shopitems'] as $shopitem)
{
echo '<img src="',$settings['images_url'], '/shopimg/item_images/',$shopitem['image'],' " alt ="',$shopitem['desc'],'" /> ';
}
}
}
echo '</li>';
// End shop Mod
Hi!
Hoping someone can help with this. Just updated a forum to 2.0.1 and installed version 0.7 of the shop. All is working well except that you can't see past page 1 of anyone's inventory, including your own. If you try to go to anything but the first page it says user name not found.
Can anyone please tell me how I can fix this? Thanks!
Forbidden page http://www.totaltwaddle.co.uk/board/index.php/topic,48691.new.html
$payouts = array (
'<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice1.png" alt=""/>|<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice1.png" alt=""/>' => '150',
'<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice2.png" alt=""/>|<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice2.png" alt=""/>' => '550',
'<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice3.png" alt=""/>|<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice3.png" alt=""/>' => '750',
'<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice4.png" alt=""/>|<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice4.png" alt=""/>' => '900',
'<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice5.png" alt=""/>|<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice5.png" alt=""/>' => '1500',
'<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice6.png" alt=""/>|<img src="'. $settings['images_url']. '/ShopGamesImages/dice/blackdice6.png" alt=""/>' => '2000',
Can i add or change game in the game shop? :)
I just installed the latest version SA_Shop1.0_RC1.zip on SMF 2.0.2 and I am getting the following error when I go to the main setting section of SA Shop.
This is the error.
index.php?action=admin;area=shop;sa=settingsa;fcf3ecf65=8cfc3a14f92ab909fa2f7d699be56dfa
8: Undefined index: ShopCbContent
File: /Themes/default/ShopAdmin.template.php
Cutter
I currently have the SA Shop Arcade Intergration item installed in my shop.
Will it still be compatible, or will I need to manual install the item after updating my shop?
Second, is there a way I can add money to everyones accounts? I tried the Membergroup Fuctions under Maintance and it didn't update anything.
Awesome, Diego! How about a way to add credits to individual accounts as well?!
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
//shop Start Translate By Candidosa2
$txt['shop_info'] = 'Informações da loja SA';
$txt['shop_info2'] = 'SMF Hispano Live';
$txt['shop_info3'] = 'Informações Genaral';
$txt['shop_info4'] = 'Créditos';
$txt['shop_per_new_post'] = 'por novo poste';
$txt['shop_per_new_topic'] = 'Per novo tópico';
$txt['shop_credits'] = 'Créditos da Loja';
$txt['shop_credits_msg'] = 'Se os valores personalizados são definidos para estas duas definições, elas substituirão as configurações definidas na página de administração da Loja SA. Configure isso para "0" usar os valores padrão (actualmente ' . $modSettings['shopprefix'] . $modSettings['shopPointTopic'] . $modSettings['shopsurfix'] . ' or tópico e ' . $modSettings['shopprefix'] . $modSettings['shopPointPost'] . $modSettings['shopprefix'] . ' por poste)';
$txt['shop_bonuses_enabled'] = 'Activar da Bônus Loja';
$txt['shop_bonuses_enabled_msg'] = 'Bônus loja será produzirá efeitos neste fórum';
$txt['shop_count_points_msg'] = 'Os membros receberão créditos Loja para postar neste fórum.';
$txt['shop_count_points'] = 'Contar Pontos da Loja';
$txt['Shop_ver'] = 'Versão/Créditos';
$txt['whoall_shop_bank'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=bank">Banco da Loja</a>';
$txt['whoall_shop_gift'] = 'Enviar um <a href="' . $scripturl . '?action=shop;sa=gift">Presente</a>';
$txt['whoall_shop_inventory2'] = 'Vendo Membros no <a href="' . $scripturl . '?action=shop;sa=inventory2">inventário de loja</a>';
$txt['whoall_shop_inventory'] = 'Vendo o seu <a href="' . $scripturl . '?action=shop;sa=inventory">inventário de loja</a>';
$txt['whoall_shop_buy'] = 'Comprar itens no <a href="' . $scripturl . '?action=shop;sa=buy">Fórum da Loja</a>';
$txt['whoall_shop'] = 'Vendo o <a href="' . $scripturl . '?action=shop">Fórum da Loja</a>';
$txt['whoall_gameroom'] = 'Jogando na<a href="' . $scripturl . '?action=shop;sa=gameroom">Sala de jogos</a>';
$txt['shop_mainten'] = 'Manutenção';
$txt['shop_admin_usergroup'] = 'Funções de grupo de Membros';
$txt['View_Inventory2'] ='Ver inventário completo';
$txt['View_Inventory'] ='Ver inventário';
$txt['shop_settingsm'] = 'Configurações principais';
$txt['MoneySettings'] = 'Configurações de dinheiro';
$txt['shop_admin_invent'] = 'inventário';
$txt['itemsssss'] = 'Artigos';
$txt['AddItems'] = 'Adicionar artigos';
$txt['RestockItems'] = 'Artigos em reabastecimento';
$txt['shop_admin_catlist'] = 'Categorias';
$txt['MainSettings'] = 'Configurações principais';
$txt['shop_procredit'] = 'Créditos';
$txt['shop_shop2'] = 'SA loja';
$txt['shop_tab_main'] ='loja';
$txt['permissionhelp_manage_shop'] = 'Se o utilizador tem permissão para as Configurações da administrar a Loja';
$txt['permissionname_manage_shop'] = 'Administração da Loja';
$txt['shop_adminmm2'] = 'Administrador da loja';
$txt['permissiongroup_simple_shop'] = 'Loja';
$txt['permissionname_view_shop'] = 'Acesso a loja';
$txt['permissionname_view_buy'] = 'Autorizado a comprar Artigos';
$txt['permissionhelp_view_buy'] = 'Se o utilizador é autorizado a comprar Artigos';
$txt['cannot_view_buy'] = 'Você não pode comprar Artigos.';
$txt['permissionhelp_view_shop'] = 'Se o utilizador tem permissão para acessar a loja';
$txt['cannot_view_shop'] = 'Você não pode ver a loja.';
$txt['permissiongroup_shop'] = 'Loja';
$txt['permissionname_view_gameroom'] = 'Acesso a Sala de jogos';
$txt['permissionhelp_view_gameroom'] = 'Se o utilizador tem permissão para acessar a Sala de jogos';
$txt['cannot_view_gameroom'] = 'Você não pode ver na Sala de Jogos.';
$txt['permissionname_view_trade'] = 'Acesso ao Centro Comércial';
$txt['permissionhelp_view_trade'] = 'Se o utilizador tem permissão para acessar o Centro Comércial';
$txt['cannot_view_trade'] = 'Você não pode ver o Centro Comércial.';
$txt['permissionname_view_bank'] = 'Acesso o Banco';
$txt['permissionhelp_view_bank'] = 'Se o utilizador tem permissão para acessar o Banco';
$txt['cannot_view_bank'] = 'Você não pode ver o Banco.';
$txt['permissionname_view_gift'] = 'Permissão para enviar de presente';
$txt['permissionhelp_view_gift'] = 'Se o utilizador tem permissão para enviar de presente';
$txt['cannot_view_gift'] = 'Você não pode enviar presentes.';
$txt['permissionname_view_othersinv'] = 'Permissão para ver outro Inventário';
$txt['permissionhelp_view_othersinv'] = 'Se o utilizador tem permissão para ver mais de Inventário';
$txt['cannot_view_othersinv'] = 'Você não pode ver outros Inventário.';
//shop End Support SMFPT
]]></add>
</operation>
</file>
[code]<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
//shop Start Translate By Candidosa2
$txt['shop_info'] = 'Informações da loja SA';
$txt['shop_info2'] = 'SMF Hispano Live';
$txt['shop_info3'] = 'Informações Genaral';
$txt['shop_info4'] = 'Créditos';
$txt['shop_per_new_post'] = 'por novo poste';
$txt['shop_per_new_topic'] = 'Per novo tópico';
$txt['shop_credits'] = 'Créditos da Loja';
$txt['shop_credits_msg'] = 'Se os valores personalizados são definidos para estas duas definições, elas substituirão as configurações definidas na página de administração da Loja SA. Configure isso para "0" usar os valores padrão (actualmente ' . $modSettings['shopprefix'] . $modSettings['shopPointTopic'] . $modSettings['shopsurfix'] . ' or tópico e ' . $modSettings['shopprefix'] . $modSettings['shopPointPost'] . $modSettings['shopprefix'] . ' por poste)';
$txt['shop_bonuses_enabled'] = 'Activar da Bônus Loja';
$txt['shop_bonuses_enabled_msg'] = 'Bônus loja será produzirá efeitos neste fórum';
$txt['shop_count_points_msg'] = 'Os membros receberão créditos Loja para postar neste fórum.';
$txt['shop_count_points'] = 'Contar Pontos da Loja';
$txt['Shop_ver'] = 'Versão/Créditos';
$txt['whoall_shop_bank'] = 'Vendo o <a href="' . $scripturl . '?action=shop;sa=bank">Banco da Loja</a>';
$txt['whoall_shop_gift'] = 'Enviar um <a href="' . $scripturl . '?action=shop;sa=gift">Presente</a>';
$txt['whoall_shop_inventory2'] = 'Vendo Membros no <a href="' . $scripturl . '?action=shop;sa=inventory2">inventário de loja</a>';
$txt['whoall_shop_inventory'] = 'Vendo o seu <a href="' . $scripturl . '?action=shop;sa=inventory">inventário de loja</a>';
$txt['whoall_shop_buy'] = 'Comprar itens no <a href="' . $scripturl . '?action=shop;sa=buy">Fórum da Loja</a>';
$txt['whoall_shop'] = 'Vendo o <a href="' . $scripturl . '?action=shop">Fórum da Loja</a>';
$txt['whoall_gameroom'] = 'Jogando na<a href="' . $scripturl . '?action=shop;sa=gameroom">Sala de jogos</a>';
$txt['shop_mainten'] = 'Manutenção';
$txt['shop_admin_usergroup'] = 'Funções de grupo de Membros';
$txt['View_Inventory2'] ='Ver inventário completo';
$txt['View_Inventory'] ='Ver inventário';
$txt['shop_settingsm'] = 'Configurações principais';
$txt['MoneySettings'] = 'Configurações de dinheiro';
$txt['shop_admin_invent'] = 'inventário';
$txt['itemsssss'] = 'Artigos';
$txt['AddItems'] = 'Adicionar artigos';
$txt['RestockItems'] = 'Artigos em reabastecimento';
$txt['shop_admin_catlist'] = 'Categorias';
$txt['MainSettings'] = 'Configurações principais';
$txt['shop_procredit'] = 'Créditos';
$txt['shop_shop2'] = 'SA loja';
$txt['shop_tab_main'] ='loja';
$txt['permissionhelp_manage_shop'] = 'Se o utilizador tem permissão para as Configurações da administrar a Loja';
$txt['permissionname_manage_shop'] = 'Administração da Loja';
$txt['shop_adminmm2'] = 'Administrador da loja';
$txt['permissiongroup_simple_shop'] = 'Loja';
$txt['permissionname_view_shop'] = 'Acesso a loja';
$txt['permissionname_view_buy'] = 'Autorizado a comprar Artigos';
$txt['permissionhelp_view_buy'] = 'Se o utilizador é autorizado a comprar Artigos';
$txt['cannot_view_buy'] = 'Você não pode comprar Artigos.';
$txt['permissionhelp_view_shop'] = 'Se o utilizador tem permissão para acessar a loja';
$txt['cannot_view_shop'] = 'Você não pode ver a loja.';
$txt['permissiongroup_shop'] = 'Loja';
$txt['permissionname_view_gameroom'] = 'Acesso a Sala de jogos';
$txt['permissionhelp_view_gameroom'] = 'Se o utilizador tem permissão para acessar a Sala de jogos';
$txt['cannot_view_gameroom'] = 'Você não pode ver na Sala de Jogos.';
$txt['permissionname_view_trade'] = 'Acesso ao Centro Comércial';
$txt['permissionhelp_view_trade'] = 'Se o utilizador tem permissão para acessar o Centro Comércial';
$txt['cannot_view_trade'] = 'Você não pode ver o Centro Comércial.';
$txt['permissionname_view_bank'] = 'Acesso o Banco';
$txt['permissionhelp_view_bank'] = 'Se o utilizador tem permissão para acessar o Banco';
$txt['cannot_view_bank'] = 'Você não pode ver o Banco.';
$txt['permissionname_view_gift'] = 'Permissão para enviar de presente';
$txt['permissionhelp_view_gift'] = 'Se o utilizador tem permissão para enviar de presente';
$txt['cannot_view_gift'] = 'Você não pode enviar presentes.';
$txt['permissionname_view_othersinv'] = 'Permissão para ver outro Inventário';
$txt['permissionhelp_view_othersinv'] = 'Se o utilizador tem permissão para ver mais de Inventário';
$txt['cannot_view_othersinv'] = 'Você não pode ver outros Inventário.';
//shop End Support SMFPT
]]></add>
</operation>
</file>
How to reset the total credit for member? I have just installed this and I am seeing all members having 1000 credits in their profiles. ???
if (empty($has_cash))
{
// give everyone 1000 as a start :)
$smcFunc['db_query']('', "UPDATE {db_prefix}members SET `cash` = 1000");
i updated that mod for sa shop yearts ago now tho i dont have it no since my site closed :D
It was sad when i seen SA not up anymore :(
And from what I can best tell you, the Lottery mod was compatible with Smf2, but not current versions past RC3 if i remember correctly.
Where would i find new items like a Change Member Group
??
If ylou can find it, then you can try it. I just know many of us tried on the SA site, and it wouldnt work cause of so many coding changes from RC3 to 2.0.2
Huh? ???
Did you get the actual SA shop Lottery mod or are you trying the SMF Shop lottery mod?
SA and/or Diego:
How difficult would it be to convert the SMF Shop Lottery mod to work with SA Shop...and ensure compatibility with SMF 2.0.x?
I'm not sure what modification is that, can you please leave the link to check it?
Silly question, but one I've been trying to find the answer for...
Adding new custom items to the shop; I'm guessing I'll have to manually insert these items into the source code, or is there an easier method to do this?
Also, can I upload my own png Icons into the item image's folder in my hosting?
(will attempt on my own tomorrow morning, figure Id ask now and save me the trouble is the answers no.)
Also, can I upload my own png Icons into the item image's folder in my hosting?
(will attempt on my own tomorrow morning, figure Id ask now and save me the trouble is the answers no.)
Yes. When creating/editing an item, and putting an image with it; the images to chose from will come from that image folder. but if you have custom themes you'll need to add the image to the same folder on those themes for the item image to show.
Silly question, but one I've been trying to find the answer for...
Adding new custom items to the shop; I'm guessing I'll have to manually insert these items into the source code, or is there an easier method to do this?
Same question here.
I just discovered this mod today,(9/9/12) and Ive been reading this entire thread from the start to find out where the instructions are for the "small edits" you have to do in order to add custom items people made for the original shop.
I know how to install them for the original SMF Shop, but not for the SA shop.
But Author stated that SMF Shop Items are still compatible with a small edit/modification to the code (or something?)
It seems that the Author has deleted the site, so where Can I find those instructions?Also, can I upload my own png Icons into the item image's folder in my hosting?
(will attempt on my own tomorrow morning, figure Id ask now and save me the trouble is the answers no.)
Great mod and I appreciate the help.
i do know of hand that cookie and cake should work as there isn any database querys in them so they will work with out any changes
the other items will need updating to smf2 as there is databse querys in them
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] = 100;
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" id="membername" size="50" />
<a href="' . $scripturl . '?action=findmember;input=membername;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, $ID_MEMBER, $smcFunc, $item_info;
// 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(0, 100);
// If successful
if ($try < $item_info[1])
{
// Get stealee's (person we're stealing from) money count
$result = $result = $smcFunc['db_query']('',"
SELECT cash
FROM {db_prefix}members
WHERE member_name = {string:name}",
array(
'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['money']);
$final_value1 = $cash - $steal_amount;
updateMemberData($context['stealee'], array('cash' => $final_value1));
//...and give to stealer (robber)
$final_value1 = $user_info['cash'] + $steal_amount;
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!';
}
}
}
?>
Add to member group (http://smfshop.com/forum/index.php/topic,659.0.html) (admin creates item of a specific group, member becomes part of the group when purchasing item, Is not primary)
<?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 = 'Attack two';
$this->desc = 'Attack other members to gain their credits!';
$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 does NOT need to, and shouldn\'t know the probability! It\'s more fun this way :-)
Probability of successful steal: 100%';
}
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 attack!');
// 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(0, 100);
// 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 real_name = {string:name}',
array(
'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']);
if ($steal_amount < 0) {
$steal_amount = 0;
}
// Take this money away from stealee...
$result = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE real_name = {string:name}
ORDER BY id_member DESC
LIMIT 1',
array(
'name' => $user,
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$stealee = $row['id_member'];
$smcFunc['db_free_result']($result);
$context['stealee'] = $stealee;
$result = $smcFunc['db_query']('', '
SELECT cash
FROM {db_prefix}members
WHERE real_name = {string:name}
ORDER BY id_member DESC
LIMIT 1',
array(
'name' => $user,
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$cash = $row['cash'];
$smcFunc['db_free_result']($result);
$context['cash'] = $cash;
$final_value1 = $cash - $steal_amount;
updateMemberData($context['stealee'], array('cash' => $final_value1));
//...and give to stealer (robber)
$final_value1 = $user_info['cash'] + $steal_amount;
updateMemberData($context['user']['id'], array('cash' => $final_value1));
if ($steal_amount < 50)
return 'Attack successful, although you only gained ' . $steal_amount . '!';
else
return 'Successfully Gained ' . $steal_amount . ' from attacking ' . $user . '! It\'s their fault they don\'t have their dp in the bank!';
}
else
{
// If reducing Karma doesn't work, replace
// 'karma_bad = karma_bad + 10' with 'karma_good = karma_good - 10'
$smcFunc['db_query']('','UPDATE {db_prefix}members
SET
karma_good = karma_good - 1
WHERE id_member = {string:name} ',
array(
'name' => $context['user']['id'],
)
);
//updateMemberData($context['user']['id'], array('karma_bad' => (int) 10));
return 'Attacking will affect heroism! Your heroism is now reduced by 1!';
}
}
}
?>
I want to:Steal Credits is included in this shop so thats already been updated just compare that with the one you linked to to compare the chnages i made these chanes to that item them remberd it comes with the shop :D so here it isI decided to paste this code back In the file to restart my idea from scratch, But I decided to test it first to see how it works,Code: [Select]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] = 100;
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" id="membername" size="50" />
<a href="' . $scripturl . '?action=findmember;input=membername;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, $ID_MEMBER, $smcFunc, $item_info;
// 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(0, 100);
// If successful
if ($try < $item_info[1])
{
// Get stealee's (person we're stealing from) money count
$result = $result = $smcFunc['db_query']('',"
SELECT cash
FROM {db_prefix}members
WHERE member_name = {string:name}",
array(
'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['money']);
$final_value1 = $cash - $steal_amount;
updateMemberData($context['stealee'], array('cash' => $final_value1));
//...and give to stealer (robber)
$final_value1 = $user_info['cash'] + $steal_amount;
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!';
}
}
}
?>
function getAddInput()
{
global $item_info;
if ($item_info[1] == 0) $item_info[1] = 100;
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" id="membername" size="50" />
<a href="' . $scripturl . '?action=findmember;input=membername;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, $ID_MEMBER, $smcFunc, $item_info;
// 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(0, 100);
// If successful
if ($try < $item_info[1])
{
$result = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE real_name = {string:name}
ORDER BY id_member DESC
LIMIT 1',
array(
'name' => $user,
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$stealee = $row['id_member'];
$smcFunc['db_free_result']($result);
// Get stealee's (person we're stealing from) money count
$result = $result = $smcFunc['db_query']('',"
SELECT cash
FROM {db_prefix}members
WHERE member_name = {string:name}",
array(
'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['money']);
$final_value1 = $cash - $steal_amount;
updateMemberData($stealee, array('cash' => $final_value1));
//...and give to stealer (robber)
$final_value1 = $user_info['cash'] + $steal_amount;
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!';
}
}
}
how the Trade Center works. Would I upload the items to ./Sources/shop/items as usual, set the price for each of them, and then assign them to the individual user for them to "sell"? Or is it a different process?
how the Trade Center works. Would I upload the items to ./Sources/shop/items as usual, set the price for each of them, and then assign them to the individual user for them to "sell"? Or is it a different process?
Doin't use it. Unless it's been fixed since about a year ago. has a bug where i member can put an item in there, buy it back themself, and egt the item and double there money.
all trade center is for, is for members to sell items they dont want anymore.
function Shop_trade()
{
global $user_info, $id_member, $row, $item_info, $txt, $sourcedir, $scripturl, $context, $smcFunc;
if ($_REQUEST['sa'] == 'trade')
{
// Do we have permission to veiw?
isAllowedTo('view_trade');
$context['shop_trade_items'] = array();
$alternating = 'windowbg2';
//TODO add the database stuff to shop_db.php
// Get all the items in the trade centre
$result = $smcFunc['db_query']('', '
SELECT it.name, it.description, it.image, inv.itemid, m.real_name, inv.tradecost
FROM {db_prefix}shop_property AS inv
INNER JOIN {db_prefix}shop_item AS it ON (it.itemid = inv.itemid)
INNER JOIN {db_prefix}members AS m ON (m.id_member = inv.userid)
WHERE inv.trading = 1 ', array());
// Loop through all items
while ($row = $smcFunc['db_fetch_assoc']($result))
$context['shop_trade_items'][] = array(
'id' => $row['itemid'],
'name' => $row['name'],
'desc' => $row['description'],
'image' => $row['image'],
'realName' => $row['real_name'],
'tradecost' => $row['tradecost'],
);
$smcFunc['db_free_result']($result);
// Set the page title
$context['page_title'] = $txt['shop_trade'];
// Use the trade centre sub template
$context['sub_template'] = 'userTrade';
loadTemplate('Shop');
}
// If they're buying an item from the trade centre
elseif ($_REQUEST['sa'] == 'trade_buy')
{
// Make sure item ID was numeric
$_GET['id'] = (int) $_GET['id'];
//TODO add the database stuff to shop_db.php
// Get information on the item in question
$result = $smcFunc['db_query']('', '
SELECT
it.name,
inv.tradecost, inv.trading, inv.userid,
m.real_name, m.email_address, m.cash, m.tradeHis
FROM {db_prefix}shop_property AS inv
INNER JOIN {db_prefix}shop_item AS it ON (inv.itemid = it.itemid)
INNER JOIN {db_prefix}members AS m ON (inv.userid = m.id_member)
WHERE inv.itemid = {int:id}
LIMIT 1',
array(
'id' => $_GET['id'],
));
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
$userid = $context['user']['id'];
// If this item is not for trade
if ($row['trading'] != 1)
$context['shop_buy_message'] = $txt['shop_no_sale'];
// If they can't afford it
elseif (shop_Cash($userid) < $row['tradecost'])
$context['shop_buy_message'] = sprintf($txt['shop_not_enough_money'], $cost - shop_Cash($userid));
// All's well, they can get this itel
else
{
//TODO add the database stuff to shop_db.php
// Change item info (owner, amount paid, trading = not anymore)
$smcFunc['db_query']('', '
UPDATE {db_prefix}shop_property
SET userid = {int:userid}, amtpaid = {float:tradecost},
trading = 0
WHERE itemid = {int:id}
LIMIT 1',
array(
'userid' => $context['user']['id'],
'tradecost' => $row['tradecost'],
'id' => $_GET['id'],
));
// Decrease user's money
$final_value = $row['tradecost'] - $row['cash'];
updateMemberData($context['user']['id'], array('cash' => $final_value));
//Update the member trade count
$final_value = $row['tradeHis'] + 1;
updateMemberData($context['user']['id'], array('tradeHis' => $final_value));
// Give money to old owner
$final_value1 = $row['tradecost'] + $row['cash'];
updateMemberData($row['userid'], array('cash' => $final_value1));
sendpm_trade();
$context['shop_buy_message'] = sprintf($txt['shop_trade_bought_item'], $row['name'], $row['real_name']);
}
// Set the page title
$context['page_title'] = $txt['shop_trade'];
// Use the message template
$context['sub_template'] = 'message';
}
// If they're selling an item in the trade centre
elseif ($_REQUEST['sa'] == 'trade_sell')
{
// Make sure ID was numeric
$_GET['item'] = (int) $_GET['item'];
//TODO add the database stuff to shop_db.php
// Get information on the item
$result = $smcFunc['db_query']('', '
SELECT amtpaid
FROM {db_prefix}shop_property
WHERE id = {int:id}',
array(
'id' => $_GET['item'],
));
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
// The amount paid for the item
$context['shop_paid'] = $row['amtpaid'];
// Set the page title
$context['page_title'] = $txt['shop_yourinv'];
// Use the trade item sub template
$context['sub_template'] = 'tradeItem';
}
// Sell an item - Part 2. Actually add the item to the trade centre
elseif ($_REQUEST['sa'] == 'trade_sell2')
{
// Make sure certain values were numeric
$_POST['id'] = (int) $_POST['id'];
$_POST['sellfor'] = (int) $_POST['sellfor'];
//TODO add the database stuff to shop_db.php
// Check the owner of the item
$result = $smcFunc['db_query']('', '
SELECT userid
FROM {db_prefix}shop_property
WHERE id = {int:id}
LIMIT 1',
array(
'id' => $_POST['id'],
));
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
// Sell it for a negative amount? That very odd...
if ($_POST['sellfor'] <= 0)
$context['shop_buy_message'] = $txt['shop_trade_negative'];
// Sorry, stealing is illegal :P
elseif ($row['userid'] !== $context['user']['id'])
$context['shop_buy_message'] = $txt['shop_use_others_item'];
else {
//TODO add the database stuff to shop_db.php
// Update item's information
$result = $smcFunc['db_query']('', '
UPDATE {db_prefix}shop_property
SET trading = 1,
tradecost = {float:tradecost}
WHERE id = {int:id}
LIMIT 1',
array(
'tradecost' => $_POST['sellfor'],
'id' => $_POST['id'],
));
$context['shop_buy_message'] = $txt['shop_trade_success'];
}
// Set the page title
$context['page_title'] = $txt['shop_yourinv'];
// Use the message template
$context['sub_template'] = 'message';
}
// Stop trading an item
elseif ($_REQUEST['sa'] == "trade_stop")
{
// Make sure ID was numeric
$_GET['item'] = (int) $_GET['item'];
//TODO add the database stuff to shop_db.php
// Get the ownerID of the item
$result = $smcFunc['db_query']('', '
SELECT userid
FROM {db_prefix}shop_property
WHERE id = {int:id}
LIMIT 1',
array(
'id' => $_GET['item'],
));
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
// Sorry, stealing isn't allowed here!
if ($row['userid'] !== $context['user']['id'])
$context['shop_buy_message'] = $txt['shop_use_others_item'];
else {
//TODO add the database stuff to shop_db.php
// Cancel the trade centre stuff
$result = $smcFunc['db_query']('', '
UPDATE {db_prefix}shop_property
SET trading = 0, tradecost = 0
WHERE id = {int:id}
LIMIT 1',
array(
'id' => $_GET['item'],
));
// Tell the user what we did
$context['shop_buy_message'] = $txt['shop_trade_cancelled'];
}
// Set the page title
$context['page_title'] = $txt['shop_yourinv'];
// Use the message template
$context['sub_template'] = 'message';
}
// Add it to the linktree
$context['linktree'][] = array(
'url' => $scripturl . '?action=shop;sa=trade',
'name' => $txt['shop_tab_trade'],
sorry if this question has already been asked, but is there an "email admin" item? and if not, would it be possible to make one?
Is there anyway i can change the name of "Credits" to "Paypal Dollars"
and take away the ability to get credits
but have the user upload real money through paypal and order products?
Hi, thanks for the mod. I've been trying out this one and the SMFShop mod. I like that this one has a game room already attached. Everything seems to be working very well.
The only issue, thus far, that I have found is none of the images are visible.
I'm running 2.0.2.
Any ideas?
Thanks a bunch!
Kendrall, thanks again for your help. I was able to get everything up and working.
The only issue, thus far, that I have found is none of the images are visible.
The only issue, thus far, that I have found is none of the images are visible.
ALWAYS, ALWAYS, ALWAYS, ALWAYS check the SMF Default theme when having an issue with a MOD on a custom theme. The images folder is theme specific, meaning you must copy the shopimg folder (and images within) from default/images over to your custom them images.
Name: The title of the item
Description:
Price:
Stock:
Category:
Image:
Delete Y/N
Enable Y/N
Then the options:
Enter # items to pick from in the Roll (eg, 3, 5, 20 etc)
Enter each Item's name (Item A, Item B, Item C)
% of each item's chance out of 100 to be drawn (eg 1%,4%,15%,30%,50% - would need to total 100%)
(Perhaps the visual of the two above set up in a similar manner as the Censored Words A = B and the 'add more' option that reveals more A = B boxes.)
To give user*: Eg, if the code ran an Item A, B, B, D, E, A, C and the number given here was 3, than the first three (A,B,B) would be given to the User. This bit isn't completely vital; but I would really, really, really love it to be included if possible :D
Add An Item / Edit
1 ~ Is there a way to add more games to the game room?
2 ~ We've had a bunch of members deposit money in the bank, but no one can take their money back out. How can I fix this?
Alright, we went live with this mod today. Within one hour, a member was able to find a glitch with the steal credits. If they use it too many times unsuccessfully and lose all of their positive Karma, it gives them the most amount of Karma possible (65525).
Is there a way to fix this? Maybe instead of taking away positive karma, it gives a negative one instead?
http://gr.2phatgeeks.com/index.php?action=shop;sa=inventory;next2=;sort=0;start=10 <-- This link brings up "This user does not exist,"
Screen shot attached
next2=;sort=0;
http://gr.2phatgeeks.com/index.php?action=shop;sa=inventory;start=10
Guests can't access your forum :(http://gr.2phatgeeks.com/index.php?action=shop;sa=inventory;next2=;sort=0;start=10 <-- This link brings up "This user does not exist,"
Screen shot attached
If you don't mind posting, what's the link when viewing the first page of the member's shop inventory?
Can you try removing this part from the URL and see if it shows you the 2nd page?Code: [Select]next2=;sort=0;
Guess it'd be easier if I just post the link with it removed :PCode: [Select]http://gr.2phatgeeks.com/index.php?action=shop;sa=inventory;start=10
then change 10 to 20, 30, and so on at the end of the URL to see if other pages are viewable. Just wanna test something.
http://gr.2phatgeeks.com/index.php?action=shop;sa=inventory;start=10
^^^^This works! The problem here, from what I can see, the "Next2=" should be the memberID after the equal sign. But it doesn't save it when browsing. The only fix I can offer is when members view their OWN inventory it will show on the next pages ( just NOT for when they look at other member's inventory).
Though, if you wanted to, you could change the limit for items shown per page, so it just shows all the items on page 1. Like, change the LIMIT from 10 to something like 50 or 100. Just have a long page to scroll to view all of a members items depending on how many they have. Though, sometimes LIMITs are there for a reason so it doesn't cause much stress on pulling items from your databse. I could be wrong, though.
Sorry for the delay, I'll try to find some time to check this bugs.
Thanks and regards
do you happen to know where I might change the limit for items shown for now--to see how it works for now?
WHERE userid = {int:userid}
LIMIT {int:start}, 10
I need every positive karma be added 10 credits.
And every negative karma is subtracted 10 credits. Could someone help me?
// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karma_good' : 'karma_bad' => '+'));
// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karma_good' : 'karma_bad' => '+'));
if ($dir == 1) {
$request = $smcFunc['db_query']('', "
UPDATE {$db_prefix}members
SET cash = cash + 10
WHERE id_member=".$_REQUEST['uid']."
"); }
else {
$request = $smcFunc['db_query']('', "
UPDATE {$db_prefix}members
SET cash = cash - 10
WHERE id_member=".$_REQUEST['uid']."
"); }
Was hoping something to allow members to re-arrange their inventory would have been added.
Was hoping something to allow members to re-arrange their inventory would have been added.
I've integrated this feature myself, if you're interested in the coding (1 column added to shop_property database and a few file edits) to possibly add it to an updated versions. It just adds a button to the member's own inventory list "move to top", where they can move an item to the front of their inventory, and do this as many times to rearrange their invenotry to appear how they'd like it to.
do you happen to know where I might change the limit for items shown for now--to see how it works for now?
Sources/shop2/Shop_db.php
FindCode: [Select]WHERE userid = {int:userid}
LIMIT {int:start}, 10
Replace 10 with a higher number, like 50 or 100
Page numbers will still be shown at the bottom of the page, even though all items are shown on 1 page.
// Now we need the items in the users inventory
$result = $smcFunc['db_query']('', '
SELECT itemid, id, comment, trading, tradecost
FROM {db_prefix}shop_property
WHERE userid = {int:userid}
LIMIT {int:start}, 50
',
array(
'start' => $context['start'],
'userid' => $userid,
)
);
Any ideas on how I might fix the signature display error?
Page numbers will still be shown at the bottom of the page, even though all items are shown on 1 page.
<table class="bordercolor" width="100%" cellspacing="1" cellpadding="5">
<tr class="catbg">
<td><b>',$txt['pages'],'</b> ',(isset($context['page_index']) ? $context['page_index'] : ''),' </td>
</tr></table>
you can find and removeCode: [Select]<table class="bordercolor" width="100%" cellspacing="1" cellpadding="5">
<tr class="catbg">
<td><b>',$txt['pages'],'</b> ',(isset($context['page_index']) ? $context['page_index'] : ''),' </td>
</tr></table>
from the shop.template.php in function template_inventory()
Can someone -please- explain to me how to edit or create a new item? Basically I want something simple; it would send a pm to the Admin account, with two fields, one would be a small text box asking for the 'adoptable' they are redeeming the item for, and the second would be a text box with room for any notes/etc they want. It would then send the information in a PM to the admin.
I assume this wouldn't be that hard, but can someone please walk me through what I would need to do? Also, I cannot for the life of me figure out how to add brand new items, the drop down just shows the default ones...
Quick question: Is there any way to disable certain items on the list or do they have to be completely deleted?
How can I add a "$" sign or possibly the word "Cash" in front of the number? With it being right below the post count, I want it to stand out.
Quick question: Is there any way to disable certain items on the list or do they have to be completely deleted?
How can I add a "$" sign or possibly the word "Cash" in front of the number? With it being right below the post count, I want it to stand out.
1. You can goto the Shop Admin menu, under "Items" and select to edit any item and uncheck the option for 'active' or something to disable shop item.
2. Again, in the Shop Admin settings, you can add a suffix or prefix that goes around the total cash. So you can actually have it show as "$1327 Cash"
" If I don't have any idea how to give support for someone's request then I don't waste mine or their time by posting, "I don't know"." <--- this is basically the same as ignoring.
If that works the same as what I was asking for then why not just tell me that?
I didn't realize that function was a part of the mod, it was kind of tucked in there, so I wasn't aware it did what I wanted.
Simply suggesting I use that instead of acting like my asking for this kind of thing was completely ridiculous would have been nice.
Anyone know how to add more games to this mod?
Anyone know how to add more games to this mod?
**And yes the proper folders sources/shop/item_images
HeyIf it would be possible!
Is there any special new feature you would like to see in SA Shop for SMF 2.1?
Both are already done. You can always set negative values there anyway.Yes I am aware that can be done as of now.
Maybe on December.Thanks! one quick question though...
However, the new version is just for smf 2.1
But why karma? Karma is totally different to the shop mod.Because with your shop mod, karma mod, Karma Description mod, and Hide Tag Special mod, I have many more options to use to
Also there's already available a karma mod for smf 2.1 made by the dev team.
That is not related neither to sa shop or smf shop.Point Taken!
It's just a shop mod, not a karma shop mod.
Why would I include in smf 2.1 core settings for a mod that its no more a core feature (karma)?
I just need to know how to reset points count.
quisiera traduccion en idioma español para SA Shop 1.0 RC1 gracias
wow nice work on updating this mod looking nice 8)
Thank you, it took too long, but finally this mod is getting updated
Actually you can still set the number of items that will appear in the post profile.
Anyway, that's a pretty good idea, I'm going to add that as an additional option in the admin settings.
I have the SA Shop installed in my forum. It worked perfectly fine until I upgrade the forum to 2.0.9. The credits info appear twice in postbit.Attach your display.template.php of that theme you're using. If it doesn't have, use the one that's in the default theme.
I tried to uninstall the Mod and the credit info didn't disappear.
I tried to install other ShopMod instead. The same thing happened.
Does anyone know how to delete it?
I actually plan to install SA Shop again once the problem is solved.
I would like to be able to limit an item to being purchasable and visible in the shop only for administrators - these items are intended to be very special rewards for deeds around the board, like awards but they actually do something, so I need them to be listable in the member's inventory, but not be purchasable by just anybody, we intend to gift them, and I don't want the members knowing what's possible to get. Is it possible to do that? If so, how?
Another thing is, how we have ours set up, some of these items are meant to be purchased more than once, and should be able to be stacked - ergo, they only display once in inventory, with a numerical value showing how many 'copies' of that item a user has. Is this doable, as well?
Thanks ahead of time!
One other suggestion, if possible. When "items are shown in member's posts" option is activated by admin ... member's could ALSO have the option to not display their items in posts. Some member's like to buy items, but don't like their posts profile/signature getting cluttered. :)
Everything's looking very nice. Admire the extra work you've been putting into this massive update :)
Limit the number of an specific item per member.
One other suggestion, if possible. When "items are shown in member's posts" option is activated by admin ... member's could ALSO have the option to not display their items in posts. Some member's like to buy items, but don't like their posts profile/signature getting cluttered. :)
Everything's looking very nice. Admire the extra work you've been putting into this massive update :)
Hi,
Wanted to install this Mod, during the first test i get these errors. (see attachment)
Anything i can do to get the errors fixed ?
Limit the number of an specific item per member.
Yes that's already done. the last changes were on February I think...
Let me update the Repo on Git so you can check it.
$info['description']
htmlspecialchars_decode($info['description'])
Just a row named "itemlimit" in the items column.
If I remember well, it only required to check the inventory to see how many items the user has.
// Check session
checkSession('get');
// You cannot get here without an item
if (!isset($_REQUEST['id']))
fatal_error(Shop::text('buy_something'));
// Make sure is an int
$id = (int) $_REQUEST['id'];
// Get the item's information
$result = $smcFunc['db_query']('', '
SELECT itemid, name, price, count, status, itemlimit
FROM {db_prefix}shop_items
WHERE itemid = {int:id}',
array(
'id' => $id,
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
// We need to find out the difference if there's not enough money
$notenough = ($row['price'] - $user_info['shopMoney']);
// How many of this item does the user own?
$limit = self::CheckLimit($id);
// Is that id actually valid?
// Also, let's check if this "smart" guy is not trying to buy a disabled item
if (empty($row) || $row['status'] != 1)
fatal_error(Shop::text('item_notfound'));
// Already reached the limit?
elseif (($row['itemlimit'] != 0) && ($row['itemlimit'] <= $limit))
fatal_error(Shop::text('item_limit_reached'));
hope im in the right place.
i've been scouring the net (along with a couple of friends), to find a Mod like this. Everything was going smoothly until I bumped into this issue in the install area. All tests but these were successful.
Execute Modification ./Themes/core/Display.template.php Test failed
1. Add After ./Themes/core/Display.template.php Test failed
2. Add Before ./Themes/core/Display.template.php Test successful
please please please help.
Is this page running on this mod?
https://smftricks.com/index.php?action=store
Is this page running on this mod?
https://smftricks.com/index.php?action=store
No, that’s the smf store by smfhacks
No, that’s the smf store by smfhacks
Thank you for sharing this info.
Is the look theme or all done in css?
And if it is a theme, do you know where it can be purchased?
Because it seems a nice starting point for making a shop that's incorporated with our forum.
8192: Non-static method Shop::getFeed() should not be called statically
.../index.php?action=shopfeed&_=1550342032145
8: Undefined index: lfyi
.../Themes/default/ShopAdmin.template.php (Line 33)
Type of error: General
Hook call: function "Shop::initialize" in file /home1/mysite/public_html/test could not be called. http://www.mysite.co.uk/test/index.php?action=admin;area=logs;sa=errorlog;desc
Regarding the games room it’s beause you need to setup an item using the game pass module so you can buy it and use it.
Ok sorry to seem dumb but where do I find the 'game pass module' was that the other download 'SA_Shop1.0_RC1.zip' on the download page?
Ok sorry to seem dumb but where do I find the 'game pass module' was that the other download 'SA_Shop1.0_RC1.zip' on the download page?
When adding a new item to the catalogue you have the option to select modules, use the game pass module :P
I believe I have an older version of this version of Shop upon further inspection, however it has no removal button in the package manager. How would I go out uninstalling this?
SA Shop 1.0 RC1 © 2012 Sleepy Arcade (copyright at buttom for referance)
Previous version is still attached in the mod page for 2.0.x
I would like to see this mod in action. Any dome site or someone who has this mod running?
8: Undefined index: Shop_credits_bonus
.../index.php?action=admin;area=manageboards
.../Sources/Shop/AdminShop.php (Line 226)
8: Undefined index: Shop_credits_post
.../index.php?action=admin;area=manageboards
.../Sources/Shop/AdminShop.php (Line 225)
8: Undefined index: Shop_credits_topic
.../index.php?action=admin;area=manageboards
.../Sources/Shop/AdminShop.php (Line 224)
8: Undefined index: Shop_credits_count
.../index.php?action=admin;area=manageboards
.../Sources/Shop/AdminShop.php (Line 223)
function Shop_preboardTree(&$extraBoardColumns)
{
global $context;
$extraBoardColumns += array(
'b.Shop_credits_count',
'b.Shop_credits_topic',
'b.Shop_credits_post',
'b.Shop_credits_bonus',
);
}
function Shop_preboardTree(&$boardColumns, &$boardParameters, &$boardJoins, &$boardWhere, &$boardOrder)
{
array_push($boardColumns,'b.Shop_credits_count','b.Shop_credits_topic','b.Shop_credits_post','b.Shop_credits_bonus');
}
Type of error: Template
Unable to load the 'main' template.
.../index.php?action=shopfeed&_=1563395950996
#0: fatal_lang_error()
Called from /home1/aliciam/21testing/Sources/Load.php on line 2610
#1: loadSubTemplate()
Called from /home1/aliciam/21testing/Sources/Subs.php on line 3279
#2: obExit()
Called from /home1/aliciam/21testing/index.php on line 154
Hi
A very comprehensive Mod you have created her, nice one - Can this mod be used as a ecommerce shop i.e payment terms paypal etc or is it just for use with credits earned from forum posts?
Cheers
Gary
este mod tenia futuro pero esta muy limitado no tiene nada intresante que adquirir al comprar deberia ser mas "util"
como un intercambio de puntos por algun privilgio como ver temas con contenido oculto
solo un punto de vista
$boards[$row['id_board']] += array(
So whenever I try to create a new category I get the following error:
Fatal error: Unsupported operand types in .../Sources/Shop/AdminShop.php on line 218
Unknown column 'callable' in 'field list'
File: /home/vol11_1/epizy.com/epiz_24303111/htdocs/Packages/temp/install.php
Line: 45
public static function fetchAlerts(&$alerts, &$formats)
Ran into another error that I can't figure out. It comes up whenever the alerts dropdown is viewed.
Type of error: General
2: Missing argument 2 for Shop::fetchAlerts()
.../Sources/Shop/Shop.php (Line 771)
That line is as follows:Code: [Select]public static function fetchAlerts(&$alerts, &$formats)
'show_alert' => 'Shop::showAlerts',
'fetch_alerts' => 'Shop::fetchAlerts',
I recently upgraded to smf 2.1 RC 2. I have tried to install the version of ST Shop from this site, and tried the one from github. However, I get the same Database error: Unknown column 'catid' in 'field list'
File: /home/*****/****/main/Packages/temp/ST-Shop-master/install.php
Line: 704
Ok. installed manually. it looks good, however the only functionality is when i click shop admin. the other buttons give me a 500 error
Any ideas?
Ok. installed manually. it looks good, however the only functionality is when i click shop admin. the other buttons give me a 500 error
Any ideas?
Are you hosted on a paid server? What characteristics does it have? php which version you have?
Regards!
Please. Here is the file in the attachment
and I still have such a question. How to create your own game for the game room.
Check the SMF version you’re using vs the version the mod is supporting.
shop page doesn't show from mobile menu..
shop page doesn't show from mobile menu..
I'm not sure what you mean
When selected from menu nothing happens
Even open link does not work!
Only open in new tab get to the shop page
Links work on desktop just fine only noticed problem on mobile