What does Filosofo Enroll Comments do?
Filosofo Enroll Comments is a WordPress plugin that allows users to:
- Enroll to receive an email when someone comments on a post.
- Manage their subscriptions using the admin control panel.
Aren’t there other plugins that do that?
Yes, the classic comments subscription plugin is Subscribe to Comments. Started back in WordPress 1.2 days, its authors had to overcome a lot of limitations in WordPress itself. Unfortunately, that meant altered table structures, fancy stand-alone user subscription systems, and files placed outside the plugins directory.
When it comes to plugins, I don’t like having to put files outside the plugins directory; that’s because I’m forgetful and come upgrade time, I’ll end up deleting them and messing everything up. So one goal for this plugin was to keep it to one simple file that could be uploaded into the plugins directory, activated, and forgotten about.
Another goal of mine was to take advantage of the user roles that appeared in WordPress 2. What is the role of “subscriber” good for if not subscribing?
Finally, I wanted to use the built-in nifty “Ajax” delete feature you’re familiar with from WordPress 2+ comments editing. “Unsubscribe” from a post under “Comment Subscriptions,” and the post disappears without re-loading the page. Cool, huh?
Will it work on my blog?
This plugin is designed for WordPress 2.0 and newer. Note that it’s beta, so while it works on my test blogs, if you need “mission-critical” comment subscriptions then use Subscribe to Comments.
Is this plugin a security risk because it allows anybody to login to WordPress?
By default and in the latest version of WordPress, no. When first activated, the plugin sets the “New User Default Role” (under Options > General in the admin control panel) to “subscriber,” which allows new users to log in and not much else. If an administrator chooses to change the “New User Default Role” to something higher, then new enrollees will have that level of permission.
Note: there is a security bug in WordPress versions prior to 2.0.4 that can allow any users that can log in—whether they’re subscribers or whether you have activated any plugins at all—to hack into your site. You should upgrade WordPress to at least 2.0.4 to avoid this potential problem, even if you’re not using this plugin.
Why doesn’t the checkbox show up in the comments form?
WordPress themes should have
<?php do_action('comment_form', $post->ID); ?>
tag. If you don’t have that line in your template, usually in the comments.php file, add it.
Where do I download it?
Filosofo Enroll Comments 0.5.7 | October 22, 2006
Installation Instructions
- Download one of the files above and extract it. Then upload the
file directly into your WordPress plugins directory (usually
filosofo-enroll-comments.php
/wp-content/plugins/
), and activate it under Plugins in the admin control panel. That’s it. - You can manage your subscriptions (and others’ if you have sufficient permission) under Users > Comment Subscriptions.
Notes
- This plugin makes comment subscribers into registered users. That way users can log in to WordPress, if they so desire, and edit their comment subscriptions.
- If you are the author of the post, or WordPress recognizes you as someone who has already subscribed to a certain post, then in place of a check box will appear the words “Manage your subscriptions.”
- When first activated, this plugin sets the default role for new users to “subscriber.” Actually, that’s the default setting for WordPress out of the box, but just in case you’ve changed it (under Options > General), the plugin sets it back to a role that has almost no abilities. That’s because when users subscribe to comments, they get assigned the default role; and most of us don’t want just anybody becoming, say, an “Editor.”
- This plugin assumes your theme has the “comment_form” action hook somewhere in the comment form. Odds are that it does; if you see the check box near the comments form then everything is working as expected.
- You can adjust most of the settings you’d want to change in the first few lines of the plugin. For most English speakers, the current settings will be just fine by default.
Using the plugin in your templates
To test whether a given user has subscribed to a given post, call
boolean
filosofo_ec_user_is_enrolled( [user id] [, post id] );
In other words, filosofo_ec_user_is_enrolled(2,314)
will return TRUE if the user with id # 2 has subscribed to the post with id # 314.
Both arguments are optional, defaulting to the currently logged in user and the current post, if applicable.
So filosofo_ec_user_is_enrolled()
will return TRUE if the currently logged in user has subscribed to this post.
filosofo_ec_user_is_enrolled('',314)
will return TRUE if the currently logged in user has subscribed to post # 314.
filosofo_ec_user_is_enrolled(3)
will return TRUE if user #3 has subscribed to this post.
If you run into any problems or have comments or suggestions, please leave a comment below or email me at if.website (located at) gmail (dot) com .
See some of the other WordPress plugins I’ve created.
Like this plugin? Is it worth a latte?
This month I have received $31.50 in donations for the free plugins I offer here, which is about $0.01 per download.