NAVIGATION
This shows you the differences between two versions of the page.
|
english:phpwcms-system:article:contentparts:frontend-login [2011/12/19 11:42] 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, oder holen Sie diesen CP mit TAG %%{SHOW_CONTENT:...}%% oder einem "Contetpart Alias" aus dem versteckten Bereich. \\ | + | 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. \\ |
| - | (Zweite Methode hier angewendet). | + | (Second method used here //%%{SHOW_CONTENT:...}%%//). |
| </note> | </note> | ||
| 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 ==== | ||
| - | Es werden zwei CPs "Frontent Login" angelegt, ein CP für das Login und ein CP für das Logout. \\ | + | We create two CPs of type "Frontend Login" to: |
| - | We create two CPs "frontend login", one for the login and one for the logout. | + | |
| + | * 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 -> articles. \\ | ||
| **ARTICLE -> frontend login CP (ContentPart)** - With templates in /template/inc_cntpart/felogin/ \\ | **ARTICLE -> frontend login CP (ContentPart)** - With templates in /template/inc_cntpart/felogin/ \\ | ||
| {{:english:phpwcms-system:article:contentparts:fe_login_cp_fe_login_be0_1en_1.gif|}} | {{:english:phpwcms-system:article:contentparts:fe_login_cp_fe_login_be0_1en_1.gif|}} | ||
| - | These two CPs differ only by the used template. | + | |
| It is only checked against the user database, **not** to the user profile database. | It is only checked against the user database, **not** to the user profile database. | ||
| Line 281: | 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 292: | 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 526: | Line 563: | ||
| - | ===== Two tags available for hiding content: ===== | + | ===== Little helpers ===== |
| + | |||
| + | |||
| + | ==== Two tags available for hiding content: ==== | ||
| == <!--LOGGED_IN_START//--> heyhey <!--LOGGED_IN_END//--> == | == <!--LOGGED_IN_START//--> heyhey <!--LOGGED_IN_END//--> == | ||
| Line 534: | Line 574: | ||
| \\ | \\ | ||
| + | == Example for a template == | ||
| - | === The user is logged in? === | + | <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? ==== | ||
| ##%%_getFeUserLoginStatus()%%## [not available vorhanden | 1] | ##%%_getFeUserLoginStatus()%%## [not available vorhanden | 1] | ||
| - | **Forwarding example:** | + | === Forwarding example: === |
| + | |||
| <code php> | <code php> | ||
| [PHP] | [PHP] | ||
| - | // === forwarded by redirect to Branche | + | // === forwarded by redirect to a category |
| if ( _getFeUserLoginStatus() ) { // === if the user is logged in, then goto ... | if ( _getFeUserLoginStatus() ) { // === if the user is logged in, then goto ... | ||
| - | Header( "HTTP/1.1 301 Moved Permanently" ); | + | // headerRedirect('category_alias.phtml', 301); |
| - | Header( "Location: branchen.phtml" ); | + | headerRedirect('index.php?category_alias', 301); |
| - | // Header( "Location: index.php?branchen" ); | + | |
| exit; | exit; | ||
| } | } | ||
| [/PHP] | [/PHP] | ||
| - | |||
| </code> | </code> | ||