FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Sig with a random quote





exarkun
I had saw people with sig like that, where the quotes shown are randomize and I know it requires php to do that. But I am nuts at that, can anyone show me how?
eepman
You need your webserver to hold a page with code similar to the following at
http://www.icemelon.com/tutorials/9/Dynamic_Images.htm

It will create a dynamic image. You need a stock of quotes to use also.
They can be in a file or database just like simple php. Read up on this on www.php.net.
The Conspirator
I tried something like that, and it worked perfectly but when I added [img]http://tcp.frih.net/random_black.php[/img] It nerver showed the image just the bbcode.
eepman
You need the image to store on the server and change during specified time periods, that way you just link to the image. Or something.
kv
dynamic images in signatures are banned in frihost.
The Conspirator
Why?
m0u53m4t
The Conspirator wrote:
I tried something like that, and it worked perfectly but when I added [img]http://tcp.frih.net/random_black.php[/img] It nerver showed the image just the bbcode.

Thats because php is not a valid image extention. You should've had [*img]http://tcp.frih.net/random_black.php/image.png[*/img] or something.

Why cant we have dinamic ones btw? Daniel15 is a mod and he has one:
wumingsden
kv wrote:
dynamic images in signatures are banned in frihost.


Dynamic images are not banned on FriHost.

Rule 4d on the Rules Page states:

Quote:
Signatures with dynamic information about users browsing the forums, like from danasoft, are not allowed. (eg: Your browser is firefox and your ip is ... )


Dan's like the one above are allowed. It shows information about him which he wants to be displayed.
Stubru Freak
bbscript doesn't accept images having no known image extension. (You could do that on a normal web page)
So you have these options:
- Tell your server to parse .png files as php.
- Tell your server to rewrite file requests for .png files to the same file ending in .php with mod_rewrite

I'd recommend the second one, you can set it to work for only one directory or one file.
eepman
The htaccess would look like
Code:

RewriteEngine on
RewriteRule .*\.(PNG|png)$ http://mydomain.com/path/to/image.php


I checked it, but not with a forum.
bladesage
I thought it worked pretty well to make a folder with a filename like whatever.png, and inside the folder place the PHP script, name it index.php.

Whenever the image is displayed, it goes right to the folder. Like browsing, it will try to go to the file named index. So the index.php file will be accessed, and it's almost like you're fooling the BBCode into thinking it's an ordinary png file.

That's how the images in my sig work, give it a shot. As you can see, I have a total of 3 dynamic images in my signature, the first of which produces a random quote. I tried to make it look like I actually typed it in my sig, it could have come out worse. Refresh a few times, I packed 27 different quotes into that script.

Once you put the folder (with the index.php file in it) into the directory in place of your random_black.php file, you can simply use this BBCode tag to handle it:
Code:
[img]http://tcp.frih.net/random_black.png[/img]


Make sense to you?

PS: If you don't believe it will work, take a closer look at the dynamic sig for Daniel15 above. Look at the filename, it doesn't say .php anywhere in it Smile.
kv
Nice trick. I liked it better than rewrite rules.
krazycapital
Why all the hassle! Just use this:
Code:
[img]http://sitename.com/image.php/image.gif[/img]
Now THATS simple.
NG
is there ny way to get a dynamic stats sig for runescape like www.runehq.com does ?
Related topics
Hey guys, want a free sig?
Avatars and Signatures for sale!
Random image for your gallery
Random page generator
My Photography, and hideousness in all its glory
My newest sig.
Sig Wanted
Signature and Banners for All
Simple full Sig tutorial
Selling Community ad space! DDS
Random Image
Rent O'calhoun's sig space; ]]One Week Free Sale[[ *Open*
[PHP] Problem with Dynamic Sig's Font Color
Dynamic sig (know the click)
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.