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.

Guild Census Widget Not Working

4 posters

Go down

Solved Guild Census Widget Not Working

Post by Neko Overlord September 26th 2018, 8:29 am

Technical Details


Forum version : #Invision
Position : Founder
Concerned browser(s) : Google Chrome
Screenshot of problem : https://i.imgur.com/VucfDu9.png
Who the problem concerns : All members
When the problem appeared : Just now
Forum link : http://fairytail-endless-rp.forumotion.com/

Description of problem

I don't understand why the code stopped working all of a sudden but I haven't messed with it as of late but now, it isn't working like it should be.

Code:
<style type="text/css">#faCensus { color:#CBCBCB; font-size:13px; font-family:"cinzel decorative", Georgia, Vedana, Sans-serif; background:#0077D2; border:1px solid #444; border-radius:3px; padding:3px; width:214px; }
#censusMainTitle { font-size:16px; font-weight:bold; text-align:center; margin-bottom:6px; }
.censusRow { background:#222; border-radius:3px; padding:3px; margin:3px 0; }
.censusTitle { font-size:12px; display:inline-block; margin-right:4px; }
.censusValue { background:#666666; border-radius:3px 0 0 3px; display:inline-block; position:relative; height:15px; vertical-align:middle; }
.censusCount { background:#555; text-align:center; border-radius:0 3px 3px 0; display:inline-block; position:absolute; width:16px; right:-16px; }</style>
<div id="censusNode">
</div>
  <script type="text/javascript">//<![CDATA[
(function() {
  window._faCensus = {
    title : 'Guild Census', // main title
 
    // syntax : 'GROUP_NAME' : 'GROUP_ID'
    groups : {
      'Fairy Tail' : 3,
      'Heaven\'s Reach' : 4,
      'Twilight Dragon' : 5,
      'Hellfire Legion' : 6,
      'Chaos Head' : 7,
      'Nightmare Incarnate' : 8,
      'Guildless' : 10,
      'Mage' : 9
    },
 
    // get group member count from AJAX or storage
    getCount : function(id, callback) {
      var count = 0, pages, storage = window.localStorage;
 
      if (storage && storage['group_count_' + id] && storage['group_count_' + id + '_exp'] > +new Date - 1*60*60*1000) callback(storage['group_count_' + id]);
      else jQuery.get('/g' + id + '-?change_version=prosilver', function(d) {
        count = jQuery('.forumbg-table a[href^="/u"]', d).length;
        pages = jQuery('.pagination span a:not(.pag-img):last', d);
 
 
        if (pages[0]) {
          pages = +jQuery(pages).text();
          count = count * pages;
        }
 
        if (storage) {
          storage['group_count_' + id] = count;
          storage['group_count_' + id + '_exp'] = +new Date;
        }
 
        callback(count);
      });
    }
  };
 
  var census = document.createElement('DIV'),
      node = document.getElementById('censusNode'),
      i,
      row;
  census.id = 'faCensus';
  census.innerHTML = '<div id="censusMainTitle">' + _faCensus.title + '</div>';
 
  // set content
  for (i in _faCensus.groups) {
    row = document.createElement('DIV');
    row.innerHTML = 'loading...';
    row.className = 'censusRow';
 
    _faCensus.getCount(_faCensus.groups[i], function(count) {
      row.innerHTML = '<span class="censusTitle">' + i + '</span><span id="census_' + i.replace(/\s/g, '_') + '" class="censusValue" style="width:' + (count * 3) + 'px;"><span class="censusCount">' + count + '</span></span>';
    });
 
    census.appendChild(row); // add the row to the census
  }
 
  censusNode.appendChild(census); // append the census to the drop point
})();
// par ange tuteur
//]]></script>


Last edited by Rin-Senpai on September 26th 2018, 7:22 pm; edited 1 time in total
Neko Overlord
Neko Overlord
Forumember

Female Posts : 86
Reputation : 4
Language : English, CSS, HTML, JavaScript
Location : United States

https://auroranovusrp.forumotion.com/

Back to top Go down

Solved Re: Guild Census Widget Not Working

Post by SLGray September 26th 2018, 9:31 am

What exactly does this widget do?  Does it show the number of members of those groups who are online?  If that is the case, it was working fine for me as a guests because no members were logged in at the time I visited your forum.


Guild Census Widget Not Working  Slgray10

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

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Guild Census Widget Not Working

Post by Guest September 26th 2018, 9:45 am

Where did you get the code from?
avatar
Guest
Guest


Back to top Go down

Solved Re: Guild Census Widget Not Working

Post by skouliki September 26th 2018, 11:31 am

skouliki
skouliki
Manager
Manager

Female Posts : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Guild Census Widget Not Working

Post by Neko Overlord September 26th 2018, 7:22 pm

Its working now
Neko Overlord
Neko Overlord
Forumember

Female Posts : 86
Reputation : 4
Language : English, CSS, HTML, JavaScript
Location : United States

https://auroranovusrp.forumotion.com/

Back to top Go down

Solved Re: Guild Census Widget Not Working

Post by Ape September 26th 2018, 7:49 pm

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


Guild Census Widget Not Working  Left1212Guild Census Widget Not Working  Center11Guild Census Widget Not Working  Right112
Guild Census Widget Not Working  Ape_b110
Guild Census Widget Not Working  Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19436
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

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