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

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
jamesworts
Registered User
 
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

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++.
User avatar
HGN
Former Team Member
 
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred

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
jamesworts
Registered User
 
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

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

http://www.stevesstocks.com

All unsolicited PMs will be ignored.
User avatar
stevemaury
Support Team Member
Support Team Member
 
Posts: 44096
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

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 -->
jamesworts
Registered User
 
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am

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

http://www.stevesstocks.com

All unsolicited PMs will be ignored.
User avatar
stevemaury
Support Team Member
Support Team Member
 
Posts: 44096
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

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!
jamesworts
Registered User
 
Posts: 83
Joined: Fri Apr 23, 2010 5:38 am


Return to 3.0.x Support Forum

Who is online

Users browsing this forum: corleoner, Google [Bot], Mick from Ausmini, stevemaury and 99 guests