[BETA] [3.1][3.2] LF who was here (2.x)

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

[BETA] [3.1][3.2] LF who was here (2.x)

Post by LukeWCS » Mon Mar 18, 2019 1:12 pm

Extension Name: LF who was here (2.x)

Author: LukeWCS (3.2 Ext)

Former developers: Anv@r.all (3.1 Ext), nickvergessen (3.0 Mod)

Extension Description: Shows a visitor statistic of the current day or a freely selectable period. It lists both visitors and bots, as well as numbers on visible members, invisible members, bots and guests. In addition, the extension offers a visitor record and is extensively adjustable.

Until now I published 9 releases for the old 1.x structure ("bb3mobi/washere") and currently I am working on 2.0 which is meant as preparation for a CDB validation.

Extension Version: 2.0.0-beta3

Requirements: phpBB 3.1.11 or greater (this is the minimum version to grant full compatibility)

Features / Changes to "Nv who was here (3.1 Ext)":

Basically, LF-WWH offers the same functions as NV-WWH. Of course, because LF-WWH is based on Nv who was here 3.1 Ext v1.2.2 and this in turn is based on NV who was here 3.0 Mod v1.2.1.2. However, there are also many changes and improvements:

This section is essentially a concentrate of the change log. It also contains changes to LF-WWH 1.x.

New functions and thus also new settings in the ACP module:
  • The Administrator mode overrides all permissions systems and only users with administrative rights can see WWH. Helpful if WWH should be blocked for all other user groups at short notice.
  • Optionally, the full rights system of phpBB can be used. This makes it possible to define for each user group separately who is allowed to see WWH and to what extent.
  • Alternatively, the simplified rights system of LF-WWH can be used (default) to control only the guest display. The options are the same as for the full rights system. If the simplified rights system is activated, then guests see by default only the statistics and bots are generally locked out, so they do not see anything from LF-WWH.
  • The display of the bots can be restricted to users with administrative rights.
  • The display of the time can be activated separately for the user list and bot list.
  • For "Show user IP:" now the same options apply as for "Show time of ....:".
  • The position of the display in the statistics area is no longer determined by renaming the event template, but can be conveniently selected.
  • The API mode allows the display of WWH to be turned off while still generating the template variables. Thus, e.g. when using "Board3 Portal", WWH is only displayed in the portal.
  • If user accounts are deleted, the display of WWH is also immediately cleared. For NV-WWH, deleted users were removed from the display after expiration of the time period (e.g., after 24 hours). This feature can be disabled if necessary. Within the deletion-confirmation (of phpBB) an additional notification of LF-WWH is inserted informing that the WWH-display has been cleaned up. This notification only appears when a cleanup was actually necessary.
  • For testing purposes it is possible to have WWH displayed simultaneously on all available positions. Helpful if LF-WWH is to be adapted to a new style, because then no single position needs to be tested individually. Can of course also be used as decision support for the position.
  • The cache can now be disabled completely. To disable the cache is suitable for smaller forums and is not recommended for large forums.
  • The period of the update is no longer fixed to the phpBB setting "View online time span:" coupled, but can optionally be set freely by entering a number of minutes - within certain limits.
  • The generation of the info button and the hidden information can now also be deactivated.
  • The language variable LFWWH_LAST1 again has the default content "last at" and for the first time LFWWH_LAST2 also has the default content "o'clock". However, these variables are no longer generally used in the display. Instead, they can now be added directly to the time format using the special placeholders $1 and $2. Also new is the variable LFWWH_LAST3 ("last on"), which can be inserted with $3.
  • The number of visible members can now be switched off in the statistics line, just as it was possible for invisible users, bots and guests.
