Homestar Runner Wiki Forum

A companion to the Homestar Runner Wiki
It is currently Thu Dec 12, 2024 3:54 pm

All times are UTC




Post new topic Reply to topic  [ 72 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Rotating Sigs and Avatars
PostPosted: Tue Feb 27, 2007 4:25 pm 
Offline
User avatar

Joined: Tue Dec 12, 2006 8:18 pm
Posts: 2150
Location: Somewhere over the rainbow...
I wish to have a Rotating Sig, but alas I don't know how. Help Me Please. :)

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 4:38 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
This question keeps coming up, but it's always impossible to find the old threads on it for some reason. So here's a complete walkthru:

1) Sign up for free web hosting that supports PHP scripts. One popular example is ripway.com.

2) Create a folder in your webspace called avatar.png or sig.png.

3) In that folder, create a new text file called index.php. Copy the stuff in this code box into that file:
Code:
<?php

   $folder = '.';


    $extList = array();
   $extList['gif'] = 'image/gif';
   $extList['jpg'] = 'image/jpeg';
   $extList['jpeg'] = 'image/jpeg';
   $extList['png'] = 'image/png';
   $extList['PNG'] = 'image/PNG';
   

// 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,  "IMAGE ERROR", $text_color);
      imagepng ($im);
      imagedestroy($im);
   }
}

?>


4) Add whatever images you want (that conform to forum rules) into that folder. Note: On ripway, you have to upload them to the main folder first and then transfer them to the one with the .png or whatever on the end.

5) For avatars: In the "Link to offsite avatar" box in your profile, put the URL of the folder. It'll look something like
Code:
http://h1.ripway.com/username/avatar.png
(but "username" and maybe "h1" will be different).

For signatures: Put something like this into the signature box in your profile:
Code:
[img]http://h1.ripway.com/username/sig.png[/img]

Obviously replacing "username" with your username, and "h1" if ripway tells you it's something else.

Don't hesitate to ask questions here in this thread!

EDIT history: Simplified the wording. Changed out "directory" in favor of "folder" so as not to confuse all the peeps that didn't happen to be a computer nerd in the 90s.

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


Last edited by Inverse Tiger on Sun Jul 22, 2007 6:27 pm, edited 7 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 9:19 pm 
Offline
User avatar

Joined: Tue Dec 12, 2006 8:18 pm
Posts: 2150
Location: Somewhere over the rainbow...
Yo', how do you make it work for sigs? Its not working. I've tried all sorts of poo'.

Help me!

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 10:40 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Oh yeah, for step 5 instead of link to offsite avatar, do like you'd do for normal sigs. Like when you say
Code:
[img]http://something.com/somesig.gif[/img]
in the sig box for normal sigs, just do the same thing except instead of putting the URL of an individual sig in the [img] tags, put the name of the directory you put all of them in. So if they're all ripway.com/username/sig.png/sig1.png, ripway.com/username/sig.png/sig2.png, then you would put
Code:
[img]http://h1.ripway.com/username/sig.png[/img]
in the signature box in the profile.

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 10:45 pm 
Offline
User avatar

Joined: Wed Jul 06, 2005 1:01 am
Posts: 6245
Make sure

a) you're linking to the correct folder
b) you're using the image tags in your sig box
c) the folder's name has an image file name at the end of it (folder.png, for example)
d) the php script is in the folder
e) there are images in the folder

That's all I can think of that will help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 11:18 pm 
Offline
User avatar

Joined: Fri Dec 17, 2004 9:48 pm
Posts: 2003
Location: Trapped inside a cage. It isn't even locked, but I'm an idiot.
Inverse Tiger wrote:
directory (or folder, whatever the kids are calling it these days)

DIRECTORY FOR LIFE!

lulz dir command in dos

ls command in unix which isn't fair 'cause it's harder to remember D:

_________________
Image


Top
 Profile  
 
 Post subject: Requiescat in pace
PostPosted: Wed Feb 28, 2007 1:12 am 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Code:
This post eternally reserved as a memorial for DOS

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 13, 2007 10:34 pm 
Offline

Joined: Tue Jul 25, 2006 4:02 pm
Posts: 1347
So, wait, you have to have an Item saved onto your computer to use it in a rotator?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 13, 2007 10:41 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Aw, the eternal memorial! Oh well. :p

Anyway, nope. They all have to be on the internet like any other image you want other people on the internet to see. When I say to create a folder/directory/whatever in the second post in this here thread, I mean you do that on your webspace.

EDIT: unless you're asking whether you need them saved on your computer before you upload them to your webspace, and the answer to that is usually yes.

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 7:16 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
sci-fi greg in B&A Force wrote:
The parts I don't understand about the script are:

Where do I put the script? In a word document? and then save it into the folder?

Also I don't understand how to add my files to it.

Are you doing all this stuff on a webspace of some kind, like ripway?
You need to put the script in a plain text document (not word) named index.php -- and that goes in the same folder as all the images you want to use, the folder on the webspace that ends in .png (or some other image ending).

If you're using ripway, to add files to it you have to upload them into the main folder first, and then move them to the folder that you made that ends in .png (the folder that has the script in it)

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 8:41 pm 
Offline

