MyBB-Plugins Forums

Full Version: newpoint + prostats
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi ,
i use prostats to show my forum static,and use new point to point user ,
is there way to show user point on prostats? Smile

sory for my gramer ,my english is badBig Grin
You should ask the developer of that plugin, no me.
thanks for reply ,
i ask from he , he dont understand about working of new point ,
now i ask him about working of prostats ,
is there way to export user point data from new point?
if we have this output ,so we can import this to input of prostats
The column which contains the points is 'newpoints' and can be found in the users table
Smile
i find this code on prostats ,this code work for thanks and MostReputation , i am work on it ,if yo have any idea ,help me Smile
PHP Code:
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;
}


function 
ps_GetMostThanks($NumOfRows)
{
    global 
$mybb$db$templates$theme$lang$ps_align;
    
    if (!
$db->field_exists("thxcount","users"))        
    {
        
$mostthanks_row .= "<tr class=\"smalltext\"><td colspan=\"2\" align=\"center\"><small>".$lang->prostats_err_thxplugin."</small></td></tr>";
        eval(
"\$column_mostthanks = \"".$templates->get("prostats_mostthanks")."\";");
        return 
$column_mostthanks;
    }
    
    
$query $db->query("SELECT uid,username,usergroup,displaygroup,thxcount FROM ".TABLE_PREFIX."users ORDER BY thxcount DESC LIMIT 0,".$NumOfRows);

    while (
$most_thanks $db->fetch_array($query))
    {
        
$uid $most_thanks['uid'];
        
$username ps_FormatName(htmlspecialchars_uni($most_thanks['username']), $most_thanks['usergroup'], $most_thanks['displaygroup']);
        
$thxnum $most_thanks['thxcount'];
        
$profilelink get_profile_link($uid);        
        eval(
"\$mostthanks_row .= \"".$templates->get("prostats_mostthanks_row")."\";");
    }
    eval(
"\$column_mostthanks = \"".$templates->get("prostats_mostthanks")."\";");

    return 
$column_mostthanks;

and this
PHP Code:
//Most Reputation
    
$templatearray = array(
        
"title" => "prostats_mostreputation",
        
"template" => "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"{\$theme[tablespace]}\">
        <tr class=\"tcat smalltext\">
        <td colspan=\"2\">{\$lang->prostats_most_reputations}</td>
        </tr>
        <tr>
<td colspan=\"2\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
        {\$mostreputation_row}
</table></td></tr>
        </table></td>"
,
        
"sid" => "-1",
        );
    
$db->insert_query("templates"$templatearray);
        
    
$templatearray = array(
        
"title" => "prostats_mostreputation_row",
        
"template" => "<tr class=\"smalltext\">
        <td><a href=\"{\$profilelink}\">{\$username}</a></td>
        <td align=\"{\$ps_align}\"><a href=\"reputation.php?uid={\$uid}\">{\$repscount}</a></td>
        </tr>"
,
        
"sid" => "-1",
        );
    
$db->insert_query("templates"$templatearray);
    
    
//Most Thanks
    
$templatearray = array(
        
"title" => "prostats_mostthanks",
        
"template" => "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"{\$theme[tablespace]}\">
        <tr class=\"tcat smalltext\">
        <td colspan=\"2\">{\$lang->prostats_most_thanks}</td>
        </tr>
        <tr>
<td colspan=\"2\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
        {\$mostthanks_row}
</table></td></tr>
        </table></td>"
,
        
"sid" => "-1",
        );
    
$db->insert_query("templates"$templatearray);
        
    
$templatearray = array(
        
"title" => "prostats_mostthanks_row",
        
"template" => "<tr class=\"smalltext\">
        <td><a href=\"{\$profilelink}\">{\$username}</a></td>
        <td align=\"{\$ps_align}\">{\$thxnum}</td>
        </tr>"
,
        
"sid" => "-1",
        );
    
$db->insert_query("templates"$templatearray); 
Smile ,
now i am go to math it with new point ,
help me Big Grin

ok , i solve it :

http://community.mybb.com/thread-100305.html

thanks for your work ,