Gaming Underground Network

Come for the mods, stay for the community
 
HomePortalLatest imagesInterviewsRegisterLog in
Search
 
 

Display results as :
 

 


Rechercher Advanced Search
Info Panel
______________
MOD MASTER THREADS:
FALLOUT
THE ELDER SCROLLS

______________


______________


GUNinsider
Fallout Miami: Mika999
Stay Connected

GUNetwork
Keywords
Superpele hunk marvel khan boom daryl boomers Ryse money NPCs wolfenstein Call Reforged vault body power Overhaul machine dead commonwealth gauss riot Gear ghoul Mask mandalorian
Latest topics
» The Legion are fascists, let's discuss it.
Suggestions for a better viewing of the forum. Emptyby monke gaming Today at 8:56 am

» A long overdue introduction
Suggestions for a better viewing of the forum. Emptyby Athallah Akbar Thu Apr 25, 2024 5:46 pm

» (Fo4) fo76 Steel Dawn Weapons and Armor ports
Suggestions for a better viewing of the forum. Emptyby Nicward Sat Apr 20, 2024 10:50 pm

» Howdy from grandmastoes
Suggestions for a better viewing of the forum. Emptyby Apoc Wed Apr 17, 2024 12:06 am

» armor slot changing in creation kit
Suggestions for a better viewing of the forum. Emptyby Meno Tue Apr 16, 2024 2:22 pm

» The Fallout TV show destroyed NV. I'm done with Todd.
Suggestions for a better viewing of the forum. Emptyby gavin gold Tue Apr 16, 2024 2:22 pm

» {Multi Choice POLL} Fallout 3 or Fallout NV music?
Suggestions for a better viewing of the forum. Emptyby HardComma Thu Apr 11, 2024 1:42 am

» Hello from nexus
Suggestions for a better viewing of the forum. Emptyby noacctname1 Wed Apr 10, 2024 7:54 am

» Who Would Win: Ulysses or Joshua Graham?
Suggestions for a better viewing of the forum. Emptyby BellToadTall Wed Apr 03, 2024 10:06 pm

» The Next fallout
Suggestions for a better viewing of the forum. Emptyby BellToadTall Wed Apr 03, 2024 10:01 pm

» Your favorite mods for F:NV
Suggestions for a better viewing of the forum. Emptyby BellToadTall Wed Apr 03, 2024 9:55 pm

» Whats the Number 1 mod you really want? (NV)
Suggestions for a better viewing of the forum. Emptyby CosmoMods Tue Apr 02, 2024 2:52 am

» Unpopular Opinion: Too many mods ruin the game
Suggestions for a better viewing of the forum. Emptyby Evmeister Sun Mar 31, 2024 5:11 pm

» Guns you want in Fallout
Suggestions for a better viewing of the forum. Emptyby Lupinboi Wed Mar 27, 2024 1:21 am

» black doors in sierra madre bug
Suggestions for a better viewing of the forum. Emptyby Wɪmzɪkl Wed Mar 20, 2024 2:27 pm

» Any Titanfall mods out their that have the female sniper armor?
Suggestions for a better viewing of the forum. Emptyby john96 Wed Mar 20, 2024 9:14 am

» Modder looking for gun mods
Suggestions for a better viewing of the forum. Emptyby Bset Sun Mar 17, 2024 12:33 pm

» schorched enclave officer
Suggestions for a better viewing of the forum. Emptyby Smash96 Sun Mar 17, 2024 11:13 am

» Sup everyone (link funny shorts here)
Suggestions for a better viewing of the forum. Emptyby DHB00P Thu Mar 14, 2024 8:29 am

» Late Introduction
Suggestions for a better viewing of the forum. Emptyby Battleclad Sat Mar 02, 2024 10:29 pm

April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     
CalendarCalendar
_
April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     
CalendarCalendar

Share
 

 Suggestions for a better viewing of the forum.

View previous topic View next topic Go down 
AuthorMessage
NachoGibra

NachoGibra

Posts : 50
Join date : 2016-09-11

Character sheet
Name: Eneko
Faction: Rebellion
Level: ...

Suggestions for a better viewing of the forum. Empty
PostSubject: Suggestions for a better viewing of the forum.   Suggestions for a better viewing of the forum. EmptyMon Jan 23, 2017 5:23 pm

I do not know if they already know me, I am Nachogibra, but in many other places they know me as Nacho Designs. I am a graphic designer and web designer who has created many forums.

