bbPress Notify (No-Spam) Reply by Email Documentation

bbPress Notify (No-Spam) Reply by Email Documentation

Reply by Email Logo

bbpnns Reply By Email (RBE for short) is a powerful plugin. It gives your forum participants the ability to reply to new forum posts without having to log into your site. They can even dictate their emails on their phones, so no typing is required.

However, getting it set up initially can be a little tricky if you don’t understand the concept behind it. Keep reading if that felt close to home.

Getting Started

RBE is an extension of bbpnns. It relies on bbpnns to send the notifications to your users. When it sees a notification going out, it will change the reply-to email header of that outgoing message so that any replies go to a mailbox it has access to.

From time to time (more on that later) it will check that mailbox, parse the headers and body of each message and create the reply under the correct topic. It even respects nested replies!

By the end of this article you’ll:

  1. Know what a Plus Alias (or Dynamic Alias) is;
  2. Have a better understanding of what a Cron job and Webhook are;
  3. Have all you need to easily set up your Reply By Email add-on.
So let’s get to it!

    The Mailbox

    As you just read, RBE needs to have access to all of the email replies so it can do its thing. To do its thing, it needs to know a few pieces of information: who’s the user posting, and what’s the forum, topic, and parent reply (if any) it should take into consideration when posting the body of the message.

    There aren’t many reliable ways for it to do that without putting a huge performance hit on the WordPress database. Enter Plus Aliases (aka Dynamic Aliases).

    Plus Aliases (we’ll stick with that name for convenience) are a handy feature that Gmail and a few other email providers came up with. It allows one mailbox to act as pretty much infinite mailboxes. How? By using a simple character, the + sign, to identify the actual mailbox (before it) and any combination of characters (except @) after it and send all messages to the actual mailbox.

    So let’s take the email address [email protected] as an example. There are 2 parts to it: foo, the account, and foobar.com the server. What Plus Alias support does is let you send a message to something like [email protected] and still get the message as if it was sent to [email protected]

    That’s really handy! Common applications for this are: reduce the number of mailboxes you need when applied in conjunction with mail rules; know which site is selling your email to spammers by using a special alias for each site you give your email to; and allow Reply By Email to know the meta data required to post a message.

    So how do I get my hands on a Plus Alias, you ask?

    So far there are 2 large email providers that support Plus Aliases: Gmail and Hotmail/Outlook. Oddly enough, Outlook 365 does not support them – not easily at least. The good news is that those that do are free.

    You’ll find the Mailbox connection settings under

    Admin > Settings > bbPress Notify (No-Spam) – Reply by Email Settings > General tab

    Using Gmail/G Suite

    Gmail and G Suite (formerly Google Apps) are the most popular Plus Alias providers out there. Heck, they may have been the original inventors of Plus Aliases.

    RBE comes with pre-defined settings to connect to Gmail (and G Suite, but we’ll just say Gmail for brevity). All you need to do is paste the full email address in the username input field, the password in the password field and Bob’s your uncle. Well, most of the time. Gmail can get a bit picky with who accesses their mailboxes.

    First, we recommend that you get a dedicated mailbox for RBE to use. If you choose to use your own or one that has, say 7GB of old messages going back 10 years, RBE will probably have a hard time finding the ones that it really cares about.

    Second, you really need to test the connection after entering the Gmail credentials. If it fails you should log into the mailbox and look for security emails coming from Google.

    You may have to do one or both of the following:

    Follow the links above for information on how to enable them. Usually just enabling Less Secure Apps works fine. Click the Test Connection button after each one to see if it works. Don’t be discouraged with the ‘Less Secure’ terminology. RBE communicates with all mail servers via secure SSL connections.

    WARNING: There’s one caveat regarding the Gmail account to use. If you’re using a gmail account in your Admin > Settings > General >  Email Address, then you cannot use the same account for RBE. That’s because bbpnns uses that email address in the From field, and Gmail will see that the From and To fields are the same and ignore the Reply-to header containing the meta data that RBE needs. It’s a Gmail thing and we can’t do anything about it. Sorry.

    Once it’s all set up, click Test Connection again and it should work just fine. Remember to save!

    Using Outlook/Hotmail

    Hotmail was my very first public email address. That’s when Geocities still existed and IE 3 would come in a set of 3 or more floppy disks (now known as the save icon). A few decades later Microsoft buys it and makes it part of the Outlook family.

    The good part is that it also supports Plus Aliases, and even better, it doesn’t seem to complain about less secure apps or application passwords. Just paste the full email address in the username field, the password in the password field, and click Test Connection. Remember to Save!

    From Email to Forums

    Now that you’ve got your mailbox set up, it’s time to take RBE for a spin. The first thing you’ll need to do is to make sure bbpnns is working properly. Without it, RBE cannot set the headers that it needs to do its thing.

    Setting up bbpnns is pretty trivial, if you’re working on a brand new wordpress install without any real users. Things get tricky if you have real users and don’t want to spam them with test notifications. We strongly recommend setting up a staging site to test out the settings, or you’ll run the risk of having some very angry users.

    If you must test on a live site (please don’t!), then at least temporarily set the notification role to Administrator (or some custom role created just for testing) and disable Override Subscriptions to Forums and Override Subscriptions to Topics in the Topics and Replies tabs of bbpnns, respectively. Don’t forget to turn off background notifications during testing.

    You may find it tedious to create new topics in the front-end for testing. We find it, too! And with that in mind we created the Send Notifications metabox in the Topics and Replies back-end. Just check the box and click Update and the notifications will be triggered.

    Once you get the message out, check your test mailbox (the one that usually receives the notifications, not the one you set up for RBE). Once the notification arrives, make sure RBE modified it for its needs. This is what you should look for:

    1. The body of the message contains a paragraph that says
      ##- If you want to reply, type it above this line -##
    2. The reply-to header has been set and is the email account you set up for RBE along with +usc_ and a bunch of characters before the @.

    If you’re seeing that, then things are looking good. If you’re not, feel free to contact support and we’ll take a look.

    Go ahead and reply to that message. The To field should show the special RBE address. If it doesn’t and you’re using Gmail, refer to the warning above. Write anything you want in the message above that special paragraph and send the message. Check the RBE mailbox to see if the message gets there, but don’t open it! RBE looks for unread messages for performance reasons.

    The First Run

    So you now have a message waiting in the RBE mailbox. How do you test if it’s going to work?

    That’s actually quite simple. First make sure your Check Method is set up for Webhook (save the settings!). Then copy the Webhook URL (blurred in the image above) and paste it in a new browser tab/window. You should end up with a message depicting how many emails were processed. If none were processed and you saw the unread message in the RBE mailbox, please contact support. If you had too many unrelated messages in the mailbox, it could be that the script timed out while sifting through the pile looking for the emails to post. That’s why it’s important to have a dedicated mailbox just for RBE.

    Go to the topic where you expect your reply to be and see if it’s there.

    –Sidebar–
    Depending on the email client that you used to send your reply, you may see some spurious text after the reply. That’s because some email clients add weird stuff between the actual message and the special paragraph. We have lots of code working to remove that weird stuff, for most of the common email clients actually, but some more obscure ones may still pose an issue. If that’s happening to you, please contact us so we can adjust the plugin accordingly.
    –/Sidebar–

    Feel free to reply to your reply in the front-end and send another reply to the reply to the reply… (I lost count) via email. Once you’re satisfied with the functionality, it’s time to automate it.

    To Cron or to Webhook

    RBE will let you automate it in several ways. They all involve either Cron Jobs or third-party integration (with IFTTT, Zapier, etc.). You can even use the WordPress Cron by itself if you want, but we don’t recommend that unless you have LOTS of traffic.

    You can follow this link to read up on how to set up this section, but the simplest thing is to use a Real Cron job along with the Webhook URL. Most hosts offer some sort of real cron job interface (such as cPanel). Siteground (my favorite host so far) has a good tutorial on how to set up real cron jobs in cPanel for WordPress. The steps for the webhook are pretty much the same, but the actual command that’s run is different. It’s a good idea to follow the steps outlined in that tutorial to replace the WordPress internal Cron job (just follow the steps to the letter), and then follow them again (skipping the DISABLE_WP_CRON part, which is done only once) and using the following command instead of the original one:

    wget -q -O - https://yourdomain.com/?bbpnnsrbe-run=thesecretkey >/dev/null 2>&1

    Replace https://yourdomain.com/?bbpnnsrbe-run=thesecretkey in the command with your Webhook URL.

    Make sure that you still have Webhook set as Check Method or you’ll get an HTTP 400 error when the cron job runs.

    Only use the WordPress Cron method if you’re NOT going to use the Webhook URL anywhere and will depend on WordPress to try to respect the check frequency.

    Other Settings

    If you managed to get this far unscathed, the rest is smooth sailing. The remaining settings in this section and in the Message Processing section are pretty much self explanatory. If you choose not to delete read messages, RBE will try to move them to a special folder in your mailbox (if you’re using IMAP which is the default for Gmail and Outlook) so as to be able to process newer messages faster.

    The options in the Message Processing section are mostly site owner preferences to limit what can or cannot be posted into the forums.

    Topics by Email!

    Topics by Email!
    Topics by Email!

    Version 1.9 of RBE introduced the ability to create topics via email. You’ll have to enable it in the General Settings tab.

    Once you do, your users will start seeing little envelopes in the forum list screens with “mailto:” links. The email address is unique for each forum/user combination, so it won’t show up unless the user is logged in.

    Any email sent to the special email address will end up becoming a new topic in that forum.

    The special address also shows up in the back-end Edit Forum screen, inside the metabox where you find forum type, status, parent, and order.

    You will *not* see it in categories or the new forum screen.

    Subscription Integration Settings

    This part helps RBE notify everyone who needs to be notified when a reply to a new topic is posted.The section fully explains what each option does. We recommend setting this to Use bbpnns Rules, if you’re happy with your bbpnns setup and don’t have any membership plugins installed.

    Configuring the bbpnns Reply by Email Webhook

    You’ve chosen to use the bbpnns Reply by Email Webhook instead of the WordPress Cron system. Smart choice. Now, every time the Webhook is called, the plugin will check your inbox for the newest replies to be added to your bbpress forums.

    [vinyl scratching] Wait, what’s a webhook?

    Webhook is nothing but a fancy name for an action taken by a site when a given URL is accessed. In the plugin settings you were given a web address to use.

    The trick now is getting that webhook called as frequently as possible without enraging your web host.

    Keep reading to learn about our recommended methods of setting up the Webhook calls.

    1. IFTTT
    2. Zapier
    3. Real Cron Jobs

    IFTTT

    IMPORTANT: On March 30, 2019, Gmail changed their API and IFTTT can no longer offer its service. We’re sorry, but it is not within our control. Please refer to the Zapier or Real Cron Jobs steps instead.

    IFTTT stands for If This Then That, and is a free service which lets you connect services according to pre-defined rules, called Applets (they used to be called recipes). You can create your own applets or use any of the many available applets built by IFTTT, service providers, or users like yourself.IFTTT connects seamlessly with Gmail (and Google Apps, which essentially the same thing), and Office 365 (for paid outlook accounts) but currently does not support checking POP3/IMAP mailboxes. If you need POP3/IMAP direct checks, skip ahead to the Zapier and Real Cron Jobs sections below.

    For the purpose of this tutorial, we’ll assume you’re using Gmail. Setting up Outlook 365 (if you have the paid service) should be pretty much the same (we haven’t done it ourselves, to be honest, as we don’t have the paid service).

    Here’s what you need to do to get bbpnns Reply by Email running with IFTTT:

    1. Create a free IFTTT account just to use with this plugin, if you don’t already have one. Simply go to https://ifttt.com and follow the signup steps. You can also choose to connect with your Google or Facebook account.
    2. Once your account is set up, go to the Gmail service page: https://ifttt.com/gmail (or https://ifttt.com/office_365_mail if you’re setting up your paid Outlook account).
    3. You can only have one connected Gmail account per IFTTT account, so if you already have Gmail connected with your existing IFTTT account, disconnect it *. Then click the big Connect button.This will take you to the Gmail OAuth screen, where you’ll need to log in with the Gmail account you set up in your bbpnns Reply by Email settings screen, and click  ‘Allow’ when prompted.
    4. That’s it for Gmail. Now we need to tell IFTTT that we want to use Webhooks. Go to https://ifttt.com/maker_webhooks and Click connect, just like you did for Gmail.You will not get any Oauth screens or anything. Just the Webhooks screen without the connect button.
    5. Finally, set up your Applet to call our Webhook when new messages arrive. IFTTT seems to check Gmail every minute, so this is by far the best solution you can get. Click My Applets > Create, or go directly to https://ifttt.com/create. You’ll see the new applet screen:
      Click on the big blue “+ this” link (yes, it’s a link – I was a bit lost way back when I first tried it).
    6. Enter Gmail in the “Choose a Service” screen, and click the Gmail icon.
    7. In the Trigger screen that comes up, select the box that says ‘Any new email in inbox’. You’ll be taken back to the New Applet screen with the ‘+ that’ now linked and the Gmail icon replacing the ‘+ this’. Click ‘+ that’ and type Webhooks. Click the Webhooks icon.
    8. Click the ‘Make a web request’ action box (the only one available at the time we wrote this tutorial).
    9. Enter the bbpnns Reply by Email Webhook URL you were given in the plugin’s settings screen in the URL field. Leave the other fields as they are, as they are not important. Finally, click the ‘Create Action’ button at the bottom of the box.
    10. You’re almost there! You can now choose to change the description of your action and whether to receive notifications when the applet runs. Just click ‘Finish’ to complete the applet creation.

    Once your applet is created, you can turn it off or on, and also force check the Gmail account.

    * You can take a more complicated approach and share a gmail account by setting up labels for messages that contain <you>+usc_ as the beginning of the “to” field, and have the Gmail trigger run when a message gets labeled, but that’s beyond the scope of this tutorial.

    Zapier

    Zapier is another service like IFTTT, where you get to create “Zaps”. Like IFTTT, you can connect to service providers and create triggers. Unlike IFTTT, it lets you connect to IMAP so you can use it for free Outlook/Hotmail accounts and even your hosting provider’s email service if you’re using that. The downside of using Zapier is that it only checks your mailbox in 15 minute intervals instead of every minute, so your forum participants are likely to think something went wrong and re-send the replies over and over. Each email reply will be translated into a forum reply, even if it’s a duplicate.

    IMPORTANT: The bbpnns Reply by Email plugin requires an email server that supports “plus aliases”, i.e. sending messages to foo+bar@domain.com is the same as delivering to [email protected] To our knowledge, the only large hosting providers that currently support this are Gmail and Outlook/Hotmail. The plugin will NOT work without it. Only go the IMAP route if you tested “plus alias” support manually or via the plugin settings screen. You’ve been warned :). Continuing…

    To set up a Zap to trigger the webhook, follow these steps:

    1. Create a free zapier account if you don’t have one;
    2. Search for IMAP by Zapier app and select it;
    3. Search for Webhooks by Zapier app and select it;
    4. Click the ‘Use this Zap’ button in the box that says ‘Create Webhook post from new IMAP emails’.
    5. Follow the instructions to create the Zap. When prompted to connect an IMAP account, use the IMAP settings that your hosting provider gave you;
    6. Click Save+Continue;
    7. Select Inbox when prompted to select an IMAP folder. Click Continue;
    8. Click Fetch+Continue to test the connection;
    9. If the test is successful, click Continue to set up the Webhook;
    10. The only option now is to “Fire off a single POST request as a form or JSON”. Click Continue;
    11. Enter the Webhook URL you were given in the bbpnns Reply by Email plugin’s settings screen in the Zapier URL field. Click Contiue;
    12. Click Send Test to Webhooks by Zapier. Don’t worry if it says that the test was successful but no data was available. That’s intentional.
    13. Finally, click finish.

    Zapier will check the mailbox for new messages every 15 minutes and call our plugin to do the processing.

    Real Cron Jobs

    The Cron system was designed to let people run programs at given dates/times or intervals (called jobs). It is essential in any Unix or Linux environment, and all decent hosts will let you create new jobs.

    WordPress tried its best to create a faux Cron system for those who can’t or don’t want to deal with real Cron systems. However, because it needs to keep its performance good, it can’t simply run indefinitely in the background waiting for whatever date/time there are jobs to run. It only runs when someone visits your site, so even if you have a job that was set to run at, say, noon every day, and your site only receives a visitor at 5PM, that’s when the noon job will run.

    You can (and, for bbpnns Reply by Email to work effectively, should) replace the Cron functionality that’s bundled with WordPress with a real Cron job. It’s quite simple and jsut requires editing wp-config.php to disable the internal WP Cron before running your own.

    There are several tutorials available on how to do that. I like the one at SiteGround.

    Feel free to follow that tutorial to the letter if you want to (to replace WP Cron), especially if you chose to not use the Webhook.

    To get bbpnns Reply by Email to work as a Webhook, you’ll need to add the Webhook command that you got in the Settings screen as a new job in the Cron Job screen in cPanel – you don’t need to replace WP Cron at all.

    Set it to run as frequently as possible without enraging your hosting provider. SiteGround asks that you don’t run any jobs in intervals smaller than 30 minutes. This is obviously not frequently enough for any good user experience (where’s my email reply? should I send it again?), which is why using Cron Jobs is last on our list.

    Conclusion

    This concludes our tutorial on how to set up bbpnns Reply by Email to work with Webhooks. We strongly believe that setting up IFTTT with Gmail is the best option to get the smoothest email to reply user experience.

    If you still don’t have the bbpnns Reply by Email plugin,

    CLICK HERE TO BUY IT

     

     

    bbPress Notify (No-Spam) Digests Documentation

    bbpnns Digest

    bbPress Notify (No-Spam) Digests Documentation

    bbpnns Digest

    bbPress Notify (No-Spam) Digests, bbpnns-digests for short, is an add-on for bbpnns that enables your users to receive a single email containing a list of topics and replies sent over the selected period. Keep reading to learn more about it.

    If you don’t have your copy yet, you can get it here.

    Installation

    The bbpnns Digests Add-on can be installed like any other WordPress plugin. Follow the steps below after downloading the zip file from The Downloads Section of My Accounts.

    Via the Admin:

    • Go to Admin > Plugins > Add New;
    • Click Upload Plugin;
    • Click Browse and select the downloaded Zip file;
    • Click Install Now;
    • Click Activate;

    Via FTP:

    • Unzip the downloaded Zip file in your local computer;
    • Upload the unzipped directory into your wp-content/plugins/ directory;
    • Go to Admin > Plugins;
    • Click Activate in the row of the uploaded plugin;

    ⇪Top

    Dependencies

    WordPress v.3.5+, bbPress v.2.5+, and bbPress Notify (No-Spam) v.1.9+.

    Getting Started

    Once you’ve installed the zip file and activated the plugin, you’ll see new tab in the bbpnns screen, accessible at Admin -> bbPress Notify (No-Spam) -> Settings .

    Global Options

    This panel lets you configure default settings for new users and the look and feel of the Digests email. It is comprised of the following sections:

    1. Default Digests Frequency
    2. Default Instant Forum Notifications
    3. Digest Email Subject
    4. Digest Email Body

    ⇪Top

    Default Digests Frequency
    Default Digests Frequency
    The Default Frequency Setting

    This setting tells bbpnns-digest what frequency to give newly registered users. Supported values are: Off, Daily, Weekly, and Monthly.

    Default Instant Forum Notifications
    Default Instant Forum Notifications Preference
    The Default Instant Forum Notifications Setting

    The Instant Forum Notifications option controls whether users get the regular messages the moment they’re created or not. If this is not checked, then the add-on will stop bbpnns from messaging the user, and will only keep a record of the message for when the time comes to send the digests.

    The default setting is what gets applied to newly registered users.

    Note that this is only takes effect if the user’s Frequency is not ‘Off’.

    Digest Email Subject
    The Digest Subject Line Setting
    The Digest Subject Line Setting

    This controls the subject of the Digest message. On top of the regular bbpnns tags, Digests also supports the following:

    [frequency], [Frequency], and [FREQUENCY]

    Note that the difference between [frequency], [Frequency], and [FREQUENCY] is just the case. e,g. “weekly”, “Weekly”, and “WEEKLY”, respectively.

    Digest Email Body
    The Digest Email Body Editor
    The Digest Email Body Editor

    This controls the body of the Digest message. On top of the regular bbpnns tags and the subject tags, the body needs the special [digest-list] tag.

    This is a placeholder for the user’s Digest. Currently the default format is a list of topic titles (with links) followed by a summary of number of replies to each topic. See the F.A.Q.s below on how to modify the digest list to your preference.

    Sample Digests Email
    Sample Digest Email

    User Options

    Out of the box, users can change their preferences in one of 2 places:

    • The WordPress Profile Screen
    • The bbPress Profile Screen (under Subscriptions and Edit)

    Editable options are the Forum Digest Preference (enabled/disabled), the Frequency, and whether to receive Instant Forum Notifications.

    WordPress Profile Screen Options
    WordPress Profile Screen Options
    The bbPress Subscriptions Screen
    The bbPress Subscriptions Screen
    The bbPress Edit Profile Screen
    The bbPress Profile Screen in Edit Mode

    Testing Mailouts

    Digest mailouts can be sent in 3 different intervals: daily, weekly, and monthly. The exact time when each one is sent will vary according to a few factors such as when the plugin was last activated and how often your site is accessed. This is mainly because bbpnns-digests uses WordPress cron jobs to send out the messages. When you activate the plugin, it creates the 3 cron jobs (one for each frequency), scheduled to run at their respective times in the future. However, by default, wp-cron only really fires when your site is accessed by a visitor.

    There are a few ways to circumvent this, which we’ll cover soon enough.

    Seeing/Triggering Scheduled Mailouts

    The first step to figuring out if your mailouts are going to work is to see if they are actually scheduled. I use a plugin for that: WP Crontrol. Not only does it show me the scheduled jobs, but it lets me modify them and execute them whenever I want to, too. I strongly recommend it.

    It’s also important to make sure that the user belongs to one or more of the roles selected to be notified, or that Authors are set to receive notices of their own posts, or that Override Core Subscriptions are turned on (these are all bbpnns settings). If none of those settings are set, they will NOT see any fields for this plugin at all.

    If you’re running your initial set up on your staging site (you are using a staging site, right?), I recommend triggering the actions via WP Crontrol manually. Go to Admin > Tools > Cron Events and look for these three jobs:

    1. bbpnns_digest_notify_daily
    2. bbpnns_digest_notify_weekly
    3. bbpnns_digest_notify_monthly
    Click Run Now for the job that you want to run and that will kick off the digests (as long as there are queued messages in the database.

    Once you’re happy and you apply your changes to Production, you’ll need to make sure it runs on its own. As mentioned before, wp-cron can be a bit iffy, especially if you don’t have a lot of traffic. The best way to get WP to run its cron in a timely manner is to set up a real cron job. If you’re using cPanel, check out this tutorial by SiteGround*. If you’re hosting with WP-Engine, ask them to turn on their Alternate Cron. It’s their version of a real cron job, which will run every minute. Another really good solution is to use cron-job.org.

    * Affiliate link.

    Under the Hood

    Here’s a bit of a technical explanation of the Digests plugin and how it interacts with bbpnns.

    1. When a new topic/reply is created, bbpnns fetches all the users for the roles selected under Admin > bbPress Notify (No-Spam) > Settings > Topics or Replies tabs.
    2. bbpnns-digests pulls up all users having digests different than ‘off’ and inserts a row for each one in the table {$wpdb->prefix}bbpnns_digest_queue.
    3. If the digester does not have Instant Forum Notifications selected, then they are dropped from bbpnns’ recipient list.
    4. bbpnns resumes its mailout process to whoever is left in the recipient list.
    At this stage, no digest messages have been sent out. They only get sent out when the scheduled action is triggered by wp-cron.

      Mailing Digests

      And then the time comes when one of our scheduled jobs gets triggered. This is what happens:

      1. WP Cron triggers one or more of the digest actions – remember, there’s one for each frequency.
      2. bbpnns-digests pulls up users who have the applicable frequency;
      3. It looks for those users under {$wpdb->prefix}bbpnns_digest_queue and {$wpdb->prefix}usermeta, and builds the digest list with the information found in the table;
      4. Once it sends out the message, it removes all applicable rows from the table.
      5. Note that due to the dynamic nature of digests contents (not all users may have the same digests), one message is sent to each user. This can take time, depending on the number of messages that need to be sent.
      6. If your host supports forking, Digests will run in batches of 5 emails at a time. This will help keep your process from being killed due to it taking too long to notify those hundreds of users.
      7. Alternatively you can consider using our Bulk Mailer Add-on, which can send up to 1000 messages in the time it takes to send one (Mailgun or Sendgrid account required).

      Overriding Digests HTML

      We’re working on a better way to override the Digests HTML, but until that’s done, this is what you can do instead:

      You can choose to override the whole Digests HTML, or just a few pieces if it – namely the information displayed in the topic and reply list elements. The available filters are described below.

      bbpnns_digest_format_forum_posts

      Overriding the whole HTML can be achieved by hooking into bbpnns_digest_format_forum_posts with a method of your own. The parameters passed are an empty string and the contents of the queue table as an associative array:

      1. notification_id
      2. user_id
      3. forum_id
      4. post_id – the ID of the topic or reply
      5. post_type (will be either the topic or reply post_type)
      6. timestamp

      If this filter exists, none of the other formatting filters (below) will be called.

      bbpnns_digest_topic_li_entry

      Use bbpnns_digest_topic_li_entry filter to format the whole content for each topic. If this filter returns anything other than an empty string, that is what will be displayed for each post in the Digests message.

      Parameters:

      • $empty_string
      • $forum_id
      • $reply_object
      • $topic_object

      bbpnns_digest_post_url and bbpnns_digest_topic_entry

      If the bbpnns_digest_topic_li_entry filter did not get set, then the topic line can be customized. Use bbpnns_digest_post_url to customize the link href, and bbpnns_digest_topic_entry to customize the link text. Note that the output of bbpnns_digest_post_url will be escaped via esc_url().

      bbpnns_digest_post_url Parameters:

      • $default_topic_url
      • $forum_id
      • $topic_object

      bbpnns_digest_topic_entry Parameters:

      • $post_title filtered by ‘the_title’
      • $forum_id
      • $topic_object

      bbpnns_digest_reply_li_entry

      The bbpnns_digest_reply_li_entry filter works just like bbpnns_digest_topic_li_entry. Like its topic counterpart, if this is set, then the reply content will be whatever gets returned. This is the preferred method of changing the link text in replies.

      Parameters:

      • $empty_string
      • $forum_id
      • $reply_object
      • $topic_id

      bbpnns_digest_topic_url_in_reply

      As of Digests version 1.4.2, the reply link no longer points to the page with the standalone reply. Instead, it points to the topic page, with the reply ID in the fragment (e.g. http://domain.com/topics/topic-name#post-1234, where 1234 is the reply ID). Use this filter to change that behaviour.

      Parameters:

      • $default_url
      • $forum_id
      • $reply_object
      • $topic_id

      F.A.Q.

      bbpnns-digests comes with support for WordPress and bbPress Profile pages out of the box. This means that if you go to the bbPress user screen, you’ll be able to view and edit the options. What BuddyPress and the other membership plugins do is force the users to go to different profile screens.

      In order for the user to be able to update the digest options, you’ll need the appropriate bridge add-on.

      Yes, it can. While we’re still working on an easy way to override the HTML, there are several filters available to get the job done. Please see the section on Overriding the Digests HTML. If you’re not comfortable with writing PHP, do contact me for a free estimate. Just do NOT modify the core files or you’ll lose your changes with the next update.

      There’s a filter for that: bbpnns_queue_order_by. You can hook into it by adding the following snippet of code to your functions.php file.
      add_filter( 'bbpnns_queue_order_by', 'my_custom_digest_order', 10, 1 );
      
      function my_custom_digest_order( $order_by )
      {
          /**
           * Available fields are:
           * - q.notification_id
           * - q.user_id
           * - q.forum_id
           * - q.post_id
           * - q.post_type
           * - q.timestamp
           *
           * @see http://www.mysqltutorial.org/mysql-order-by 
           * for syntax and examples of order by.
           */
           $order_by = 'order by q.post_id DESC'; //
      
           return $order_by;
      }