Latest topics
» What is the weather like where you live?
2018-06-14, 12:40 by pedxz

» IconSkouliki Graphics/Requests
2018-06-13, 08:06 by skouliki

» What movie are you watching ?
2018-06-12, 23:52 by JENNY

» Blue and Grey skin / Theme
2018-05-27, 02:14 by APE

» New Privacy Policy Data
2018-05-26, 00:55 by APE

» Site Maintenance News
2018-05-24, 23:59 by JENNY

» PM system Update (REMOVED)
2018-05-21, 07:14 by JENNY

» Humans
2018-05-21, 07:07 by JENNY

» Salem (Drama, Fantasy, Thriller)
2018-05-18, 17:04 by pedxz

Who’s online ?
Guests : 0
Registered : 0
Users Online :
RefreshView whole list

Orange Skin 122

View previous topic View next topic Go down

None Orange Skin 122

Post by APE on 2018-05-01, 00:53

Screen shot:
[You must be registered and logged in to see this image.]

Description:
A great orange skin with a dark background and grey hover.
The nav bar has a slow fade from orange to light grey when you hover over it. The hovers are all done by CSS files only.
Hitskin address:
[You must be registered and logged in to see this link.]

Javascripts:

In Posts only  
Like Button:

Code:
$(function() {
      // General Configuration of the plugin
      var config = {
        position_left : true, // true for left || false for right
        negative_vote :false, // true for negative votes || false for positive only
        vote_bar : false, // display a small bar under the vote buttons
      
        // button config
        icon_plus : '<img src="https://i.servimg.com/u/f68/12/23/10/57/heart110.png" alt="+"/>',
        icon_minus : '<img src="https://i.servimg.com/u/f18/18/21/41/30/minus10.png" alt="-"/>',
      
        // language config
        title_plus : 'Like %{USERNAME}\'s post',
        title_minus : 'Dislike %{USERNAME}\'s post',
      
        title_like_singular : '%{VOTES} person likes %{USERNAME}\'s post',
        title_like_plural : '%{VOTES} people like %{USERNAME}\'s post',
      
        title_dislike_singular : '%{VOTES} person dislikes %{USERNAME}\'s post',
        title_dislike_plural : '%{VOTES} people dislike %{USERNAME}\'s post',
      
        title_vote_bar : '%{VOTES} people liked %{USERNAME}\'s post %{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, major, minor, 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 ? ' <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]);
      }
    });
//END OF CODE

In Home Page only  
Category Toggle:

Code:
$(function() {
          if (_userdata.page_desktop) return;
           ("JScript <jscriptbrasil at live dot com>, based on Invision.js");
           var style = document.createElement("style"),
              /* Versions:|phpBB2----------------------------------------|  |phpBB3-------------|    |PunBB-----------------|   |Invision already have it!| */
              oCat = $('#content-container .three-col td:eq(1) .forumline, #main-content .forabg, #main-content .main-head'),
              oThis = null,
              oTemp = null,
              sEval = '';
        
           style.type = "text/css";
           style.innerHTML =
              '.contract, .expand {' +
              '  background: url("http://illiweb.com/fa/invision/exp_minus.gif") no-repeat scroll 50% 50% rgba(0, 0, 0, 0);' +
              '  cursor: pointer;' +
              '  float: right;' +
'  padding-right: 55px;' +
'  padding-top: 10px;' +
'  padding-bottom: 19px;' +
              '  margin-top: -35px;' +
              '}' +
              '.expand {' +
              '  background: url("http://illiweb.com/fa/invision/exp_plus.gif") no-repeat scroll 50% 50% rgba(0, 0, 0, 0);' +
              '}';
           document.getElementsByTagName("head")[0].appendChild(style);
        
           switch (oCat[0].className) {
              case 'forumline': //phpBB2
                 sEval = "oTemp = oThis.find('tr').first();oTemp.addClass('title-bar');" +
                    "oTemp.find('th:last').append('<div onclick=\"toggleCategory(\\'c' + i + '\\');\" id=\"bc' + i + '\" class=\"contract\" style=\"margin-top: -15px;\">   </div>');" +
                    "oThis.find('tr').not('.title-bar').addClass('c' + i);";
                 break;
              case 'forabg': //phpBB3
                 sEval = "oThis.find('ul.topiclist:first dl.icon').append('<div onclick=\"toggleCategory(\\'c' + i + '\\');\" id=\"bc' + i + '\" class=\"contract\">   </div>');" +
                    "oThis.find('ul.topiclist.forums').attr('id', 'c' + i);";
                 break;
              case 'main-head': //PunBB
                 sEval = "oThis.find('h2').append('<div onclick=\"toggleCategory(\\'c' + i + '\\');\" id=\"bc' + i + '\" class=\"contract\">  &nbsp;</div>');" +
                    "oThis.next().attr('id', 'c' + i);";
                 break;
           }
           for (var i = 0, len = oCat.length; i < len; i++) {
              oThis = $(oCat[i]);
              eval(sEval);
           }
        
           initCategories();
        });
        // by invision.js
        function initCategories() {
           var id;
           cookies = document.cookie.split('; ');
           for (var i = 0; i < cookies.length; i++) {
              if (cookies[i].charAt(0) == '_') {
                 cookie = cookies[i].split('=');
                 if (cookie[1] == '1') {
                    id = cookie[0].substring(1);
                    if (document.getElementById(id)) {
                       toggleCategory(id)
                    }
                 }
              }
           }
        }
        // by invision.js, modified by JScript
        function toggleCategory(id) {
           var obj = document.getElementById(id);
           var button = document.getElementById('b' + id);
           if (obj) {
              var toggle = obj.style.display == 'none';
              obj.style.display = toggle ? '' : 'none';
           } else {
              var elems = document.getElementsByClassName(id);
              for (var i = 0, len = elems.length; i < len; i++) {
                 var toggle = elems[i].style.display == 'none';
                 elems[i].style.display = toggle ? '' : 'none';
              }
           }
           button.className = toggle ? 'contract' : 'expand';
           my_setcookie('_' + id, toggle ? '' : '1', true);
           return false
        }
 /*
        ▲ -> contract
        ▼ -> expand
        */
 $(function() {
          var online = document.getElementById('memberStat');
          if (online) {
            online.innerHTML = online.innerHTML.replace(/, \d+ Hidden/, '');
          }
        });

Templates: None
avatar
APE
Administrator

Mozilla FireFox ®
Male
Posts 2287
Likes Likes : 163
Join date 2010-06-10
<b>Credits store items</b> Credits store items :



View user profile https://www.achatworld.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum
© 2018, achatworld.co.uk,
Theme and Images by Leah7,
Codes by Luffy & Ange Tuteur.