AddThis

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/addthis.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 allows you to add AddThis social bookmarking widgets to your wiki. This script requires MindTouch Deki 1.8.3 or later.

Configuration:

Config KeyTypeDescription
publisherstrAddThis account ID. Go to http://www.addthis.com to sign up.

Functions:

  1. addthis.bookmark

addthis.bookmark() : xml

Embed a social bookmarking button.


Source Code

<extension>
  <title>MindTouch AddThis Extension</title>
  <label>AddThis</label>
  <copyright>Copyright (c) 2008 MindTouch, Inc.</copyright>
  <description>This extension allows you to add AddThis social bookmarking widgets to your wiki.</description>
  <uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/AddThis</uri.help>
  <uri.logo>http://scripts.mindtouch.com/logos/addthis-logo.png</uri.logo>
  <namespace>addthis</namespace>

  <config>
    <param name="publisher" type="str">AddThis account ID.  Go to http://www.addthis.com to sign up.</param>
  </config>
  
  <function>
    <name>bookmark</name>
    <description>Embed a social bookmarking button.</description>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <script type="text/javascript">
            addthis_url    = location.href;
            addthis_title  = document.title;
            addthis_pub    = <eval:js>config['publisher']</eval:js>;
          </script>
          <script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
        </body>
      </html>
    </return>
  </function>
</extension>






Samples


Output

To embed the Social Bookmarking buttons:

{{ addthis.bookmark() }} 

./social book2.png

Tag page
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC1