توسط این هک بسیار ساده می توانید به مطالب سایت امتیاز مثبت یا منفی دهید.
دانلود
آموزش نصب
- توجه: برای کپی کدها، از روش مشاهده کد استفاده شود. چون در حالت کپی عادی ، قبل از کدها چندفاصله قرارمیگیرد که باعث میشود این هک اجرا نشود.
1- بعد از دانلود، فایل ها را در پوشه templates / your theme / dleimages کپی نمایید.
2- فایل engine/ajax/rating.php را باز نمایید و کد زیر را پیدا نمایید.
و با کدزیر جایگزین نمایید.
3-فایل engine/modules/functions.php را باز نمایید و کد زیر را پیدا نمایید.
و با کدزیر جایگزین نمایید.
4- فایل templates/your template/css/engine.css را باز نمایید و کد زیر را پیدا نمایید.
توجه: کدزیر ممکن است با کد موجود در قالب شما کمی متفاوت باشد.
و با کدزیر جایگزین نمایید.
موفق باشید.
1- بعد از دانلود، فایل ها را در پوشه templates / your theme / dleimages کپی نمایید.
2- فایل engine/ajax/rating.php را باز نمایید و کد زیر را پیدا نمایید.
if( $go_rate > 5 or $go_rate < 1 ) $go_rate = 0;
و با کدزیر جایگزین نمایید.
if ($go_rate > 1 OR $go_rate < -1) $go_rate = 0;
3-فایل engine/modules/functions.php را باز نمایید و کد زیر را پیدا نمایید.
function ShowRating($id, $rating, $vote_num, $allow = true) {
global $lang;
if( $rating AND $vote_num ) $rating = round( ($rating / $vote_num), 0 );
else $rating = 0;
$rating = $rating * 17;
if( !$allow ) {
$rated = <<<HTML
<div class="rating">
<ul class="unit-rating">
<li class="current-rating" style="width:{$rating}px;">{$rating}</li>
</ul>
</div>
HTML;
return $rated;
}
$rated = <<<HTML
<div id='ratig-layer-{$id}'><div class="rating">
<ul class="unit-rating">
<li class="current-rating" style="width:{$rating}px;">{$rating}</li>
<li><a href="#" title="{$lang['useless']}" class="r1-unit" onclick="doRate('1', '{$id}'); return false;">1</a></li>
<li><a href="#" title="{$lang['poor']}" class="r2-unit" onclick="doRate('2', '{$id}'); return false;">2</a></li>
<li><a href="#" title="{$lang['fair']}" class="r3-unit" onclick="doRate('3', '{$id}'); return false;">3</a></li>
<li><a href="#" title="{$lang['good']}" class="r4-unit" onclick="doRate('4', '{$id}'); return false;">4</a></li>
<li><a href="#" title="{$lang['excellent']}" class="r5-unit" onclick="doRate('5', '{$id}'); return false;">5</a></li>
</ul>
</div></div>
HTML;
return $rated;
}
function userrating($id) {
global $db;
$row = $db->super_query( "SELECT SUM(rating) as rating, SUM(vote_num) as num FROM " . PREFIX . "_post_extras WHERE user_id ='{$id}'" );
if( $row['num'] ) $rating = round( ($row['rating'] / $row['num']), 0 );
else $rating = 0;
$rating = $rating * 17;
$rated = <<<HTML
<div class="rating" style="display:inline;">
<ul class="unit-rating">
<li class="current-rating" style="width:{$rating}px;">{$rating}</li>
</ul>
</div>
HTML;
return $rated;
}
global $lang;
if( $rating AND $vote_num ) $rating = round( ($rating / $vote_num), 0 );
else $rating = 0;
$rating = $rating * 17;
if( !$allow ) {
$rated = <<<HTML
<div class="rating">
<ul class="unit-rating">
<li class="current-rating" style="width:{$rating}px;">{$rating}</li>
</ul>
</div>
HTML;
return $rated;
}
$rated = <<<HTML
<div id='ratig-layer-{$id}'><div class="rating">
<ul class="unit-rating">
<li class="current-rating" style="width:{$rating}px;">{$rating}</li>
<li><a href="#" title="{$lang['useless']}" class="r1-unit" onclick="doRate('1', '{$id}'); return false;">1</a></li>
<li><a href="#" title="{$lang['poor']}" class="r2-unit" onclick="doRate('2', '{$id}'); return false;">2</a></li>
<li><a href="#" title="{$lang['fair']}" class="r3-unit" onclick="doRate('3', '{$id}'); return false;">3</a></li>
<li><a href="#" title="{$lang['good']}" class="r4-unit" onclick="doRate('4', '{$id}'); return false;">4</a></li>
<li><a href="#" title="{$lang['excellent']}" class="r5-unit" onclick="doRate('5', '{$id}'); return false;">5</a></li>
</ul>
</div></div>
HTML;
return $rated;
}
function userrating($id) {
global $db;
$row = $db->super_query( "SELECT SUM(rating) as rating, SUM(vote_num) as num FROM " . PREFIX . "_post_extras WHERE user_id ='{$id}'" );
if( $row['num'] ) $rating = round( ($row['rating'] / $row['num']), 0 );
else $rating = 0;
$rating = $rating * 17;
$rated = <<<HTML
<div class="rating" style="display:inline;">
<ul class="unit-rating">
<li class="current-rating" style="width:{$rating}px;">{$rating}</li>
</ul>
</div>
HTML;
return $rated;
}
و با کدزیر جایگزین نمایید.
function ShowRating($id, $rating, $vote_num, $allow = true) {
global $is_logged, $member_id, $config, $lang, $db;
if ($rating=='null'){$rating="You have already voted!";}else{
if ($rating) $rating = round($rating, 0); else $rating = 0;
if ($rating > 0) $rating = "<font color=\"#228b22\"><b>+".$rating."</b></font>"; elseif ($rating == 0) $rating="<b>".$rating."</b>"; else $rating = "<font color=\"#ff0000\"><b>".$rating."</b></font>";
}
if (!$allow) {
$rated = <<<HTML
{$rating}
HTML;
return $rated;
}
$rated .= <<<HTML
<span id="ratig-layer-{$id}">
<img src="{THEME}/dleimages/up.gif" title="I like it(+1)" alt="I like it(+1)" class="rate_img" onclick="doRate('1', '{$id}'); return false;" width="16" height="16" /> {$rating} <img src="{THEME}/dleimages/down.gif" title="I do not like(-1)" alt="I do not like(-1)" class="rate_img" onclick="doRate('-1', '{$id}'); return false;" width="16" height="16" />
</span>
HTML;
return $rated;
}
function ShortRating($id, $rating, $vote_num, $allow = true) {
global $config, $lang;
if ($rating) $rating = round($rating, 0); else $rating = 0;
if ($rating > 0) $rating = "<font color=\"#228b22\"><b>+".$rating."</b></font>"; elseif ($rating == 0) $rating="<b>".$rating."</b>"; else $rating = "<font color=\"#ff0000\"><b>".$rating."</b></font>";
if (!$allow) {
$rated = <<<HTML
{$rating}
HTML;
return $rated;
}
$rated = "<span id=\"ratig-layer-" . $id . "\">";
$rated .= <<<HTML
<img src="{THEME}/dleimages/up.gif" title="I like it(+1)" alt="I like it(+1)" class="rate_img" onclick="doRate('1', '{$id}'); return false;" width="16" height="16" /> {$rating} <img src="{THEME}/dleimages/down.gif" title="I do not like(-1)" alt="I do not like(-1)" class="rate_img" onclick="doRate('-1', '{$id}'); return false;" width="16" height="16" />
HTML;
$rated .= "</span>";
return $rated;
}
function userrating($name) {
global $db;
$row = $db->super_query( "SELECT SUM(rating) as rating, SUM(vote_num) as num FROM " . PREFIX . "_post_extras WHERE user_id ='{$id}'" );
if ($row['num']) $rating = round(($row['rating'] / $row['num']), 0); else $rating = 0;
$rating = $rating;
$rated = <<<HTML
{$rating}
HTML;
return $rated;
}
global $is_logged, $member_id, $config, $lang, $db;
if ($rating=='null'){$rating="You have already voted!";}else{
if ($rating) $rating = round($rating, 0); else $rating = 0;
if ($rating > 0) $rating = "<font color=\"#228b22\"><b>+".$rating."</b></font>"; elseif ($rating == 0) $rating="<b>".$rating."</b>"; else $rating = "<font color=\"#ff0000\"><b>".$rating."</b></font>";
}
if (!$allow) {
$rated = <<<HTML
{$rating}
HTML;
return $rated;
}
$rated .= <<<HTML
<span id="ratig-layer-{$id}">
<img src="{THEME}/dleimages/up.gif" title="I like it(+1)" alt="I like it(+1)" class="rate_img" onclick="doRate('1', '{$id}'); return false;" width="16" height="16" /> {$rating} <img src="{THEME}/dleimages/down.gif" title="I do not like(-1)" alt="I do not like(-1)" class="rate_img" onclick="doRate('-1', '{$id}'); return false;" width="16" height="16" />
</span>
HTML;
return $rated;
}
function ShortRating($id, $rating, $vote_num, $allow = true) {
global $config, $lang;
if ($rating) $rating = round($rating, 0); else $rating = 0;
if ($rating > 0) $rating = "<font color=\"#228b22\"><b>+".$rating."</b></font>"; elseif ($rating == 0) $rating="<b>".$rating."</b>"; else $rating = "<font color=\"#ff0000\"><b>".$rating."</b></font>";
if (!$allow) {
$rated = <<<HTML
{$rating}
HTML;
return $rated;
}
$rated = "<span id=\"ratig-layer-" . $id . "\">";
$rated .= <<<HTML
<img src="{THEME}/dleimages/up.gif" title="I like it(+1)" alt="I like it(+1)" class="rate_img" onclick="doRate('1', '{$id}'); return false;" width="16" height="16" /> {$rating} <img src="{THEME}/dleimages/down.gif" title="I do not like(-1)" alt="I do not like(-1)" class="rate_img" onclick="doRate('-1', '{$id}'); return false;" width="16" height="16" />
HTML;
$rated .= "</span>";
return $rated;
}
function userrating($name) {
global $db;
$row = $db->super_query( "SELECT SUM(rating) as rating, SUM(vote_num) as num FROM " . PREFIX . "_post_extras WHERE user_id ='{$id}'" );
if ($row['num']) $rating = round(($row['rating'] / $row['num']), 0); else $rating = 0;
$rating = $rating;
$rated = <<<HTML
{$rating}
HTML;
return $rated;
}
4- فایل templates/your template/css/engine.css را باز نمایید و کد زیر را پیدا نمایید.
توجه: کدزیر ممکن است با کد موجود در قالب شما کمی متفاوت باشد.
.rating { width: 85px; height: 17px; font-size: 0.9em; }
.unit-rating { list-style: none; margin: 0; padding: 0; width: 85px; height: 17px; position: relative; background: url("../dleimages/rating.png") repeat-x; }
.unit-rating li { text-indent: -90000px; padding: 0; margin: 0; float: left; }
.unit-rating li a { display: block; width: 17px; height: 17px; text-decoration: none; text-indent: -9000px; z-index: 17; position: absolute; padding: 0; }
.unit-rating li a:hover { background: url("../dleimages/rating.png") 0 -17px; z-index: 2; left: 0; }
.unit-rating a.r1-unit {left: 0;} .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: url("../dleimages/rating.png") 0 -34px; position: absolute; height: 17px; display: block; text-indent: -9000px; z-index: 1; }
.unit-rating { list-style: none; margin: 0; padding: 0; width: 85px; height: 17px; position: relative; background: url("../dleimages/rating.png") repeat-x; }
.unit-rating li { text-indent: -90000px; padding: 0; margin: 0; float: left; }
.unit-rating li a { display: block; width: 17px; height: 17px; text-decoration: none; text-indent: -9000px; z-index: 17; position: absolute; padding: 0; }
.unit-rating li a:hover { background: url("../dleimages/rating.png") 0 -17px; z-index: 2; left: 0; }
.unit-rating a.r1-unit {left: 0;} .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: url("../dleimages/rating.png") 0 -34px; position: absolute; height: 17px; display: block; text-indent: -9000px; z-index: 1; }
و با کدزیر جایگزین نمایید.
.rate_img {
vertical-align: middle;
cursor: pointer;
}
vertical-align: middle;
cursor: pointer;
}
موفق باشید.
تصاویر