A bit earlier in the month, I talked about the very first plugin I personally made for Habari, though I did need some help from the developers. However, that is not my only plugin now. Recently, I made another plugin for Habari, which I completed without any help from the developers. Today, I thought I would talk about that plugin, which is called Post Title.
As I stated in my post about my first plugin, I have noticed that Habari has quite a few different feeds for blogs hosted on the platform. However, all the feeds are labeled the same, which can result in people being confused about what they are subscribing to in their feed aggregators.
In order to solve my main problem, I thought about making a plugin to address the feeds for tags.
Although I was satisfied, I thought that some people might not be content subscribing to either the tag feeds or the main feed, or some people might actually want to manipulate the feed title of more than just the tag feed.
That is when I made the decision to make plugin to manipulate the feed titles of the feeds that feature the comments of each post, and created this new plugin, basing it off of the first one.
To give a demonstration, we will see how it works on this blog. Instead of a Detective Conan (Case Closed) feed though, we will be using one of my manga reviews for this plugin. Let us say that I want to follow the comments made to my review of Negima! Volume 37. As with the situation with tag feeds, out-of-the-box the comment feeds of Habari would look like the above image. While each item does say what post it originated, I am still not too certain what exactly I am subscribing to in a feed aggregator. I could be subscribing to the post I want or I could be subscribing to get every comment ever posted and approved to a blog, but I only want comments to one post. Even though a comment feed does have items listing what post they came from, it is still confusing as to whether one is subscribing to a post or all comments.
On the other hand, with this plugin running, things do make sense. When I look at the same feed, I clearly see what post I am subscribing to and even what comments that the feed should contain. This is how feeds should be, clear enough to know exactly what I am subscribing, instead of being led to believe that it is either of the two main feeds, which cover the recent comments and most recent posts. With a different name for the various feeds, nobody will get confused about what content they are subscribing to.
While the idea was nice though, I had a very hard time making this. I could have, and probably should have asked the developers, since using my first plugin as a basis did not really make things easier. Unlike tags, which had a variable assign to them, posts unfortunately did not, and it took an awful lot of looking around. That is how things are when one tries to solve their own problems. After a while, I found out that I had to ask for a slug, and not a post, which meant that the code was very different, since I had to use that slug to retrieve the post title. Another issue I had is that I could not use the same collection function that I used in my first plugin. This is because comment feeds have a function dedicated to them in Habari's Atom handler class, which also took a bit of digging around. Sometimes, I wish things were much simpler look up than this, but I was able to decipher it by referencing my original plugin. When all was said and done though, I was glad that I did get to learn something. Although making the plugin was more difficult than I originally thought, I did get to learn a bit about how the Atom handler worked.
Why did you make these separate plugins? Would it not make more sense to combine them? I have certainly thought about that, but I do not have everything I want. Back when I was implementing SQLite in my mobile apps, I knew that there was functionality that should have been combined into one option. However, I did not know exactly how to merge them easily. Here, however, I do not really see how things can be convenient by combining the two plugins right now, even though I do have some idea of how to combine them. The big problem with combining plugins is that not everyone wants the functionality of all the code that comprises the big one. For example, the Twitter plugin for Habari claims to retrieve tweets and share posts to Twitter, but I do not want to display a Twitter feed. I would just want to share posts to Twitter. While it may be possible, since I have not really tried the plugin, I do not see how I really get the choice in the matter. If I were to combine the two plugins I made, I want to allow the user to turn on and off what they want from the plugin. Another reason I do not think that I should combine them into one plugin is that I do not feel that it would be complete with the functionality of these two plugins alone. I want to be able to manipulate the titles of all the feeds, except for the main feed that displays the latest post. This third functionality will probably be easy though, because I am not looking to retrieve things like a post title or tag name, like I did with my first two plugins. Once I make a plugin with third feature I want, so I have copies of the code for all three, I will try to merge them into one. Even though it does make sense to combine them, the fact that I do not think such a merger would be complete, as well as the fact that I think users would want to turn on or off what they want, makes me want to wait on merging plugins.
To sum things up, this plugin was created to make a clear distinction between the comment feeds for posts and the comment feed for the entire blog. While it helped to base the code off of my first plugin, things were still quite difficult to figure out on my own. And even though this and my other plugin could be merged, it does not seem like it will be complete.
What are your thoughts on my Post Title plugin? Do you think it is a good idea? Do you think I should change my mind and combine my two plugins right now? Feel free to comment.
Update: I have already made a plugin with the third feature I wanted and combined them. I will probably talk about the main plugin in a future post.
Use an app on your on phone (e.g. Scan for Android) to capture the image above. If successful, you should be taken the web version of this article.