Closed (outdated)
Project:
Private
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2007 at 17:39 UTC
Updated:
7 Mar 2017 at 14:48 UTC
Jump to comment: Most recent
Great module, but I have a question. How to overwrite the default message shown to roles with no access/permission?
I would like to override the message:
Access denied
You are not authorized to access this page.I'd like to add a Login/Register link there as it makes sense under some circumstances.
Comments
Comment #1
ptamas commentedopen private.module in a text editor and search for the text....
it is in a section that looks like this
***snip
function private_form_alter($form_id, &$form) {
if ($form['#id'] == 'node-form') {
if (user_access('mark content as private')) {
$form['private'] = array(
'#type' => 'checkbox',
'#title' => t('Assignment'),
'#return_value' => 1,
'#description' => t('Check here if this post should only be read by Peter.'),
***snip
I've changed the checkbox text from Private -> Assignment
and changed the description text
so long as you stay inside the single 'quotation' marks everything is good.
-peter
Comment #2
BioALIEN commentedThanks ptamas. I think your code reveals how to change what users see when editing nodes with the Private.module enabled.
My original question is related to the error message displayed to nodes that are set to "Private". So if a guest views a node you've set as Private they see the error message displayed in my original post. This is the message I wanted to override.
I don't think your code is answering the same question. Correct me if I'm wrong?
Comment #3
ptamas commentedyou are right...I should read a bit better before pretending that I Have The Answer...
digging.
-p
Comment #4
adamps commentedTidying up ancient D5 support request.