The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Number of users in footer [All versions]

Go down

Number of users in footer [All versions] Empty Number of users in footer [All versions]

Post by Wizzard November 9th 2024, 9:45 am

If you want to see a total number of users in each group you have in your footer, you can do so with the code I will provide (script).
How it looks:

Number of users in footer [All versions] Screen11

Go to AP > Modules > Javascript management and make a new script. Name it "Number of users in footer" and for placement choose "In the home page".

Paste this code and save:

Code:
$(document).ready(function() {

    const FORUM_VERSION = _userdata["tpl_used"];

    var objs = {
        'subsilver': $(".gensmall b a"),
        'prosilver': $("em b a"),
        'punbb': $("p b a"),
        'invision': $("div b a"),
        'modernbb': $(".block-footer b a"),
        'awesomebb': $("em b a")
    };

    var numberOfGroups = objs[FORUM_VERSION].length;

    for (i = 0; i < numberOfGroups; i++) {
        var titleValue = objs[FORUM_VERSION][i].getAttribute("title");
        var numberOfUsers = titleValue.slice(titleValue.indexOf(":"));
        var originalText = objs[FORUM_VERSION][i].innerHTML;
        objs[FORUM_VERSION][i].innerHTML = originalText + numberOfUsers;
    }


});
Wizzard
Wizzard
Forumember

Male Posts : 125
Reputation : 23
Language : English

https://net-cafe.forumotion.com/

invisible_fa, SarkZKalie, TonnyKamper and كونان2000 like this post

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum