2011-07-30, 09:04 PM
hi ,this my new post on mybb forum,
first sory to all for my english and grammer ,
ok lets go
on mybb ,there is a system user can reputation to other ,but i think thats not good ,user rate with his taste,
now , with newpoints ,system can do it ,i change prostats code to show user reputation on stats ,
1-install new point
so downlaad and instal it form here
ok ,after instal go to setting and change setting for your language and taste
2-show on post bit
now go to postbit_author_user on themplation ,open it ,and remove reputation parametr ,
.go to postbit_classic , if you use ather postbit ,,go here ,search to code and find
go to universal themplation ,find
newpoints_postbit
remove all code and replace with
we finish easy work,next step,we change prostats code to show newpoints stat
before this step ,turn off prostats
3-open and edit /inc/plugins/prostats.php
find
and replace with
u.reputation---->>-u.newpoints
find:
and replace to :
finish ,thanks all ,
first sory to all for my english and grammer ,
ok lets go
on mybb ,there is a system user can reputation to other ,but i think thats not good ,user rate with his taste,
now , with newpoints ,system can do it ,i change prostats code to show user reputation on stats ,
1-install new point
so downlaad and instal it form here
ok ,after instal go to setting and change setting for your language and taste
2-show on post bit
now go to postbit_author_user on themplation ,open it ,and remove reputation parametr ,
Quote:{$post['replink']}if thats style ,remove all ,
.go to postbit_classic , if you use ather postbit ,,go here ,search to code and find
{$post['newpoints_postbit']}
and cut it ,paste uper {$post['user_details']}
now , go to remove point link from your ney reputation,go to universal themplation ,find
newpoints_postbit
remove all code and replace with
<br /><span class="smalltext">{$currency}:{$points}</a></span>{$donate}
,okwe finish easy work,next step,we change prostats code to show newpoints stat
before this step ,turn off prostats
3-open and edit /inc/plugins/prostats.php
find
function ps_GetMostReputation($NumOfRows)
{
global $mybb, $db, $templates, $theme, $lang, $parser, $ps_align;
$query = $db->query("
SELECT u.uid,u.reputation,u.username,u.usergroup,u.displaygroup
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups ug ON (u.usergroup = ug.gid)
WHERE ug.usereputationsystem='1'
ORDER BY u.reputation DESC
LIMIT 0,".$NumOfRows
);
while ($most_reputations = $db->fetch_array($query)) {
$uid = $most_reputations['uid'];
$profilelink = get_profile_link($uid);
$repscount = intval($most_reputations['reputation']);
$username = ps_FormatName(htmlspecialchars_uni($most_reputations['username']), $most_reputations['usergroup'], $most_reputations['displaygroup']);
eval("\$mostreputation_row .= \"".$templates->get("prostats_mostreputation_row")."\";");
}
eval("\$column_mostreputation = \"".$templates->get("prostats_mostreputation")."\";");
return $column_mostreputation;
}
and replace with
function ps_GetMostReputation($NumOfRows)
{
global $mybb, $db, $templates, $theme, $lang, $parser, $ps_align;
$query = $db->query("
SELECT u.uid,u.newpoints,u.username,u.usergroup,u.displaygroup
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups ug ON (u.usergroup = ug.gid)
ORDER BY u.newpoints DESC
LIMIT 0,".$NumOfRows
);
while ($most_reputations = $db->fetch_array($query)) {
$uid = $most_reputations['uid'];
$profilelink = get_profile_link($uid);
$repscount = intval($most_reputations['newpoints']);
$username = ps_FormatName(htmlspecialchars_uni($most_reputations['username']), $most_reputations['usergroup'], $most_reputations['displaygroup']);
eval("\$mostreputation_row .= \"".$templates->get("prostats_mostreputation_row")."\";");
}
eval("\$column_mostreputation = \"".$templates->get("prostats_mostreputation")."\";");
return $column_mostreputation;
}
i change db adrress of reputation with db new pointsu.reputation---->>-u.newpoints
$repscount = intval($most_reputations['reputation'])------>>>-$repscount = intval($most_reputations['newpoints']);
find:
<td align=\"{\$ps_align}\"><a href=\"reputation.php?uid={\$uid}\">{\$repscount}</a></td>
and replace to :
<td><a href=\"{\$profilelink}\">{\$username}</a></td>
finish ,thanks all ,