[CDB] [3.1][3.2][3.3] LF who was here 2

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!
Suggested Hosts
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: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

[CDB] [3.1][3.2][3.3] LF who was here 2

Post by LukeWCS »

Extension Name:

LF who was here 2

Author:

LukeWCS (3.2 Ext)

Former developers:

[email protected] (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 (lukewcs/whowashere) which is meant as preparation for a CDB validation.

Extension Version:

2.0.0-RC2

Requirements:
  • phpBB 3.1.11 or higher
  • PHP 5.3 or higher
Compatibility (successfully tested by me and other users)
  • phpBB 3.1.12 / 3.2.2 - 3.2.9 / 3.3.0-b2 - 3.3.0
  • PHP: 5.6 / 7.0 / 7.1 / 7.2 / 7.3 / 7.4
Other extensions
Styles

LF-WWH harmonizes with a variety of different styles without the need for template adjustments.

For some selected styles, I have created ready-made template adaptations, in which small to large changes were necessary, and all the adaptations are summarized in a separate archive. This archive is offered "as is", after the official release of LF-WWH 2.0.0 there will be no more updates from me.
  • AcidTech 3.2.8
  • BlackBoard 3.2.8
  • Blackfog 3.2.8
  • Dark Vision 3.2.8
  • Flat Style 3.2.8
  • Hexagon Reborn 3.2.8
  • Orange_BBEs 3.2.8
  • Project Durango 3.2.8
  • rain_forest 3.2.4
  • Rock'n Roll 3.2.8
I am aware of incompatibilities in the following styles that prevent or at least complicate customized templates.
  • Absolution 3.2.8: On the one hand, all 3 events required by LF-WWH are now in the wrong positions and, on the other hand, all 3 events were placed within IF blocks where they do not belong.
  • CleanSilver 3.2.8: The statistics area has been changed a lot and there are no own events to integrate custom templates.
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

Features / Changes to "Nv who was here (3.1 Ext)" and "LF who was here 1" (3.1/3.2 Ext):

This section is primarily intended for those who have already used NV-WWH or LF-WWH 1. There are other minor changes that are not listed here, all details can be found in the changelog.

New functions and thus new settings in the ACP module:
  • By default, the simple rights system of LF-WWH is active, which only controls the display for guests. The options are the same as for the full rights system. If the simple 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.
  • 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.
  • The display of the bots can be limited to users with administrative rights.
  • The time display can be set separately for the user list and bot list.
  • 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 switched off while the template variables continue to be generated. Thus, e.g. when using "Board3 Portal", WWH is only displayed in the portal.
  • When user accounts are deleted, the display of WWH is also immediately cleared. For NV-WWH, deleted users were removed from the display after the expiration of the time period (e.g., after 24 hours). This feature can be disabled if necessary.
  • For testing purposes it is possible to display WWH 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 update period is no longer fixed to the phpBB "Online display timeout" option, but can optionally be set by entering a number of minutes - within certain limits.
  • 2.0.0: Administrator mode overrides all permissions systems and only users with administrative privileges can see WWH. Helpful if WWH should be blocked for all other user groups at short notice.
  • 2.0.0: For "Show the user IP:" now the same options apply as for "Show the time of ...".
  • 2.0.0: The cache can now be disabled completely. The deactivation of the cache is not recommended for large forums.
  • 2.0.0: The generation of the info button and the hidden information can now also be deactivated.
  • 2.0.0: 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.
  • 2.0.0: The number of visible members can now be switched off in the statistics line, just as it was already 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. At LF-WWH there are option fields only for "Yes/No", all other options have been consistently converted to selection list and their texts adapted accordingly.
  • The switches (radio buttons) can now also be toggled by clicking on their respective texts ("Yes", "No"), as is common practice.
  • 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 "Standard" button is selected and also when the standard "Reset" button is used. 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 updated immediately. In the case of NV-WWH, the display was updated only after the expiration of the refresh interval (default 5 minutes).
  • Additional sections and unique headings provide a better overview and structure.
  • 2.0.0: If the visitor record is reset, then the reset date will now be displayed after the corresponding "Reset Record:" function. This information has been saved since the original NV-WWH (3.0 Mod), but never displayed.
  • 2.0.0: With "Reset visitor record:", the radio button "Yes" displays not only an info window, but a dialog box that can be confirmed with "Ok" or "Cancel". With "Cancel" the switch is reset to "No". In addition, "Yes" no longer responds to multiple clicks.
Permissions
  • 2.0.0: The group rights are now always displayed like the settings and only dimmed if they are currently not relevant, ie if either the extended rights system is deactivated or the administrator mode is activated.
Templates and Styles:
  • The forum index template has been completely redesigned and is now better structured and more flexible with new template switches.
  • Furthermore, there are now not only 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 like <br /> are no longer part of the variable, but are determined by the template, which gives more control in the design.
  • 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.
  • 2.0.0: The additional template adjustments were removed from the LF-WWH package and combined in an independent package, which can be downloaded separately.
WWH display:
  • With the settings "On hover" there is now additionally a button (info symbol) with which the times or IP's can also be displayed directly. This is helpful for smartphones and tablet PCs. As a result, WWH provides all information available in the context for all device types equally. This button can be freely positioned within the associated language variable.
  • The WWH ad will always display "Who's online?" adapted to the current phpBB version, as far as possible.
  • 2.0.0: Users who have temporarily or permanently set the feature "Invisible" can now see themselves in the user list, as with "Who is online?" the case is.
  • 2.0.0: If all template positions are displayed at the same time for test purposes, it is now additionally shown which template position is concerned. This is particularly helpful for styles where the statistics area has been changed significantly.
Other:
  • Several changes have been made in the language system, providing increased translation flexibility. Thus, 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 you to change the settings title, e.g. additionally display the display name of the extension.
  • Obsolete structures and files have been removed.
  • 2.0.0: Automatic data transfer from NV-WWH (any version) and LF-WWH 1 (any version, but the permissions are not applied).
  • 2.0.0: When user accounts are deleted, an additional notification from LF-WWH is added to the delete confirmation (by phpBB) informing them that the WWH display has been cleaned up. This notification only appears when a cleanup was actually necessary.
  • 2.0.0: 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.
Fixes:
  • All data is now taken into account by the migration, which means there are no leftovers when uninstalling ("Delete data").
  • Structure and syntax has been checked by EPV and all errors and warnings of NV-WWH 1.2.2 (2 fatals, 1 error, 66 warnings) have been corrected accordingly. Thus LF-WWH corresponds to the current specifications.
  • 2.0.0: 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.
  • 2.0.0: Entries in the visitor table with the exact time 00:00:00 are no longer counted the day before with the setting "Display of the visitors of ..." -> "Today".
Extension Download:

GitHub releases: LF who was here 2 - In the "Assets" section, click "Source code (zip)" to download the extension.

Note1: Download LF-WWH 2 from this releases section only, because the releases are meant for an installation on a phpBB board.

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. However, suggestions for corrections to the standard language packages from LF-WWH 2 are of course always welcome.

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 - NV-WWH or LF-WWH 1 - still needs to be installed so that LF-WWH 2 can take over the configuration and visitor tables from the database. If the upgrade was successful, the old WWH extension can be disabled and uninstalled.

Variant 1 - Installation / Update of LF-WWH 2:
  1. Download and extract the Zip archive of the GitHub release.
  2. In the extension management disable "LF who was here 2", if already existing.
  3. Delete the 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".
Variant 2 - Upgrade of an old WWH extension (NV-WWH or LF-WWH 1):
  1. The old WWH extension must still be installed and should also be activated. Short-term parallel operation with LF-WWH 2 is therefore technically provided and legitimate.
  2. Download and extract the Zip archive of the GitHub release.
  3. Copy the folder lukewcs/ from the Zip archive including all subfolders and files to ext/ from phpBB (upload).
  4. In the extension management, enable "LF who was here 2". This will also automatically perform a data transfer.
  5. 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.
  6. Affects only LF-WWH 1: 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 1 was used before, this step can be omitted.
  7. Now the old WWH extension can be disabled and uninstalled ("Delete data").
Translations

Note: Most of the text in this posting has been translated using Google Translator. English 1.0 is not one of my favorite programming languages. ^^
Last edited by LukeWCS on Wed Jul 08, 2020 2:41 pm, edited 137 times in total.
May the backup be with you. Always.
User avatar
spaceace
Registered User
Posts: 1999
Joined: Wed Jan 30, 2008 8:50 pm

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

Post by spaceace »

nice work :D

looking forward to a link
User avatar
LukeWCS
Registered User
Posts: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

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

Post by LukeWCS »

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.
User avatar
Siava
Registered User
Posts: 154
Joined: Wed Jan 26, 2005 10:07 am

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

Post by Siava »

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: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

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

Post by LukeWCS »

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.
User avatar
Siava
Registered User
Posts: 154
Joined: Wed Jan 26, 2005 10:07 am

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

Post by Siava »

LukeWCS wrote: Fri Mar 22, 2019 1:13 pmBut, "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: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

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

Post by LukeWCS »

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.
User avatar
LukeWCS
Registered User
Posts: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

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

Post by LukeWCS »

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.
stefan-franz
Registered User
Posts: 116
Joined: Mon Mar 11, 2019 7:29 pm

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

Post by stefan-franz »

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
Stefan
User avatar
LukeWCS
Registered User
Posts: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

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

Post by LukeWCS »

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.
stefan-franz
Registered User
Posts: 116
Joined: Mon Mar 11, 2019 7:29 pm

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

Post by stefan-franz »

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
Stefan
User avatar
Chris1278
Jr. Extension Validator
Posts: 455
Joined: Thu Mar 14, 2019 6:07 pm

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

Post by Chris1278 »

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: 116
Joined: Mon Mar 11, 2019 7:29 pm

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

Post by stefan-franz »

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
Stefan
User avatar
LukeWCS
Registered User
Posts: 277
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

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

Post by LukeWCS »

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.
stefan-franz
Registered User
Posts: 116
Joined: Mon Mar 11, 2019 7:29 pm

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

Post by stefan-franz »

Hey great. Thank you.

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

LG Stefan
Stefan

Return to “Extensions in Development”