• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Project_F2P Website "Working Player Rankings" with modified site script :)

Status
Not open for further replies.
Junior Spellweaver
Joined
Jul 26, 2012
Messages
173
Reaction score
35
Heres the Ranking Script/Site Script that I have promised to release upon of section creation.
This Script was Edited from the original release, to match my site/server needs :) and yeah make it look better ofc.


If you intend to use this site the following people should be credited: AlexKonusa, Last Thief for free bug Rankings
and other site features/edits.

Download:
mediafire:
Mega:

alexkonusa - Project_F2P Website "Working Player Rankings" with modified site script :) - RaGEZONE Forums

alexkonusa - Project_F2P Website "Working Player Rankings" with modified site script :) - RaGEZONE Forums


Rankings:

Rankings page lets you be 100% creative and unique so you can change and adjust it to your need.
All you have to do is get rid of the tables/titles you don't need.

Example:

Code:
<th class="topLine">#</th>
		<th class="topLine">Nickname</th>
		<th class="topLine">Dinars</th>
		<th class="topLine">EXP</th>
		<th class="topLine">Kills/Deaths</th>
		<th class="topLine">Status</th>


You want to add so it displays cash in the rankings: Should look like this

Code:
<th class="topLine">#</th>
		<th class="topLine">Nickname</th>
		<th class="topLine">Dinars</th>
		<th class="topLine">Cash</th>
		<th class="topLine">EXP</th>
		<th class="topLine">Kills/Deaths</th>
		<th class="topLine">Status</th>


And now you need to and so it displays it correctly from the DataBase

Code:
<td class='thell' align='center'><img src='img/user1.png' title=''></td>
		<td class='thell' align='center'>$row[nickname]</td>
		<td class='thell' align='center'>$row[dinar]</td>
		<td class='thell' align='center'>$row[exp]</td>
		<td class='thell' align='center'>$row[kills]/$row[deaths]</td>
		<td class='thell' align='center'>";
		if(!$row['online']) { echo "<font color='Red'>Offline</font></td>"; } else { echo "<font color='Green'>Online</font></td>"; }
    echo "</tr>"

add this to the list

Code:
 <td class='thell' align='center'>$row[cash]</td>

So now the rankings will also display amount of cash your players have :)


Feel free to use this, but don't forget to give Credits.
 
RaGEZONER Since 2004
Loyal Member
Joined
Jul 18, 2004
Messages
1,130
Reaction score
381
Re: Project_F2P Website "Working Player Rankings" with modified site script :)

I really dont know where i've done wrong,on ranking.php only need to put database name?.
no database user and pass?.

alexkonusa - Project_F2P Website "Working Player Rankings" with modified site script :) - RaGEZONE Forums
 
Joined
Apr 12, 2013
Messages
897
Reaction score
481
Re: Project_F2P Website "Working Player Rankings" with modified site script :)

Improved working Version (save this as \pages\rankings.php):
Code:
<div id="content">			<div class="con-ui con-top"><h2>Ranking</h2></div>


<div class="con-ui con-post">
<div class="con-wrapper">
<!-- Ranking Script Coded by AlexKonusa/LastThief Free to use by please don't delete this or atleast give some sort of credit. -->
<!-- If you're indend to use this script, don't forget to  -->
<table width="100%">


	<tr>
		<th class="topLine">#</th>
		<th class="topLine">Nickname</th>
		<th class="topLine">Dinars</th>
		<th class="topLine">EXP</th>
		<th class="topLine">Kills/Deaths</th>
		<th class="topLine">Status</th>
	</tr>
  <?php
  include 'connect.php'; 
  $link = mysql_connect($host, $userdb, $password);
