Installation

Follow these steps to install this script on your wiki.

  1. Go to System Settings inside the Control Panel.
  2. Under Extensions, click Add Script.
  3. Enter a descriptive name for the extension
  4. Under Configuration add the following to the Manifest field: 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 script.

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>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 v.8.08.1a