Belated 2-year anniversary (+ a code challenge)
Hooray!
2 years ago, plus 5 days, the Witch's Brew official site launched. Before that it was triple hosted by Mario, Geoff, and myself.
Anyway, I was thinking about making a random brew generator, but I know nothing of those fancy dynamic web-languages. So, if anyone can make a random brew generator, we'll totally make a page for it, and give you a super neat link with an icon next to it.
So, there...
2 years ago, plus 5 days, the Witch's Brew official site launched. Before that it was triple hosted by Mario, Geoff, and myself.
Anyway, I was thinking about making a random brew generator, but I know nothing of those fancy dynamic web-languages. So, if anyone can make a random brew generator, we'll totally make a page for it, and give you a super neat link with an icon next to it.
So, there...
Comments
Happy birthday, official Witch's Brew website!
See in action: http://huah.net/junk/randombrew.php
Download: http://huah.net/junk/brew.zip
It's a total hack, but all you need to do is copy randombrew.php to your base witchsbrew.org directory and open it. When you add a new comic, you can run nameharvest.php and it will generate a serialized php array that you can paste in the top of the randombrew.php file. If I spent a few more minutes on it, I could make it so that the serialized php spew is put into another file, but I've got a few other deadlines this morning. {grin}
jason
"Feed me!
With an acoustic jam!"
Possibly one with coding skills/skillz.
Har!
EDIT: tried... got confused... got it working... didn't want to spend the time adding random brew buttons everywhere... dedided this: I TOO DEMAND THAT PAUL UPLOAD THIS!!!! (him and his BBedit... he think his things he do are so cool.)
this is the hottest thing ever... O_o
Thank you so much, this will be implemented ASAP
I just now uploaded a newer version of the code...cleaned up, quicker, and a little more useful. Same location:
http://huah.net/junk/brew.zip
And there's now functionality in the randomizer to put something in the GET query and change the number of panels in the random comic generated, e.g.,
http://huah.net/junk/randombrew.php?n=37
jason
<geeeeeeeeeeeeek>
There are three files inside:
brewharvest.php - now much faster and works on Dreamhost servers (which don't support file_get_contents for remote files). run this when you add new comics to witchsbrew.org. it generates a stream of gibberish that you paste into...
brews.txt - text file of the serialized array
randombrew.php - which is now much smaller because it reads from brews.txt. also has the GET query thing, which you can fiddle with if you want (currently min of 3 and max of 40).
</geeeeeeeeeeeeek>
Oh thanks much.
Has anyone else noticed that they are still ordered from oldest to most recent when randomized?
</whimpering request>