Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

DashboardWidgets Update Checker

Author Message
pm
Administrator


Joined: 24 Aug 2004
Posts: 398

Posted: Fri Jul 15, 2005 - 9:14 pm    Post subject: DashboardWidgets Update Checker Reply with quote

Hi everyone,
DBW user Sebastien Vallon has created a script that, when included in a widget, checks the DBW Showcase for the most recent version of that widget. If the version number on DBW differs from the one in the Info.plist file, a message is displayed prompting the user to download the update.

So help your users stay up to date and incorporate the script into your widget!

Enjoy DBW, everyone Very Happy
View user's profile Send private message Send e-mail Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Mon May 01, 2006 - 9:16 pm    Post subject: Need clarification Reply with quote

Hi-
I really want to use this in my widgets, I downloaded the script and then changed all the variables in the script. I then added

<body onload="init();">

to the HTML file and linked the html file to the js, and cs files respectivly, however I am not getting this script to work. Is there anyone who could clarify the update script? Thanks!

Jon
www.jonbrown.org
View user's profile Send private message Send e-mail Visit poster's website Widgets
philroy



Joined: 03 May 2005
Posts: 10

Posted: Sat Sep 02, 2006 - 10:40 pm    Post subject: Reply with quote

I've followed the instructions but get an error "value undefined" and I've tracked it down to the check_update.js file
Code:
return trim(widget.system('/bin/sh -c "defaults read `pwd`/'+ filename + ' ' + property + '"',null).outputString);
I have no idea what to do??

Phil
View user's profile Send private message Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Mon Sep 04, 2006 - 9:26 am    Post subject: I use a different code... Reply with quote

Hi, I tried, using that code however it was a hasstle and no one replied with any answers so I made my own code. http://www.widgetshow.com/?page_id=74 that might help! This is the code i use in my widgets.

Jon
View user's profile Send private message Send e-mail Visit poster's website Widgets
philroy



Joined: 03 May 2005
Posts: 10

Posted: Mon Sep 04, 2006 - 8:06 pm    Post subject: Reply with quote

Hey Jon,

That looks great...just a few comments.

I think you need to make the instructions clearer re the fact that there's a URL that needs adjusting in the code.

For the version file, do I just put "1.2" or "<?php
1.2?>"...I'm confused?

Next, the DIV tag...I can't see in the instructions what to call the class, whether to put any text between the DIVs and if that text can be a clickable link to download the new version.

Can I suggest the files be made available as a download?

This looks great code once the above is sorted, I'm using it (if that's OK?)...as well as putting full credit to you. Let me know if there's any specifics you want re credit...such as how we released the NZMac.com widget under a Creative Commons license.

Phil

PS..I couldn't spot a widget on your site to download and find the code....lots of widget pictures and podcasts though! Smile
View user's profile Send private message Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Mon Sep 04, 2006 - 9:27 pm    Post subject: included files Reply with quote

Hi, I included the files on the site Download Files I hope that it makes it much clearer, basically your running the script that compares the version number from that in your plist file. For example if your plist version number is 3.0 and your php version file says 2.0 then you should see the update message meaning there is an update available. Happy to help! Let me know how it goes![/url]
View user's profile Send private message Send e-mail Visit poster's website Widgets
philroy



Joined: 03 May 2005
Posts: 10

Posted: Mon Sep 04, 2006 - 10:06 pm    Post subject: Reply with quote

I note that in your online instructions you say...
<body onload="checkForUpdate();">

But the downloadable version has...
<body onload='checkversion();'>


Phil
View user's profile Send private message Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Tue Sep 05, 2006 - 1:28 am    Post subject: Reply with quote

hi, phil, yeah, i see that it should be as it is called on the site <body onload='checkversion();'> because checkversion() runs the secondary function checkForUpdate(); so please use

<body onload='checkversion();'>

its correct!

Jon

sorry about the confusion, im currently combatting a nasty flu, and its easy to make these lil mistakes.
View user's profile Send private message Send e-mail Visit poster's website Widgets
philroy



Joined: 03 May 2005
Posts: 10

Posted: Tue Sep 05, 2006 - 2:56 am    Post subject: Reply with quote

That's OK...I figured it out after having a play. New version of widget is all published (right-hand column of main page www.nzmac.com), submitted update here and to Apple site...all with an awesome new update checker that I've wanted for ages!

Credit also listed here...
http://www.nzmac.com/nzmac.com_widget_credits.html

Thanks so much and hope you feel better soon.

Cheers,

Phil
View user's profile Send private message Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Tue Sep 05, 2006 - 8:40 am    Post subject: Reply with quote

Hi Phil, thanks for the credit, and the get well, i was just looking at your widget, and noticed that there was something strange about your back button. One of the end caps of the done buttton is displaying backwards. Anyway, glad too see u got everything working! Take care yourself.
View user's profile Send private message Send e-mail Visit poster's website Widgets
philroy



Joined: 03 May 2005
Posts: 10

Posted: Tue Sep 05, 2006 - 2:23 pm    Post subject: Reply with quote

Yes you're right...well spotted. Might be time to put the update check into action with a new version. I have no idea where to start with the done button, but I'll take a look.

Phil
View user's profile Send private message Widgets
philroy



Joined: 03 May 2005
Posts: 10

Posted: Tue Sep 05, 2006 - 5:46 pm    Post subject: Reply with quote

That was too easy...stray DIV tag. Now at version 1.1.1 and I'm pleased to report the update checking worked like a charm.

Thanks again!

Phil
View user's profile Send private message Widgets
mnieto



Joined: 05 Apr 2006
Posts: 7

Posted: Wed May 09, 2007 - 7:24 am    Post subject: Reply with quote

Well this post is a bit old but I hve a question. Waht about if you have your widget not in Dashboard.com but in your own Seite/ Server? Is ist enough when you compare the name from the widgets instead of the ID?

Thank you for an answer.

Best regards
View user's profile Send private message Send e-mail Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group