Most Reputations Page
Hi,<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1:</span> Create a new file called <span style="font-weight: bold;" class="mycode_b">mostreputations.php</span> and paste this code into it:<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php"><?php
/**
* Most Reputations Page
* Author: #Raptor
* Author's email: [email protected]
**/
define('IN_MYBB', 1);
require_once("global.php"
;
if($mybb->user['uid'] == 0)
error_no_permission();
add_breadcrumb("Most Reputations", $_SERVER['PHP_SELF']);
$sablon = '<html>
<head>
<title>Most Reputations</title>
{$headerinclude}
</head>
<body>
{$header}';
$liste = '<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<tbody><tr>
<td class="thead" colspan="2"><strong>Most Reputations Page</strong></td>
</tr>
<tr>
<td class="tcat" width="50%"><strong>Username</strong></td>
<td class="tcat" width="50%"><strong>Reputation</strong></td>
</tr>';
$a = $db->simple_select('users', 'uid, username, usergroup, displaygroup, reputation', "reputation > 0 AND usergroup<>7", ['order_by' => 'reputation', 'order_dir' => 'desc', 'limit' => 100]);
while($cek = $db->fetch_array($a)) {
$username = htmlspecialchars_uni($cek['username']);
$kid = $cek['uid'];
$username = format_name($username, $cek['usergroup'], $cek['displaygroup']);
$k = build_profile_link($username, $kid);
$rep = my_number_format($cek['reputation']);
$r = '<div style="color:green;">'.$rep.'</div> <a href="reputation.php?uid='.$kid.'">[Details]</a>';
$liste = $liste . '<tr>
<td class="trow1">'.$k.'</td>
<td class="trow1">'.$r.'</td>
</tr>';
}
$son = $liste . '</tbody></table>
{$footer}
</body>
</html>';
$sablon = $sablon . $son;
$sablon = str_replace("\'", "'", addslashes($sablon));
eval("\$page = \"" . $sablon . "\";"
;
output_page($page);
?>
</code></pre><br />
<span style="font-weight: bold;" class="mycode_b">Step 2:</span> Upload the file to forum root.<br />
<br />
Tested on MyBB 1.8 and works fine.<br />
<br />
Screenshot:<br />
<br />
<img src=" " data-original-url="https://i.ibb.co/yyXqW5N/ekrangoruntusu.png" loading="lazy" alt="[Image: ekrangoruntusu.png]" class="mycode_img" />
Hi,<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1:</span> Create a new file called <span style="font-weight: bold;" class="mycode_b">mostreputations.php</span> and paste this code into it:<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php"><?php
/**
* Most Reputations Page
* Author: #Raptor
* Author's email: [email protected]
**/
define('IN_MYBB', 1);
require_once("global.php"
if($mybb->user['uid'] == 0)
error_no_permission();
add_breadcrumb("Most Reputations", $_SERVER['PHP_SELF']);
$sablon = '<html>
<head>
<title>Most Reputations</title>
{$headerinclude}
</head>
<body>
{$header}';
$liste = '<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<tbody><tr>
<td class="thead" colspan="2"><strong>Most Reputations Page</strong></td>
</tr>
<tr>
<td class="tcat" width="50%"><strong>Username</strong></td>
<td class="tcat" width="50%"><strong>Reputation</strong></td>
</tr>';
$a = $db->simple_select('users', 'uid, username, usergroup, displaygroup, reputation', "reputation > 0 AND usergroup<>7", ['order_by' => 'reputation', 'order_dir' => 'desc', 'limit' => 100]);
while($cek = $db->fetch_array($a)) {
$username = htmlspecialchars_uni($cek['username']);
$kid = $cek['uid'];
$username = format_name($username, $cek['usergroup'], $cek['displaygroup']);
$k = build_profile_link($username, $kid);
$rep = my_number_format($cek['reputation']);
$r = '<div style="color:green;">'.$rep.'</div> <a href="reputation.php?uid='.$kid.'">[Details]</a>';
$liste = $liste . '<tr>
<td class="trow1">'.$k.'</td>
<td class="trow1">'.$r.'</td>
</tr>';
}
$son = $liste . '</tbody></table>
{$footer}
</body>
</html>';
$sablon = $sablon . $son;
$sablon = str_replace("\'", "'", addslashes($sablon));
eval("\$page = \"" . $sablon . "\";"
output_page($page);
?>
</code></pre><br />
<span style="font-weight: bold;" class="mycode_b">Step 2:</span> Upload the file to forum root.<br />
<br />
Tested on MyBB 1.8 and works fine.<br />
<br />
Screenshot:<br />
<br />
<img src=" " data-original-url="https://i.ibb.co/yyXqW5N/ekrangoruntusu.png" loading="lazy" alt="[Image: ekrangoruntusu.png]" class="mycode_img" />