|
Cookbook /
MessageAfterPostingSummary:Provide a message to users after posting and /or prompt them to notify relevant people
Version:
Prerequisites:PmWiki 2.1.beta33 or above
Status:
Maintainer:
Questions answered by this recipe
DescriptionThis recipe adds a new action 'notify' which is activated after posting and can be used for inclusion of a AllGroupHeader to give the user a message, which can be a prompt to email. Add the following to your config.php: if (@$_POST['diffclass'] != 'minor') $EditRedirectFmt = '{$Group}.{$Name}?action=notify';
if ($action=='notify') $FmtPV['$notify'] = "'true'";
$GroupHeaderFmt = '(:include $SiteGroup.AllGroupHeader:)(:nl:)'
.'(:include $Group.GroupHeader:)(:nl:)';
And then add the following to Site.AllGroupHeader
Prompt User to let relevant people knowIn my AllGroupHeader I have, as my message:
The email link creates a prewritten email message for the user to send - so it functions as an reminder to optionally send an email notification that the wiki has been updated - to whoever the user chooses - allowing the user to exercise discretion that PmWiki:Notify does not allow. NotesThe message does not appear after minor edits. To disable this, remove the You could use Cookbook:Mailform2 in your AllGroupHeader if you don't want to rely on the users email client being set up right - and to restrict the flexibility of the email more. This recipe is completely separate from PmWiki:Notify and there is no reason they couldn't be used together. Release NotesThere is probably a neater way to do the conditional markup and the notify variable - you could define a new Cookbook/ConditionalMarkupSamples and then use (:if action notify:) which is slightly neater. Feel free to improve it if you like. I was happy with this which worked for me.
CommentsYou can make your emails look much nicer by inserting line breaks. Use %0A for every line break. Here is a sample message with line breaks incorporated into the complete code required for the Site.AllGroupHeader page:
Thank you for your edit. Please click here to inform the relevant people that you have updated the wiki. See AlsoContributors |