Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Notification Email subject line
Avatar
escapingUser #1
Member since Aug 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Notification Email subject line
We use dokuwiki as an internal knowledge base and I have a page with the following setup:

Discussion plugin
Automatic Subscription Management

This page is used for news so when a new comment is made email is sent to all members of a group.

The mail works fine but I'm having trouble formatting the email. Particularly the subject line.

At first the subjects of the emails were something like "[wikititle][wikititle]New Comment".

I've got it down to "[][wikititle]"

I'm not sure where the second 'wikititle' is coming from, and I'd like to get rid of those pesky '[]'

Can anyone point me in the right direction?
Avatar
escapingUser #2
Member since Aug 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Managed to get rid of the leading '[]'.

They were located in the Mailer.class.php where it sets $prefix.

I don't like that I had to edit that file to do it but I know nothing of PHP so am just kind of fumbling around.

Still not sure where the Discussion plugin adds the wiki title to the subject though.
Avatar
escapingUser #3
Member since Aug 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Found the final [wikititle], it was in Discussion's 'action.php' file.

replaced "$subject_notify = '['.$conf['title'].'] '.$this->getLang('mail_newcomment');"

with
$mysubstr = mb_substr($comment['raw'], 0, 12);
$subject_notify = $this->getLang('mail_newcomment').$mysubstr;

So that the subject is something like "News Item: here is a com"
where the body is "here is a comment about some stuff"

Now the subject will at least somewhat resemble what the item is about.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-01-17, 06:01:44 (UTC +01:00)