Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 16

125.214.x.x forum
174.23.x.x news
185.125.x.x signup
216.244.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.4.x.x forum
54.234.x.x forum
66.249.x.x user
78.46.x.x forum

Last Seen

mrstipfan Wed 19:48
Gagi2 Mon 16:30
EFiNST0RM Sun 15:39
85filip58 Sun 12:14
brlight Tue 04:18

Newest Members

Forums
LGSL ZONE
Mo45
Sat Jun 26 2010, 04:05AM

Posts: 43
Joined: Mon Aug 24 2009, 04:08PM
Registered Member #5372
Hello! Please help me with this:

I need to show VIP when lgsl zone is = 5.
When zone is different then 5 show server rating.

I'm try to use this:
<?php
if ($lgsl_zone_number 5)
  echo(
$output "VIP");
else
  echo(
$output "{$server['rating']}");
?>

But it dont work, can someone help me?

Or If zone = 5 show image, if zone is different then 5 do not show anything.

Website
Flesh
Sat Jun 26 2010, 03:31PM

Posts: 63
Joined: Mon Oct 19 2009, 07:16AM
Registered Member #5495
<?php
if ($lgsl_zone_number = 5)
echo($servratingt = "VIP");
else
echo($servrating = "{$server['rating']}");
?>

Insert a variable $servrating there where хочеш to see a rating

Website
Rich
Sat Jun 26 2010, 04:22PM
Posts: 1717
Joined: Wed Nov 26 2003, 04:30PM

Comparing should be == not =
You need to append to $output, not echo.


if ($lgsl_zone_number == 5)
{
  $output .= "VIP";
}
else
{
  $output .= "{$server['rating']}";
}

Website
Mo45
Sun Jun 27 2010, 01:57AM

Posts: 43
Joined: Mon Aug 24 2009, 04:08PM
Registered Member #5372
i dont understand where i must put this code.
In lgsl_list, or in lgsl_zone. ? Because when i'm put it into lgsl_list something broke and i dont see my list.

I put it into lgsl_list:
if ($lgsl_zone_number == 5) 
  { 
    $rate .= "VIP"; 
  } 
  else 
  { 
    $rate .= "{$server['rating']}"; 
  }


abd paste this in place where rating or VIP must showing :
{$rate}


Website
Flesh
Sun Jun 27 2010, 03:03AM

Posts: 63
Joined: Mon Oct 19 2009, 07:16AM
Registered Member #5495
Give me files lgsl_list.php and lgsl_detalis.php
And I to you will make

Website
Rich
Sun Jun 27 2010, 04:32AM
Posts: 1717
Joined: Wed Nov 26 2003, 04:30PM

Where do you want VIP to be shown ?

If it is a side block, then you need to edit lgsl_zone.php
Website
Mo45
Sun Jun 27 2010, 05:26AM

Posts: 43
Joined: Mon Aug 24 2009, 04:08PM
Registered Member #5372

http://servers.hl2.com.ua/tf2/

When zone of server is 5 show VIP bage, or image. When zone is not 5, show rating of server.
This is lgsl_list:
<?php

 
/*----------------------------------------------------------------------------------------------------------\
 |                                                                                                            |
 |                      [ LIVE GAME SERVER LIST ] [ © RICHARD PERRY FROM GREYCUBE.COM ]                       |
 |                                                                                                            |
 |    Released under the terms and conditions of the GNU General Public License Version 3 (http://gnu.org)    |
 |                                                                                                            |
 |-------------------------------------------------------------------------------------------------------------
 |        [ EDITOR STYLE SETTINGS: LUCIDA CONSOLE, SIZE 10, TAB = 2 SPACES, BOLD GLOBALLY TURNED OFF ]        |
 \-----------------------------------------------------------------------------------------------------------*/

//------------------------------------------------------------------------------------------------------------+

  
require "lgsl_class.php";

  
$server_list lgsl_query_cached_all("s");
  
$server_list lgsl_sort_servers($server_list);
  
