Forums

Word Press Email Notification Plugin (20 posts)

  1. briangroce
    Member
    Posted 5 years ago #

    I have taken Jon Anhold’s Email Notification Hack and updated it for use with Word Press 1.2 as a plugin.
    This plugin allows people to signup to be notified when a new entry is posted to your blog and once they’re confirmed it sends them an email whenever a new entry is posted to your blog. It also allows them to unsubscribe if they wish.
    If you have any questions, corrections, or suggestions let me know.
    http://www.briangroce.com/archives/2004/06/word-press-email-notification-plugin/
    Brian

  2. pezastic
    Member
    Posted 5 years ago #

    What I would like is an email notification of when a post is added to a thread (or threads) of my choosing on this forum board. I'm tired of having to use a feed reader. But, that's a different issue.
    Here's my request... is there any way to make that plugin category-specific? I mean, have notices sent to subscribers when entries from a certain category (or categories) are made, instead of all entries?

  3. briangroce
    Member
    Posted 5 years ago #

    The T_String error has been fixed.
    You can download the updated code at: http://www.briangroce.com/archives/2004/06/word-press-email-notification-plugin/
    As for the comment notification, check out:
    http://www.scriptygoddess.com/archives/2004/06/03/wp-subscribe-to-comments/

  4. dodo
    Member
    Posted 5 years ago #

    hello is there a hack that notifies all members of a blog when a new post is posted?

  5. briangroce
    Member
    Posted 5 years ago #

    Dodo,
    I made some tweaks to do what you're wanting to do.
    The plugin can be downloaded at:
    http://www.briangroce.com/archives/2004/06/word-press-members-email-notification-plugin/

  6. TechGnome
    Moderator
    Posted 5 years ago #

    Hmmm, these sound interesting, I may have to give them a try one of these days.
    TG

  7. skatrek
    Member
    Posted 5 years ago #

    Hi
    I love the idea of this plugin... but on my server, I have to specify a MySQL host... it's not just "localhost" but there's no place to do that in the maillist/index.php file. I tried it anyway, but it fails with "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"
    Thanks,
    Chris

  8. briangroce
    Member
    Posted 5 years ago #

    Chris,
    Try replacing:
    $dbh = mysql_connect("localhost", "$dbuser", "$dbpass");
    mysql_select_db("$db", $dbh);

    With:
    $dbh=mysql_connect ("<HOST>", "<USER>", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("<DATABASE>");

    And then create variables if you like.
    Brian

  9. kgoeller
    Member
    Posted 5 years ago #

    I've gotten the plugin installed and it looks fine BUT there's a glitch. When I tried to subscribe myself, I receive an email with a verification URL in it. That URL is generating a "404 - File Not Found" error on the server.
    The URL being generated is:
    http://webct.bucks.edu/dl/wp/maillist/conf/1,a6adf23363329e7fe27741d6209bd94b
    This looks correct, as far as the wp/maillist directory. There is no conf directory under maillist (and no directions to create one in the readme file for the plugin), so I'm not quite sure where to go from here in debugging this one.
    Any help??
    Karen

  10. kgoeller
    Member
    Posted 5 years ago #

    Pezastic,
    In the readme file, it gives a set of code that you need to put on the page where you'd like people to subscribe. You can create a separate page, or just put the tiny little form on the sidebar menu of the blog (which is what I did).
    Then, users choose to sign up by entering their email address in the form and clicking "sign up." They are sent a confirming email containing a link (see my earlier message), and when they click that link it confirms that their email is valid. At that point, they are subscribed.
    I'll be shortly posting the changes I had to make to the code to get that confirmation link to work, though, so stay tuned -- they weren't huge, but I could NOT get the confirmation to run without it.
    Hope this helps!

  11. briangroce
    Member
    Posted 5 years ago #

    Karen,
    The plugin uses rewrite rules instead of passing the variables as http://webct.bucks.edu/dl/wp/maillist/conf/1,a6adf2336332
    In other words, there is no "conf" directory because it's merely a variable that's being passed.
    So if you don't have the rewrite rules in place in an .htaccess file, it won't work...
    But you can always go ahead and do what you did it. Same concept, just another way it can be done.
    Brian

  12. briangroce
    Member
    Posted 5 years ago #

    Pezastic,
    The code is/has been at the bottom of the readme file...
    <form method="post" action="http://yoursite.com/maillist/index.php">

    Enter your e-mail address to receive notifications when there are new posts

    <input type="text" name="email" size="12" />
    <input type="submit" name="submit" value="sign up" />
    </form>

    Brian

  13. briangroce
    Member
    Posted 5 years ago #

    Pezastic,
    I tried out your form and it worked, but...
    You need to make some changes to the link it sends for confirmation.
    The link it sent me looked like: http://www.bbiverson.com/journal/maillist/index.php?action=conf&id=3&md=715ea1b87e03210...
    It needs to be like: http://www.bbiverson.com/maillist/index.php?action=conf&id=3&md=715ea1b87e03210...
    Hope that helps,
    Brian
    Brian

  14. briangroce
    Member
    Posted 5 years ago #

    The .htaccess file is only needed for the rewrite rules.
    The reason you get the 404 AND the "Sorry, no action was supplied" errors is the same...for some reason your server is not "seeing" the variables in the URL. Once you get this fixed, both ways should work.

  15. skebrown
    Member
    Posted 5 years ago #

    Well, why would my server not pick up variables. What is the cause of such a thing?
    I don't think it is the fact that my server does not see variables. "index.php?cat=13" is passing a variable. Obviously my server is seeing the variable "cat=13" or it would not take the user to that specific Category.
    I am not saying that my server does not have issues. However, my server is passing variable's correctly AND seeing them.
    Am I correct?

  16. sindas
    Member
    Posted 5 years ago #

    would love to see the option to omit a catagory from updates... (I use the events hack, dont want that one to send emails!)
    thanks.

  17. skebrown
    Member
    Posted 5 years ago #

    Brian and I got this worked out. I was going to let him go through his documentation and get it up to speed on the changes, for those who wish not to use the rewrite function utilizing the .htaccess file.
    Here is the fix for me...
    In "index.php", at the top somwhere, add these globals:
    $action=$_GET['action'];
    $id=$_GET['id'];
    $md=$_GET['md'];
    $addr=$_GET['addr'];
    This allows the variables to be passed correctly.
    I also had to change the "email-notification.php" file located in the plugins dir.
    Find this line:
    $msg .= "$site_url/maillist/unsub/$addr\n";
    Replace it with:
    $msg .= "$site_url/maillist/index.php?action=unsub&addr=$addr\n";
    The way I have it working on my site is not exactly the way Brian had intended, but it works for me and I am happy with it. I don't foresee any secuirty issues (anyone?) so for now, I am sticking with it.
    Let me know if I left something out?
    Thanks again Brian, you have been most helpful :)

  18. briangroce
    Member
    Posted 5 years ago #

    This has been updated to version 1.1.
    See:

  19. briangroce
    Member
    Posted 5 years ago #

  20. fmckinnon
    Member
    Posted 3 years ago #

    Hey Brian -
    I've got the latest install on WP, and when I do a mailing, the emails says "MAILER DAEMON" in the "from" field, even though I've put my email address as the "reply-to" and the "admin" email address in the settings ... any help?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.