Updated Facebook Comments TNG

We use the Facebook Comments TNG wordpress plugin here to keep comments on Facebook coming into the Blog.  If you’ve ever noticed a comment you’ve made on one of my notes in Facebook that showed up here… this is how we do it.

Anyway, a short time ago Facebook changed their website layout and as a result the Facebook Comments TNG plugin was broken.  Unfortunately the developer has not had time to update it to match the new Facebook layout, but as it’s breaking some functionality I depend upon (here and elsewhere)  I did a little digging to see if I could fix it.

WARNING

I’m fairly certain this plugin breaks the ToS with Facebook so if you’re not comfortable with that, Don’t use it!

The results are less than spectacular, but it seems to work (mostly) with the following caveats:

  • It requires you to enter a profile ID in the options window
  • It is limited to only examining the most recent 10 posts (regardless of your setting)
  • It may or may not handle multiple pages of comments (untested)
  • Somehow the copy I started with was an older version, so some of the newer features are unavailable

NOTE: I do not warranty anything this plugin will do and I will NOT be keeping this up to date.  I’m simply providing a temporary location for the fixes I implemented.

If you’re good with that list and can’t wait for an official update, feel free to download my version (in TEXT form).

If the list is too much for you, feel free to wait for an official version here.

Dynamic Categories

I determined a while ago that I wanted to reduce the clutter on my blog and eliminate most of what’s normally displayed on the front page of any blogs. However I didn’t want to lose any functionality and wanted to always have the ability to add links and categories and have lists of them that were generated dynamically somewhere. I figured that adding a page for each makes a lot of sense so I wrote a dynamic content wordpress plugin. At the moment it has 3 hard coded keyword tokens that it replaces with corresponding content. However the next release will allow you to specify a keyword token and what widget to insert in its place.

WordPress 2.3

wplogoWordPress 2.3 has been out for a while but I’ve been hesitant to upgrade. I finally decided it was time. RandyAldrich.net was running on 2.1.2 until now and I thought the upgrade might not go as smoothly as it should. As with any upgrade I did a database backup and instead of overwriting the install directory I created a new one (randyaldrich.upgrade). Once I was satisfied that I had all configuration, plug-ins, themes and uploads transferred to the new directory I simply deactivated all my plug-ins, switched the directory names and ran the upgrade script. It went perfectly smooth. So smooth that I also upgraded R & R today.

Along with the upgrade I always do some general house cleaning. Remove any plugins no longer used, upgrade any plug-ins which have upgrades available. I like to embed videos with my posts now and then and WordPress does not make this easy. Because of this I have been using Viper’s Video Quicktags for quite some time now and recently realized I was 2 versions behind. The new versions provide some nice enhancements and fixes to issues I have been noticing.

All in all. A good upgrade. I highly recommend it.

WordPress 2.2

I’ve taken the plunge.  For one its speedy.  Secondly it includes the widgets plug-in which is nice (although I was already using it).  The biggest difference I can see is the speed improvement.  However this was the first opportunity I had to test my new DEV server procedure.  I’ve had WordPress 2.2 on http://dev.aldrichfamily.org since about 5 minutes after it was released.  I’ve played around a little bit, made sure all the plug-ins I want to use still work.  After I was sure I had a database backup of the current install (via the daily scheduled backups now) I decided it was time to take the plunge.  Probably the easiest upgrade thus far.

Widget Trouble

I had some trouble finding examples on how to Widgetize your WordPress Theme. I found plenty of links but all were dead. I figured I’d mirror a how-to guide here to make it easier for people to find out how to make their Theme work with WordPress widgets.

First of all you’ll want to put some code in your sidebar.php file to have a default sidebar as well as a dynamic sidebar when available. to do this use something like the following:

<ul id="sidebar">
    <?php if ( !function_exists('dynamic_sidebar')|| !dynamic_sidebar() ) : ?>
    <li id="about">
        <h2>About</h2>
        <p>This is my blog.</p>
    </li>
    <li id="links">
        <h2>Links</h2>
        <ul>
            <li><a href="http://example.com">Example</a></li>
        </ul>
    </li>
    <?php endif; ?>
</ul>

This will enable your site to use a dynamically generated sidebar. Next we need the ability to implement a dynamic sidebar. To do this simply add the following to your functions.php file:

<?php
if ( function_exists('register_sidebar') )
    register_sidebar();
?>

Provided you have the Widgets plug-in installed and activated, you should now see a ‘Sidebar Widgets’ section under Presentation in the Admin section of your site.

I am not the original author of this tutorial nor am I a contributor in any way to the Widgets plug-in. If you have questions about the plug-in itself, or this method is not working please contact the author or see the plugin website.