MGD King's Thoughts | Getting What's Inside My Head Out

FaceBook Like Extension for BlogeEngine.net

by MGD King March 29, 2011

The other day I was looking around the new BlogEngine.net Gallery and stumbled across a nifty little extension that adds a FaceBook “Like” button to all posts and posts’ pages. This type of extension has been a much sought after request in the BE community for a while so I had to take a look and see how it works.

Wow! I was totally impressed because this little extension does exactly what I wanted it to do, plus it has the added feature of adding a Tweet button as well!!! Easy to implement and works like a champ!

Being that the code is open source and the author said that “any changes accepted” I wanted to make some layout changes to the extension because I wasn’t happy with having to modify the CSS file(s) of BE. Yes, I could have just added the author’s code to the Global.css file as he suggests for installation but that would mean that every time I updated BE I would have to manually update that CSS file. Or I could have just added it to my theme’s CSS file, but not only would I have the same problem, but I have multiple themes and I didn’t want to update them all. Plus, I think my modifications make installation easier by just dropping the extension into the extensions folder.

The extension has three options for displaying your Like Button but because the author’s code was limiting what was being viewed I added an option to adjust the height of the extension. I also changed the alignment of the Tweet and Facebook buttons (they’re side-by-side) because they weren’t aligning properly for me (the Tweet button was lower than the Facebook button). I also left the author's credits intact in the extension because he did all of the hard work and he deserves the credit! Great job Gayan!

To install the extension place it in your App_Code\Extensions folder.

FacebookLike.zip (2.01 kb)

****UPDATE**** There's an issue that you should be aware of with how FaceBook parses information from posts. Read here for more details.

 

HP DesignJet 750c PLUS : How to replace belt????

by MGD King February 10, 2011

My good friend Billy posted an article sometime last year that he thought would be beneficial to anyone who has ever had to work on a HP DesignJet 750c PLUS, more specifically changing the belt. Sounds simple enough but go read on, this was a real engineering marvel feat! So thanks for sharing this info Billy! I’m posting it here! More...

Keywords: , , ,

Filed Under: Technology

New BlogEngine Theme - Red Fever

by MGD King January 31, 2011

I was tinkering around with a theme for BlogEngine and ported over the theme you're now seeing. It's a theme I created for a Simple Machines Forum and I've always liked it but the forum isn't used much and I thought that this blog could use a facelift anyway. So here it is! What do you think?

Keywords: ,

Filed Under: BlogEngine.net | Personal

Hyper-V and Dissolving HP Network Teamed NICs

by MGD King December 30, 2010

I have Windows Server 2008 R2 Datacenter installed on a HP DL-360 G5 box in a lab with the Hyper-V role installed and needed to dissolve my HP Network for an experiment. This turned into quite an ordeal as the team would not dissolve with the HP Network Configuration Utility and my frustration was reaching new heights! More...

Keywords: , , , , ,

Filed Under: Technology

Adding Facebook Link To DotNetBlogEngine

by MGD King November 16, 2010

With the popularity of Facebook reaching new heights everyday, I thought that it would be cool to have a “Share to Facebook” link at the bottom of all of my posts so if anyone ever wanted to share anything they could. I searched on the DotNetBlogEngine discussion boards and couldn’t find much to help me. However, there was one post that pointed me in the right direction, and now I’ve figured out how to add the link to all of my posts! Here’s all you have to do:

In your current theme folder, open the PostView.ascx file, and place the following code into <div class="bookmarks"> section:

<a rel="nofollow" href="http://www.facebook.com/sharer.php?u=<%=Server.UrlEncode(Post.AbsoluteLink.ToString()) %>" target="blank"><img src="<%=VirtualPathUtility.ToAbsolute("~/pics/")%>f_logo.png" alt="Share on Facebook" style="margin-right:3px" />Share on Facebook</a>

If you want to use a logo, just make sure it's named f_logo.png and you place it in your PICS folder. If you do not want to use a logo, remove the <img src="<%=VirtualPathUtility.ToAbsolute("~/pics/")%>f_logo.png" alt="Share on Facebook" style="margin-right:3px" /> line from the above text.

Save the file on your server or hosted platform and then go to your blog’s homepage. Now you will see the link at the bottom of posts that links individual posts to Facebook!

Keywords: , ,

Filed Under: BlogEngine.net

Who Is MGD King?

MGD KingA lot of people ask me what does MGD King mean? Well, it was a nickname given to me because I used to drink large quantities of Miller Genuine Draft. Someone mentioned to me that I was the King of MGD, and so it stuck.

I'm On Twitter!

Note: For Customization and Configuration, CheckOut Recent Tweets Documentation
 
 

Latest Comments

Comment RSS