News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMFShop - Shop MOD

Started by SMFHacks.com Team, December 27, 2004, 06:46:17 AM

Previous topic - Next topic

Senkusha

Quote from: Alisha on February 01, 2005, 04:24:16 PM
Quote from: Senkusha on February 01, 2005, 04:07:06 PM
I'm sure I could whip up a script to do so....but I think this would be Daniel's call though.

I don't see how he would mind, he has school, and it would benefit his MOD.  Although, like items I have made, I make sure he gets credit for the base design in the php notes.  This is the whole idea behind open source. So people can help develop and share development of the project.  SMF wouldn't be here if not for the members help unknown put things together, testing, debugging, and contributing parts to the project. 

QuoteAs far as the RPG is going, I'm currently in the middle of rewritting it so that it can support multiple game systems.  I imagine that it is still quite a while away from completion, although the SMFShop mod could be incorperated into the RP mod when I'm finished, that way I don't have to reinvent the wheel!  Wink

This will be nice.. planning to Share?  I would love something like this...

Alright, I'll look into writing something.  You just want to view what other members have, right?

Yes, I do plan on sharing, right now, though the mod is still in it's "prenatal" stage!
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

babylonking

The Bank Interest seems to be working in cron job but i still get an error msg below in interest.htm file.  ::)

Notice: Undefined index:  REMOTE_ADDR in /home/babylon/public_html/forum/Sources/Load.php on line 174

Notice: Undefined index:  SERVER_SOFTWARE in /home/babylon/public_html/forum/Sources/Load.php on line 732

Notice: Undefined index:  SERVER_SOFTWARE in /home/babylon/public_html/forum/Sources/Load.php on line 733



Any idea  8)


redone

Fixed. Problem with the post.php file. Uploaded the orignal and did the changes to the file myself and it now works.

:D

Alisha

#183
Quote from: babylonking on February 02, 2005, 04:54:14 PM
The Bank Interest seems to be working in cron job but i still get an error msg below in interest.htm file. ::)

Any idea 8)


Hey, least your getting one! lol I never was able to make it generate me a file.

Thought, maybe you need one of the fance include files that will tell the html what SMF is all about or the shop or somthing?  I know NOTHING about what I am talking about...  Like the one needed to SSI work on other html files?

russ

Found a slight error when buying your own items to be usedi n the forum. For some reason when clicking "buy" it buys two of the same item instead of just the one....

redone

On trying to check the inventory I get the following error:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY smf_shop_inventory.id' at line 8
File: /home/britport/public_html/Sources/shop/ShopAdmin.php
Line: 85

Any idea what this means?  :(

russ

Quote from: babylonking on January 28, 2005, 06:39:52 PM
Quote from: daniel15 on January 28, 2005, 03:40:03 AM
Quote from: babylonking on January 27, 2005, 05:13:08 PM
How about reduce members money to $0 if they spams? My members start spamming now and i hate that  ::)
you can do that in the admin section of your forum,under 'Members Inventory.

i'll  be working on the items page soon, but as you might already know, school has started so i can only work on this Friday nights, saturday and sunday :(. Don't worry, development might be a bit slow, but will eventually get done ;)

--daniel15

Yup but how can that be done automatically  :P

QuoteI was wondering hw u managed to make soem of the various items you created appear underneath the member in questions avatar...? Nice looking site btw

QuoteThat sounds like a great idea, but how would you implement something like that?

I know it's hard to do that but it's good idea though  ;)

QuoteI was wondering hw u managed to make soem of the various items you created appear underneath the member in questions avatar...? Nice looking site btw

I got the code from alisha and i look at it and it was very easy to add new items, I just added new item called monkey butt member :P

You only need to add field in smf_members and another code in display template, Lets say you wanna add the monkeybutt item, In PHPmyAdmin click on smf_members Structure icon then add new field by clicking the go button the one beside the drop down menu for members Structure, then set the field name to Monkeybutt and set the type to INT,Length/Values to 10, Default to 0 and click the save button.

