Announcement

Collapse
No announcement yet.

Visitors in the Last X Hours Module

Collapse
This is a sticky topic.
X
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • glennrocksvb
    commented on 's reply
    Or are you only adding the secondary Administrators usergroup to Bot users and not to all Registered Users? If so, then you're good.

  • glennrocksvb
    commented on 's reply
    Why not just create a new usergroup off Administrators usergroup and name it as "Registered User Bots" and then move all bot users to that usergroup.

  • glennrocksvb
    replied
    Originally posted by flohse View Post
    I want the bots to show up as regular users. As far as I remember the bots need elevated privileges for the mods "Welcome Post for New Users" and "Auto-Create Flag Report Topic".​
    Wait, adding Administrator as secondary usergroup to Registered Users usergroups grants all regular users (not just Bot users) with Administrative privileges that you set. That's dangerous! It's unrelated to the mod issue but I don't think you should do that.

    Leave a comment:


  • glennrocksvb
    replied
    Thanks for the detailed responses. Let me tray again on my end. I didn't have that odd Registered Users primary usergrop and Administrators secondary usergroup set up.

    Leave a comment:


  • flohse
    commented on 's reply
    I temporarily removed the affected bot users from the second user group Adrministrators. This made no difference.

  • flohse
    replied
    Hello Glenn,

    here is the requested information.

    Originally posted by glennrocksvb View Post
    The affected users are all Registered Users, right?
    No, Affected users have this setting:

    Click image for larger version  Name:	image.png Views:	0 Size:	28.7 KB ID:	32898

    I want the bots to show up as regular users. As far as I remember the bots need elevated privileges for the mods "Welcome Post for New Users" and "Auto-Create Flag Report Topic".​

    Originally posted by glennrocksvb View Post
    ​Do Registered Users usergroup have Username HTML Markup configured in the Usergroup Manager? It looks like it doesn't but I want to confirm.
    No. They don't.

    Click image for larger version  Name:	image.png Views:	0 Size:	39.7 KB ID:	32894

    But Administrators have.

    Originally posted by glennrocksvb View Post
    ​If you set the mod to only show usernames without avatars, does the same issue occur?
    Yes.

    Click image for larger version  Name:	image.png Views:	0 Size:	22.9 KB ID:	32895

    Originally posted by glennrocksvb View Post
    Try changing to a different style/theme. Does the issue still occur?
    It is the same with unmodified themes, i. e. "Gradient":

    Click image for larger version  Name:	image.png Views:	0 Size:	32.2 KB ID:	32896

    with only text:

    Click image for larger version  Name:	image.png Views:	0 Size:	23.5 KB ID:	32897

    Originally posted by glennrocksvb View Post
    ​What is your vB and PHP versions?
    Already mentioned in post #172.

    Originally posted by flohse View Post
    vBulletin 6.1.3
    MySQL 8.0.43-0ubuntu0.24.04.1
    PHP Version 8.3.6
    Frank

    Leave a comment:


  • glennrocksvb
    replied
    flohse, I couldn't reproduce the issue on my end. Please answer the following additional questions:
    1. Try changing to a different style/theme. Does the issue still occur?
    2. What is your vB and PHP versions?

    Leave a comment:


  • glennrocksvb
    replied
    flohse, please answer the following:
    1. The affected users are all Registered Users, right?
    2. Do Registered Users usergroup have Username HTML Markup configured in the Usergroup Manager? It looks like it doesn't but I want to confirm.
    3. If you set the mod to only show usernames without avatars, does the same issue occur?
    Last edited by glennrocksvb; 08-21-2025, 06:11 PM.

    Leave a comment:


  • glennrocksvb
    replied
    flohse, thanks for providing detailed and helpful information. I'll debug on my end and let you know.

    Leave a comment:


  • flohse
    replied
    Hello Glenn,

    I think I have tracked down the cause for this issue to a code fragment in the template widget_vbmods_last_visitors.

    The first block in the "if" statement seems to be causing the problem.

    Code:
    <vb:if condition="!empty($usergroups[$usergroupid])">
    
            <vb:if condition="!empty($usergroups[$usergroupid][0])">
                    {vb:set displayUsername, {vb:raw usergroups.$usergroupid.0}}
                    {vb:strcat displayUsername, {vb:raw username}}
                    {vb:strcat displayUsername, {vb:raw usergroups.$usergroupid.1}}
            <vb:else />
                    {vb:set displayUsername, {vb:raw username}}
            </vb:if>
    
    <vb:else />
    
            {vb:data musername, user, fetchMusername, {vb:raw onlineUser}}
            <vb:if condition="$musername != $username">
                    {vb:set displayUsername, {vb:raw musername}}
                    {vb:set usernameTags, {vb:php explode, {vb:raw username}, {vb:raw musername}}}
                    {vb:set usergroups.$usergroupid, {vb:raw usernameTags}}
            <vb:else />
                    {vb:set displayUsername, {vb:raw username}}
                    {vb:set usergroups.$usergroupid, {vb:php array, '', ''}}
            </vb:if>
    
    </vb:if>
    ​
    If you remove the first block everything is shown correctly.

    Before removal:
    Click image for larger version  Name:	Screenshot 2025-08-20 224314.png Views:	0 Size:	31.1 KB ID:	32878

    After removal :
    Click image for larger version  Name:	Screenshot 2025-08-20 224144.png Views:	0 Size:	30.7 KB ID:	32879

    Can you please explain what the first block in the "if" statement is ​needed for and possibly fix this for the community? I don't want to break anything else.

    Thanks in advance.

    Frank

    Leave a comment:


  • flohse
    replied
    Hello Glenn,

    I am having a strange issue with this mod. I have the following user accounts.:

    Click image for larger version  Name:	image.png Views:	0 Size:	61.3 KB ID:	32862
    The displaynames are shown fine everywhere in the forum except in the specific Last 24 Hours module.

    Latest Topics for example is ok.

    Click image for larger version  Name:	image.png Views:	0 Size:	34.6 KB ID:	32863

    But the Visitors in the Last 24 Hours module shows garbled displaynames after the third name.

    Click image for larger version  Name:	image.png Views:	0 Size:	32.1 KB ID:	32864

    I have checked the database with phpMyAdmin. The data is correct. The admincp also shows the correct displaynames.

    Click image for larger version  Name:	image.png Views:	0 Size:	91.2 KB ID:	32865

    I hope, this is simply a display problem of this module and can easily be fixed.

    Can you please help and advise what I can provide for further troubleshooting?

    Thanks.

    Frank​

    vBulletin 6.1.3
    MySQL 8.0.43-0ubuntu0.24.04.1
    PHP Version 8.3.6

    Leave a comment:


  • glennrocksvb
    commented on 's reply
    Ok I'll take a look.

  • flohse
    replied
    I know. I can change the phrases for other modules in the Sitebuilder but not for your specific module. So I think it has something to do with how this module handles phrases?

    Frank

    Leave a comment:


  • glennrocksvb
    replied
    flohse, not being able to translate Module title is not specific to this mod only. It's on all modules.

    But starting in vB 6.1.2, vBulletin started support for using phrases in module titles. Please see the Translations section in their release notes linked below:

    &lt;h1&gt;vBulletin 6.1.2 Changes and Updates&lt;/h1&gt; &lt;p&gt;vBulletin 6.1.2 is available for download. vBulletin Cloud upgrades will begin in within 7-14 days.&lt;/p&gt; &lt;h2&gt;Gallery Channels&lt;/h2&gt; &lt;p&gt;Gallery Channels are a new top-level channel type centered around photos. Gallery Channels act like

    Leave a comment:


  • Ltvscout
    commented on 's reply
    Just checking in to see if you've made any headway into excluding invisible users yet?

Latest Posts

Collapse

Working...
X
Searching...Please wait.
An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

Please push the back button and reload the previous window.'
An unexpected error was returned: 'Your submission could not be processed because the token has expired.

Please push the back button and reload the previous window.'
An internal error has occurred and the module cannot be displayed.
There are no results that meet this criteria.
Search Result for "|||"