Author Topic: avatar image  (Read 4480 times)

0 Members and 1 Guest are viewing this topic.

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
avatar image
« on: August 09, 2007, 12:04:58 PM »
I want to use my weather avatar image on my webhost's site, but it won't accept it, stating it is an invalid url. Is there a work around for this?
I want to use this link:
http://www.beamsvillewx.ca/wxavatar.gif
Ann-Marie
Beamsville, Ontario, Canada

Offline capeweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 1309
    • http://www.capeweather.com
Re: avatar image
« Reply #1 on: August 09, 2007, 12:10:15 PM »
Works fine when I pull it up over here.  :D If it's being displayed on your site then I don't understand how your webhost couldn't put it on theres. Unless you are hosting with them and they are hosting with somebody else?

Chris
Cape Coral, Florida
Website: http://www.capeweather.com
Website: http://www.fortmyersweather.net

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: avatar image
« Reply #2 on: August 09, 2007, 12:17:29 PM »
I think that's it, Chris. The webhost company is in Eastern Canada, but the servers are in the US.
Ann-Marie
Beamsville, Ontario, Canada

Offline WeatherBeacon

  • Chief
  • Forecaster
  • *****
  • Posts: 1369
    • http://www.wxbeacon.com
Re: avatar image
« Reply #3 on: August 09, 2007, 03:25:46 PM »
Seems that what she wants to do "should work" (I know ... famous last words from a programmer, right?).

I have my weather graphic on my web site at work, and it works fine.

Ann-Marie: I assume that you're using the full url?:

http://www.beamsvillewx.ca/today/canadasticker.php?type=avatar

and not just:

http://www.beamsvillewx.ca/wxavatar.gif

Kevin...
Mae govannen!
Kevin  (Member AMS) http://www.wxbeacon.com               Genesee County, Michigan
Hardware:  Davis Vantage Pro Wireless, Midland WR-300
Software: VWS 14.01p43, WeatherFlash, & GRLevel3

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: avatar image
« Reply #4 on: August 09, 2007, 03:57:31 PM »
Kevin: I tried both, the first url gives an "invalid file" error, the second, the "invalid url" error as I mentioned before :(
For my weather avatar on this forum, I am using the second url, with no problems obviously :)
Ann-Marie
Beamsville, Ontario, Canada

Offline Anole

  • Forecaster
  • *****
  • Posts: 585
    • http://pineislandweather.com
Re: avatar image
« Reply #5 on: August 09, 2007, 04:31:22 PM »
When you say "webhost's site" what specifically are you referring to? Is a forum? If so what forum package are they using?

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: avatar image
« Reply #6 on: August 09, 2007, 04:50:24 PM »
It is a forum and they use vbulletin.
Ann-Marie
Beamsville, Ontario, Canada

Offline WeatherHost

  • Forecaster
  • *****
  • Posts: 3649
Re: avatar image
« Reply #7 on: August 09, 2007, 10:50:57 PM »
Maybe they only accept .jpg files for Avatars?

Offline aifan27

  • Member
  • *
  • Posts: 20
    • http://www.newtownweather.com
Re: avatar image
« Reply #8 on: August 09, 2007, 11:35:47 PM »
Looks like your avatar is working now.  :)

Offline wmorf

  • wetterhuette.ch
  • Member
  • *
  • Posts: 3
    • http://wetterhuette.ch/
Re: avatar image
« Reply #9 on: August 10, 2007, 10:21:22 AM »
Hi together

I have a question:
How can I create a jpeg file from my avatar:
<img src="http://wetterhuette.ch/wxscripts/wxgraphic.php?type=banner">

Can somebody help me?

Thanks!

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: avatar image
« Reply #10 on: August 10, 2007, 10:43:37 AM »
wmorf,

The script is creating a .jpg right now which you can see by right clicking on it and looking at the properties.  The idea of the script is to create it for you "real time" so that it's always current.  Storing a copy would defeat that purpose.

- Jim

Forum Search and Google Can be Your Best Friends

Offline capeweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 1309
    • http://www.capeweather.com
Re: avatar image
« Reply #11 on: August 10, 2007, 11:33:02 AM »
Quote from: "jmcmurry"
wmorf,

The script is creating a .jpg right now which you can see by right clicking on it and looking at the properties.  The idea of the script is to create it for you "real time" so that it's always current.  Storing a copy would defeat that purpose.

- Jim


Hi Jim,
I know this has nothing to do with this topic and I didn't mean to stomp on this thread but had a question in regards to your WASP2 animate script. Bob and I were working on it sometime back and I installed it correctly, set the permissions and started a cron job for every 10 minutes to execute seqimage.php. The script would only write the 0.jpg file and would never write the remaining files (1.jpg, 2.jpg, etc.) on each execution. My configuration was set for 10 images. It would just constantly write over top of the original 0.jpg and never advance to the next image. Do you have any idea why that might be happening? I noticed you were the author of the script and wanted to ask. Thanks for any help you may have.

Chris
Cape Coral, Florida
Website: http://www.capeweather.com
Website: http://www.fortmyersweather.net

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: avatar image
« Reply #12 on: August 11, 2007, 08:00:12 AM »
Chris,

It sure sounds like your server isn't letting the script rename 0.jpg to 1.jpg etc.  The only thing I can think of is to check your server permissions.  Here's the script as running successfully for me.  Maybe someone else will have an idea.

<?php
// 2007 by Jim McMurry jmcmurry@mwt.net jcweather.us
// Place this file in the same folder as wasp2.png.  Make sure you have the correct permissions.  I used CMOD 777 for the folder.
$filedir = $_SERVER['DOCUMENT_ROOT'] . "/lightning/"; //Subdirectory below your web "root" where files are located.
$numfiles = 10;   // number of images to maintain
$ftype = '.png';  // Change to .png/.jpg as desired
// The next 3 only if producing .jpg files
$thumbx = 660;    //Width of new image.  Reduce if you wish a smaller product.
$thumby = 580;    //Height of new image.                 "
$quality = 95;    // For jpg's .. Adequate & reduces file size.  Can't go above 99!

//Routine Begins
$origimg = imagecreatefrompng('wasp2.png');
$newimg = imagecreatetruecolor($thumbx, $thumby);
imagecopyresampled($newimg, $origimg, 0, 0, 0, 0, $thumbx, $thumby, 660, 580);
switch ($ftype):
   
   case '.jpg':
   imagejpeg($newimg, '0.jpg', $quality);
   break;
   
   case '.png':
   imagepng($newimg, '0.png');
   break;
   
endswitch;
imagedestroy($newimg); // destroy the images
imagedestroy($origimg);
// Now re-order them
$targetfil = $filedir . $numfiles . $ftype;    
if (file_exists($targetfil)) {  //If oldest file exists delete it
   unlink($targetfil);
}
for($i = $numfiles; $i > 0; $i--){      //cycle through files renaming them
      $targetfil = $filedir . $i . $ftype;
      $t = $i - 1;
      $nextfil = $filedir . $t . $ftype;
      if (file_exists($nextfil)) {  
         rename($nextfil, $targetfil);
      }      
}
?>

New baby yet?

- Jim

Forum Search and Google Can be Your Best Friends