Register for your free account! | Forgot your password?

You last visited: Today at 10:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HowTo]Top Guild in MT2GS CMS

Discussion on [HowTo]Top Guild in MT2GS CMS within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
djrapa's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 49
Received Thanks: 25
[HowTo]Top Guild in MT2GS CMS (Gilden Rangliste)

Hi I do not speak German but I will try to be in English, I speak Spanish
today will help to add on this website, the top guilds such as the players.
I hope that helps.

First insert this line in the file
"Navi.inc.php"

PHP Code:
<li><a href="index.php?s=rank_guild">Top Gremio List</a></li
Seconds make a file called
"rank_guild.php"
edit it with this code
PHP Code:
<?PHP
$warning 
""//aviso si no existe el Jugador (default empty)
mysql_select_db("player") OR
        die(
"ERROR: DB allready open. ".mysql_error());
$CPSeite 20;
$markierteZeile=0;
if(isset(
$_GET['p'])) {
    if(!
checkInt($_GET['p']) || !($_GET['p']>0)) $aSeite 1;
    else 
$aSeite $_GET['p'];
}
else { 
    
$aSeite 0;
}

if(isset(
$_POST['suche']) && $_POST['suche']=='Buscar') {
    if(!empty(
$_POST['guild'])) {
        
$sqlCmd="SELECT nombre, level, name, win, ladder_point, empire, rang
      FROM (
      
        SELECT nombre, level, name, win, ladder_point, empire, @num := @num +1 AS rang
        FROM (
        
          SELECT guild.name as nombre, guild.level, player.name, guild.win, guild.ladder_point, player_index.empire, @num :=0
          FROM guild 
          LEFT JOIN player ON guild.master = player.id
          LEFT JOIN player_index ON player_index.id = player.account_id
          WHERE player.name NOT LIKE '[%]%'
          ORDER BY
          guild.ladder_point DESC
          
        ) AS t1
        
      ) AS t2
      
      WHERE nombre LIKE '"
.mysql_real_escape_string($_POST['guild'])."' LIMIT 1";
        
$sqlQry=mysql_query($sqlCmd,$sqlServ);
        if(
mysql_num_rows($sqlQry)>0) {
            
            
$getRang mysql_fetch_object($sqlQry);
            
$aSeite ceil($getRang->rang/$CPSeite);
            
$markierteZeile $getRang->rang;
        }
        else 
            
$warning "<p style='color: red'>No se encontro el gremio ingresado.</p>"//code to HTML warning     
    
}
    
}
mysql_select_db("player") OR
        die(
"ERROR: DB allready open. ".mysql_error());

$sqlCmd "SELECT COUNT(*) as summeChars  
  FROM guild 
  LEFT JOIN player ON guild.master = player.id
  LEFT JOIN player_index ON player_index.id = player.account_id
  WHERE player.name NOT LIKE '[%]%'
  ORDER BY
  guild.ladder_point DESC"
;

$sqlQry mysql_query($sqlCmd,$sqlServ);

$getSum mysql_fetch_object($sqlQry);
$cSeite calcPages($getSum->summeChars,$aSeite,$CPSeite);

?>
<h2>Rankings</h2>
<p>La búsqueda de Gremios sólo funciona con una entrada adecuada nombre. La búsqueda no es sensible a mayúsculas.</p>
<?PHP
echo $warning//insert warning
?>
<form action="index.php?s=rank_guild" method="POST">
    <table>
        <tr>
            <th class="topLine">Gremio:</th>
            <td class="thell" style="text-align:center;"><input type="text" name="guild" maxlength="20" size="20"/></td>
            <td class="tdunkel" style="text-align:center;"><input type="submit" name="suche" value="Buscar" maxlength="20" size="20"/></td>
        </tr>
    </table>
