Skip to content
View in the app

A better way to browse. Learn more.

OldStyle Gaming Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
  • Administrator

Tutorial realizat pe Metin2CMS V2.11

 

Mergem în include\sidebar\ranking.php
Căutăm:

<div class="col-md-4 top-inline top-inline-empire"><img src="<?php print $site_url; ?>images/empire/<?php print $empire=get_player_empire($player['account_id']); ?>.jpg" alt="<?php print emire_name($empire); ?>" title="<?php print emire_name($empire); ?>"></div>
Înlocuim cu:
<div class="col-md-4 top-inline top-inline-empire"><?php print $player['playtime']; ?><?php print $player['name']; ?></div>
Căutăm:
<div class="col-md-4 top-inline top-inline-empire"><img src="<?php print $site_url; ?>images/empire/<?php print $empire=get_guild_empire($guild['master']); ?>.jpg" alt="<?php print emire_name($empire); ?>" title="<?php print emire_name($empire); ?>"/></div>
Înlocuim cu:
<div class="col-md-4 top-inline top-inline-empire"><?php print $guild['ladder_point']; ?></div>

 

Mergem în include\functions\basic.php

Căutăm:

function top10players()

Înlocuim toată funcția cu:

(am adaugat playtime si order)

function top10players()
   {
      global $database;
      
      $banned_ids = getBannedAccounts();
      if($banned_ids)
         $stmt = $database->runQueryPlayer("SELECT id, name, account_id, playtime FROM player WHERE name NOT LIKE '[%]%' AND account_id NOT IN (".$banned_ids.") ORDER BY level DESC, exp DESC, playtime DESC, name ASC limit 5");
      else
         $stmt = $database->runQueryPlayer("SELECT id, name, account_id, playtime FROM player WHERE name NOT LIKE '[%]%' ORDER BY level DESC, exp DESC, playtime DESC, name ASC limit 5");
      $stmt->execute();
      $top = $stmt->fetchAll();
      
      return $top;
   }

Căutăm:

function top10guilds()

Înlocuim toată funcția cu:

(am adaugat leadder_points si order)

function top10guilds()
   {
      global $database;
      
      $stmt = $database->runQueryPlayer("SELECT name, master, ladder_point FROM guild WHERE name NOT LIKE '[%]%' ORDER BY level DESC, ladder_point DESC, exp DESC, name ASC limit 5");
      $stmt->execute();
      $top = $stmt->fetchAll();
      
      return $top;
   }

TREBUIE SA ARATE ASA

ClWvRZq.png

 

Acum trebuie sa editam si paginile ranking/players si ranking/guilds

 

Mergem în /pages/players.php

 

Căutăm: <tbody>

Înlocuim toată funcția cu:

(am adaugat playtime si order)

<?php 
  $banned_ids = getBannedAccounts();
  $records_per_page=15;
  
  if(isset($search))
  {
    if($banned_ids)
      $query = "SELECT id, name, account_id, level, exp, playtime FROM player WHERE name NOT LIKE '[%]%' AND account_id NOT IN (".$banned_ids.") AND name LIKE :search ORDER BY playtime DESC, exp DESC, level DESC, name ASC";
    else
      $query = "SELECT id, name, account_id, level, exp, playtime FROM player WHERE name NOT LIKE '[%]%' AND name LIKE :search ORDER BY playtime DESC, exp DESC, level DESC, name ASC";
    $newquery = $paginate->paging($query,$records_per_page);
    $paginate->dataview($newquery, $search);
  } else {
    if($banned_ids)
      $query = "SELECT id, name, account_id, level, exp, playtime FROM player WHERE name NOT LIKE '[%]%' AND account_id NOT IN (".$banned_ids.") ORDER BY playtime DESC, exp DESC, level DESC, name ASC";
    else
      $query = "SELECT id, name, account_id, level, exp, playtime FROM player WHERE name NOT LIKE '[%]%' ORDER BY playtime DESC, exp DESC, level DESC, name ASC";
    $newquery = $paginate->paging($query,$records_per_page);
    $paginate->dataview($newquery);
  }
?>

Căutăm:

<thead class="thead-inverse">

Adăugăm o linie nouă:

<th>Timp</th>

Mergem în /pages/guilds.php

Căutăm: <tbody>

 

Înlocuim toată funcția cu:

(am adaugat leadder_points si order)

<?php   
  $records_per_page=10;

  if(isset($search))
  {
    $query = "SELECT id, name, master, level, ladder_point FROM guild WHERE name NOT LIKE '[%]%' AND name LIKE :search ORDER BY ladder_point DESC, level DESC, exp DESC, name ASC";
    $newquery = $paginate->paging($query,$records_per_page);
    $paginate->dataview($newquery, $search);
  } else {
    $query = "SELECT id, name, master, level, ladder_point FROM guild WHERE name NOT LIKE '[%]%' ORDER BY ladder_point DESC, level DESC, exp DESC, name ASC";
    $newquery = $paginate->paging($query,$records_per_page);
    $paginate->dataview($newquery);
  }
  
?>

 

Mergem în /include/classes/players.php

Căutăm:

<td><img src="<?php print $site_url; ?>images/empire/<?php print $empire=get_player_empire($row['account_id']); ?>.jpg" alt="<?php print emire_name($empire); ?>" title="<?php print emire_name($empire); ?>"></td>

Adăugăm o linie nouă:

<td><?php print $row['playtime']; ?></td>

TREBUIE SA ARATE ASA

(eu am scos si nivelul din top la voi apare diferit)

7GC8bin.png

 

Daca ai o problema deschide un tichet.

Featured Replies

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.