Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - inkstains

Pages: 1 [2] 3 4 ... 13
16
Modifications / Re: SMFShop Stats Modification
« on: October 15, 2007, 04:24:31 am »
Won't let me install it on mine. I'm using SMF Shop 3.0 and SMF 1.1.3. Any ideas? It says "Unknown Package" and:

"Execute Modification | ./Sources/shop/Shop-Buy.php | Test failed "

the unknown package part doesn't really matter it, but it's your choice as to whether you install it or not on based on those grounds.

as for the error it just means another mod has probably modified that file. in which case you just do the edit to that file manually if you still want to use the mod.

basically just put Stats Mod package through the package parser here

http://modparser.dev.dansoftaustralia.net/

and scroll down until you find the edits it does to that file Shop-Buy.php

download your Shop-Buy.php file and follow the instructions to edit your file. then install the mod ignoring the error, then upload the new edited Shop-Buy.php file you have overwriting your current one and you should be good to go.

17
Items / Change Balances
« on: October 12, 2007, 09:45:06 am »
just an item to change the balances of Bank and Pocket either individually or together. saves going through mysql, which can be a little daunting for some.


save as ChangeBal.php and place inside your SMFShop's items folder and install as you would an ordinary item just making sure to set stock to zero so no one can purchase it. and then just give yourself the item through admin.


ChangeBal.php

Code: [Select]
<?php
if (!defined('SMF'))
die('Hacking attempt...');

