WidgetBox Extension
Vendor
MindTouch
Type Script
Categories Widgets
Requires MindTouch Deki 1.8.3 or later
Status Stable
License Free/Open Source
Manifest http://scripts.mindtouch.com/widgetbox.xml

 

Table of Contents

Description

This extension contains functions for embedding WidgetBox widgets.

See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


Functions

widgetbox.panel(id) : xml

Insert WidgetBox panel.

Parameters:

NameTypeDescription
idstrScript panel id.


widgetbox.widget(id) : xml

Insert WidgetBox widget.

Parameters:

NameTypeDescription
idstrScript widget id.


Script Source

<extension>
  <title>WidgetBox Extension</title>
  <label>WidgetBox</label>
  <copyright>Copyright (c) 2006-2009 MindTouch, Inc.</copyright>
  <description>This extension contains functions for embedding WidgetBox widgets.</description>
  <uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/WidgetBox</uri.help>
  <uri.logo>http://scripts.mindtouch.com/logos/widgetbox-logo.png</uri.logo>
  <namespace>widgetbox</namespace>

  <function>
    <name>panel</name>
    <description>Insert WidgetBox panel.</description>
    <param name="id" type="str">Script panel id.</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <script type="text/javascript" eval:src="'http://widgetserver.com/syndication/subscriber/InsertPanel.js?panelId=' .. web.uriencode(args.id)" />
        </body>
      </html>
    </return>
  </function>

  <function>
    <name>widget</name>
    <description>Insert WidgetBox widget.</description>
    <param name="id" type="str">Script widget id.</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <script type="text/javascript" eval:src="'http://widgetserver.com/syndication/subscriber/InsertWidget.js?appId=' .. web.uriencode(args.id)" />
        </body>
      </html>
    </return>
  </function>
</extension>


Remarks

To get started, go to Widgetbox.com, find a widget you like, and customize its settings.  Once you are done, click on "Get Widget" and a small panel will show up.  Click on "Get Widget Code" and copy/paste it into your favorite text editor.  The result will look like this:

<script type="text/javascript" 
 src="http://widgetserver.com/syndication/subscriber/InsertPanel.js?panelId=172c1af6-95cd-4e98-86e5-09e6ffd77877">
</script>
<noscript>Get great free widgets at <a href="http://www.widgetbox.com">Widgetbox</a>!</noscript>

Now, select the widget code.  It starts at ?panelId= and goes to the closing double quotes (").   Use this code when using the widgetbox functions.


Samples

  Output

To embed a comment widget:

{{widgetbox.panel("bcef9d3c-3030-436f-841d-ed28804335a7")}} 
./WidgetBoxPanel1.JPG

To embed a Global Giving campaign widget:

{{widgetbox.panel("a0cc2e3a-45e7-45b3-9e56-92bc0f7b463a")}} 
 

To embed a LED text scroller widget:

{{ widgetbox.widget("91d81375-6dd5-45ba-8073-4da582ce1724") }}
./WidgetBoxWidget1.JPG

 

Tag page
Viewing 3 of 3 comments: view all
I followed these directions but get an error code every time.

This is the error code:

line 1, column 56: ":" expected
Posted 12:59, 17 Apr 2008
I had the same problem...does anyone test these things or asnwered comments?
Posted 19:51, 8 Oct 2008
Comments on documentation pages are better left pointing out additional details that are not captured by the docs. If you encounter an issue, post on the forums instead. That said, I changed the second row to inline the widget rather than a picture of it and it works just fine. edited 20:37, 8 Oct 2008
Posted 20:33, 8 Oct 2008
Viewing 3 of 3 comments: view all
You must login to post a comment.