LinkedIn

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/linkedin.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 contains functions for embedding LinkedIn widgets. This script requires MindTouch Deki 8.05.1 or later.

Functions:

  1. linkedin.CompanyInsider
  2. linkedin.Share

linkedin.CompanyInsider(company, style) : xml

Embed widget to show connections at a company.

Parameters:

NameTypeDescription
companystrName of the company.
stylestr(optional) Style for embedding widget. (one of "popup", "border", or "noborder"; default: "popup")


linkedin.Share(uri, title, origin, summary, label) : xml

Embed link to share a page with others on LinkedIn.

Parameters:

NameTypeDescription
uriuriURI of page to share.
titlestr(optional) Title of page. (default: none)
originstr(optional) Name of origin site where the page comes from. (default: none)
summarystr(optional) Summary of page contents. (default: none)
labelstr(optional) Label for link to share on LinkedIn. (default: 'Share on LinkedIn')


Source Code

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

  <requires host="MindTouch Deki 8.05.1" />
  
  <function>
    <name>CompanyInsider</name>
    <description>Embed widget to show connections at a company.</description>
    <param name="company" type="str">Name of the company.</param>
    <param name="style" type="str" optional="true">Style for embedding widget. (one of "popup", "border", or "noborder"; default: "popup")</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <head>
          <script eval:src="'http://www.linkedin.com/companyInsider?script&amp;useBorder=' .. (($style !== 'noborder') ? 'yes' : 'no')" type="text/javascript" />
        </head>
        <body>
          <span eval:id="@id" />
          <eval:if test="($style ?? 'popup') === 'popup'">
            <script type="text/javascript">new LinkedIn.CompanyInsiderPopup(<eval:js value="@id" />, <eval:js value="$company" />);</script>
          </eval:if>
          <eval:else>
            <script type="text/javascript">new LinkedIn.CompanyInsiderBox(<eval:js value="@id" />, <eval:js value="$company" />);</script>
          </eval:else>
        </body>
      </html>
    </return>
  </function>

  <function>
    <name>Share</name>
    <description>Embed link to share a page with others on LinkedIn.</description>
    <param name="uri" type="uri">URI of page to share.</param>
    <param name="title" type="str" optional="true">Title of page. (default: none)</param>
    <param name="origin" type="str" optional="true">Name of origin site where the page comes from. (default: none)</param>
    <param name="summary" type="str" optional="true">Summary of page contents. (default: none)</param>
    <param name="label" type="str" optional="true">Label for link to share on LinkedIn. (default: 'Share on LinkedIn')</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <eval:expr>web.link(uri.appendquery('http://www.linkedin.com/shareArticle', { mini: 'true', url: $uri, title: $title, source: $origin, summary: $summary }), $label ?? 'Share on LinkedIn')</eval:expr>
        </body>
      </html>
    </return>
  </function>
</extension>


Samples

Note: you need to be signed into your LinkedIn account to see your connections.

        Output

To embed the CompanyInsider widget:

{{ linkedin.companyinsider("google", "noborder") }} 

Enter the name of a company to check your insider connections:

Company
 

       

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08.2