Tags:
email1Add my vote for this tag create new tag
, view all tags

NotificationPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on NotificationPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on NotificationPlugin

-- JackYu - 15 Mar 2005

I installed NotificationPlugin, and created JackYuNotifyList under Main web. I put Main and WebHome under Immediate notify topic list, and I tried to modify Main several times. Nothing send to my email.

I have NET:SMTP installed, and changed formatGmTime to formatTime. Because seems formatGmTime either too new or too old, not work with my TWIki installation Sep 2 2004 version.

No error or warning or any meaningful message in twiki log.

Any suggestion? Thanks

-- RichardBaar - 11 May 2004

Any extra installation step for Windows servers (Cygwin)? I've followed installation instructions, created my FernandoMoraesNotifyList topic in Main and filled it with some topic. When I change that topic no notification is sent. Any ideas?

-- FernandoMoraes - 03 Feb 2004

Did you put the topic into immediate notify topic section?? And I use in my script default sendEmail method from Net.pm file. This file needs Net::SMTP module to be installed or it use 'sendmail' for sending mails. I think that in Cygwin is not 'sendmail' and if you have not installed Net::SMTP module than this is the reason why TWiki didn't send mails. Please, check if you have Net::SMTP module installed...

-- RichardBaar - 03 Feb 2004

Yes, I put the topic in the immediate notify section, and the Net::SMTP is installed: the automated email notification of user registration is been sent correclty. I'm going to do some other tests and tell you the results... Thanks for now!

-- FernandoMoraes - 04 Feb 2004

Hi, maybe should help to uncomment my debug lines and found where the notification crash. Or did you watch file 'warnings.txt' in data dir if there is something what could help you to localize the problem??

-- RichardBaar - 05 Feb 2004

Where do I start. Note that I'm not looking to flame anybody here, but from what I can see, this plugin needs lots of work before it's going to be usable as a drop in package. I'll admit that I don't know much (if any Perl), but I'm trying to get the plugin working and I can see problems like:

  • 'htmlchanges' doesn't exist as a template in the plugin zip, nor is included in the base TWiki files but is referenced in the plugin perl code.
  • The plugin doesn't check for immediate notification topics, webs or regexps, although I'm guessing it should. Appears to only check for regular notifications on lines 48, 49 and 50.
  • Probably more issues, but I haven't found them yet.

Someone should probably take a look.

-- NathanReeves - 10 Feb 2004

I am sorry I forget to include the htmlchanges template in the package. Now it should be OK.

But I don't understand why you think that the plugin doesn't handle immediate notifications. I can't agree with you because this plugin CHECKS immediate notifications!! These notifications are checked in function getUsersToNotify and this function is called from beforeSaveHandler. And the regular notifications are checked in mailnotify script and I add only the support for regexp notifications as you can see in mailnotify script. I tried to install this plugin on clear TWiki (Linux) and everythink works well. I don't think that there are any other issues...

-- RichardBaar - 10 Feb 2004

Okay, need to apologise if the prev comment was a tad on the flame side. Didn't need to be like that. Thanks for uploading the missing template. I think I can see what you're talking about with immediate notifications, my lack of looking through the code to blame there. I'll take a look tomorrow and see if I can get it working.

Thanks for the effort in getting this plugin together. Looks like it fits what I want to do and will be good once I get it working.

Cheers -- NathanReeves - 10 Feb 2004

Install comments

The packaging of this plugin does not conform to our (albeit crap) standards. They say that the top level should contain lib/ , data/ etc, whereas yours have an intermediate top level:
mrjcleaver@cp1:testwiki$ unzip patches/NotificationPlugin.zip
Archive:  patches/NotificationPlugin.zip
   creating: NotificationPlugin/
   creating: NotificationPlugin/bin/
  inflating: NotificationPlugin/bin/mailnotify
   creating: NotificationPlugin/data/
   creating: NotificationPlugin/data/TWiki/
  inflating: NotificationPlugin/data/TWiki/NotificationPlugin.txt
  inflating: NotificationPlugin/data/TWiki/NotificationPlugin.txt,v
  inflating: NotificationPlugin/data/TWiki/NotifyListTemplate.txt
   creating: NotificationPlugin/lib/
   creating: NotificationPlugin/lib/TWiki/
   creating: NotificationPlugin/lib/TWiki/Plugins/
  inflating: NotificationPlugin/lib/TWiki/Plugins/NotificationPlugin.pm
   creating: NotificationPlugin/templates/
  inflating: NotificationPlugin/templates/htmlchanges.tmpl

