
New rating button
Tested : DLE 8.0, 8.2, 8.3 (testing in DLE 8.5)
DO IT
1. Open file engine/ajax/rating.php
Find
if( $go_rate > 5 or $go_rate < 1 ) $go_rate = 0;
Replace to
You must register before you can view this text.
2. Open file engine/modules/functions.php
Find function ShowRating
Replace all content in this function to
You must register before you can view this text.
Next find function ShortRating (below function ShowRating)
Replace all content in this function to
You must register before you can view this text.
Next find function userrating (below function ShortRating)
Replace all content in this function to
You must register before you can view this text.
3. Open file templates/{your template}/css/engine.css
Find
.rating {
    color: #757575;
    font-size: 11px;       Â
    font-family: tahoma;   Â
    width: 85px;
    height: 16px;
}
.unit-rating {
    list-style: none;
    margin: 0px;
    padding: 0px;
    width: 85px;
    height: 16px;
    position: relative;
    background-image: url(../dleimages/rating.gif);
    background-position: top left;
    background-repeat: repeat-x;
}
.unit-rating li {
    text-indent: -90000px;
    padding: 0px;
    margin: 0px;
    float: left;
}
.unit-rating li a {
    display: block;
    width: 17px;
    height: 16px;
    text-decoration: none;
    text-indent: -9000px;
    z-index: 17;
    position: absolute;
    padding: 0px;
}
.unit-rating li a:hover {
    background-image: url(../dleimages/rating.gif);
    background-position: left center;
    z-index: 2;
    left: 0px;
}
.unit-rating a.r1-unit { left: 0px; }
.unit-rating a.r1-unit:hover { width: 17px; }
.unit-rating a.r2-unit { left: 17px; }
.unit-rating a.r2-unit:hover { width: 34px; }
.unit-rating a.r3-unit { left: 34px; }
.unit-rating a.r3-unit:hover { width: 51px; }
.unit-rating a.r4-unit { left: 51px; }Â Â Â Â
.unit-rating a.r4-unit:hover { width: 68px; }
.unit-rating a.r5-unit { left: 68px; }
.unit-rating a.r5-unit:hover { width: 85px; }
.unit-rating li.current-rating {
    background-image: url(../dleimages/rating.gif);
    background-position: left bottom;
    position: absolute;
    height: 16px;
    display: block;
    text-indent: -9000px;
    z-index: 1;
}
    color: #757575;
    font-size: 11px;       Â
    font-family: tahoma;   Â
    width: 85px;
    height: 16px;
}
.unit-rating {
    list-style: none;
    margin: 0px;
    padding: 0px;
    width: 85px;
    height: 16px;
    position: relative;
    background-image: url(../dleimages/rating.gif);
    background-position: top left;
    background-repeat: repeat-x;
}
.unit-rating li {
    text-indent: -90000px;
    padding: 0px;
    margin: 0px;
    float: left;
}
.unit-rating li a {
    display: block;
    width: 17px;
    height: 16px;
    text-decoration: none;
    text-indent: -9000px;
    z-index: 17;
    position: absolute;
    padding: 0px;
}
.unit-rating li a:hover {
    background-image: url(../dleimages/rating.gif);
    background-position: left center;
    z-index: 2;
    left: 0px;
}
.unit-rating a.r1-unit { left: 0px; }
.unit-rating a.r1-unit:hover { width: 17px; }
.unit-rating a.r2-unit { left: 17px; }
.unit-rating a.r2-unit:hover { width: 34px; }
.unit-rating a.r3-unit { left: 34px; }
.unit-rating a.r3-unit:hover { width: 51px; }
.unit-rating a.r4-unit { left: 51px; }Â Â Â Â
.unit-rating a.r4-unit:hover { width: 68px; }
.unit-rating a.r5-unit { left: 68px; }
.unit-rating a.r5-unit:hover { width: 85px; }
.unit-rating li.current-rating {
    background-image: url(../dleimages/rating.gif);
    background-position: left bottom;
    position: absolute;
    height: 16px;
    display: block;
    text-indent: -9000px;
    z-index: 1;
}
Replace to
You must register before you can view this text.
4. Open file /templates/{your template}/shortstory.tpl AND /templates/{your template}/fullstory.tpl
Find
{rating}
Replace to
You must register before you can view this text.
5. You need file engine/ajax/js_edit.js uncompress. (You can see this file in folder Developer\uncompressed of DLE Distribution)
Find
function doRate( rate, id ) {
    var ajax = new dle_ajax();
    ajax.onShow ('');
    var varsString = "go_rate=" + rate;
    ajax.setVar("news_id", id);
    ajax.setVar("skin", dle_skin);
    ajax.requestFile = dle_root + "engine/ajax/rating.php";
    ajax.method = 'GET';
    ajax.element = 'ratig-layer';
    ajax.sendAJAX(varsString);
};
    var ajax = new dle_ajax();
    ajax.onShow ('');
    var varsString = "go_rate=" + rate;
    ajax.setVar("news_id", id);
    ajax.setVar("skin", dle_skin);
    ajax.requestFile = dle_root + "engine/ajax/rating.php";
    ajax.method = 'GET';
    ajax.element = 'ratig-layer';
    ajax.sendAJAX(varsString);
};
Replace to
You must register before you can view this text.
In this step, you can see line ajax.element = 'ratig-layer-' + id; differ from old function.
6. Copy two picture below and put to folder templates/{your template}/dleimages
và 

Updates
Dle templates English


