• Resolved jamesdoesdesign

    (@jamesdoesdesign)


    Hi,

    I just wanted to know if there was a way to limit the amount of users the widget displays? Perhaps this might be a wishlist thing, I’m not 100% sure.

    I have a forum with over 9000 users and at any given time there are 200 or more names showing. I was wondering if I could limit it to maybe show 15 for example. This is a cool plugin though! I like the extra added detail to spruce up the forum a bit.

    Thank you,
    James

    https://wordpress.org/plugins/bbpress-improved-statistics-users-online/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jake Hall

    (@geekserve)

    Hi James,

    Thanks for the feedback, I can see you have quite a busy forum! It looks really great, nice to see my plugin powering part of it!

    I will definitely keep that in mind for a future version, vBulletin / phpBB never provided it (to the best of my knowledge) however I will see the plausibility of that for you.

    For the time being, i’d suggest setting the last x hours to something a little smaller (such as 1 hour?) seeing as your forum is so busy. What I could potentially do is release an update to allow you to disable that section entirely?

    Kind Regards,

    Thread Starter jamesdoesdesign

    (@jamesdoesdesign)

    Hi Jake,

    You can see the forums it is installed on without me providing a link to the forums? Interesting… That is cool if you can! I didn’t know that.. Well, Thank you! Yes very very busy forum. There is a lot of custom built items and plugins that help power this monster. haha!

    I noticed on a few other forums that I’ve seen around, they have a latest member section as well. But they have it setup so that you only see 10 or 15 what ever number you choose and then a link or button that goes over to a page showing a full list. The full list shows last online time, username and pagination of users currently online. I know this is quite a lot more options than what you currently have and I am not asking you to go out of your way to add any of these capabilities. I am just following up on what I see in other forums, which I have never seen the capability of even showing that info over here until using your plugin, which is great!

    For the time being yes, I have set the forum to show in the last hour which generally keeps the numbers around 400-700 showing in the last hour. I’ve also moved it out of the sidebar and put it on the main forum page only and then styled it up a bit to match. So it only shows on the home forum page instead of loading every page and for every user. To take a bit of load off of the database and mysql as well. Which that seems to work a bit better on displaying them to because they have the full span of the content section instead of a smaller width sidebar.

    I thought about just wrapping your code up in a div with a class and then wrapping each section of the plugin (But I’m not a plugin expert) so that yes, I could hide that section. But then I also thought, if I hide that section with css like display:none; Essentially it’s still loading all of that data for all of those users so it’s a waste not to display it really. haha!

    Plugin Author Jake Hall

    (@geekserve)

    Hey,

    I had a peak through your older posts and found a link that way! Don’t worry, there’s no phoning home or any of that nonsense in this plugin! 🙂

    Would you mind if I link your forum to the plugin page? It looks brilliant and I think you’ve done a great job styling it!

    Finally, I will definitely add an option to disable parts of the core plugin in the next update, and I I’ll consider the option to display x amount and open up a second page displaying additional info also!

    Kind Regards,

    Thread Starter jamesdoesdesign

    (@jamesdoesdesign)

    Hey,

    Yes… I realized you might be able to see it there after I made the post. haha!

    Regarding posting the forum on your plugin page, sure! It isn’t the greatest content in the forum posts in the world but it really looks nice and functions well and has quite a bit of traffic daily, so it is a great example to use. So if you don’t mind the bad content aspect of it, than absolutely you can feature it!

    I really look forward to seeing the updates that you come up with! Glad I could provide some more options for you to look into for expansion! Like I said I’m happy that I even have that ability to show the member stats on the site and it functions correctly. so I’m grateful for that alone. haha! Good job on the plugin and thank you for responding! I look forward to seeing updates!

    Thank you,
    James

    Plugin Author Jake Hall

    (@geekserve)

    Hey Jamie,

    So a quick update on this, I have been working on adding this functionality into the plugin and thus far it is going well. Still got a way to go, however, I did want to clear something up with regards to simply hiding the data.

    Regardless of the limit set, all of the data will still be polled in the background
    So, as I was developing this I realised that regardless of the limit set, all of the data is still going to be polled. This is because of the way I have coded the plugin, and, it is actually the most efficient way of doing it.

    There is only one database query when I grab the data, with one sub-query. if I was to only grab the data required, it would require two more queries and a complete change to the way the plugin works… I feel from both experience and gut feeling, this will only result in similar/longer waiting time even though we are pulling smaller sets of data… it would still be two more queries than actually necessary!

    Although, based on your post I believe you don’t want to hide it simply because it is actually there and hiding it seems slightly pointless!

    Anyway, once I have something going I will put up a dev branch for you to test it out.

    – jake

    Thread Starter jamesdoesdesign

    (@jamesdoesdesign)

    Hey Jake,

    Sounds good. I agree with the multiple queries though. The less the better. You know, making one query to a database isn’t bad. However having multiple plugins (which most bbpress users do have..) requires more connections to the database on page load. So while yours may only be one, that forum has several other plugins installed which also make a connection. You have to have this though, otherwise you wouldn’t be able to grab the data which I totally understand. So grabbing it once instead of 2 or more is the better option.

    It’s especially taxing on a larger database over 700mb. It’s more susceptible to getting the famous database connection error, with each load and query added. If the hidden data and the shown data is only being called one time for either options, that is probably okay as well. I didn’t know if it was possible to turn off one section without it making a query while the other section was activated. But since you said it uses one query, that makes sense.

    I guess if hiding it is the only solution without using more queries than that’s fine as well. I do have quite a bit of items hidden anyways.

    Let me know! I look forward to checking it out! I do use a test website as well to test out everything before pushing plugins/updates to the live site to prevent any downtime.

    -James

    Plugin Author Jake Hall

    (@geekserve)

    Hey James,

    Would you mind giving this a shot? It will limit the amount of users displayed dependant on the value you enter in the settings.

    Please be aware this is a very early build of Version 1.4, therefore it isn’t complete or vetted!

    https://downloads.wordpress.org/plugin/bbpress-improved-statistics-users-online.1.3.20.zip

    Please only run this on testing environments.

    – Jake

    Plugin Author Jake Hall

    (@geekserve)

    Hi James,

    I have just released 1.4 that will allow you to restrict the users in this way. I have also added the ability to link to a page, e.g Memberlist, to display the users that weren’t shown in the statistics.

    Hope that works out well for you, please do let me know how it goes.

    Kind Regards,

    Thread Starter jamesdoesdesign

    (@jamesdoesdesign)

    Hi Jake,

    Thank you for the update! Sorry I didn’t respond sooner! I did get the chance to use both the beta and I have now updated to the new version.

    I have it setup now using the members link with 25 active within the last hour showing and the rest linking to members page. This works really nicely! It really cleans up that bottom part from displaying all of those usernames as well.

    Thank you for the link back to the website! That is much appreciated!

    And also thank you so much for the update! You have done some really amazing work with this plugin!

    Thank you,
    James

    Plugin Author Jake Hall

    (@geekserve)

    Hi James,

    Very happy to see it in motion, it was a real pain to code in (and at points I didn’t think it was possible!)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Limit the amount of users displayed’ is closed to new replies.