WebSite X5Help Center

 
L. Myson
L. Myson
User

Setting up closed access to Blog categories  en

Autore: L. Myson
Visite 126, Followers 1, Condiviso 0  

Hello, I'm interested in setting up access for registered users to the sections of the blog categories! And the way to implement them, in the future maybe someone else will need it! How to implement it.

Postato il
4 RISPOSTE - 1 UTILE
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese ESUtente del mese PT

(It > En) ... waiting for the Experts to answer you, ... ...on my part in any case a project should be made to develop as I told you > here, that is to condition the BLOG ARTICLES, in my opinion and my personal ideas or inventions mostly exclusive, in theory a logical structure of this type would be necessary:
1) - put in HEADER an EXTRA PHP code for the detection of the logged in user, with one of the codes available here in the Forum;
2) - create a SCRIPT external to the project with the list of accredited users and enabled for access, for example:
aaa(@),zz.yy, bbb(@),zz.yy, ccc(@),zz.yy, etc.
... in this way since the list is external you can update or modify the permissions easily without touching and republishing the project;
3) -  in the text of the HTML enabled ARTICLE [</>] put my SCRIPT code that reads only for this page/article the name of the logged-in user referred to in point 1), to activate the dedicated script function to authorize or not the reading of the article if the user is among those on the list...
4) - miscellaneous that may arise with other ideas...

... (!)... in this case, and if perhaps it will be possible to reach the goal, the whole procedure will depend on your reactive capabilities, because I currently do not have the program or even the PC, I only regulate myself with what I can evaluate online...

.

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
L. Myson
L. Myson
User
Autore

Great, I think we can try to do what you say. Reactively, what should I do? So such a task has already been done?

‪ KolAsim ‪ ‪
(It > En) ... waiting for the Experts to answer you, ... ...on my part in any case a project should be made to develop as I told you > here, that is to condition the BLOG ARTICLES, in my opinion and my personal ideas or inventions mostly exclusive, in theory a logical structure of this type would be necessary: 1) - put in HEADER an EXTRA PHP code for the detection of the logged in user, with one of the codes available here in the Forum; 2) - create a SCRIPT external to the project with the list of accredited users and enabled for access, for example: aaa(@),zz.yy, bbb(@),zz.yy, ccc(@),zz.yy, etc. ... in this way since the list is external you can update or modify the permissions easily without touching and republishing the project; 3) -  in the text of the HTML enabled ARTICLE [</>] put my SCRIPT code that reads only for this page/article the name of the logged-in user referred to in point 1), to activate the dedicated script function to authorize or not the reading of the article if the user is among those on the list... 4) - miscellaneous that may arise with other ideas... ... (!)... in this case, and if perhaps it will be possible to reach the goal, the whole procedure will depend on your reactive capabilities, because I currently do not have the program or even the PC, I only regulate myself with what I can evaluate online... . ciao .
Leggi di più
Postato il da L. Myson
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese ESUtente del mese PT
L. Myson
... ... ...  So such a task has already been done?  

... no! ...

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese ESUtente del mese PT
L. Myson
Great, I think we can try to do what you say. Reactively, what should I do? ... ... ...

... to start with the Tests,
... create a reserved page and create for it three simple valid and working accesses for three different users:
user: pippo(@)xxx.yy
pass: 1234
---------------------
user: pluto(@)xxx.yy
pass: 4567
--------------------
user: minnie(@)xxx.yy
pass: 9012
.......
in an HTML Code Object of the reserved page paste this code:
<div id = "userK1" style = "position:relative;width:200pxheightt:50px;background-color:yellow">
<?php
require_once("res/x5engine.php");
require_once("res/access.inc.php");
$pa = Configuration::getPrivateArea();
$user = $pa->whoIsLogged();
echo .$user['realname'];
?>
</div>
<br>
<div id = "userK2" style = "position:relative;width:200pxheightt:50px;background-color:red">
<?php
$pa = Configuration::getPrivateArea();
$user = $pa->whoIsLogged();
echo .$user['username'];
?>
</div>

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