Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: dougiefresh on January 05, 2015, 07:13:45 PM

Title: List Of Users In Topic or Board
Post by: dougiefresh on January 05, 2015, 07:13:45 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4015)



LIST OF USERS IN FORUM/TOPIC/BOARD v3.1
By Dougiefresh (http://www.simplemachines.org/community/index.php?action=profile;u=253913) -> Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=4015)



Introduction
This mod modifies the Message Index and Post Display templates so that list of users in the board or topic is moved from above the topic list or start of the post to just above the Quick Reply box, and adds phpBB-like styling to the list.  It also alters the Board Index so that the list of users online is controlled by permission.

Admin Settings
There is a new admin page at Admin -> Features and Options -> Who's Online.  It takes the Enable Who's Online list and User online time threshold options from General tab and places them under the Who's Online.

There is a new option in v2.0 that removes the membergroup coloring that the user belongs to from the users online list.

There are 3 new permisions that allow membergroups to be able to view the users online list for:
o the Board Index (/index.php)
o the Message Index (index.php?board=x)
o the Post Display (index.php?t=x)

There are new options in v3.0 that allows you to move the "Who's Online" box to the top or bottom of the screen, as well as a section controlling whether the "Who's Online" section shows nothing, only numbers, or members for all installed themes.

Compatibility Notes
This mod was tested on SMF 2.0.15, but should work on SMF 2.1 RC2, as well as SMF 2.0 and up.  SMF 2.1 RC1 and before, as well as SMF 1.x, will not be supported.

Translations
o Dutch: @rjen (https://www.simplemachines.org/community/index.php?action=profile;u=287786)
o Spanish: d3vcho (http://www.simplemachines.org/community/index.php?action=profile;u=422971)!
o Spanish Latin: Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597)

Changelog
The changelog can be viewed at XPtsp.com (http://www.xptsp.com/board/free-modifications/list-of-users-in-topic-or-board/?tab=1).

License
Copyright (c) 2015 - 2019, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Title: Re: List Of Users In Topic or Board
Post by: tranhiep_116 on January 05, 2015, 10:46:12 PM
Thanks for share this mod
Title: Re: List Of Users In Topic or Board
Post by: Hj Ahmad Rasyid Hj Ismail on January 06, 2015, 02:54:43 AM
Nice mod dougifresh.
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on January 16, 2015, 08:19:59 PM
Uploaded v1.1 - January 16th, 2015
o License change to Simplified BSD.  No functionality change.
Title: Re: List Of Users In Topic or Board
Post by: shazoo! on January 30, 2015, 08:03:03 AM
Yes!! You read my mind! Thank you!!
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on February 01, 2015, 01:31:16 PM
Quote from: shazoo! on January 30, 2015, 08:03:03 AM
Yes!! You read my mind! Thank you!!
Huh?
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on April 06, 2015, 05:01:21 PM
Uploaded v1.2 - April 6th, 2015
o Updated for SMF 2.1 Beta 1
Title: Re: List Of Users In Topic or Board
Post by: Xer0n_ on January 08, 2016, 05:30:06 AM
I would suggest the option to remove member group colors, considering I have a light background with bright membergroup names.

Thanks, and nice mod!
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on January 08, 2016, 05:26:23 PM
Quote from: Xer0n_ on January 08, 2016, 05:30:06 AM
I would suggest the option to remove member group colors, considering I have a light background with bright membergroup names.
Let me see what I can do.
Title: Re: List Of Users In Topic or Board
Post by: d3vcho on January 09, 2016, 10:03:26 AM
Translation for Spanish_es and Spanish_es-utf8

8)
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on January 19, 2016, 06:29:22 AM
Uploaded v2.0 - January 17th, 2016
o Linked displaying all member lists to the "Enable Who's Online" checkbox.
o Added new permission to deny/allow showing member list on board index.
o Added Who's Online under Features and Options to deal with permissions and options.
o Added option to remove the membergroup color code from the members' username.
o Restored option from Themes/{theme}/Settings.template.php that was commented out.
o Added UTF8 and regular Spanish translation to the mod.




@d3vcho: Thank you for the Spanish translation!  However, version 2.0 adds some more strings to translate.  Could you translate them, then attach the spanish language files again?  Thanks!

Quote from: Xer0n_ on January 08, 2016, 05:30:06 AM
I would suggest the option to remove member group colors, considering I have a light background with bright membergroup names.
Your request has been granted!  Thanks for the suggestion!
Title: Re: List Of Users In Topic or Board
Post by: samimikawi on January 25, 2017, 10:22:20 AM
hello ,

i install the package and i make a check on the browsing in the permission settings but nothing showing in the topics . any idea ?

thanks & Best Regards
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on January 27, 2017, 10:23:59 AM
Under Admin => Configuration => Themes and Layouts => Theme Settings, look for Show who is viewing the board index and posts and change that option to Show member names.
Title: Re: List Of Users In Topic or Board
Post by: samimikawi on January 28, 2017, 05:21:28 PM
after a long search find it working now thanks
really appreciate it
Title: Re: List Of Users In Topic or Board
Post by: d3vcho on January 29, 2017, 09:46:00 AM
Got 2.0 translated finally. I haven't had a chance lately  8)
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on January 30, 2017, 09:07:42 AM
Uploaded v2.1 - January 30th, 2016
o Updated Spanish language translation, courtsey of d3vcho (http://www.simplemachines.org/community/index.php?action=profile;u=422971).




@d3vcho:  Thank you for the translation!  It's been included in this update!
Title: Re: List Of Users In Topic or Board
Post by: villasg on January 30, 2017, 09:45:23 AM
Hello my friend .
I want ask you if need to uninstall the previous v1.2 and install this v2.0 , or just install v2
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on January 30, 2017, 09:50:11 AM
Most of my mods are not upgradable via Package Manager, so you will need to uninstall version 1.2 before you can install version 2.1
Title: Re: List Of Users In Topic or Board
Post by: villasg on January 30, 2017, 09:52:21 AM
Thanks for the fast reply
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on July 07, 2017, 09:34:31 AM
Uploaded v2.2 - July 7th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 1 and 2.
Title: Re: List Of Users In Topic or Board
Post by: SaidJan on July 07, 2017, 02:24:32 PM
Please add other times other than 15 minutes. Like 1 or 4 or 7 days, or always.
Thanks
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on July 07, 2017, 03:10:43 PM
Quote from: SaidJan on July 07, 2017, 02:24:32 PM
Please add other times other than 15 minutes. Like 1 or 4 or 7 days, or always.
The options Enable who's online list and User online time threshold have been moved to Admin => Configuration => Features and Options => Who's Online.  Days are expressed in minutes, using a formula like d*60*24 (where d is the number of days).  For example, 1 day would be expressed as 1440 minutes, 7 days would be expressed as 10080 minutes.

Regarding your request, I will see what I can do about changing the UI to allow units of time to be changed to hours, days, and weeks....
Title: Re: List Of Users In Topic or Board
Post by: SaidJan on July 07, 2017, 03:24:58 PM
Quote from: dougiefresh on July 07, 2017, 03:10:43 PM
Quote from: SaidJan on July 07, 2017, 02:24:32 PM
Please add other times other than 15 minutes. Like 1 or 4 or 7 days, or always.
The options Enable who's online list and User online time threshold have been moved to Admin => Configuration => Features and Options => Who's Online.  Days are expressed in minutes, using a formula like d*60*24 (where d is the number of days).  For example, 1 day would be expressed as 1440 minutes, 7 days would be expressed as 10080 minutes.

Regarding your request, I will see what I can do about changing the UI to allow units of time to be changed to hours, days, and weeks....

I changed it to 50 and 10080, but in the topic it's showing in the last 15 minutes.
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on July 07, 2017, 03:30:32 PM
Quote from: SaidJan on July 07, 2017, 03:24:58 PM
Quote from: dougiefresh on July 07, 2017, 03:10:43 PM
Quote from: SaidJan on July 07, 2017, 02:24:32 PM
Please add other times other than 15 minutes. Like 1 or 4 or 7 days, or always.
The options Enable who's online list and User online time threshold have been moved to Admin => Configuration => Features and Options => Who's Online.  Days are expressed in minutes, using a formula like d*60*24 (where d is the number of days).  For example, 1 day would be expressed as 1440 minutes, 7 days would be expressed as 10080 minutes.

Regarding your request, I will see what I can do about changing the UI to allow units of time to be changed to hours, days, and weeks....

I changed it to 50 and 10080, but in the topic it's showing in the last 15 minutes.
Hmmm.... I'll take a look and see what I can figure out....
Title: Re: List Of Users In Topic or Board
Post by: SaidJan on July 07, 2017, 04:00:57 PM
Just figured out that the minutes is for main index's online members, and not for the topics or boards.
Just to let you know.
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on July 17, 2017, 12:53:53 PM
Quote from: SaidJan on July 07, 2017, 04:00:57 PM
Just figured out that the minutes is for main index's online members, and not for the topics or boards.
Just to let you know.
Actually, the minutes thing DOES NOT apply to the topics and boards.  Rather, the list of users in both topics and boards is gathered via the sessions information stored in the database, and is only for the topic/board in question.  Sessions over one day old are deleted by the forum scheduled task code....  I don't think this is something that I can easily change with any accuracy....
Title: Re: List Of Users In Topic or Board
Post by: aegersz on January 27, 2018, 06:25:05 PM
i often want to see the Guest's IP address (admin only, of course) but that field, unlike the member, is not a link.

not a big deal but i thought it could be useful.

love this mod !
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 01, 2018, 10:26:07 AM


dougiefresh has a mod : http://custom.simplemachines.org/mods/index.php?mod=4015 (http://custom.simplemachines.org/mods/index.php?mod=4015)

It shows a member viewing topic for 15 minutes, is it possible to change this to show member viewing topic, say for 24 hrs, or maybe longer.

Appreciate any help here.

Ron..
Title: Re: List Of Users In Topic or Board
Post by: -Rock Lee- on March 01, 2018, 10:54:42 AM
Quote from: Oldcrow on March 01, 2018, 10:26:07 AM


dougiefresh has a mod : http://custom.simplemachines.org/mods/index.php?mod=4015 (http://custom.simplemachines.org/mods/index.php?mod=4015)

It shows a member viewing topic for 15 minutes, is it possible to change this to show member viewing topic, say for 24 hrs, or maybe longer.

Appreciate any help here.

Ron..

Looking at the modification I think it takes the general time it has in the forum by modifying this value it should show the last 24 hours...


Regards!


Although it is already the Spanish translation, the Latin translation has variations 8).


Regards!
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 01, 2018, 12:33:54 PM
Quote from: Rock Lee on March 01, 2018, 10:54:42 AM
Quote from: Oldcrow on March 01, 2018, 10:26:07 AM


dougiefresh has a mod : http://custom.simplemachines.org/mods/index.php?mod=4015 (http://custom.simplemachines.org/mods/index.php?mod=4015)

It shows a member viewing topic for 15 minutes, is it possible to change this to show member viewing topic, say for 24 hrs, or maybe longer.

Appreciate any help here.

Ron..

Looking at the modification I think it takes the general time it has in the forum by modifying this value it should show the last 24 hours...


Regards!


Although it is already the Spanish translation, the Latin translation has variations 8) .


Regards!

I made some changes, but I think it's only for Who's Online, time, not who is viewing topic time..
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 01, 2018, 12:39:50 PM
@aegersz:  Where would you like to see the IP address?

@OldCrow: I'm working on updating the mod to correctly show who is "currently" browsing the topic/board, not who is browsing within the last 15 minutes.  I'll also try to fix the strings for the settings, as they can be a little misleading....

@Rock Lee and @d3vcho: Can you translate these strings?  Thanks in advance!!

$txt['users_browsing_topic'] = 'Users currently browsing this topic';
$txt['users_browsing_board'] = 'Users currently browsing this board';


@Everybody:  I need someone to take over maintenance of the Dutch translations.  If you can, please attach your copy of the translated files!  Thanks in advance!
Title: Re: List Of Users In Topic or Board
Post by: aegersz on March 01, 2018, 01:14:53 PM
@dougiefresh: thank you for entertaining this thought but i think that my request is not worth following up as I can get that information from elsewhere.

it just seemed a good idea at the time but i don't think that anyone would really benefit from it so i won't waste your limited energy.

but, as always, thank you for the service, mod king
Title: Re: List Of Users In Topic or Board
Post by: -Rock Lee- on March 01, 2018, 01:55:12 PM
With pleasure they are here @dougiefresh

$txt['users_browsing_topic'] = 'Usuarios que actualmente navegan por este tema';
$txt['users_browsing_board'] = 'Usuarios que actualmente navegan en este foro';


It goes both utf8 and normal have no accent...


Regards!

ADD: I only took it off for 15 minutes, I also translated it as you requested.
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 01, 2018, 02:02:46 PM
Quote from: dougiefresh on March 01, 2018, 12:39:50 PM
@aegersz:  Where would you like to see the IP address?

@OldCrow: I'm working on updating the mod to correctly show who is "currently" browsing the topic/board, not who is browsing within the last 15 minutes.  I'll also try to fix the strings for the settings, as they can be a little misleading....

@Rock Lee and @d3vcho: Can you translate these strings?  Thanks in advance!!

$txt['users_browsing_topic'] = 'Users currently browsing this topic';
$txt['users_browsing_board'] = 'Users currently browsing this board';


@Everybody:  I need someone to take over maintenance of the Dutch translations.  If you can, please attach your copy of the translated files!  Thanks in advance!

Thanks dougiefesh, I'll wait for your update. By the way I just registered on your forum, but doesn't seem to be active..
Title: Re: List Of Users In Topic or Board
Post by: aegersz on March 01, 2018, 05:40:46 PM
dougie's site is very much alive but i think he has to approve you or something first.
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 01, 2018, 06:54:22 PM
Quote from: aegersz on March 01, 2018, 05:40:46 PM
dougie's site is very much alive but i think he has to approve you or something first.

No problem getting in, just didn't see anyone online..
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 01, 2018, 07:25:20 PM
Yeah, it's pretty much dead.  Thinking about converting it to more of a static web site than a forum....  Not sure I should even do that....
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 01, 2018, 08:57:32 PM
Quote from: dougiefresh on March 01, 2018, 07:25:20 PM
Yeah, it's pretty much dead.  Thinking about converting it to more of a static web site than a forum....  Not sure I should even do that....

Get some posters, maybe it'll take of..
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 02, 2018, 02:18:42 PM
I've almost got the next version worked out.  It's a definite rewrite, from top to bottom.  Just lacking part of SMF 2.1 Beta 3 support...
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 02, 2018, 02:36:11 PM
Quote from: dougiefresh on March 02, 2018, 02:18:42 PM
I've almost got the next version worked out.  It's a definite rewrite, from top to bottom.  Just lacking part of SMF 2.1 Beta 3 support...

Great news. Thanks for the quick work..Any idea when you'll have it completed..
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 02, 2018, 04:08:38 PM
Hopefully, tonight after I get home from work.
Title: Re: List Of Users In Topic or Board
Post by: @rjen on March 02, 2018, 04:49:26 PM
Quote from: dougiefresh on March 01, 2018, 12:39:50 PM

@Everybody:  I need someone to take over maintenance of the Dutch translations.  If you can, please attach your copy of the translated files!  Thanks in advance!

Here you go...
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 02, 2018, 05:59:13 PM
Quote from: dougiefresh on March 02, 2018, 04:08:38 PM
Hopefully, tonight after I get home from work.

I'll sit by the phone waiting for your call.. Yea I'll wait until you post the fianl one..

Thanks..
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 02, 2018, 11:03:15 PM
@rjen, @Rock Lee, and @d3vcho:  Can y'all translate the following strings into your respective languages?

$txt['who_view_sub'] = '<div class="smalltext">NOTE: Affects Board Index only!</div>';
$txt['who_themes'] = 'Theme Settings';
$txt['who_placement_top'] = 'Put <strong>Who\'s Online</strong> at top of screen?';

Thanks a bunch!  Once I get these language strings, I'll update the new version!
Title: Re: List Of Users In Topic or Board
Post by: @rjen on March 03, 2018, 02:19:10 AM
Quote from: dougiefresh on March 02, 2018, 11:03:15 PM
@rjen, @Rock Lee, and @d3vcho:  Can y'all translate the following strings into your respective languages?

$txt['who_view_sub'] = '<div class="smalltext">NOTE: Affects Board Index only!</div>';
$txt['who_themes'] = 'Theme Settings';
$txt['who_placement_top'] = 'Put <strong>Who\'s Online</strong> at top of screen?';

Thanks a bunch!  Once I get these language strings, I'll update the new version!

Dutch:

$txt['who_view_sub'] = '<div class="smalltext">LET OP: Dit geldt alleen voor de Board Index!</div>';
$txt['who_themes'] = 'Thema Instellingen';
$txt['who_placement_top'] = 'Toon <strong>Wie is online</strong> aan de bovenzijde?';
Title: Re: List Of Users In Topic or Board
Post by: -Rock Lee- on March 03, 2018, 07:49:30 AM
Quote from: dougiefresh on March 02, 2018, 11:03:15 PM
@rjen, @Rock Lee, and @d3vcho:  Can y'all translate the following strings into your respective languages?

$txt['who_view_sub'] = '<div class="smalltext">NOTE: Affects Board Index only!</div>';
$txt['who_themes'] = 'Theme Settings';
$txt['who_placement_top'] = 'Put <strong>Who\'s Online</strong> at top of screen?';

Thanks a bunch!  Once I get these language strings, I'll update the new version!

It will be a pleasure, I leave both versions of the Latin...

Spanish_Latin-utf8:

$txt['who_view_sub'] = '<div class="smalltext">NOTA: ¡Solo afecta el índice del foro!</div>';
$txt['who_themes'] = 'Ajustes de tema';
$txt['who_placement_top'] = '¿Poner <strong>quien está en línea</strong> en la parte superior de la pantalla?';


and

Spanish_Latin:

$txt['who_view_sub'] = '<div class="smalltext">NOTA: &iexcl;Solo afecta el &iacute;ndice del foro!</div>';
$txt['who_themes'] = 'Ajustes de tema';
$txt['who_placement_top'] = '&iquest;Poner <strong>quien est&aacute; en l&iacute;nea</strong> en la parte superior de la pantalla?';



Regards!
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 03, 2018, 10:39:02 AM
Uploaded v3.0 - March 3rd, 2018
o Rewrote mod so that most functions are done with hooks.
o Added ability to change "view who's online" theme setting on mod settings page.
o Added ability to change whether the "who's online" block is on top or bottom.
o All language files converted to PHP language files, for ease of translation.
o Added Spanish Latin translation, courtsey of Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597).
o Updated Dutch translation, courtsey of @rjen (https://www.simplemachines.org/community/index.php?action=profile;u=287786).




@Rock Lee and @rjen:  Thank you for the translations!  They have been included in this version!

@Everybody:  Hopefully, this version will work on most themes for SMF 2.0, as well as SMF 2.1....  It's been tested against SMF 2.0's Curve and Core theme, as well as SMF 2.1 Beta 3's default theme.  On SMF 2.0.x Core-based themes and SMF 2.1 default-based theme, modifications will probably be necessary in order to make this mod work.  If this mod cannot find either the "Who's Online" stuff in the mod, or cannot find the destination area, then the "Who's Online" stuff will not be moved.
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 03, 2018, 10:54:08 AM
Thanks dougiefresh, got the update notice. Downloaded and installed new version, working good.. I appreciate your help with this.

Ron.
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on March 03, 2018, 11:21:43 AM
@OldCrow:  Please redownload and reinstall.  There was a tiny bug that was fixed, relating to the top/bottom option.
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on March 03, 2018, 11:53:15 AM
Quote from: dougiefresh on March 03, 2018, 11:21:43 AM
@OldCrow:  Please redownload and reinstall.  There was a tiny bug that was fixed, relating to the top/bottom option.

OK thanks dougiefesh. Done removed and reinstalled, seems to be OK.

Ron.
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on October 22, 2018, 09:18:39 PM
Uploaded v3.1 - October 22nd, 2018
o No functionality change.
o Updated documentation to point to new website.
Title: Re: List Of Users In Topic or Board
Post by: Ronald_1938 on October 23, 2018, 09:19:36 AM
Quote from: dougiefresh on October 22, 2018, 09:18:39 PM
Uploaded v3.1 - October 22nd, 2018
o No functionality change.
o Updated documentation to point to new website.

Thanks Douggie
Title: Re: List Of Users In Topic or Board
Post by: dougiefresh on May 22, 2019, 09:15:27 PM
Uploaded v3.2 - May 22nd, 2018
o Added support for SMF 2.1 RC2.
o Removed support for SMF 2.1 RC1 and below.
Title: Re: List Of Users In Topic or Board
Post by: Hatshepsut on September 23, 2019, 11:47:49 PM
For SMF 2.1, is it possible to add "Who's online" setting to change default view from "Members only" to "Everyone"?
Title: Re: List Of Users In Topic or Board
Post by: Arantor on September 24, 2019, 02:43:37 AM
It's funny, it was changed in 2.1 precisely because people complained. There's no config item for it, but I don't recall it being a big change. If I get time, I'll dig it out today.
Title: Re: List Of Users In Topic or Board
Post by: Deaks on October 23, 2019, 07:58:30 PM
dougie, not sure if its just the forum im working on or if its a known bug but getting undefined index error on the 2.1 version from

function LUTB_Buffer($buffer)
{
global $context, $txt, $modSettings, $forum_version, $topic;

$pattern = '#<(p|div|tr|td)([^\>]*?)(class=\"([^\>\"]*?)|id=\")(whos_viewing|whoisviewing)([^\>^\"]*?)\"([^\>]*?)>(<td([^\>]*?)>)?(.*?)</(p|div|td|tr)>#is';
if (preg_match($pattern, $buffer, $matches))
{
// Construct the new "Who's Online" HTML fragment:
$smf20 = substr($forum_version, 0, 7) == "SMF 2.0";
$replace = $matches[0];
$fragment = (($is_top = !empty($modSettings['who_placement_top'])) ? '<br />' : '') .
'<div class="cat_bar"><h3 class="catbg">' . $context['LUTB'] . ':</h3></div>' .
'<div class="information">' . $matches[10] . '</div>';

// Where, oh, where to insert the new fragment?
if (!$is_top)
$find = $smf20 ? '(moderationbuttons|topic_icons)' : '(description_board|msg' . $context['first_message'] . ')';
else
$find = $smf20 ? '(messageindex|forumposts)' : (empty($topic) ? 'navigate_section' : 'whoisviewing_bottom');

// If found, remove old fragment and place new fragment after found text:
$pattern = '#(<(a|p|div|tr)([^\>]*)(class=\"([^\>\"]*?)' . $find . '([^\>\"]*?)\"|id=\"' . $find . '")([^\>]*)\>)#is';
if (preg_match($pattern, $buffer, $matches))
$buffer = str_replace($matches[0], $fragment . $matches[0], str_replace($replace, '', $buffer));
}
return $buffer;
}


error states in undefined index on first_message

any idea?

EDIT: error generates when you go into any topic.

cheers