Friday, December 24, 2010

10 stars rating

How to install?!
Open: engine/ajax/rating.php
Search:
if( $go_rate > 5 or $go_rate < 1 ) $go_rate = 0;

Replace with:
if( $go_rate > 10 or $go_rate < 1 ) $go_rate = 0;



Open: engine/modules/functions.phpSearch:
if( $rating ) $rating = round( ($rating / $vote_num), 0 );
else $rating = 0;
$rating = $rating * 17
;

Replace with:
if( $rating ) $rating = round( ($rating / $vote_num), 0 );
else $rating = 0;
$rating = $rating * 15;

Search:
<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>

Replace with:
<li><a href="#" title="" class="r1-unit" onclick="doRate('1', '{$id}'); return false;">1</a></li>
<li><a href="#" title="" class="r2-unit" onclick="doRate('2', '{$id}'); return false;">2</a></li>
<li><a href="#" title="" class="r3-unit" onclick="doRate('3', '{$id}'); return false;">3</a></li>
<li><a href="#" title="" class="r4-unit" onclick="doRate('4', '{$id}'); return false;">4</a></li>
<li><a href="#" title="" class="r5-unit" onclick="doRate('5', '{$id}'); return false;">5</a></li>
<li><a href="#" title="" class="r6-unit" onclick="doRate('6', '{$id}'); return false;">6</a></li>
<li><a href="#" title="" class="r7-unit" onclick="doRate('7', '{$id}'); return false;">7</a></li>
<li><a href="#" title="" class="r8-unit" onclick="doRate('8', '{$id}'); return false;">8</a></li>
<li><a href="#" title="" class="r9-unit" onclick="doRate('9', '{$id}'); return false;">9</a></li>
<li><a href="#" title="" class="r10-unit" onclick="doRate('10', '{$id}'); return false;">10</a></li>

Search:
<li><a href="#" title="{$lang['useless']}" class="r1-unit" onclick="dleRate('1', '{$id}'); return false;">1</a></li>
<li><a href="#" title="{$lang['poor']}" class="r2-unit" onclick="dleRate('2', '{$id}'); return false;">2</a></li>
<li><a href="#" title="{$lang['fair']}" class="r3-unit" onclick="dleRate('3', '{$id}'); return false;">3</a></li>
<li><a href="#" title="{$lang['good']}" class="r4-unit" onclick="dleRate('4', '{$id}'); return false;">4</a></li>
<li><a href="#" title="{$lang['excellent']}" class="r5-unit" onclick="dleRate('5', '{$id}'); return false;">5</a></li>

Replace with:
<li><a href="#" title="" class="r1-unit" onclick="dleRate('1', '{$id}'); return false;">1</a></li>
<li><a href="#" title="" class="r2-unit" onclick="dleRate('2', '{$id}'); return false;">2</a></li>
<li><a href="#" title="" class="r3-unit" onclick="dleRate('3', '{$id}'); return false;">3</a></li>
<li><a href="#" title="" class="r4-unit" onclick="dleRate('4', '{$id}'); return false;">4</a></li>
<li><a href="#" title="" class="r5-unit" onclick="dleRate('5', '{$id}'); return false;">5</a></li>
<li><a href="#" title="" class="r6-unit" onclick="dleRate('6', '{$id}'); return false;">6</a></li>
<li><a href="#" title="" class="r7-unit" onclick="dleRate('7', '{$id}'); return false;">7</a></li>
<li><a href="#" title="" class="r8-unit" onclick="dleRate('8', '{$id}'); return false;">8</a></li>
<li><a href="#" title="" class="r9-unit" onclick="dleRate('9', '{$id}'); return false;">9</a></li>
<li><a href="#" title="" class="r10-unit" onclick="dleRate('10', '{$id}'); return false;">10</a></li>
Enjoy it...




Related Posts:

  • How to add iframe in DLE post Adding iframe to Datalife Engine post is much easier than you may think. You don't need any modules. By default DLE allows iframe from only few domains because of security purposes. Let's say you want to embed a video or m… Read More
  • Datalife Engine Noindex Hack After 5 years I am back on using Datalife Engine CMS. And one of the problem I faced when trying to rank well for SEO was no index for tags, xfields or other pages I didn't want to. In wordpress it is simple, installing pl… Read More
  • Add button in the WYSIWYG editor The buttons do the insertion into the body of news, anything. Doing for themselves, as they should be inserted into the short and full story frame with styles and so on.  Open: engine/editor/shortnews.php  Find:… Read More
  • How to insert PHP code in file main.tplmain.tpl file is a template file of DLE. There are cases when you need to insert PHP codes in It, but It is not allowed. So now I will show you a hack how to enable the insertion of PHP codes in main.tpl 1. Open file index.p… Read More
  • New Links I present you hack transformation options for DataLife Engine. Powered by CSS2.0 support each browser. The trick is that when you hover on a link it is animated and the background turns to the left or right. Very nice t… Read More

3 comments:

  1. This hack is made it by me! :)from dle-en :)

    ReplyDelete
  2. That's nice. You should make more hacks :)
    Doesn't matter where peoples read it, Important is that they find and use it :)

    ReplyDelete