RyanzRetros
Developer of ChakCMS
- Jan 14, 2015
- 978
- 182
Hello guys, I know a lot of you have been looking for the {server_ip}/{server_port} fix on hotels. Well I am here to explain how.
Thanks, RyanzRetros
Go to your class.template.php file, located in your app folder and look for these lines.
If they're not there, then add them BELOW hotelName
Then go to your config.php file and add this:
$_CONFIG['hotel']['server_ip'] = '127.0.0.1'; //Server IP; insert the proxy IP here. NEVER put your VPS IP here!!
$_CONFIG['hotel']['server_port'] = '30000'; //Server Port; insert the proxy/VPS's emulator port here.
Now replace 127.0.0.1 with your PROXY IP (never use your VPS IP as this allows people to DDoS the hotel).
Then replace 30000 with the PORT from your PROXY.
Last step is to replace your client.php file with the one below:
PHP:
$this->setParams('server_ip', $_CONFIG['hotel']['server_ip']);
$this->setParams('server_port', $_CONFIG['hotel']['server_port']);
If they're not there, then add them BELOW hotelName
Then go to your config.php file and add this:
$_CONFIG['hotel']['server_ip'] = '127.0.0.1'; //Server IP; insert the proxy IP here. NEVER put your VPS IP here!!
$_CONFIG['hotel']['server_port'] = '30000'; //Server Port; insert the proxy/VPS's emulator port here.
Now replace 127.0.0.1 with your PROXY IP (never use your VPS IP as this allows people to DDoS the hotel).
Then replace 30000 with the PORT from your PROXY.
Last step is to replace your client.php file with the one below:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{hotelName} - Client</title>
<link rel="stylesheet" href="/app/tpl/skins/{skin}/styles/client.css" type="text/css">
<script type="text/javascript" src="/app/tpl/skins/{skin}/js/swfobject.js"></script>
<script type="text/javascript">
var BaseUrl = "{swf_folder}";
var flashvars =
{
"client.starting" : "Please wait, {hotelName} is loading",
"client.allow.cross.domain" : "1",
"client.notify.cross.domain" : "0",
"connection.info.host" : "{server_ip}",
"connection.info.port" : "{server_port}",
"site.url" : "{url}",
"url.prefix" : "{url}",
"client.reload.url" : "{url}/client",
"client.fatal.error.url" : "{url}/me",
"client.connection.failed.url" : "{url}/me",
"external.variables.txt" : "{external_vars}",
"external.texts.txt" : "{external_texts}",
"productdata.load.url" : "{product_data}",
"furnidata.load.url" : "{furni_data}",
"use.sso.ticket" : "1",
"sso.ticket" : "{sso}",
"processlog.enabled" : "0",
"flash.client.url" : BaseUrl,
"flash.client.origin" : "popup"
};
var params =
{
"base" : BaseUrl + "/",
"allowScriptAccess" : "always",
"menu" : "false"
};
swfobject.embedSWF(BaseUrl + "/Habbo.swf", "client", "100%", "100%", "10.0.0", "{swf_folder}/expressInstall.swf", flashvars, params, null);
</script>
</head>
<body>
<div id="client"></div>
</body>
</html>