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

Guests: 18

144.76.x.x forum
157.55.x.x news
185.252.x.x forum
216.244.x.x dilbertplus
46.229.x.x dilbertplus
5.255.x.x user
54.36.x.x forum
54.36.x.x user
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.81.x.x forum
66.249.x.x forum
66.249.x.x forum
93.158.x.x forum

Last Seen

mrstipfan Tue 04:13
Dodgeitorelse Mon 19:28
haigiacmo06 Mon 05:48
85filip58 Sun 10:02
Wussie Sat 03:07

Newest Members

Forums
compact server block
wattz
Mon Dec 02 2013, 12:34AM
Posts: 16
Joined: Sun Oct 13 2013, 02:01AM
Registered Member #7821
Hi All ,wondered if some one could help me please ,i use xenforo currently for my forum board and want to intergrate the server list in a compact block which needs to imported via a xml,i have tried this so far and have had no luck at all could some point out a fix for me please to get it working ?

<?xml version="1.0" encoding="utf-8"?>
<block block_id="HtmlBlock" title="Html Block" version_string="1.0.0" version_id="1" url="" install_callback_class="" install_callback_method="" uninstall_callback_class="" uninstall_callback_method="" cache="now">
  <admin_templates/>
  <listeners/>
  <options/>
  <phrases/>
  <route_prefixes/>
  <templates>
    <template title="EWRblock_HtmlBlock"><![CDATA[<div class="section">
    <div class="secondaryContent" id="HtmlBlock">
        <h3>SERVER BROWSER</h3>
        <div>
          global $output, $lgsl_zone_number;
 $lgsl_zone_number = 1;
 $output = "";
 require "serverbrowser/lgsl_files/lgsl_zone.php";
 echo $output;
 unset($output);
        </div>
    </div>
</div>]]></template>
  </templates>
</block>
Wussie
Thu Dec 05 2013, 07:00PM

Posts: 436
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
If you want to use php code within xml (or html) markup you always need to enclose the php code between <?php and ?> tags, or it won't be interpreted as php code.

Furthermore, you need to do one of two things:
1. EITHER put your entire script in a file named whatever.php, which is probably impractical in your case, because xenforo needs it to be called whatever.xml
2. OR you need to instruct Apache to interpret all xml files as php scripts so your php code gets executed (you can do so with the AddType directive in mod_php.conf) assuming you have the necessary permissions.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
wattz
Mon Jan 06 2014, 03:36PM
Posts: 16
Joined: Sun Oct 13 2013, 02:01AM
Registered Member #7821
i gave up on the custom block for my xenporta , i ended up buying a addon that uses gameq but the addon itself is pretty crap tbh and im still trying to find some way to intergrate LGSL into my forum ,on the LGSL readme http://www.greycube.com/help/readme/lgsl/install-standalone/ it says
To integrate the list into an existing page: global $output; $output = ""; require "lgsl/lgsl_files/lgsl_list.php"; echo $output; unset($output);
i have made a new page within my forum but am having great trouble getting LGSL to show there im not very good at all at this sort of stuff and not sure exactly what it is i should be putting with this above code :/ i have tried

<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title>Live Game Server List</title>
    <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
    <meta http-equiv='content-style-type' content='text/css' />
    <link rel='stylesheet' href='lgsl_style.css' type='text/css' />
  </head>

  <body>
   <pre> <?php global $output;
 
$output "";
 require 
"http://www.fragzonegaming.co.uk/serverbrowser/lgsl_files/lgsl_list.php";
 echo 
$output;
 unset(
$output); ?></pre>
  </body>
</html>


http://prntscr.com/2h3s1i

i have also tried making a php file with this inside and putting it in my sites root directory

<?php global $output;
 
$output "";
 require 
"http://www.fragzonegaming.co.uk/serverbrowser/lgsl_files/lgsl_list.php";
 echo 
$output;
 unset(
$output); ?>


and then calling it in my forum page with

<html>
<body>

<?php include 'server.php'?>
<h1>Welcome to my home page!</h1>
<p>Some text.</p>

</body>
</html>


but i have had no luck with this and it still remains a blank page with no serverbrowser showing on my created page can anybody give me the code i should be putting into this page to make it show please ? Kind Regards Wattz
Wussie
Mon Jan 06 2014, 04:15PM

Posts: 436
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Your LGSL is actually working, check out http://www.fragzonegaming.co.uk/serverbrowser/.
The problem is the way you tried to integrate LGSL into your forum. XenPorta thinks your code is plain text and it just displays it on your page as it is, instead of interpreting the html and php code you wrote.

Forget about building a whole html page. All you need to do is figure out a way to make XenPorta execute the code between the <?php and ?> tags.
Look for a module that allows you to insert those lines of code and make sure they get interpreted as php code and not as plain text. There should be such a module builtin.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
wattz
Mon Jan 06 2014, 04:28PM
Posts: 16
Joined: Sun Oct 13 2013, 02:01AM
Registered Member #7821
Hi wussie thanks for the reply ,yeh i have had it working from that link for a while now i just dont like it like that i would prefer it to be intergrated much like http://blackpulse.us/servers.php?cache=1 have theres in a forum page ,i'll have a google for putting php into a xenforo html page at my wits end with it lol


*edit ive read now that xenforo wont parse php in a page without a add on ,is this what i should be looking for to get it to work do you think ? http://xenforo.com/community/resources/kotomi-generic-script-bridge.122/
Wussie
Mon Jan 06 2014, 05:05PM

Posts: 436
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Yes, I suppose you could try and use your php code instead of the functions for grouping members in that example.
I'm sure it can be done somehow.

P.S. Didn't you get any tech support for the money you spent on that commercial module?

Edit: That kotomi module seems to be what you need.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
wattz
Wed Jan 08 2014, 11:51AM
Posts: 16
Joined: Sun Oct 13 2013, 02:01AM
Registered Member #7821
managed to get it solved ,one of my friends is quite handy with code and got him to edit up my serverbrowser page http://www.fragzonegaming.co.uk/serverbrowser/ didnt end up using any addons for it in the end ,and no there wasnt any real support so to speak for the servers addon i bought ,i wont use it now looks a lot better this way ,thanks for any help thus far wussie greatly appreciated
abc123456
Sat May 26 2018, 03:19AM
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