Buttonsnap Hack

During the upgrade to WordPress version 2.5 I got a "Fatal Error" while trying to activate a plugin. My first thought was that the plugin was not compatible with the new version, so I went to the plugin's page to look for an updated version Subscribe2. But it was compatible. Others had posted comments about problems they were having with various other plugins conflicting with it causing the Fatal Error. Which ever one was activated first, the other would give the Fatal Error.

What the plugins have in common is that they use buttonsnap. Some had decided to choose between the plugins as to which one they used. But not being content with having to choose, I investigated a bit. Unforunately, I am still a bit of an OOP newbie, and I still do not know exactly what the Fatal Error is, what is causing it, or how. I tried to follow the logic of WordPress plugin activation but got lost in the code. In any case, I did determine that it does indeed have something to do with the plugins using buttonsnap.

A search of the WordPress Plugin directory for "buttonsnap" gives these plugins as a result, but I'm sure other plugins also use buttonsnap. eg. Digital Fingerprint

  • JAlbum
  • WP Contact Form
  • Skype Online Status
  • Kimili Flash Embed
  • Viper's Video Quicktags
  • Subscribe2

Although I would prefer to have a single buttonsnap.php file instead of redundant copies of it, my "fix" was to hack the second copy. I replaced all references to "buttonsnap" to "buttonsnap2" in the second plugin's PHP file and in it's copy of buttonsnap (renamed to buttonsnap2.php). *Note* perhaps it would be better to use plugin intials instead of numbers, eg. buttonsnap_ja, buttonsnap_cf, buttonsnap_s2, etc.

Technorati Tags: ,

Post a Comment

Your email is never shared. Required fields are marked *

*
*