Difference between revisions of "LastLogin"
From Contao Community Documentation
m (→Online Mitglieder) |
m |
||
(22 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | '''''I'm not a native English speaker. Please correct my mistakes.'''''<br /><br /> | ||
+ | |||
Display of last login and the list of online / offline members over Insert-Tags.<br /><br /> | Display of last login and the list of online / offline members over Insert-Tags.<br /><br /> | ||
− | From | + | From Contao 2.8 is already displayed by the login module itself the last login time.<br /> |
This module now supports the internal method and also includes an insert-tag for this.<br /> | This module now supports the internal method and also includes an insert-tag for this.<br /> | ||
More Insert-Tags have been added over the course of development, as shown in the follow list.<br /> | More Insert-Tags have been added over the course of development, as shown in the follow list.<br /> | ||
− | |||
− | |||
{{ExtInfo | {{ExtInfo | ||
| Dev=Glen Langer ([[User:BugBuster|BugBuster]]) | | Dev=Glen Langer ([[User:BugBuster|BugBuster]]) | ||
| DevSite=http://www.contao.glen-langer.de | | DevSite=http://www.contao.glen-langer.de | ||
− | | ExtVersion=1. | + | | ExtVersion=1.9.1 / 3.0.0 |
− | | Version= | + | | Version=from 2.9 |
| TLVersion=2.8.0 - 2.8.4 (see installations notes) | | TLVersion=2.8.0 - 2.8.4 (see installations notes) | ||
− | | Depending=memberlist (mandatory), avatar (optional) | + | | Depending=[[Memberlist|memberlist]] (mandatory), [[Avatar|avatar]] (optional) |
| ERLink=http://www.contao.org/extension-list/view/lastlogin.en.html | | ERLink=http://www.contao.org/extension-list/view/lastlogin.en.html | ||
| DonateLink=http://www.amazon.de/wishlist/26HHEJOU03G76 | | DonateLink=http://www.amazon.de/wishlist/26HHEJOU03G76 | ||
− | | TrackerLink= | + | | TrackerLink=https://github.com/BugBuster1701/lastlogin/issues |
− | | Comment=Version for Contao | + | | VCSLink=https://github.com/BugBuster1701/lastlogin |
+ | | Comment=Version for Contao 3.0 online | ||
}} | }} | ||
[[de:LastLogin]] | [[de:LastLogin]] | ||
Line 24: | Line 25: | ||
Questions about the LastLogin module will be answered in forum: [http://www.contao-community.org/viewforum.php?f=21 Forum] | Questions about the LastLogin module will be answered in forum: [http://www.contao-community.org/viewforum.php?f=21 Forum] | ||
<br /> | <br /> | ||
− | Errors and requests can be reported in the [ | + | Errors and requests can be reported in the [https://github.com/BugBuster1701/lastlogin/issues Issue Tracker]. |
<br /> | <br /> | ||
Line 34: | Line 35: | ||
( /typolight/install.php in older TYPOlight installations )<br /> | ( /typolight/install.php in older TYPOlight installations )<br /> | ||
− | ==Note for older | + | ==Note for older Contao versions== |
− | === | + | ===Contao 2.8 - 2.11 === |
− | + | Contao 2.8 - 2.11 , please use LastLogin module version 1.9.1 ([http://www.contao.org/extension-list/view/lastlogin.10090019.en.html Direct Link]) | |
− | === | + | ===Contao 2.7=== |
− | Users of | + | Users of Contao 2.7.x, please use LastLogin module version 1.4.1 ([http://www.contao.org/extension-list/view/lastlogin.10040019.en.html Direct Link]) |
=Installation as an update= | =Installation as an update= | ||
Line 45: | Line 46: | ||
=Overview= | =Overview= | ||
The last login module has no back end or front end modules, it provides only insert tags.<br /> | The last login module has no back end or front end modules, it provides only insert tags.<br /> | ||
− | All Insert-Tags from the module to be resistant from | + | {{Hint|All Insert-Tags from the module to be resistant from Contao 2.8 cache by adding the prefix "cache_".}} |
+ | When the cache is turned on in the site structure, the values of the insert tags will not be saved with the cache, but will be replaced again with each delivery from the cache.<br /> | ||
Example: "last_login" becomes "cache_last_login. | Example: "last_login" becomes "cache_last_login. | ||
+ | <br /> | ||
The following Insert-Tags are currently available: | The following Insert-Tags are currently available: | ||
Line 52: | Line 55: | ||
** last_login / cache_last_login | ** last_login / cache_last_login | ||
− | * [[LastLogin# | + | * [[LastLogin#Online_members|Online Members]] |
** last_login_members_online / cache_last_login_members_online | ** last_login_members_online / cache_last_login_members_online | ||
− | * [[LastLogin# | + | * [[LastLogin#Online_members_linked|Online Members linked]] |
** last_login_members_online_link / cache_last_login_members_online_link | ** last_login_members_online_link / cache_last_login_members_online_link | ||
Line 64: | Line 67: | ||
** last_login_number_offline_members / cache_last_login_number_offline_members | ** last_login_number_offline_members / cache_last_login_number_offline_members | ||
− | * [[LastLogin# | + | * [[LastLogin#Offline_members|Offline Members]] |
** last_login_members_offline / cache_last_login_members_offline | ** last_login_members_offline / cache_last_login_members_offline | ||
− | * [[LastLogin# | + | * [[LastLogin#Offline_members_linked|Offline Members linked]] |
** last_login_members_offline_link / cache_last_login_members_offline_link | ** last_login_members_offline_link / cache_last_login_members_offline_link | ||
+ | |||
All the insert tags are controlled by parameters of what and how something is to be displayed. (firstname,lastname,avatar,...) | All the insert tags are controlled by parameters of what and how something is to be displayed. (firstname,lastname,avatar,...) | ||
− | |||
==Last Login== | ==Last Login== | ||
Shows the own "Last Login" time. Expandable with additional parameters.<br /> | Shows the own "Last Login" time. Expandable with additional parameters.<br /> | ||
Line 84: | Line 87: | ||
Last Login: 2009-04-03 | Last Login: 2009-04-03 | ||
Last Login: 03.04.09 16:27 | Last Login: 03.04.09 16:27 | ||
+ | </source> | ||
+ | |||
+ | If a member log on for the first time, no date for the last login is available. Instead, the current date is displayed.<br /> | ||
+ | Since version 1.9.0 it is possible to force the output in this case with a "0". Syntax: | ||
+ | <source lang="php"> | ||
+ | Last Login: {{cache_last_login::zero}} | ||
+ | </source> | ||
+ | shows on first login: 0, after each additional login will shown the date. The date format can also be defined again: | ||
+ | <source lang="php"> | ||
+ | Last Login: {{cache_last_login::zero::d.m.Y H:i}} | ||
+ | </source> | ||
+ | |||
+ | About the output of the "0", you can now respond in the template and print information on first login: | ||
+ | <source lang="php"> | ||
+ | <?php if ($this->replaceInsertTags( '{{cache_last_login::zero}}' ) == 0 ) : ?> | ||
+ | <p class="notice">Warning: This is your first login, please immediately change your password!<p> | ||
+ | <?php endif; ?> | ||
</source> | </source> | ||
Line 92: | Line 112: | ||
Examples: | Examples: | ||
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_online::username}} |
− | {{ | + | {{cache_last_login_members_online::firstname}} |
− | {{ | + | {{cache_last_login_members_online::lastname}} |
− | {{ | + | {{cache_last_login_members_online::fullname}} |
− | {{ | + | {{cache_last_login_members_online::avatar}} |
</source> | </source> | ||
The word "username" represents the default specification, <nowiki>{{cache_last_login_members_online}}</nowiki> will also apply.<br /> | The word "username" represents the default specification, <nowiki>{{cache_last_login_members_online}}</nowiki> will also apply.<br /> | ||
Line 103: | Line 123: | ||
===Output as a list=== | ===Output as a list=== | ||
− | The further declaration "list", will be used the included template "mod_last_login_members | + | The further declaration "list", will be used the included template "mod_last_login_members".<br /> |
This will output a list of the names.<br /> | This will output a list of the names.<br /> | ||
Examples: | Examples: | ||
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_online::username::list}} |
− | {{ | + | {{cache_last_login_members_online::firstname::list}} |
− | {{ | + | {{cache_last_login_members_online::lastname::list}} |
− | {{ | + | {{cache_last_login_members_online::fullname::list}} |
− | {{ | + | {{cache_last_login_members_online::avatar::list}} |
</source> | </source> | ||
− | The word "username" represents the default specification, <nowiki>{{ | + | The word "username" represents the default specification, <nowiki>{{cache_last_login_members_online::list}}</nowiki> will also apply. <br /> |
'''The members are displayed only when you are online.''' | '''The members are displayed only when you are online.''' | ||
{{Hint|The term "avatar" will only work if the module "[http://www.contao.org/extension-list/view/avatar.en.html avatar]" is installed. This does not happen automatically because it has not been defined as dependence in the ER.}} | {{Hint|The term "avatar" will only work if the module "[http://www.contao.org/extension-list/view/avatar.en.html avatar]" is installed. This does not happen automatically because it has not been defined as dependence in the ER.}} | ||
Line 119: | Line 139: | ||
===Online members linked=== | ===Online members linked=== | ||
Online members as a linked issue with connection to the module member list. It can be specified which field to display (first parameter) and the alias name of the site by the Member List module has been integrated (second parameter).<br /> | Online members as a linked issue with connection to the module member list. It can be specified which field to display (first parameter) and the alias name of the site by the Member List module has been integrated (second parameter).<br /> | ||
− | Use as | + | Use as cache_last_login_members_online, following information are available: |
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_online_link::username::memberlist}} |
− | {{ | + | {{cache_last_login_members_online_link::firstname::memberlist}} |
− | {{ | + | {{cache_last_login_members_online_link::lastname::memberlist}} |
− | {{ | + | {{cache_last_login_members_online_link::fullname::memberlist}} |
− | {{ | + | {{cache_last_login_members_online_link::avatar::memberlist}} |
</source> | </source> | ||
− | The words "username" and "memberlist" represents the default specification, <nowiki>{{cache_last_login_members_online_link}}</nowiki> will also apply.<br />'''The members are displayed only when you are online.'''<br /> | + | The words "username" and "memberlist" represents the default specification, <nowiki>{{cache_last_login_members_online_link}}</nowiki> will also apply.<br />'''The members are displayed only when you are online.''' |
+ | <br /> | ||
+ | |||
Examples: Output should be firstname, alias name is "mymemberlist": | Examples: Output should be firstname, alias name is "mymemberlist": | ||
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_online_link::firstname::mymemberlist}} |
</source> | </source> | ||
generated when there are 2 users online (with ID 4 and 5): | generated when there are 2 users online (with ID 4 and 5): | ||
Line 145: | Line 167: | ||
<div class="mod_last_login"> | <div class="mod_last_login"> | ||
<ul class="members_online_link_avatar"> | <ul class="members_online_link_avatar"> | ||
− | <li><a href="mymemberlist.html?show=4" title="Profile view Donna Evans"><img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_4.jpg"></a></li> | + | <li><a href="mymemberlist.html?show=4" title="Profile view Donna Evans"> |
− | <li><a href="mymemberlist.html?show=5" title="Profile view John Smith"><img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_5.jpg"></a></li> | + | <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_4.jpg"></a></li> |
+ | <li><a href="mymemberlist.html?show=5" title="Profile view John Smith"> | ||
+ | <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_5.jpg"></a></li> | ||
</ul> | </ul> | ||
</div> | </div> | ||
</source> | </source> | ||
− | == | + | ==Number registered members== |
− | + | Shows the number of registered members.<br /> | |
− | + | Examples: | |
<source lang="php"> | <source lang="php"> | ||
− | + | There are {{cache_last_login_number_registered_members}} registered members. | |
</source> | </source> | ||
− | == | + | ==Number online members== |
− | + | Shows the number of online members.<br /> | |
− | + | Examples: | |
<source lang="php"> | <source lang="php"> | ||
− | + | There are {{cache_last_login_number_online_members}} online members. | |
</source> | </source> | ||
− | == | + | ==Number offline members== |
− | + | Shows the number of offline members, but were already online today.<br /> | |
− | + | Examples: | |
<source lang="php"> | <source lang="php"> | ||
− | + | There are {{cache_last_login_number_offline_members}} offline members, recently online. | |
</source> | </source> | ||
− | + | ==Offline members== | |
− | ==Offline | + | Shows offline members, recently online. Expandable with additional parameters. |
− | + | ===Comma-separated output=== | |
− | === | + | |
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_offline::username}} |
− | {{ | + | {{cache_last_login_members_offline::firstname}} |
− | {{ | + | {{cache_last_login_members_offline::lastname}} |
− | {{ | + | {{cache_last_login_members_offline::fullname}} |
− | {{ | + | {{cache_last_login_members_offline::avatar}} |
</source> | </source> | ||
− | + | The word "username" represents the default specification, <nowiki>{{cache_last_login_members_offline}}</nowiki> will also apply.<br /> | |
− | ''' | + | '''The members are displayed only when you are online.''' |
− | {{ | + | {{Hint|The term "avatar" will only work if the module "[http://www.contao.org/extension-list/view/avatar.en.html avatar]" is installed. This does not happen automatically because it has not been defined as dependence in the ER.}} |
− | === | + | ===Output as a list=== |
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_offline::list}} |
− | {{ | + | {{cache_last_login_members_offline::username::list}} |
− | {{ | + | {{cache_last_login_members_offline::firstname::list}} |
− | {{ | + | {{cache_last_login_members_offline::lastname::list}} |
− | {{ | + | {{cache_last_login_members_offline::fullname::list}} |
− | {{ | + | {{cache_last_login_members_offline::avatar::list}} |
</source> | </source> | ||
− | + | The word "username" represents the default specification, <nowiki>{{cache_last_login_members_offline::list}}</nowiki> will also apply. <br />'''The members are displayed only when you are online.''' | |
− | {{ | + | {{Hint|The term "avatar" will only work if the module "[http://www.contao.org/extension-list/view/avatar.en.html avatar]" is installed. This does not happen automatically because it has not been defined as dependence in the ER.}} |
− | ===Offline | + | ===Offline members linked=== |
− | + | Offline members (recently online) as a linked issue with connection to the module member list. It can be specified which field to display (first parameter) and the alias name of the site by the Member List module has been integrated (second parameter).<br /> | |
− | + | Use as last_login_members_offline, following information are available: | |
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_offline_link::username::memberlist}} |
− | {{ | + | {{cache_last_login_members_offline_link::firstname::memberlist}} |
− | {{ | + | {{cache_last_login_members_offline_link::lastname::memberlist}} |
− | {{ | + | {{cache_last_login_members_offline_link::fullname::memberlist}} |
− | {{ | + | {{cache_last_login_members_offline_link::avatar::memberlist}} |
</source> | </source> | ||
− | + | The words "username" and "memberlist" represents the default specification, <nowiki>{{cache_last_login_members_offline_link}}</nowiki> will also apply.<br />'''The members are displayed only when you are online.''' | |
− | + | <br /> | |
+ | |||
+ | Examples: Output should be firstname, alias name is "mymemberlist": | ||
<source lang="php"> | <source lang="php"> | ||
− | {{ | + | {{cache_last_login_members_offline_link::firstname::mymemberlist}} |
</source> | </source> | ||
− | + | generated when there are 2 users online (with ID 4 and 5): | |
<source lang="html4strict"> | <source lang="html4strict"> | ||
<div class="mod_last_login_offline"> | <div class="mod_last_login_offline"> | ||
<ul class="members_offline_link"> | <ul class="members_offline_link"> | ||
− | <li><a href=" | + | <li><a href="mymemberlist.html?show=4" title="Profile view">Donna</a></li> |
− | <li><a href=" | + | <li><a href="mymemberlist.html?show=5" title="Profile view">John</a></li> |
</ul> | </ul> | ||
</div> | </div> | ||
</source> | </source> | ||
− | + | With "avatar", as follows: | |
<source lang="html4strict"> | <source lang="html4strict"> | ||
<div class="mod_last_login_offline"> | <div class="mod_last_login_offline"> | ||
<ul class="members_offline_link_avatar"> | <ul class="members_offline_link_avatar"> | ||
− | <li><a href=" | + | <li><a href="mymemberlist.html?show=4" title="Profile view Donna Evans"> |
− | <li><a href=" | + | <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_4.jpg"></a></li> |
+ | <li><a href="mymemberlist.html?show=5" title="Profile view John Smith"> | ||
+ | <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_5.jpg"></a></li> | ||
</ul> | </ul> | ||
</div> | </div> | ||
</source> | </source> | ||
+ | |||
+ | =Tutorials= | ||
+ | ==Using as HTML Module== | ||
+ | The following code could be used to place the insert-tags to an HTML module: | ||
+ | <source lang="html4strict"> | ||
+ | <!-- indexer::stop --> | ||
+ | <div class="mod_login"> | ||
+ | Last Login: {{cache_last_login::d.m.Y}} | ||
+ | </div> | ||
+ | <!-- indexer::continue --> | ||
+ | </source> | ||
+ | Then specify in the HTML module, "Protect module" and on "Allowed member groups" select "Select all". | ||
+ | So that the module is shown only in a logged state. | ||
+ | |||
+ | ==Multilingualism== | ||
+ | With the Insert-Tag "<nowiki>{{iflng}}</nowiki>" you could do it in several languages: | ||
+ | <source lang="php"> | ||
+ | {{iflng::en}}Last login:{{iflng}}{{iflng::de}}Letzer Login:{{iflng}} {{cache_last_login}} | ||
+ | </source> | ||
+ | |||
+ | ==When does "online" / "offline"?== | ||
+ | In "cache_last_login_members_online" / "cache_last_login_number_online_members" users must perform an action (page view) have done in Contao within the last 5 minutes. (Session table) | ||
+ | |||
+ | In "cache_last_login_members_offline" / "cache_last_login_number_offline_members" it is quite complex, which was then so are discussed and defined: | ||
+ | * Users who have accessed within the session time for 5 minutes no pages (but session owner) | ||
+ | * Users were today or yesterday online and today offline, by logging off | ||
+ | * Users were online today, but have no more session, and are not logged (but session deleted) | ||
+ | |||
+ | This means you get not all appear. It will only be displayed that were recently online, but already offline or considered as such. | ||
+ | |||
+ | ==Limit the number of output as a list== | ||
+ | In output as a list, it is possible by an additional parameter to limit the number. Examples of each type (with 5 lines): | ||
+ | <source lang="php"> | ||
+ | {{cache_last_login_members_online::username::list::5}} | ||
+ | {{cache_last_login_members_online::avatar::list::5}} | ||
+ | {{cache_last_login_members_online_link::lastname::memberlist::5}} | ||
+ | {{cache_last_login_members_online_link::avatar::memberlist::5}} | ||
+ | {{cache_last_login_members_offline::lastname::list::5}} | ||
+ | {{cache_last_login_members_offline::avatar::list::5}} | ||
+ | {{cache_last_login_members_offline_link::fullname::memberlist::5}} | ||
+ | {{cache_last_login_members_offline_link::avatar::memberlist::5}} | ||
+ | </source> | ||
+ | |||
+ | ---- | ||
+ | --[[User:BugBuster|BugBuster]] 00:06, 27 January 2013 (CET) |
Latest revision as of 15:40, 2 April 2013
I'm not a native English speaker. Please correct my mistakes.
Display of last login and the list of online / offline members over Insert-Tags.
From Contao 2.8 is already displayed by the login module itself the last login time.
This module now supports the internal method and also includes an insert-tag for this.
More Insert-Tags have been added over the course of development, as shown in the follow list.
Extension-Overview | |
---|---|
Name of the developer | Glen Langer (BugBuster) |
Developer Website | http://www.contao.glen-langer.de |
Version of the extension | 1.9.1 / 3.0.0 |
Compatibility with Contao Version | from 2.9 |
Compatibility with TYPOlight Version | 2.8.0 - 2.8.4 (see installations notes) |
Link to Extension Repository | http://www.contao.org/extension-list/view/lastlogin.en.html |
Donate the developer | http://www.amazon.de/wishlist/26HHEJOU03G76 |
Link to Tracker | https://github.com/BugBuster1701/lastlogin/issues |
Depending of ff. Extension | memberlist (mandatory), avatar (optional) |
Comment | Version for Contao 3.0 online |
Forum
Questions about the LastLogin module will be answered in forum: Forum
Errors and requests can be reported in the Issue Tracker.
Installation
The installation of the module occurs about the extension Repository in back end of Contao.
A manual installation is possible. Download the ZIP file from Extension Repository, unzip and transfer it.
A directory should have been created "/system/modules/lastlogin".
Then call /contao/install.php - Perform Update Database.
( /typolight/install.php in older TYPOlight installations )
Note for older Contao versions
Contao 2.8 - 2.11
Contao 2.8 - 2.11 , please use LastLogin module version 1.9.1 (Direct Link)
Contao 2.7
Users of Contao 2.7.x, please use LastLogin module version 1.4.1 (Direct Link)
Installation as an update
An update is identical to the installation.
Overview
The last login module has no back end or front end modules, it provides only insert tags.
Hint: | All Insert-Tags from the module to be resistant from Contao 2.8 cache by adding the prefix "cache_". |
When the cache is turned on in the site structure, the values of the insert tags will not be saved with the cache, but will be replaced again with each delivery from the cache.
Example: "last_login" becomes "cache_last_login.
The following Insert-Tags are currently available:
- Last Login
- last_login / cache_last_login
- Online Members
- last_login_members_online / cache_last_login_members_online
- Online Members linked
- last_login_members_online_link / cache_last_login_members_online_link
- Number registered members
- last_login_number_registered_members / cache_last_login_number_registered_members
- Number online members
- last_login_number_online_members / cache_last_login_number_online_members
- Number offline members
- last_login_number_offline_members / cache_last_login_number_offline_members
- Offline Members
- last_login_members_offline / cache_last_login_members_offline
- Offline Members linked
- last_login_members_offline_link / cache_last_login_members_offline_link
All the insert tags are controlled by parameters of what and how something is to be displayed. (firstname,lastname,avatar,...)
Last Login
Shows the own "Last Login" time. Expandable with additional parameters.
Without the format information is generated after the system definition "dateFormat". The example of the default installation "webacademy" is there defined as: "Y-m-d".
On example would be the last login on 3.4.2009 at 16:27 o'clock: :
Last Login: {{cache_last_login}} Last Login: {{cache_last_login::d.m.y H:i}}
shows:
Last Login: 2009-04-03 Last Login: 03.04.09 16:27
If a member log on for the first time, no date for the last login is available. Instead, the current date is displayed.
Since version 1.9.0 it is possible to force the output in this case with a "0". Syntax:
Last Login: {{cache_last_login::zero}}
shows on first login: 0, after each additional login will shown the date. The date format can also be defined again:
Last Login: {{cache_last_login::zero::d.m.Y H:i}}
About the output of the "0", you can now respond in the template and print information on first login:
<?php if ($this->replaceInsertTags( '{{cache_last_login::zero}}' ) == 0 ) : ?> <p class="notice">Warning: This is your first login, please immediately change your password!<p> <?php endif; ?>
Online members
Shows all the online and active members. Expandable with additional parameters. Each member must have released these fields. (Public fields)
Comma-separated output
Examples:
{{cache_last_login_members_online::username}} {{cache_last_login_members_online::firstname}} {{cache_last_login_members_online::lastname}} {{cache_last_login_members_online::fullname}} {{cache_last_login_members_online::avatar}}
The word "username" represents the default specification, {{cache_last_login_members_online}} will also apply.
The members are displayed only when you are online.
Hint: | The term "avatar" will only work if the module "avatar" is installed. This does not happen automatically because it has not been defined as dependence in the ER. |
Output as a list
The further declaration "list", will be used the included template "mod_last_login_members".
This will output a list of the names.
Examples:
{{cache_last_login_members_online::username::list}} {{cache_last_login_members_online::firstname::list}} {{cache_last_login_members_online::lastname::list}} {{cache_last_login_members_online::fullname::list}} {{cache_last_login_members_online::avatar::list}}
The word "username" represents the default specification, {{cache_last_login_members_online::list}} will also apply.
The members are displayed only when you are online.
Hint: | The term "avatar" will only work if the module "avatar" is installed. This does not happen automatically because it has not been defined as dependence in the ER. |
Online members linked
Online members as a linked issue with connection to the module member list. It can be specified which field to display (first parameter) and the alias name of the site by the Member List module has been integrated (second parameter).
Use as cache_last_login_members_online, following information are available:
{{cache_last_login_members_online_link::username::memberlist}} {{cache_last_login_members_online_link::firstname::memberlist}} {{cache_last_login_members_online_link::lastname::memberlist}} {{cache_last_login_members_online_link::fullname::memberlist}} {{cache_last_login_members_online_link::avatar::memberlist}}
The words "username" and "memberlist" represents the default specification, {{cache_last_login_members_online_link}} will also apply.
The members are displayed only when you are online.
Examples: Output should be firstname, alias name is "mymemberlist":
{{cache_last_login_members_online_link::firstname::mymemberlist}}
generated when there are 2 users online (with ID 4 and 5):
<div class="mod_last_login"> <ul class="members_online_link"> <li><a href="mymemberlist.html?show=4" title="Profile view">Donna</a></li> <li><a href="mymemberlist.html?show=5" title="Profile view">John</a></li> </ul> </div>
With "avatar", as follows:
<div class="mod_last_login"> <ul class="members_online_link_avatar"> <li><a href="mymemberlist.html?show=4" title="Profile view Donna Evans"> <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_4.jpg"></a></li> <li><a href="mymemberlist.html?show=5" title="Profile view John Smith"> <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_5.jpg"></a></li> </ul> </div>
Number registered members
Shows the number of registered members.
Examples:
There are {{cache_last_login_number_registered_members}} registered members.
Number online members
Shows the number of online members.
Examples:
There are {{cache_last_login_number_online_members}} online members.
Number offline members
Shows the number of offline members, but were already online today.
Examples:
There are {{cache_last_login_number_offline_members}} offline members, recently online.
Offline members
Shows offline members, recently online. Expandable with additional parameters.
Comma-separated output
{{cache_last_login_members_offline::username}} {{cache_last_login_members_offline::firstname}} {{cache_last_login_members_offline::lastname}} {{cache_last_login_members_offline::fullname}} {{cache_last_login_members_offline::avatar}}
The word "username" represents the default specification, {{cache_last_login_members_offline}} will also apply.
The members are displayed only when you are online.
Hint: | The term "avatar" will only work if the module "avatar" is installed. This does not happen automatically because it has not been defined as dependence in the ER. |
Output as a list
{{cache_last_login_members_offline::list}} {{cache_last_login_members_offline::username::list}} {{cache_last_login_members_offline::firstname::list}} {{cache_last_login_members_offline::lastname::list}} {{cache_last_login_members_offline::fullname::list}} {{cache_last_login_members_offline::avatar::list}}
The word "username" represents the default specification, {{cache_last_login_members_offline::list}} will also apply.
The members are displayed only when you are online.
Hint: | The term "avatar" will only work if the module "avatar" is installed. This does not happen automatically because it has not been defined as dependence in the ER. |
Offline members linked
Offline members (recently online) as a linked issue with connection to the module member list. It can be specified which field to display (first parameter) and the alias name of the site by the Member List module has been integrated (second parameter).
Use as last_login_members_offline, following information are available:
{{cache_last_login_members_offline_link::username::memberlist}} {{cache_last_login_members_offline_link::firstname::memberlist}} {{cache_last_login_members_offline_link::lastname::memberlist}} {{cache_last_login_members_offline_link::fullname::memberlist}} {{cache_last_login_members_offline_link::avatar::memberlist}}
The words "username" and "memberlist" represents the default specification, {{cache_last_login_members_offline_link}} will also apply.
The members are displayed only when you are online.
Examples: Output should be firstname, alias name is "mymemberlist":
{{cache_last_login_members_offline_link::firstname::mymemberlist}}
generated when there are 2 users online (with ID 4 and 5):
<div class="mod_last_login_offline"> <ul class="members_offline_link"> <li><a href="mymemberlist.html?show=4" title="Profile view">Donna</a></li> <li><a href="mymemberlist.html?show=5" title="Profile view">John</a></li> </ul> </div>
With "avatar", as follows:
<div class="mod_last_login_offline"> <ul class="members_offline_link_avatar"> <li><a href="mymemberlist.html?show=4" title="Profile view Donna Evans"> <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_4.jpg"></a></li> <li><a href="mymemberlist.html?show=5" title="Profile view John Smith"> <img width="32" height="31" class="avatar" alt="avatar" src="tl_files/avatars/member_5.jpg"></a></li> </ul> </div>
Tutorials
Using as HTML Module
The following code could be used to place the insert-tags to an HTML module:
<!-- indexer::stop --> <div class="mod_login"> Last Login: {{cache_last_login::d.m.Y}} </div> <!-- indexer::continue -->
Then specify in the HTML module, "Protect module" and on "Allowed member groups" select "Select all". So that the module is shown only in a logged state.
Multilingualism
With the Insert-Tag "{{iflng}}" you could do it in several languages:
{{iflng::en}}Last login:{{iflng}}{{iflng::de}}Letzer Login:{{iflng}} {{cache_last_login}}
When does "online" / "offline"?
In "cache_last_login_members_online" / "cache_last_login_number_online_members" users must perform an action (page view) have done in Contao within the last 5 minutes. (Session table)
In "cache_last_login_members_offline" / "cache_last_login_number_offline_members" it is quite complex, which was then so are discussed and defined:
- Users who have accessed within the session time for 5 minutes no pages (but session owner)
- Users were today or yesterday online and today offline, by logging off
- Users were online today, but have no more session, and are not logged (but session deleted)
This means you get not all appear. It will only be displayed that were recently online, but already offline or considered as such.
Limit the number of output as a list
In output as a list, it is possible by an additional parameter to limit the number. Examples of each type (with 5 lines):
{{cache_last_login_members_online::username::list::5}} {{cache_last_login_members_online::avatar::list::5}} {{cache_last_login_members_online_link::lastname::memberlist::5}} {{cache_last_login_members_online_link::avatar::memberlist::5}} {{cache_last_login_members_offline::lastname::list::5}} {{cache_last_login_members_offline::avatar::list::5}} {{cache_last_login_members_offline_link::fullname::memberlist::5}} {{cache_last_login_members_offline_link::avatar::memberlist::5}}
--BugBuster 00:06, 27 January 2013 (CET)