New or changed properties of the ACP module:
  • For NV-WWH, options that did not match "Yes/No" used both radio buttons and selection list. For LF-WWH radio buttons are only be used for "Yes/No", all other options have been consistently switched to selection list and their texts adapted accordingly.
  • The "Yes/No" options can now also be switched by clicking on their respective texts ("Yes", "No"), as is common practice.
  • Additional sections and unique headings provide a better overview and structure.
  • An additional button allows you to reset all settings (excluding the visitor record) to the installation standard. This button behaves in a similar way to the default phpBB "Reset" button. This means that only the settings are reset, the changed page must then be explicitly saved by the administrator.
  • Settings that currently have no meaning/effect are dimmed. This makes it easier to understand the dependencies of the settings and focuses on the currently relevant settings. Dimmed settings can still be changed. The dimming function is performed automatically when the ACP module is loaded, when the settings are changed, when the "Defaults" button is pressed and also when the standard "Reset" button is pressed. Thus, the status of the dimmed settings is always up to date.
  • If the order of the user list is changed, then the display of WWH is also updated immediately. In the case of NV-WWH, the display was updated only after the expiration of the refresh interval (default 5 minutes).
  • If the visitor record is reset, the date of the reset is now displayed behind the relevant setting "Reset visitor record:". This information has been stored since the original NV-WWH (3.0 Mod), but has never been displayed.
  • With the "Yes" button for "Reset visitor record", not only an info window but a dialog box appears, which can be confirmed with "Ok" or "Cancel". With "Cancel" the switch is reset to "No". The "Yes" button also stops responding to multiple clicks.
Permissions:
  • The group rights are now always displayed as the settings and only dimmed, if they are currently meaningless, so either when the extended rights system is disabled or the administrator mode is activated.
Templates and styles:
  • The template for the forum index has been completely revised and is now better structured and also more flexible with new template switches.
  • Furthermore, there are now not just one, but three event templates, matching the three possible positions (events) in the statistics area.
  • All template variables are now generated uniformly. That is, design-specific elements are no longer part of the variable, but are determined by the template, which gives more control in the template.
  • The template syntax has been changed to Twig because the old syntax is no longer supported in future versions of phpBB. For most of the conversion kasimi's "Twig Converter" was used.
WWH display:
  • With the setting "On hover" there is now additionally a button (info icon) with which the times or IPs can also be displayed directly. This is helpful for smartphones and tablets PCs. As a result, WWH provides all information available in the context for all device types equally. This feature can also be disabled if necessary. The button can be freely positioned within the associated language variable.
  • The WWH display will always look the same like "Who is online" adapted to the current phpBB version, as far as possible.
  • Users who temporarily or permanently set the feature "Invisible" can now see themselves in the list of users, as with "Who is online" the case is.
Miscellaneous:
  • Several changes have been made in the language system that provide increased translation flexibility. For example, e.g. the terms for "Members" and "Bots" are no longer fixed to the phpBB language pack, but can be freely defined. This was necessary because NV-WWH has still invariably displayed "User", but in the German version of phpBB it has "Members" in "Who is online?" is shown. Furthermore, the title of the ACP module can be defined independently of the navigation title. This allows to change the settings title, e.g. additionally show the display name of the extension.
  • Outdated structures and files have been removed.
  • Automatic data transfer from NV-WWH (any version) and LF-WWH 1.x (any version, but the permissions will not be imported).
  • The code section responsible for displaying time and IP in the user list and bot list has been completely rewritten to accommodate the new version 2.0.0 settings. This code has also been optimized in terms of speed, which is beneficial for large forums with many visitors.
Bug fixes:
  • All data is now taken into account by the migration, which means that there are no leftovers when uninstalling ("Delete data").
  • The structure and syntax were checked using EPV and all errors and warnings from NV-WWH 1.2.2 were corrected or taken into account accordingly. Thus LF-WWH corresponds to the current specifications.
  • The problems with different time zones of PHP and phpBB in combination with the setting "Display of the visitors of ..." -> "Today" and a time change from normal time to summer time or vice versa are fixed.
  • Entries in the visitor table with the exact time 00:00:00 are no longer counted on the previous day with the setting "Display of the visitors of ..." -> "Today".
Screenshots: (click for full size)

LF-WWH display - Group permissions "Guests" > "Can view statistics" (default) - not logged in
Image

LF-WWH display - Group permissions "Registered users" > "Can view statistics" & "Can view members" (default) - logged in (global moderator)
Image

LF-WWH display -This animation demonstrates the info button for hidden infos (on hover infos) - logged in (administrator)
Image

