Ning Developer Network

Good day,

according to the docs (1.0.7, pg. 33), I can/should use gadgets.skins.getProperty() to obtain the primary design elements of the theme of the Ning in question; however, the gadgets object loaded in my Ning does not have a skins member.

The object itself exists, and I'm using gadgets.window.adjustHeight() and gadgets.io.* just fine, but gadget.skins is undefined. (It reports as undefined when I try to use it, and when I console.dir(gadgets) it's not being listed, while the others are.)

I am separately loading the Google JS API to load jQuery and SWFObject, but from skimming over it, that just seems to affect google.loader.*, not the gadgets.

Is gadgets.skins maybe just obsolete? Did I miss something? Is there a new/different way to obtain the theme properties? Am I missing a feature I'd have to require?

I did try searching the forums and Google, to no avail. Has anyone had this problem before? Does anyone know what's going on?

Tags: gadgets, gadgets.skins, google, themes

Share Twitter

Reply to This

Replies to This Discussion

Hi Renegade,

Do you have a code sample we can look at?

Thanks,
- Ernie

Reply to This

Oh man...let my feeble code be seen by the pros? *hides*

The current in-dev XML is located at http://the436.com/ning_dev/canopy.xml, though I took any "real" calls to gadgets.skins out, since they were ending in errors anyway. There's only debugging stuff in google.setOnLoadCallback related to this.

I tried the forms
gadgets.skins.getProperty(FONT_COLOR);
gadgets.skins.getProperty("FONT_COLOR");
gadgets.skins.getProperty(gadgets.skins.Property.FONT_COLOR);
but each of them complains that gadgets.skins is undefined :/

To ensure it wasn't just a question of scope, I just placed the debug call before everything else, with the only result being that the app was stopped dead in its tracks.
If I triggered this somehow, I'm really curious how I managed to do that -_^

(The font color of the app is currently hardcoded to to #CCCCC (due to my failure to access the skin), so it could be hard to read on bright bg colors. Maybe change it in Firebug.)

Reply to This

Hi Renegade,

Make sure you include the following line in your XML code:
<Require feature="skins"/>

Thanks!
- Ernie

Renegade said:
Oh man...let my feeble code be seen by the pros? *hides*
The current in-dev XML is located at http://the436.com/ning_dev/canopy.xml, though I took any "real" calls to gadgets.skins out, since they were ending in errors anyway. There's only debugging stuff in google.setOnLoadCallback related to this. I tried the forms
gadgets.skins.getProperty(FONT_COLOR);
gadgets.skins.getProperty("FONT_COLOR");
gadgets.skins.getProperty(gadgets.skins.Property.FONT_COLOR);
but each of them complains that gadgets.skins is undefined :/

To ensure it wasn't just a question of scope, I just placed the debug call before everything else, with the only result being that the app was stopped dead in its tracks.
If I triggered this somehow, I'm really curious how I managed to do that -_^

(The font color of the app is currently hardcoded to to #CCCCC (due to my failure to access the skin), so it could be hard to read on bright bg colors. Maybe change it in Firebug.)

Reply to This

That works! :D

Thank you so much, Ernie!

Reply to This

Reply to This

RSS

© 2010   Created by Ning Developer Admin

Badges  |  Report an Issue  |  Privacy  |  Terms of Service