Daily reports | |
Daily Reports is a new feature in Tiki4, and improved in Tiki8 and Tiki9 that informs you about changes on sites you are watching with one periodic email. It is a summarised version of the normal notifications and it replaces them. |
Enabling the feature | |
In Tiki6, for instance, you can enable them here:
If User Watches and Daily Reports are enabled, each user can decide to enable reports, or to further use normal notifications. |
Usage | |
To use reports, go to My Watches in the main application Menu from your tiki site (MyTiki > My Watches - tiki-user_watches.php) and adjust your preferences to fit your needs.
|
Prepare the cron job | |
The next step is to prepare the cron job.
Since Tiki12.3 Copy to clipboard
Or Copy to clipboard
In case of Tikis with domains Copy to clipboard
Copy to clipboard
Copy to clipboard
|
Token access for anonymous users | |
And since Tiki9, you can use a token in the url to call, in order to allow the cron script to be launched from an external server. An example of using the token and sending the output by email at 5, 11, 17 and 23h each day is shown below: Copy to clipboard
|
How it works internally | |
lib/reportslib.php
tiki-user_reports.php
tiki-user_reports_send.php
Once there are some actions done that would send emails to the user, those action leave a record in the mysql table tiki_user_reports_cache, and when the cron job is run, the records in this table will be used to feed the report to be sent to the user by email. |
Example of a Html report: | |
|
Changing groups of users to receive daily reports by default | |
It was not until Tiki6.5, 7.3 and 8.0 that a tiki admin could indicate that new users receive daily digests of notification emails by default. Therefore, many live tiki sites using previous versions of the software since long ago, with potentially hundreds of users already, might not benefit from that performance improvement untill all users manually indicated that they wanted to receive daily digests instead of instantaneous emails. However, there is some performance limitation in tiki when you have hundreds of users receiving instantaneous notification emails each time a user adds some new content. This can mean moving from a couple of seconds, on a shared hosting, to have tiki back ready after sending some new coment or trakcer item, for instance, into lasting 45 seconds before tiki is ready back after sending all the emails associated to that same action (posting a new comment or tracker item, in this example) Therefore, it's not rare that an admin would want to change at once a whole group of users from receiving instantaneous emails, to receiving them grouped daily based on a cron job. This change alleviates tiki from sending so many emails with every new action, and brings tiki back to a fast performance from the end user point of view. This change can be applied directly with a SQL query on the database (through phpmyadmin or by other means). If your groups of users is "foo_group", then the SQL query to run directly in your mysql db is: Copy to clipboard
Related
alias names for this page
Daily Reports for User Watches | DailyReports | PeriodicReports | Periodic Reports | Daily digest | DailyReport | Daily Report |