Talk:Facebook, Twitter, Google+ buttons in MediaWiki

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

The given code does not work well. Prefer this one. It presents the 3 buttons in a 3 column-table:

				<table width="130%" align="center"><tr>
					<td width="30%"><iframe src="http://www.facebook.com/plugins/share_button.php?href=<?php echo urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>&send=true&action=share_button&mobile_iframe=false&layout=button_count&size=small"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowTransparency="true"></iframe></td>
					<td width="30%"><a rel="nofollow" href="http://twitter.com/share?url=<?php echo urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></td>
					<td width="30%"><g:plusone size="medium" href="<?php echo ('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>"></g:plusone><script type="text/javascript">(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();</script></td>
					</tr></table>