matvernier Posted February 6, 2020 Report Share Posted February 6, 2020 Hi, I've searched through this forum and the wiki to find an answer to my question but did not see it addressed anywhere. Is there a mod or a piece of code who would make it possible to see on the front page of my tng 12 site who is online among the registered users? Did anyone ever added thuis type of information? If so, I would be interested to know how you maneged. Thank you, Quote Link to comment Share on other sites More sharing options...
matvernier Posted February 9, 2020 Author Report Share Posted February 9, 2020 Thank you M(anofmull) for the suggestion. The only problem is that I am not a programmer and would not know how to create such a mod. Is there anyone out there who would know how to create such a mod? Quote Link to comment Share on other sites More sharing options...
NLapierre Posted February 13, 2021 Report Share Posted February 13, 2021 Hi to all, Yes it would be nice if someone could program a mod like that. I had this feature in my old genealogy program and i found it very useful. I could see which registered user was logged into the site and there was a clickable link to email them. Thanks in advance to whoever can program this mod. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 13, 2021 Report Share Posted February 13, 2021 If such a mod would exist I would surely use it. Rob Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 23, 2021 Report Share Posted February 23, 2021 Looks like there's no follow up on this. Rob Quote Link to comment Share on other sites More sharing options...
RickM Posted February 23, 2021 Report Share Posted February 23, 2021 Tis a shame, however I do believe that most of the serious Mod Developers are still in somewhat of a catch up mode catching up to V13 changes and clashes with other Mods.. I too am not by any standard clever enough to do this, would love working with someone to debug / test though.. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 23, 2021 Report Share Posted February 23, 2021 Guess you're right. People are busy updating mods etc. I know It's not a "Need to have" but a "Nice to have" We'll just have to wait and see what happens. Quote Link to comment Share on other sites More sharing options...
matvernier Posted February 23, 2021 Author Report Share Posted February 23, 2021 Thanks to all Mods developers. I agree that it is not a 'Need to have' so I will try to be patient! Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 24, 2021 Report Share Posted February 24, 2021 I think about it from time to time... But I'm not very optimistic... Michel Quote Link to comment Share on other sites More sharing options...
RickM Posted February 24, 2021 Report Share Posted February 24, 2021 If anyone can you can Michel.. Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 24, 2021 Report Share Posted February 24, 2021 Bof... 🤔 Try this Mod. Try it for several days because if the user is already logged in, nothing happens. The user is 'registered' when logged in and 'unregistered' when logged out. What happens if the user simply closes his web browser? I don't know... I can't test because I don't have enough connections on my online site. The numbers of connected users is shown on the Admin page The connected users are shown with grey background in the users's table. If it works ❓❓, I'll make it prettier... Michel show_online_users_v13.0.3.beta1.zip Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 25, 2021 Report Share Posted February 25, 2021 Hi everyone, Good to see you're working on this Tested the following: When User logged on: User is gray in Users overview When User logged off: User is no longer gray in User overview When User closes browser / browserpage without logging off: User still gray in Users overview Maybe checking who's logged on should take place every ? minutes When a user is logged on I don't see the number of users connected (see screenshot) Is it possible to add make the number of users logged on visible on either the menubar itself or in the Info dropdown menu of the index.php ? (see screenshot) I will do some further testing Thanks for the effort so far Rob Quote Link to comment Share on other sites More sharing options...
RickM Posted February 25, 2021 Report Share Posted February 25, 2021 Michel, Like you I don't have enough users at the moment to prove or disprove how well this works. I have been on at my family to log in and look etc, but!!! I think that it would be great for other logged in users to know/see that others are logged in as well.. I can see how it works when I log in and out, I will test further with accounts that I know the passwords of. <Smile>.. And THANK YOU for your efforts, knew you were the man that 'if it could be done would get it done.. Definitely a mod I believe will take off.. Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 25, 2021 Report Share Posted February 25, 2021 3 hours ago, Rob Severijns said: When a user is logged on I don't see the number of users connected (see screenshot) Sorry, forgot to include this part in the beta1. This is the beta2 Michel show_online_users_v13.0.3.beta2.zip Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 25, 2021 Report Share Posted February 25, 2021 2 hours ago, RickM said: I can see how it works when I log in and out As I said, when the user closes his session, the session is destroyed on HIS computer. Your site doesn't see this action. If the user has checked the "stay connected..." box, the cookie is set for one year... and the user have no need to login again. For the site he stay connected... Search for alternative at logon/logoff... maybe when connection to the database... Michel Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 25, 2021 Report Share Posted February 25, 2021 Hi Michel, What are you getting yourself into But we're thankfull for the effort you're making 💪 👍 3 hours ago, RickM said: I think that it would be great for other logged in users to know/see that others are logged in as well.. I aggree Maybe this could be done via the Menubar ---> Info ---> online users (automaticly expand the names) 49 minutes ago, Michel KIRSCH said: As I said, when the user closes his session, the session is destroyed on HIS computer. Your site doesn't see this action. If the user has checked the "stay connected..." box, the cookie is set for one year... and the user have no need to login again. For the site he stay connected... Search for alternative at logon/logoff... maybe when connection to the database... This is indeed a problem. Not sure how to do this. Maybe after an inactivity in use of the database for more than 10 or 15 minutes or so, set the user to logged off. Guess this is independent of the cookie on the users computer but I'm not sure. Rob Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 25, 2021 Report Share Posted February 25, 2021 8 minutes ago, Rob Severijns said: inactivity in use of the database for more than 10 or 15 minutes or so, set the user to logged off. Bof... Users will not be happy to logon every 15 minutes... Seems that $_COOKIES on the site can do the work... For tomorrow. Have visit today Michel Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 25, 2021 Report Share Posted February 25, 2021 I just thought that everytime a user changes it's TNG webpage, like going from the Getperson page to the Family page there is database interaction. So the assumption I had was that if a user doen't interact with the TNG databas for more then 15 minutes the user is assumed to no longer be active in TNG and can therfore be set to logged off. Not sure if my assumption is correct though Rob Quote Link to comment Share on other sites More sharing options...
bhemph Posted February 25, 2021 Report Share Posted February 25, 2021 Yes, as currently implemented it shows who's logged in instead of who's online. The mod would need a new table tng_online where it would store activity each time a page is loaded. The code would then be able to say something like 2 logged in users and 1 guest visitor. If you wanted to have Googlebot, Bingbot, and other indexers listed not as guests, but bots that would be possible as well, by checking the hostname for guests and could have something like 4 users, 2 guests, and 1 bot are online. Also when that information is being displayed, there would need to be a check on the activity time in order to see if the activity was within the last 15 minutes, or whatever time is set. Then in order to keep the table from growing too big and slowing performance, there could be a delete of the rows where the activity is more than say 4 times the activity timeout (1 hour for a 15 minute activity time). That way it would not keep data for too long after a user closes the browser, but also shouldn't be dropping rows when one thread sees the time past the activity, the thread from that user then updates the row, then the thread doing the check for the delete ends up deleting the row. The logged in user would become a guest at logout, which would need to be handled in the update. This is kind of the premise of how some activity viewing shows on some forums, so just giving ideas on how to implement with what Rob is saying. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted February 25, 2021 Report Share Posted February 25, 2021 Hello Brett, Thanks for your input and suggestions. The intention, as far as I'm concerned, is to show who's logged on to the website. As a personal note: I'm trying to keep bots away as far as possible and my website doesn't need to be found in search engines etc. For others the opposite applies. I block bots etc via robot.txt, host and/or htaccess files and that could be an option for others too. Hope there is a way to meet everyone's needs. Rob Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 25, 2021 Report Share Posted February 25, 2021 2 hours ago, bhemph said: The mod would need 55 minutes ago, Rob Severijns said: The intention, Thanks for your inputs. There are ideas in it. Will sleep on it and think... Michel Quote Link to comment Share on other sites More sharing options...
matvernier Posted February 25, 2021 Author Report Share Posted February 25, 2021 Thank you Michel for your involvement with this project! I can see that there are a lot of things to consider for having such a mod. So far, when I want to see who has been online, I go to the "Users" section in Admin and sort the "Last Login" column. I suppose that this information may be useful and a good start for knowing when a user has logged in. Of course, as some of you have mentionned, the difficulty seems to be that people may not be online but still logged in. Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 27, 2021 Report Share Posted February 27, 2021 On 2/25/2021 at 5:09 PM, bhemph said: Then in order to keep the table from growing too big The table must result as one line for each user, registering his last activity datetime. So the max length of the table = the number of users. Michel Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted February 27, 2021 Report Share Posted February 27, 2021 Realizing it's different software, how is the TNG forum able to post 'Who's Online'? Is it similar to what Brent describes, ...utilizing some sort of timer? Edit: Sorry, should read TNG forum, no Wiki. Quote Link to comment Share on other sites More sharing options...
Brett Posted February 27, 2021 Report Share Posted February 27, 2021 30 minutes ago, tngrlkrz said: how is the TNG Wiki able to post 'Who's Online'? Ron I understand that the TNG Wiki uses a MediaWiki extension to do this - https://www.mediawiki.org/wiki/Extension:WhosOnline There are many sites (search engine) which use javascript for doing something similar, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.