SMFShop - Shop MOD

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

Previous topic - Next topic

KuraWeb

QuoteThe Subs.php error is caused by Dreamweaver.  It mangles php files when you edit them.

-[Unknown]

I'm using Dreamweaver and this $·%$" program destroy all the file.


I'love the Subs.php~

[Unknown]

If you have problems with Wordpad, well, I don't know if Wordpad mangles files.... I've never used it for text file editing and never plan to.  I strongly suggest you use ConTEXT instead - www.context.cx.

Dreamweaver seems to be okay *usually*, but I've seen it mangle more complicated PHP files on many occasions.  I have no idea if there's a patch, the tenth or so time it happened to me was when I decided I'd never use the program again.  Luckily I was using it at school, so I didn't ever buy it.

-[Unknown]

russ

Quote from: trenchteam on January 01, 2005, 05:53:45 PM
I got this error. Now my site is froze up.

Fatal error: Call to undefined function: showbanner() in /home/xxxxxxx/xxxxxxx/forum/Sources/Load.php(1036) : eval()'d code on line 287

This happened after I tried to modify the SUB.PHP file again, then it spit out an error. When I put the original back, it gave me this.. error above.... Im stumped. :'(

Yeha i had that problem as well, remove temporarily from your files, the ssi command for showing the banner mod which i assume u have installed as well... then get rid of the banner mod from your package manager as whenever that is installed it seems to muck up version 1.0 - hope that helps

Senkusha

If you want to 'catch up' on the amount of money that each member should have (from the birth of the forum), you can use this little script that I created.  Just change the numbers to reflect your values:



<?php

$NewTopics 
10;
$NewPosts 8;

mysql_connect('localhost','root','');
mysql_select_db('smf');
$request mysql_query ("SELECT smf_members.realName, 
smf_members.ID_MEMBER AS ID_MEMBER, 
count(ID_TOPIC) AS var
FROM smf_members, 
smf_topics
WHERE smf_members.ID_MEMBER = smf_topics.ID_MEMBER_STARTED
GROUP BY smf_members.realName
ORDER BY smf_members.realName"
);