class 
item_ChangeBal extends itemTemplate {
    function 
getItemDetails() {
    
    $this->authorName 'inkstains';
$this->authorWeb 'http://www.daniel15.com/forum/index.php';
$this->authorEmail '';
    
        
$this->name "Change Balance";
        
$this->desc "Change the balances of Bank and Pocket";
        
$this->price 10;
        
$this->require_input true;
$this->can_use_item true;
    }

function getUseInput() {

global $context$scripturl$settings$txt;
return '<br />Change Money Bank: &nbsp;&nbsp;<select name="resetB" size="1" id="resetB">
        <option value="0">No</option>
<option value="1">Yes</option>
  </select>
   Change Money Bank Value: &nbsp;&nbsp;<input type="text" name="info1" value="40" /><br />
<br />Change Money Pocket: <select name="resetP" size="1" id="resetP">
        <option value="0">No</option>
<option value="1">Yes</option>
  </select>
   Change Money Pocket Value: <input type="text" name="info2" value="40" /><br />
  '
;

    }


function onUse() {
        global 
$db_prefix$ID_MEMBER$item_info;

       
if ($_POST['resetB'] && $_POST['resetP'] == 1
{
db_query("UPDATE {$db_prefix}members
  SET moneyBank = 
{$_POST['info1']}
  "
__FILE____LINE__);
  
db_query("UPDATE {$db_prefix}members
  SET money = 
{$_POST['info2']}
  "
__FILE____LINE__);
  
        return 
"Money Bank and Money Pocket has been set to {$_POST['info1']} and {$_POST['info2']} respectively";
        
        die(
"dead");
}

elseif ($_POST['resetB'] == && $_POST['resetP'] == 0
{
db_query("UPDATE {$db_prefix}members
  SET moneyBank = 
{$_POST['info1']}"__FILE____LINE__);
        return 
"Money Bank has been reset {$_POST['info1']}";
        
        die(
"dead");
}

elseif ($_POST['resetB'] == && $_POST['resetP'] == 1
{
db_query("UPDATE {$db_prefix}members
  SET money = 
{$_POST['info2']}"__FILE____LINE__);
        return 
"Money Pocket has been reset {$_POST['info2']}";
        
        die(
"dead");
}

else
{

return "Please make sure you fill in all options";

}

    }

}

?>

18
Modifications / Re: SMFShop Inventory Post Modification
« on: October 09, 2007, 11:52:48 pm »
yeh it won't show and [apply now] link after it's uploaded go back and browse your packages and you'll see it there. if it's not there i can only recommend trying to upload again unless it threw an error?

19
Items / Re: Prediction - Guessing Item
« on: October 08, 2007, 05:36:04 pm »
updated roll/item images in the first post as well as updated code.

20
Coding / Re: Delete function "Use Item"
« on: October 05, 2007, 10:32:55 pm »
Hi i don't speak any spanish so you'll have to forgive me.

it appears you just want the item to be purchasable and not usuable in which case it's best to use the Rock item. below is an example it's just the Rock item changed to your spray item and it won't allow the user to use the item.

Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: Rock.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.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

// 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_spray extends itemTemplate
{

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

// The author of the item
$this->authorName 'Daniel15';
// The author's website
$this->authorWeb 'http://www.dansoftaustralia.net/';
// And their email address
$this->authorEmail 'dansoft@dansoftaustralia.net';


// VALUES CHANGEABLE FROM WITHIN ADMIN PANEL:
  // The name of the item
  $this->name 'Spray';
  // The item's description
  $this->desc 'Bote de spray el cual revitaliza grand parte de tu energia';
  // The item's price
  $this->price 13;
  
//UNCHANGEABLE VALUES:
  // Whether the item requires input or not. In this case, we don't need
  // any input
  $this->require_input false;
  // Since this is a rock (you can't use it), we set this to false
  $this->can_use_item false;
}

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

// Also, since this is a rock, you don't need an onUse function (since it doesn't get used)
}
?>


as for removing the trade item i don't believe you can do it for individual items but if you wanted to disable trade all together you can just go to Shop Admin and turn of the trade center.

hope this make sense.  :)

21
Items / Re: REQUEST - lock and unlock threads.
« on: October 05, 2007, 09:12:39 am »
i should say i only made that item to lock topics. there are no unlock functions but it wouldn't be to hard to add the options to that file.

22
Items / Re: REQUEST - lock and unlock threads.
« on: October 04, 2007, 07:27:16 pm »
name the php file

lockTopic.php

Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: StickyTopic.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.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_lockTopic extends itemTemplate
{
 
    function 
getItemDetails()
{
$this->authorName 'Daniel15';
$this->authorWeb 'http://www.dansoftaustralia.net/';
$this->authorEmail 'dansoft@dansoftaustralia.net';

          
$this->name 'Lock Topic';
          
$this->desc 'Lock any one of your topics!';
          
$this->price 400;

          
$this->require_input true;
          
$this->can_use_item true;
    }

    function 
getUseInput()
{
global $db_prefix$ID_MEMBER;

$returnStr '
Please choose which topic you would like to lock: <br />
<select name="lockTopic">'
;

$result db_query("
SELECT t.ID_TOPIC, t.locked, m.subject
FROM 
{$db_prefix}topics AS t, {$db_prefix}messages AS m
WHERE t.ID_MEMBER_STARTED = 
{$ID_MEMBER} AND m.ID_MSG = t.ID_FIRST_MSG"__FILE____LINE__);
while ($row mysql_fetch_assoc($result))
{
if ($row['locked'] == 0)
{
$returnStr .= '<option value="' $row['ID_TOPIC'] . '">' $row['subject'] . '</option>';
}
}

$returnStr .= '</select>';
        return 
$returnStr;
    }

    function 
onUse()
{
global $db_prefix$ID_MEMBER;

if (!isset($_POST['lockTopic'])) die('ERROR: No topic chosen!');
$_POST['lockTopic'] = (int) $_POST['lockTopic'];

$result db_query("
SELECT locked, ID_MEMBER_STARTED
FROM 
{$db_prefix}topics
WHERE ID_TOPIC = 
{$_POST['lockTopic']}"__FILE____LINE__);
$row mysql_fetch_assoc($result);

if (mysql_num_rows($result) == 0)
die('ERROR: That topic does not exist!');
if ($row['ID_MEMBER_STARTED'] != $ID_MEMBER)
die ('ERROR: That isn\'t your topic!');

db_query("
UPDATE 
{$db_prefix}topics  
SET locked = 1
WHERE ID_TOPIC = 
{$_POST['lockTopic']}
LIMIT 1"
__FILE____LINE__);
 
        return 
'Made topic #' $_POST['lockTopic'] . ' locked!';
    }
}

?>


23
General SMFShop Discussion / Re: Help needed please
« on: October 04, 2007, 07:09:55 pm »
see if that's what you're looking for

http://www.daniel15.com/forum/index.php/topic,1175.0.html

24
Installation Problems / Re: HELP !!!! Database Errror!
« on: October 04, 2007, 07:07:26 pm »
sometimes it takes a while man, i'm only a user of SMFShop just like you but i'll give a hand around here sometimes because it can take a while to get an answer and i know what it's like to wait and want to get stuff done. anyways i don't have redball installed anywhere so can't test this. but you can give it a go if you want.

make a backup of your Redball2 file then try using the below code

Code: [Select]
<?php

/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2006 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

//File: Redball2.php

// VERSION: 2.3 (Build 11)
// $Date: 2006-11-17 13:34:18 +1000 (Fri, 17 Nov 2006) $
// $Id: Redball2.php 24 2006-10-21 03:34:18Z Mh $
global $sourcedir;
require_once(
$sourcedir '/Subs-Post.php');
class 
item_Redball2 extends itemTemplate {
    
    function 
getItemDetails() {

$this->authorName "Masterhand";
                
$this->authorWeb "http://www.gameandcoders.uni.cc";
$this->authorEmail "austin.r.tanay@gmail.com";

          
$this->name "RedBall2";
          
          
$this->desc "Redball 2";
          
// The item's price
          
$this->price 100;

       
   
          
$this->require_input true;
         
          
$this->can_use_item true;
    }

    
      function 
getAddInput() {
        return 
"Max amount to give: <input type='text' name='info1' value='100'><br>
               Max amount to take: <input type='text' name='info2' value='-100'>"
;
    
}  


       function 
getUseInput() {
       
global 
$context$scripturl$settings$txt;
        return 
"Bounce To: <input type='text' name='stealfrom' size='50'>
         <a href='
{$scripturl}?action=findmember;input=stealfrom;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a>";
    }
    
    function 
onUse() {
        global 
$db_prefix$ID_MEMBER$user$item_info;
   
$pmfrom = array(
            
'id' => 1,
            
'name' => 'Admin',
            
'username' => 'Admin'
        
);
        
        
$pmto = array(
            
'to' => array($_POST['stealfrom']),
            
'bcc' => array()
        );
     
$result db_query("SELECT realName
                                FROM 
{$db_prefix}members
                                WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);
     
$row mysql_fetch_array($resultMYSQL_ASSOC);
$user $row["realName"];

       if (
$user == $_POST['stealfrom']) {
return 
"You cant throw it too yourself!";
die();
  }

else {
$amount mt_rand($item_info[2], $item_info[1]);

$result db_query("UPDATE {$db_prefix}members
                                SET money = money + 
{$amount}
                                WHERE realName = '
{$_POST['stealfrom']}'"__FILE____LINE__);
                                
sendpm($pmto'Heres a redball?'"<b>{$user}</b> Bounces The Ball To You And You Lose/Win ".formatMoney($amount)."! [i] You do not need to reply to this automated message"0$pmfrom); ;
                                return 
"You've thrown the ball to {$_POST['stealfrom']} if he catches it he'll gain money, else he'll lose it!!!";

       
$result db_query("SELECT ID_MEMBER
       FROM 
{$db_prefix}members
       WHERE realName = '
{$_POST['stealfrom']}'"__FILE____LINE__);
       
$row mysql_fetch_array($resultMYSQL_ASSOC);


            }

  }
  }

?>

this was taken from the Redball item thread here and just given a couple of tweaks.

http://www.daniel15.com/forum/index.php/topic,415.0.html

25
Requested additions / Re: Limit Item Purchases
« on: October 04, 2007, 12:06:54 am »
i did see that, but could not tell if it was complete. was mention it was uninstallable and not to code. not sure about the guidelines it was mentioning, thats why i asked here.

thanks for reply.

yeah i don't think the package is setup correctly but i have it on my forum and have had no problems with it, and uninstall wouldn't be to difficult if you ever needed to do it, it'd just be manual is all.

26
Requested additions / Re: Limit Item Purchases
« on: October 03, 2007, 04:20:02 pm »
do a search for limit items it'll be a thread by fieldmaster

27
Modifications / Re: SMFPets Version 0.2
« on: October 03, 2007, 04:17:51 pm »
you'll have to access phpMyAdmin through your control panel and edit the database. you'll need to go to the smf_shop_pets table and then edit the apostrophe out of the name or description or wherever it is.

28
Bugs / Re: Error with shop mod in arcade
« on: September 29, 2007, 07:19:57 am »
Hi everyone, I am experiancing this problem in the arcade. Ther error is "A pass is required to play. Buy one from the shop". I have not a clue what it means or what to do. Help would be appreciated


*EDIT* Sorry for posting in wrong section

this is more an arcade question

http://www.smfarcade.info/

or a question for this thread

http://www.daniel15.com/forum/index.php/topic,668.0.html

but basically it means you have installed the arcade shop mod and you need to purchase an arcade pass from the shop to access it. if you haven't set up the item for the shop yet do so by going to admin and the shops normal add/edit/delete items menu. else if you don't want the arcade pass just go to packages and uninstall the package.

29
Modifications / Re: SMFPets Version 0.2
« on: September 29, 2007, 07:16:12 am »
just to clarify, can you access the shop or does it give that error?

if you get that error when you access the shop then someone may have just added an apostrophe in a pets name or description in which case you'll need to access through phpmyadmin and remove the apostrophe

else if you can access the shop and everything in it but when you use a certain skill it errors you would need to post your pets php file so someone can check it to see what's wrong with it.

30
Items / Re: Prediction - Guessing Item
« on: September 28, 2007, 09:54:41 pm »
it's pretty old but cheers feeble O0


edit: when ya gonna finish that topic rating mod

me wants  ;D

Pages: 1 [2] 3 4 ... 13