How to add Facebook – Twitter – Google+ social icons to MySource Matrix

The following code can be used to dynamically create Facebook, Twitter and Google+ social icons in the MySource Matrix content management system.

The code can be added to your template or added to a page (as raw HTML) and then added in as a nested page when needed.

The code outputs this:


<!-- Google Plus Javascript -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);

<!-- CSS -->
 <style type="text/css">
.social-links { float: right; margin-right: -30px; }
.fb { float: left; margin-right : 10px; }
.googplus { float: left; }
.googplus > div { display: inline !important;}
.tweet { float: left; width: 95px; }
div[id*="content"] {clear: both;}
<div class="social-links">
 <div class="fb">
 <script src=""></script>
 <script type="text/javascript">
 document.write('<fb:like layout="button_count" show_faces="false" width="100"></fb:like>')
 <div class="tweet">
 <a title="Tweet this page" href="" class="twitter-share-button" data-count="horizontal"></a><script type="text/javascript" src=""></script></div>
<div class="googplus">
 <g:plusone size="medium"></g:plusone></div>