.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ====================== New frontend login box ====================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Stefan Strasser :Changed: 2008-06-07T09:38:49 :Author: Stefan Strasser :Email: strada@stradax.net :Info 3: :Info 4: .. _New-frontend-login-box: New frontend login box ====================== Extension Key: **newloginbox** initially written by Kasper Skårhøj maintained by Stefan Strasser **SPONSORED IN PART by Headline** This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **New frontend login box 1** **Why obsolete? 1** **Introduction 1** What does it do? 1 Screenshots 1 **Users manual 4** FAQ 8 **Configuration 8** General 8 TypoScript Reference 8 CSS styling 12 **Template and common markers 12** Markers 12 Wrap parts 12 Newloginbox Language Markers (see pi/locallang.php) 13 **To-Do list 13** **Changelog 13** .. _Why-obsolete: Why obsolete? ------------- This extension is deprecated since TYPO3 4.2 because it's login- functionality is now integrated into the core as sysext 'felogin'. The new system-extension 'felogin' comes with long-awaited redirection-functionality and many configuration options, but runs well using only the default settings. When installed, the new extension will replace the old login content element. The userlisting-plugin has been put into a separate extension 'feuserlisting', available from TER. The old extension newloginbox is therefore not being maintained anymore with the exception of security-fixes and language- enhancements. That's the reason for marking newloginbox obsolete. See also `http://typo3.org/development/articles/release-notes-42/page/3/ `_ .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This is an alternative to the good old login box. This version features a little more functionality, including success/error messages, cookie check, forgot password feature etc. Actually there is two plugins in this extension so you also get a user listing plugin as well. After installing the extension on your TYPO3 system you will find two plugins added in the content elements plugin list. Further a static template “newloginbox” will be added globally to your TypoScript templates. .. _Screenshots: Screenshots ^^^^^^^^^^^ This is the login screen of typo3.org: |img-1| In the backend it is extremely easy to enter custom messages for the plugin: |img-2| ... and here the “forgot password” feature: |img-3| .. _User-listing: User listing """""""""""" There is also a plugin for listing, browsing and searching the current users: |img-4| ... and for each user you can click the username and get details: |img-5| .. _Users-manual: Users manual ------------ .. _generated: ((generated)) ^^^^^^^^^^^^^ .. _A-better-login-box: A better login box """""""""""""""""" The default login box in TYPO3 is this dedicated content element called “Login”. You can still use that if you like. However it's pretty simply an really doesn't offer anything but a login and logout button. |img-6| Using this plugin enables you to insert a more user friendly login box on your pages. This is how you do: Create a page where you want the login box to be and then add a new element: |img-7| In the element overview there is a plugin: |img-8| After this (an possibly selecting a position for the element) you'll get this form up: |img-9| The basic requirements are that the “Type:” field is set to “Insert plugin” and the “Plugin:” field is set to “Better login-box”. Then you'll see these fields. There are five main sections and in each section a field for a header and a text. Successful login: This is the message when a user has just entered a *correct* username and password and pressed “Login” button. Insert the string “###USER###” if you want to display the username. Login-failure: Will appear when the username and password tried was *not* correct. Welcome: The message that appears if a user comes to the login screen for the first time and is not logged in yet. Status: The message that appears if a user is already logged in and comes to the login screen. In this case the plugin will display the current username and real name of that person so the user can see his status. Insert the string “###USER###” if you want to display the username. Logout: This message appears as a goodbye-message when the user logs out from the site. In all cases above there are default messages shown if the field is blank. It's suggested that you insert the plugin without modifying the fields first - then you can see the default messages and if needed you can override these by entering your own custom messages here. The 6th item in the form is the “Show “Forgot password?” link:” checkbox. If you set this checkbox a link below the login form will appear and the user will be guided to a page where he can enter his email address and have the password sent to him right away: |img-10| |img-11| .. _Note-related-to-TYPO3-3-6-0: Note related to TYPO3 3.6.0 """"""""""""""""""""""""""" Since TYPO3 3.6.0 the form for adding all the content of the login box (see above) has changed. Now it looks like this: |img-12| The idea behind this change is that one field in the database (“pi\_flexform”) now contains all content as XML instead of using 9 precious fields in the already overcrowded tt\_content table. Result is: The fields purpose are the same, the storage method different and you have to visit each of the sheets in the form to enter information. **Notice:** When you upgrade this extension from the earlier versions to the TYPO3 3.6.0 version make sure to use the UPGRADE menu in the EM - see later in this document for details! .. _A-user-list: A user list """"""""""" Want to list all your users on the site? No problem. Just insert the user list plugin: Create a page for the plugin and add a new item. This time you cannot use the wizard, sorry: |img-13| Then select the “insert plugin” content element type and the “User listing” plugin: |img-14| Finally you must tell the plugin where the users are found. Do that by setting the starting point relation: |img-15| Save that and now all fe\_users found in the DB folder will be displayed by the plugin: |img-16| .. _FAQ: FAQ ^^^ .. _The-login-form-does-not-work-I-know-I-have-created-a-user-and-the-password-is-right-but-nothing-happens: The login form does not work! I know I have created a user and the password is right, but nothing happens! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" The login form has to know where the users are located in the page tree. In the example with the user listing that relation is set directly *in* the plugin as the starting point. That is not the case with the login form. Here it is based on a new concept which is called a “Storage page”. The current storagepage of position in the page tree where this login form is found that is the location used by default to look up the users for login. So basically you have to first set the storage page of any previous page in the page tree: |img-17| Another way to define the storagepage for the login form is to set it in your template (useful if you use the loginbox on all pages): :: plugin.tx_newloginbox_pi1.storagePid = 123 .. _In-the-userlist-I-can-see-only-Name-Username-and-Email-address-How-can-I-see-all-the-information-about-a-user: In the userlist I can see only Name, Username and Email address. How can I see all the information about a user? """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" That is simply a restriction based on whether you are logged in or not. Only name, username and email address (in the detailed view) is displayed if the website user is not logged in. But *when* you are logged in you'll see the full information: |img-18| .. _Configuration: Configuration ------------- There are as usual a lot of options for configuring. These are listed below. This section could still need some work but since the extension has potential for further development, this is all you get now. .. _General: General ^^^^^^^ The plugin supports all system languages in TYPO3. Translation is done using the typo3.org tools. If you want to use eg. danish language that will automatically be used if this option is set in your template: :: config.language = dk .. _TypoScript-Reference: TypoScript Reference ^^^^^^^^^^^^^^^^^^^^ There is a moderate number of TypoScript options for the two plugins. Here is a screendump from the Object Browser: |img-19| |img-20| This is pretty straight forward and many of the above options may be self-explanatory or at least (in the case of ...\_pi3 - the user listing) similar to other known plugins. .. _Tip-Side-note: Tip / Side note """"""""""""""" There is one interesting thing to comment in the above screendump and that is the setting of the value “.\_LOCAL\_LANG.default.listFieldHeader\_typo3experiences”. This value overrides the normal value found in the local\_lang.php files. This opportunity is not specific for this plugin but applies generally to all modern extension made under the kickstarter. In other words you can overrule those hardcoded default labels through TypoScript! You just have to know the keys used in the local\_lang files. That's all. In this case the details-display of a user will use the label “Experience with TYPO3:” instead of the default label which is just “Experience:” |img-21| .. _The-User-list-plugin: The User list plugin """""""""""""""""""" .. ### BEGIN~OF~TABLE ### .. _CMD: CMD ~~~ .. container:: table-row Property CMD Data type Description [Future option] Default .. _pidList: pidList ~~~~~~~ .. container:: table-row Property pidList Data type Description [Future option] Default .. _recursive: recursive ~~~~~~~~~ .. container:: table-row Property recursive Data type Description [Future option] Default .. _tableParams-details: tableParams\_details ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property tableParams\_details Data type -params Description Setting the attributes of the table tag of the table displaying the user details (single display). A class attribute is automatically appended to this string! Default border=0 cellpadding=1 cellspacing=2 width=90% .. _listView-results-at-a-time: listView.results\_at\_a\_time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property listView.results\_at\_a\_time Data type int+ Description The number of records to show at a time in the listing Default 50 .. _listView-maxPages: listView.maxPages ~~~~~~~~~~~~~~~~~ .. container:: table-row Property listView.maxPages Data type int+ Description The maximum number of “browser”-pages (| } By default, the following customProcessing is set: :: plugin.tx_newloginbox_pi3.listView.customProcessing { image = IMAGE image.file { import = uploads/pics/ import.field = image import.listNum = 0 maxW = 200 maxH = 300 } } You can easily change all the values with the TypoScript Object Browser. Default .. _singleView-customProcessing-fieldname: singleView.customProcessing.[fieldname] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property singleView.customProcessing.[fieldname] Data type cObject Description Same as listView.customProcessing just for the singleView instead. Default .. _CSS-DEFAULT-STYLE: \_CSS\_DEFAULT\_STYLE ~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property \_CSS\_DEFAULT\_STYLE Data type string Description Default CSS style. You should unset this value and copy the CSS selectors to a stylesheet. Notice that the selectors will apply to all templates in the TYPO3 database by default! Default .. _LOCAL-LANG-langkey-labelkey: \_LOCAL\_LANG.[langkey].[labelkey] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property \_LOCAL\_LANG.[langkey].[labelkey] Data type string Description Overriding the labels from the local lang array. Default .. _DEFAULT-PI-VARS-piVars-key: \_DEFAULT\_PI\_VARS.[piVars\_key] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property \_DEFAULT\_PI\_VARS.[piVars\_key] Data type string Description Setting the default value of a piVars value (those values used in the post/get requests within the plugin.) **Example:** :: _DEFAULT_PI_VARS.pointer = 2 This will set the pointer to “Page 3” in the browsebox by default. Default 0 .. ###### END~OF~TABLE ###### [tsref:plugin.tx\_newloginbox\_pi3] .. _The-Better-login-box-plugin: The “Better login box” plugin """"""""""""""""""""""""""""" .. ### BEGIN~OF~TABLE ### .. _storagePid: storagePid ~~~~~~~~~~ .. container:: table-row Property storagePid Data type int+ Description The PID number of the page where the frontend-users are stored. If this is set, the “General Record Storage Page” setting is ignored. Default .. _detailsPage: detailsPage ~~~~~~~~~~~ .. container:: table-row Property detailsPage Data type int+ Description The PID number of the page where the details of the users should be displayed. The username is linked to this page if this PID is given. Default .. _showForgotPassword: showForgotPassword ~~~~~~~~~~~~~~~~~~ .. container:: table-row Property showForgotPassword Data type boolean Description Whether the show-forgot-password-link is shown in the login-form Default .. _domains: domains ~~~~~~~ .. container:: table-row Property domains Data type string Description Comma separated list of domain names. If the HTTP\_REFERER URL of the user is in this list of domains, the user is redirectet to the refering URL after a successful login. Default .. _email-from: email\_from ~~~~~~~~~~~ .. container:: table-row Property email\_from Data type Description The sender email address of the “forgot password” emails Default .. _email-fromName: email\_fromName ~~~~~~~~~~~~~~~ .. container:: table-row Property email\_fromName Data type Description The sender NAME of the “forgot password” emails Default .. _tableParams-details: tableParams\_details ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property tableParams\_details Data type
-params Description Setting the attributes of the table tag of the table displaying the user details (single display). A class attribute is automatically appended to this string! Default border=0 .. _templateFile: templateFile ~~~~~~~~~~~~ .. container:: table-row Property templateFile Data type string Description This is the default template file used to render forms, Default EXT:newloginbox/res/newloginbox\_00.html .. _replyTo: replyTo ~~~~~~~ .. container:: table-row Property replyTo Data type Description The reply-to email address of the “forgot password” emails Default .. _CSS-DEFAULT-STYLE: \_CSS\_DEFAULT\_STYLE ~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property \_CSS\_DEFAULT\_STYLE Data type string Description Default CSS style. You should unset this value and copy the CSS selectors to a stylesheet. Notice that the selectors will apply to all templates in the TYPO3 database by default! Default .. _LOCAL-LANG-langkey-labelkey: \_LOCAL\_LANG.[langkey].[labelkey] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property \_LOCAL\_LANG.[langkey].[labelkey] Data type string Description Overriding the labels from the local lang array. Default .. _DEFAULT-PI-VARS-piVars-key: \_DEFAULT\_PI\_VARS.[piVars\_key] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property \_DEFAULT\_PI\_VARS.[piVars\_key] Data type string Description Setting the default value of a piVars value (those values used in the post/get requests within the plugin.) Default 0 .. ###### END~OF~TABLE ###### [tsref:plugin.tx\_newloginbox\_pi1] .. _CSS-styling: CSS styling ^^^^^^^^^^^ As with all modern plugins they are styled with CSS selectors. These are the selectors you can use. You'll (for now) have to guess/experiment which of them does what. Here is the default style assigned to the template. .. _Login-form: Login form """""""""" .tx-newloginbox-pi1 table { border:2px solid #ccc; width:100%; } .tx-newloginbox-pi1 th { background:#ccc; padding:4px; text- align:right; white-space:nowrap; width:25%; } .tx-newloginbox-pi1 td { background:#eee; padding:4px; } .. _User-list: User list """"""""" .tx-newloginbox-pi3 table { border:2px solid #ccc; width:100%; } .tx-newloginbox-pi3 th { background:#ccc; padding:4px; white- space:nowrap; text-align:right; } .tx-newloginbox-pi3 td { background:#eee; padding:4px; } .tx-newloginbox-pi3-listrow th { text-align:center; } .tx-newloginbox-pi3-singleView th { width:25%; } .. _Template-and-common-markers: Template and common markers --------------------------- Since release 2.3.0, it is possible to use template file to render the new login box. The template is set with typoscript and the default one is EXT:newloginbox/res/newloginbox\_00.html These are substituted in all newloginbox item displaying templates. .. _Markers: Markers ^^^^^^^ - ###ACTION\_URI### - URI of the request for the login/logout form - ###EXTRA\_HIDDEN### - Hook required (additionnal hidden field used by kb\_md5fepw extension by Kraft Bernhard) - ###ON\_SUBMIT### - Hook required (used by kb\_md5fepw extension by Kraft Bernhard) - ###PREFIXID### - Same as class name ('tx\_newloginbox\_pi1') usefull to get a unique classname prefix - ###REDIRECT\_URL### - URL of redirection upon login - ###STORAGE\_PID### - explicit enough I guess (if not : id of the page where user are stored) - ###STATUS\_HEADER### - depends of the template - ###STATUS\_MESSAGE### - depends of the template .. _Wrap-parts: Wrap parts ^^^^^^^^^^ - ###HEADER\_VALID### - usefull to define what to show/hide - ###MESSAGE\_VALID### - usefull to define what to show/hide - ###FORGOTP\_VALID### - usefull to define what to show/hide .. _Newloginbox-Language-Markers-see-pi-locallang-php: Newloginbox Language Markers (see pi/locallang.php) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ###EMAIL\_LABEL### - corresponding to 'your\_email' - ###FORGOT\_PASSWORD### - corresponding to 'forgot\_password' - ###FORGOT\_PASSWORD\_BACKTOLOGIN### - corresponding to 'forgot\_password\_backToLogin' - ###FORGOT\_PASSWORD\_ENTEREMAIL### - corresponding to 'forgot\_password\_enterEmail' - ###LOGIN\_LABEL### - corresponding to 'login' - ###PASSWORD\_LABEL### - corresponding to 'password' - ###SEND\_PASSWORD### - corresponding to 'send\_password' - ###USERNAME\_LABEL### - corresponding to 'username' .. _To-Do-list: To-Do list ---------- See “doc/TODO.txt” inside the extension. You can also browse the wiki page here : `http://wiki.typo3.org/index.php/Newloginbox `_ .. _Changelog: Changelog --------- In more recent versions, compatible with TYPO3 3.6.0 the fields created in tt\_content has been REMOVED and substituted by content stored in a the “pi\_flexform” field through a flexform configured by “flexform\_ds.xml”. **In order to upgrade properly make sure to go to the “UPDATE!” module for the extension which is available in the function menu of the details view for the extension in the Extension Manager.** This module will read all OLD values from the obsolete database fields and move it into XML in the flexform! Thus you can upgrade shoothly with no data loss! |img-22| Since newloginbox Version 3.0.1 two additional TypoScript options exist for the better login box: storagePid and showForgotPassword (see above). |img-23| New frontend login box - 13 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 188 .. :id: Graphic4 .. :name: Graphic4 .. :width: 366 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 478 .. :id: Graphic6 .. :name: Graphic6 .. :width: 478 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 121 .. :id: Graphic5 .. :name: Graphic5 .. :width: 391 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 344 .. :id: Graphic7 .. :name: Graphic7 .. :width: 511 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 370 .. :id: Graphic8 .. :name: Graphic8 .. :width: 493 .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 323 .. :id: Graphic9 .. :name: Graphic9 .. :width: 213 .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :height: 136 .. :id: Graphic10 .. :name: Graphic10 .. :width: 394 .. |img-8| image:: img-8.png .. :align: left .. :border: 0 .. :height: 183 .. :id: Graphic11 .. :name: Graphic11 .. :width: 499 .. |img-9| image:: img-9.png .. :align: left .. :border: 0 .. :height: 605 .. :id: Graphic12 .. :name: Graphic12 .. :width: 423 .. |img-10| image:: img-10.png .. :align: left .. :border: 0 .. :height: 98 .. :id: Graphic13 .. :name: Graphic13 .. :width: 498 .. |img-11| image:: img-11.png .. :align: left .. :border: 0 .. :height: 98 .. :id: Graphic14 .. :name: Graphic14 .. :width: 495 .. |img-12| image:: img-12.png .. :align: left .. :border: 0 .. :height: 302 .. :id: graphics1 .. :name: graphics1 .. :width: 414 .. |img-13| image:: img-13.png .. :align: left .. :border: 0 .. :height: 94 .. :id: Graphic15 .. :name: Graphic15 .. :width: 298 .. |img-14| image:: img-14.png .. :align: left .. :border: 0 .. :height: 247 .. :id: Graphic16 .. :name: Graphic16 .. :width: 542 .. |img-15| image:: img-15.png .. :align: left .. :border: 0 .. :height: 227 .. :id: Graphic17 .. :name: Graphic17 .. :width: 458 .. |img-16| image:: img-16.png .. :align: left .. :border: 0 .. :height: 320 .. :id: Graphic18 .. :name: Graphic18 .. :width: 531 .. |img-17| image:: img-17.png .. :align: left .. :border: 0 .. :height: 283 .. :id: Graphic20 .. :name: Graphic20 .. :width: 566 .. |img-18| image:: img-18.png .. :align: left .. :border: 0 .. :height: 172 .. :id: Graphic19 .. :name: Graphic19 .. :width: 631 .. |img-19| image:: img-19.png .. :align: left .. :border: 0 .. :height: 241 .. :id: Grafik1 .. :name: Grafik1 .. :width: 460 .. |img-20| image:: img-20.png .. :align: left .. :border: 0 .. :height: 593 .. :id: Grafik2 .. :name: Grafik2 .. :width: 483 .. |img-21| image:: img-21.png .. :align: left .. :border: 0 .. :height: 149 .. :id: Graphic3 .. :name: Graphic3 .. :width: 445 .. |img-22| image:: img-22.png .. :align: left .. :border: 0 .. :height: 124 .. :id: Graphic21 .. :name: Graphic21 .. :width: 669 .. |img-23| image:: img-23.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102