News:

Look at the world emptily, and it will gladly return the favor.

Main Menu

Discordia Cards

Started by NotPublished, January 12, 2010, 07:40:30 AM

Previous topic - Next topic

NotPublished

I didn't know where to post this,

Anyhow I spent 30 minutes writting up a PHP application (heres the source)
It obviously needs some refinement with things like image resizing and other stuff.

Here you can make them to -
http://notpublished.ulmb.com/card/ - Card generator in website style
http://notpublished.ulmb.com/card/card.php - card generator - without website

IF anyone wants to offer up hosting I will gladly take that up, otherwise I'll keep it here.
If anyone wants to add their own things to it (Or even take over the programming side) feel free - otherwise if there are any suggestions to add to it; feel free to post and I'll get around to it.


So here is an example I made using it -


... Wasn't in a creative mood unfortunantely :P I'm sure someone can come up with something

Latest source version : 20100113

Older -
- 20100112

Future plans :

- [done] Store created images and provide link to use
- [wip] Provide alternate card layouts
- [done] Fix up resize formula for the 2nd image
- [done] Added TrueType fonts to description .. no longer blocky yay
- Able to add quotes
- Choose your background colour
- Choose your font-colour

Any ideas, suggest away!
In Soviet Russia, sins died for Jesus.

Salty

I laughed.

DO ME. I suck at image stuff.
The world is a car and you're the crash test dummy.

Jasper

This has potential for awesome.  Wish I could help.

NotPublished

I'll find a free php server in mean time and upload so you guys can fiddle around with it to, all you have to do is upload an image and it'll resize and fit it into the card and you can write your description + title.
In Soviet Russia, sins died for Jesus.

EmmaE

Quote from: NotPublished on January 12, 2010, 07:40:30 AM
Can anyone host it? (If not - anyone know a reasonable free host?)

Have you considered using http://photobucket.com/? It's free (last I checked, anyhow) and not too shabby re: hosting images.  :)

Regarding the cards: awesome! I need to lurk moar to get the references, but this has the potential to be magnificent.
Understanding requires the risk of insanity.

NotPublished

No not the images - can just use imageshack, but the application itself that made to use it.
In Soviet Russia, sins died for Jesus.

EmmaE

Oh! My brainfart, then, I apologize.
Understanding requires the risk of insanity.

NotPublished

#7
http://notpublished.ulmb.com/card/card.php - Ok it works but its kinda slow :(

It only works with PNG,JPG or GIF (not any other file format) - and for the sake of convenience keep the Title Font Size and Desc Font Size as numbers only.

Anyhow, anyone have ideas to what to add to it/do with it?
In Soviet Russia, sins died for Jesus.

NotPublished

#8
So I was in the mood and I attempted to make a quick site to

http://notpublished.ulmb.com/card/

*eta* fixed link .. lmao I was linking it to localhost :(
In Soviet Russia, sins died for Jesus.

Triple Zero

whoaaaaaaaaaaaaaa :mittens:

that is awesome :D i wanted to make something like that when Cram posted that "pirate pass-off" game, and you went ahead and just did it!

also, I love the graphics :D :D :D

so yeah if you want inspiration on what to do with it, check out this thread:
http://www.principiadiscordia.com/forum/index.php?topic=17954.0

also, I had these lines of PHP code lying around for uploading an image to ImageShack, turns out to be super-easy if you know some shortcuts:
(shortcuts being the imageshack developer API and the SimpleXML functions available in PHP5)


    // $url is the URL of the image you want to transload, basically you'd save the image as a .JPG on the server
    // and then pass it the URL that would point to it, so http://notpublished.ulmb.com/card/temp_card_532.jpg
    // the return value will be the link on imageshack. you can then delete the temporary JPG on the server, but
    // remember to generate a random filename for it every time otherwise things will probably explode if two
    // people use the card generator at the same time.

function imageshack_transload($url) {
    $r = simplexml_load_file("http://www.imageshack.us/upload_api.php?url=$url");   
    return (string) $r->links->image_link;
}


and what you said about only accepting JPG/PNG/GIF--that's enough, don't worry about it, 99.9% of all images anyone was going to use are one of those formats. and otherwise they can convert it themselves right?

I made this:






oh and one other thing, that free hoster you got, if you look at the source it creates, you will notice it inserts this "Free Hosting Code Insert" advertisement popup shit right after the opening <body> tag. if you want to foil that evil scheme of theirs (after all, you have a RIGHT to free webspace without ads!! :) ), you will put this code into the <head> section after your two <link> tags:

<style>/*
  <body>
*/</style>

see how fucking clever that is? now the advertising inserting shit will probably trigger on the first <body> tag it sees, but that's not a <body> tag, but it's a comment inside a <style> definition and therefore it won't do shit. w00t. do it, trust me, you'll feel better.
Ex-Soviet Bloc Sexual Attack Swede of Tomorrow™
e-prime disclaimer: let it seem fairly unclear I understand the apparent subjectivity of the above statements. maybe.

INFORMATION SO POWERFUL, YOU ACTUALLY NEED LESS.

NotPublished

#10
Sweet deal!

I was wondering if I could upload directly to imageshack and you just brought it to me :D (That code is a keeper btw!)

And as for the Pirate Pass-Off, I'll provide that as an alternate layout also.

I'll try figure out a good method for text-wraping, I wanted to use imagestring function so I could calculate the width much more easily, but the font-size was always way too small .. but perhaps this is ok to use?

Should I work on imitating http://bighugelabs.com/deck.php ? Card resolution was something I obviously didn't take into consideration ... I suppose I could call what I have now just "Preview" mode and provide a much bigger one in "Publish" Mode.

Quoteoh and one other thing, that free hoster you got, if you look at the source it creates, you will notice it inserts this "Free Hosting Code Insert" advertisement popup shit right after the opening <body> tag. if you want to foil that evil scheme of theirs (after all, you have a RIGHT to free webspace without ads!!  ), you will put this code into the <head> section after your two <link> tags:

Code:
<style>/*
 <body>
*/</style>
see how fucking clever that is? now the advertising inserting shit will probably trigger on the first <body> tag it sees, but that's not a <body> tag, but it's a comment inside a <style> definition and therefore it won't do shit. w00t. do it, trust me, you'll feel better.

I'll get right onto that and kill that damn thing, thats a very smart idea there!

eta: Damn! Looks like they are just doing a regex and inserts into all <body> tags :(
In Soviet Russia, sins died for Jesus.

Suu

Sovereign Episkopos-Princess Kaousuu; Esq., Battle Nun, Bene Gesserit.
Our Lady of Perpetual Confusion; 1st Church of Discordia

"Add a dab of lavender to milk, leave town with an orange, and pretend you're laughing at it."

hooplala

"Soon all of us will have special names" — Professor Brian O'Blivion

"Now's not the time to get silly, so wear your big boots and jump on the garbage clowns." — Bob Dylan?

"Do I contradict myself?
Very well then I contradict myself,
(I am large, I contain multitudes.)"
— Walt Whitman

Dimocritus

HOUSE OF GABCab ~ "caecus plumbum caecus"

Brotep

1) This is awesome  :lulz:

2) I think we should call these Discardians

3) these would make spectacularly good emoticons