SMF Shop

SMFShop => General SMFShop Discussion => Topic started by: Existenz on August 22, 2006, 11:28:39 pm

Title: RC 3?
Post by: Existenz on August 22, 2006, 11:28:39 pm
Have you gotten SMFShop to work with RC3 yet? Just asking out of interest sake...
Title: Re: RC 3?
Post by: Greyias on August 23, 2006, 07:54:12 am
On the topic of RC3... if we do want to upgrade to the new versions of SMF, are we going to basically lose all the work on our shops because we have to re-install everything?  If so, is there an easy way to maybe back up items/inventories/everyone's money? I did a little dance last night at the news of the release, until I realized this.

I've recently been under attack by spam bots, so I'd really like to use the CAPTCHA option (that, and the red "Out of date!" warning in the ACP bugs me). I'm holding off on upgrading though until I know I won't lose the shop :)
Title: Re: RC 3?
Post by: Daniel15 on August 24, 2006, 08:20:15 pm
I'll take a look at RC3 later, and try SMFShop with it. If it works fine, I'll update the package ;)

Quote
[On the topic of RC3... if we do want to upgrade to the new versions of SMF, are we going to basically lose all the work on our shops because we have to re-install everything?  If so, is there an easy way to maybe back up items/inventories/everyone's money? I did a little dance last night at the news of the release, until I realized this.
As far as I know, installing RC3 will uninstall all MODs? If so, then SMFShop will be uninstalled. The best way to save your information would be to create a backup of the smf_shop_* tables in phpMyAdmin (Export them, with data). Then, save the output. Once you get everything working again, restore the backup :)

EDIT: OK, it appears to work fine with SMF 1.1 RC3 (using the SMF 1.1 RC2 install XML file). I've just updated the archive to work with it :)
Title: Re: RC 3?
Post by: Basil Beard on August 26, 2006, 10:51:44 am
Yup. Consdering there were no changes between RC1 and RC2 I assumed there was no changed in RC3 and just copied the update file so that it would work. =P. Finally got my shop more or else working again as well. Just need to add all the items tomorrow ;-)
Title: Re: RC 3?
Post by: littleone on August 27, 2006, 06:36:55 am
I'll take a look at RC3 later, and try SMFShop with it. If it works fine, I'll update the package ;)

Quote
[On the topic of RC3... if we do want to upgrade to the new versions of SMF, are we going to basically lose all the work on our shops because we have to re-install everything?  If so, is there an easy way to maybe back up items/inventories/everyone's money? I did a little dance last night at the news of the release, until I realized this.
As far as I know, installing RC3 will uninstall all MODs? If so, then SMFShop will be uninstalled. The best way to save your information would be to create a backup of the smf_shop_* tables in phpMyAdmin (Export them, with data). Then, save the output. Once you get everything working again, restore the backup :)

EDIT: OK, it appears to work fine with SMF 1.1 RC3 (using the SMF 1.1 RC2 install XML file). I've just updated the archive to work with it :)

So where can I download the latest version that is compatible with RC3?

Thanks,
LittleOne
Title: Re: RC 3?
Post by: littleone on August 27, 2006, 08:23:57 am
When I look all I see is Arcade 2.2 with a last updated date of in July.  I see it says under the news its been updated but no where do I see a 1.1 RC 3 only 1.1 RC 2?  Help please ;)
Title: Re: RC 3?
Post by: Daniel15 on August 27, 2006, 11:54:08 am
Quote
So where can I download the latest version that is compatible with RC3?
Go to http://www.dansoftaustralia.net/ , and click on 'SMFShop'. The newest ZIP file is fully compatible with SMF 1.1 RC3 ;)
Title: Re: RC 3?
Post by: littleone on August 28, 2006, 03:00:09 am
Ok I am trying to upload the Change_All to the sources/shop/items folder but it wont let me.  I keep getting an error saying its now allowed or that there is some kind of timeout.  I didnt have this problem last time
Title: Re: RC 3?
Post by: littleone on August 28, 2006, 12:53:48 pm
I cant change the CMOD on the shop or shop/items folder.  I keep getting a permission denied error, and therefore I am unable to move or paste my Change_All.php into the shop/items folder.  Any suggestions would help a bunch!
Title: Re: RC 3?
Post by: Syndel on August 30, 2006, 09:04:14 am
Hi!
I opened a ticket of support, but not sure if that worked. I am sorry, my first language is not English!
I installed the newest version for RC3 and I am having 2 issues:

1) Cannot add items

Quote
Fatal error: Cannot instantiate non-existent class: item_addtopostcount in /www/cgi/boards/Sources/shop/ShopAdmin.php(174) : eval()'d code on line 1

2) Cannot edit member's inventory of a member that exists cause say it doesn't! Even when I find it in the search members tool :/

Help please?
Title: Re: RC 3?
Post by: Basil Beard on August 30, 2006, 08:14:53 pm
Quote
1) Cannot add items

