Jump to content

Sloof Lirpa Strikes Again!


Chessrook44

Recommended Posts

Alright, I admit, I facepalmed AND chuckled at the unexpected change to the forums. So which pony did YOUR avatar turn into?

 

Me, I apparantly got Twilight. Not a fan but were I given the option I probably would have wanted Pinkie. Fourth Wall Breaking for the Win.

 

And for those looking at this post in confusion after the fact... April Fool's changed the forum such that the title became "My Little Spiderweb Software: Remaking Exile is Magic", turned all the forum read/unread icons into galloping Rainbow Dashes, and turned every user's avatar into a different pony.

Link to comment
Share on other sites

For those curious, the code used to generate the images is here. There's definitely better ways to do it, but it got the job done for once-off code :p

 

Using a modulus is definitely not the most "random" thing, but it was giving me grief trying to go about my desired method (feeding the ID into mt_srand() and going from there). On a site larger than SW, I'd definitely be worried about the impact on the avatar server. I doubt having PHP in the way is efficient by any means.

Edited by sylae
as an aside, anyone who had manually changed their theme to besttheme will need to change it back. I just reset all besttheme users so that someone coming back from a hiatus doesn't get surprised.
Link to comment
Share on other sites

if ($matches[1] == 5482) {
echo file_get_contents("/var/www/calref-new/chat/emoticon-packs/ponicons/sybeam.png");
} elseif ($matches[1] == 2001) {
echo file_get_contents("/var/www/calref-new/chat/emoticon-packs/ponicons/aran.png");
}

 

Considering both of these are actually in the array too (#149 and #17, respectively), you could actually have made a pseudorandom function that just so happened to assign both of us our special avatars. Eg. (51*$id+17)%207 would be 17 for me, and 149 for you. Adding a third ID<->avatar correspondence would have required a square term, and so on. [/mathnerdery]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...