Community Page
- www.wp-fun.co.uk Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Hi there Andrew. your "Fun with Categories" plugin is certainly a very useful plugin. But I am having a little bit of trouble and was wondering if there is any example templates out...
- Great post! I've bookmarked your blog. Hope we can swap links. Why can't I open your rss feed? No post is showing. Best Regards! Ginj
- Can you paste the entire error in?
- I'm getting the Parse error: syntax error, unexpected T_STRING, expecting '(' in error too.
- Atompub is really available or not? But i think this project will be more useful for the normal people to understand..Always Google rocks and leave their marks in every field..
Jump to original thread »
As this is a WordPress blog I’m not in the business of evanglising Habari, however much it may interest me. I do however want to make it easy for everyone to try it. Most WordPress users will find that it doesn’t yet meet their needs but every WordPress developer should get
... Continue reading »
10 months ago
10 months ago
You are quite right about Habari's documentation on writing plugins being a little thin right now, but there is an introduction to writing plugins on Habari's wiki, as well as a list of Habari's plugin hooks that makes the job of finding what to hook into to accomplish a task easier.
10 months ago
And of course, you're invited to help us generate that documentation! Your introduction here demonstrates a terrific understanding of what new plugin authors need to gain proficiency.
10 months ago
Actaully that is not true. You can name the folder anything you want and the plugin file [anything].plugin.php. So you do not need to make them match.
And this is a great post! Thanks for doing it. And nice idea about the plugin wizard (can you make it use tabs instead of spaces ;) ).
10 months ago
I'm looking forward to the plugin info for adding to the admin pages - thinking about creating a theme/plugin editor for the admin.
10 months ago
@Rick, Thanks for linking to those pages. I have been using those and really should have linked to them in the article.
@Skippy, so far I haven't done anything that isn't documented but once I do I will certainly look to add to the documentation.
@Matt, thanks for the clarification. The documentation suggests that it is required although it doesn't state it outright. Consider the tabs done as of the next update.
@Mike, I am looking forward to the admin pages bit a lot as I think there are UI helper classes, which means I won't have to write any.
10 months ago
Yup. FormUI takes care of the GUI and whatnot for the plugins configuration. In fact, even the admin pages (the publish page for example) use this class to construct and handle their GUI. It's pretty cool.
Thanks for the enjoyable article and the detailed comparison. It sure sheds some light on how robust and easy the plugin system in Habari is. And great job on the plugin generation tool, that's neat!
We sure could use your help to make the documentation better. I agree with skippy that you show a great deal of understanding on what potential plugin authors might need.
You can always stop by at #habari on freenode if you need anything.
10 months ago
I have only a couple of minor thoughts to add to your excellent post.
Habari also allows you to manually register functions/methods as plugin sinks using the Plugins::register() method. This could be useful for when you want to do only one of multiple things based on a configuration option, and register only the correct function. Of course, you could just as easily do this with a switch() within the automatically registered function.
The filter_post_content_out() function is interesting in that it affects the output of $post->content_out. $post->content contains the actual post body content. Adding the "_out" suffix allows it to be modified by that specific filter.
Using this mechanism, you can create multiple suffixes that filter in different ways. You could, for example, output $post->content_summary and then code a plugin function filter_post_content_suffix() to alter just that output. If a filter for a suffix doesn't exist, it just outputs the full content, so nothing breaks. This can be useful for outputting post archive listings specially for just the archive pages, or on any page.
This bit of functionality is probably not documented well because we're (at least I am) expecting it to change slightly to improve filtering and output support, but that's how and why things are named as they are.
I'm looking forward to part 2!
10 months ago
I must admit to jumping into the plugin writing before reading all the getting started stuff. Having read into it more I am starting to understand how the filters work. It makes it very easy to look at the template and filter what you want.
Is there a trac ticket somewhere that explains how it might change?
10 months ago