Homestar Runner Wiki Forum

A companion to the Homestar Runner Wiki
It is currently Mon Apr 24, 2017 1:20 pm

All times are UTC




Post new topic Reply to topic  [ 73 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Sun Oct 21, 2007 2:09 pm 
Offline
User avatar

Joined: Sat Apr 21, 2007 12:52 pm
Posts: 601
Location: Hand in hand... Touching me! Take it away, Noid!
http://h1.ripway.com/Dacheet15/Avy.php
^my link

Its not working, can someone please explain?
Heres what I put:
Code:
<?php

   $folder = '.';


    $extList = array();
   $extList['gif'] = 'http://img134.imageshack.us/img134/7249/18861458884584e22864149mi9.gif/gif';
   $extList['gif'] = 'http://img412.imageshack.us/img412/4601/7345690854284e29f3266ftm9.gif/gif';
 
   

// You don't need to edit anything after this point.


// --------------------- END CONFIGURATION -----------------------

$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,  "http://img412.imageshack.us/img412/4601/7345690854284e29f3266ftm9.gif", $text_color);
      imagepng ($im);
      imagedestroy($im);
   }
}

?>

_________________
Will be on and off the forum for a while!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 4:25 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Don't change anything in the script on the first post. Looks like you tried to add in some URLs of images somewhere else. It doesn't work that way. Hm.. you also put that in something called avy.php instead of in index.php in a folder ending in an image extension. Go back and read the directions more closely. Just take it easy, one step at a time.

_________________
ATTN: LOWER BOARD USERS HAVE MOVED TO ANOTHER FORUM. COME JOIN THE FUN!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 5:04 pm 
Offline
User avatar

