Lost Heaven modding
Регистрация
Advertisement
Lost Heaven modding
Здесь интереснее
Первой wiki по игре Мафия нужны новые редакторы

Пара идей, чтобы не забыть:

<div id="jmw-main-npwidget" class="jmw-main-dynamic"> </div>

  • настройка starsRate
    text
    Customizing the script (this script is totally usable). 
    This script is working as intended. To customize it: 
    1. Copy all the javascript files to your wikia, e.g. to your Mediawiki:StarRatings/code.js. 
    
    2. Change the following lines in your Mediawiki:StarRatings/ui.js: 
    RateableWidget.prototype.sizeSVG 
    = function (svg, size) {
            var file 
    = svg.split('/').pop();
            svg 
    = svg.replace(/\/images\/(thumb\/)?/, "/images/thumb/");
            return svg + '/' + size + 'px-' + file + '.png';
        };
    This will allow you to use any different graphic for your images, and also to host it on your wikia. Basically all it does is add a "thumb" to the url to allow the image to be resized at will. Note this script will only work with images hosted in a wikia. 
    
    3. Change the images by adding the url for it. Start_SVG is the main image, and STAR_svg_Shadow is its shadow image: 
    
    var SYMBOL_MIN_SIZE  = 15, 
            STAR_SVG 
    = '//img1.wikia.nocookie.net/__cb20140807200305/duolingo/images/9/94/abc.png',
            STAR_SVG_SHADOW 
    = '//img3.wikia.nocookie.net/__cb20140807200309/duolingo/images/3/3d/abc2.png';
     
    OR Change the data-src when you're creating the poll: 
    
    <div style="border: 2px double #EEE; padding: 10px; margin: 15px 0;"> <div class="rateable star-ratings-poll-widget" data-starsize="50" data-src="//images4.wikia.nocookie.net/pecoes/images/thumb/0/02/Cube.svg"> </div> </div> 
    
    4. You may also customize the big star/icon using CSS (see the main StarRatings page): background: url(//images3.wikia.nocookie.net/dev/images/thumb/b/ba/Star.svg/50px-Star.svg.png) no-repeat scroll 0px 10px transparent; 
    
    5. Create your poll (change data-vote-for="ID", ID must be unique for each poll ), make sure to also add the "star-ratings-poll-widget" to the rateable class: 
    
    6. Vote away.
    
Advertisement