• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Signature Badge Script

  • Thread starter Thread starter Floris
  • Start date Start date
There was two folders missing

xml and generated_images

both these folders needed to be created and chmod to 777...
Ah, should have included empty folders in the ZIP. Glad you caught it. :)

Hey Guys, I have just created a quick generator for this script.

You can find it at http://xenaddicts.com/sig/ just enter your UserID and choose the other options and it will give you the image/link/bbcode and HTML code...

Ceri
Very nice! That's what I was going to do but you've just gone and done it for me! Have you found any bug fixes to the actual generating code?

Hm, too bad this script relies on images, actually. It would have been awesome if you could just enter an hex code and get the color you inserted. Unlimited options.

Yeah, I tried to change the script so you could add any hex code for the image color and for the text color, to create an unique image, and then I realized I was being stupid because it used an image.

Actually, it should be possible to 'extract' the gradient and border from the colored images so you can just fill a background with any hex color, lay the gradient on top, and bingo!

I didn't draw the whole background with GD (which I considered) simply to save on processing time (it already takes a long time to draw, relative to the first one I came up with).

I'll work on this right now. :)
 
Actually, it should be possible to 'extract' the gradient and border from the colored images so you can just fill a background with any hex color, lay the gradient on top, and bingo!

I didn't draw the whole background with GD (which I considered) simply to save on processing time (it already takes a long time to draw, relative to the first one I came up with).

I'll work on this right now. :)
Awesome!
 
Ah, should have included empty folders in the ZIP. Glad you caught it. :)


Very nice! That's what I was going to do but you've just gone and done it for me! Have you found any bug fixes to the actual generating code?





Actually, it should be possible to 'extract' the gradient and border from the colored images so you can just fill a background with any hex color, lay the gradient on top, and bingo!

I didn't draw the whole background with GD (which I considered) simply to save on processing time (it already takes a long time to draw, relative to the first one I came up with).

I'll work on this right now. :)

Nope not played with the rest of the code yet, just made the generation script and changed the error in your script for no userid to include the generation script...
 
I've discovered a somewhat major error in the server-side caching part of the script. Being tired last night, I used include() to include the contents of a previously generated image. However, include() is meant to include executable code, and as such PHP tries to evaluate the image contents as if it were code. This can occasionally lead to "syntax errors" in the image file, and you will get a corrupted output image. :)

To fix this, replace this part of the code:
PHP:
// everything looks good, include image and exit. :)
include(IMGDIR . 'generated_images/' . $userid . '.png');
With this:
PHP:
// everything looks good, include image and exit. :)
$contents = file_get_contents(IMGDIR . 'generated_images/' . $userid . '.png');
echo $contents;
Thanks. :)

The original archive has also been updated. :)
 
I've discovered a somewhat major error in the server-side caching part of the script. Being tired last night, I used include() to include the contents of a previously generated image. However, include() is meant to include executable code, and as such PHP tries to evaluate the image contents as if it were code. This can occasionally lead to "syntax errors" in the image file, and you will get a corrupted output image. :)

To fix this, replace this part of the code:
PHP:
// everything looks good, include image and exit. :)
include(IMGDIR . 'generated_images/' . $userid . '.png');
With this:
PHP:
// everything looks good, include image and exit. :)
$contents = file_get_contents(IMGDIR . 'generated_images/' . $userid . '.png');
echo $contents;
Thanks. :)

GREAT to see this fix :)... Nice...
 
Amazing, I guess everybody liked my signature. LOL

You definitely started something. ;)

I'm currently working on a version that will draw the background using only GD. You will be able to customize fontface, font color, font shadow color, font shadow x offset, font shadow y offset, starting gradient color, ending gradient color, and border color. Can't promise it will actually turn out, though - the additional GD drawing and all that input handling may make it too slow to use practically. :)
 
You definitely started something. ;)

I'm currently working on a version that will draw the background using only GD. You will be able to customize font color, font shadow color, starting gradient color, ending gradient color, and border color. Can't promise it will actually turn out, though - the additional GD drawing may make it too slow to use practically. :)
I think it's great that you're trying.
 
You definitely started something. ;)

I'm currently working on a version that will draw the background using only GD. You will be able to customize fontface, font color, font shadow color, font shadow x offset, font shadow y offset, starting gradient color, ending gradient color, and border color. Can't promise it will actually turn out, though - the additional GD drawing and all that input handling may make it too slow to use practically. :)

OHHH fun this will be nice to add to the generator... /me looks around for a decent hex color selector :D
 
Top Bottom