How to get GD generated images to work with bb code?

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
HomerTheDragoon
Forum Newbie
Posts: 21
Joined: Sat Jul 08, 2006 2:10 am

How to get GD generated images to work with bb code?

Post by HomerTheDragoon »

Hello i was wondering how i can make it so i can display the image generated by the php gd code in forum sigs, using bb code... I understand how to do it in html, but when i do it in bb code it just writes the link... :/ Is it possible? Thanks.

heres what i mean by bbcode if for some reason you didnt know what i ment :/
Image

also is there a way to change the font size?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Some forums won't let you link to a dynamic image .. so your PHP script needs to end with .jpg .. Putting..

Code: Select all

AddType application/x-httpd-php .php .jpg
..in a .htaccess file will let you create a .jpg file that's treated like a .php file on your server (assuming it uses Apache).
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post by R4000 »

You can fool some BBCode parsers just by adding:

Code: Select all

?type=.png
to the end of the image url.

Or sometimes, you can do this on some servers:

Code: Select all

http://****/gd/createimage.php/image.png
heh :)
HomerTheDragoon
Forum Newbie
Posts: 21
Joined: Sat Jul 08, 2006 2:10 am

Post by HomerTheDragoon »

Didnt work here :/ let me try somewhere else.
Post Reply