Quote
Fatal error: Cannot instantiate non-existent class: item_addtopostcount in /www/cgi/boards/Sources/shop/ShopAdmin.php(174) : eval()'d code on line 1

Are you sure the addtopostcount.php item is in the proper place in the store?

Quote
2) Cannot edit member's inventory of a member that exists cause say it doesn't! Even when I find it in the search members tool :/

Help please?

Not sure here. You are using the real name not the display name, right?
Title: Re: RC 3?
Post by: Syndel on September 01, 2006, 12:31:00 am
What is the proper place in the store for the addtopostcount.php? I dunno much about codes....
And yep... was using the real name, not the display.
Title: Re: RC 3?
Post by: Basil Beard on September 02, 2006, 06:43:20 am
whatever your forum directory/sources/shop/items
Title: Re: RC 3?
Post by: Syndel on September 02, 2006, 08:48:52 am
I fixed the non-existant user by changing his username... then it accepted it... go figure....
I don't understand what code could be missing or what should be added.
I am really lost.
Title: Re: RC 3?
Post by: Syndel on September 02, 2006, 09:42:41 am
And yep... addtopostcount is inside /www/cgi/boards/Sources/shop/items/
Title: Re: RC 3?
Post by: Syndel on September 02, 2006, 10:04:59 am
This is what my ShopAdmin.php looks like:

<snipped by Daniel15, too long>
Title: Re: RC 3?
Post by: Syndel on September 02, 2006, 10:11:18 am
And this is the AddToPostCount.php

Quote
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.com/        |
\**********************************************/

//File: AddToPostCount.php
//      Item (takes additional fields when adding to Admin panel)

//VERSION: New Version
//DATE: 10th April 2005
// $Id: AddToPostCount.php 3 2006-07-08 10:01:21Z daniel15 $

class item_AddToPostCount extends itemTemplate {
    function getItemDetails() {
        $this->name = "Add xxx to Post Count";
        $this->desc = "Increase your Post Count by xxx!";
        $this->price = 50;
       
        $this->require_input = false;
        $this->can_use_item = true;
    }
   
    //this is the best bit of this item. When you add the item into the admin panel, you
    //can set additional variables (up to 4). Make sure to call them info1, info2, info3
    //and info4.
    function getAddInput() {
        return "Amount to change post count by: <input type='text' name='info1' value='100'>";
    }

    //the additional parameters (see 'getAddInput' above) are in the '$item_info array.
    //make sure to make it global (like shown here) otherwise you won't be able to access
    //it's contents. THE ARRAY IS 1-BASED (eg. 1 IS THE FIRST ITEM) NOT 0-BASED!
    function onUse() {
        global $db_prefix, $ID_MEMBER, $item_info;

        $result = db_query("UPDATE {$db_prefix}members
                            SET posts = posts + {$item_info[1]}
                            WHERE ID_MEMBER = {$ID_MEMBER}",
                            __FILE__, __LINE__);
        return "Successfully added {$item_info[1]} to post count!";
    }

}

?>
Title: Re: RC 3?
Post by: Daniel15 on September 02, 2006, 10:57:47 am
Syndel, that's an interesting problem... I haven't seen that before. Could you please check in your forum's error log to see whether any errors were output there.

If there's nothing, could you please open your Sources/shop/ShopAdmin.php file, and try changing
                include "$sourcedir/shop/items/$file";

to:
                require "$sourcedir/shop/items/$file";

And see if it makes a difference?
Title: Re: RC 3?
Post by: Syndel on September 02, 2006, 01:41:36 pm
Nothing was recorded in the error log about the shop other than this, which has nothing to do with the add items thing:

Quote
Syndel   Today at 11:39:41 PM 
      fc9c2376c5a8c50b18c73bb0000f31e1 
 http://roleplaycentral.com/cgi/boards/index.php?action=shop;do=viewall 
Unable to load the 'InstantMessage.english' language file.

And after I made the substitution you asked me to, the error changed to:

Quote
Fatal error: Failed opening required '/www/cgi/boards/Sources/shop/items/AddToPostCount' (include_path='.:/usr/share/pear') in /www/cgi/boards/Sources/shop/ShopAdmin.php on line 168
Title: Re: RC 3?
Post by: Daniel15 on September 02, 2006, 04:46:44 pm
OK, I think I found the problem. Try changing the
               require "$sourcedir/shop/items/$file";

to:
               require "$sourcedir/shop/items/{$file}.php";

That should work for you :)
Title: Re: RC 3?
Post by: Syndel on September 03, 2006, 12:11:53 am
Nope...
I did change that and it gives me:

Quote
Fatal error: Failed opening required '/www/cgi/boards/Sources/shop/items/AddToPostCount' (include_path='.:/usr/share/pear') in /www/cgi/boards/Sources/shop/ShopAdmin.php on line 168

Oh yeah... how do people add items for trade on their own? I do not see how... :)