LF-WWH ACP module (default settings)
Image

LF-WWH permissions - Group "Guests" (default settings)
Image

NV-WWH v1.2.2 ACP module (for reference)
Image

Compatibility (successfully tested by me and other users)

phpBB: 3.1.12 / 3.2.2 - 3.2.7
PHP: 5.6 / 7.0 / 7.1 / 7.2

Note: I can not test PHP versions less than 5.6.38. This is the smallest version of PHP my provider offers.

Other extensions
Styles

LF-WWH was tested with several styles. With the following styles LF-WWH works out-of-the-box. Behind the style name I wrote the tested style version.
  • ArtsShade 3.2.5
  • Basic 3.2.5
  • Black 3.2.1
  • Black-Silver 3.2.5
  • Blue Turtle 3.2.1
  • ChesterBlue 3.2.3
  • Digi 3.2.5
  • Elegance 3.2.5
  • Latte 3.2.5
  • Lucid Lime 3.2.4
  • Metrolike 3.2.5
  • ongraydarkchild 3.2.5
  • PBWoW3 3.2.2
  • phpBB Retro 3.2.5
  • pro_ubuntu_lucid 3.2.5
  • proflat 3.2.5
  • prosilver 3.2.5 (base template)
  • Quantum Codex 3.2.5
  • Simplicity 3.2.5
  • SoftBlue 3.2.5
  • Visio 3.2.1
  • X-Creamy 3.2.5
  • XmasgoldChild 3.2.5
For the following styles I made a separate archive with template adjustments. This archive is offered "as is", after the release of LF-WWH 2.0.0 there will be no further updates (by me) for this package.
  • Absolution 3.2.3
  • AcidTech 3.2.5
  • BlackBoard 3.2.5
  • Blackfog 3.2.5
  • Dark Vision 3.2.5
  • CleanSilver 3.2.5
  • Flat Style 3.2.5
  • HexagonReborn 3.2.4
  • Orange_BBEs 3.2.5
  • Project Durango 3.2.5
  • rain_forest 3.2.4
  • Rock'n Roll 3.2.5
Extension Download: GitHub (releases): LF who was here (2.x)

Note1: Download LF-WWH 2 from this releases section only, because the releases are meant for an installation on a phpBB forum. And the releases will checked with EPV (Extension Pre Validator).

Note2: Please don't make PR's on GitHub for new language packs and style templates, I don't accept them. If you made a language pack or a style template you can publish the link to the download here in this topic.

Installation of LF-WWH / Upgrade of an old WWH extension

The upgrade is designed to be as easy to perform as a normal update or installation. There is only one thing to keep in mind: the old WWH extension, either NV-WWH or LF-WWH 1.x, must remain installed at short notice so that LF-WWH 2.x can take over the configuration and visitor table from the database. The old WWH extension may and should also be active so that you can immediately see after the upgrade whether the data transfer was successful. Parallel operation is therefore technically intended and legitimate. If the upgrade was successful, the old WWH extension can be deactivated and uninstalled ("Delete data").

Variant 1 - Installation / Update of LF-WWH 2.x:
  1. Download and extract the Zip archive of the GitHub release.
  2. In the extension management disable "LF who was here (2.x)", if already existing.
  3. Delete the complete folder whowashere/ inside ext/lukewcs/ from phpBB, if already existing.
  4. Copy the folder lukewcs/ from the Zip archive including all subfolders and files to ext/ from phpBB (upload).
  5. In the extension management, enable "LF who was here (2.x)".
Variant 2 - Upgrade of an old WWH extension (NV-WWH or LF-WWH 1.x):
  1. Download and extract the Zip archive of the GitHub release.
  2. Copy the folder lukewcs/ from the Zip archive including all subfolders and files to ext/ from phpBB (upload).
  3. In the extension management, enable "LF who was here (2.x)". This will also automatically perform a data transfer.
  4. Check and compare in the settings (ACP) and the WWH display (forum index), whether the settings and all data (in particular the visitor record) have been transferred correctly. If the upgrade was successful, the next step can be performed.
  5. Affects only LFWWH 1x: As the permissions are not transferred during data transfer, they must be adjusted after the upgrade, provided that the phpBB full rights system has been used before. If only the simplified rights system ("Display for guests:") of LF-WWH was used before, this step can be omitted.
  6. Now the old WWH extension can be disabled and uninstalled ("Delete data").
