Gamingforce Interactive Forums
85239 35211

Go Back   Exploding Garrmondo Weiner Interactive Swiss Army Penis > Garrmondo Network > Help Desk
Register FAQ GFWiki Community Donate Arcade ChocoJournal Calendar

Notices

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).


Rotating Sig Images?
Reply
 
Thread Tools
Crash "Long-Winded Wrong Answer" Landon
Zeio Nut


Member 14

Level 54.72

Feb 2006


Reply With Quote
Old Dec 17, 2008, 07:10 PM #1 of 18
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.
Dyesan
hey YOU!


Member 1790

Level 17.02

Mar 2006


Reply With Quote
Old Dec 17, 2008, 07:12 PM #2 of 18
Relevant to my interests!

There's nowhere I can't reach.
The unmovable stubborn
(Feeling Inspired)


Member 1512

Level 62.24

Mar 2006


Reply With Quote
Old Dec 17, 2008, 07:17 PM #3 of 18
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.
Crash "Long-Winded Wrong Answer" Landon
Zeio Nut


Member 14

Level 54.72

Feb 2006


Reply With Quote
Old Dec 17, 2008, 07:23 PM #4 of 18
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?
Fleshy Fun-Bridge
Hi there!


Member 907

Level 22.05

Mar 2006


Reply With Quote
Old Dec 17, 2008, 08:08 PM #5 of 18
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.
---
The unmovable stubborn
(Feeling Inspired)


Member 1512

Level 62.24

Mar 2006


Reply With Quote
Old Dec 17, 2008, 08:10 PM #6 of 18
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?
Zergrinch
Evil Grinch


Member 666

Level 50.98

Mar 2006


Reply With Quote
Old Dec 17, 2008, 08:31 PM Local time: Dec 18, 2008, 09:31 AM #7 of 18
I could've sworn I saw Acerbandit pull this off with his Advice Dog sig

FELIPE NO
Single Post URL
Transparent Color Code:
[color=#14194e]
Aardark
Combustion or something and so on, fuck it


Member 10

Level 40.02

Feb 2006


Reply With Quote
Old Dec 17, 2008, 08:31 PM Local time: Dec 18, 2008, 03:31 AM 1 #8 of 18
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
Crash "Long-Winded Wrong Answer" Landon
Zeio Nut


Member 14

Level 54.72

Feb 2006


Reply With Quote
Old Dec 17, 2008, 08:39 PM #9 of 18
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...
Which is exactly what I've done, and still no image appears. I've tested each individual image url, so I know they're all functional. It's something server-side here and if you don't have a Bachelor's in coding, you are evidently up a certain creek without paddles.

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.
Fleshy Fun-Bridge
Hi there!


Member 907

Level 22.05

Mar 2006


Reply With Quote
Old Dec 17, 2008, 09:06 PM #10 of 18
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.
---
Zergrinch
Evil Grinch


Member 666

Level 50.98

Mar 2006


Reply With Quote
Old Dec 17, 2008, 10:03 PM Local time: Dec 18, 2008, 11:03 AM #11 of 18
Your sig doesn't show for me.

This thing is sticky, and I don't like it. I don't appreciate it.
Single Post URL
Transparent Color Code:
[color=#14194e]
Fleshy Fun-Bridge
Hi there!


Member 907

Level 22.05

Mar 2006


Reply With Quote
Old Dec 17, 2008, 10:18 PM #12 of 18
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?
---
Zergrinch
Evil Grinch


Member 666

Level 50.98

Mar 2006


Reply With Quote
Old Dec 17, 2008, 11:24 PM Local time: Dec 18, 2008, 12:24 PM #13 of 18
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.
Single Post URL
Transparent Color Code:
[color=#14194e]
Old Dec 17, 2008, 11:49 PM #14 of 18
I could've sworn I saw Acerbandit pull this off with his Advice Dog sig
Yup!



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.

Originally Posted by So change the line
$file = getRandomImage('./tempsig/');
Change "tempsig" to whatever your directory is called. Yay!


Here's a zip file. Open the php file in notepad.

What kind of toxic man-thing is happening now?
FatsDomino
I'm just informing you


Member 11

Level 61.64

Feb 2006


Reply With Quote
Jurassic Park Chocolate Raptor
Reactor online.
Sensors online.
Weapons online.
All systems nominal.



Member 80

Level 56.91

Mar 2006


Reply With Quote
Old Dec 17, 2008, 11:57 PM Local time: Dec 17, 2008, 10:57 PM #15 of 18
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);
	}
}

?>
I can't remember where I got this, but I've had it for a while sitting in an old snippets folder. It works with [img] tags. I used it to host Paco's mexican joke sig from a while back.

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

Last edited by Jurassic Park Chocolate Raptor; Dec 18, 2008 at 12:11 AM. Reason: Added example
OmagnusPrime
Flipping cups since 2014


Member 423

Level 39.65

Mar 2006


Reply With Quote
Old Dec 18, 2008, 08:48 AM Local time: Dec 18, 2008, 01:48 PM #16 of 18
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?
gaming
River Chocobo


Member 360

Level 25.07

Mar 2006


Reply With Quote
Old Dec 18, 2008, 09:17 AM #17 of 18
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!
OmagnusPrime
Flipping cups since 2014


Member 423

Level 39.65

Mar 2006


Reply With Quote
Old Dec 18, 2008, 09:38 AM Local time: Dec 18, 2008, 02:38 PM #18 of 18
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?
First of all you need webspace that can host the script and that supports PHP. If you have that you'll need to update their scripts to create an array of URLs, and use that as the source for images rather than scanning the local directory. If you're not familiar with scripting this is probably going to be somewhat tricky, but I don't have time to sort out the code right now.

There's nowhere I can't reach.
Reply


Exploding Garrmondo Weiner Interactive Swiss Army Penis > Garrmondo Network > Help Desk > Rotating Sig Images?

Forum Jump

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


All times are GMT -5. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.