plugin mashup

And, no, I don’t mean the trendy kind of mashup that’s all the rage in 2.0. I’m talking about when plugins collide. Particularly plugins that run through the_content of a WP blog entry. I have two such at the moment: one that inserts smilies into the text such as this :-) and I have another that renders code within <code> elements as completely unprocessed elements. The two together give rather unfortunate results for:

<code>XML:: Parser::Lite::Tree:: XPath</code>

(notice the strategically placed spaces before Parser and XPath…) as something like:

XML:<img src=’http://www.digitalramble.com/wordpress/smilies/yahoo_tongue.gif’ alt=’&#58;&#80;’ class=’wp-smiley’ width=’18′ height=’18′ title=’&#58;&#80;’ />arser::Lite::Tree:<img src=’http://www.digitalramble.com/wordpress/smilies/yahoo_love.gif’ alt=’&#58;&#88;’ class=’wp-smiley’ width=’18′ height=’18′ title=’&#58;&#88;’ />Path

Ahem.

Now clearly, it isn’t always possible to avoid plugin collisions. Some are just inherently incompatible with one another. But I have to wonder about the notion of indiscriminately putting smilies in where one might not want them to appear, such as in code elements.

There are probably some alternatives. For example, I could use Simple Code to generate unrendered code samples that view properly. But the same reason that this plugin would not collide with the Smilies one is the reason I don’t care to use it: it provides an option under the Write admin panel to cut and paste the code in, and the protected result out. This means that when I’m writing up a post, I have to save it, go to the SimpleCode option, paste the code i want, copy the results, then go back to editing. If I navigate away and neglect to save, I’ll lose what I was writing. Given that I tend to go back and forth with snippets of code, and given that this is a technical blog with lots of code, that’s not convenient (although, I must say it came in handy for massaging the above example, which will go away otherwise when I fix this collision). However if the output from SimpleCode contains anything the Smilies might match, I’m still stuck with potential Smilies appearing even in this.

I could drop the Smilies plugin but just as I’m geeky enough to want the code feature, I’m geeky enough to want the Smilies in the right place.

Hmmm…I foresee some modifications to this plugin.

del.icio.us:plugin mashup  digg:plugin mashup

3 Comments »

  1. Brian Layman said,

    June 15, 2006 @ 11:05 am

    Cindy,

    I highly recommend the iG:Syntax Hiliter by Amit Gupta over at http://blog.igeek.info/wp-plugins/igsyntax-hiliter/ It’s worked very well for me and the newest version allowed me to pull out all of my hacks to it.

    Hopefully it will work well with your smilie plugin (which one do you use btw - I don’t like the smilies that come by default with mine (More Smilies 2.0 by Matt Read of mattread.com ) and I am too lazy to actually build a good custom smilie group for it ).

    Also, Congratulations!

    You’re the winner of the “First Blog I Wander Into That Has Me in Their Blogroll” unannounced contest! Is your paypal account linked to your address at the bottom of the page? I’ll send you the price of a large Mocha Voltaire from our local Arabica Coffee house. Their quite good! ;)

  2. Cindy said,

    June 15, 2006 @ 2:25 pm

    I’ve been looking over Gupta’s plugin, thanks for the heads up. It looks very nice. One thing I realize about these type of plugins is that once you start using them you’re dependent on them — deactivation can seriously break pages that had lots of html and other items normally processed even under the code tab :-O Arrrrgh.

    The smiley plugin I use is Pryadi’s Yahoo/MSN Style Smileys. While I do like it and I’m a big Yahoo smilies fan, I find it’s kind of “big” for my tastes — I don’t need the MSN stuff, and I don’t use the java part of the implementation. I’m starting to become a big fan of the mean’n'lean plugin (!) Anyway, I did successfully modify this to exclude processing of material inside of <code> elements, so I’m reasonably happy now.

    And now I’m curious! How did you happen on my blog if you didn’t know I was linking to it? (And by the way, you are a horrible, horrible, horrible person for posting those puzzles on your blog. Evil. Terrible. Wait! If I do this first and then that…) I found your blog when looking for info on my cellphone and happened across your bag’o'tricks.

    You don’t have to send me anything, but I do love a good coffee so yes, my paypal info is linked to my email address. Thanks!

    Cheers,
    –Cindy

  3. Brian Layman said,

    June 16, 2006 @ 9:09 am

    OK - You\’re all hooked up!
    http://www.thecodecave.com/article175

    Good that you got your code stuff working for you. Yeah, I\’m locked into using those custom tags, but as I only quote a limited number of languages on my blog, it would pretty easy to write a non-highlighting replacement for them if the GESHI stuff ever became incompatible with a future WP release.

    One of the big things that I liked about that plugin is that it followed WP1.5->2.0 progression of using brackets [] for WP specific tags rather than putting it in <> symbols and bucking the HTML standard. Yes, code is part of the standard, but there are a lot of plugins that add stuff to it that isn\’t (for instance .

    Oh! and to answer your question, I wandered in through Technorati... That might be bending the contest\'s non-existing rules a bit, but I didn\'t find you through my AWStats access logs. So, you still got the prize. ;)

    Cheers!

RSS feed for comments on this post · TrackBack URI

Leave a Comment

Bad Behavior has blocked 521 access attempts in the last 7 days.