Custom websites and blogs for photographers and professionals - Spilled Milk Designs
youtube facebook twitter rss googleplus linkedin
  • Tour
  • Sites
  • Pricing
  • News
  • Signup

Facebook and Showit | Revisited

By nphaskins On May 2, 2010 · 9 Comments · In Tutorials

Want to integrate Facebook even further into your Showit website?  Here we’ll explain how to add the “like” button, or a “like box” (previously known as fan page badge). Now keep in mind that the chances of Showit building these in are pretty high so don’t be surprised if this method is rendered obsolete at any time (at which point this post will be updated). The great thing about this method is that it can be done regardless if your hosting with Showit or not, and can be added to any +Site that you have published. All we’re doing is adding a piece of Javascript to the Custom HTML section of your Showit website (advanced section).

Add “like button” to Showit website.

1. Open Showit. Go to Site—->Settings—–>Advanced. Tick the box next to “Custom Header HTML.” Paste the following code in it’s entirety into the space provided. This will put a “like” button in the upper left hand corner of your website.  Towards the end of the code string you’ll see left:2px; top:2px; The px is the number of pixels from the edge of the screen. Chance left to right, and top to bottom to move it to the bottom-right of the screen.

<script type="text/javascript">
document.write('<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fspilledmilkdesigns.com&amp;layout=button_count&amp;show_faces=false&amp;width=70&amp;action=like&amp;colorscheme=light" scrolling="no" width="70" height="26" frameborder="0" allowTransparency="false" style="background:transparent; border:none; overflow:hidden; width:70; height:26px; position:fixed; padding:2px; left:2px; top:2px;"></iframe>');
</script>
<meta content="Spilled Milk's Website" property="og:title"><meta property="og:title" content="Spilled Milk's Website"/>
<meta property="og:site_name" content="SpilledMilkDesigns.com"/>
<meta property="og:image" content="http://www.spilledmilkdesigns.com/images/smd_50x50.png"/>

2. There are a few things you’ll need to change in the code above before you publish. First, change the URL spilledmilkdesigns.com to your own. The title, site_name, and image location all need to be changed as well. Those correspond to what you’ll see come across facebook after someone “likes” your site. Read more here.

3. After changing the information publish your site. If your hosting your own site you’ll need to go back and re-upload the index.html page.

4. There is one more thing you can add to the like button. Supposedly you can add another meta property tag called fb: admins, followed by your user ID. This then pops up the word “admin” magically next to your like button. Clicking on that takes you to a special Facebook setup with your og: image used as the profile image. You can then blast off a status update to the walls of the people who have liked your site. Pretty neat right? It would be cool if it worked though. We spent a good while messing with it to no avail.

Add “like box” to Showit website.


Todd from Showit gets most of the credit on this one. The problem with the facebook fan page badge was that there was no way to “hide” it, meaning it would always be visible. In 5 seconds (I’m pretty sure it was 4 seconds) he wrote out a piece of code that will automatically close the “like box.” Now this is very much a page hack so we take no responsibilities if you break your site. With that to say, I’ll mention again the likelihood of Showit releasing these features into the builder, rendering these methods obsolete. Proceed at your own risk (although if you follow the instructions it’s as easy as copy and paste).

1. Find your fan page id. To find this click on your fan page profile image, then look up in the URL for a set of numbers at the end of the address. Take note of that string of numbers, you’ll need it in the next step.

2. Open Showit. Go to Site—->Settings—–>Advanced. Tick the box next to “Custom Header HTML.” Paste the following code in it’s entirety into the space provided. This will put a like box in the lower right -hand corner of your website.


<script type="text/javascript">
function closeFB(){$("#fbclosebtn").hide();$("#fbframe").hide(300);}
function openFB(){$("#fbframe").show(300, function(){$("#fbclosebtn").show();});}
document.write('<iframe id="fbframe" src="http://www.facebook.com/plugins/likebox.php?id=137013621744&amp;width=292&amp;height=425&amp;stream=true&amp;header=false" scrolling="no" frameborder="0" allowTransparency="false" style="background:#ffffff; border:none; overflow:hidden; width:292px; height:425px; position:fixed; padding:2px; z-index:2000000001; right:0px; bottom:0px;"></iframe><div id="fbclosebtn" style="border:none; overflow:hidden; width:20px; height:20px; position:fixed; padding:2px; z-index:2000000002; right:0px; bottom:395px;"><a style="color:#888; text-decoration:none; font-weight:bold" href="javascript:closeFB();">X</a></div><div id="fbopenbtn" style="background:#ffffff; border:none; overflow:hidden; width:98px; height:30px; position:fixed; padding:2px; z-index:2000000000; right:0px; bottom:0px;"><a style="color:#000000; text-decoration:none; font-weight:bold" href="javascript:openFB();"><img src="http://sites.showitfast.com/10803/715/fb_likebox.jpg" border="0"/></a></div>');
</script>

