Most Reputations Page

Spartak

Well-known member
Member
Joined
9 yrs. 9 mth. 5 days
Messages
587
Reaction score
8,878
Wallet
0$
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">&lt;?php

/**
* Most Reputations Page
* Author: #Raptor
* Author's email: [email protected]
**/

define('IN_MYBB', 1);

require_once(&quot;global.php&quot;);

if($mybb-&gt;user['uid'] == 0)
error_no_permission();

add_breadcrumb(&quot;Most Reputations&quot;, $_SERVER['PHP_SELF']);

$sablon = '&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Most Reputations&lt;/title&gt;
{$headerinclude}
&lt;/head&gt;
&lt;body&gt;
{$header}';

$liste = '&lt;table border=&quot;0&quot; cellspacing=&quot;{$theme[\'borderwidth\']}&quot; cellpadding=&quot;{$theme[\'tablespace\']}&quot; class=&quot;tborder&quot;&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&quot;thead&quot; colspan=&quot;2&quot;&gt;&lt;strong&gt;Most Reputations Page&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;tcat&quot; width=&quot;50%&quot;&gt;&lt;strong&gt;Username&lt;/strong&gt;&lt;/td&gt;
&lt;td class=&quot;tcat&quot; width=&quot;50%&quot;&gt;&lt;strong&gt;Reputation&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;';

$a = $db-&gt;simple_select('users', 'uid, username, usergroup, displaygroup, reputation', &quot;reputation &gt; 0 AND usergroup&lt;&gt;7&quot;, ['order_by' =&gt; 'reputation', 'order_dir' =&gt; 'desc', 'limit' =&gt; 100]);

while($cek = $db-&gt;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 = '&lt;div style=&quot;color:green;&quot;&gt;'.$rep.'&lt;/div&gt; &lt;a href=&quot;reputation.php?uid='.$kid.'&quot;&gt;[Details]&lt;/a&gt;';

$liste = $liste . '&lt;tr&gt;
&lt;td class=&quot;trow1&quot;&gt;'.$k.'&lt;/td&gt;
&lt;td class=&quot;trow1&quot;&gt;'.$r.'&lt;/td&gt;
&lt;/tr&gt;';

}

$son = $liste . '&lt;/tbody&gt;&lt;/table&gt;
{$footer}
&lt;/body&gt;
&lt;/html&gt;';

$sablon = $sablon . $son;

$sablon = str_replace(&quot;\'&quot;, &quot;'&quot;, addslashes($sablon));
eval(&quot;\$page = \&quot;&quot; . $sablon . &quot;\&quot;;&quot;);
output_page($page);

?&gt;
</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="
Please, Log in or Register to view URLs content!
" data-original-url="https://i.ibb.co/yyXqW5N/ekrangoruntusu.png" loading="lazy" alt="[Image: ekrangoruntusu.png]" class="mycode_img" />


Please, Log in or Register to view URLs content!
 
Top Bottom