FELOGIN: Temporary Frontend Login workaround [EN]

If you have created additional (non official) documentation or tutorials or something like that please post this here
Post Reply
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

FELOGIN: Temporary Frontend Login workaround [EN]

Post by flip-flop »

A summary of what has been stated: (Temporary Frontend Login workaround)
For sure I know you are waiting for the new release since long time including long-awaited permissions and so on.

And yes, I am working on it and as I told flip-flop yesterday: I need it myself for coming projects.But I also know that there are many of you waiting for a fast and simple simple solution to limit access to special sections of your site, e.g. login area for customers or other user groups.
I have no backend-ready thing for you right now but here is a very generic | frontend_init/frontend_render script package.
Try it, I have it tested in current development release only but it should work in 1.3.3 too. Documentation is included.

Oliver
This FELOGIN is externally contracted over the whole process. (Running since version ~1.2.5). There is no conjunction to the internal users and the functions coming along with.
User, passwords and the protected levels are stored in an external file. The backend settings regarding "frontend menu status:" etc. are not used.

Download: Temporary Frontend Login workaround

Condition -> conf.inc.php:

Code: Select all

$phpwcms['allow_ext_init']   = 1; //allow including of custom external scripts at frontend initializ.
$phpwcms['allow_ext_render'] = 1; //allow including of custom external scripts at frontend rendering

$phpwcms['allow_cntPHP_rt']  = 1; //allow PHP replacement tags and includes in content parts

$phpwcms['SESSION_FEinit']   = 1; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend
copy this files:

Code: Select all

- /template/inc_script/froentend_render/disabled/felogin.render.php -> /template/inc_script/froentend_render/felogin.render.php
- /template/inc_script/froentend_init/disabled/felogin.init.php     -> /template/inc_script/froentend_init/felogin.init.php
Starting situation:

Code: Select all

.L  E  V  E  L
-:  :  :  :  :  :
-0  1  2  3  4  5  <- LEVEL-No.)
-:  :  :  :  :  :
-+ root   :  :  :                        ID=0
-+--+ en  :  :  :                        ID=01
-+--+--+ category_01                     ID=02
-+--+--+ category_02                     ID=03  -> parent category (Loginbasis)
-+--+--+--+ category_02_01               ID=05  {FELOGIN} (Login)
-+--+--+--+--+ category_02_01_01         ID=07  -> access blocked
-+--+--+--+--+ category_02_01_02         ID=08  -> access blocked
-+--+--+--+ category_02_02               ID=06  {FELOGIN} (Login)
-+--+--+--+--+ category_02_02_01         ID=11  -> access blocked
-+--+--+--+--+ category_02_02_02         ID=12  -> access blocked
-+--+--+--+--+--+ category_02_02_02_01   ID=13  -> access blocked
-+--+--+--+ category_02_03               ID=09  {FELOGIN} (Login)
-+--+--+--+--+ category_02_03_01         ID=14  -> access blocked
-+--+--+--+--+ category_02_03_02         ID=15  -> access blocked
-+--+--+ category_03                     ID=04
-+--+--+ category_04                     ID=10
-:  :  :  :  :  :
-0  1  2  3  4  5  <- LEVEL No.
Access blocked be expected/be able:

Code: Select all

-+--+--+--+--+ category_02_01_01         ID=07
-+--+--+--+--+ category_02_01_02         ID=08

-+--+--+--+--+ category_02_02_01         ID=11
-+--+--+--+--+ category_02_02_02         ID=12
-+--+--+--+--+--+ category_02_02_02_01   ID=13

-+--+--+--+--+ category_02_03_01         ID=14
-+--+--+--+--+ category_02_03_02         ID=15
The login {FELOGIN} is always enclosed to:

Code: Select all

-+--+--+--+ category_02_01               ID=05  {FELOGIN}
-+--+--+--+ category_02_02               ID=06  {FELOGIN}
-+--+--+--+ category_02_03               ID=09  {FELOGIN}
The parent level of the login site, I have named it login basis

Code: Select all

-+--+--+ category_02                     ID=03
FELOGIN_LEVEL_DEPTH relates to the login basis so the category in FELOGIN_LEVEL_ID. FELOGIN_LEVEL_ID: The count of the level starts at home=0 (hier root) !!!!
---------------------------------
felogin.ini.php
;The parent category(parent) Login basis of the login level are (category_02)
FELOGIN_LEVEL_ID = 3

;so level depth is specified with (category_02 = level 2)
FELOGIN_LEVEL_DEPTH = 2
; Put in the level depth, root level = 0
; FELOGIN_LEVEL_DEPTH = 2
FELOGIN_LEVEL_DEPTH = 2

; This is the ID of parent's level, root would be 0
; FELOGIN_LEVEL_ID = 3
FELOGIN_LEVEL_ID = 3
;[Level]
;Name = Password
;----------------
[5]
hansi = hansi123
toni = toni123

[6]
waldi = waldi123
oki = oki123
andi = andi123

[9]
mini = mini123
moni = momi123
;----------------
It is a login basis as parent indicated below the then the respective login categories, including the locked categories.
All login categories must be in the same level.

A one user multiple access to different locked levels can´t run, (the same user in example, [5] and [9]), except the user is created for these levels)
If this user changes the level, a new login is generated again and again, the old level is automatically disconnected.
Important: Please write the tag {FELOGIN} (and all other) only in BIG LETTER !!!!

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply