Widgetize Anything
OMIGHOD!!
As I pointed out in my last post, I love the power of Wordpress and its plugin architecture. That being said, the theme I am using for the blog is Semiologic. It uses function calls to make the chore of customization almost painless (i.e., my new header), it also entirely uses Wordpress widgets to customize the sidebars.
In any other WP themes, in order to customize the sidebars or insert a call to a standard plugin, you would go into the file sidebar.php and insert the code (php, html, etc.) at the point where you want it to show up. With widgets, an author can "widgetize" their plugins; download a WP widget, install it, then in the Widget admin, drag-and-drop the widget where you want it to show up.
Semiologic, on the other hand, is entirely based on widgets. If you need to customize the sidebar.php file, if you have a plugin you want to use and it has no widget, you have to write a custom.php file and drop that in the Skins folder for the current appearance or "skin" that you are using. I surmise if you change skins, you have to have this custom file in every skin you wish to use. This is not simple anymore.
Making a plugin use a widget is a big magilla as well. I don't know PHP and there is lots of code involved. I jus' wanna add the DVDs I am watching to the sidebar, is that so wrong?
In a Google search for "widgetize" I came across Widgetize Anything. Plugin authors want you to use plugins so the install instructions for all plugins (unless they reference the main page) tell you how to add a call to the plugin in sidebar.php. Widgetize Anything allows you to build any number of custom widgets simply by using the code provided by the plugin author. You name the widget's header, then paste the code into the text field. If you do it right, the plugin should appear in the side bar.
Some instructions from Eric's blog:
It’s important to understand that the code that you put into your widget must be valid PHP code. You may not open or close PHP blocks with “< ?php" or "?>“, nor can you place straight HTML code into the widget content. You have to echo out all the HTML code that you want to show up on your page.
I just added the Now Watching plugin to WP. This allows you to put a list of DVDs (I also use it for satellite TV stuff) from Amazon in the sidebar. Without the widgetizer, I would have gone from Wordpress back to my Movable Type blog, but here, it is a piece of cake. Just take Azrael's code:
< ?php nr_get_movie(); ?>
Remove the PHP terminators so you have this:
nr_get_movie();
And paste it into a Widgetize Anything widget. Once you have done that, drag to the sidebar, and you are done.
I am going to see if I can get any other plugins requiring widgetizing. If I do I will comment here instead of making a new entry.










Leave a reply