SMF Shop

SMFShop => Items => Topic started by: eugeniu on January 08, 2007, 09:42:06 am

Title: [RERELEASED] Magic 8 Ball
Post by: eugeniu on January 08, 2007, 09:42:06 am
Sorry everyone, it never crossed my mind that others will want to use this script later on =(. Well the download link has been updated, enjoy!

This script has a user type a question and submit it. On the next page, the user sees a magic 8 ball, his question, and a random answer from the script. A very useful script. ;)

Download: http://www.fuzillion.com/SMF/personal/downloads/magic8ball.zip (http://www.fuzillion.com/SMF/personal/downloads/magic8ball.zip)
Title: Re: Magic 8 Ball
Post by: Maniakc on January 10, 2007, 12:21:52 pm
Best item ever! :P

Its very pointless, but I love it, thanks for the great item! :D
Title: Re: Magic 8 Ball
Post by: eugeniu on January 10, 2007, 09:13:22 pm
Thanks. :)
Title: Re: Magic 8 Ball
Post by: TechnoDragon on January 11, 2007, 09:59:08 pm
Great Item and it is a hit on my forum!  Great job!
Title: Re: Magic 8 Ball
Post by: doon on August 11, 2007, 02:31:00 am
can u plzz check those linkz again..... thnxxx
Title: Re: Magic 8 Ball
Post by: zero061099 on August 16, 2007, 04:18:53 am
Can we possibly get another link please?
Title: Re: Magic 8 Ball
Post by: J-xToF on September 17, 2007, 02:14:33 am
Link is dead.
Update link plz?
Title: Re: Magic 8 Ball
Post by: Alundra on September 27, 2007, 07:47:31 am
please fix the links lol
Title: Re: Magic 8 Ball
Post by: inkstains on September 27, 2007, 03:55:01 pm
your best bet is to probably try emailing the author of the mod
Title: Re: Magic 8 Ball
Post by: eugeniu on November 13, 2007, 07:09:05 am
Wow! I completely forgot about this! Must have been all those months ago when I lost my forums  :P. Hm, I hope it still works with whatever version of the SMF-Shop there is now...lol.

I'll look for the download in my backups folder ^_^.
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: Alundra on November 16, 2007, 11:01:21 am
did you find it?
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: eugeniu on November 24, 2007, 11:30:33 pm
Yes, I updated the link about 16 days ago...
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: Ponchito147 on February 03, 2008, 01:27:16 pm
I think you have a bug in your script:

Excuse my English. :-)

If an bad-intentioned user buys the Magic Ball, he can insert any html code in the "question" field. That´s very dangerous, because he can obtain the admin password, or hack the forum.....

Here is the solution:

You have to replace the code from $sizeof = count($answer); to </center>";  with this one:

$sizeof = count($answer);
   $random = (rand()%$sizeof);
//make the question a variable
        $cambiar = $_POST['question'];
// Change al the < and >
        $cambiar = str_replace("<","&#8249;",$cambiar);
        $cambiar = str_replace(">","&#8250;",$cambiar);
// print all in the page

return "<center><img src='http://xxxx.lomasinteresante.net/Sources/shop/xx/8ball.jpg' width=300 height=320><br />Tu pregunta fue $cambiar<br /><br />La bola responde:<br /><br />$answer[$random]</center>";

Note: Don´t forget to  change the path for your image and translate al to your language.
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: hellocritter on February 13, 2008, 11:51:05 am
Sorry, one big silly question... where do I install this script?

This sounds really fun and I would love to try it. Thank you!
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: hellocritter on February 13, 2008, 03:02:48 pm
Oh I figure it. Thanks! Cool stuff!
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: Daniel15 on February 15, 2008, 06:51:02 am
Quote
Hm, I hope it still works with whatever version of the SMF-Shop there is now...lol.
SMFShop hasn't really been updated since January 2007, so it'll be fine ;)

Quote
Here is the solution:
HTML injection doesn't allow them to obtain the admin password nor hack the forum. They're only injecting the HTML into a page that only they can see anyways, so it's pointless.
The correct fix:
Find:
Code: [Select]
function onUse() {Add after:
Code: [Select]
$_POST['question'] = htmlspecialchars($_POST['question']);
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: Ponchito147 on February 15, 2008, 09:00:02 am
You are the master.
Title: Re: [RERELEASED] ]Magic 8 Ball
Post by: eugeniu on February 20, 2008, 08:54:41 am
Quote
Hm, I hope it still works with whatever version of the SMF-Shop there is now...lol.
SMFShop hasn't really been updated since January 2007, so it'll be fine ;)

Quote
Here is the solution:
HTML injection doesn't allow them to obtain the admin password nor hack the forum. They're only injecting the HTML into a page that only they can see anyways, so it's pointless.
The correct fix:
Find:
Code: [Select]
function onUse() {Add after:
Code: [Select]
$_POST['question'] = htmlspecialchars($_POST['question']);

Now all you have to do is move this to the completed additions section :).
Title: Re: [RERELEASED] Magic 8 Ball
Post by: Tweet on March 29, 2008, 05:13:46 am
I just put this in MY Shop 10 minutes ago & everybody is addicted already! Oh, and I added a few extra answers too!

Thanks eugeniu & Daniel15! :)
Title: Re: [RERELEASED] Magic 8 Ball
Post by: Jake on June 16, 2008, 11:04:08 am
Does anyone have an updated link?
Title: Re: [RERELEASED] Magic 8 Ball
Post by: 123456 on July 19, 2008, 03:37:54 pm
A download link please?
Title: Re: [RERELEASED] Magic 8 Ball
Post by: damo3933 on July 23, 2008, 06:22:07 pm
Anyone got a link for this? please ? :P
Title: Re: [RERELEASED] Magic 8 Ball
Post by: darkacex on July 26, 2008, 10:01:13 am
update link please
Title: Re: [RERELEASED] Magic 8 Ball
Post by: mike dijital on October 17, 2008, 04:46:22 am
Anyone got a link or is willing to email me the addon it would be very welcomed!!