Joined: Sat Apr 21, 2007 12:52 pm
Posts: 601
Location: Hand in hand... Touching me! Take it away, Noid!
Heres what I did:
Made a folder called Avy.php
Put in the code
Changed the "image" in "image/gif" to my URL
Changed .php to .png (it was a text file, ripway doesn't host folders that I know of)
Tried
Got:
The image “http://h1.ripway.com/Dacheet15/Avy.png” cannot be displayed, because it contains errors.

I don't understand the directions and I can't do scripting.
Why?
I'm 11.

_________________
Will be on and off the forum for a while!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 5:12 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
There's no need to do any scripting. The script in the first post is all you need, and you don't need to change anything in it.

*The folder should end in .png (or some other image extension) --this is part of what tricks the browser into displaying an image when it's really looking at a script in a folder
*The code should go in the folder in a file called index.php
*Nothing should change in the script
*The images you want to rotate should go inside Avy.png folder alongside index.php. The script is looking for them there.

_________________
ATTN: LOWER BOARD USERS HAVE MOVED TO ANOTHER FORUM. COME JOIN THE FUN!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 5:38 pm 
Offline
User avatar

Joined: Sat Apr 21, 2007 12:52 pm
Posts: 601
Location: Hand in hand... Touching me! Take it away, Noid!
I Don't get you.

I can't do it. Forget it.

/emocry

_________________
Will be on and off the forum for a while!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 5:49 pm 
Offline
User avatar

Joined: Mon Apr 17, 2006 11:50 pm
Posts: 4431
Location: Remember Strawberries, guys?
Here, if you want, PM me the images you want to rotate and I can do it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 5:56 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Nah, nah, I just typed this stuff up so he can learn things. He can do this. He made the account and uploaded some stuff to an image host, so he can do this too if he gets some easier instructions.

dacheet15 wrote:
I Don't get you.

I can't do it. Forget it.

/emocry

Yeah, it's kinda hard if you're not yet solid on basic computer vocab.

But you have a ripway account at least, so that's a good start.

I was trying to keep the number of steps down in the first post, especially since I wanted them to work for more than just ripway. But here's some instructions for ripway:

0. Make an account on ripway (you did this already) and log in.
1. Go to "My Files"
2. In the box next to "Create Subfolder" type Avy.png then click "Create Subfolder"
3. Click on the link to that folder you just made in the file listing
4. Click "Create Text File"
5. Enter index.php as the filename, and copy the script from my first post in this thread into the big Text box. Don't change anything. Click "Save File"
6. Click "Up to Parent Folder" to return to the main folder
7. Click "Upload Files"
7a. If the images you want to rotate aren't on your computer, open a new tab in your browser download them to your desktop first.
8. For each image file you want to upload, click a new "Browse" button to select it on your computer. Click "Upload" when you're finished or you've selected the maximum of six.
9. After it's finished uploading, click "Click here to continue!" to go back to your main folder.
9a. If you have more files, repeat steps 7, 8, and 9.
10. The image files you uploaded are now in the main file list. Click the check boxes next to all of them. Look at the bottom of the page where it says "Move Files To": choose Avy.png from the drop down box and then click "Move Files To" (This is necessary because ripway doesn't let you upload anything directly into Avy.png. You have to upload it to the main folder and then move it)
11. Then, back here on this forum, you put the URL of the folder in the Link to Offsite Avatar box in your Profile.

Even at 11, you can do this. Just take it slow and follow each instruction literally, one at a time, without trying to second guess them or read too much into them. If you hit a snag on a specific step, ask again! :)

_________________
ATTN: LOWER BOARD USERS HAVE MOVED TO ANOTHER FORUM. COME JOIN THE FUN!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 21, 2007 6:10 pm 
Offline
User avatar

Joined: Mon Apr 17, 2006 11:50 pm
Posts: 4431
Location: Remember Strawberries, guys?
Also, make sure that the "/" isn't at the end of the URL when you put it in your profile here at the forum or wherever you are using it.


This stumped me for a while when I made my first rotator... :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 22, 2007 6:11 am 
Offline
User avatar

Joined: Sat Mar 25, 2006 9:03 pm
Posts: 200
Location: Prance
Okay. I've followed the instructions to a T... and it still won't work for me!

I'm frustrated and depressed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 22, 2007 6:31 am 
Offline
User avatar

Joined: Mon Jul 05, 2004 1:57 am
Posts: 2981
Location: Oklahoma City
Well, what's happening when you try it?

_________________
404 sig not found


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 22, 2007 7:17 am 
Offline
User avatar

Joined: Sat Mar 25, 2006 9:03 pm
Posts: 200
Location: Prance
[s]When I put the URL of the folder in the Link to Offsite Avatar box in my Profile, I get a message that says "The file at the URL you gave contains no data".[/s]

DISREGARD THAT I FIGURED IT OUT.

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 28, 2008 5:18 pm 
Offline
User avatar

Joined: Sat May 19, 2007 8:28 pm
Posts: 885
Location: SIBHoDC
sorry to bring this old thread up again, but i got my rotating sig working and was wondering if there was a way to include a quote along with the pictures. like, sometimes my sig would be a quote, sometimes a picture.


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed May 28, 2008 6:34 pm 
Offline
User avatar

Joined: Thu May 12, 2005 11:25 pm
Posts: 4127
Location: Tangled up on a Twister mat
There is probably some way to do it using some PHP programming method or something, but otherwise, I don't think that there is a way to make that work out.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed May 28, 2008 6:41 pm 
Offline
User avatar

Joined: Sat May 19, 2007 8:28 pm
Posts: 885
Location: SIBHoDC
meh. oh, well. i'm just glad i fianlly got my rotating sig working.


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed May 28, 2008 8:08 pm 
Offline
User avatar

Joined: Wed Apr 04, 2007 3:59 pm
Posts: 1977
Location: In your pantry. Good cookies by the way.
You could just put the quote into a transparent picture and put that picture into the rotation.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Mon Jun 02, 2008 3:52 am 
Offline
User avatar

Joined: Mon Jan 17, 2005 1:00 am
Posts: 3849
Location: Best Coast
DS_Kid wrote:
There is probably some way to do it using some PHP programming method or something, but otherwise, I don't think that there is a way to make that work out.
Well, Mike and I were talking about that once, and you COULD have the script log into your user control panel and change your sig every once in a while. It might be fun to pull off, but I never wanted it badly enough to try it.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Jun 04, 2008 3:35 pm 
Offline
User avatar

Joined: Sat Mar 15, 2008 3:49 am
Posts: 359
Location: ramrod is pathetic
Is there a way to make the sig and avatar synch up?

_________________
Choc-o-Lardiac Arrest wrote:
Holy crap, are we in an episode of Blues Clues or somethin?


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Jun 04, 2008 3:39 pm 
Offline
User avatar

Joined: Thu May 12, 2005 11:25 pm
Posts: 4127
Location: Tangled up on a Twister mat
I don't think that it's possible regularly. Of course, once again, there is probably some PHP script that allows that to work out.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Jun 04, 2008 3:56 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Phlip has (had?) sigs and avatars that sync up. Not sure how he did it, but the easiest way I can think of is to have an equal number of files in the sig and avatar folders, ordered with numbers or something so that they match up, and then use a script that chooses which file to pick based on what the current second or fraction of a second of time it is. Actually, the script at the beginning of this thread uses time to pick which image to display, so it might work....

OK so do that: have the same number of sigs and avatars in their respective folders, numbered with matching numbers, and use this script. See if that works. If it doesn't work, it might be that the "time()" in the script (in the line $imageNumber = time() & count($fileList);) is returning too precise a time (so that the miniscule fraction of a second between the time it looks for a sig and looks for an avatar changes which one it's looking for), in which case you would change that to something that returns only the current second or tenth of a second. But I don't know how to do that :O

