The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
hi all, I posted this on vbulletin.com as well but was hoping some of you modders out there may have an idea
on my site: http://www.knightsofkarbala.com I run I have a custom server script (phgstats) that shows all my servers. After i upgraded to vbulletin 3.7.0 it no longer displays. I had some help from a friend that knows php and we used the vbulletin plugin system to write the following: Code:
ob_start(); // get data of server function info_n($phgdir, $sh_srv, $game, $host, $port, $queryport) { // create server the object $phgstats_n = phgstats_n::query($game[$sh_srv]); // get the serverinfo string $server = $phgstats_n->getstream($host[$sh_srv], $port[$sh_srv], $queryport[$sh_srv]); if ($server === true) { // get the server rules $srv_rules = $phgstats_n->getrules($phgdir); $srv_rules['playerlist'] = $phgstats_n->getplayers(); // full path to the map picture $srv_rules['map'] = $phgdir . $srv_rules['map_path'] . '/' . $srv_rules['mapname'] . '.jpg'; $srv_rules['fullmappath'] = PHGDIR . $srv_rules['map_path'] . '/' . $srv_rules['mapname'] . '.jpg'; if (!(file_exists($srv_rules['fullmappath']))) { // set default map if no picture found $srv_rules['map'] = $phgdir . $srv_rules['map_path'] . '/' . $srv_rules['map_default']; } } else { // default values if no response $msg = 'No Response'; $srv_rules['playerlist'] = ''; $srv_rules['hostname'] = $msg; $srv_rules['gamename'] = $msg . "<br>"; $srv_rules['map'] = $phgdir . 'maps/no_response.jpg'; $srv_rules['mapname'] = 'no response'; $srv_rules['sets'] = '-'; $srv_rules['htmlinfo'] = '<tr valign="top"><td align="left">No</td><td align="left">Response</td></tr>' . "\n"; $srv_rules['htmldetail'] = '<tr valign="top"><td align="left">No</td><td align="left">Response</td></tr>' . "\n"; } // get server adress $srv_rules['adress'] = $host[$sh_srv] . ':' . $port[$sh_srv]; return $srv_rules; } // show the data of two or more server function srv_list_n ($sh_srv, $srv_rules, $use_file) { // html: map picture echo '' . "\n" . '<link href="http://www.knightsofkarbala.com/modules/Phgstats/includes/stylephg.css" rel="stylesheet" type="text/css" />' . '<td class="tableblock" align="center">' . '<a href="./index.php?name=Server' . $sh_srv . '">' . '<img height="100" width="120" src="' . $srv_rules['map'] . '" border="0" alt="' . $srv_rules['mapname'] . '" title="' . $srv_rules['mapname'] . '"><br></a>' . "\n"; // html: server ip and gamename echo '' . '<br><span style="color: #FFFFFF; background-color: #000000;">' . $srv_rules['hostname'] . '</span>' . '<br>' . $srv_rules['gamename'] . '<br>' . '<br>' . "\n"; // html: server details table echo '<table width="170" border="0" cellpadding="3" cellspacing="0">' . "\n" . $srv_rules['ip'] . $srv_rules['adress'] . $srv_rules['players'] . '<a href="../index.php?name=Server' . $sh_srv . '">' . $srv_rules['players2'] . '</a>' . $srv_rules['htmlinfo'] . "\n"; if ($srv_rules['join'] !='') { echo $srv_rules['join'] . $srv_rules['adress'] . $srv_rules['join2'] .'' . "\n"; } echo '</table>' . "\n" . "\n"; echo '</td>' . "\n"; } if(defined('SHOW_GAME_SERVERS')){ define('PHGDIR', '/home/knigh6/public_html/modules/Phgstats/'); include_once(PHGDIR . 'settings/config_n.inc.php'); // phgstats configuration include_once(PHGDIR . 'classes/phgstats_n.class.php'); // main phgstats class $gameserver_n_old = $gameserver_n; for ($i = (count($gameserver_n_old) - 1), $k = 0; $i >= 0; $i--, $k++) { $gameserver_n[$k] = $gameserver_n_old[$i]; } $phgdir = ('http://www.knightsofkarbala.com/modules/Phgstats/'); echo '<center>' . "\n"; // how much server must scan $index = count($gameserver_n); while($index) { $index--; list($game[$index], $host[$index], $port[$index], $queryport[$index]) = split(':', $gameserver_n[$index]); } { $sh_srv = count($host); // html: open table to show more server echo '<table class="page" border="0" width="945" cellpadding="2" cellspacing="2">' . "\n"; // html: gameserver list data while ($sh_srv) { $sh_srv--; $srv_rules = info_n($phgdir, $sh_srv, $game, $host, $port, $queryport); srv_list_n($sh_srv, $srv_rules, $use_file); flush(); } // html: close table with server info echo '</table>'; } echo '</center>'; } $server_contents = ob_get_contents(); ob_end_clean(); Again the problem started as soon as I upgraded to vbulletin 3.7.0 and the latest version of vbadvanced. any ideas on a fix? ps it also hooks on the vbulletin global_start |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|