I want to introduce you a little tutorial to change the reputation system of the forum and make it much more functional and beautiful.

Currently the reputation system of this forum looks like this:

Suggestions for a better viewing of the forum. 30avr7t


I propose that it looks like this:

Suggestions for a better viewing of the forum. 207nf9c

As you can see, in addition to changing positions to a better visible place, the number of positive and negative votes also appears to be taxed.

To achieve this effect, you have to go to this route in the administration panel:

»Administration Panel> Visualization> Images and Colors> Colors> CSS Stylesheet

There insert this code:

Code:
.fa_vote, .fa_voted, .fa_count {
  font-size:12px;
  font-family:Verdana, Arial, Helvetica, Sans-serif;
  display:inline-block !important;
  width:auto !important;
  transition:300ms;
}

.fa_voted, .fa_vote:hover { opacity:0.4 }
.fa_voted { cursor:default }

.fa_count {
  font-weight:bold;
  margin:0 3px;
  cursor:default;
}

.fa_positive { color:#4A0 }
.fa_negative { color:#A44 }

.fa_votebar, .fa_votebar_inner {
  background:#C44;
  height:3px;
}

.fa_votebar_inner {
  background:#4A0;
  transition:300ms;
}


Once these data have been saved they have to go to this route:


»Admin Panel> Modules> HTML & JAVASCRIPT> Managing JavaScript Codes
Position: In All Pages

There they have to create a new Javascript that they must select in all the pages.

Put this code and save.

Code:
$(function() {
  // General Configuration of the plugin
  var config = {
    position_left : true, // true for left || false for right
    negative_vote : true, // true for negative votes || false for positive only
    vote_bar : true, // display a small bar under the vote buttons
    
    // button config
    icon_plus : '<img src="http://i18.servimg.com/u/f18/18/21/41/30/plus10.png" alt="+"/>',
    icon_minus : '<img src="http://i18.servimg.com/u/f18/18/21/41/30/minus10.png" alt="-"/>',
    
    // language config
    title_plus : 'Like the post of %{USERNAME}',
    title_minus : 'No like the post of %{USERNAME}',
    
    title_like_singular : '%{VOTES} people like the post of %{USERNAME}',
    title_like_plural : '%{VOTES} people like the post os %{USERNAME}',
    
    title_dislike_singular : '%{VOTES} people not like the post of %{USERNAME}',
    title_dislike_plural : '%{VOTES} people not like the post of %{USERNAME}',
    
    title_vote_bar : '%{VOTES} like the post of %{USERNAME} %{PERCENT}'
  },
      
      
  // function bound to the onclick handler of the vote buttons
  submit_vote = function() {
    var next = this.nextSibling, // the counter next to the vote button that was clicked
        box = this.parentNode,
        bar = box.getElementsByTagName('DIV'),
        vote = box.getElementsByTagName('A'),
        mode = /eval=plus/.test(this.href) ? 1 : 0,
        i = 0, j = vote.length, pos, neg, percent;
    
    // submit the vote asynchronously
    $.get(this.href, function() {
      next.innerHTML = +next.innerHTML + 1; // add to the vote count
      next.title = next.title.replace(/(\d+)/, function(M, $1) { return +$1 + 1 });
      
      pos = +vote[0].nextSibling.innerHTML;
      neg = vote[1] ? +vote[1].nextSibling.innerHTML : 0;
      percent = pos == 0 ? '0%' : pos == neg ? '50%' : Math.round(pos / (pos + neg) * 100) + '%';
      
      if (bar[0]) {
        bar[0].style.display = '';
        bar[0].firstChild.style.width = percent;
        box.title = box.title.replace(/\d+\/\d+/, pos + '/' + ( pos + neg )).replace(/\(\d+%\)/, '(' + percent + ')');
      }
    });
    
    // revoke voting capabilities on the post once the vote is cast
    for (; i < j; i++) {
      vote[i].href = '#';
      vote[i].className = vote[i].className.replace(/fa_vote/, 'fa_voted');
      vote[i].onclick = function() { return false };
    }
    
    return false;
  },
      
  vote = $('.vote'), i = 0, j = vote.length,
  version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
  
  // version data so we don't have to redefine these arrays during the loop
  vdata = {
    tag : ['SPAN', 'LI', 'SPAN', 'LI'][version],
    name : ['.name', '.postprofile dt > strong', '.username', '.popmenubutton'][version],
    actions : ['.post-options', '.profile-icons', '.post-options', '.posting-icons'][version],
  },
  
  post, plus, minus, n_pos, n_neg, title_pos, title_neg, li, ul, bar, button, total, percent, span, pseudo, vote_bar; // startup variables for later use in the loop
  
  // prevent execution if the version cannot be determined
  if (version == 'badapple') {
    if (window.console) console.warn('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
  
  for (; i < j; i++) {
    post = $(vote[i]).parentsUntil('.post').parent()[0];
    bar = $('.vote-bar', vote[i])[0]; // vote bar
    button = $('.vote-button', vote[i]); // plus and minus buttons
    pseudo = $(vdata.name, post).text() || 'MISSING_STRING'; // username of the poster
    ul = $(vdata.actions, post)[0]; // post actions
    li = document.createElement(vdata.tag); // vote system container
    li.className = 'fa_reputation';
    
    if (li.tagName == 'SPAN') li.style.display = 'inline-block';
    
    // calculate votes
    if (bar) {
      total = +bar.title.replace(/.*?\((\d+).*/, '$1');
      percent = +bar.title.replace(/.*?(\d+)%.*/, '$1');
      
      n_pos = Math.round(total * (percent / 100));
      n_neg = total - n_pos;
    } else {
      n_pos = 0;
      n_neg = 0;
    }
    
    // set up negative and positive titles with the correct grammar, votes, and usernames
    title_pos = (n_pos == 1 ? config.title_like_singular : config.title_like_plural).replace(/%\{USERNAME\}/g, pseudo).replace(/%\{VOTES\}/g, n_pos);
    title_neg = (n_neg == 1 ? config.title_dislike_singular : config.title_dislike_plural).replace(/%\{USERNAME\}/g, pseudo).replace(/%\{VOTES\}/g, n_neg);
    
    // define the vote counts
    li.innerHTML = '<span class="fa_count fa_positive" title="' + title_pos + '">' + n_pos + '</span>' + (config.negative_vote ? '&nbsp;<span class="fa_count fa_negative" title="' + title_neg + '">' + n_neg + '</span>' : '');
    span = li.getElementsByTagName('SPAN'); // get the vote count containers for use as insertion points
    
    // create positive vote button
    plus = document.createElement('A');
    plus.href = button[0] ? button[0].firstChild.href : '#';
    plus.onclick = button[0] ? submit_vote : function() { return false };
    plus.className = 'fa_vote' + (button[0] ? '' : 'd') + ' fa_plus';
    plus.innerHTML = config.icon_plus;
    plus.title = (button[0] ? config.title_plus : title_pos).replace(/%\{USERNAME\}/g, pseudo);
    
    span[0] && li.insertBefore(plus, span[0]);
    
    // create negative vote button
    if (config.negative_vote) {
      minus = document.createElement('A');
      minus.href = button[1] ? button[1].firstChild.href : '#';
      minus.onclick = button[1] ? submit_vote : function() { return false };
      minus.className = 'fa_vote' + (button[1] ? '' : 'd') + ' fa_minus';
      minus.innerHTML = config.icon_minus;
      minus.title = (button[1] ? config.title_minus : title_neg).replace(/%\{USERNAME\}/g, pseudo);
      
      span[1] && li.insertBefore(minus, span[1]);
    }
    
    // create vote bar
    if (config.vote_bar) {
      vote_bar = document.createElement('DIV');
      vote_bar.className = 'fa_votebar';
      vote_bar.innerHTML = '<div class="fa_votebar_inner" style="width:' + percent + '%;"></div>';
      vote_bar.style.display = bar ? '' : 'none';
      li.title = config.title_vote_bar.replace(/%\{USERNAME\}/, pseudo).replace(/%\{VOTES\}/, n_pos + '/' + (n_pos + n_neg)).replace(/%\{PERCENT\}/, '(' + percent + '%)');
      li.appendChild(vote_bar);
    }
    
    // finally insert the vote system and remove the default one
    config.position_left ? ul.insertBefore(li, ul.firstChild) : ul.appendChild(li);
    vote[i].parentNode.removeChild(vote[i]);
  }
});

That's it, I hope you like the result.

I will make other proposals as well as I will be at your disposal if they need help in graphic subjects.
Back to top Go down
 

Suggestions for a better viewing of the forum.

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» HI i like this forum xd
» New to Forum
» A Goodbye to GUN, and Many Friends
» New to the forum ;)
» Some old forum signatures

Permissions in this forum:You cannot reply to topics in this forum
Gaming Underground Network :: Workshops :: Graphic Design-