Widgetbox

Installation

Follow these steps to install this script on your wiki.

  1. Go to Service managmenent inside the Control Panel.
  2. Under Add Service, click Local and select type Extension.
  3. Enter a descriptive name and the SID: sid://mindtouch.com/2007/12/dekiscript
  4. Add "manifest" to the config section with value set to http://scripts.mindtouch.com/widgetbox.xml
  5. Add extra configuration values as listed below under Configuration (If Configuration is not listed below, ignore this step.)
  6. Click on add service.

Related Links: DekiScript service, Extension Overview, DekiScript Overview, Extension Demos.


Overview

This extension contains functions for embedding WidgetBox widgets. This script requires MindTouch Deki 1.8.3 or later.

Functions:

  1. widgetbox.panel
  2. widgetbox.widget

widgetbox.panel(id) : xml

Insert WidgetBox panel.

Parameters:

NameTypeDescription
idstrScript panel id.


widgetbox.widget(id) : xml

Insert WidgetBox widget.

Parameters:

NameTypeDescription
idstrScript widget id.


Source Code

<extension>
  <title>MindTouch WidgetBox Extension</title>
  <label>WidgetBox</label>
  <copyright>Copyright (c) 2007, 2008 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")}} 

./WidgetBoxPanel2.JPG

To embed a LED text scroller widget:

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

./WidgetBoxWidget1.JPG
Tag page
Viewing 1 of 1 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
Viewing 1 of 1 comments: view all
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC1