|
|
Welcome to the Exploding Garrmondo Weiner Interactive Swiss Army Penis. |
GFF is a community of gaming and music enthusiasts. We have a team of dedicated moderators, constant member-organized activities, and plenty of custom features, including our unique journal system. If this is your first visit, be sure to check out the FAQ or our GFWiki. You will have to register before you can post. Membership is completely free (and gets rid of the pesky advertisement unit underneath this message).
|
|
Thread Tools |
Rotating Sig Images?
I've got access to php-enabled image hosting, so I know I can accomplish this. However, it involves scripting that is beyond my meager comprehension. I've googled the subject but remain confused; most available rotation scripts assume you know how they operate, whereas I'm admittedly not smart in this area.
Could someone please explain the process in enough detail that I might be able to do it myself and learn the processes better? I've already got the images uploaded to a directory. Do they all need to be contained in one folder? I'm not 100% sure on that part. Thanks for any help. Jam it back in, in the dark. |
Relevant to my interests!
There's nowhere I can't reach. |
This used to be pretty simple to do back in the old html-enabled days. I've tried to get it going several times, but no dice.
Obviously Chz knows how to finagle this but maybe he's just granted himself html permissions. This thing is sticky, and I don't like it. I don't appreciate it. |
This may be something I'm capable of too, and could grant to others by request if I knew how.
I'll have to probe deeper into this matter. I am a dolphin, do you want me on your body? |
Its pretty simply. The premise is this:
You're sig links to the PHP script. The script, in turn, reads a directory of images into an array. It then generates a random number (you can seed with the system clock) and picks that offset in the array. The rest is emitting the MIME headers and then the image data. If you do a bit of googling, you can find numerous sample PHP scripts for rotating images in this fashion. I wrote one myself years ago, and I'm sure its buried somewhere in the depths of my drive but I can't be bothered to look for it... I was speaking idiomatically.
---
|
In theory that is precisely how it works, yes.
In practice, GFF just returns a broken img tag. What kind of toxic man-thing is happening now? |
I could've sworn I saw Acerbandit pull this off with his Advice Dog sig
FELIPE NO |
If you don't want to bother with scripting, just use Rotating Signature Host.
What, you don't want my bikini-clad body? Nothing wrong with not being strong
Nothing says we need to beat what's wrong Nothing manmade remains made long That's a debt we can't back out of |
I may give the link Aardark posted a try, though I'm concerned it won't be able to house the number of images I wanted to use. Jam it back in, in the dark. |
Okay. How about this. Does my sig rotate for you? (you might have to wait a few seconds before reloading)
There's nowhere I can't reach.
---
|
Your sig doesn't show for me.
This thing is sticky, and I don't like it. I don't appreciate it. |
Hmm....it shows up here under Safari, Firefox, Chome, and IE 7. Don't know what to tell you. Its not linking to a local host.
I am a dolphin, do you want me on your body?
---
|
Please disregard my message. I had set signatures to display only once, and did not notice you had an earlier post.
It's working fine and the image does cycle through. Gimme php script pliss I was speaking idiomatically. |
It's pretty freaking easy. All you have to do is edit the php script with the directory name and put the script before the directory and you should be good to go.
Here's a zip file. Open the php file in notepad. What kind of toxic man-thing is happening now? |
Code:
<?php $folder = '.'; $extList = array(); $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg'; $extList['png'] = 'image/png'; $img = null; if (substr($folder,-1) != '/') { $folder = $folder.'/'; } if (isset($_GET['img'])) { $imageInfo = pathinfo($_GET['img']); if ( isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) && file_exists( $folder.$imageInfo['basename'] ) ) { $img = $folder.$imageInfo['basename']; } } else { $fileList = array(); $handle = opendir($folder); while ( false !== ( $file = readdir($handle) ) ) { $file_info = pathinfo($file); if ( isset( $extList[ strtolower( $file_info['extension'] ) ] ) ) { $fileList[] = $file; } } closedir($handle); if (count($fileList) > 0) { $imageNumber = time() % count($fileList); $img = $folder.$fileList[$imageNumber]; } } if ($img!=null) { $imageInfo = pathinfo($img); $contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ]; header ($contentType); readfile($img); } else { if ( function_exists('imagecreate') ) { header ("Content-type: image/png"); $im = @imagecreate (100, 100) or die ("Cannot initialize new GD image stream"); $background_color = imagecolorallocate ($im, 255, 255, 255); $text_color = imagecolorallocate ($im, 0,0,0); imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color); imagepng ($im); imagedestroy($im); } } ?> Forgive me if it's patronizing but I'll be as beginner friendly as possible. Copy, paste, throw into your favorite text editor, save with a .php extension. Throw it into the folder full of the images you want to rotate on your host, and then go [ img]http://www.crashlandon.com/sigs/rotatin/nameofscript.php[/img]. You can add more supported file types to the file type array as long as your mime-type is correct, and you can put this rotator script elsewhere if you change the $folder variable to point to the full path of the folder full of images you want to use. Edit: See? FELIPE NO |
The one problem with most rotating image scripts is that they only work in those instances where you can link to a PHP or script file. I know of a number of forums where sticking [ img ]www.something.whatever/folder/script.php[ /img ] just won't work because the img tags don't like non-image extensions.
There is a way around this, but it requires access to things like the .htaccess file on your webspace. This is a feature I built into my image host (b3 iHost v1.2.2) when I made it a few years back, and it's what I was using to do my rotating sig image effort recently. It's possibly a bit clunky, because I've not done anything with it for a few years, but it all works quite happily still. So, a quicker solution, if you fancy it, is that I can hook you up with an account on my image host. What, you don't want my bikini-clad body? |
I don't know much about scripting either, but what do I have to change in AcerBandit's or Colonel Spreadsheet's code in order to make it to work for images that I have hosted with ImageShack?
How ya doing, buddy?
Thanks to Fjordor for the funny image!
|
There's nowhere I can't reach. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tutorial: How to enhance images for Avatar and Sig purposes | Kairi Li | The Creators' Cafe | 9 | Aug 15, 2008 07:36 PM |
Some images in IE7 is shown as red X | gaming | Help Desk | 2 | Mar 11, 2008 01:45 AM |
Favorite Prog For Creating CD Images? | DeLorean | Help Desk | 8 | May 23, 2007 02:15 PM |