add site name to Daily Reports
- Status
- Closed
- Subject
- add site name to Daily Reports
- Version
- 11.x
- Category
- Less than 30-minutes fix
- Feature
- Daily reports
- Resolution status
- New
- Submitted by
- Clif Kussmaul
- Lastmod by
- Pascal St-Jean
- Rating
- Description
I host several tiki sites on the same hosting service, so it would be nice if the daily reports included the site name in the subject line and body.
I did this with 3 minor changes:
1. templates/mail/report.tpl - add site to report template
- diff report.tpl.orig report.tpl.new
1c1
< Report for %0{/tr}.{if $report_preferences.type eq 'html'}<br><br>{/if}
> Report on %0 for %1{/tr}.{if $report_preferences.type eq 'html'}<br><br>{/if}
2. lib/core/Reports/Send.php - add site to subject line (refactored)- diff Send.php.orig Send.php.new
66,77c66,73
< if (is_array($reportCache) && count($reportCache) >= 1) {
< if (count($reportCache) == 1) {
< $subject = tr(
< 'Report from %0 (1 change)',
< TikiLib::date_format(
< $this->tikiPrefs'short_date_format',
< $this->dt->format('U'))
< );
< } else {
< $subject = tr(
< 'Report from %0 (%1 changes)',
< TikiLib::date_format(
< $this->tikiPrefs'short_date_format',
< $this->dt->format('U')),
< count($reportCache)
< );
< }
< else {
< $subject = tr(
< 'Report from %0 (no changes)',
< TikiLib::date_format(
< $this->tikiPrefs'short_date_format',
< $this->dt->format('U'))
< );
> $subject = tr('Report on %0 from %1 ',
> $this->tikiPrefs'browsertitle',
> TikiLib::date_format(
> $this->tikiPrefs'short_date_format',
> $this->dt->format('U'))
> );
> if (!is_array($reportCache)) {
> $subject .= tr('(no changes)');
> } elseif (count($reportCache) == 1) {
> $subject .= tr('(1 change)');
> } else {
> $subject .= tr('(%0 changes)', count($reportCache));
> }3. lib/core/Reports/Send/EmailBuilder.php - set site for report
- diff EmailBuilder.php.orig EmailBuilder.php.new
37c37,38
<
> $smarty->assign('report_site',
> $this->tikilib->get_preference('browsertitle'));- Files
- Solution
- http://sourceforge.net/p/tikiwiki/code/47047
- Importance
- 3
- Easy to solve?
- 9
- Priority
- 27
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 4607
- Created
- Thursday 25 July, 2013 11:22:10 UTC
by Clif Kussmaul - LastModif
- Saturday 06 July, 2024 10:21:44 UTC