</form>
<?PHP
$maxRange 
5;
$maxStep 15;
if((
$aSeite-$maxRange)>0$sStart $aSeite-$maxRange;
else 
$sStart 1;
if((
$aSeite+$maxRange)<=$cSeite[0]) $sEnde $aSeite+$maxRange;
else 
$sEnde $cSeite[0];

echo 
'<table>
  <tr>
  <td class="tdunkel">'
;
if((
$aSeite-$maxStep)>0) echo '<a href="index.php?s=rank_guild&p='.($aSeite-$maxStep).'">'.($aSeite-$maxStep).'</a> &laquo;';
else echo 
'<a href="index.php?s=rank_guild&p=1">1</a> &laquo;';
echo
'</td>';

for(
$i=$sStart;$i<=$sEnde;$i++) {
    
$sKlasse = ($i==$aSeite) ? "topLine" "thell";
    echo
'<td class="'.$sKlasse.'" style="text-align:center;">';
    echo
'<a href="index.php?s=rank_guild&p='.$i.'">'.$i.'</a>';
    echo
'</td>';
}

echo
'<td class="tdunkel" style="text-align:right;">';
if((
$aSeite+$maxStep)<=$cSeite[0]) echo '&raquo; <a href="index.php?s=rank_guild&p='.($aSeite+$maxStep).'">'.($aSeite+$maxStep).'</a>';
else echo 
'&raquo; <a href="index.php?s=rank_guild&p='.$cSeite[0].'">'.$cSeite[0].'</a>';
echo
'</td>';
echo
'</table>';
?>
<h2>Ranking de Gremios</h2>
<table>
    <tr>
        <th class="topLine">Lugar</th>
        <th class="topLine">Gremio</th>
        <th class="topLine">Nivel</th>
        <th class="topLine">Lider</th>
        <th class="topLine">Guerras ganadas</th>
        <th class="topLine">Puntos</th>
        <th class="topLine">Reino</th>
    </tr>
    <?PHP
    $sqlCmd 
"SELECT
guild.name as nombre,
guild.level,
player.name,
guild.win,
guild.ladder_point,
player_index.empire
FROM guild 
  LEFT JOIN player ON guild.master = player.id
  LEFT JOIN player_index ON player_index.id = player.account_id
WHERE player.name NOT LIKE '[%]%'
ORDER BY
  guild.ladder_point DESC
  limit "
.$cSeite[1].",".$CPSeite;
    
    
$sqlQry mysql_query($sqlCmd,$sqlServ);
    
$x=$cSeite[1]+1;
    while(
$getPlayers mysql_fetch_object($sqlQry)) {
        
$zF = ($x%2==0) ? "thell" "tdunkel";
        if(
checkInt($markierteZeile) && $markierteZeile==$x) { 
            
$zF "tmarkiert";
        }
        echo 
"<tr>";
        echo 
"<td class=\"$zF\">".$x."</td>";
        echo 
"<td class=\"$zF\">".$getPlayers->nombre."</td>";
        echo 
"<td class=\"$zF\">".$getPlayers->level."</td>";
        echo 
"<td class=\"$zF\">".$getPlayers->name."</td>";
        echo 
"<td class=\"$zF\">".$getPlayers->win."</td>";
        echo 
"<td class=\"$zF\">".$getPlayers->ladder_point."</td>";
        echo 
"<td class=\"$zF\">";
        if(!empty(
$getPlayers->empire)) {
            echo 
'<img src="img/reiche/'.$getPlayers->empire.'_kl.jpg" title="Reich" alt="Reich"/>';
        }
        echo 
"</td>";
        echo 
"</tr>";
        
    
$x++;
    
}
?>
</table>
I hope you have enjoyed,


regards DJRapa.
djrapa is offline  
Thanks
2 Users
Old 11/08/2010, 18:59   #2
 
elite*gold: 0
Join Date: Jun 2008
Posts: 1,452
Received Thanks: 389
Quote:
Originally Posted by djrapa View Post

This is a private Server?
Please take out the URl, in elitepvpers URL's to private Servers aren't allowed.

Nice Guide
ηoobeater is offline  
Old 11/09/2010, 02:17   #3
 
elite*gold: 3
Join Date: Jan 2010
Posts: 1,714
Received Thanks: 854
Nice Thank you.

@ Alle anderen wen ihr sie auf Deutsch haben wollt einfach hier das:

Code:
    <tr> 
        <th class="topLine">Lugar</th> 
        <th class="topLine">Gremio</th> 
        <th class="topLine">Nivel</th> 
        <th class="topLine">Lider</th> 
        <th class="topLine">Guerras ganadas</th> 
        <th class="topLine">Puntos</th> 
        <th class="topLine">Reino</th> 
    </tr>

gegen das aus Tauschen:

Code:
    <tr> 
        <th class="topLine">Platz</th> 
        <th class="topLine">Name</th> 
        <th class="topLine">Level</th> 
        <th class="topLine">Leder</th> 
        <th class="topLine">Gewonnene Schlachten</th> 
        <th class="topLine">Punkte</th> 
        <th class="topLine">Reich</th> 
    </tr>
ach hätte ich fast vergessen das hier:

Quote:
La búsqueda de Gremios sólo funciona con una entrada adecuada nombre. La búsqueda no es sensible a mayúsculas.
gegen das Tauschen:

Quote:
Die Gildensuche funktioniert nur bei richtiger Eingabe eines Namens. Die Suche ist nicht case sensitive.
dann noch das Suchen:

Quote:
Ranking de Gremios
und gegen das Tauschen:

Quote:
Gilden Rangliste

Für die ganz Faulen:
djrapa : una precunta tu eres Espaniol?
.Sh4rk is offline  
Thanks
3 Users
Old 11/09/2010, 02:57   #4
 
djrapa's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 49
Received Thanks: 25
@.Sh4rk
thank you very much for the translation, this perfect.
I'm from the country Chile, South America
djrapa is offline  
Thanks
1 User
Old 11/09/2010, 03:02   #5
 
elite*gold: 3
Join Date: Jan 2010
Posts: 1,714
Received Thanks: 854
Quote:
Originally Posted by djrapa View Post
@.Sh4rk
thank you very much for the translation, this perfect.
I'm from the country Chile, South America

No Problem for you all the Time ^^

But you Speak Spanisch?
Metinz is you Pserver?
.Sh4rk is offline  
Reply

Tags
djrapa, top guild


Similar Threads Similar Threads
[Release]MT2GS CMS 1.3 [13.09.2010]
12/22/2013 - Metin2 PServer Guides & Strategies - 806 Replies
Last Update: 04.09.2012 // Reup V1.3 + EN (without security fixes, compare to GER 1.3) Aufgrund diverser Umstände stelle ich (vorerst) die Weiterentwicklung des Scripts ein. Das aktuelle Script darf den eigenen Bedürfnissen angepasst werden und Inhalte des hier zur Verfügung gestellten Scripts für die eigene Entwicklung verwendet werden. Ich danke allen, die mich beim entwickeln des Scripts unterstützt haben. Reup des gesamten Script inkl. neuer Fixes/Überarbeitungen Download Full ...
MT2GS CMS Skript frage
09/15/2010 - Metin2 Private Server - 4 Replies
Hi habe vor kurzem über den BUG im MTGS Script erfahren der auch auf meinem server genutzt wird. Und deswegen habe ich eine frage Also wenn jemand sich mit meinem acc auf der hp einloggt kann er irgendwie an meine sicherheits frage ran das er meine daten verändern kann? Oder kann er nur auf den acc zugreifen und daten zu verändern?ß Wenn man die daten änderbar sind könnte mir jemand ein tut machen oder so wie man die daten dann ändert?
[HowTo]Guild Wars: Prophecies CD Key 100% kostenlos
08/23/2010 - GW Guides & Templates - 7 Replies
*removed* von mir.
MT2GS CMS
08/21/2010 - Metin2 Private Server - 4 Replies
Hallo benütze die hp mt2gs cms system nun wenn ich im IS Shop kaufe kommt folgendes Duplicate entry '4294967295' for key 'PRIMARY' wie kann ich das machen das es wieder funktioniert
MT2GS CMS 1.0 Itemshop
05/30/2010 - Metin2 Private Server - 5 Replies
hallo wieso kriegt man keine sachen ins is lager wenn man auf kaufen geht ? das erste item was macht kauft kommt ins is lager aber danach kommt nix mehr ins lager



All times are GMT +2. The time now is 10:35.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.