Please either argue why you think we should change or standard or alter your plugin to comply. smile

Many thanks, this does look interesting. If your system is good enough I would support its use as a replacement for the default mechanism.

Additionally:

  1. I note that you replace bin/mailnotify. This is not necessarily bad, but please put a case forward for what you did and why and also see whether you can improve the who system by instead adding a hook into mailnotify and using this to override the default behaviour.
  2. Additionally, the template name htmlchanges is likely to get lost in the templates directory. I think we need a mechanism for plugins to store templates in a well defined, Plugins centric place.
  3. Lastly, I think the data/* topics should all start with NotificationPlugin, meaning that unless adopted by the CoreTeam, NotifyListTemplate should be named NotificationPluginListTemplate

Usage

  1. Running it gave me the following output:
I note that you start the script with a hard dependency on your plugin. See point (1) above.
    • use TWiki::Plugins::NotificationPlugin;
  1. The NotifyListTemplate needs explanatory text - many users will not understand what the headings mean (Indeed, I'm not sure that I do yet!)

-- MartinCleaver - 15 Feb 2004

I installed this plugin on a unix twiki server (Solaris). I've noticed a few things:

  • the plugin module (used either directly in immediate notifications or via a cron run of the mailnotify script) returns lines with a carriage-return ^M at the end. Later tests then fail when we try string compare of things like $web.$topicname eq $ttopic since once has a ^M at the end and the other does not - resulting on no notifications at all. I hacked mailnotify to chop the arrays returned from getNotificationsOfUser calls, and (for immediate notifications) modified sub getUsersToNotify to chop $line for each line it processes from a user's notify page (those two changes would be better both being done in the module itself but I was just hacking it into working).
  • I installed your mailnotify with a new name in the bin directory so that older WebNotify notifications can continue to work in addition to these.
  • I think that "Minor Changes, Don't Notify" has stopped working because of the installation of this module. I don't know if "no notify" is designed to work with this new plugin (I don't know how the save action hooks to plugins) but it seems also not to have any effect now for WebNotify changes either (ie, ie see the .changes file grow even when the don't notify box is ticked.

Otherwise it's been great - addressed a real need. Thanks.

-- GavinMaltby

For MartinCleaver:

Hi, I rebuilded the NotificationPlugin to fulfil TWiki installation requirements. I am sorry that I don't do this before.

And now to your questions:

  1. I think that you need not to replace original 'mailnotify' script. You can rename my script and set new cron job and this problem is solved. smile I replace original script in our TWiki installation because it doesn't come up with our requirements.
  2. I think that I can't do mutch more with this task. It should be solved by CoreTeam.
  3. I renamed the NotifyListTemplate to NotificationPluginListTemplate

For GavinMaltby:

Hi, I will try to to add the support of choping ^M characters on the end of the lines. In our (Linux based) TWiki I have no problems with it. I also add new description in NotificationPlugin where you can find that immediate notifications are not based on 'Don't notify' rule. If you set immediate notification on a topic you will be notified about ANY change. Maybe I will add support to ignore 'Don't notify' changes or not in the NotificationPlugin settings. The regular notifications works with the support of 'Don't notify' rule.

-- RichardBaar - 18 Feb 2004

I've been working on setting up the NotificationPlugin and noticed that each save "transaction" generated a number of httpd error log entries and only occasionally sent emails.

The first problem I fixed was at the end of line 218. I changed &TWiki::formatGmTime( time() . " GMT"); to &TWiki::formatGmTime( time() ) . " GMT";. Now when an email does arrive the timestamp in the message body includes 'GMT'.

The other problem I found was in the getUsersToNotify subroutine. In a number of the iterations in the innermost foreach loop the $test variable ended up undefined. By adding an additional conditional to the if statement on line 305 I was able to elimiate those errors and actually get the plugin to generate immediate notifications. I changed line 305 from $test = "" if ( ( $test ne "" ) && ( $line !~ /^\s*\*/ ) ); to $test = "" if ( ( defined($test) ) || (( $test ne "" ) && ( $line !~ /^\s*\*/ )) ); I'm also not sure if $test should be declared with my.

