Thu Aug 23, 2007
Protecting Articles With Textpattern
As stated previously, I like to post to my blog while maintaining a certain level of privacy. This post serves as nothing more than a little teaser. I’ve spent a few late nights brainstorming, designing and finally implementing a few changes under the hood.
I’ve taken my simple hacks and turned them in to something much friendlier. Storing rules in the plugin code is all fine and dandy, but what happens to the rules if the plugin is ever updated? They are lost. Plain and simple. I wanted a way to persist the rules and I figured a slick admin interface would compliment it nicely.
This image shows the list of currently configured exclusion rules. All rules are tested when an article would be displayed to a user via a page or a feed. I did my best to keep the listing as readable and informative as possible.
Creating or editing a rule had to be very simple. I broke away from the traditional Textpattern edit forms and coalesced the edit form to follow the same concept presented on the list display. I opted for check boxes to idiot proof the interface, otherwise I would risk mistyping a category or not remembering a keyword.
I still have some more improvements that I would like to make to this. I’ve already made quite a few patches to 4.0.5 and I for see a few more in the immediate future. If I continue at the same pace I’m hacking the code, I may bundle all of my patches with the plugin and distribute it as an unofficial Textpattern version. I’m not sure what I would call it, or if I will go through the motions of creating a derivative OSS project. I wonder if the name Manfrepattern is taken. ;)
Comment
This looks really cool.
Could you integrate it as a plugin/extension by having it set everything by default to Hidden, and then applying the rules when the plugin/extension is active? And otherwise the articles just won’t show, so that they’re safer than not… — I dunno, but really nice work on what you’ve done on your install.
One of the main requirements I set for myself with this plugin was to allow it to work automatically with other article display plugins. Setting everything as hidden and then showing if the plugin is active would prevent it from working with existing plugins. Or it would require me to add additional conditional tags.
Although, it would be possible for me to add something to the admin interface that will change the status of all articles that match a rule. This would be a manual step done before upgrading or deactivating the pluign. The only real problem is that if you have articles that match the rules already hidden, they would be shown when toggling everything back to visible.
Commenting is closed for this article.







