SOCIAL NETWORK easy to apply Share Links with Counters...

  • 1
  • Idea
  • Updated 8 years ago
Getting your site linked to is the best way to get noticed by search engines.

The code below allows you to let your users link back to your site through Twitter, Facebook and Googles Buzz.

I wrote the code below for a new site of mine and I like it so much that I thought I would share it with the Yola community. It's simple but very effective.

Just copy and paste this into a html widget (or a text widget using the html button)

<!--

<div style="float: left; margin: 10px 10px 10px 10px; padding: 20px 0 20px 20px; background-color: #EEEEEE;">
<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">S... src="http://static.ak.fbcdn.net/connect.ph..." type="text/javascript"></script>
<br /><br />
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.j...>
<br /><br />
<a title="Post on Google Buzz" class="google-buzz-button" expr:href='"http://www.google.com/buzz/post?url=&...; + data:post.url' data-button-style="small-count"></a>
<script type="text/javascript" src="http://www.google.com/buzz/api/button...>

-->

NOTES:

You could change the first line to | float: right; | and change the # colour code at the end.

I would leave the padding but the margin could be changed to fit your site.
(10px 10px 10px 10px) = (top, right, bottom, left).

It's better to include a float (left or right) if you remove it you may need to add a width etc.

-------------------------
Enjoy - Lee.
http://hexham.info
-------------------------
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes

Posted 8 years ago

  • 1
Photo of Margie

Margie

  • 286 Posts
  • 25 Reply Likes
Thanks, Lee, for sharing. I'll give this a try.

Is there a way to leave off the counter or even hide it? Or, maybe there's an advantage to having the counter and I don't know it.
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
The share links come from here >
Twitter : http://twitter.com/goodies/tweetbutton
Facebook : http://www.facebook.com/share/
Buzz : http://www.google.com/buzz/api/admin/...

You can edit and create there.

It's just aligning the little buggers which is the problem :)
Photo of Margie

Margie

  • 286 Posts
  • 25 Reply Likes
Thanks again, Lee.

Do you know your code uses the count for Twitter and Google Buzz, but not Facebook?
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
It does but it needs a click to start it off.