thanks for a very useful tool.

-- NormProffitt - 23 Feb 2004

Hi,

I attached new version of NotificationPlugin. There should be the fixes of carriage-return ^M characters at the end of lines (thanx GavinMaltby) and I fixed code to not generate so many error log entries (thanx NormProffitt). I also added new variable SENDER for easy change 'From' address in mails. Now you don't need to edit the code.

-- RichardBaar - 24 Feb 2004

Hi, Richard,

There seems to be a misprint in NotificationPlugin.pm, producing the following error:

[error] Undefined subroutine &TWiki::Plugins::NotificationPlugin::getUserEmaIl called at ../lib/TWiki/Plugins/NotificationPlugin.pm line 372., referer

As the result, Apache throws Internal Server Error at the unsuspecting user. I believe, this call should read getUserEmail instead of getUserEmaIl. At least, fixing the spelling eliminates the code 500 error.

I still couldn't get the thing to actually send notifications. (The standard mailnotify works fine.) Will go on trying... smile

-- MikhailZislis - 24 Feb 2004

Well, you catch to download the package in the time where there was the misprint. I upload correct package when I found the same problem on our TWiki. I apologize for this annoyance.

-- RichardBaar - 24 Feb 2004

Richard,

I found another bug in the code that is causing three uninitialized value error log entries per save transaction and causes funny urls to be generated in the notification email. The problem in the getScriptUrl call on line 221 of your new NotificationPlugin.pm. getScriptUrl() wants three parameters and it's getting zero. I changed the code from from &TWiki::getScriptUrl()."view/$_[2]/$_[1] has been..." to &TWiki::getScriptUrl($_[2], $_[1], "view") . " has been ...". I now get zero errors.

Thanks

-- NormProffitt - 24 Feb 2004

Richard - thanks for your updates. Another thing that sprung to mind: it would be extremely useful to have a that could be added to a page that would add a button that could add or remove the current page to a personal watchlist.

I can imagine showing this button on every page. It would say "email me about updates"; clicking it would make or remove entries on Main.RichardBarrMailNotify

To show the button on every page is of course easy - we just embed it in the template. The button calls your plugin and the plugin makes the change to the user's MailNotify page.

The benefit of this is that individuals would not need to be concerned about how their mail notify page works - dumb users can just use the add/remove button.

-- MartinCleaver 27 Feb 2004

It seems that TWiki developers made the function formatGmTime deprecated. Someone please update the NotificationPlugin to call the formatTime function (with "gmtime" parameter) instead.

-- NikolayDiakov - 04 Apr 2004

Nikolay, I got them to bring formatGmTime back, for at least another release. If you change the code to use formatTime with the gmtime parameter it won't work with older releases of TWiki, only Cairo; but if you leave it as it is, it will continue to work.

-- CrawfordCurrie - 05 Apr 2004

Does this send one email per person rather than one email per web? It is not clear from the summary.

-- MartinCleaver - 07 Apr 2004

Hi, this plugin send one email per person.

And about the buttons on pages to quickly setup notifications. I have now no time to do this. frown But I hope that in next 2 weeks I will create the UI...

-- RichardBaar - 07 Apr 2004

Thanks for the rapid reply, Richard .

Great, such buttons will be a wonderful usability improvement, Richard. If you want to discuss specification feel free to join us on TWikiIRC.

Cheers, Martin.

-- MartinCleaver - 07 Apr 2004

Richard

  1. would you be interested in subsuming the code in ImmediateNotifyPlugin into your plugin?
  2. You commented out the error reporting under debug - you've got some good debug statements in there - don't disable them!
  3. Default sender is hidden in normal view because it is put between <> ; it should be %!WIKIWEBMASTER% - yet this does not work because you don't expand the tags.

-- MartinCleaver - 11 Apr 2004

i add a topic into myNotifyList in my wiki, after i exec the ./mailNotify -q, this topic won't be modified any longer, when I save the modification I got an interanl error in the browser,apache's error-log tell me:

  • [Thu Apr 08 16:11:39 2004] [error] [client 192.168.0.51] Premature end of scrip headers: register, referer:http://oracle10g/twiki/bin/view/TWiki/TWikiRegistrtion

-- JingYuan - 13 Apr 2004

Richard,

It seems that a trailing space within a topic name prevents the plugin from generating notification for this topic. I believe you need something like

$line =~ s/\s+$//; # Remove trailing whitespace

around line 349 in NotificationPlugin.pm.

-- MikhailZislis - 16 Apr 2004

thanks ,but it doesn't work ,I have to modify the ./bin/save perl script, delete the "T" from the first line,It's ok now.

Because I find that apache error log said:

[Tue Apr 20 17:59:29 2004] [error] [client 192.168.0.51] Premature end of script headers: save, referer:http://oracle10g/twiki/bin/preview/Sandbox/TestTopic1 [Tue Apr 20 17:59:29 2004] [error] [client 192.168.0.51] Insecure dependency inconnect while running with -T switch at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/IO/Socket.pm line 114., referer:http://oracle10g/twiki/bin/preview/Sandbox/TestTopic1

-- JingYuan - 20 Apr 2004

Hi,

I rewrite parts of NotificationPlugin to be more function-based and I can create fast switching notifications. You can now add variable %NTF{}% to your view templates and let users to switch notifications only with one click. But the buttons will be displayed only if user is logged in! It means you should have your TWiki login based (in .htaccess should be:

<Files "view">
        require valid-user
</Files> 

) or you can use SessionPlugin to hold user login after any edit action.

In our company I create simple "logon" script and when user is not login than there is link on the page to this script and in .htaccess I have set:

<Files "logon">
        require valid-user
</Files> 

This ensures that users can very fast login and then I use SessionPlugin to hold this login during the session.

There may be also problems with caching on the browser side. I use in our TWiki my TWikiCacheAddOn and I solve problem with caching for using with NTF variable, but I don't test it without this add-on..

-- RichardBaar - 26 Apr 2004

Martin,

why do you want to add the code from ImmediateNotifyPlugin?? I have to say that this plugin was the base point for me to write my plugin and the problem I hate with ImmediateNotifyPlugin (eventually the whole notification system in TWiki) that it is not centralized for one user. We have a lot of webs (today more then 60) and to set notifications and edit WebNotify topics in more than 3 webs was user-unfriendly... That's why I write plugin with centralized notifications and you can edit only one topic!!

  • The thing I like about that is the option of the different transports - messenger for example. Like you I run wikis with LotsOfSmallWebs so find web-centric with multiple webs is unmanageable.

-- RichardBaar - 26 Apr 2004

Two small fixes for v1.1, both in NotificationPlugin.pm:

