Home > Developers
 
 
Editing a Spinlets Widget
You can change the settings for a Spinlets™ widget any time you want. Changes that you make will be seen by end users the next time they load your widget.

To edit a widget, click the My Spinlets tab. A list of your Spinlets™ widgets appears. Click the Edit button for the desired widget.
Edit the Widget Settings
To edit the widget settings, click on Widget Setting in the left navigation bar. You can add or change the following:

  • URL of the widget.
  • Widget name: This name must be unique within your SpinletsLab account.
  • External name: This is the name that is displayed on the widget, and need not be unique.
  • Description: The description is for your convenience only and is not exposed to end users of the widget.
  • Thumbnail: The thumbnail is used when the widget is posted to certain Web sites, such as iGoogle and Facebook. Click Re-Snap to generate the thumbnail for the first time, or if you have saved changes and want to generate a new thumbnail.

Depending on the widget type, you can change other settings, such as the widget size and color scheme, and whether the Take It 2GO button is displayed or hidden. When you are finished changing widget settings, click Save.
Edit the Widget Parameters
You can specify parameters to be passed to your Flash, HTML, or JavaScript Spinlets™ widgets. The advantage of specifying these parameters in your Spinlets™ widget definition is that you can change them at any time, and the changes will be applied to all existing placements of your widget the next time the end users load them.

To add or update the parameters and values, click on Parameter in the left navigation bar.

  • To add a parameter, click Add, specify the parameter name and value, and click Save.
  • To edit an existing parameter, click on the Edit link for that parameter. Make your changes and click Save.
  • To delete an existing parameter, click on the Delete link for that parameter.
Edit the HTML Wrapper
You can add HTML code to the top or bottom (or both) of your widget. This feature enables you to further customize the display of your widget with text, links, images, JavaScript, or anything else that you can put in HTML.

To add an HTML wrapper to your widget, do the following:

  1. Click on HTML Wrapper in the left navigation bar.
  2. In the Default tab, specify the HTML code to be placed before the widget, after the widget, or both. This code can contain JavaScript, and will appear on all placements except those on MySpace.
  3. In the MySpace tab, specify the HTML code to be placed, before the widget, after the widget, or both. This code cannot contain JavaScript, and will appear on MySpace placements only.
  4. To preview your widget with your HTML wrapper, click Preview.
  5. When you are finished, click Save.
Edit the Context Parameters
Context parameters supply information, specific to a given placement of your widget, back to your widget server. Your widget server can use this information to make smart decisions about how to serve the widget at load time.

For a simplistic example, you could choose to pass the _sl_ptv parameter back to your widget server. SpinletsLab will append the appropriate context value to the widget URL, like this:

http://example.org/v1/widget.swf?_sl_ptv=...


This parameter indicates how many times this particular end user has viewed this placement of your widget. You can code your widget to include, at load time, a note that says "You have viewed this widget __ times," filling in the blank with the number from the _sl_ptv parameter.

To use context parameters, click on Context Parameter in the left navigation bar. Use the check boxes to pass one or more of the following parameters back to your widget server:
Parameter Name Parameter Query String Description
User Geolocation _sl_geo Location of the visitor, including continent, country, region, latitude, longitude, and ZIP Code (U.S. locations only). See below for information on parsing this value.
User Network _sl_net Visitor’s network type (DSL, cable, dial-up, or ISDN).
User Placement Views _sl_ptv Number of views of this placement by this user.
User Widget Views _sl_mtv Number of views of any placement of this widget by this user.
Placement Domain _sl_dom Domain of current placement (when available).
Placement URL _sl_pur URL of current placement (when available).
Placement Children _sl_ptc Number of child instances created by this placement.
Widget Children _sl_wtc Number of total placements for this widget.

When you are finished selecting context parameters, click Save.

Parsing the Geolocation Value
The geolocation parameter value is a 19-character string that contains several items of location information. The string is formatted as follows:

  • Characters 0-4: ZIP Code (U.S. locations only)
  • Characters 5-6: Continent code (Africa= ‘AF’, Asia=’AS’, Europe=’EU’, North America=’NA’, South America=’SA’, Oceania=’OS’, others=’OT’)
  • Characters 7-8: ISO-3166 country code
  • Characters 9-10: ISO-3166 region code (available for the following countries: US, CA, AU, GB, JP, BR, DE, CN)
  • Characters 11-14: encoded latitude value
  • Characters 15-18: encoded longitude value

To decode the latitude and longitude values, apply them to this formula:

degrees = (encodedValue / 10) - 180


For example, the following geolocation string can be parsed to yield these results:

String: 00000ASCN3221062840

  • ZIP Code: 00000 (default value for non-U.S. locations)
  • Continent: AS (Asia)
  • Country: CN (China)
  • Region: 32 (Jiangsu province)
  • Latitude: 32.6° N ((2106/10)-180)
  • Longitude: 104° E ((2840/10)-180)
About Us | FAQs | Feedback | Contact Us | Terms of Service | Privacy Policy
© 2009. Fuhu, Inc. All Rights Reserved.