3. In the 4th line of that code, where it says:

/likebox.php?id=137013621744 ...

the number needs to be changed to your fan page id that you grabbed from the 1st step.  Also, the last line of code…where it says img src=….that URL needs to be YOUR url to the fb_likebox.jpg image. Feel free to go the url http://sites.showitfast.com/10803/715/fb_likebox.jpg , save the image, upload into your Showit account, then replace the link in the very end of the code above.

4. Publish your site, and remember if your hosting on your own you’ll need to re-upload that index.html page. The like box is placed at the lower right but if you know HTML the box can be moved anywhere on the screen.

5. Visit our website for the likebox example. While you’re there it wouldn’t hurt to join our fan by clicking “like.”

Any questions sound off in the comments.

If you enjoyed this article, please consider sharing it!
PinterestFacebookTwitterRedditDelicious

9 Responses to Facebook and Showit | Revisited

  1. Russell Climie says:
    May 3, 2010 at 6:31 am

    Alright Nick, I usually can figure out the bugs with coding issues within a reasonable amount of time, but I can’t seem to get the “LIKE BOX” to show up on my site – http://www.tiberiusimages.com.

    I’ve followed your steps, re-uploaded the html info per your instructions, checked the source code on the page and still nothing has changed.

    Wondering what I missed.

    Any help is appreciated.

    Best,

    Russ

    Reply
    • Nick says:
      May 3, 2010 at 9:39 am

      Hey Russell!
      It looks like you’re missing all the quotation and apostrophes in the code. Check out this snip; http://screencast.com/t/YzEzMTgy Your site’s source is on the left, spilledmilkdesigns on the right. I would recommend downloading Notepad ++. It’s a free html text editor that keeps things like that intact.

      Awesome!

      Reply
  2. Russ Climie says:
    May 3, 2010 at 4:26 pm

    Nick -

    Thanks for the info, but I still can’t get it to work. I just shot off an email to ‘info [at] spilledmilkdesigns.com.

    Any help would be appreciated.

    Best,

    Russ

    Reply
  3. Regan Morgan says:
    May 6, 2010 at 5:17 pm

    Awesome Nick, you have done it again, I love this integration.

    When I cut and paste the code into text edit on Mac. Then made the changes and then tried to cut and paste the code into SIS the “&’ didn’t make the transfer for some reason with the rest of the code – strange??

    But thanks to your screencast above I could figure out what had happened. :-)

    Thanks again

    ps

    Love your new site

    Reply
    • Nick says:
      May 6, 2010 at 5:34 pm

      Thanks Regan!!!

      Reply
  4. S says:
    May 17, 2010 at 11:41 pm

    Way too confused by this! LOL. :)

    Reply
  5. Dan O'Hara says:
    May 25, 2010 at 1:50 pm

    Hey Nick, any way to adjust this code to have it start out in the closed position, rather than open?
    Dan

    Reply
  6. Yadira Laguerre says:
    September 2, 2010 at 12:09 pm

    For some reason the X is on top of the screen instead of in the box so it’s hard to see where to close it. I see on your site it’s within the box. What did I miss? Would actually LOVE a comment box instead like on Jasmine’s new page. Is there a tut for that?

    Reply
    • Nick says:
      September 3, 2010 at 8:45 am

      Hi Yadira! Yup there is a comments widget that’s in beta but Showit hasn’t released any documentation on it for the rest of us so we actually have no idea what to do with it for the time being.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Categories

    • Custom Builds (61)
    • Featured (2)
    • Freebies (7)
    • News (55)
    • Random (14)
    • Tutorials (31)
    • Uncategorized (1)
  • Archives

Looking for Showit design?

We no longer specialize in Showit web design, however still take on a very few select clients because we are masters of the platform. Connect with us to your right.

From Twitter

I posted a new photo to Facebook http://t.co/5fpHpIq9
2 weeks ago
follow spildmlkdesigns

Contact us

Most days we're here from 9 - 5, although sometimes we're just not here at all, but are really thinking about being here.

E: leads@spilledmilkdesigns.com

Newsletter Signup

  • © 2008 – 2011 Designs by Spilled Milk L.L.C.
Follow @spildmlkdesigns