I would like to force users to send messages only to the authors of nodes, I already have the link in nodes and disabled the autocomplete field.

But in the page /messages appear the link "Write a new message" and in messages/new the field still working, I would like to disable or hide the link Create a new message.

thanks in advance

Files: 
CommentFileSizeAuthor
#1 privatemsg-add-settting-to-hide-new-message-link-2022887-1.patch1.93 KBptmkenny
PASSED: [[SimpleTest]]: [MySQL] 4,913 pass(es).
[ View ]

Comments

Status:Active» Needs work
StatusFileSize
new1.93 KB
PASSED: [[SimpleTest]]: [MySQL] 4,913 pass(es).
[ View ]

Here's a patch. Let me know if this works for you.

Status:Needs work» Needs review

Thanks, it works...

Firstly didn't work, only hide the link in the block and not in the "/messages" page, for me this link did appear below the page title.

I notice that this link was in the action links, so I comment it in page.tpl and then disappear, but something weird, after uncomment it again the link don't appear again.

I clear the cache after apply the patch and after comment and uncomment the action links in page.tpl

At RAFA3L-- I don't really understand whether it worked for you or not. You said it didn't work at first-- did you apply the patch and then clear the cache, and it didn't work? If so, there is something wrong with it...

Sorry, yesterday was to late...

The problem is that I'm using a Zen subtheme and in page.tpl print the "action-links", so the Write new Message link appear in the content of the page Messages, path "/messages". To avoid show the link I must comment or delete print render($action_links) and I don't know for now if this will cause a problem in some part of the site where the action links must work.

In the Messages block the link is disabled fine.

Status:Needs review» Needs work

Ok, looking at this closer, I don't see an easy way to patch this. However, there is code that you can use to fix this problem here:

https://drupal.org/node/1046790

(scroll down to the comments for the D7 version)