Also add the code below the //END SHOP MOD in display.template.php 

// add monkey butt

             global $ID_MEMBER, $db_prefix;

             $result_Monkeybutt = db_query("SELECT Monkeybutt
                                           FROM {$db_prefix}members
                                           WHERE ID_MEMBER = {$message['member']['id']}
                                           LIMIT 1", __FILE__, __LINE__);
             while ($row = mysql_fetch_assoc($result_Monkeybutt))

             if($row['Monkeybutt'] == '1')
               {
                     echo '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/monkeybutt.gif" alt="OWNED" style="margin: 2px 0;" border="0" /><br />' ;
                  } else {
                     echo '';

                  }


Then upload the attached monkeybutt.gif to your forum/Themes/default/images/english/

also upload the attached monkeybutt templates to your forum/Sources/shop/

Done  8)

Is it possible to include the above code on other pages, for instance index.template.php (ive tried it once but i got "500 Server Errors") - not too sure how to change it to work on other pages.... kinda like a status as u browse to know that uve been monkeybutted so u can do something about it :)

russ

... and jus another thing, how do u increae the stock number from the default 50 to say infinite?

Alisha

Quote from: russ on February 03, 2005, 01:59:17 PM
... and just another thing, how do u increase the stock number from the default 50 to say infinite?

I don't think you can. If you want an unlimited amount comment out the code that subtracts it from the stock.. Set the stock at 250 and comment it out. 

Quote
Is it possible to include the above code on other pages, for instance index.template.php (ive tried it once but i got "500 Server Errors") - not too sure how to change it to work on other pages.... kinda like a status as u browse to know that uve been monkeybutted so u can do something about it Smiley

Not sure if this is possible with this code because the code is written based on a query of the SQL for the member specified by {$message['member']['id']  its the $message that identifies the member to use the IF statement to show or not show the image.  On the index there is no equivlent to the $message identifier that is used in this code.  So with out something to identify a single line from the list of members in the SQL it will not work.

I am sure it can be done with a rewrite of the code.

russ

I look forward to what people come up with :) im not as experienced with php as i would like to be , but i am learning :)

russ

One of my members has thought of what i thinks a good idea :) is there a way to buy say a "steal" item - which allows you to steal, say a random amount of credits from the user u defined?

Just thinking of lots of ways to make forums unique with lots of fun features etc :)

babylonking

QuoteIs it possible to include the above code on other pages, for instance index.template.php (ive tried it once but i got "500 Server Errors") - not too sure how to change it to work on other pages.... kinda like a status as u browse to know that uve been monkeybutted so u can do something about it

I really don't know much about php coding but i hope some one will help you out.

QuoteHey, least your getting one! lol I never was able to make it generate me a file.

Thought, maybe you need one of the fance include files that will tell the html what SMF is all about or the shop or somthing?  I know NOTHING about what I am talking about...  Like the one needed to SSI work on other html files?

I am using the code below in cron job and it works.
/usr/local/bin/php /home/babylon/public_html/forum/Sources/shop/dointerest.php > /home/babylon/public_html/interest.htm

babylonking

Quote from: russ on February 03, 2005, 06:20:18 PM
One of my members has thought of what i thinks a good idea :) is there a way to buy say a "steal" item - which allows you to steal, say a random amount of credits from the user u defined?

Just thinking of lots of ways to make forums unique with lots of fun features etc :)

That will be most wanted item  ;)

reznorsoft

Quote from: babylonking on February 03, 2005, 08:09:39 PM
Quote from: russ on February 03, 2005, 06:20:18 PM
One of my members has thought of what i thinks a good idea :) is there a way to buy say a "steal" item - which allows you to steal, say a random amount of credits from the user u defined?

Just thinking of lots of ways to make forums unique with lots of fun features etc :)

That will be most wanted item  ;)
No doubt, it will. This sounds like a great mod. I'll definitely try it on my test board.

hypnoticpimp