while (
$result mysql_fetch_assoc($request))
{
$variable $result['var'] * $NewTopics;
$person $result['ID_MEMBER'];
$request1 mysql_query ("UPDATE smf_members
SET money = '
$variable'
WHERE ID_MEMBER = '
$person'");
}

$request mysql_query ("SELECT smf_members.realName, 
smf_members.ID_MEMBER AS ID_MEMBER, 
count(ID_MSG) AS var, 
smf_members.money AS money
FROM smf_members, 
smf_messages
WHERE smf_members.ID_MEMBER = smf_messages.ID_MEMBER
GROUP BY smf_members.realName
ORDER BY smf_members.realName"
);

while (
$resultmysql_fetch_assoc($request))
{
$variable $result['var'] * $NewPosts;
$person $result['ID_MEMBER'];
$money $result['money'] + $variable;
$request1 mysql_query ("UPDATE smf_members
SET money = '
$money'
WHERE ID_MEMBER = '
$person'");

}
?>


--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Senkusha

On another note:  In a future version, would it be possible to "use" items on other members?
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Daniel15

Quote from: Senkusha on January 04, 2005, 04:46:24 PM
If you want to 'catch up' on the amount of money that each member should have (from the birth of the forum), you can use this little script that I created.  Just change the numbers to reflect your values:


<?php

$NewTopics 
10;
$NewPosts 8;

mysql_connect('localhost','root','');
mysql_select_db('smf');
$request mysql_query ("SELECT smf_members.realName, 
smf_members.ID_MEMBER AS ID_MEMBER, 
count(ID_TOPIC) AS var
FROM smf_members, 
smf_topics
WHERE smf_members.ID_MEMBER = smf_topics.ID_MEMBER_STARTED
GROUP BY smf_members.realName
ORDER BY smf_members.realName"
);

while (
$result mysql_fetch_assoc($request))
{
$variable $result['var'] * $NewTopics;
$person $result['ID_MEMBER'];
$request1 mysql_query ("UPDATE smf_members
SET money = '
$variable'
WHERE ID_MEMBER = '
$person'");
}

$request mysql_query ("SELECT smf_members.realName, 
smf_members.ID_MEMBER AS ID_MEMBER, 
count(ID_MSG) AS var, 
smf_members.money AS money
FROM smf_members, 
smf_messages
WHERE smf_members.ID_MEMBER = smf_messages.ID_MEMBER
GROUP BY smf_members.realName
ORDER BY smf_members.realName"
);

while (
$resultmysql_fetch_assoc($request))
{
$variable $result['var'] * $NewPosts;
$person $result['ID_MEMBER'];
$money $result['money'] + $variable;
$request1 mysql_query ("UPDATE smf_members
SET money = '
$money'
WHERE ID_MEMBER = '
$person'");

}
?>



hey, i might put that script in the next version of SMFShop (well in the installer amyway). thanks for that ;)


QuoteOn another note:  In a future version, would it be possible to "use" items on other members?
I'm assuming you mean items such as Reduce someone else's post count, steal items, change other's signature, etc, etc, etc. In that case, most likely... those items are really cool :)
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!

Senkusha

#46
Actually I had other things in mind.  I run an anime based website, and would have things that you could buy like a wooden mallot and do damage to other members (a new database field called Health or something, but yes, in general, have the ability to help or harm another member in some way.

Instead of just having a "use item" link you could have have a link like:  "Use Item on" (dropdown).  The dropdown would have a listing of all members, including yourself.  You could probably also make the selected member yourself.

Also, would it be possible to add more ways to earn money?  For instance each attachment a member posts could earn 15 credits and each poll that a member creates could earn 20.
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Squeakypants

I'm working on a simple replacement now (with basic php), but one item needed is a for real world things. The way I am making it is it will send an email to x email with the user name and verification number (random). Then they can print out the coupon, which will also have the verification number. I can't say why I need it, but I don't think I am the only one who needs it. At least the email part (for t-shirts and such)

btw, I have been waiting for this for awhile. i'll help as much as I can, and I thank you for making it so easy to make items.

DoW Kid Rock

can't seem to find the download for the newest version.  all I get is .1 beta

also for those of you that have dreamweaver on the install disc is an install for homesite and that is what I use to edit php files and it works great.  especially for searching for the right code.  it also colour codes everything to make it easier to find things.

have been waiting for this...and so have my members as I had IBshop on my invision board and it was awesome in conjunction with an arcade.  meaning people had to build up money to play the games.  would love to see it integrated that way

Elijah Bliss

Quote from: Squeakypants on January 05, 2005, 07:57:03 PM
I'm working on a simple replacement now (with basic php), but one item needed is a for real world things. The way I am making it is it will send an email to x email with the user name and verification number (random). Then they can print out the coupon, which will also have the verification number. I can't say why I need it, but I don't think I am the only one who needs it. At least the email part (for t-shirts and such)

btw, I have been waiting for this for awhile. i'll help as much as I can, and I thank you for making it so easy to make items.

I haven't tried this mod out yet, but does it have paypal functionality? After working on a project recently, I have enough PHP/MySQL knowledge to make a customized paypal page for each respective retailer if needed.

DoW Kid Rock

Quote from: Elijah Bliss on January 05, 2005, 09:42:52 PM

I haven't tried this mod out yet, but does it have paypal functionality? After working on a project recently, I have enough PHP/MySQL knowledge to make a customized paypal page for each respective retailer if needed.

this is a fun "shop" if I am not mistaken, where no real money is changing hands.  I think that if you wanted it to be used with real money  (i.e. selling merchandise) you could use this in conjunction with the donation mod and manually put money in people's accounts.

Jesse Shaw

QuoteIf you have problems with Wordpad, well, I don't know if Wordpad mangles files.... I've never used it for text file editing and never plan to.  I strongly suggest you use ConTEXT instead - www.context.cx.

Dreamweaver seems to be okay *usually*, but I've seen it mangle more complicated PHP files on many occasions.  I have no idea if there's a patch, the tenth or so time it happened to me was when I decided I'd never use the program again.  Luckily I was using it at school, so I didn't ever buy it.

-[Unknown]

Wordpad displays the files better than notepad. It wont mangle them if you just save as simple text. That way it removes all formating. Dreamweaver seems to only be good for html files. I never had any luck using it for anything other than html files.  I like wordpad better than notepad but thats a personal opinion.  :D
Jesse


Squeakypants

I HATE wordpad. I use Word for anything formatted. For editing I use ConTEXT, unless it's just for a second then I use notepad.

The new ConTEXT looks great :-D

btw, to download .2 you have to go to daniel's site. He prolly uploaded the wrong file (it says .2 in title, but the file is .1)

magicmule

i cant find the shop_install.php , wehre is this file ? sorry for my englisch 8)

Tony Reid

I suppose you could also have a 'buy a bigger IM allowance' as well :)

Tony Reid

magicmule


Daniel15

the download for 0.2 appears to have dissappeared... it was there one day, and i look now and it is gone... I'm reuploading it now.

Quote
i cant find the shop_install.php , wehre is this file ? sorry for my englisch
The shop_install.php file is located in the ZIP file. Extract all files and you will see it. I think you downloaded version 0.1 by accident, because 0.1 didn't have a shop_install.php file...

Hopefully I will work on the new version soon, but with me being busy, and school starting soon, etc, etc,etc i might not get any time
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!

LostProphecy

just a few questions about this...

is there anyway of disabling the  "use" feature... i don't plan on using any of the items that you have for sale and i merely want to use it for adding my own "play" items for my site and i want them to always remain in the inventory list so that admins can view them and such (i'm adding features like - start your own board) these things will have to be actioned by an admin... so basicly i want to disable the "use" button... i'm sure i could find the code if i wanted but it would be so much easier to know where to find it ;)
Angelus Ex Quo Nox

Daniel15

If you want to create your own item, make a copy of the item_testitem2.php in the Sources/shop/items/ directory. Open it with your favourite editor, and if you can understand PHP, it should be easy to understand how to create an item.

If you want to make an item unusable, go to the onUse() function (it looks like this in the test item):

    function onUse() {
        return "Hello, I am a test!<br>This is all the test item does!!";
    }


Instead of returning something, do change that code to something like this:


    function onUse() {
        die("Sorry, you can't use this item");
    }


This will prevent the item from being used (the only text displayed will be "Sorry, you can't use this item"). And, the item will remain in the members inventory.

--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!

russ

#59
How do you view other peoples inventories - ie one member seeing what sum1 else has bought?

for example add an extra variable to few a particular person?

http://www.myforum.com/smf/index.php?action=shop;do=inv;u=100 (100 being the member number for instance)

Advertisement: