Not sure why you created this module...

- privatemsg.module has a privatemsg_get_link() function that is much more advanced that your privatemsg_adv_create_link('message') (checks permissions, *all* possible blocking reasons (not just the hard-coded pm_block_user check) and multiple recipients). There was a bug in that function, see #896880: Recipients array is not keyed by uid in privatemsg_get_link() when checking for blocking.

- I suggested that you create a patch to split the block/unblock check into a separate function. Note that your version is incomplete since it doesn't account for the blocking rules that are part of pm_block_user. They can for example disallow someone to block users of a specific role. See #893184: API function to get block/unblock link.

- Privatemsg already has views integration for the send message link and I'm willing to accept a patch that adds the block/unblock link integration as well.

- Note that you have a dependency on pm_block_user as well, you actually query the tables directly instead of using the existing hooks/apis.

I am trying to avoid confusion for users when they are looking for modules. Your module name sounds... well, advanced while it in fact only does minor things and you don't have a single line in your project description that says what your module actually does.

Comments

quiptime’s picture

Not sure why you created this module...

Answer:

Only bugs are fixed in 6.x-1.x, no new features, no changes, no string changes.

See also http://drupal.org/node/894450#comment-3383832
The PM adv module realized no bug fixes.

I suggested that you create a patch to split the block/unblock check into a separate function. Note that your version is incomplete since it doesn't account for the blocking rules that are part of pm_block_user. They can for example disallow someone to block users of a specific role.

PM adv don't needs to check specific roles to test if a user blocked or unblocked. But, I can implement this.
PM adv implemented functions for the brunch 1. And, who used PM in version 1, does not have to implement several patches to get functionalities - he can simply use PM adv.

privatemsg.module has a privatemsg_get_link() function that is much more advanced that your privatemsg_adv_create_link('message')

I see it differently.

Privatemsg already has views integration for the send message link and I'm willing to accept a patch that adds the block/unblock link integration as well.

You are not accepted my first patch for brunch 1. See http://drupal.org/node/894450#comment-3383344

Please, feel free to use the code from PM adv to implement the missing functions to brunch 1.

But, I will send patches to integrate the Realname compatibility.
But, I will send patches to correct the illogical confirm messages of block and unblock actions.

Note that you have a dependency on pm_block_user as well, you actually query the tables directly instead of using the existing hooks/apis.

There is no reason to use the hooks and API functions. It works perfectly without. And so I am independent of the two PM versions.

I am trying to avoid confusion for users when they are looking for modules. Your module name sounds... well, advanced while it in fact only does minor things and you don't have a single line in your project description that says what your module actually does.

Sorry for that. You've read the projects page at a time when I worked on it. Meanwhile, the project site has been corrected.

========================

Your topic title "Merge with privatemsg?"

I have no problem if one takes over the code of PM adv. As I said earlier: Please, feel free to use the code from PM adv to implement the missing functions to brunch 1.

berdir’s picture

Answer:

Only bugs are fixed in 6.x-1.x, no new features, no changes, no string changes.

Yes. But that doesn't mean that we can't add the additional feature (IMHO, there is only one, the block/unblock views integration) to 6.x-2.x.

PM adv don't needs to check specific roles to test if a user blocked or unblocked. But, I can implement this.

No, the module obviously doesn't. But it's a feature of pm_block_user.module and users which use that feature might want to use your module as well. What your module currently does is implementing a specific use case. That's how custom modules work, contrib modules should be flexible and configurable.

I see it differently.

I don't see how you could see anything differently. That the link shows up when a user has blocked you is a simple bug, fixed by this patch #896880: Recipients array is not keyed by uid in privatemsg_get_link() when checking for blocking. Apply the patch and try it out yourself. With this patch, privatemsg_get_link() does everything privatemsg_adv_create_link('message') does and more. Again, I don't see how you can see it differently.

You are not accepted my first patch for brunch 1. See http://drupal.org/node/894450#comment-3383344

Please, feel free to use the code from PM adv to implement the missing functions to brunch 1.

No, because that feature is already part of 6.x-2.x. (And there it is a site configuration setting, and it works for *all* write this user a message links not only the views integration.).

There is no reason to use the hooks and API functions. It works perfectly without. And so I am independent of the two PM versions.

First, what I meant is that you don't specific in your .info file (nor say it anywhere) that the pm_block_user module must be enabled. If someone enables your module without having pm_block_user enabled, he will get ugly sql errors. Second, there are many reasons to use the apis/hooks and being independent of the version is not a reason against, actually the opposite. For example, Privatemsg 6.x-2.x has a setting that allows users to disable private messaging for them, disallowing others to write them messages. And for example UR provides integration with privatemsg so that you can only send private messages to your friends. Sites might even have custom modules that implement blocking rules. Currently, privatemsg_adv doesn't work together with all these features/modules. If it would would use the hook, all of these would just work.

Meanwhile, the project site has been corrected.

I don't see where you say something along the lines of "This module provides views integration for the block/unblock link" etc. You are only saying that it extends privatemsg but not *how*.

crea’s picture

You could contribute to the Privatemsg Views module which has much better Views integration for Privatemsg 1.x. There is no need to create another module just to provide 1 more handler.
And I also think "Privatemsg Advanced" is too loud & misleading title for this module.

berdir’s picture

That would be possible as well, but I'm totally fine with adding that to privatemsg.module as well. It's similar to the send message to author link and doesn't depend on anything that privatemsg_views provides.

I think there is already an issue for that, all it needs is a patch...

And I also think "Privatemsg Advanced" is too loud & misleading title for this module.

Agreed, that's what I was trying to say above.