2

WordPress Zen: Social Network Plugins

Posted March 13th, 2010 in WordPress and tagged , , , by Dennis

wp-social-300x237This is not so much a “How To” guide as much as it is a mild warning to the developers of Social Networking plugins for WordPress.

I run another WordPress powered website for Comics In Action, an improv comedy troupe I organize. So, I’ve played around with various Social Network plugins for the various networking websites like YouTube, MySpace (Ugh!) and Facebook.

Mostly, I’ve tried-out Social Links by Kareem Sultan and Social Links Sidebar by Commareus. Both have wide support for Social Network website, even sites I’ve never even heard of. A bonus if I ever find the need to use them. :)

The common issue I’ve run into with both plugins is their lack of foresight with how they integrate these websites with the user’s particular URL. In particular, they fail to integrate the length of the URL for  Facebook user-pages into their plugin. They get pretty long. Both plugins appear to crop the length of the URL to 55 characters. This is where most people using these plugins run into problems. If the URL is longer than 55 characters, then the URL gets trimmed and anybody passing by gets a “Unable to find page” error. Woops!

I was able to fix this through a LOT of trial and error. You’ll have to have access to your WordPress database, which you can gain through your hosting provider. Why? Well, if you’ve already installed the plugin, then the plugin’s database has already been created and the field length will have to be changed.

What do you look for? Well in the case of the Social Links Sidebar, you’ll have to edit the sociallinkssidebar.php file. Find the following function:

add_action('plugins_loaded','social_links_sidebar_wrapper');

Within the function, you’ll find the following MySQL statement:

user_info VARCHAR(55) NOT NULL,

change this to:

user_info VARCHAR(65) NOT NULL,

Of course, this needs to happen BEFORE you install the plugin. Just edit the PHP file with your favorite editor and you’re all done.

If (for heaven’s sake) you already activated the plugin, then you will have to deactivate it and remove the table through your hosting provider.

And this leads me to another complaint: If I deactivate your plugin, then take your stinkin’ table WITH YOU! Argh! Quit leaving that stuff behind! Seriously!

That is all for now. :)

2 Responses so far.

  1. NerdyKitty says:

    Doesn’t sound very user-friendly for “civilians” if you have to get into the database.

    • Dennis says:

      Once Social Links or the Social Links Plugin create their respective tables when activated, the URL entries will be cut-off at 55 characters. Plus, since neither plugin removes their table when de-activated, subsequent activations will retain the original properties. They won’t recreate their own table since it already exists. Thus, nothing changes.

      So, simply edit their PHP file to increase the length for the URL field. But, you have to do this BEFORE you install the plugin. Or else, you end up having to edit the database so that they’ll hold longer URL’s. It’s stupid. I know.

Leave a Reply