12.07.05
My second plugin!
Gregarius is coming along nicely! They have just created a nice setup for plugins to save user options on the database, and this prompted me to write my second plugin. It’s called Auto highlighter, and what it does is that you select a keyword, and a color, and it highlights that keyword anywhere in the feed items it appears. It was one of the plugins on the todo list, not sure whose idea it was originally, but it wasn’t mine. It might have originated here. You can find it through the plugins page, or directly here. It looks great. Let me know what additions you would like to see in it.
By the way, if you are an expert regexp user, then you can put a regexp instead of a keyword. If you are not an expert regexp user, I recommend you become one.
Edited to add: The second version of the plugin is now ready, and it’s bigger, better, not faster, but more! It now allows you a variable number of keywords, with different colors each, and it hosts a very sexy config screen, if I may say so myself (ok, sexy with my standards, don’t expect too much
). You can see its results on my gregarius installation, where the words apple, drm and mac are highlighted with three different colors. Let me know what you think, and as usual what other features you would like to see.
Edited again to add: Third version, slicker, using associative arrays to make everything easier for me. Unfortunately, it is not compatible with the previous version, so whatever custom keyword-color pairs you have there will be lost.
Later
Marco said,
December 7, 2005 at 11:12 pm
Works like a charm, congratulations!
It’d be nice if we could define more than one keyword-color pair…
Haris said,
December 8, 2005 at 6:52 am
Thanks Marco. Yes, this is my next plan. It would be easy to add a fixed number of pairs, but O want to allow a variable number of pairs, which is just a tad bit more difficult given my current knowledge. I thought I’d get it out there and see people’s interests first. Hopefully I’ll have that done soon…
Sameer said,
December 8, 2005 at 8:10 am
nice plugin!!. You could add a colour picker. or make it so that clicking a highlighted keyword will clear the highlight of that colour.
Marco said,
December 8, 2005 at 9:45 am
Haris, I’m looking forward for the next version of your plugin. Please feel free to contact me by email if you need help with the DHTML or the php logic!
Haris said,
December 8, 2005 at 11:52 pm
Marco, thanks for the offer, I might take you up on it at some point. Right now I’m still learning very basic stuff. Anyway, version 0.2 is here, with multiple keywords and colors. Enjoy!