NAVIGATION
This shows you the differences between two versions of the page.
|
english:phpwcms-system:article:contentparts:frontend-login [2012/01/17 08:41] Knut Heermann (flip-flop) |
english:phpwcms-system:article:contentparts:frontend-login [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 74: | Line 74: | ||
| <file> | <file> | ||
| $phpwcms['SESSION_FEinit'] = 1; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend | $phpwcms['SESSION_FEinit'] = 1; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend | ||
| + | $phpwcms['allow_cntPHP_rt'] = 1; //allow PHP replacement tags and includes in content parts | ||
| </file> | </file> | ||
| \\ | \\ | ||
| + | |||
| ===== Creating FE-Users: ===== | ===== Creating FE-Users: ===== | ||
| Line 133: | Line 135: | ||
| <note important> | <note important> | ||
| - | Please place the CP frontend login into a **non hidden** area, or you can get this CP with theTAG %%{SHOW_CONTENT:...}%% or "Contetpart Alias" from the hidden area. \\ | + | Please place the CP frontend login into a **non hidden** area, or you can get this CP with the TAG %%{SHOW_CONTENT:...}%% or "Contetpart Alias" from the hidden area. \\ |
| (Second method used here //%%{SHOW_CONTENT:...}%%//). | (Second method used here //%%{SHOW_CONTENT:...}%%//). | ||
| </note> | </note> | ||
| Line 139: | Line 141: | ||
| In the picture **Site structure** You also see a hidden area %%"--- hidden"%%, which does not appear in the FE in the navigation. //(Please distinguish between protection and access to "hide in the NAVI")//. | In the picture **Site structure** You also see a hidden area %%"--- hidden"%%, which does not appear in the FE in the navigation. //(Please distinguish between protection and access to "hide in the NAVI")//. | ||
| - | In this section articles and CPs are stored, which system internally or by example by a tag like wie %%{SHOW_CONTENT:...}%% be used. | + | In this section articles and CPs are stored, which be used system internally or by example be used selectively by a TAG like %%{SHOW_CONTENT:...}%% . |
| * Please create a hidden area //(The name must not be %%"--- hidden"%%)//. | * Please create a hidden area //(The name must not be %%"--- hidden"%%)//. | ||
| Line 147: | Line 149: | ||
| - | * Please create beneath %%"--- hidden"%% the following category tree:\\ %%-- FE-Login/Logout%% \\ %%---- FE-Login%% \\ %%---- FE-Logout%% \\ | + | * Please create beneath %%"--- hidden"%% the following category tree: |
| + | * %%--- hidden%% | ||
| + | * %%FE-Login/Logout%% | ||
| + | * %%FE-Login%% | ||
| + | * %%FE-Logout%% | ||
| + | \\ | ||
| **ADMIN -> Site structure** (Category in hidden area)\\ | **ADMIN -> Site structure** (Category in hidden area)\\ | ||
| + | * %%--- hidden%% | ||
| + | * **%%FE-Login/Logout%%** //(alias can be chosen freely)// \\ | ||
| + | {{:deutsch:phpwcms-system:artikel:contentparts:fe_login_loginlogout01_1.gif|}} | ||
| + | |||
| + | * %%--- hidden%% | ||
| + | * %%FE-Login/Logout%% | ||
| + | * **%%FE-Login%%** //(as in the image below with the alias "fe-login")// | ||
| + | * **%%FE-Logout%%** //(without a picture: Please also create with the alias "fe-logout")// | ||
| {{:english:phpwcms-system:article:contentparts:fe_login_fe-login_be01_en_1.gif|}} | {{:english:phpwcms-system:article:contentparts:fe_login_fe-login_be01_en_1.gif|}} | ||
| + | |||
| These categories are simply designed to keep a better overview and to decouple the "frontend login" CPs from the general content display. | These categories are simply designed to keep a better overview and to decouple the "frontend login" CPs from the general content display. | ||
| Line 168: | Line 183: | ||
| **ARTICLE** \\ | **ARTICLE** \\ | ||
| + | |||
| + | Now we create the article. Once in the category of FE-login and once in the category of FE-Logout for a later insert of the two CPs. \\ | ||
| + | Name and alias of the article can be freely chosen. | ||
| + | |||
| {{:english:phpwcms-system:article:contentparts:fe_login_article_site_structure_be01_en_1.gif|}} | {{:english:phpwcms-system:article:contentparts:fe_login_article_site_structure_be01_en_1.gif|}} | ||
| Line 174: | Line 193: | ||
| ==== CP Frontent Login ==== | ==== CP Frontent Login ==== | ||
| - | We create two CPs "frontend login", one for the **login** within the **category of "FE-login"** //(pictured here)// and one for the logout within the **category of "FE-logout"**. | + | We create two CPs of type "Frontend Login" to: |
| + | |||
| + | * one for the **login** within the **category of "FE-login"** in the **article "LogIn for Frontend-User"** \\ with the **template "fe_login_en.tmpl"** //(pictured here)//. | ||
| + | * one for the **logout** within the **category of "FE-logout"** in the **article "LogOut for Frontend-User"** \\ with the **template "fe_logout_en.tmpl"** //(not pictured here)//. | ||
| - | These two CPs differ only by the used template and be placed in different categories. \\ | ||
| + | These two CPs differ only by the used template and be placed in different categories -> articles. \\ | ||
| Line 284: | Line 306: | ||
| <!--LOGIN_IS_END//--> | <!--LOGIN_IS_END//--> | ||
| </code> | </code> | ||
| + | |||
| + | \\ | ||
| + | If an automatic transmission is not desired, a link can be used. If so, please replace the entire part **%%[PHP] ..... [/PHP]%%** with: | ||
| + | <file> | ||
| + | [PHP] | ||
| + | // === forwarded by link | ||
| + | if ( _getFeUserLoginStatus()) { // === the user is logged in, then continue. | ||
| + | echo '<br />Please follow the link: <a href="index.php?MyLandingPagesAlias">My link text</a>'.LF; | ||
| + | } | ||
| + | [/PHP] | ||
| + | </file> | ||
| + | |||
| \\ | \\ | ||
| Line 295: | Line 329: | ||
| \\ | \\ | ||
| One entries must be adjusted, | One entries must be adjusted, | ||
| - | * The jump destination for the automatic Forwarded to the registration form on line 9: \\ <file><form action="index.php?fe-login" method="post" name="feLogoutForm" id="feLogoutForm"></file> | + | * The jump destination //(alias here "fe-login")// for the automatic Forwarded to the registration form on line 9: \\ //(If you proceed exactly according to this description, eliminates this adjustment, see category-alias FE-login)// \\ <file><form action="index.php?fe-login" method="post" name="feLogoutForm" id="feLogoutForm"></file> |
| Line 540: | Line 574: | ||
| \\ | \\ | ||
| + | == Example for a template == | ||
| + | |||
| + | <code html> | ||
| + | <!--LOGGED_OUT_START//--> | ||
| + | <a href="index.php?customer-information">Customer Information</a> | ||
| + | <!--LOGGED_OUT_END//--> | ||
| + | <!--LOGGED_IN_START//--> | ||
| + | <a href="{URL}"{URL_TARGET}>[URL_TEXT]{URL_TEXT}[/URL_TEXT][URL_TEXT_ELSE]more...[/URL_TEXT_ELSE]</a> | ||
| + | <!--LOGGED_IN_END//--> | ||
| + | </code> | ||
| ==== The user is logged in? ==== | ==== The user is logged in? ==== | ||