Products.PloneboardSubscription

by Suresh V last modified Feb 16, 2011 02:06 AM

Enables email subscription to Ploneboard posts

Project Description

Products.PloneboardSubscription enables users to subscribe/unsubscribe to email
notification to a Ploneboard forum or a particular conversation. A "Subscribe/Unsubscribe"
link is provided on the forum or conversation and if the user chooses to subscribe, any further
comments made to the forum or conversation triggers an email.

The product creates a tool "portal_pbnotification" at the Plone site which contains some
parameters that can be set.

Current Release
Products.PloneboardSubscription 0.3

Released Apr 15, 2012 — tested with Plone 4.1, Plone 4, Plone 3

- Auto subscribe option : a user adding a comment will be added in the subscribers list for the corresponding conversation. (Stéphan Geulette) - Html email option : the mail can be sent in html format (Stéphan Geulette) - Email can contains different information levels (Stéphan Geulette)
More about this release…

If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
0.3 Apr 15, 2012 - Auto subscribe option : a user adding a comment will be added in the subscribers list for the corresponding conversation. (Stéphan Geulette) - Html email option : the mail can be sent in html format (Stéphan Geulette) - Email can contains different information levels (Stéphan Geulette) More about this release…
Plone 4.1
Plone 4
Plone 3
GPL final
0.1 May 21, 2010 Initial release with tests More about this release…
Plone 4
GPL final

Comments (16)

Tim Churches Apr 15, 2012 12:00 AM
Seems to work OK with Plone 4.1.4 and Ploneboard 3.2. One minor bug: if the URL of a forum contains the site name as a substring, then the emails links to conversations are wrong. Solution is to not name any Ploneboard forum in a way that includes the Plone site name.
Tim Churches Apr 15, 2012 12:04 AM
Note that preceding comments relate to Products.PloneboardSubscription v0.2, which is what buildout installs by default (at the time of writing, April 2012). This page does not reflect the latest release. The code is fairly simple, and we decided that we could support it ourselves, if we have to, if the plug-in has been abandoned by its author.
Suresh V Apr 15, 2012 03:04 AM
Tim:

Please feel free to commit the changes to the collective repository. If needed, I can make a release or provide you with access to do the same.
Suresh V Apr 15, 2012 03:04 AM
Or you can provide me with a patch
Tim Churches Apr 15, 2012 03:56 AM
Problem is in the following line in the createMessage function:

        urls = '\n'.join(['%s%s' % (portal.absolute_url(), c1.replace(portal_id, '')) for c1 in conv])

If the portal_id string is a substring of the forum name, then the resulting URL is wrong for obvious reasons. Work-around is to rename forums for that they don't contain the portal_id as a substring. Adding a parameter to .replace() so that only the first occurrence of the portal_id string is replaced with a null string would probably fix the problem.
Suresh V Apr 15, 2012 05:24 AM
Have made a new release. Seems Stephan has made several enhancements and your problem may have already been fixed.
Tim Churches Apr 16, 2012 02:29 AM
Thanks! However buildout is not picking up v0.3, perhaps because the version.txt file in the egg still says 0.1 - it it gets v0.2 automatically.
Suresh V Apr 16, 2012 04:30 AM
are you sure? I think something is wrong with your end. It picked up 0.3 correctly. I made another release with 0.4 and it picked it up correctly too. May be you have pinned the version.
Suresh V Apr 16, 2012 04:34 AM
Don't worry about version.txt. Eggs don't use it and the version is specified directly in setup.py
Tim Churches Apr 16, 2012 04:38 AM
OK, I had to add >=0.3 to the eggs section of buildout.cfg and then it got the new version. Seems to work well, thanks.
Tim Churches Apr 16, 2012 05:17 AM
Note that the URL bug described above is still present in v0.3, but the work-around as described is trivial.
Suresh V Apr 16, 2012 05:26 AM
what line number in the source file? i did not see the line u had described above in the latest version.
Tim Churches Apr 16, 2012 06:05 AM
In v0.3 it is line 159 in NotificationTool.py:

   convd['id'] = conv_id.replace(portal_path, '')

Suresh V Apr 16, 2012 06:15 AM
OK. Version 0.5 on pypi.
Tim Churches Apr 16, 2012 08:01 AM
One more minor bug in v0.5: if the user is subscribed to both the conversation and the forum, then the comments details appear twice. If the user is also the originator of the conversation, they appear three times, like this (text representation of the HTML email notification, names redacted, customised email template):

--------------------------
Dear XXXX web site user,

There is new activity in the discussion forum conversation(s) to which you are subscribed.

Test notification

 * Posted by Glen XXXXXXX at Apr 16, 2012 05:49 PM
no - higher.

 * Posted by Glen XXXXXXX at Apr 16, 2012 05:49 PM
no - higher.

 * Posted by Glen XXXXXXX at Apr 16, 2012 05:49 PM
no - higher.

Note: If you no longer wish to receive update notices for these forum conversation(s), follow the link(s) above and click on the Unsubscribe link at the bottom of the page. You may need to log in first.

Regards,

The XXXX web site administrators
---------------------------
Suresh V Apr 16, 2012 08:04 AM
ok. will look at this.