if (!$link) {
    die('Could not connect to DB: ' . mysql_error());
}
  mysql_select_db($database) or die(mysql_error());
  $query = mysql_query("SELECT * FROM users ORDER BY exp DESC LIMIT 50") or die(mysql_error()); 
  $i =0;
  while($row = mysql_fetch_array($query))
  {
  echo"
	<tr>
		<td class='thell' align='center'><img src='img/user1.png' title=''></td>
		<td class='thell' align='center'>$row[nickname]</td>
		<td class='thell' align='center'>$row[dinar]</td>
		<td class='thell' align='center'>$row[exp]</td>
		<td class='thell' align='center'>$row[kills]/$row[deaths]</td>
		<td class='thell' align='center'>";
		if(!$row['online']) { echo "<font color='Red'>Offline</font></td>"; } else { echo "<font color='Green'>Online</font></td>"; }
    echo "</tr>";
}
?>
	
</table>










</div>
</div> 
<div class="con-ui con-bt"></div>


</div>
<!-- If you're indend to use this script, don't forget to  -->
<!-- Ranking Script Coded by AlexKonusa/LastThief Free to use by please don't delete this or atleast give some sort of credit. -->
 
Junior Spellweaver
Joined
Jul 26, 2012
Messages
173
Reaction score
35
Re: Project_F2P Website "Working Player Rankings" with modified site script :)

I really dont know where i've done wrong,on ranking.php only need to put database name?.
no database user and pass?.

alexkonusa - Project_F2P Website "Working Player Rankings" with modified site script :) - RaGEZONE Forums
yes you only need set database in 3 files, 2x connection and rankings
also set permissions for your local user in mysql to be able to use this, because thats the error you got there
 
Newbie Spellweaver
Joined
Jul 8, 2012
Messages
11
Reaction score
3
Re: Project_F2P Website "Working Player Rankings" with modified site script :)

Here is my version (quickly done) with rank working and [GM] tags and stuff

MFVSW0v - Project_F2P Website "Working Player Rankings" with modified site script :) - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
RaGEZONER Since 2004
Loyal Member
Joined
Jul 18, 2004
Messages
1,130
Reaction score
381
Re: Project_F2P Website "Working Player Rankings" with modified site script :)

Improved working Version (save this as \pages\rankings.php):
Code:
<div id="content">            <div class="con-ui con-top"><h2>Ranking</h2></div>


<div class="con-ui con-post">
<div class="con-wrapper">
<!-- Ranking Script Coded by AlexKonusa/LastThief Free to use by please don't delete this or atleast give some sort of credit. -->
<!-- If you're indend to use this script, don't forget to  -->
<table width="100%">


    <tr>
        <th class="topLine">#</th>
        <th class="topLine">Nickname</th>
        <th class="topLine">Dinars</th>
        <th class="topLine">EXP</th>
        <th class="topLine">Kills/Deaths</th>
        <th class="topLine">Status</th>
    </tr>
  <?php
  include 'connect.php'; 
  $link = mysql_connect($host, $userdb, $password);
if (!$link) {
    die('Could not connect to DB: ' . mysql_error());
}
  mysql_select_db($database) or die(mysql_error());
  $query = mysql_query("SELECT * FROM users ORDER BY exp DESC LIMIT 50") or die(mysql_error()); 
  $i =0;
  while($row = mysql_fetch_array($query))
  {
  echo"
    <tr>
        <td class='thell' align='center'><img src='img/user1.png' title=''></td>
        <td class='thell' align='center'>$row[nickname]</td>
        <td class='thell' align='center'>$row[dinar]</td>
        <td class='thell' align='center'>$row[exp]</td>
        <td class='thell' align='center'>$row[kills]/$row[deaths]</td>
        <td class='thell' align='center'>";
        if(!$row['online']) { echo "<font color='Red'>Offline</font></td>"; } else { echo "<font color='Green'>Online</font></td>"; }
    echo "</tr>";
}
?>
    
</table>










</div>
</div> 
<div class="con-ui con-bt"></div>


</div>
<!-- If you're indend to use this script, don't forget to  -->
<!-- Ranking Script Coded by AlexKonusa/LastThief Free to use by please don't delete this or atleast give some sort of credit. -->