$misc   lgsl_server_misc($server);
  
  
//------------------------------------------------------------------------------------------------------------+

  
if ($lgsl_config['list']['totals'])
  {
    
$total lgsl_cached_totals();

    
$output .= "
    <div style='text-align:center'>
      <table cellpadding='4' cellspacing='4' style='margin:auto'>
                <tr class='body-content'>
          <td colspan='3'>Украинские сервера <a href='http://servers.hl2.com.ua/tf2/'>Team Fortress 2</a></td>
        </tr>
        <tr class='body-content'>
          <td> Серверов в мониторинге: 
{$total['servers']}</td>
          <td> Игроков онлайн сейчас: 
{$total['players']}</td>
          <td> Игроков онлайн максимум: 
{$total['playersmax']} </td>
        </tr>
      </table><div>
      <br>
      <br>
      </div>
    </div>"
;
  }

//------------------------------------------------------------------------------------------------------------+
$output .= "
<div style='text-align:center; font-size:10px; font-face:arial'>
<table cellpadding='4' cellspacing='2' style='margin:auto' border='0'>"
;

foreach (
$server_list as $server)
    {
      
$misc   lgsl_server_misc($server);
      
$server lgsl_server_html($server);

      
$output .= "
    <tr class='body-content'>
    <td align='center'>
            <img alt='UA' src='http://servers.hl2.com.ua/img/ua.png' style='border:none' title='Сервер расположен в UA-IX Зоне' />
          </td>
    <td title='Страница сервера 
{$server['s']['name']}' align='center'><div style='width:100%; overflow:hidden; height:1.3em'>
          <a href='"
.lgsl_link($server['o']['id'])."'>{$misc['name_filtered']}</a>
          </div></td>
    <td align='center'><a href='http://www.google.com/search?q=
{$server['s']['map']}' title='Google It!' target='_blank'>{$server['s']['map']}</a></td>
    <td align='center'>Рейтинг:</td>
    <td align='center' rowspan='2'><img src='
{$misc['image_map']}' width='65' height='60' title='{$server['s']['map']}' />
          
        </td>
    <td align='center'><a href='rating.php?id=
{$server['o']['id']}&add=+1' title='Повысить рейтинг'><img src='http://servers.hl2.com.ua/images/plus.png' border='0'></a></td>
  </tr>
  <tr class='body-content'>
    <td align='center'><img alt='' src='
{$misc['icon_status']}' title='{$misc['text_status']}' /></td>
    <td title='
{$lgsl_config['text']['slk']} к серверу' align='center'><font size='2'><a href='{$misc['software_link']}' style='text-decoration:none'><img src='http://servers.hl2.com.ua/images/steam.ico' border='0' align='texttop'>
            
{$server['b']['ip']}:{$server['b']['c_port']}
          </a> [<a href='http://whatismyipaddress.com/ip/
{$server['b']['ip']}#General-IP-Information' title='Подробная информация об IP-Адресе' target='_blank'>?</a>]</font></td>
    <td align='center'>Игроки: 
{$server['s']['players']} / {$server['s']['playersmax']}</td>
//// VIP BAGE MUST SHOWN BELOW ///
    <td align='center' title='Общий рейтинг'><font size='5'>
{$server['rating']}</font></td>
//// VIP BAGE MUST SHOWN ABOVE ///
    <td align='center'><a href='rating.php?id=
{$server['o']['id']}&add=-1' title='Понизить рейтинг'><img src='http://servers.hl2.com.ua/images/minus.png' border='0'></a></td>
  </tr>
  <tr class='body-content'>
    <td align='center' colspan='6'><img src='http://servers.hl2.com.ua/tf2/img/hr.png'></td>
  </tr>"
;
    }

    
$output .= "
</table>


   </table>
  </div>
  <div>
      <br>
      <br>
      </div>"
;
?>





{$server['rating']} - show current rating of server

Website
Rich
Sun Jun 27 2010, 06:02AM
Posts: 1717
Joined: Wed Nov 26 2003, 04:30PM


<td align='center' title='Общий рейтинг'><font size='5'>{$server['rating']}</font></td>


To


<td align='center' title='Общий рейтинг'>";
if ($lgsl_zone_number == 5)
{
  $output .= "VIP";
}
else
{
  $output .= "{$server['rating']}";

$output .= "</td>

Website
Mo45
Sun Jun 27 2010, 06:07AM

Posts: 43
Joined: Mon Aug 24 2009, 04:08PM
Registered Member #5372
don't work

Website
Flesh
Sun Jun 27 2010, 06:21AM

Posts: 63
Joined: Mon Oct 19 2009, 07:16AM
Registered Member #5495
<?php

 
/*----------------------------------------------------------------------------------------------------------\
 |                                                                                                            |
 |                      [ LIVE GAME SERVER LIST ] [ © RICHARD PERRY FROM GREYCUBE.COM ]                       |
 |                                                                                                            |
 |    Released under the terms and conditions of the GNU General Public License Version 3 (http://gnu.org)    |
 |                                                                                                            |
 |-------------------------------------------------------------------------------------------------------------
 |        [ EDITOR STYLE SETTINGS: LUCIDA CONSOLE, SIZE 10, TAB = 2 SPACES, BOLD GLOBALLY TURNED OFF ]        |
 \-----------------------------------------------------------------------------------------------------------*/

//------------------------------------------------------------------------------------------------------------+

  
require "lgsl_class.php";

  
$server_list lgsl_query_cached_all("s");
  
$server_list lgsl_sort_servers($server_list);
  
$misc   lgsl_server_misc($server);
  
  
//------------------------------------------------------------------------------------------------------------+

  
if ($lgsl_config['list']['totals'])
  {
    
$total lgsl_cached_totals();

    
$output .= "
    <div style='text-align:center'>
      <table cellpadding='4' cellspacing='4' style='margin:auto'>
                <tr class='body-content'>
          <td colspan='3'>Украинские сервера <a href='http://servers.hl2.com.ua/tf2/'>Team Fortress 2</a></td>
        </tr>
        <tr class='body-content'>
          <td> Серверов в мониторинге: 
{$total['servers']}</td>
          <td> Игроков онлайн сейчас: 
{$total['players']}</td>
          <td> Игроков онлайн максимум: 
{$total['playersmax']} </td>
        </tr>
      </table><div>
      <br>
      <br>
      </div>
    </div>"
;
  }

//------------------------------------------------------------------------------------------------------------+
$output .= "
<div style='text-align:center; font-size:10px; font-face:arial'>
<table cellpadding='4' cellspacing='2' style='margin:auto' border='0'>"
;

foreach (
$server_list as $server)
    {
      
$misc   lgsl_server_misc($server);
      
$server lgsl_server_html($server);

if (
$lgsl_zone_number 5){
$servrating "VIP";}
else {
$servrating "{$server['rating']}";}

      
$output .= "
    <tr class='body-content'>
    <td align='center'>
            <img alt='UA' src='http://servers.hl2.com.ua/img/ua.png' style='border:none' title='Сервер расположен в UA-IX Зоне' />
          </td>
    <td title='Страница сервера 
{$server['s']['name']}' align='center'><div style='width:100%; overflow:hidden; height:1.3em'>
          <a href='"
.lgsl_link($server['o']['id'])."'>{$misc['name_filtered']}</a>
          </div></td>
    <td align='center'><a href='http://www.google.com/search?q=
{$server['s']['map']}' title='Google It!' target='_blank'>{$server['s']['map']}</a></td>
    <td align='center'>Рейтинг:</td>
    <td align='center' rowspan='2'><img src='
{$misc['image_map']}' width='65' height='60' title='{$server['s']['map']}' />
          
        </td>
    <td align='center'><a href='rating.php?id=
{$server['o']['id']}&add=+1' title='Повысить рейтинг'><img src='http://servers.hl2.com.ua/images/plus.png' border='0'></a></td>
  </tr>
  <tr class='body-content'>
    <td align='center'><img alt='' src='
{$misc['icon_status']}' title='{$misc['text_status']}' /></td>
    <td title='
{$lgsl_config['text']['slk']} к серверу' align='center'><font size='2'><a href='{$misc['software_link']}' style='text-decoration:none'><img src='http://servers.hl2.com.ua/images/steam.ico' border='0' align='texttop'>
            
{$server['b']['ip']}:{$server['b']['c_port']}
          </a> [<a href='http://whatismyipaddress.com/ip/
{$server['b']['ip']}#General-IP-Information' title='Подробная информация об IP-Адресе' target='_blank'>?</a>]</font></td>
    <td align='center'>Игроки: 
{$server['s']['players']} / {$server['s']['playersmax']}</td>
//// VIP BAGE MUST SHOWN BELOW ///
    <td align='center' title='Общий рейтинг'><font size='5'>"
.$servrating."</font></td>
//// VIP BAGE MUST SHOWN ABOVE ///
    <td align='center'><a href='rating.php?id=
{$server['o']['id']}&add=-1' title='Понизить рейтинг'><img src='http://servers.hl2.com.ua/images/minus.png' border='0'></a></td>
  </tr>
  <tr class='body-content'>
    <td align='center' colspan='6'><img src='http://servers.hl2.com.ua/tf2/img/hr.png'></td>
  </tr>"
;
    }

    
$output .= "
</table>


   </table>
  </div>
  <div>
      <br>
      <br>
      </div>"
;
?> 


Website
Flesh
Sun Jun 27 2010, 06:35AM

Posts: 63
Joined: Mon Oct 19 2009, 07:16AM
Registered Member #5495
Дай ICQ

Website
Mo45
Sun Jun 27 2010, 06:35AM

Posts: 43
Joined: Mon Aug 24 2009, 04:08PM
Registered Member #5372
4two5oneone3999

Website
Rich
Sun Jun 27 2010, 06:48AM
Posts: 1717
Joined: Wed Nov 26 2003, 04:30PM

If a forum post contains a large number of links, it requires my approval before it can be seen by other people.
Website
Mo45
Sun Jun 27 2010, 07:37AM

Posts: 43
Joined: Mon Aug 24 2009, 04:08PM
Registered Member #5372
ok. Flesh is hepled my in ICQ. Thank you both !

Website
Megastyle
Sun Jun 27 2010, 10:04AM

Posts: 14
Joined: Thu Oct 01 2009, 09:59PM
Registered Member #5458
Rich wrote ...


<td align='center' title='Общий рейтинг'><font size='5'>{$server['rating']}</font></td>


To


<td align='center' title='Общий рейтинг'>";
if ($lgsl_zone_number == 5)
{
  $output .= "VIP";
}
else
{
  $output .= "{$server['rating']}";

$output .= "</td>



Hi gùys!
This is not working.
Website
Flesh
Sun Jun 27 2010, 10:06AM

Posts: 63
Joined: Mon Oct 19 2009, 07:16AM
Registered Member #5495
Already function the VIP have made

Website
Megastyle
Sun Jun 27 2010, 10:12AM

Posts: 14
Joined: Thu Oct 01 2009, 09:59PM
Registered Member #5458
please post working code
Website
Megastyle
Thu Jul 08 2010, 03:49PM

Posts: 14
Joined: Thu Oct 01 2009, 09:59PM
Registered Member #5458
Mo45 http://servers.hl2.com.ua/tf2/
Please tell me how u do vip function with zones?
Website
likrion
Tue Aug 02 2011, 10:30AM
Posts: 4
Joined: Sat Jul 30 2011, 05:49PM
Registered Member #6850
lgsl_list.php



        <td style='white-space:nowrap; text-align:center'>

".($server['o']['zone'] == "5" ? "VIP" : "0" )."

        </td>

abc123456
Sat May 26 2018, 03:28AM
Posts: 102
Joined: Sat May 26 2018, 03:12AM
Registered Member #8888
[ REQUIRES ADMIN APPROVAL ]
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org