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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ptmkenny’s picture

Status: Active » Needs work
FileSize
1.93 KB

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

ptmkenny’s picture

Status: Needs work » Needs review
RAFA3L’s picture

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

ptmkenny’s picture

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...

RAFA3L’s picture

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.

ptmkenny’s picture

Status: Needs review » Needs work
ptmkenny’s picture

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)

ivnish’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)
andypost’s picture

Status: Closed (outdated) » Needs work

D7 is not yet outdated