با درود دوستان گرامی
با استفاده از این ماژول میتوانید به تعداد نظرهای کاربران سایت امتیاز دهید . بدین صورت که هر کاربر که نظر بیشتری بده امتیاز بیشتری میگریه و ارتقا پیدا میکنه . البته شما میتونید در قسمت تنظیمات تعداد نظر برای هر رتبه را مشخص کنید . رتبه ها بین 1 تا 20 هست .
ابتذا فایل زیر را دانلود کنید
Download
حالا فایل \engine\ajax\adcomments.php باز کنید و به دنبال کد زیر بگردید
include ENGINE_DIR.'/data/config.php';
بعد از این کد ، کد زیر را قرار دهید
include ENGINE_DIR.'/data/rating.php';
در همین فایل به دنبال کد زیر برگدید
$tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si","");
}
}
در زیر این کد ، کد زیر را قرار بدهید
#======================================================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
if (!$row['user_group']) $row['user_group'] = 5;
$tpl->set('{group-name}', $user_group[$row['user_group']]['group_name']);
$tpl->set('{news-num}', intval($row['news_num']));
$tpl->set('{comm-num}', intval($row['comm_num']));
$tpl->set('{user_id}', intval($row['user_id']));
$no_rating = "ميهمان رتبه ندارد";
$arr_ratings = array(
0=> array(
'image_rating'=> "{$conf['img_path']}/00.gif",
'rank_txt'=> "<font color=\"{$conf['color-0']}\">{$conf['text-stat-0']}</font>",
'count_comm'=> "{$conf['comm-num-0']}"
),
1=> array(
'image_rating'=> "{$conf['img_path']}/01.gif",
'rank_txt'=> "<font color=\"{$conf['color-1']}\">{$conf['text-stat-1']}</font>",
'count_comm'=> "{$conf['comm-num-1']}"
),
2=> array(
'image_rating'=> "{$conf['img_path']}/02.gif",
'rank_txt'=> "<font color=\"{$conf['color-2']}\">{$conf['text-stat-2']}</font>",
'count_comm'=> "{$conf['comm-num-2']}"
),
3=> array(
'image_rating'=> "{$conf['img_path']}/03.gif",
'rank_txt'=> "<font color=\"{$conf['color-3']}\">{$conf['text-stat-3']}</font>",
'count_comm'=> "{$conf['comm-num-3']}"
),
4=> array(
'image_rating'=> "{$conf['img_path']}/04.gif",
'rank_txt'=> "<font color=\"{$conf['color-4']}\">{$conf['text-stat-4']}</font>",
'count_comm'=> "{$conf['comm-num-4']}"
),
5=> array(
'image_rating'=> "{$conf['img_path']}/05.gif",
'rank_txt'=> "<font color=\"{$conf['color-5']}\">{$conf['text-stat-5']}</font>",
'count_comm'=> "{$conf['comm-num-5']}"
),
6=> array(
'image_rating'=> "{$conf['img_path']}/06.gif",
'rank_txt'=> "<font color=\"{$conf['color-6']}\">{$conf['text-stat-6']}</font>",
'count_comm'=> "{$conf['comm-num-6']}"
),
7=> array(
'image_rating'=> "{$conf['img_path']}/07.gif",
'rank_txt'=> "<font color=\"{$conf['color-7']}\">{$conf['text-stat-7']}</font>",
'count_comm'=> "{$conf['comm-num-7']}"
),
8=> array(
'image_rating'=> "{$conf['img_path']}/08.gif",
'rank_txt'=> "<font color=\"{$conf['color-8']}\">{$conf['text-stat-8']}</font>",
'count_comm'=> "{$conf['comm-num-8']}"
),
9=> array(
'image_rating'=> "{$conf['img_path']}/09.gif",
'rank_txt'=> "<font color=\"{$conf['color-9']}\">{$conf['text-stat-9']}</font>",
'count_comm'=> "{$conf['comm-num-9']}"
),
10=> array(
'image_rating'=> "{$conf['img_path']}/10.gif",
'rank_txt'=> "<font color=\"{$conf['color-10']}\">{$conf['text-stat-10']}</font>",
'count_comm'=> "{$conf['comm-num-10']}"
),
11=> array(
'image_rating'=> "{$conf['img_path']}/11.gif",
'rank_txt'=>"<font color=\"{$conf['color-11']}\">{$conf['text-stat-11']}</font>",
'count_comm'=> "{$conf['comm-num-11']}"
),
12=> array(
'image_rating'=> "{$conf['img_path']}/12.gif",
'rank_txt'=>"<font color=\"{$conf['color-12']}\">{$conf['text-stat-12']}</font>",
'count_comm'=> "{$conf['comm-num-12']}"
),
13=> array(
'image_rating'=> "{$conf['img_path']}/13.gif",
'rank_txt'=>"<font color=\"{$conf['color-13']}\">{$conf['text-stat-13']}</font>",
'count_comm'=> "{$conf['comm-num-13']}"
),
14=> array(
'image_rating'=> "{$conf['img_path']}/14.gif",
'rank_txt'=> "<font color=\"{$conf['color-14']}\">{$conf['text-stat-14']}</font>",
'count_comm'=> "{$conf['comm-num-14']}"
),
15=> array(
'image_rating'=> "{$conf['img_path']}/15.gif",
'rank_txt'=>"<font color=\"{$conf['color-15']}\">{$conf['text-stat-15']}</font>",
'count_comm'=> "{$conf['comm-num-15']}"
),
16=> array(
'image_rating'=> "{$conf['img_path']}/16.gif",
'rank_txt'=>"<font color=\"{$conf['color-16']}\">{$conf['text-stat-16']}</font>",
'count_comm'=> "{$conf['comm-num-16']}"
),
17=> array(
'image_rating'=> "{$conf['img_path']}/17.gif",
'rank_txt'=>"<font color=\"{$conf['color-17']}\">{$conf['text-stat-17']}</font>",
'count_comm'=> "{$conf['comm-num-17']}"
),
18=> array(
'image_rating'=> "{$conf['img_path']}/18.gif",
'rank_txt' => "<font color=\"{$conf['color-18']}\">{$conf['text-stat-18']}</font>",
'count_comm' => "{$conf['comm-num-18']}"
),
19=> array(
'image_rating'=> "{$conf['img_path']}/19.gif",
'rank_txt'=>"<font color=\"{$conf['color-19']}\">{$conf['text-stat-19']}</font>",
'count_comm'=> "{$conf['comm-num-19']}"
),
20=> array(
'image_rating'=> "{$conf['img_path']}/20.gif",
'rank_txt'=>"<font color=\"{$conf['color-20']}\">{$conf['text-stat-20']}</font>",
'count_comm'=> "{$conf['comm-num-20']}"
),
);
if ($row['comm_num']==""){$row[comm_num]=0;}
for($j=0; $j<=count($arr_ratings)-1;$j++)
{
if ($row['comm_num']>=$arr_ratings[$j]['count_comm'])
{
$image_rating = $arr_ratings[$j]['image_rating'];
$rank_txt = $arr_ratings[$j]['rank_txt'];
$remain_comm = "".($arr_ratings[$j+1]['count_comm']-$row['comm_num'])."";
$rank = "{$rank_txt}<br /><br />{$remain_comm}";
if ($row['comm_num']==0){$remain_comm = $no_rating;}
}
}
if ($conf['admin-stat'] == 1)
{
if ($row['user_group']==1)
{
$rank_txt = "{$conf['text-stat-20']}";
$image_rating = "{$conf['img_path']}/20.gif";
$remain_comm = "";
}
}
$tpl->set('{image_rating}',$image_rating);
if ($conf['txt-stat'] == 1) {
$tpl->set('{rank_txt}',$rank);
} else { $tpl->set('{rank_txt}','-'); }
#======================================================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
if (!$row['user_group']) $row['user_group'] = 5;
$tpl->set('{group-name}', $user_group[$row['user_group']]['group_name']);
$tpl->set('{news-num}', intval($row['news_num']));
$tpl->set('{comm-num}', intval($row['comm_num']));
$tpl->set('{user_id}', intval($row['user_id']));
$no_rating = "ميهمان رتبه ندارد";
$arr_ratings = array(
0=> array(
'image_rating'=> "{$conf['img_path']}/00.gif",
'rank_txt'=> "<font color=\"{$conf['color-0']}\">{$conf['text-stat-0']}</font>",
'count_comm'=> "{$conf['comm-num-0']}"
),
1=> array(
'image_rating'=> "{$conf['img_path']}/01.gif",
'rank_txt'=> "<font color=\"{$conf['color-1']}\">{$conf['text-stat-1']}</font>",
'count_comm'=> "{$conf['comm-num-1']}"
),
2=> array(
'image_rating'=> "{$conf['img_path']}/02.gif",
'rank_txt'=> "<font color=\"{$conf['color-2']}\">{$conf['text-stat-2']}</font>",
'count_comm'=> "{$conf['comm-num-2']}"
),
3=> array(
'image_rating'=> "{$conf['img_path']}/03.gif",
'rank_txt'=> "<font color=\"{$conf['color-3']}\">{$conf['text-stat-3']}</font>",
'count_comm'=> "{$conf['comm-num-3']}"
),
4=> array(
'image_rating'=> "{$conf['img_path']}/04.gif",
'rank_txt'=> "<font color=\"{$conf['color-4']}\">{$conf['text-stat-4']}</font>",
'count_comm'=> "{$conf['comm-num-4']}"
),
5=> array(
'image_rating'=> "{$conf['img_path']}/05.gif",
'rank_txt'=> "<font color=\"{$conf['color-5']}\">{$conf['text-stat-5']}</font>",
'count_comm'=> "{$conf['comm-num-5']}"
),
6=> array(
'image_rating'=> "{$conf['img_path']}/06.gif",
'rank_txt'=> "<font color=\"{$conf['color-6']}\">{$conf['text-stat-6']}</font>",
'count_comm'=> "{$conf['comm-num-6']}"
),
7=> array(
'image_rating'=> "{$conf['img_path']}/07.gif",
'rank_txt'=> "<font color=\"{$conf['color-7']}\">{$conf['text-stat-7']}</font>",
'count_comm'=> "{$conf['comm-num-7']}"
),
8=> array(
'image_rating'=> "{$conf['img_path']}/08.gif",
'rank_txt'=> "<font color=\"{$conf['color-8']}\">{$conf['text-stat-8']}</font>",
'count_comm'=> "{$conf['comm-num-8']}"
),
9=> array(
'image_rating'=> "{$conf['img_path']}/09.gif",
'rank_txt'=> "<font color=\"{$conf['color-9']}\">{$conf['text-stat-9']}</font>",
'count_comm'=> "{$conf['comm-num-9']}"
),
10=> array(
'image_rating'=> "{$conf['img_path']}/10.gif",
'rank_txt'=> "<font color=\"{$conf['color-10']}\">{$conf['text-stat-10']}</font>",
'count_comm'=> "{$conf['comm-num-10']}"
),
11=> array(
'image_rating'=> "{$conf['img_path']}/11.gif",
'rank_txt'=>"<font color=\"{$conf['color-11']}\">{$conf['text-stat-11']}</font>",
'count_comm'=> "{$conf['comm-num-11']}"
),
12=> array(
'image_rating'=> "{$conf['img_path']}/12.gif",
'rank_txt'=>"<font color=\"{$conf['color-12']}\">{$conf['text-stat-12']}</font>",
'count_comm'=> "{$conf['comm-num-12']}"
),
13=> array(
'image_rating'=> "{$conf['img_path']}/13.gif",
'rank_txt'=>"<font color=\"{$conf['color-13']}\">{$conf['text-stat-13']}</font>",
'count_comm'=> "{$conf['comm-num-13']}"
),
14=> array(
'image_rating'=> "{$conf['img_path']}/14.gif",
'rank_txt'=> "<font color=\"{$conf['color-14']}\">{$conf['text-stat-14']}</font>",
'count_comm'=> "{$conf['comm-num-14']}"
),
15=> array(
'image_rating'=> "{$conf['img_path']}/15.gif",
'rank_txt'=>"<font color=\"{$conf['color-15']}\">{$conf['text-stat-15']}</font>",
'count_comm'=> "{$conf['comm-num-15']}"
),
16=> array(
'image_rating'=> "{$conf['img_path']}/16.gif",
'rank_txt'=>"<font color=\"{$conf['color-16']}\">{$conf['text-stat-16']}</font>",
'count_comm'=> "{$conf['comm-num-16']}"
),
17=> array(
'image_rating'=> "{$conf['img_path']}/17.gif",
'rank_txt'=>"<font color=\"{$conf['color-17']}\">{$conf['text-stat-17']}</font>",
'count_comm'=> "{$conf['comm-num-17']}"
),
18=> array(
'image_rating'=> "{$conf['img_path']}/18.gif",
'rank_txt' => "<font color=\"{$conf['color-18']}\">{$conf['text-stat-18']}</font>",
'count_comm' => "{$conf['comm-num-18']}"
),
19=> array(
'image_rating'=> "{$conf['img_path']}/19.gif",
'rank_txt'=>"<font color=\"{$conf['color-19']}\">{$conf['text-stat-19']}</font>",
'count_comm'=> "{$conf['comm-num-19']}"
),
20=> array(
'image_rating'=> "{$conf['img_path']}/20.gif",
'rank_txt'=>"<font color=\"{$conf['color-20']}\">{$conf['text-stat-20']}</font>",
'count_comm'=> "{$conf['comm-num-20']}"
),
);
if ($row['comm_num']==""){$row[comm_num]=0;}
for($j=0; $j<=count($arr_ratings)-1;$j++)
{
if ($row['comm_num']>=$arr_ratings[$j]['count_comm'])
{
$image_rating = $arr_ratings[$j]['image_rating'];
$rank_txt = $arr_ratings[$j]['rank_txt'];
$remain_comm = "".($arr_ratings[$j+1]['count_comm']-$row['comm_num'])."";
$rank = "{$rank_txt}<br /><br />{$remain_comm}";
if ($row['comm_num']==0){$remain_comm = $no_rating;}
}
}
if ($conf['admin-stat'] == 1)
{
if ($row['user_group']==1)
{
$rank_txt = "{$conf['text-stat-20']}";
$image_rating = "{$conf['img_path']}/20.gif";
$remain_comm = "";
}
}
$tpl->set('{image_rating}',$image_rating);
if ($conf['txt-stat'] == 1) {
$tpl->set('{rank_txt}',$rank);
} else { $tpl->set('{rank_txt}','-'); }
#======================================================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
حالا فایل \engine\modules\show.full.php را باز کنید و به دنبال کد زیر بگردید
if(!defined('DATALIFEENGINE'))
{
die("Hacking attempt!");
}
{
die("Hacking attempt!");
}
در زیر این کد ، کد زیر را قرار دهید
include ENGINE_DIR.'/data/rating.php';
در همین فایل کد زیر را پیدا کنید
$tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si","");
}
}
و کد زیر را در زیر این کد قرار دهید
#======================================================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
$tpl->set('{user_id}', stripslashes($row['user_id']));
$no_rating = "ميهمان رتبه ندارد";
$arr_ratings = array(
0=> array(
'image_rating'=> "{$conf['img_path']}/00.gif",
'rank_txt'=> "<font color=\"{$conf['color-0']}\">{$conf['text-stat-0']}</font>",
'count_comm'=> "{$conf['comm-num-0']}"
),
1=> array(
'image_rating'=> "{$conf['img_path']}/01.gif",
'rank_txt'=> "<font color=\"{$conf['color-1']}\">{$conf['text-stat-1']}</font>",
'count_comm'=> "{$conf['comm-num-1']}"
),
2=> array(
'image_rating'=> "{$conf['img_path']}/02.gif",
'rank_txt'=> "<font color=\"{$conf['color-2']}\">{$conf['text-stat-2']}</font>",
'count_comm'=> "{$conf['comm-num-2']}"
),
3=> array(
'image_rating'=> "{$conf['img_path']}/03.gif",
'rank_txt'=> "<font color=\"{$conf['color-3']}\">{$conf['text-stat-3']}</font>",
'count_comm'=> "{$conf['comm-num-3']}"
),
4=> array(
'image_rating'=> "{$conf['img_path']}/04.gif",
'rank_txt'=> "<font color=\"{$conf['color-4']}\">{$conf['text-stat-4']}</font>",
'count_comm'=> "{$conf['comm-num-4']}"
),
5=> array(
'image_rating'=> "{$conf['img_path']}/05.gif",
'rank_txt'=> "<font color=\"{$conf['color-5']}\">{$conf['text-stat-5']}</font>",
'count_comm'=> "{$conf['comm-num-5']}"
),
6=> array(
'image_rating'=> "{$conf['img_path']}/06.gif",
'rank_txt'=> "<font color=\"{$conf['color-6']}\">{$conf['text-stat-6']}</font>",
'count_comm'=> "{$conf['comm-num-6']}"
),
7=> array(
'image_rating'=> "{$conf['img_path']}/07.gif",
'rank_txt'=> "<font color=\"{$conf['color-7']}\">{$conf['text-stat-7']}</font>",
'count_comm'=> "{$conf['comm-num-7']}"
),
8=> array(
'image_rating'=> "{$conf['img_path']}/08.gif",
'rank_txt'=> "<font color=\"{$conf['color-8']}\">{$conf['text-stat-8']}</font>",
'count_comm'=> "{$conf['comm-num-8']}"
),
9=> array(
'image_rating'=> "{$conf['img_path']}/09.gif",
'rank_txt'=> "<font color=\"{$conf['color-9']}\">{$conf['text-stat-9']}</font>",
'count_comm'=> "{$conf['comm-num-9']}"
),
10=> array(
'image_rating'=> "{$conf['img_path']}/10.gif",
'rank_txt'=> "<font color=\"{$conf['color-10']}\">{$conf['text-stat-10']}</font>",
'count_comm'=> "{$conf['comm-num-10']}"
),
11=> array(
'image_rating'=> "{$conf['img_path']}/11.gif",
'rank_txt'=>"<font color=\"{$conf['color-11']}\">{$conf['text-stat-11']}</font>",
'count_comm'=> "{$conf['comm-num-11']}"
),
12=> array(
'image_rating'=> "{$conf['img_path']}/12.gif",
'rank_txt'=>"<font color=\"{$conf['color-12']}\">{$conf['text-stat-12']}</font>",
'count_comm'=> "{$conf['comm-num-12']}"
),
13=> array(
'image_rating'=> "{$conf['img_path']}/13.gif",
'rank_txt'=>"<font color=\"{$conf['color-13']}\">{$conf['text-stat-13']}</font>",
'count_comm'=> "{$conf['comm-num-13']}"
),
14=> array(
'image_rating'=> "{$conf['img_path']}/14.gif",
'rank_txt'=> "<font color=\"{$conf['color-14']}\">{$conf['text-stat-14']}</font>",
'count_comm'=> "{$conf['comm-num-14']}"
),
15=> array(
'image_rating'=> "{$conf['img_path']}/15.gif",
'rank_txt'=>"<font color=\"{$conf['color-15']}\">{$conf['text-stat-15']}</font>",
'count_comm'=> "{$conf['comm-num-15']}"
),
16=> array(
'image_rating'=> "{$conf['img_path']}/16.gif",
'rank_txt'=>"<font color=\"{$conf['color-16']}\">{$conf['text-stat-16']}</font>",
'count_comm'=> "{$conf['comm-num-16']}"
),
17=> array(
'image_rating'=> "{$conf['img_path']}/17.gif",
'rank_txt'=>"<font color=\"{$conf['color-17']}\">{$conf['text-stat-17']}</font>",
'count_comm'=> "{$conf['comm-num-17']}"
),
18=> array(
'image_rating'=> "{$conf['img_path']}/18.gif",
'rank_txt' => "<font color=\"{$conf['color-18']}\">{$conf['text-stat-18']}</font>",
'count_comm' => "{$conf['comm-num-18']}"
),
19=> array(
'image_rating'=> "{$conf['img_path']}/19.gif",
'rank_txt'=>"<font color=\"{$conf['color-19']}\">{$conf['text-stat-19']}</font>",
'count_comm'=> "{$conf['comm-num-19']}"
),
20=> array(
'image_rating'=> "{$conf['img_path']}/20.gif",
'rank_txt'=>"<font color=\"{$conf['color-20']}\">{$conf['text-stat-20']}</font>",
'count_comm'=> "{$conf['comm-num-20']}"
),
);
if ($row['comm_num']==""){$row[comm_num]=0;}
for($j=0;$j<=count($arr_ratings)-1;$j++)
{
if ($row['comm_num']>=$arr_ratings[$j]['count_comm'])
{
$image_rating = $arr_ratings[$j]['image_rating'];
$rank_txt = $arr_ratings[$j]['rank_txt'];
$remain_comm = "".($arr_ratings[$j+1]['count_comm']-$row['comm_num'])."";
if ($row['comm_num']==0){$remain_comm = $no_rating;}
}
}
if ($conf['admin-stat'] == 1)
{
if ($row['user_group']==1)
{
$rank_txt = "{$conf['text-stat-20']}";
$image_rating = "{$conf['img_path']}/20.gif";
$remain_comm = "";
}
}
$tpl->set('{image_rating}',"<img border=\"0\" src=\"{$image_rating}\" width=\"114\" height=\"19\">");
$tpl->set('{remain}',$remain_comm);
if ($conf['txt-stat'] == 1) {
$tpl->set('{rank_txt}',$rank_txt);
} else { $tpl->set('{rank_txt}',''); }
#======================================================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
$tpl->set('{user_id}', stripslashes($row['user_id']));
$no_rating = "ميهمان رتبه ندارد";
$arr_ratings = array(
0=> array(
'image_rating'=> "{$conf['img_path']}/00.gif",
'rank_txt'=> "<font color=\"{$conf['color-0']}\">{$conf['text-stat-0']}</font>",
'count_comm'=> "{$conf['comm-num-0']}"
),
1=> array(
'image_rating'=> "{$conf['img_path']}/01.gif",
'rank_txt'=> "<font color=\"{$conf['color-1']}\">{$conf['text-stat-1']}</font>",
'count_comm'=> "{$conf['comm-num-1']}"
),
2=> array(
'image_rating'=> "{$conf['img_path']}/02.gif",
'rank_txt'=> "<font color=\"{$conf['color-2']}\">{$conf['text-stat-2']}</font>",
'count_comm'=> "{$conf['comm-num-2']}"
),
3=> array(
'image_rating'=> "{$conf['img_path']}/03.gif",
'rank_txt'=> "<font color=\"{$conf['color-3']}\">{$conf['text-stat-3']}</font>",
'count_comm'=> "{$conf['comm-num-3']}"
),
4=> array(
'image_rating'=> "{$conf['img_path']}/04.gif",
'rank_txt'=> "<font color=\"{$conf['color-4']}\">{$conf['text-stat-4']}</font>",
'count_comm'=> "{$conf['comm-num-4']}"
),
5=> array(
'image_rating'=> "{$conf['img_path']}/05.gif",
'rank_txt'=> "<font color=\"{$conf['color-5']}\">{$conf['text-stat-5']}</font>",
'count_comm'=> "{$conf['comm-num-5']}"
),
6=> array(
'image_rating'=> "{$conf['img_path']}/06.gif",
'rank_txt'=> "<font color=\"{$conf['color-6']}\">{$conf['text-stat-6']}</font>",
'count_comm'=> "{$conf['comm-num-6']}"
),
7=> array(
'image_rating'=> "{$conf['img_path']}/07.gif",
'rank_txt'=> "<font color=\"{$conf['color-7']}\">{$conf['text-stat-7']}</font>",
'count_comm'=> "{$conf['comm-num-7']}"
),
8=> array(
'image_rating'=> "{$conf['img_path']}/08.gif",
'rank_txt'=> "<font color=\"{$conf['color-8']}\">{$conf['text-stat-8']}</font>",
'count_comm'=> "{$conf['comm-num-8']}"
),
9=> array(
'image_rating'=> "{$conf['img_path']}/09.gif",
'rank_txt'=> "<font color=\"{$conf['color-9']}\">{$conf['text-stat-9']}</font>",
'count_comm'=> "{$conf['comm-num-9']}"
),
10=> array(
'image_rating'=> "{$conf['img_path']}/10.gif",
'rank_txt'=> "<font color=\"{$conf['color-10']}\">{$conf['text-stat-10']}</font>",
'count_comm'=> "{$conf['comm-num-10']}"
),
11=> array(
'image_rating'=> "{$conf['img_path']}/11.gif",
'rank_txt'=>"<font color=\"{$conf['color-11']}\">{$conf['text-stat-11']}</font>",
'count_comm'=> "{$conf['comm-num-11']}"
),
12=> array(
'image_rating'=> "{$conf['img_path']}/12.gif",
'rank_txt'=>"<font color=\"{$conf['color-12']}\">{$conf['text-stat-12']}</font>",
'count_comm'=> "{$conf['comm-num-12']}"
),
13=> array(
'image_rating'=> "{$conf['img_path']}/13.gif",
'rank_txt'=>"<font color=\"{$conf['color-13']}\">{$conf['text-stat-13']}</font>",
'count_comm'=> "{$conf['comm-num-13']}"
),
14=> array(
'image_rating'=> "{$conf['img_path']}/14.gif",
'rank_txt'=> "<font color=\"{$conf['color-14']}\">{$conf['text-stat-14']}</font>",
'count_comm'=> "{$conf['comm-num-14']}"
),
15=> array(
'image_rating'=> "{$conf['img_path']}/15.gif",
'rank_txt'=>"<font color=\"{$conf['color-15']}\">{$conf['text-stat-15']}</font>",
'count_comm'=> "{$conf['comm-num-15']}"
),
16=> array(
'image_rating'=> "{$conf['img_path']}/16.gif",
'rank_txt'=>"<font color=\"{$conf['color-16']}\">{$conf['text-stat-16']}</font>",
'count_comm'=> "{$conf['comm-num-16']}"
),
17=> array(
'image_rating'=> "{$conf['img_path']}/17.gif",
'rank_txt'=>"<font color=\"{$conf['color-17']}\">{$conf['text-stat-17']}</font>",
'count_comm'=> "{$conf['comm-num-17']}"
),
18=> array(
'image_rating'=> "{$conf['img_path']}/18.gif",
'rank_txt' => "<font color=\"{$conf['color-18']}\">{$conf['text-stat-18']}</font>",
'count_comm' => "{$conf['comm-num-18']}"
),
19=> array(
'image_rating'=> "{$conf['img_path']}/19.gif",
'rank_txt'=>"<font color=\"{$conf['color-19']}\">{$conf['text-stat-19']}</font>",
'count_comm'=> "{$conf['comm-num-19']}"
),
20=> array(
'image_rating'=> "{$conf['img_path']}/20.gif",
'rank_txt'=>"<font color=\"{$conf['color-20']}\">{$conf['text-stat-20']}</font>",
'count_comm'=> "{$conf['comm-num-20']}"
),
);
if ($row['comm_num']==""){$row[comm_num]=0;}
for($j=0;$j<=count($arr_ratings)-1;$j++)
{
if ($row['comm_num']>=$arr_ratings[$j]['count_comm'])
{
$image_rating = $arr_ratings[$j]['image_rating'];
$rank_txt = $arr_ratings[$j]['rank_txt'];
$remain_comm = "".($arr_ratings[$j+1]['count_comm']-$row['comm_num'])."";
if ($row['comm_num']==0){$remain_comm = $no_rating;}
}
}
if ($conf['admin-stat'] == 1)
{
if ($row['user_group']==1)
{
$rank_txt = "{$conf['text-stat-20']}";
$image_rating = "{$conf['img_path']}/20.gif";
$remain_comm = "";
}
}
$tpl->set('{image_rating}',"<img border=\"0\" src=\"{$image_rating}\" width=\"114\" height=\"19\">");
$tpl->set('{remain}',$remain_comm);
if ($conf['txt-stat'] == 1) {
$tpl->set('{rank_txt}',$rank_txt);
} else { $tpl->set('{rank_txt}',''); }
#======================================================#
#==============RATING 4.1 [ By SamRazm ]====================#
#==================[ P30-World.Com ]=======================#
فایل /admin.php را باز کنید و به دنبال کد زیر بگردید
'addnews' => 'user',
بعد از این کد ، کد زیر را قرار دهید
'rating'=> 'admin',
حالا فایل /engine/inc/options.php باز کنید و کد زیر را پیدا کنید .
array(
'name' => $lang['opt_img'],
'url' => "$PHP_SELF?mod=files",
'descr' => $lang['opt_imgc'],
'image' => "iset.png",
'access' => "2",
),
'name' => $lang['opt_img'],
'url' => "$PHP_SELF?mod=files",
'descr' => $lang['opt_imgc'],
'image' => "iset.png",
'access' => "2",
),
کد زیر را در زیر این کد قرار دهید
array(
'name' => 'رتبه کاربران نسخه 4.1',
'url' => "$PHP_SELF?mod=rating",
'descr' => 'تنظيمات ماژول رتبه کاربران بر اساس تعداد نظرات',
'image' => "rating/rating.png",
'access' => "1",
),
'name' => 'رتبه کاربران نسخه 4.1',
'url' => "$PHP_SELF?mod=rating",
'descr' => 'تنظيمات ماژول رتبه کاربران بر اساس تعداد نظرات',
'image' => "rating/rating.png",
'access' => "1",
),
حالا با استفاده از تگهای زیر در فایل templates/Default/comments.tpl میتوانید از این ماژول استفاده کنید .
{image_rating} - امیتاز به تصویری
{user_id} - شماره کاربری
{rank_txt} - امتیاز به صورت متنی
{remain} - تعداد نظرات مانده برای ارتقا
{user_id} - شماره کاربری
{rank_txt} - امتیاز به صورت متنی
{remain} - تعداد نظرات مانده برای ارتقا
نصب این ماژول تموم شد . اگه مشکلی داشتید در خدمتیم