Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | privatemsg-add-settting-to-hide-new-message-link-2022887-1.patch | 1.93 KB | ptmkenny |
Comments
Comment #1
ptmkenny CreditAttribution: ptmkenny commentedHere's a patch. Let me know if this works for you.
Comment #2
ptmkenny CreditAttribution: ptmkenny commentedComment #3
RAFA3L CreditAttribution: RAFA3L commentedThanks, 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
Comment #4
ptmkenny CreditAttribution: ptmkenny commentedAt 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...
Comment #5
RAFA3L CreditAttribution: RAFA3L commentedSorry, 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.
Comment #6
ptmkenny CreditAttribution: ptmkenny commentedComment #7
ptmkenny CreditAttribution: ptmkenny commentedOk, 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)
Comment #8
ivnish CreditAttribution: ivnish commentedComment #9
andypostD7 is not yet outdated