Translations

Note: Most of the text has been translated using Google Translator. English 1.0 is not one of my favorite programming languages. ^^
Last edited by LukeWCS on Wed Jun 05, 2019 9:37 am, edited 101 times in total.
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

User avatar
spaceace
Registered User
Posts: 1851
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [3.1][3.2][DEV] LF who was here

Post by spaceace » Mon Mar 18, 2019 10:03 pm

nice work :D

looking forward to a link

User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [3.1][3.2][DEV] LF who was here

Post by LukeWCS » Wed Mar 20, 2019 12:09 pm

Screenshots and list of changes updated to reflect the current status (2.0.0 build 9).
spaceace wrote:
Mon Mar 18, 2019 10:03 pm
nice work :D

looking forward to a link
Currently we test 2.x with a very small group of admins to ensure, that there are no serious bugs.

Every one who's interested to have a first look at LF-WWH and have no NV-WWH installed, can install the current stable release of LF-WWH 1.5.1. But if there already is NV-WWH installed, then it's highly recommended to wait until LF-WWH 2.x is published, because there is a bug in the migration of NV-WWH which can disturb the update to LF-WWH 1.5.1. The problematic version is NV-WWH 1.2.1 (shown as 1.0.0) of Anvar's 3.1 ext. Any one who have installed this version, don't try to install LF-WWH 1.5.1!
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

User avatar
Siava
Registered User
Posts: 134
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Re: [3.1][3.2][DEV] LF who was here

Post by Siava » Fri Mar 22, 2019 9:28 am

Clean install 1.5.1 works very good!
But generation time of index page increased from 0.065s to 0.12s after 1500+ visitors.

User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [3.1][3.2][DEV] LF who was here

Post by LukeWCS » Fri Mar 22, 2019 1:13 pm

Well, to generate the extra display with users and bots it costs also extra CPU time. That's only natural.

1500+, cool, then LF-WWH have a lot work to do. :mrgreen:

In 2.0 I have completely rewritten the generation process for displaying time and/or IP for the user and bot list . That was needed for the new setting possibilities in 2.0. I have also optimized the code a bit, so it ignores now all guests, because for them we don't need time and/or IP. In NV-WWH and also in LF-WWH 1.x there was several "ternary operator" querys in this case (7 total) and that costs extra time for unwanted informations. In 2.0 this querys was reduced from 7 to 1 (for guests). This "can" be an advantage with many visitors. We will see.

But, "0.12s" is damn fast, is that really a problem?

edit: And thanks for your feedback about 1.5.1.
edit2: Added "Installation / Upgrade of an old WWH extension" to start post.
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

User avatar
Siava
Registered User
Posts: 134
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Re: [3.1][3.2][DEV] LF who was here

Post by Siava » Sat Mar 23, 2019 8:45 am

LukeWCS wrote:
Fri Mar 22, 2019 1:13 pm
But, "0.12s" is damn fast, is that really a problem?
Absolutely no problems :) Just a remark. I understand that it takes time to generate a list. The more visitors, the more time.
Looking forward to 2.0. :)

User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [3.1][3.2][DEV] LF who was here

Post by LukeWCS » Tue Mar 26, 2019 9:46 pm

List of changes and ACP screenshot updated to reflect the current build 13.
Siava wrote:
Sat Mar 23, 2019 8:45 am
I understand that it takes time to generate a list. The more visitors, the more time.
Looking forward to 2.0. :)
Yes, we will see if the optimization is effective.
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [3.2][DEV] LF who was here (2.x)

Post by LukeWCS » Sun Apr 14, 2019 7:19 pm

After a month of work and tests LFWWH 2 is now ready for a first public beta. Thanks to canam800er, chris1278 and Talk19Zehn for feedback and suggestions. :)

Opening post updated.