Joined: Tue Jul 25, 2006 4:02 pm
Posts: 1347
What do you mean, plain text document?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 8:44 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Like something Notepad would save. Usually it'd be saved as .txt, but this one needs to be a .php

If you're using ripway, though, all you have to do is go into the folder you made ending in .png, click the button that says "Create Text File", enter index.php as the filename and copy and paste the script into the bigger box under that.

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 20, 2007 4:06 am 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
Jello B. wrote:
ls command in unix which isn't fair 'cause it's harder to remember D:


WUSS. Think of ls as list.

I theory, if you want to add support for other image types, you can add:
Code:
$extList['format'] = 'image/format';


For example:
Code:
$extList['bmp'] = 'image/bmp';


Just remember that it isn't smart enough to know that jpg, jpe, jpeg are all the same file types, so add all the exceptions.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 20, 2007 4:07 am 
Offline
User avatar

Joined: Fri Dec 17, 2004 9:48 pm
Posts: 2003
Location: Trapped inside a cage. It isn't even locked, but I'm an idiot.
MikeMcG wrote:
Jello B. wrote:
ls command in unix which isn't fair 'cause it's harder to remember D:


WUSS. Think of ls as list.

I made that post many months ago, and I've memorized it by now, thank you very much.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 20, 2007 4:19 am 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
I just assumed that this topic was extremely new because I had never seen it before.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 2:22 am 
Offline

Joined: Tue May 24, 2005 4:58 pm
Posts: 5045
Location: Imagining all the people living life in peace.
Hey, I did everything in the instructions and it came out like this. WHAT HAVE I DONE WRONG?! D:

This is especially embarrassing because I used to have one of these before, a long time ago.

Or, is it possible that it seems to be in perfect working order to you guys and the problem's on my end?

EDIT: Thanks, Inverse. You're a computer genius man.

_________________
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:
PostPosted: Sat Aug 25, 2007 1:09 am 
Offline
User avatar

Joined: Mon Jul 30, 2007 2:41 am
Posts: 316
Inverse Tiger wrote:
This question keeps coming up, but it's always impossible to find the old threads on it for some reason. So here's a complete walkthru:

words
Well, Okay, I got it to the point where I copy the URL in the adress bar I get my rotator.

BUT, I can't upload it to "link to offsite avatar".

May I say verily...

Image

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 2:11 am 
Offline
User avatar

Joined: Mon Jan 17, 2005 1:00 am
Posts: 3849
Location: Best Coast
What's the URL to your script? Remember, it must end in .png, .gif, .jpeg, .jpe, or .jpg, and it may not contain certain characters like question marks. If the URL ends in '.php', just add a '/image.png' and it will work.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 2:47 am 
Offline
User avatar

Joined: Mon Jul 30, 2007 2:41 am
Posts: 316
ed 'lim' smilde wrote:
What's the URL to your script? Remember, it must end in .png, .gif, .jpeg, .jpe, or .jpg, and it may not contain certain characters like question marks. If the URL ends in '.php', just add a '/image.png' and it will work.
This is the link

Or...

Code:
http://h1.ripway.com/Dndrhead/Avatar.png/

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 2:52 am 
Offline
User avatar

Joined: Mon Jan 17, 2005 1:00 am
Posts: 3849
Location: Best Coast
Oh, okay. Try it without the '/' at the very end:
Image

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 3:01 am 
Offline
User avatar

Joined: Mon Jul 30, 2007 2:41 am
Posts: 316
Image


Viola! It works!

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 3:23 am 
Offline
User avatar

Joined: Thu Nov 25, 2004 4:11 am
Posts: 18942
Location: Sitting in an English garden, waiting for the sun
Viola? You mean this?
Image

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 2:11 pm 
Offline
User avatar

Joined: Mon Jul 30, 2007 2:41 am
Posts: 316
IantheGecko wrote:
Viola? You mean this?
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 2:14 pm 
Offline
User avatar

Joined: Tue Sep 26, 2006 6:53 am
Posts: 2217
Location: Australia
That's a viola. It's a musical instrument similar to a violin.

_________________
"Explain to me how drowning them would not ruin their date."


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 2:23 pm 
Offline
User avatar

Joined: Mon Jul 30, 2007 2:41 am
Posts: 316
I know...I'm not stoopid.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 8:49 pm 
Offline
User avatar

Joined: Mon Jul 05, 2004 1:57 am
Posts: 2981
Location: Oklahoma City
Dndrhead - I think you meant to type "voilà". Different order of the vowels, and the accent mark helps. ;)

- Kef

_________________
404 sig not found


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 26, 2007 1:53 pm 
Offline
User avatar

Joined: Tue Jan 02, 2007 1:11 am
Posts: 353
Location: Rum>Whiskey
Is there any way to get a rotator on a site that lets you do this?
Code:
Upload Avatar from a URL:
but not this?
Code:
Link to off-site Avatar:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 26, 2007 2:27 pm 
Offline
User avatar

Joined: Tue Jul 18, 2006 3:06 am
Posts: 2049
Location: Standing on Watterson's front lawn
Nope. You gotta link it. Is there some reason that doesn't work for you?

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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 26, 2007 2:32 pm 
Offline
User avatar

Joined: Tue Jan 02, 2007 1:11 am
Posts: 353
Location: Rum>Whiskey
No, it's for a forum my cousin joined.


Top
 Profile  
 
 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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group