Skip to content

Commit

Permalink
Item10530: first release of LinkedinPlugin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/LinkedInPlugin@11238 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Mar 27, 2011
1 parent 2377edf commit b47a321
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 906 deletions.
3 changes: 1 addition & 2 deletions data/Main/LinkedinSkinUserViewTemplate.txt
Expand Up @@ -2,7 +2,6 @@
%TMPL:INCLUDE{"view"}%

%TMPL:DEF{"content"}%<div class="foswikiRight">
%ADDTOZONE{"script" text="<script type='text/javascript' src='http://www.linkedin.com/js/public-profile/widget-os.js'></script>"}%
<a class="linkedin-profileinsider-inline" href="http://www.linkedin.com/in/%URLENCODE{%BASETOPIC%}%">%BASETOPIC%</a>
%PROFILE{%BASETOPIC%}%
</div>
%TMPL:PREV%%TMPL:END%
70 changes: 33 additions & 37 deletions data/System/LinkedInPlugin.txt
@@ -1,4 +1,9 @@
%META:TOPICINFO{author="BaseUserMapping_333" comment="" date="1300933078" format="1.1" version="2"}%

<div class="foswikiRight" style="padding:60px">
%ADDTOZONE{"script" text="<script type='text/javascript' src='http://www.linkedin.com/js/public-profile/widget-os.js'></script>"}%
<a class="linkedin-profileinsider-inline" href="http://www.linkedin.com/in/%URLENCODE{SvenDowideit}%">Sven Dowideit</a>
</div>
---+!! !LinkedInPlugin
<!--
One line description, required for extensions repository catalog.
Expand All @@ -9,59 +14,53 @@ prefer.
-->
%SHORTDESCRIPTION%

%TOC%

---++ Usage
---+++ Share on LinkedIn

it seems that the POPUPWINDOW is the most reliable, and can be customised best.

%POPUPWINDOW{
label="Share on %NOP%LinkedIn"
url="http://www.linkedin.com/shareArticle?mini=true&url=http://fosiki.com&title=<nop>LinkedInPlugin&summary=linkedinplugin&source=%WIKINAME%"
%ICON{linkedin}%%POPUPWINDOW{
label="Share this foswiki plugin on %NOP%LinkedIn"
url="http://www.linkedin.com/shareArticle?mini=true&url=%URLENCODE{%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%}%&title=%URLENCODE{%SHORTDESCRIPTION%}%&summary=new%20foswiki%20linkedin%20plugin&source=%URLENCODE{%WIKINAME%}%"
}%

<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-url="http://fosiki.com" data-counter="top"></script>

<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-url="http://fosiki.com" data-counter="right"></script>


<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-url="http://fosiki.com"></script>
%TOC%

* *sidebar share this topic..*
---++ Usage
---+++ Share on !LinkedIn
To add a share _this_ topic link, using defaults, just add =%<nop>SHARE%= :
%SHARE{}%

---+++ Company insider
Macro parameters:
* url - url linking to what you're sharing - default to the current topic
* title - a title for the share - defaults tto the topic name
* source - who's sharing it - default to your wikiname
* summary - a summary..

!LinkedIn requires shared URL's to be publically accessible.

<script src="http://www.linkedin.com/companyInsider?script&useBorder=no" type="text/javascript"></script>
<script type="text/javascript">
new LinkedIn.CompanyInsiderPopup("bofa","Bank of America");
</script>
<span id="bofa"></span>
---+++ !LinkedIn user profile
To add a Link, or an inline !LinkedIn profile, use the =%!PROFILE%= macro:

* *some kind of comany name based thing / sitewide?*
%PROFILE{}%

---+++ Linkedin profile
<script type="text/javascript" src="http://www.linkedin.com/js/public-profile/widget-os.js"></script>
Macro parameters:
* type - inline or popup
* user - user to lookup - defaults to the logged in user's wikiname.

<a class="linkedin-profileinsider-popup" href="http://www.linkedin.com/in/SvenDowideit">SvenDowideit</a>

---++ Skin Support.
If you install this plugin and are using a current release of Foswiki::Extensions.WidgetsSkin, the side bar will automatically have a share this topic widget added.

<a class="linkedin-profileinsider-inline" href="http://www.linkedin.com/in/SvenDowideit">SvenDowideit</a>
similarly, if you're using Widgets skin, or PatternSkin, everyone's user topics can have the !LinkedIn user profile widget automatically added by pre-pending =linkedin= to the skin path:

* *add to WikiName rendering? as popup*
* *add to view_template for usertopic*
---++ Examples
* <nop>Set SKIN=linkedin,famfamfam,pattern

---++ !WidgetsSkin blocks
---+++ Share with !LinkedIn
<verbatim type-tml>
http://www.linkedin.com/shareArticle?mini=true&url=%URLENCODE{%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%}%&title=%URLENCODE{%QUERY{Summary}%}%&summary=new%20foswiki%20linkedin%20plugin&source=Foswiki
---+++ widget-linkedinshare
%STARTSECTION{"widget-linkedinshare"}%<div class="widget-linkedinshare widget">
<h2 class="widget-header">Share</h2>
<div class="widget-content">
%ICON{linkedin}%%POPUPWINDOW{
label="Share this topic"
url="http://www.linkedin.com/shareArticle?mini=true&url=%URLENCODE{%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%}%&title=<nop>LinkedInPlugin&summary=linkedinplugin&source=%WIKINAME%"
}%
%SHARE%
</div>
</div>%ENDSECTION{"widget-linkedinshare"}%
</verbatim>
Expand All @@ -72,9 +71,6 @@ http://www.linkedin.com/shareArticle?mini=true&url=%URLENCODE{%SCRIPTURL{view}%/

---++ Info

Many thanks to the following sponsors for supporting this work:
* Acknowledge any sponsors here

| Author(s): | Foswiki:Main.SvenDowideit - http://fosiki.com |
| Copyright: | SvenDowideit@fosiki.com &copy; 2011 |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License 3)]] |
Expand Down
12 changes: 12 additions & 0 deletions data/System/LinkedinTemplate.txt
@@ -0,0 +1,12 @@

%TMPL:DEF{"share"}%%ICON{linkedin}%%POPUPWINDOW{
label="Share on %NOP%LinkedIn"
url="http://www.linkedin.com/shareArticle?mini=true&url=%URL%&title=%TITLE%&summary=%SUMMARY%&source=%SOURCE%"
}%%TMPL:END%

%TMPL:DEF{"profile"}%%ADDTOZONE{"script" text="<script type='text/javascript' src='http://www.linkedin.com/js/public-profile/widget-os.js'></script>"}%
<a class="linkedin-profileinsider-%TYPE%" href="http://www.linkedin.com/in/%URLENCODE{%USER%}%">%USER%</a>
%TMPL:END%


%META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Set" value="SkinTemplateView"}%

0 comments on commit b47a321

Please sign in to comment.