APOD Widget

25Sep06

I couldn’t think of a good quote for this post, so this post’s title is lacking in the witty department. Anyways, the APOD Widget is ready for consumption, it’s still lacking a bit in the way of error handling, but that’ll be around shortly. I’m just toying with what I want to display when the real APOD site is unavailable and/or we can’t grab the image, once I’ve conquered that I will update the widget. EDIT: The widget has been updated and should now gracefully handle itself when it can’t get to the APOD site.

Without further adieu, go forth and download.. the APOD Widget!

Any and all feedback is appreciated.

25 Responses to “APOD Widget”


  1. 1 Mike Posted November 29th, 2006 - 5:41 pm

    Paul,
    Thanks for the WP widget plugin. I have installed the plugin and placed it in the sidebar. The “Title” shows up but no picture under it. Checking the source code in browser it seems the “picture file name” is not being appended at the end of src=.
    Like so-> img src=”http://antwrp.gsfc.nasa.gov/apod/image/0611/”.
    I am using the latest file from your site. Any suggestions”
    Thanks.

  2. 2 Marcos Posted December 4th, 2006 - 3:19 pm

    Hey,

    So today’s APOD is an mpg file and it’s really making the APOD widget choke, at least in Safari and on both your and my web site. Perhaps some sort of hook to ignore non image fileS?

  3. 3 plamb Posted December 4th, 2006 - 8:13 pm

    Ah, sure thing, I probably should have accounted for that. I’ll upload a new version later tonight.

  4. 4 Marcos Posted December 5th, 2006 - 9:14 am

    Sweet, I tried to look at the widget and come up with a fix myself but … but I still know next to nothing of php. :) I look forward to the updated version.

  5. 5 plamb Posted December 5th, 2006 - 12:08 pm

    I’ve uploaded a new version with the fix, you can use the same link in my original post to download it. Thanks again for the heads up.

  6. 6 gidibao Posted December 6th, 2006 - 6:12 pm

    Hello,
    is there any chance to use your awesome plugin without the widget? My WP theme is not widget-friendly…

    thx

    regards

  7. 7 Mike Posted December 10th, 2006 - 6:04 pm

    Paul I figured out the problem I had above. While server PHP config has safe_mode “off”, allow_url_fopen “on” The Host’s firewall is set up to block all fopen requests remote from the server itself. So it was not allowing fopen to connect to NASA. They fixed the problem by putting the NASA address in the “whitelist”. They allow fopen requests through the firewall on a case by case basis. Works now.

  8. 8 kuneho Posted December 14th, 2006 - 3:24 am

    anyone care to explain how do i include it in my sidebar? :D

  9. 9 William Posted December 15th, 2006 - 7:05 am

    Is there a wordpress widget that would allow me to display my album in the sidebar/with the sidebar widgets/plug ins?
    Thanks!

  10. 10 Ken Posted December 20th, 2006 - 8:38 am

    I installed APOD a few days ago. All that I get is APOD not available displays. Is it really not available or is it me?

    Thanks.

  11. 11 plamb Posted December 20th, 2006 - 10:53 am

    Ken, as far as I know the APOD plugin has been functioning correctly. What another user encountered in a similiar situation was that their server’s firewall was restricting fopen requests originating from the server. You may want to check with your server admin to find out if there are any PHP related restrictions configured.

  12. 12 jason Posted January 4th, 2007 - 12:05 pm

    Hi, I just installed the APOD widget, and even though it is activated on the WP plugin management page it doesn’t show up on the sidebar widgets page, so I can’t actually add it to my site. Is this a bug (either in the widget or maybe in my theme), or am I just doing something dumb?

  13. 13 Dave Posted January 12th, 2007 - 5:16 pm

    Like some previous posters, I’ve been playing around with the APOD widget. It works beautifully on my local test site (at 127.0.0.1/….), but it doesn’t work on the live site. Poking around in phpinfo() on my provider I find that “allow_url_fopen” is set to off by my provider. Doing a bit more digging, I’ve found a number of discussions in different forums suggesting that curl should be used in scripts instead of fopen. Any chance that an update to the APOD widget could be released that uses curl instead? (fingers crossed)

  14. 14 Mike Posted February 18th, 2007 - 12:08 am

    Dave,
    You can find a copy of the APOD widget modified to use cURL here
    http://beyrent.net/?p=36

  15. 15 Clement Posted July 22nd, 2007 - 8:24 pm

    Is there any way to use this plugin without wordpress? I do use the normal version but I would like to be able to use it without wordpress also in a big development project I’m in right now.

  16. 16 Dhan Posted August 18th, 2007 - 11:46 pm

    My Wordpress installation uses local timezone GMT+07
    The problem happens when local time shifts from 23.59 to 00.00, it moves to new date and APOD plugin shows “APOD not available”.
    Can I set the timezone in the plugin to stay in GMT+00 instead of being carried by Wordpress timezone?

  17. 17 plamb Posted September 8th, 2007 - 12:18 pm

    @Dhan

    I’ve made a minor update to the APOD widget to allow setting an hour offset, so you should be able to adjust it accordingly now.

  18. 18 Wolf's Heart Posted January 3rd, 2008 - 4:59 pm

    This widget is so cool! The photos are just every day stuff, but every night w/explanation so we know what we’re looking @. I have looked for scientific/space info for research & this is just what I needed. Thanks!

  19. 19 Andy Posted February 17th, 2008 - 5:23 am

    Love your widget - well done. I too, have the problem if I specify a time offset. I am in Australia and the time is GMT 11. If I specify this time it says ‘APOD not available’, but if I leave it at zero it works fine. Is there any disadvantage in not setting an offset?

    Another handy plugin I use on some sites for displaying anything random which could be ads/photos/quotes/tip of the day etc is the Ad-Rotator one:
    (http://kpumuk.info/projects/wordpress-plugins/ad-rotator/).
    I’m guessing that this could be used to pull an image from anywhere too (maybe even resize images?) as it can display any html code.

    Best of luck and keep making plugins!

    Andy

  20. 20 Jonathan Posted February 17th, 2008 - 11:10 pm

    Got any ideas on this error? I am running WP Version 2.3.3

    Fatal error: Cannot redeclare widget_apodwidget_returnimageandlink() (previously declared in apod_widget.php:24) in apod_widget.php on line 22

Who's linking?

  1. 1 APOD « WordPress Widgets Pingback on Nov 21st, 2006
    "[...] Astronomy Picture Of the Day, now available as a WordPress Widget. Get the APOD Widget. (It’s cheaper than a ..."
  2. 2 APOD in the Sidebar at Mac Singularity Pingback on Dec 1st, 2006
    "[...] I saw some printouts from the Astronomy Picture of the Day site around here and figured I’d add them ..."
  3. 3 James Curbo’s Weblog » Upgrade time! Pingback on Feb 12th, 2007
    "[...] Tonight I did a whole bunch of stuff to my weblog.  It all started because I wanted to install ..."
  4. 4 » Test #2 BetaLabs.ORG: if I don’t have it, you don’t need it. Pingback on Mar 12th, 2007
    "[...] Astronomy Picture Of the Day, now available as a WordPress Widget. Get the APOD Widget. (It’s cheaper than a ..."
  5. 5 » grey test BetaLabs.ORG: if I don’t have it, you don’t need it. Pingback on Mar 12th, 2007
    "[...] Astronomy Picture Of the Day, now available as a WordPress Widget. Get the APOD Widget. (It’s cheaper than a ..."

Leave a Reply


Comment guidelines: No spamming, no profanity, and no flaming. Inappropriate comments will be deleted outright.

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image




 

September 2006
M T W T F S S
    Oct »
 123
45678910
11121314151617
18192021222324
252627282930  

Take it, it's good for you

wowhead

APOD

Wunderground Weather Photo

Smoke haze from wildfire 15 miles north


Google Ads!