line 519:   $opt = $1 if ( $attr =~ /optional=\"(.*?)\"/ ); should be
            $opt = $1 if ( $attrs =~ /optional=\"(.*?)\"/ );
and line 343: $test = $1 if ( $line =~ /$sections[$section]/ ); should be
              $test = $1 if ( $line =~ /$section/ );
I would also echo Mikhail's suggestion above to replace:
line 317-319:   while ( ( $line =~ /\n$/ ) || ( $line =~ /\r$/ ) ) {
                   chop( $line );
                }
with            $line =~ s/\s+$//; # Remove trailing whitespace

-- KenGoldenberg - 27 Apr 2004

I fixed the small bug on line 519 and changed the code for removing trailing whitespaces. There is new version of NotificationPlugin with these bug-fixes...

The line 343 is correct because $section (parameter of the function) is number from 0 to 5 and this number is index in @sections array where is text for search... I can create maybe hash-array for this with more descriptive key-names than numbers...

-- RichardBaar - 28 Apr 2004

This is starting to look really promising Richard!

Does this now mean that your plugin fulfils the functionality of PerTopicWebNotifyReports - i.e. a way for people to be subscribed to just a topic? If so, that's great.

  1. We can even add a BeforeSaveHandler to automatically subscribe people to topics they contribute to.
  2. We can get rid of the InterestedParties meta field

Also see my comment above about ImmediateNotifyPlugin.

-- MartinCleaver - 28 Apr 2004

I wasn't sure if line 343 was correct or line 228 (call to getUsersToNotify()) since arg 3 in that call is a regexp. Works either way as long as they match. I like the idea of moving to a data structure with more recognizable keys...

-- KenGoldenberg - 28 Apr 2004

Hi Ken,

take my apologize, please. When I have read your comment for first time I don't see wich parameters I use when I call this function. You are right... I just put new version of NotificationPlugin with remade getUsersToNotify() function. I think that now it should be OK.

-- RichardBaar - 28 Apr 2004

No offense taken. The more I'm playing with your plugin the happier I am with it. I made one mod that I hope you might consider adopting. I added support in bin/changenotify to create/process a list of checkboxes (while still supporting the distinct buttons) This way a link in the view template can open a popup window with checkboxes for each kind of notification. The buttons weren't working for me in Mozilla (I think because the javascript was tripping on the rewritten &'s. ...It also takes up less screen real estate, which I like since users rarely need to change their notifications... I'll wrestle it into a diff tonight.

-- KenGoldenberg - 29 Apr 2004

Until the NotificationHandler is established, I think it would be better to rename your mailnotify script from bin/mailnotify (which clashes with the TWiki supplied one) to bin/mailnotify-NotificationPlugin; else notifications people sign up to using WebNotify stop working, with no warning to the administrator.

Once NotificationHandler is ratified you can contain all your code in your plugin directory. Perhaps, Richard, you'd like to comment in MorePluginHooks?

-- MartinCleaver - 03 May 2004

Richard - I suspect there is significant overlap of this with MailNotificationEnhanced. Do you agree? I am interested in ensuring that the maximum number of people use a single implementation so that the precious resources of the TWikiCommunity are put to efficient use and we don't end up stepping on each other's toes.

-- MartinCleaver - 08 May 2004

Richard, I've attached a modified bin/mailnotify (about 80 lines of unified diffs) which allows for a "popup" interface as well as the buttons. I'd appreciate it if you'd consider adopting it (or something like it) into the plugin. I also noticed an unrelated bug/feature that I'm not sure is completely intended:

NotificationPlugin::saveUserNotifyList calls TWiki::Store::saveTopic with repRev which replaces the last revision but doesn't update changes. Presumably this is intended, ie: don't create lots of changelist activity for notification mods. The thing is, if the {username}NotifyList topic is initially empty, the topic appears to be created in 1970 (Unix epoch) which is kind of ugly...

-- KenGoldenberg - 10 May 2004

Hi Ken,

I add your popup support to NotificationPlugin code. I only remove your if condition when user is TWikiGuest because you redirect to topic which is only in your TWiki.

I also fix the problem with non-existing NotifyList. When there is not NotifyList topic then I don't use repRev in saveTopic...

-- RichardBaar - 11 May 2004

Hi Martin,

I read MailNotificationEnhanced and I agree that the functionality is very similar. I will try to put interesting features into NotificationPlugin when I have time for it. I think that this features will be nice to have:

  • copy of sended mails (optional because in many cases it will grow (especially with immediate notifications) very, very fast...
  • LDAP search for mail
  • per user mailnotify frequency
    • define notification time interval
  • user-defined templates for mail notifications

I am not sure with the support of sending notifications against topic content or author. It means to read every topic and grep the content and I don't think that for big TWikis it is good strategy.

-- RichardBaar - 11 May 2004

Great, Richard.

I've sketched out a ConsolidateNotification topic - perhaps you can give that some real substance and use it to negotiate out how to share out the task of making a single, powerful yet simple notifications system?

-- MartinCleaver - 12 May 2004

Richard - is there any chance that you can create an LDAPUser.pm for the core? I don't have any idea about LDAP, but once we have that, all plugins would be able to use it to get user info (from whatever system twiki is configured to use). Obviously we would need to add API's to support getting the Email via the User class - but this info really should be consolidated anyway.

-- SvenDowideit - 12 May 2004

Breaks on cairo

Richard - did you know this breaks on the Cairo Alpha? Your direct call to TWiki::formatGmTime is illegal (see PluginsConformanceReport) and furthermore that routine no longer exists in Cairo.

-- MartinCleaver - 12 May 2004

It turns out that that routine exists in the FuncDotPm, I followed the spec but I think the use of 'gmtime' like this might be wrong. Still, its a start.

--- NotificationPlugin.pm~      2004-05-11 12:51:24.000000000 -0500
+++ NotificationPlugin.pm       2004-05-18 10:36:29.000000000 -0500
@@ -231,7 +231,7 @@
   push( @notifyUsers, getUsersToNotify( $_[2], $_[1], 2 ) );
   #&TWiki::Func::writeDebug( "COUNT = $#notifyUsers" );
   my $subject = "Topic $_[2].$_[1] has been changed by $wikiUser.";
-  my $body = "Topic ".&TWiki::getScriptUrl( $_[2], $_[1], "view" )." has been changed by $wikiUser at " . &TWiki::formatGmTime( time() ) . " GMT";
+  my $body = "Topic ".&TWiki::getScriptUrl( $_[2], $_[1], "view" )." has been changed by $wikiUser at " . TWiki::Func::formatTime( time(), "gmtime" ) . " GMT";
   notifyUsers( \@notifyUsers, $subject, $body );
 }

Keep up the good work! M.

-- MartinCleaver - 19 May 2004

I noticed this too, though I didn't see your solution until I started looking for a place to comment about how I fixed it! smile With this one change the plug-in should work now? Hope so, thanks for the plug-in.

-- DavidMonaghan - 06 Dec 2004

Using the Template

This plugin looks like it will work for our site, but How do I make use of the NotificationPluginTemplate template so that it will automatically create the proper page when a user creates Their own notify list with the topic name %Your_user_name%NotifyList?

Thanks for any help, and sorry if this is the wrong place to ask this.

-- RyanLangseth - 21 Jul 2004

Is there a way to use mailnotify and mailnotify-NP at the same time? Both scripts seem to set the time of the last notification at the same place, so if one script has sent its mails the other will report no changes.

-- HenrikWeber - 23 Jul 2004

Hi Ryan,

well, this is currently not possible. But if you look in the code there is function checkUserNotifyList in which I check if %user_name%NotifyList topic exists and if not I create new one from template. I can add this function to beforeEditHandler hook in NotificationPlugin.pm and this should ensure that when any user for first time started editing any topic, appropriate NotifyList topic will be created.

Do you think that this should solve your problem??

-- RichardBaar - 26 Jul 2004

Hi Henrik,

well, I think that without editing the code it is not possible. You should comment from mailnotify-NP this line:

&TWiki::Store::saveFile( "$dataDir/$web/.mailnotify", $currmodify ); 

And in the cron you have to specify to run first mailnotify-NP and then mailnotify...

-- RichardBaar - 26 Jul 2004

Security Hole

There is a small security hole in the plugin: By entering an invalid regular expression as for the regexp immediate notification like (?{die}) a user can stop the whole TWiki system: Every attempt to safe a topic results in an internal server error.

To fix: change

if ( "$tweb.$ttopic" =~ /$1/ ) {
to
my $pat = eval{qr($1)};
next if $@;
if ( "$tweb.$ttopic" =~ /$pat/ ) {
around line 339 in NotificationPlugin.pm and a similar patch around line 176 in mailnotify-NP:
my $pat = eval{ qr($tregex) };
next if $@;
if ( "$web.$topicName" =~ /$pat/ ) {

-- JChristophFuchs - 07 Oct 2004

Version 2.0?

First off, thanks very much for this plugin. I had several itches that needed to be scratched, starting with an incompatibility with TWiki-20040902, so took it upon myself to hack the code. I've attached my version NotificationPlugin-2_0.zip. I'm afraid that I had to perform some major surgery on the code, so you may no longer recognize it!

  • works with TWiki-20040902
  • fixed javascript bug with Gecko based browsers
  • mailnotify-NP now handles WebNotify requests
  • users can specify email style and format
  • users can specify format of NTF buttons
  • incorporated formatTime patch (MartinCleaver)
  • incorporated regex security fixes (JChristophFuchs)

-- DiabJerius - 02 Dec 2004

Diab - good work on this.

A couple of things:

  1. it does not work if you RenameTheMainWeb as you have hardcoded it during the changenotify process
  2. Did you take a look at the MailerContrib module talked about on ConsolidateNotification? I'd be interested if that does not meet your needs. I appreciate that no one has declared that to be the official way forward: you are supposed to gather this through osmosis. I suspect MailerContrib will replace the changenotify in DevelopBranch

That said, I intend to use your code until I can work out (or someone tells me) how I am supposed to add the pop up window for end users on MailerContribDev.

We need someone to drive ConsolidateNotification - given your expertise in the area would you like to take this on?

-- MartinCleaver - 04 Dec 2004

Martin, I'm afraid I can't schedule time reliably enough for that. I can do sporadic development, but that's about it. It's rather frustrating.

-- DiabJerius - 16 Dec 2004

I just took a look at MailerContrib; wish I had stumbled across it before. One nice thing about NotificationPlugin is that it's very easy for users to see which topics and webs they're subscribed to as they see a single page with all of their subscriptions, and only their subscriptions. The WebNotify style is too messy for my tastes, and too dangerous if someone edits things incorrectly.

-- DiabJerius - 16 Dec 2004

  1. I'm working on RenameTheMainWeb compatibility.
  2. In the interests of ConsolidateNotifications I will deprecate all plugins that compete with MailerContrib
  3. It strikes me that notify: off/periodic/immediately for topic notify as a continuous scale is better than separately on/off for periodic & immediate.

-- MartinCleaver - 20 Dec 2004

I think there is a bug in the error handling for saveUserNotifyList I was getting an internal server error when using the notification plugins because redirect was being passed an uninitialised query parameter.

  if ( $error ) {
    my $query = &TWiki::getCgiQuery();  # this line added to initalise $query
    my $url = &TWiki::getOopsUrl( $web, $topic, "oopssaveerr", $error );
    &TWiki::redirect( $query, $url );
  }    

the real error is

/usr/bin/ci -l -q -mnone -t-none -d'2004/12/30 18:50:49' -w'gjd' '/usr/local/twiki/data/Main/GavinDoddNotifyList.txt' '/usr/local/twiki/data/Main/GavinDoddNotifyList.txt,v' 2>&1
ci: /usr/local/twiki/data/Main/GavinDoddNotifyList.txt,v: no lock set by lock

if any one can offer help

-- GavinDodd - 20 Jan 2005

I got "Premature end of script headers: /usr/local/apache/htdocs/twiki/bin/register" in my twiki installation. It appears the problem happen when register call "sendEmail". If I comment that line in "register" script, it works fine just without email notification. I have set the SMTP hostname and sender name correctly, not sure which portion shall I change.

Thanks

-- JackYu - 16 Feb 2005

sync'ed v1.14 to CVS

-- WillNorris - 19 Jul 2005

The TIN and TN buttons still do not work with Firefox. The reason is the way location.href is used in the javascript code.

Below I have attached a diff which can be applied to lib/TWiki/Plugins/NotificationPlugin.pm using patch. It should make the TIN/TN buttons work again (works for me on Firefox and Konqueror, also on IE under Windows). The diff file is called javascriptButtonsFix.diff

run:

patch -p0 [path-to-twiki]/lib/TWiki/Plugins/NotificationPlugin.pm javascriptButtonsFix.diff

Hope this helps someone else out.

Oh, yeah, the patch is for NotificationPlugin version 1.14 ( 11 May 2004 - 10:54).

-- DjStauffer - 01 Sep 2005

OK, so I attached the file formatGmTime.diff before noticing other's comments and the diff already in this topic. Oh, well. Perhaps someone will find it due to the error message I quoted in the attachment comment.

That diff is also for version 1.14 of NotificationPlugin, by the way.

-- DjStauffer - 01 Sep 2005

The good news is that the Notification Plugin is exactly what my user base was asking for. The bad news is that you may need to revisit your formatting of time.

My users were complaining that our intranet TWiki was spouting GMT on notifications, something they felt was inappropriate. I went in and dug around in the configuration, thinking that I had a problem with using "systemtime" rather then "gmttime". That didn't pan out.

I see from history on this site that you have recently changed invocation of TWiki::Func::formatTime in beforeSaveHandler. What you ended up with is:

TWiki::Func::formatTime( time(), '', "gmtime" ) . " GMT";

I would suggest that, rather then hardcoding to GMT, you might want to reference $displayTimeValues in lib/TWiki.cfg or some other site/web wide configuraiton value based upon it.

-- BillKanawyer - 21 Nov 2005

This plugin does not seem to work on TWiki 4: I get

During save of Sandbox.WebHome an error was found by the version control system. Please notify your TWiki administrator.
=Undefined subroutine =
Perhaps the latest patch is not applied yet?

I've tried to update changes-srg-html.pattern.tmpl to 'synchronize' it with recent pattern skin changes, but I need the plugin to work first. Note that development is taking place in SVN. I've updated the plugin topic with a "create link" and some formatting changes.

-- ArthurClemens - 08 Mar 2006

Has anyone had any luck refactoring this plugin for TWiki 4?

-- SethTownsend - 20 Mar 2006

To the Plugin maintainer: This Plugin does not work in TWiki 4.0. Please consider upgrading it so that it runs on Cairo and Dakar codebase. HandlingCairoDakarPluginDifferences has more.

-- PeterThoeny - 20 Mar 2006

It would be very useful if this plugin could be activated on http://twiki.org/ (after making it fit for TWiki 4.0).

-- WolfgangSlany - 26 Apr 2006

The fine graned notification is covered by the MailerContrib, which is pre-installed in TWiki 4.0. That contrib has no immediate notification though.

-- PeterThoeny - 27 Apr 2006

See open support question on HowToCustomizeNotificationPlugin.

-- PeterThoeny - 18 Aug 2006

I had to change line 126 in the pm-file from

my $wikiUser = &TWiki::userToWikiName( $user, 1 ); to my $wikiUser = &TWiki::Func::userToWikiName( $user, 1 );

to avoid parse errors.

-- DortheLuebbert - 19 Jun 2007

Hi,

Notification plugin does not work anymore with TWIKI 4.2.2. I think it also does not work properly with 4.1. See the following error messages from webserver: Undefined subroutine &TWiki::writeHeader called at /var/www/twiki/bin/changenotify line 85

This function does not exists anymore in TWiki.pm.

Any ideas - corrections ? Thanks smile

-- AndreasDecker - 11 Sep 2008

I suggest that you try to replace NotificationPlugin by MailerContrib. It should do all you need and it's in the core package.

-- FranzJosefGigler - 11 Sep 2008

I have started working on the upgrade the codebase of this plugin - created bug Item6247 to checkin-checkout purposes.

Any ideas/issues welcome here smile

-- SopanShewale - 2009-04-10

I have added the new code in the repository - for testing - please feel free to pick the code from TWikis subversion repository. Noticed the plain-text mail is not working, i will correct that as soon as possible.

- SopanShewale - 14 April 2009

Released new version of this plugin at NotificationPlugin

Please feel free to suggest improvements/write comments in this topic

Thank you

-- SopanShewale - 2009-11-27

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip NotificationPlugin-2_0.zip r1 manage 27.5 K 2004-12-02 - 16:42 DiabJerius Major Updates
Unknown file formatEXT changenotify r1 manage 4.0 K 2004-05-10 - 18:06 KenGoldenberg Mods to support "popup" interface as well as buttons
Unknown file formatdiff formatGmTime.diff r1 manage 0.3 K 2005-09-01 - 05:19 DjStauffer Fixes the error "Undefined subroutine &TWiki::formatGmTime"
Unknown file formatdiff javascriptButtonsFix.diff r1 manage 2.2 K 2005-09-01 - 05:17 DjStauffer Fixes problems with TIN/TN buttons on Firefox/Konqueror
Edit | Attach | Watch | Print version | History: r76 < r75 < r74 < r73 < r72 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r76 - 2009-11-27 - SopanShewale
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.