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

Guests: 15

185.136.x.x signup
207.46.x.x forum
3.80.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 dilbertplus
46.229.x.x forum
46.229.x.x forum
54.36.x.x forum
78.46.x.x dilbertplus

Last Seen

85filip58 Tue 15:15
4Rsercom Thu 21:49
Apophis01 Fri 10:15
Bommel Wed 09:39
frob Sat 21:14

Newest Members

Forums
LGSL - Server info to open in new window
IXL
Thu Sep 08 2011, 06:01AM
Posts: 37
Joined: Sun Aug 15 2010, 03:01PM
Registered Member #6222
Hi.

I have been using the LGSL now for years and this newer release is just great ( thanks Rich ).

One question I have though is the server info. For example my site here ( http://www.teamgamers.co.uk ) shows small summarys and the map image for each server, but when a user clicks the server the info of the server, for example players list, server cvars etc etc open in the same page, I was wondering if its possible to set this so if a user clicks it, it opens a new window?

If anyone can help it would be great.
KIKOFF
Thu Sep 08 2011, 06:59AM

Posts: 132
Joined: Thu Nov 18 2010, 08:18AM
Registered Member #6411
IXL wrote ...

Hi.

I have been using the LGSL now for years and this newer release is just great ( thanks Rich ).

One question I have though is the server info. For example my site here ( http://www.teamgamers.co.uk ) shows small summarys and the map image for each server, but when a user clicks the server the info of the server, for example players list, server cvars etc etc open in the same page, I was wondering if its possible to set this so if a user clicks it, it opens a new window?

If anyone can help it would be great.

Thanks


In zone.php add " target='_blank' " to the link....


Lo cortez, no quita lo valiente... ahhh... yes e107 Rock
IXL
Thu Sep 08 2011, 07:27AM
Posts: 37
Joined: Sun Aug 15 2010, 03:01PM
Registered Member #6222
Thanks for the reply.

I assume you really mean lgsl_zone.php ? Im using the standalone version.

Im not very sure "where" I should put this code. Which link do you mean and on which line. There are 148 lines of php code and I see no links in this file you describe.

Thanks.
IXL
Thu Sep 08 2011, 07:34AM
Posts: 37
Joined: Sun Aug 15 2010, 03:01PM
Registered Member #6222
Here is the lgls_zone.php file from the latest standalone version. I just had hoped that it might be a setting in the config.

<?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)    |
 |                                                                                                            |
 \-----------------------------------------------------------------------------------------------------------*/

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

  
global $lgsl_config$lgsl_zone_number;

  if (!isset(
$lgsl_zone_number)) { exit("LGSL PROBLEM: $lgsl_zone_number NOT SET"); }

  require 
"lgsl_class.php";

  
$zone_width $lgsl_config['zone']['width']."px";
  
$zone_grid  = isset($lgsl_config['grid'][$lgsl_zone_number]) ? $lgsl_config['grid'][$lgsl_zone_number] : 1;
  
$zone_count 0;

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

  
$request     = empty($lgsl_config['players'][$lgsl_zone_number]) ? "s" "sp";
  
$server_list lgsl_query_group( array( "request"=>$request"zone"=>$lgsl_zone_number ) );
  
$server_list lgsl_sort_servers($server_list);

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

  
if (!$server_list)
  {
    
$output .= "<div style='margin:auto; text-align:center'>NO SERVERS IN ZONE {$lgsl_zone_number}</div>"; return;
  }

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

  
$output .= "
  <table cellpadding='0' cellspacing='0' style='width:100%; margin:auto; text-align:center'>
    <tr>"
;

    foreach (
$server_list as $key => $server)
    {
      
$server lgsl_sort_players($server);
      
$misc   lgsl_server_misc($server);
      
$server lgsl_server_html($server);

//------------------------------------------------------------------------------------------------------------+
      
if ($zone_count != && !($zone_count $zone_grid))
      {
        
$output .= "
        </tr>
        <tr>"
;
      }

      
$zone_count ++;
//------------------------------------------------------------------------------------------------------------+

      
$output .= "
      <td style='padding-top:5px; padding-bottom:5px; vertical-align:top; text-align:center'>

        <table style='width:
{$zone_width}; margin:auto; text-align:center' cellpadding='0' cellspacing='2'>

          <tr>
            <td title='
{$lgsl_config['text']['slk']}' style='padding:0px; text-align:center'>
              <div style='left:0px; right:0px; top:0px; bottom:0px; width:
{$zone_width}; white-space:nowrap; overflow:hidden; text-align:center'>
                <a href='
{$misc['software_link']}' style='text-decoration:none'>
                  
{$server['b']['ip']}:{$server['b']['c_port']}
                </a>
              </div>
            </td>
          </tr>

          <tr>
            <td title='
{$server['s']['name']}' style='padding:0px; text-align:center'>
              <div style='left:0px; right:0px; top:0px; bottom:0px; width:
{$zone_width}; white-space:nowrap; overflow:hidden; text-align:center'>
                
{$misc['name_filtered']}
              </div>
            </td>
          </tr>

          <tr>
            <td style='padding:0px; text-align:center'>
              <div style='left:0px; right:0px; top:0px; bottom:0px; width:
{$zone_width}; padding:0px; position:relative'>
                <a href='"
.lgsl_link($server['o']['id'])."'>
                  <img alt='' src='
{$misc['image_map']}'          title='{$lgsl_config['text']['vsd']}' style='border:none; vertical-align:middle' />
                  <img alt='' src='
{$misc['image_map_password']}' title='{$lgsl_config['text']['vsd']}' style='border:none; position:absolute; z-index:2; top:0px; left:0px;' />
                  <img alt='' src='
{$misc['icon_game']}'          title='{$misc['text_type_game']}'     style='border:none; position:absolute; z-index:2; top:4px; left:4px;' />
                  <img alt='' src='
{$misc['icon_location']}'      title='{$misc['text_location']}'      style='border:none; position:absolute; z-index:2; top:4px; right:4px;' />
                </a>
              </div>
            </td>
          </tr>

          <tr>
            <td title='
{$server['s']['map']}' style='padding:0px; text-align:center'>
              <div style='left:0px; right:0px; top:0px; bottom:0px; width:
{$zone_width}; white-space:nowrap; overflow:hidden; text-align:center'>
                
{$server['s']['map']}
              </div>
            </td>
          </tr>"
;

        if (
$server['p'] && $lgsl_config['players'][$lgsl_zone_number])
        {
          
$zone_height $lgsl_config['zone']['line_size'] * (count($server['p']) + 2);
          
$zone_height $zone_height $lgsl_config['zone']['height'] ? "{$lgsl_config['zone']['height']}px" "{$zone_height}px";

          
$output .= "
          <tr>
            <td style='padding:0px; border:1px solid'>
              <div style='left:0px; right:0px; top:0px; bottom:0px; width:
{$zone_width}; height:{$zone_height}; overflow:auto; text-align:left'>
                <span style='padding:1px; float:left'> 
{$lgsl_config['text']['zpl']} </span>
                <span style='padding:1px; float:right'> 
{$server['s']['players']} / {$server['s']['playersmax']} </span>
                <br />
                <br />"
;

                foreach (
$server['p'] as $player)
                {
                  
$output .= "
                  <div style='left:0px; right:0px; top:0px; bottom:0px; padding:1px; white-space:nowrap; overflow:hidden; text-align:left' title='
{$player['name']}'> {$player['name']} </div>";
                }

                
$output .= "
              </div>
            </td>
          </tr>"
;
        }
        else
        {
          
$output .= "
          <tr>
            <td style='padding:0px; border:1px solid'>
              <span style='padding:1px; float:left'> 
{$lgsl_config['text']['zpl']} </span>
              <span style='padding:1px; float:right'> 
{$server['s']['players']} / {$server['s']['playersmax']} </span>
            </td>
          </tr>"
;
        }

        
$output .= "
        </table>
      </td>"
;
    }

    
$output .= "
    </tr>
  </table>"
;

//------------------------------------------------------------------------------------------------------------+
KIKOFF
Thu Sep 08 2011, 07:53AM

Posts: 132
Joined: Thu Nov 18 2010, 08:18AM
Registered Member #6411

<a target='_blank' href='".lgsl_link($server['o']['id'])."'>


Lo cortez, no quita lo valiente... ahhh... yes e107 Rock
Dodgeitorelse
Thu Sep 08 2011, 05:15PM
Posts: 246
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
find
<tr>
            <td style='padding:0px; text-align:center'>
              <div style='left:0px; right:0px; top:0px; bottom:0px; width:{$zone_width}; padding:0px; position:relative'>
                <a href='".lgsl_link($server['o']['id'])."' target='blank'>
                  <img alt='' src='{$misc['image_map']}'          title='{$lgsl_config['text']['vsd']}' style='border:none; vertical-align:middle' />
                  <img alt='' src='{$misc['image_map_password']}' title='{$lgsl_config['text']['vsd']}' style='border:none; position:absolute; z-index:2; top:0px; left:0px;' />
                  <img alt='' src='{$misc['icon_game']}'          title='{$misc['text_type_game']}'     style='border:none; position:absolute; z-index:2; top:4px; left:4px;' />
                  <img alt='' src='{$misc['icon_location']}'      title='{$misc['text_location']}'      style='border:none; position:absolute; z-index:2; top:4px; right:4px;' />
                </a>
              </div>
            </td>
          </tr>
and copy the target="blank' part in the 3rd line

lack of effort on your part requires less effort on my part
Website
IXL
Fri Sep 09 2011, 04:53AM
Posts: 37
Joined: Sun Aug 15 2010, 03:01PM
Registered Member #6222
Thanks Dodgeitorelse. Thats very helpful. I will try that. Thanks again.

IXL
KIKOFF
Fri Sep 09 2011, 06:07AM

Posts: 132
Joined: Thu Nov 18 2010, 08:18AM
Registered Member #6411
Well, question 1.
How many links are in the code?... answer: 2
Well, question 2.
How many links are in the code with href = '". Lgsl_link ($ server [' o '] [' id'])."'?... answer: 1

No offense, how difficult is it?

Saludos, KIKOFF

Lo cortez, no quita lo valiente... ahhh... yes e107 Rock
Dodgeitorelse
Fri Sep 09 2011, 03:36PM
Posts: 246
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
My apologies Kickoff, didn't mean to overstep your reply.

lack of effort on your part requires less effort on my part
Website
KIKOFF
Sun Sep 11 2011, 04:21AM

Posts: 132
Joined: Thu Nov 18 2010, 08:18AM
Registered Member #6411
Don't worry Dodge, nothing happens...

@IXL, I recommend you remove noRightClick. Is obsolete, not work at all and is bad for attracting new users to your website...

Lo cortez, no quita lo valiente... ahhh... yes e107 Rock
IXL
Tue Sep 13 2011, 03:46PM
Posts: 37
Joined: Sun Aug 15 2010, 03:01PM
Registered Member #6222
@ Kikoff, it might of helped if you were accurate with what file name you suggested had the code in it, that needed the change in the first place. Its the reason I posted the code so it was comparable to check.

Secondly, Get off your box for goodness sake and grow up, your sarcasm is unjust and unnecessary. I asked in a polite way and constuctive manor. Also perhaps keep your advise on something unrelated, I didnt ask for that. It does exactly what I needed it to. It has no bearing on what I was asking. At least someone like Dodgeitorelse is mature enough to give an adult constructive response.

I admit I didnt see the href at the time of posting, but crikey, ease up on the flaming !

Thank you.

KIKOFF
Tue Sep 13 2011, 04:00PM

Posts: 132
Joined: Thu Nov 18 2010, 08:18AM
Registered Member #6411
IXL wrote ...

@ Kikoff, it might of helped if you were accurate with what file name you suggested had the code in it, that needed the change in the first place. Its the reason I posted the code so it was comparable to check.

Secondly, Get off your box for goodness sake and grow up, your sarcasm is unjust and unnecessary. I asked in a polite way and constuctive manor. Also perhaps keep your advise on something unrelated, I didnt ask for that. It does exactly what I needed it to. It has no bearing on what I was asking. At least someone like Dodgeitorelse is mature enough to give an adult constructive response.

Thank you.




Well, forgive me for my forgetting, is right... is lgsl_zone.php. But there is only one file calling zone ... is evident
I have only one advice. I dont force anything... And i dont go into a discussion of immature.

KIKOFF


Lo cortez, no quita lo valiente... ahhh... yes e107 Rock
IXL
Tue Sep 13 2011, 04:05PM
Posts: 37
Joined: Sun Aug 15 2010, 03:01PM
Registered Member #6222
1, Its not evident if you dont open every version and compare !
2, You can have more than one zone.

Anyway, I got there in the end, shame it had to resort to this.

IXL
 

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