Homestar Runner Wiki Forum

A companion to the Homestar Runner Wiki
It is currently Thu Mar 28, 2024 12:09 pm

All times are UTC




Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Tue Jun 17, 2008 4:06 pm 
Offline
User avatar

Joined: Wed Feb 20, 2008 5:24 pm
Posts: 915
Location: SIBHoDC
It worked, thanks a lot.


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Mon Jun 30, 2008 7:56 pm 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
I'm going to test out my paired random images.

Image
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Mon Jun 30, 2008 8:00 pm 
Offline
User avatar

Joined: Sat Dec 01, 2007 4:09 pm
Posts: 805
Location: One tequila, two tequila, three tequila, floor...
MikeMcG wrote:
I'm going to test out my paired random images.

Image
Image

Every time I refresh, one or both images are broken.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Mon Jun 30, 2008 8:02 pm 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
Yeah, I'm testing them out. I'm using the cookie method and I'm fumbling with cookie domains or scope or whatever.

Edit: So I'm getting predictable results. The next second image will always be what the first current image is. Still not what I want.


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

Joined: Mon Jan 17, 2005 1:00 am
Posts: 3849
Location: Best Coast
MikeMcG wrote:
Yeah, I'm testing them out. I'm using the cookie method and I'm fumbling with cookie domains or scope or whatever.

Edit: So I'm getting predictable results. The next second image will always be what the first current image is. Still not what I want.

What order does Firefox/whatever browser make those image requests in? If I open the two in separate tabs, refresh the avatar, and then refresh the sig, it works. Maybe Firefox sends the requests for the images in reverse order that they appear on the page.

EDIT: Eh, never mind, I flipped them around in a preview and it did the same thing... Apparently cookies don't actually update for different images until the whole page is done loading. You could try having the second image set the cookies for the next time, and then assume the current images would use the cookies that were set the last time, if that's possible.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Mon Jun 30, 2008 9:07 pm 
Offline
User avatar

Joined: Sun Apr 15, 2007 7:20 pm
Posts: 2321
Location: Strawberries. :[
I can try that next, but I went for the text file method. She works now.

Directory set up:

Code:
/paired/
   /av.png/
      1.png
      2.jpg
      3.gif
      4.png
   /sig.png/
      /*
      Contents with the same name as the other directory
      */
   dataDump.txt /*This file is only temporary and exists between the first script's
         execution and the second script's execution*/


Code:
<?php

$dataHold = '../pairedData.txt';
$dirHandle = opendir('./');
$dirContents = array();
while($dirItem = readdir($dirHandle)){
   if(is_file($dirItem) && $dirItem != 'index.php') $dirContents[] = $dirItem;
}

if(!file_exists($dataHold)){
   $numberOfItems = sizeof($dirContents) - 1;
   $displayImage = './' . $dirContents[rand(0, $numberOfItems)];

   $mime = getimagesize($displayImage);
   $mime = image_type_to_mime_type($mime[2]);
   
   $dataDump = array('mime' => $mime, 'display' => $displayImage);
   $fh = fopen($dataHold, 'w');
   fwrite($fh, serialize($dataDump));
   fclose($fh);
}else{
   $fh = fopen($dataHold, 'r');
   $dataDump = unserialize(fread($fh, filesize($dataHold)));
   fclose($fh);
   $mime = $dataDump['mime'];
   $displayImage = $dataDump['display'];
   unlink($dataHold);
}

header('Content-type: ' . $mime);
readfile($displayImage);

?>


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Tue Aug 19, 2008 2:21 am 
Offline
User avatar

Joined: Fri Aug 25, 2006 5:59 pm
Posts: 138
Location: Ypsilanti, MI
I think ripway doesn't allow periods in folder names anymore. :(

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Tue Aug 19, 2008 10:25 pm 
Offline

Joined: Tue Aug 19, 2008 5:06 pm
Posts: 129
Location: Fun Land
I'm looking for a Municipality icon or something to use as an avator. Can anyone help?


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Aug 20, 2008 4:07 pm 
Offline
User avatar

Joined: Mon Jan 17, 2005 1:00 am
Posts: 3849
Location: Best Coast
OneGyT wrote:
I think ripway doesn't allow periods in folder names anymore. :(

You can just add /anything.png to the end of the index.php file instead (unless Ripway uses IIS servers or something), e.g., instead of linking to avatar.png, link to avatar.png/index.php/anything.png. Except the first folder can't be called avatar.png anymore, obviously, but whatever it's called.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Fri Mar 20, 2009 11:30 pm 
Offline
User avatar

Joined: Sat Sep 13, 2008 3:07 pm
Posts: 206
Location: Georgia.
Why not Freewebs? You can host a photo album there.

_________________
"Holy crap!"


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Aug 31, 2011 4:24 am 
Offline
User avatar

Joined: Fri Aug 12, 2011 6:12 am
Posts: 26
Location: You don't get french fries!
Okay this is what I don't understand when it comes to the signatures... I've got a picture saved on my desktop that I created because the image I wanted to use wasn't available anywhere else...

Yeah so anyway I had it hosted by imageshack.com and I'd like it to be bigger than it is but... the forum rules say max 100 pixels right? Or did I read that wrong?
At the same time, I look at other people's signatures and it seems to be much larger... I don't understand...

Anyone know what the deal is?

_________________
____Throw Me A_____Image____Squeedley Guitar!____


Top
 Profile  
 
 Post subject: Re: Rotating Sigs and Avatars
PostPosted: Wed Aug 31, 2011 4:34 am 
Offline
User avatar

Joined: Fri Aug 12, 2011 6:12 am
Posts: 26
Location: You don't get french fries!
Oops. Nevermind. I'm dumb :)

_________________
____Throw Me A_____Image____Squeedley Guitar!____


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group