Thread: chumby
View Single Post
Posts: 13 | Thanked: 1 time | Joined on Aug 2007
#26
Originally Posted by zeez View Post
If i can find the time, i'll update the code and also add the timer stuff... we'll see
Zeez: I played with the code a bit more and found that my revision posted above doesn't work when a widget has multiple parameters, and your original version doesn't work if there is only one single parameter for a widget. Trouble is, I can't figure out how to test for the number of parameters a widget has because this:

sizeof($a['profile']['widget_instances']['widget_instance'][$i]['widget_parameters']['widget_parameter']

Seems to return the correct number of widget parameters only if there are more than one widget parameter. If there is a single widget parameter (like for the NOAA weather widget) it returns 3.

Any insight would be appreciated.