Guild Census widget issues

Go down

Solved Guild Census widget issues

Post by Neko Overlord on October 2nd 2018, 11:59 pm

Technical Details


Forum version : #Invision
Position : Founder
Concerned browser(s) : Google Chrome
Screenshot of problem : https://i.servimg.com/u/f52/19/19/56/51/census10.png
Who the problem concerns : Yourself
Forum link : http://fairytail-endless-rp.forumotion.com/

Description of problem

As shown in the screenshot I linked, the top two user groups in my census widget won't show their proper colors. this is the code I was given by SL Gray to try and fix it before when I encountered an issue
Code:
'Heaven\'s Reach' : 4,

This widget doesn't have a javascript code. Just the widget and some stuff in the CSS stylesheet but that code made it so the colors don't show.
avatar
Neko Overlord
Forumember

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

http://fairytail-endless-rp.forumotion.com/

Back to top Go down

Solved Re: Guild Census widget issues

Post by SLGray on October 3rd 2018, 1:00 am

Please post the code you used.  Please post it in the code tags.

When I visit your forum, I do not see any color groups in that widget.



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

Male Posts : 44479
Reputation : 3154
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Solved Re: Guild Census widget issues

Post by Neko Overlord on October 3rd 2018, 2:12 am

This is the widget code. Lines 16 & 17 are the issue with this one

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:200px; }
#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 : {
      'Lion\'s Mane' : 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>

This is what's in my CSS Stylesheet lines 1 & 2 are the issue with this one.
Code:
#census_Lion\'s Mane { background-color:#FF6F00 }
#census_Heaven\'s Reach { background-color:#909BC7 }
#census_Twilight_Dragon { background-color:#000099 }
#census_Hellfire_Legion { background-color:#B50000 }
#census_Chaos_Head { background-color:#858585 }
#census_Nightmare_Incarnate { background-color:#A200FF }
#census_Guildless { background-color:#127D27 }
#census_Mage { background-color:#95DEF0 }
avatar
Neko Overlord
Forumember

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

http://fairytail-endless-rp.forumotion.com/

Back to top Go down

Solved Re: Guild Census widget issues

Post by skouliki on October 3rd 2018, 8:34 am

hi

use this 'Lion's_Mane' and this 'Heaven's_Reach'
avatar
skouliki
Manager
Manager

Female Posts : 4777
Reputation : 788
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Guild Census widget issues

Post by Draxion on October 3rd 2018, 9:21 am

Solved by me. Simply changed the CSS selectors to match the ones in the JavaScript and for some reason, the CSS code wouldn't work in the admin panel stylesheet, therefore I moved it to the widget and it worked perfectly. It solved the problem.
Problem solved & topic archived.
Please read our forum rules: ESF General Rules


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2224
Reputation : 283
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Back to top


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