HELP!!!!!! I get his error when i try to install it
Table 'hypno_nittomysqltar.smf_nittoshop_items' doesn't exist
File: /home/hypno/public_html/forum/Packages/temp/updateScript.php
Line: 18

how can i fix this

sacred-tear

When i click proceed this happens
""Database Error
Duplicate column name 'moneyBank'
File: /home/csidog/public_html/forum/Packages/temp/updateScript.php
Line: 9 ""

can anyone help? I don't think it's only me who have this problem. ^^`

Justyne

I love the shop mod.. I just installed it again after the changes to it and I think it is really nice now.

One small suggestion, wouldn't it be nicer if the stats inside the shop showed the Name (displayed name) and opposed to the Username (login name)? Probably even make it clickable so it takes you to the users profile.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Daniel15

ok.... this is the first time i've been back here since last Sunday... i'm trying to go through the posts (there's so many!) and answer all your questions. If i missed anyone, please email me (i usually check my emails more that i visit this forum) through my website (dansoftaustralia.com, click on 'Contact Us' and fill out form)

Quote
The Bank Interest seems to be working in cron job but i still get an error msg below in interest.htm file. 

Notice: Undefined index:  REMOTE_ADDR in /home/babylon/public_html/forum/Sources/Load.php on line 174

Notice: Undefined index:  SERVER_SOFTWARE in /home/babylon/public_html/forum/Sources/Load.php on line 732

Notice: Undefined index:  SERVER_SOFTWARE in /home/babylon/public_html/forum/Sources/Load.php on line 733


Any idea
you must have error_reporting(E_ALL) on. This shows all errors, including notices. This can safely be ignored (it's trying to find the client IP and server software, but they're not reported when using CRON

Quote
On trying to check the inventory I get the following error:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY smf_shop_inventory.id' at line 8
File: /home/britport/public_html/Sources/shop/ShopAdmin.php
Line: 85

Any idea what this means?
That i'm not sure of... it seems right to me... :S

Quote
... and jus another thing, how do u increae the stock number from the default 50 to say infinite?
What you could do is set the stock to 99999 or something like that. There is a way to make unlimited stock, but it effects every item in your shop.

find '//decrease stock by 1' in your Sources/shop/Shop.php file (line 201). at the start of the  5 lines underneath that, put '//'. You get something like this:


            //decrease stock by 1
            //$result = db_query("UPDATE {$db_prefix}shop_items
            //                    SET stock = stock - 1
            //                    WHERE id = {$_GET['id']}
            //                    LIMIT 1",
            //                    __FILE__, __LINE__);

what this essentially does is makes those lines a comment (so they aren't executed)

Quote
ne of my members has thought of what i thinks a good idea  is there a way to buy say a "steal" item - which allows you to steal, say a random amount of credits from the user u defined?
I was thinking about that... might do that in the future

Quote
HELP!!!!!! I get his error when i try to install it
Table 'hypno_nittomysqltar.smf_nittoshop_items' doesn't exist
File: /home/hypno/public_html/forum/Packages/temp/updateScript.php
Line: 18

how can i fix this
you've tried to install the UPDATE package, but haven't installed SMFShop 0.2. Get the FRESH INSTALL package and install that

Quote
When i click proceed this happens
""Database Error
Duplicate column name 'moneyBank'
File: /home/csidog/public_html/forum/Packages/temp/updateScript.php
Line: 9 ""

can anyone help? I don't think it's only me who have this problem. ^^`
Your database has already been updated for SMFShop 1.0, but it is trying to update again. Try your shop, it should work...

again, sorry if i forgot anyone, but i'm just skimming through the posts.

Before you say 'Hey, why don't you reply straight away?', 'Why aren't you here often?' and stuff like that, please remember that i'm a 14 year old and i've got stuff like school (Year 10) so i can't always be here. However, if you E-Mail me, i usually check my emails so you are more likely to reach me. Thanks for understanding ;)

--daniel15
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Midgard


russ

Thanks for checking back dan :) its a great mod and we cant wait for more development :)

Advertisement: