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.
The forum of the forums
3 posters

    number of group members in legend.

    avatar
    MissLikeICare
    Forumember


    Female Posts : 28
    Reputation : 0
    Language : en

    Solved number of group members in legend.

    Post by MissLikeICare January 17th 2023, 3:13 pm

    hi.
    i have a quick question.

    can it be done with phpbb2 version?
    https://help.forumotion.com/t161939-number-of-group-members-in-legend

    thanks in advance.



    Last edited by MissLikeICare on January 17th 2023, 3:33 pm; edited 1 time in total
    Razor12345
    Razor12345
    Support Moderator
    Support Moderator


    Male Posts : 1575
    Reputation : 266
    Language : Ukr, Rus, Eng
    Location : Ukraine

    Solved Re: number of group members in legend.

    Post by Razor12345 January 17th 2023, 3:18 pm

    Good afternoon!

    Quick answer:

    Code:
    $(document).ready(function() {
     
        var numberOfGroups = $(".gensmall b a").length;
     
        for (i = 0; i < numberOfGroups; i++) {
            var titleValue = $(".gensmall b a")[i].getAttribute("title");
            var numberOfUsers = titleValue.slice(titleValue.indexOf(":"));
            var originalText = $(".gensmall b a")[i].innerHTML;
            $(".gensmall b a")[i].innerHTML = originalText + numberOfUsers;
        }
     
    });

    Result:

    number of group members in legend. Ouo75

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

    avatar
    MissLikeICare
    Forumember


    Female Posts : 28
    Reputation : 0
    Language : en

    Solved Re: number of group members in legend.

    Post by MissLikeICare January 17th 2023, 3:33 pm

    strange... for me it's not working. will try to find, what changes causing it.
    thank you @Razor12345
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: number of group members in legend.

    Post by skouliki January 17th 2023, 4:09 pm

    marked as solved

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules


      Current date/time is September 22nd 2024, 1:27 pm