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.




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.
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?
Ah, sure thing, I probably should have accounted for that. I’ll upload a new version later tonight.
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.
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.
Hello,
is there any chance to use your awesome plugin without the widget? My WP theme is not widget-friendly…
thx
regards
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.
anyone care to explain how do i include it in my sidebar?
Is there a wordpress widget that would allow me to display my album in the sidebar/with the sidebar widgets/plug ins?
Thanks!
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.
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.
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?
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)
Dave,
You can find a copy of the APOD widget modified to use cURL here
http://beyrent.net/?p=36
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.
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?
@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.
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!
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
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