How to have a "Group online " widget when you already have a staff one Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
5 posters

    How to have a "Group online " widget when you already have a staff one

    avatar
    Guest
    Guest


    How to have a "Group online " widget when you already have a staff one Empty How to have a "Group online " widget when you already have a staff one

    Post by Guest April 22nd 2016, 11:32 pm

    So I have a staff online widget but I would like one which shows a group or some members by a different name then "staff online" and I need to be able to have both at the same time.

    E.G.


    Staff Online:
    Mad

    (A group) online:
    Mad
    (name)

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by SLGray April 23rd 2016, 12:04 am

    Are you asking for support?  If yes, this is the wrong section.



    How to have a "Group online " widget when you already have a staff one Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    Guest
    Guest


    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Guest April 23rd 2016, 12:19 am

    SLGray wrote:Are you asking for support?  If yes, this is the wrong section.

    I am asking for help on how to do something if I have put this in the wrong section I apologise you can move it to the right one.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by SLGray April 23rd 2016, 12:41 am

    Moved to the correct section.



    How to have a "Group online " widget when you already have a staff one Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Draxion April 23rd 2016, 12:43 am

    Hi there,

    Sorry, I don't quite understand your issue. Can you go into more specifics?
    avatar
    Guest
    Guest


    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Guest April 23rd 2016, 1:02 am

    Draxion wrote:Hi there,

    Sorry, I don't quite understand your issue. Can you go into more specifics?

    As simple as I would like a widget that shows which members of the group you a sign it to is online
    Take Notes
    Take Notes
    Helper
    Helper


    Male Posts : 2337
    Reputation : 324
    Language : English
    Location : Forumountain

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Take Notes April 23rd 2016, 1:04 am

    What's the code for the staff online widget?
    avatar
    Guest
    Guest


    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Guest April 23rd 2016, 1:06 am

    Genesis wrote:What's the code for the staff online widget?

    Code:

    <script type="text/javascript">
    myStaff = ['Mad', 'Becky Queen Of Love', 'SirGrey', 'K A W'];
    staff_cache_time = 4*60*1000; // mm*ss*ms;
    </script>
    <div id="theStaff">
    </div>
    <div style="display:none" id="theContent">
    </div><noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript> <script type="text/javascript">
    if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
    else loadStaff();
    function loadStaff() {
    jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
    for (i=0; i<myStaff.length; i++) jQuery('#theContent a').filter(function() { return jQuery(this).text() === myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
    if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('No staff online');
    if (window.localStorage) {
    localStorage.staffOn = jQuery('#theStaff').html();
    localStorage.staffEx = +new Date;
    }
    })
    Take Notes
    Take Notes
    Helper
    Helper


    Male Posts : 2337
    Reputation : 324
    Language : English
    Location : Forumountain

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Take Notes April 23rd 2016, 1:15 am

    What's your forum link?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Ange Tuteur April 23rd 2016, 1:30 am

    Try using this for groups :
    Code:
    <script type="text/javascript">
    myGroups = ['#990099', '#CC0000'];
    groups_cache_time = 4*60*1000; // mm*ss*ms;
    </script>
     
    <div id="theGroups"></div>
    <div id="theGroupsContent" style="display:none"></div>
    <noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript>
     
    <script type="text/javascript">
    if (localStorage.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
    else loadStaff();
    function loadStaff() {
      jQuery.get('/viewonline', function(d) {
        for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
          for (var k = 0, l = myGroups.length; k < l; k++) {
            if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
              $(a[i]).appendTo(groups).wrap('<div class="myGroup">');
            }
          }
        }

        if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
        if (window.localStorage) {
          localStorage.groupOn = groups.innerHTML;
          localStorage.groupEx = +new Date;
        }
      })
    }
    </script>

    Make sure to include your group(s) colors in this array :
    Code:
    myGroups = ['#990099', '#CC0000'];
    avatar
    Guest
    Guest


    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Guest April 23rd 2016, 9:30 am

    Genesis wrote:What's the code for the staff online widget?

    http://amgcclan.forumtl.com/
    avatar
    Guest
    Guest


    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Guest April 23rd 2016, 9:32 am

    Ange Tuteur wrote:Try using this for groups :
    Code:
    <script type="text/javascript">
    myGroups = ['#990099', '#CC0000'];
    groups_cache_time = 4*60*1000; // mm*ss*ms;
    </script>
     
    <div id="theGroups"></div>
    <div id="theGroupsContent" style="display:none"></div>
    <noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript>
     
    <script type="text/javascript">
    if (localStorage.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
    else loadStaff();
    function loadStaff() {
      jQuery.get('/viewonline', function(d) {
        for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
          for (var k = 0, l = myGroups.length; k < l; k++) {
            if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
              $(a[i]).appendTo(groups).wrap('<div class="myGroup">');
            }
          }
        }

        if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
        if (window.localStorage) {
          localStorage.groupOn = groups.innerHTML;
          localStorage.groupEx = +new Date;
        }
      })
    }
    </script>

    Make sure to include your group(s) colors in this array :
    Code:
    myGroups = ['#990099', '#CC0000'];
    Okay let me try that

    Nope I need #FF0000 Red
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19324
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Ape April 23rd 2016, 2:58 pm

    Find this in the code and place your own colors in the place of this
    Code:
    myGroups = ['#990099', '#CC0000'];
    so where it has #990099 change it to your red color.

    Now to add the code in the widget you need to find this button on the editor >> How to have a "Group online " widget when you already have a staff one 121110 click it so it looks like this >> How to have a "Group online " widget when you already have a staff one 12111
    Now add your code and save Smile


    it should look something like this
    Code:
     <script type="text/javascript">
            myGroups = ['#FF0000', '#CC0000'];
            groups_cache_time = 4*60*1000; // mm*ss*ms;
            </script>
           
            <div id="theGroups"></div>
            <div id="theGroupsContent" style="display:none"></div>
            <noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript>
           
            <script type="text/javascript">
            if (localStorage.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
            else loadStaff();
            function loadStaff() {
              jQuery.get('/viewonline', function(d) {
                for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
                  for (var k = 0, l = myGroups.length; k < l; k++) {
                    if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
                      $(a[i]).appendTo(groups).wrap('<div class="myGroup">');
                    }
                  }
                }
           
                if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
                if (window.localStorage) {
                  localStorage.groupOn = groups.innerHTML;
                  localStorage.groupEx = +new Date;
                }
              })
            }
            </script>



    How to have a "Group online " widget when you already have a staff one Left1212How to have a "Group online " widget when you already have a staff one Center11How to have a "Group online " widget when you already have a staff one Right112
    How to have a "Group online " widget when you already have a staff one Ape_b110
    How to have a "Group online " widget when you already have a staff one Ape1010
    Take Notes
    Take Notes
    Helper
    Helper


    Male Posts : 2337
    Reputation : 324
    Language : English
    Location : Forumountain

    How to have a "Group online " widget when you already have a staff one Empty Re: How to have a "Group online " widget when you already have a staff one

    Post by Take Notes April 23rd 2016, 3:49 pm

    I'm looking at your forum and it seems you are missing part of the code at the top and bottom.