I've added a ticket and a patch file to add an admin menu hotkey for a "normal" user (who can 'manage_self' but can't 'manage_users') to access their profile page.
The shortcut key is 'P', unless the user can 'manage_plugins' or 'manage_plugins_config' in which case the shortcut key is 'R' (to avoid conflict with the existing shortcut key for plugins of 'P').
It will be interesting to see what the response to this is. I also mentioned it on habari dev but so far only arthus has replied. He suggested a profile hotkey shortcut for all users, including admin. Perhaps this is a better way to go, and sticking to a consistent key ('R'? 'P' is taken...) no matter who the user...however I like the idea of using the key 'P' for a "normal" user who is never going to have admin privileges and will only ever be able to edit their own profile.
I've finished my second plugin, Notify All. I've left the owner as Habari Community as I built it from Comment Notifier.
I've released it at 0.9 because I've removed some functionality that wasn't logical.
Originally I had a plugin configuration option "send_help_email", and with this a "help_email" (address) configuration option. So the admin has the choice of whether a help email is sent to the existing users, and new users, to explain that they will receive email notifications, and they can turn this off in their profile page. However, this is only sent if the admin has allowed the user to have control over whether they receive email notifications.
It sounds good but there are logic problems. This is what happens:
So existing users get an email saying they can change the notification settings in their profile, but actually they can't.
This is also a problem if later the admin turns off users' control over email notifications, but it's worse in the situation above. I have to think about when, in the code, I should attempt to send the help emails for existing users (it's not really a problem for new users). Anyway, I'll probably save this for version 1.0 or 1.1.
The other functionality I want to add is setting whether to send HTML or plain text emails. Right now it's plain text, but to get the body of the post or comment in the email, I've had to use PHP's strip_tags to remove all HTML tags (probably only going to be in posts, but they certainly can turn up in comments too). I'll add this for version 1.0.
Where I am using this plugin there have been problems with the emails - they were turning up on the mail client with the headers and content all displayed in the email. This is using Microsoft Exchange Server. The culprit (maybe?) seems to be the headers I've added:
My initial work around was to remove these headers and send only the From header.
[Update: I can see what the problem is now. Each line of the email being sent from habari/PHP (including the headers) is being sent as having TWO line breaks (so a line of text, then an empty line). Explanation and solution (use PHP_EOL instead of \r\n to separate headers) at the bottom of this page.]
I've released it at 0.9 because I've removed some functionality that wasn't logical.
Originally I had a plugin configuration option "send_help_email", and with this a "help_email" (address) configuration option. So the admin has the choice of whether a help email is sent to the existing users, and new users, to explain that they will receive email notifications, and they can turn this off in their profile page. However, this is only sent if the admin has allowed the user to have control over whether they receive email notifications.
It sounds good but there are logic problems. This is what happens:
- Admin activates the plugin. On activation, all users can control whether they receive email notifications.
- Plugin sends help email to all existing users.
- Admin then immediately switches off users' control over email notifications.
So existing users get an email saying they can change the notification settings in their profile, but actually they can't.
This is also a problem if later the admin turns off users' control over email notifications, but it's worse in the situation above. I have to think about when, in the code, I should attempt to send the help emails for existing users (it's not really a problem for new users). Anyway, I'll probably save this for version 1.0 or 1.1.
The other functionality I want to add is setting whether to send HTML or plain text emails. Right now it's plain text, but to get the body of the post or comment in the email, I've had to use PHP's strip_tags to remove all HTML tags (probably only going to be in posts, but they certainly can turn up in comments too). I'll add this for version 1.0.
Where I am using this plugin there have been problems with the emails - they were turning up on the mail client with the headers and content all displayed in the email. This is using Microsoft Exchange Server. The culprit (maybe?) seems to be the headers I've added:
"MIME-Version" => "1.0" "Content-type" => "text/plain; charset=utf-8" "Content-Transfer-Encoding" => "8bit"
My initial work around was to remove these headers and send only the From header.
[Update: I can see what the problem is now. Each line of the email being sent from habari/PHP (including the headers) is being sent as having TWO line breaks (so a line of text, then an empty line). Explanation and solution (use PHP_EOL instead of \r\n to separate headers) at the bottom of this page.]
Finally finished my first habari plugin, bumping. Michael (twofish) helped me polish it. It was a slog at the start as I ended up following a habari request line by line through the core code. I read a lot of core code before I worked out what was going on. The whole hook/sink thing, which I hadn't really encountered too much before in my programming, took a little while to understand, although it is a fairly simple concept. The documentation didn't really make it seem simple.
Anyway, it certainly was very worthwhile going through the code, so I'm not complaining, and I've found developing with habari much easier with my second plugin.
Anyway, it certainly was very worthwhile going through the code, so I'm not complaining, and I've found developing with habari much easier with my second plugin.
I have been configuring vim to have the same functionality that a typical IDE has...so I never have to use anything except vim again. Also to be able to demonstrate the IDE-like functionality to anyone who rolls their eyes when I say I only want to use vim (oh if only habari had a vim plugin for writing posts!).
These are the ways I have updated vim:
- snipmate
- nerdtree
- exuberant ctags
- clever word completion
- phpdocumentor
- phpcodesniffer (sort of)
- pretty good colour layout for terminal
- php manuals
- CVS/svn commands
- even xdebug although it's whacky and i don't think i'd actually use it
I keep telling Michael what's wrong with, or missing in Habari and he responds with "well fix it". So here's a list of things I want to do:
The persistence of memory plugin allows you to stay logged in for one month. Why only one month? Want to improve it to make the time period a configuration option. Also, needs to be updated for 0.7.Non-admin users can't edit their own profile! WTF? This ticket.- An ACL bug allowing a non-admin user to restore another user's post. This ticket.
- The connections theme. It's broken for 0.7. Needs fixing. But what needs fixing RTTF man? The following:
- Using excepts, for some reason the theme thinks an anchor tag is the end of paragraph so it ends the excerpt immediately after the tag. Actually when I first looked at this I stupidly couldn't find where the problem was in the theme, so I thought it was a habari core bug and even created a ticket for it.
[Update: Um, no, it's habari core as far as I'm concerned. But is it actually a bug? Get on IRC and ask.] The theme's footer doesn't look right.I think this is how it was designed to look.
- Using excepts, for some reason the theme thinks an anchor tag is the end of paragraph so it ends the excerpt immediately after the tag. Actually when I first looked at this I stupidly couldn't find where the problem was in the theme, so I thought it was a habari core bug and even created a ticket for it.
- It would be nice to port the kubrick theme from wordpress, not sure I really want to do this though.
- A disqus plugin?
- Look at the unit testing setup for habari and write unit tests.
Bumping. If a post gets a comment, it is bumped to become the first post.Done. But in terms of the Habari community, what do I do with it now?Its permanent page is here and it's available from habari-extras.Write an "edit themes" plugin.Themes are configurable now, just have to find out what exactly is required by the "client".Notify people when a new comment or post is made - um, isn't that why you have an rss feed?. Yes, but the client wants an email notification system. Can't see this as being a popular plugin for habari, but worth doing anyway.Done. This is the Notify All plugin.- Preview of comments.
Login as "normal" user leaves you on the front page (or whatever page you're on) instead of redirecting you to admin.Have to checkout admindetour.- Plugin to keep the main page static, but to also randomly choose a main page to show from a given list. [Update: Checkout staticfront and perhaps branch it.]
Install sharedraft from extras.But I'd rather just set up a group to allow appropriate read access - which I have now done.- Now I want a plugin that tells me who has "subscribed" to my blog (accessing the feed)...but I don't want to use feedburner (as I need an account). But I can't see how this would be possible for people anonymously reading the feeds...only for people with accounts to my blog. Think more.