Note: The current build is 25. Since build 10 I am using LFWWH 2 on my live board without any problems. But keep in mind: it's still declared as beta.
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

stefan-franz
Registered User
Posts: 73
Joined: Mon Mar 11, 2019 7:29 pm

Re: [3.2][BETA] LF who was here (2.x)

Post by stefan-franz » Fri Apr 19, 2019 7:03 am

Hallo, i installed it - works fine.

I would like to show only the sum. There are no invisible members on my board.
So it looks kinda weird:
"In total 7 visitors were online :: 7 visible members"

If I could express a wish - maybe you could install in the ACP area an option that displays only the sum or in addition to the invisible members would also be the option to hide the visible from.

Lg Stefan

User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [3.2][BETA] LF who was here (2.x)

Post by LukeWCS » Fri Apr 19, 2019 12:46 pm

Hello
stefan-franz wrote:
Fri Apr 19, 2019 7:03 am
I would like to show only the sum. There are no invisible members on my board.
Can you wrote an example what you want to reach? And about "invisible members", have you revoken the relevant permission for all user groups? If not, then you can still have invisible members.
So it looks kinda weird:
"In total 7 visitors were online :: 7 visible members"
Please be more precisely, what exactly is "weird" on this display? It have the same look and informations like "Who is online".
If I could express a wish - maybe you could install in the ACP area an option that displays only the sum or in addition to the invisible members would also be the option to hide the visible from.
First I need to understand what exactly do you want. Then I can decide. ;)
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

stefan-franz
Registered User
Posts: 73
Joined: Mon Mar 11, 2019 7:29 pm

Re: [3.2][BETA] LF who was here (2.x)

Post by stefan-franz » Fri Apr 19, 2019 1:29 pm

Oh...sorry, my bad English...

Instead of
Insgesamt waren 4 Besucher online :: 4 sichtbare Mitglieder (basierend auf den Besuchern der letzten 24 Stunden)

Only:
Insgesamt waren 4 Besucher online
(basierend auf den Besuchern der letzten 24 Stunden)

Able to switch of in ACP showing visible and not visible User.

Die Möglichkeit, die separate Anzeige von sichtbaren und unsichtbaren Mitgliedern aus zu blenden um nur die Summe an zu zeigen.

Lg Stefan

Chris1278
Registered User
Posts: 3
Joined: Thu Mar 14, 2019 6:07 pm

Re: [3.2][BETA] LF who was here (2.x)

Post by Chris1278 » Fri Apr 19, 2019 2:21 pm

You have the same question on phpbb.de. And i think there are answer for your question.

https://www.phpbb.de/community/viewtopi ... 0#p1394955

stefan-franz
Registered User
Posts: 73
Joined: Mon Mar 11, 2019 7:29 pm

Re: [3.2][BETA] LF who was here (2.x)

Post by stefan-franz » Fri Apr 19, 2019 2:41 pm

Yes, but I have to edit all languages in the board.
If it were an option global for all languages, it were useful for me.

LG Stefan

User avatar
LukeWCS
Registered User
Posts: 147
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [3.2][BETA] LF who was here (2.x)

Post by LukeWCS » Fri Apr 19, 2019 3:24 pm

Thanks for the example, now I understand what do you want to reach. ;)

Let's have a look at the current state:

We can disable guest display (number)
We can disable bots display (number and names)
We can disable hidden users display (number and names)

And you want also this:

We can disable registered users display (number)

Well... why not. That would be consequent and will fit into LFWWH's concept. Suggestion accepted, it's on my to-do list.

edit: Until new beta use the workaround posted on phpbb.de, as Chris1278 said.
Last edited by LukeWCS on Fri Apr 19, 2019 3:34 pm, edited 1 time in total.
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

stefan-franz
Registered User
Posts: 73
Joined: Mon Mar 11, 2019 7:29 pm

Re: [3.2][BETA] LF who was here (2.x)

Post by stefan-franz » Fri Apr 19, 2019 3:29 pm

Hey great. Thank you.

If it's ready to test, give me a message

LG Stefan

Post Reply

Return to “Extensions in Development”