Digests provide customized daily, weekly or monthly email summaries of posts and (optionally) private messages sent to you at an hour of your choosing.
If you installed an earlier version of the digests extension, first disable it like any other extension. If you are using digests in a production situation, if you also delete the data you will lose any digest subscriptions. Also use your FTP program to remove the entire
Install this release as you would any other extension. The digest tree should be in
Digests are each mailed individually. The email package size in ACP > Email settings is ignored.
Digests are sent via either a phpBB cron or a system cron.
Sending digests via a phpBB cron
A phpBB cron event occurs when traffic hits your forum. This default method is the easiest way to go. It has one downside. If your forum traffic is light, your users may not receive their digest in the hour requested. It assumes there is regular traffic for pretty much any hour, even in the middle night and on weekends. If this happens digests will usually be delivered in the hour requested. If received late, digests will still contain posts for the time period wanted.
If your forum gets little traffic, using this approach can be counterproductive. Digests may arrive hours or days later than expected. If digests will be an important feature of your forum, then using a system cron to send digests is the preferred approach to use. On shared hosting a queue may develop that becomes so large it will trigger resource limitation. In cases like this you might want to "reset" digests so that digests will start processing for the current hour. ACP > Extensions > Digests > Reset mailer.
Sending digests via a system cron
This is a better way to go as users will receive their digests in the hour requested. Instructions can be found at:
https://wiki.phpbb.com/PhpBB3.1/RFC/Mod ... ystem_cron
For Windows hosting, the equivalent of a Unix cron is available. Please learn about Windows scheduled tasks.
phpBB is usually installed on shared hosting. In this case the official phpBB approach probably won't work. So this approach is probably needed:
Language translationsIn shared hosting environments cron may be allowed but multiple commands may not be allowed in the cron. You may be able to use curl or wget instead of a system cron. Using this approach do NOT select 'Run periodic tasks from system cron' setting in the 'Server settings' tab of the ACP. You will still need to create a cron, however. The purpose of the cron is to trigger phpBB's cron regularly so if there is no board traffic programmed phpBB crons are still executed. A cron command similar to the following may work:
With this approach some trial and error may be necessary. Have the results of the cron sent to an email address that you can read and examine it for troubleshooting. It may be necessary to use a different user agent or to prepend curl or wget with the path, which might be /usr/bin or /bin. Your web host can provide information on the paths needed if necessary. When it is all working you may want to turn off the cron notifications.
Code: Select all
* * * * * curl -A=Mozilla/4.0 http://www.yourforum.com/forum/cron.php?cron_type=cron.task.cron_task
Here are the known language translations for the digests extension. Since not all translations are current or available on GitHub, using a translation for a different version of the digests extension than you have installed may result in an inconsistent rendering and possible incorrect usage of the extension. Languages files need to be placed in
/ext/phpbbservices/digests/languagein a folder with the correct language code, e.g.:
Migration from the Digests Modification for phpBB 3.0
The installation program for this extension has been carefully written to allow any digests settings from phpBB 3.0 to be preserved if they remain in your database after an upgrade to phpBB 3.2. Typically digest columns will remain in the phpbb_users table and there will be configuration variables for digests in the phpbb_config table. This way if a user is used to getting a daily digest at 12:00 they will continue to get it at that time once installation is complete. The installation program supports versions 2.2.6 through 2.2.27 of the digests modification. It will update configuration variables, add or remove any column names from the phpbb_users table, remove any old digest modules that may exist and create the new ones for the Administration Control Panel and the User Control Panel.
Installation is talked about in the next section.
Remove the old cron job!
If your old cron job for sending out digests is still running, it should be removed. This is usually easy to do in your web host control panel. Look for a cron setting, look for a cron job that has mail_digests.php in it and delete that cron job.
If you were doing this through a site monitoring service, log into that service and delete that monitor.
Guidance on removing dead module names
Since the digests mod was often installed using AutoMOD, there may be a bogus ACP_CAT_DOT_MODS tab when you go into the Administration Control Panel. phpBB’s update program isn’t smart enough to remove these. Clicking on the tab will usually trigger an error that tells you the module for AutoMOD no longer exists. (Of course it should not. The AutoMOD program should have been removed with the upgrade of your forum from 3.0 to 3.1 or 3.2.) These can be manually removed on the System Tab, Module Management, Administration Control Panel. You will have to descend the module tree and remove modules from the bottom up, eventually removing the tab altogether.
If there are odd looking links for digests in the ACP or UCP with uppercase language constants instead of readable language strings, the installer should clean these up.
Setting up digests
Once installed you should see:
- An Administration Control Panel interface for digests on the Extensions tab with seven modules of major functionality
- Users will have an interface to subscribe to digests in the User Control Panel. Look for a digests tab.
The first thing to do is to make sure digests that are configured the way you want them to be.
- ACP > Extensions > Digests
- Select General settings and review these, changing as you prefer. To start off, it is recommended that you set “Write all digest actions to the admin log” to Yes and “Show email address in log” to Yes.
- Select User default settings next. If a user chooses to subscribe to digests these will be the defaults. Change defaults as you prefer.
- If you want to subscribe members of your forum to digests, use the Mass subscribe/unsubscribe option. Generally, this is not a good idea because it can feel like spam. It’s better to let members know the option exists and let them elect to receive a digest.
To make sure things are working, first send yourself a digest.
- Set yourself up correctly
- Go to the User Control Panel > Board preferences. Edit Global Settings appears by default.
- Verify your time zone is correct where it says “My time zone”. If incorrect, fix then press Submit.
- Select the Profile tab. Then select Edit account settings. Check your email address and correct if necessary. Digests will be sent to this email address.
- There should be a Digests tab on the far right (assuming you are using the prosilver style). Select Digests. The Basics module should be displayed by default.
- For “Type of Digest Wanted” click on “Daily”. For “Hour sent” select the current hour in your current timezone. Then press Submit.
- Select the Digests Additional Criteria tab. For “Send a digest if there are no new posts” select Yes. Then press Submit.
- Do a test mailing manually
- ACP > Extensions > Digests > Manually run the mailer
- Set “Run the mailer” to Yes
- Set “Send results to files instead of emailing” to No
- Press submit. If an error occurred you should see a message to this effect. You might also want to check the admin log on the maintenance tab for any informational messages. The error log should show errors that may have occurred.
- Look for an email in the email inbox of the email address in your phpBB profile. If you don’t see it, it may be in your spam folder. (Note: if they appear in your spam folder, it may be because the email is coming from an address that is not part of your domain. Check your board contact email address and your board reply to email address and verify it uses an @mydomain.com address. Set up an email address like email@example.com if it does not exist. Create the email account in your web host control panel or set up a mail forwarder there so it forwards emails to the address of your choice.)
Once you have verified a digest can be successfully sent, test that it will work automatically!
- If you haven’t set up the phpBB system cron using the instructions in the last section, you can do it now but it is not required.
- Go back into the User Control Panel and make sure that the hour you want to receive your digest is for the current hour.
- Go back into the ACP > Extensions > Digest settings > Reset mailer. Set the first radio button to "Yes" and submit the form.
- If you are NOT using a system cron, going to the board's index should trigger a phpBB cron. If nothing happens, try logging out and logging back in. This will usually trigger a phpBB cron event, triggering the mailer. Evidence that the cron ran should be in ACP > Maintenance > Admin log. In addition you should check the appropriate email inboxes for the digests. If you don't see them, look in your spam folder.
If you followed the instructions above, actions will be written to the Admin log (ACP > Maintenance > Admin log). Generally there should be a "Starting digest mailer" log entry near the current time and a "Ending digest mailer". There should also be an entry indicating the type of mailer used: manual, system or regular (phpBB). When a digest is mailed if logging is turned on to show the email address it will also be in the log. The log should indicate the date and hour for which digests were mailed, in UTC. This is a useful aid when troubleshooting or fielding questions. If a phpBB error occurred it is probably in the error log.
Most problems during testing are a result of missing steps in the testing procedures. There are many filters that can keep a digest from going out so the test case has to be good. Frequently, there are no digests scheduled for the hour so it's important to make sure a test user is setup to send one for the current hour. Note: you can use the Balance Load function to get an idea of how many digests are programmed to go out for a particular hour. (Whether they will actually go out depends on filters specified by the subscriber.)
For a list of all the reasons why posts may not be appearing in a digest read this blog post.
If the mailer was run successfully, you have to wait an hour before another one will go out unless you use the manual mailer.
If it has been many days or more since digests have been run, you might want to reset digests. This can be done as follows: ACP > Extensions > Digests > Reset mailer. The next time digests are run, only digests for the current hour will be processed.
On shared hosting, resource limitations often kick in if many hours or days have passed since the mailer was last successfully run. To lessen the likelihood of an error in this case, you might want to set the "Maximum hours for mailer to process" option to a small number: ACP > Extensions > Digests > General options. This is not normally an issue on a dedicated or virtual server, but there may be quotas imposed by your web host on outgoing emails for an hour or a day.
Great care was taken to ensure faithfulness to the 3.0 digest modification. Screens for the most part look identical and the functionality and layout of the digests is virtually the same as well. Since the architecture for phpBB 3.1 and 3.2 is much different than for phpBB 3.0, some features were removed. Don’t panic, because they don’t make sense anymore.