{if $categoryName|isset && $categoryName|str_ends_with:'.*'}
- {assign var='__categoryNameStart' value=$categoryName|substr:0:-1}
+ {assign var='__categoryNameStart' value=$categoryName|mb_substr:0:-1}
{/if}
<script data-relocate="true">
$(function() {
-{assign var='maximum' value=7}
-{if $notifications|count == $maximum + 1}{assign var='maximum' value=$maximum + 1}{/if}
-{assign var='remaining' value=$notifications|count}
-{assign var='remaining' value=$remaining-$maximum}
{if $mimeType === 'text/plain'}
{capture assign='content'}
{lang}wcf.user.notification.mail.daily.plaintext.intro{/lang}
---------------
-{implode from=$notifications|array_slice:0:$maximum item='notification' glue="\n---------------\n\n"}
+{implode from=$notifications item='notification' glue="\n---------------\n\n"}
{assign var='event' value=$notification[event]}
{assign var='notificationContent' value=$notification[notificationContent]}
{assign var='notificationType' value=$notification[notificationType]}
{capture assign='content'}
{lang}wcf.user.notification.mail.daily.html.intro{/lang}
- {foreach from=$notifications|array_slice:0:$maximum item='notification'}
+ {foreach from=$notifications item='notification'}
{assign var='event' value=$notification[event]}
{assign var='notificationContent' value=$notification[notificationContent]}
{assign var='notificationType' value=$notification[notificationType]}
{if $categoryName|isset && $categoryName|str_ends_with:'.*'}
- {assign var='__categoryNameStart' value=$categoryName|substr:0:-1}
+ {assign var='__categoryNameStart' value=$categoryName|mb_substr:0:-1}
{/if}
<script data-relocate="true">
$(function() {
true
);
+ $maximumNotificationCount = 7;
+ $notificationCount = \count($notifications);
+ if ($notificationCount === $maximumNotificationCount + 1) {
+ $maximumNotificationCount++;
+ }
+ $remainingNotificationCount = $notificationCount - $maximumNotificationCount;
+ $notifications = \array_slice($notifications, 0, $maximumNotificationCount);
+
$html = new RecipientAwareTextMimePart(
'text/html',
'email_dailyNotification',
'wcf',
- ['notifications' => $notifications]
+ [
+ 'notifications' => $notifications,
+ 'remaining' => $remainingNotificationCount,
+ 'maximum' => $maximumNotificationCount,
+ 'notificationCount' => $notificationCount,
+ ]
);
$plainText = new RecipientAwareTextMimePart(
'text/plain',
'email_dailyNotification',
'wcf',
- ['notifications' => $notifications]
+ [
+ 'notifications' => $notifications,
+ 'remaining' => $remainingNotificationCount,
+ 'maximum' => $maximumNotificationCount,
+ 'notificationCount' => $notificationCount,
+ ]
);
$email->setBody(new MimePartFacade([$html, $plainText]));
$email->setBody(new PlainTextMimePart($language->getDynamicVariable('wcf.acp.exceptionLog.email.body', [
'date' => $timestamp,
'files' => $files,
+ 'logPath' => WCF_DIR . 'log/',
])));
$email->send();
RegistryHandler::getInstance()->set('com.woltlab.wcf', 'exceptionMailerTimestamp', TIME_NOW);
TextFormField::create('iconPath')
->objectProperty('wysiwygicon')
->label('wcf.acp.pip.bbcode.iconPath')
- ->description('wcf.acp.pip.bbcode.iconPath.description')
+ ->description(
+ 'wcf.acp.pip.bbcode.iconPath.description',
+ ['path' => WCF_DIR . 'icon/']
+ )
->required()
->maximumLength(255)
->addValidator(new FormFieldValidator('fileExists', static function (TextFormField $formField) {
TextFormField::create('smileyPath')
->objectProperty('path')
->label('wcf.acp.pip.smiley.smileyPath')
- ->description('wcf.acp.pip.smiley.smileyPath.description')
+ ->description(
+ 'wcf.acp.pip.smiley.smileyPath.description',
+ ['path' => WCF_DIR]
+ )
->required()
->maximumLength(255)
->addValidator($fileValidator),
TextFormField::create('smileyPath2x')
->objectProperty('path2x')
->label('wcf.acp.pip.smiley.smileyPath2x')
- ->description('wcf.acp.pip.smiley.smileyPath2x.description')
+ ->description(
+ 'wcf.acp.pip.smiley.smileyPath2x.description',
+ ['path' => WCF_DIR]
+ )
->maximumLength(255)
->addValidator($fileValidator),
]);
==================
{if $data[verdict]|isset}
{if $data[verdict] == 'corrupt'}
-Das Fehlerprotokoll ist defekt. Bitte prüfen Sie das Protokoll händisch: {'WCF_DIR'|constant}log/{$file}.txt
+Das Fehlerprotokoll ist defekt. Bitte prüfen Sie das Protokoll händisch: {$logPath}{$file}.txt
{elseif $data[verdict] == 'huge'}
-Das Fehlerprotokoll ist sehr groß. Bitte prüfen Sie das Protokoll händisch: {'WCF_DIR'|constant}log/{$file}.txt
+Das Fehlerprotokoll ist sehr groß. Bitte prüfen Sie das Protokoll händisch: {$logPath}{$file}.txt
{/if}
{else}
{foreach from=$data[messages] item=message}
<item name="wcf.acp.pip.bbcode.htmlOpen.error.leadingBracket"><![CDATA[Das Tag darf nicht mit einer spitzen Klammer beginnen.]]></item>
<item name="wcf.acp.pip.bbcode.htmlOpen.error.trailingBracket"><![CDATA[Das Tag darf nicht mit einer spitzen Klammer enden.]]></item>
<item name="wcf.acp.pip.bbcode.iconPath"><![CDATA[Pfad zur Icon-Datei]]></item>
- <item name="wcf.acp.pip.bbcode.iconPath.description"><![CDATA[Der angegebene Pfad muss relativ zu <kbd>{'WCF_DIR'|constant}icon/</kbd> sein.]]></item>
+ <item name="wcf.acp.pip.bbcode.iconPath.description"><![CDATA[Der angegebene Pfad muss relativ zu <kbd>{$path}</kbd> sein.]]></item>
<item name="wcf.acp.pip.bbcode.iconPath.error.fileDoesNotExist"><![CDATA[Die angegebene Datei existiert nicht.]]></item>
<item name="wcf.acp.pip.bbcode.iconType"><![CDATA[Button-Icon-Typ]]></item>
<item name="wcf.acp.pip.bbcode.iconType.filePath"><![CDATA[Bild]]></item>
<item name="wcf.acp.pip.smiley.smileyCode.description"><![CDATA[Primärer Smiley-Code, der in dieses Smiley umgewandelt wird.]]></item>
<item name="wcf.acp.pip.smiley.smileyCode.error.notUnique"><![CDATA[Der angegebene Smiley-Code wird bereits von einem anderen Smiley verwendet.]]></item>
<item name="wcf.acp.pip.smiley.smileyPath"><![CDATA[Smiley-Pfad]]></item>
- <item name="wcf.acp.pip.smiley.smileyPath.description"><![CDATA[Der angegebene Pfad muss relativ zu <kbd>{'WCF_DIR'|constant}</kbd> sein.]]></item>
+ <item name="wcf.acp.pip.smiley.smileyPath.description"><![CDATA[Der angegebene Pfad muss relativ zu <kbd>{$path}</kbd> sein.]]></item>
<item name="wcf.acp.pip.smiley.smileyPath.error.fileDoesNotExist"><![CDATA[Die angegebene Datei existiert nicht.]]></item>
<item name="wcf.acp.pip.smiley.smileyPath2x"><![CDATA[Smiley-Pfad (HD)]]></item>
- <item name="wcf.acp.pip.smiley.smileyPath2x.description"><![CDATA[Der angegebene Pfad muss relativ zu <kbd>{'WCF_DIR'|constant}</kbd> sein.]]></item>
+ <item name="wcf.acp.pip.smiley.smileyPath2x.description"><![CDATA[Der angegebene Pfad muss relativ zu <kbd>{$path}</kbd> sein.]]></item>
<item name="wcf.acp.pip.option.optionName.error.notUnique"><![CDATA[Der angegebene Optionsname wird bereits von einer anderen Option verwendet.]]></item>
<item name="wcf.acp.pip.option.options.hidden"><![CDATA[Versteckte Option]]></item>
<item name="wcf.acp.pip.option.options.hidden.description"><![CDATA[Der Wert der Option kann vom Administrator nicht über die Administrationsoberfläche selbst geändert werden.]]></item>
<item name="wcf.user.notification.mail.daily.subject"><![CDATA[{if $count == 1}Neue Benachrichtigung{else}{#$count} neue Benachrichtigungen{/if}]]></item>
<item name="wcf.user.notification.mail.daily.plaintext.intro"><![CDATA[Hallo {@$mailbox->getUser()->username},
-{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} derzeit insgesamt {#$notifications|count} ungelesene Benachrichtigung{if $notifications|count != 1}en{/if}, die älter als 24 Stunden {if $notifications|count == 1}ist{else}sind{/if}:]]></item>
- <item name="wcf.user.notification.mail.daily.plaintext.outro"><![CDATA[{if $notifications|count > $maximum}{if LANGUAGE_USE_INFORMAL_VARIANT}Besuche deine{else}Besuchen Sie Ihre{/if} Benachrichtigungs-Übersicht [URL:{link controller='NotificationList' isEmail=true}{/link}], um auch die restlichen {#$remaining} Benachrichtigungen einzusehen.
+{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} derzeit insgesamt {#$notificationCount} ungelesene Benachrichtigung{if $notificationCount != 1}en{/if}, die älter als 24 Stunden {if $notificationCount == 1}ist{else}sind{/if}:]]></item>
+ <item name="wcf.user.notification.mail.daily.plaintext.outro"><![CDATA[{if $remaining}{if LANGUAGE_USE_INFORMAL_VARIANT}Besuche deine{else}Besuchen Sie Ihre{/if} Benachrichtigungs-Übersicht [URL:{link controller='NotificationList' isEmail=true}{/link}], um auch die restlichen {#$remaining} Benachrichtigungen einzusehen.
{/if}Diese E-Mail ist eine automatische Benachrichtigung. BITTE {if LANGUAGE_USE_INFORMAL_VARIANT}ANTWORTE{else}ANTWORTEN SIE{/if} NICHT AUF DIESE E-MAIL.
Wenn {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} keine E-Mail-Benachrichtigungen mehr erhalten {if LANGUAGE_USE_INFORMAL_VARIANT}möchtest{else}möchten{/if}, dann {if LANGUAGE_USE_INFORMAL_VARIANT}kannst du{else}können Sie{/if} diese direkt abbestellen: {link controller='NotificationUnsubscribe' isEmail=true}userID={@$mailbox->getUser()->userID}&token={@$mailbox->getUser()->notificationMailToken}{/link}.]]></item>
<item name="wcf.user.notification.mail.daily.html.intro"><![CDATA[<h2>Hallo {@$mailbox->getUser()->username},</h2>
-<p>{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} derzeit insgesamt {#$notifications|count} ungelesene Benachrichtigung{if $notifications|count != 1}en{/if}, die älter als 24 Stunden {if $notifications|count == 1}ist{else}sind{/if}:</p>]]></item>
- <item name="wcf.user.notification.mail.daily.html.outro"><![CDATA[{if $notifications|count > $maximum}<p>{if LANGUAGE_USE_INFORMAL_VARIANT}Besuche{else}Besuchen Sie{/if} <a href="{link controller='NotificationList' isHtmlEmail=true}{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}deine{else}Ihre{/if} Benachrichtigungs-Übersicht</a>, um auch die restlichen {#$remaining} Benachrichtigungen einzusehen.</p>{/if}
+<p>{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} derzeit insgesamt {#$notificationCount} ungelesene Benachrichtigung{if $notificationCount != 1}en{/if}, die älter als 24 Stunden {if $notificationCount == 1}ist{else}sind{/if}:</p>]]></item>
+ <item name="wcf.user.notification.mail.daily.html.outro"><![CDATA[{if $remaining}<p>{if LANGUAGE_USE_INFORMAL_VARIANT}Besuche{else}Besuchen Sie{/if} <a href="{link controller='NotificationList' isHtmlEmail=true}{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}deine{else}Ihre{/if} Benachrichtigungs-Übersicht</a>, um auch die restlichen {#$remaining} Benachrichtigungen einzusehen.</p>{/if}
<p>Diese E-Mail ist eine automatische Benachrichtigung. <b>Bitte {if LANGUAGE_USE_INFORMAL_VARIANT}antworte{else}antworten Sie{/if} nicht auf diese E-Mail</b>.</p>
==================
{if $data[verdict]|isset}
{if $data[verdict] == 'corrupt'}
-This protocol file is corrupted. Please check the protocol manually: {'WCF_DIR'|constant}log/{$file}.txt
+This protocol file is corrupted. Please check the protocol manually: {$logPath}{$file}.txt
{elseif $data[verdict] == 'huge'}
-This protocol file is very large. Please check the protocol manually: {'WCF_DIR'|constant}log/{$file}.txt
+This protocol file is very large. Please check the protocol manually: {$logPath}{$file}.txt
{/if}
{else}
{foreach from=$data[messages] item=message}
<item name="wcf.acp.pip.bbcode.iconType.filePath"><![CDATA[Image]]></item>
<item name="wcf.acp.pip.bbcode.iconType.fontAwesome"><![CDATA[FontAwesome Icon]]></item>
<item name="wcf.acp.pip.bbcode.iconPath"><![CDATA[Path to icon file]]></item>
- <item name="wcf.acp.pip.bbcode.iconPath.description"><![CDATA[The entered path has to be relative to <kbd>{'WCF_DIR'|constant}icon/</kbd>.]]></item>
+ <item name="wcf.acp.pip.bbcode.iconPath.description"><![CDATA[The entered path has to be relative to <kbd>{$path}</kbd>.]]></item>
<item name="wcf.acp.pip.bbcode.iconPath.error.fileDoesNotExist"><![CDATA[The entered file does not exist.]]></item>
<item name="wcf.acp.pip.bbcode.wysiwygIcon"><![CDATA[Icon]]></item>
<item name="wcf.acp.pip.smiley.smileyCode"><![CDATA[Primary Smiley Code]]></item>
<item name="wcf.acp.pip.smiley.aliases.error.notUnique"><![CDATA[The following aliases are already used by another smiley: {implode from=$notUniqueCodes item=notUniqueCode}<kbd>{$notUniqueCode}</kbd>{/implode}.]]></item>
<item name="wcf.acp.pip.smiley.showOrder.description"><![CDATA[The entered value determines in which order the smilies are shown.]]></item>
<item name="wcf.acp.pip.smiley.smileyPath"><![CDATA[Smiley Path]]></item>
- <item name="wcf.acp.pip.smiley.smileyPath.description"><![CDATA[The entered path has to be relative to <kbd>{'WCF_DIR'|constant}</kbd>.]]></item>
+ <item name="wcf.acp.pip.smiley.smileyPath.description"><![CDATA[The entered path has to be relative to <kbd>{$path}</kbd>.]]></item>
<item name="wcf.acp.pip.smiley.smileyPath.error.fileDoesNotExist"><![CDATA[The entered file does not exist.]]></item>
<item name="wcf.acp.pip.smiley.smileyPath2x"><![CDATA[HD Smiley Path]]></item>
- <item name="wcf.acp.pip.smiley.smileyPath2x.description"><![CDATA[The entered path has to be relative to <kbd>{'WCF_DIR'|constant}</kbd>.]]></item>
+ <item name="wcf.acp.pip.smiley.smileyPath2x.description"><![CDATA[The entered path has to be relative to <kbd>{$path}</kbd>.]]></item>
<item name="wcf.acp.pip.userGroupOption.options.usersOnly"><![CDATA[Members Only]]></item>
<item name="wcf.acp.pip.userGroupOption.options.usersOnly.description"><![CDATA[The user group option is only available for registered members-only user groups.]]></item>
<item name="wcf.acp.pip.userGroupOption.options.optionType.description"><![CDATA[The option type determines the interface with which the value of the user group option is set and which (types of) values the option may have. Additionally, the option type also determines how the final option value is determined if a user is in multiple user groups with different option values.]]></item>
<item name="wcf.user.notification.mail.daily.subject"><![CDATA[{if $count == 1}New Notification{else}{#$count} New Notifications{/if}]]></item>
<item name="wcf.user.notification.mail.daily.plaintext.intro"><![CDATA[Dear {@$mailbox->getUser()->username},
-You currently have {#$notifications|count} unread notification{if $notifications|count != 1}s{/if} older than 24 hours:]]></item>
- <item name="wcf.user.notification.mail.daily.plaintext.outro"><![CDATA[{if $notifications|count > $maximum}Visit your notification list [URL:{link controller='NotificationList' isEmail=true}{/link}] to view the remaining {#$remaining} notifications.
+You currently have {#$notificationCount} unread notification{if $notificationCount != 1}s{/if} older than 24 hours:]]></item>
+ <item name="wcf.user.notification.mail.daily.plaintext.outro"><![CDATA[{if $remaining}Visit your notification list [URL:{link controller='NotificationList' isEmail=true}{/link}] to view the remaining {#$remaining} notifications.
{/if}This is an automatic notification, PLEASE DO NOT REPLY TO THIS EMAIL!
{link controller='NotificationUnsubscribe' isEmail=true}userID={@$mailbox->getUser()->userID}&token={@$mailbox->getUser()->notificationMailToken}{/link}]]></item>
<item name="wcf.user.notification.mail.daily.html.intro"><![CDATA[<h2>Dear {$mailbox->getUser()->username},</h2>
-<p>You currently have {#$notifications|count} unread notification{if $notifications|count != 1}s{/if} older than 24 hours:</p>]]></item>
- <item name="wcf.user.notification.mail.daily.html.outro"><![CDATA[<p>{if $notifications|count > $maximum}Visit your <a href="{link controller='NotificationList' isHtmlEmail=true}{/link}">notification list</a> to view the remaining {#$remaining} notifications.</p>{/if}
+<p>You currently have {#$notificationCount} unread notification{if $notificationCount != 1}s{/if} older than 24 hours:</p>]]></item>
+ <item name="wcf.user.notification.mail.daily.html.outro"><![CDATA[<p>{if $remaining}Visit your <a href="{link controller='NotificationList' isHtmlEmail=true}{/link}">notification list</a> to view the remaining {#$remaining} notifications.</p>{/if}
<p>This is an automatic notification, <b>please do not reply to this email</b>!</p>