|Restrict access to your forum's HTML pages|
DescriptionThis trick allows you to restrict access to one (or more ) HTML page(s) of your forum. This trick can be useful if you want to restrict the use of internal tools that you have developed such as forms, for example.
Since you have guest status, you will get this message:
For my part, since my ID has been authorized, I get the following message:
I just have to click on the OK button and I access the HTML page!
Protecting an HTML pageTo protect access to an HTML page, it is necessary to place this code between the tags
You need to reply to the topic in order to see the code resources
Management of users authorized to view the pageThe management of users authorized to display the HTML page is managed by this line:
All you have to do is replace the
Which give :
To add a second user authorized to display the HTML page, just put a , and proceed in the same way. For example, if the second user has ID 32, I just need to complete the code as follows:
Replacement of the access management scriptIn the previous points, you installed a JS script to manage access. It is therefore necessary to retrieve the script link and replace it with yours, instead of:
|This resource belong to this community unless differently stated.|
No reproduction possible without our agreement, in accordance with article L122-1 of the CPI.