changing the "You do not have the required permissions"

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
jamesworts
Registered User
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

changing the "You do not have the required permissions"

Postby jamesworts » Sun Apr 25, 2010 10:06 pm

Hi all,

when guests visit my fourm they get the following message "You do not have the required permissions to view the files attached to this post. "

This is fine but i would like to change the text to

"You do not have the required permissions to view the files attached to this post. You must LOGIN or REGISTER to view these files."

and have LOGIN take you to the login page and REGISTER take you to the register page.

Any idea how to do this?

Thanks
Last edited by Mick on Tue Jan 27, 2015 5:53 pm, edited 1 time in total.
Reason: Solved in 2010

User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred
Contact:

Re: changing the "You do not have the required permissions"

Postby HGN » Sun Apr 25, 2010 10:42 pm

Open /language/en/viewtopic.php

Find

Code: Select all

   'DOWNLOAD_NOTICE'      => 'You do not have the required permissions to view the files attached to this post.',

Replace by

Code: Select all

   'DOWNLOAD_NOTICE'      => 'You do not have the required permissions to view the files attached to this post. You must LOGIN or REGISTER to view these files.',


Use a text editor capable of saving UTF8 without BOM, e.g. Notepad++.

jamesworts
Registered User
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

Re: changing the "You do not have the required permissions"

Postby jamesworts » Mon Apr 26, 2010 4:28 pm

Brilliant, that will do for a start, but want to enable the LOGIN and REGISTER button as a clickable link to the respective pages

thanks

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 44802
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: changing the "You do not have the required permissions"

Postby stevemaury » Mon Apr 26, 2010 4:44 pm

The easiest way for you to do that is to hardcode the template viewtopic_body.html.

Find this:

Code: Select all

<!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">{L_DOWNLOAD_NOTICE}</div><!-- ENDIF -->



And change to this:

Code: Select all

<!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">You do not have the required permissions to view the files attached to this post. You must <a href="http://www.yourdomain.com/board_root_folder/ucp.php?mode=login">LOGIN</a> or <a href="http://www.yourdomain.com/board_root_folder/ucp.php?mode=register">REGISTER</a> to view these files.</div><!-- ENDIF -->
For REALLY good and VERY inexpensive hosting CLICK HERE

All unsolicited PMs will be ignored.

jamesworts
Registered User
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

Re: changing the "You do not have the required permissions"

Postby jamesworts » Mon Apr 26, 2010 5:20 pm

that doesnt work all i get is

"You do not have the required permissions to view the files attached to this post. You must or REGISTER to view these files."

i inserted the correct website path,

<!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">You do not have the required permissions to view the files attached to this post. You must
<a href="http://www.ensignatv.co.uk/forum/ucp.php?mode=login" LOGIN</a>or <a href="http://www.ensignatv.co.uk/forum/ucp.php?mode=register" LOGIN</a>REGISTER</a> to view these files.</div><!-- ENDIF -->

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 44802
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: changing the "You do not have the required permissions"

Postby stevemaury » Mon Apr 26, 2010 5:27 pm

Yeah, I botched the code. It is fixed above, try again, sorry.
For REALLY good and VERY inexpensive hosting CLICK HERE

All unsolicited PMs will be ignored.

jamesworts
Registered User
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

Re: changing the "You do not have the required permissions"

Postby jamesworts » Mon Apr 26, 2010 5:33 pm

dont worry, figured out your mistake lol you forgot the > hehe

Thankyou very much for your help, your a star!

Miker1029
Registered User
Posts: 116
Joined: Fri Nov 14, 2014 6:56 pm

Re: changing the "You do not have the required permissions"

Postby Miker1029 » Tue Jan 27, 2015 5:44 pm

I realize this topic is VERY Old, But I found it and it helped me....

So I'm adding this for Anyone else that Might find it Useful....

As I tend to move my Forum around ALOT, Plus use On Localhost, I Don't like Hard Coding the Site Url, So With this information Plus a Little Searching...My Idea Would be to Use This:

<a href="{PHPBB_ROOT_PATH}ucp.php?mode=login">LOGIN</a> or <a href="{PHPBB_ROOT_PATH}ucp.php?mode=register"

As It Changes With the Location Of Your Forum.... (I'm A Beginner, This worked, If It's Incorrect, My Apologies)

Mike


Return to “3.0.x Support Forum”

Who is online

Users browsing this forum: Baidu [Spider] and 71 guests