I started to use pmgrowl recently and had to fix some bugs and also add some minor features to make it work like I need it. (Note, there are no function changes visible).

The patch is quite big but it might be hard to split it up into several patches. If there are any questions about my changes, please ask.

Changes:
- coder.module coding style (I cannot work on code that is not :) )
- Fixes and contains parts of #511812: one-time message display not working
- Fixes #511952: if alert set to auto close for individual msg's, then if user manually closes, pmgrowl_close causes a duplicate key error and #473440: Error on several lines (the latter is a duplicate)
- Adds #588154: "new" anchor
- Fixes #606876: Support for different input formats
- Converts the query in pmgrowl_json() into a privatemsg style query build with _privatemsg_assemble_query(). That allows other modules to change that query. Example use case for my project: Display author instead of subject in the growl box.

Note:
This has not yet been very well tested and there are still know to be broken things, for example the "New Message alert" type will always pop up again. Also, the schema needs to be updated, because it does for example use smallint so the module will break on sites with many messages.

CommentFileSizeAuthor
pmgrowl_fixes_and_other_changes.patch11.32 KBBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NaheemSays’s picture

instead of

+      $row->body .= '<p>' . l(t('Open & Reply'), 'messages/view/' . $row->thread_id, array('fragment' => 'new'));

you may want to add a fragment for the mid. something like:

+      $row->body .= '<p>' . l(t('Open & Reply'), 'messages/view/' . $row->thread_id, array('fragment' => 'privatemsg-mid-' . $row->mid));

This way, the links will go to the correct place even after they have been read (maybe on another tab).

newitt’s picture

Hi my pmgrowl has been installed and no pop up shows at all when a private message is being sent. Did you have similar problems?

Berdir’s picture

Status: Needs review » Fixed

Commited together with two more minor changes:

- nbz's suggestion from above
- Correctly using drupal_add_js() (footer is the 3rd arg, not the second)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Witch’s picture

Hi Berdir,

Any chances to commit this patch http://drupal.org/node/495662#comment-1949854 into the "Big Patch"?

I need to add a Imagecache-Preset. But i fail after trying a lot.

Witch’s picture

Status: Closed (fixed) » Active

This ist mysterious.

I am using the latest dev version and get the duplicate error entry again-

Duplicate entry &#039;32767-113&#039; for key 1 query: drupal_write_record /* notperfect : drupal_write_record */ INSERT INTO pmgrowl_close (mid, uid, closed) VALUES (32895, 113, 1) in /var/www/web1/web/includes/common.inc in Zeile 3477.

How can that happen? I am using Privatemsg 2.x and pmgrowl 2.x. Any ideas?

I am thankful for every help.

Berdir’s picture

Status: Active » Fixed

No, but please open a new issue if this is still an issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.