Thanks Friend..this one do the work.thats also what im thinking.its need to call the connect.php =`) so it would read the full database info.
 
Joined
Apr 12, 2013
Messages
897
Reaction score
481
Re: Project_F2P Website "Working Player Rankings" with modified site script :)

My Version (what i'm using):
PHP:
<div id="content">			<div class="con-ui con-top"><h2>Ranking</h2></div>
<div class="con-ui con-post"><div class="con-wrapper"><!-- Ranking Script Coded by AlexKonusa/LastThief Free to use by please don't delete this or atleast give some sort of credit. --><!-- If you're indend to use this script, don't forget to  --><table width="100%">
	<tr>		<th class="topLine">#</th>		<th class="topLine">Nickname</th>		<th class="topLine">Dinars</th>		<th class="topLine">Level</th>		<th class="topLine">Kills/Deaths</th>		<th class="topLine">Status</th>	</tr>  <?php  include 'connect.php';   $link = mysql_connect($host, $userdb, $password);if (!$link) {    die('Could not connect to DB: ' . mysql_error());}  mysql_select_db($database) or die(mysql_error());  $query = mysql_query("SELECT * FROM users ORDER BY exp DESC LIMIT 50") or die(mysql_error());   $i =0;    $EXPTable = array(0,2250,6750,11250,16650,24750,32850,41625,50400,59175,	        //11-20	        67950,76725,94725,112725,130725,148725,166725,189225,211725,234225,	        //21-30	        256725,279225,306225,333225,360225,387225,414225,441225,497475,553725,	        //31-40	        609975,666225,722475,778725,857475,936225,1014975,1093725,1172475,1251225,	        //41-50	        1363725,1476225,1588725,1701225,1813725,1926225,2038725,2207475,2376225,2544975,	        //51-60	        2713725,2882475,3051225,3219975,3444975,3669975,3894975,4119975,4344975,4569975,	        //61-70	        4794975,5132475,5469975,5807475,6144975,6482475,6819975,7157475,7494975,7944975,	        //71-80	        8394975,8844975,9294975,9744975,10194975,10644975,11094975,11657475,12219975,12782475,	        //81-90	        13344975,13907475,14469975,15032475,15932475,17282475,18632475,19982475,21332475,22682475,	        //91-100	        24032475,25382475,26732475,28307475,29882475,31457475,33032475,34607475,36182475,37757475,	        //101	        2147483647);			  while($row = mysql_fetch_array($query))  {  switch ($row['rank']) {				case '1':					$user = $row["nickname"];					break;				case '2':					$user = $row["nickname"];					break;				case '3':					$user = "[MOD] ".$row["nickname"];					break;				case '4':					$user = "[SMOD] ".$row["nickname"];					break;				case '5':					$user = "[GM] ".$row["nickname"];					break;				case '6':					$user = "[GA] ".$row["nickname"];					break;			}			$exp= $row["exp"];	        $lvl=0;	        	        do	        {	            if ($exp < $EXPTable[$lvl]) break;	            $lvl++;	        } while ($lvl < 101);			  echo"	<tr>		<td class='thell' align='center'><img src='img/user1.png' title=''></td>		<td class='thell' align='center'>$user</td>		<td class='thell' align='center'>$row[dinar]</td>		<td class='thell' align='center'>$lvl</td>		<td class='thell' align='center'>$row[kills]/$row[deaths]</td>		<td class='thell' align='center'>";		if(!$row['online']) { echo "<font color='Red'>Offline</font></td>"; } else { echo "<font color='Green'>Online</font></td>"; }    echo "</tr>";}?>	</table>




</div></div> <div class="con-ui con-bt"></div>
</div><!-- If you're indend to use this script, don't forget to  --><!-- Ranking Script Coded by AlexKonusa/LastThief Free to use by please don't delete this or atleast give some sort of credit. -->
 
Status
Not open for further replies.
Back
Top