_________________
ATTN: LOWER BOARD USERS HAVE MOVED TO ANOTHER FORUM. COME JOIN THE FUN!


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Jun 04, 2008 7:13 pm 
Offline
User avatar

Joined: Tue Jan 01, 2008 1:06 am
Posts: 186
Location: What am I gonna do in a submarine?!
Image
Image
^First way doesn't work.

EDIT (2): Yeah, it won't work.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Jun 04, 2008 9:43 pm 
Offline
User avatar

Joined: Sun Mar 20, 2005 1:09 am
Posts: 8987
Location: He remembered Socks!
It works, when i reload, it goes from 2 to three on both.

_________________
ImageImage


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Jun 04, 2008 11:03 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Must've got lucky. I just got a 3/2.

Also, actually took the time to look it up on the interwebs, and apparently time() IS returning seconds, not fractions of a second. So we need something slightly... bigger than a second :S

Maybe some totally inelegant mathematical fudging involving a modulo. Something like ((time() % 10) /2) to replace plain ol' time()... something to make it a 2 second window instead of 1 second. [Note: my brain is way too addled right now with 12-hour-drive preparations to double check this to see if the math is legit -- and in any case, there has to be a better way]

_________________
ATTN: LOWER BOARD USERS HAVE MOVED TO ANOTHER FORUM. COME JOIN THE FUN!


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Thu Jun 05, 2008 1:11 am 
Offline
User avatar

Joined: Tue Jul 05, 2005 2:14 pm
Posts: 8899
Location: looking at my post and/or profile
It works for me about two-thirds of the time.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Thu Jun 05, 2008 3:13 am 
Offline

Joined: Tue May 24, 2005 4:58 pm
Posts: 5045
Location: Imagining all the people living life in peace.
It works for me most of the time, too. More than it would if it were a random rotator. But it's not perfect, sometimes it screws up.

_________________
So, so you think you can tell Heaven from Hell, blue skies from pain. Can you tell a green field from a cold steel rail? A smile from a veil? Do you think you can tell?


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Thu Jun 05, 2008 3:37 am 
Offline
User avatar

Joined: Tue Jan 01, 2008 1:06 am
Posts: 186
Location: What am I gonna do in a submarine?!
Maybe it's just a chance thing. There's only the numbers 1-3.

Gimme a few minutes to expand it.

EDIT: Yeah, it's now 1-7 and I'm getting matches maybe 15-20% of the time.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Thu Jun 05, 2008 10:07 pm 
Offline
User avatar

Joined: Tue Jul 05, 2005 2:14 pm
Posts: 8899
Location: looking at my post and/or profile
I get 30% of the time.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Sun Jun 08, 2008 5:01 am 
Offline
User avatar

Joined: Mon Jan 17, 2005 1:00 am
Posts: 3849
Location: Best Coast
Yeah, the browser can't send the requests at the exact same time, and often times it is more than a second off.

What you could try is make the first php image choose randomly, then set a cookie for which one it used, then have the second php image read the cookie and choose the matching one. I think it would work, but you might have to do a hard refresh to get the second one to update every time.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Fri Jun 13, 2008 1:36 am 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
You could have a text file with the information in it. The first script that runs creates the text file and dumps the information in it, the second script that runs would take the information out of it and destroy the file. So if a script sees no file, it thinks for itself and then makes the file.

I don't think you'd need a hard refresh if you took the cookie path. Just make sure you destroy the cookie when the second script runs.


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Sun Jun 15, 2008 2:43 pm 
Offline
User avatar

Joined: Wed Feb 20, 2008 5:24 pm
Posts: 915
Location: SIBHoDC
Image

Won't work for my avatar. It says that it can't determine the dimensions. Any help?


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Mon Jun 16, 2008 4:26 pm 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
Are you using any image types that aren't supported?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 73 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group