Skip to content
This repository
Browse code

fixed share buttons

  • Loading branch information...
commit 2d6dd8dd7c98e578b23f7e78ea13ddf87f47c6c1 1 parent 72c9acc
Jeffrey Warren authored August 22, 2012
8  html/sites/all/themes/plots/plots.css
@@ -27,7 +27,6 @@ a {
27 27
 /*
28 28
  * Suggested formats for editors
29 29
  */
30  
-.floatright { float:right;margin:10px; }
31 30
 .frame { 
32 31
 border: 5px solid #EEE;
33 32
 margin: 5px;
@@ -62,8 +61,8 @@ fieldset table, fieldset{
62 61
 	font-size:10px;
63 62
 }
64 63
 
65  
-.floatright { float:right; }
66 64
 .box { padding:6px 14px; border:1px solid #bbb; margin:10px; }
  65
+.floatright { float:right;padding: 10px; }
67 66
 
68 67
 .notification {
69 68
 	font-size:0.8em;
@@ -493,6 +492,10 @@ form .filefield-element input.form-submit {
493 492
 	float:left;
494 493
 	margin-right:6px;
495 494
 }
  495
+.fb-like {
  496
+	display:inline;
  497
+	padding-top:2px;
  498
+}
496 499
 
497 500
 #edit-tags-wrapper {
498 501
 	clear:left;
@@ -1132,4 +1135,3 @@ a:hover.button {
1132 1135
         background:#35b;
1133 1136
         color:#ccc;
1134 1137
 }
1135  
-
5  html/sites/all/themes/plots/templates/node.tpl.php
@@ -129,10 +129,11 @@
129 129
 
130 130
 <?php if (($node->type == "tool" || $node->type == "place" || $node->type == "note" || $node->type == "page") && $node->nid != "356") { ?>
131 131
   <div id="share">
132  
-	<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>  
133  
-	<a href="http://twitter.com/share?text=Public Laboratory: <?php print $title; ?>"><img src="/img/twitter.png" /></a>
134 132
 	<g:plusone></g:plusone>
135 133
 	<script src="https://apis.google.com/js/plusone.js"></script>
  134
+	<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
  135
+	<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  136
+	<div class="fb-like" data-send="false" data-layout="button_count" data-width="50" data-show-faces="false" style="vertical-align:top;zoom:1;*display:inline"></div>
136 137
   </div>
137 138
 <?php } ?>
138 139
 
8  html/sites/all/themes/plots/templates/page.tpl.php
@@ -131,6 +131,14 @@
131 131
 
132 132
 </head>
133 133
 <body class="<?php print $classes; ?>">
  134
+<div id="fb-root"></div>
  135
+<script>(function(d, s, id) {
  136
+  var js, fjs = d.getElementsByTagName(s)[0];
  137
+  if (d.getElementById(id)) return;
  138
+  js = d.createElement(s); js.id = id;
  139
+  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  140
+  fjs.parentNode.insertBefore(js, fjs);
  141
+}(document, 'script', 'facebook-jssdk'));</script>
134 142
 
135 143
   <div style="border:2px solid red;background:#fcc;padding:10px;" id="iewarning"><p><h2>Incompatible browser</h2>
136 144
 The Public Laboratory website is designed for use in any browser except Internet Explorer. To view it properly, please use <a href="http://firefox.com">Firefox</a>, <a href="http://google.com/chrome">Chrome</a>, or another standards-compliant browser. Support for Internet Explorer is planned, but it's a good idea for you to get another browser anyways -- IE poses a security risk for your computer.</p></div>

0 notes on commit 2d6dd8d

Please sign in to comment.
Something went wrong with that request. Please try again.