Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[UberCMS]AutoUpdate WebBuild
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="jdude" data-source="post: 24801" data-attributes="member: 2476"><p>here is a nice little update for UberCMS - AutoUpdate WebBuild</p><p> </p><p>open class.core.php</p><p> </p><p>look for </p><p> </p><p> PHP Code:</p><p style="text-align: left"> [PHP]public static function GetMaintenanceStatus() </p> <p style="text-align: left"> { </p> <p style="text-align: left"> return mysql_result(dbquery("SELECT maintenance FROM site_config LIMIT 1"), 0); </p> <p style="text-align: left"> } [/PHP] </p><p></p><p>add under it</p><p> </p><p> PHP Code:</p><p style="text-align: left"> [PHP]public static function GetWebBuild() </p> <p style="text-align: left"> { </p> <p style="text-align: left"> return mysql_result(dbquery("SELECT webbuild FROM site_config LIMIT 1"), 0); </p> <p style="text-align: left"> } [/PHP] </p><p></p><p>open global.php</p><p> </p><p>search for</p><p> PHP Code:</p><p style="text-align: left"> [PHP]define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false)); [/PHP] </p><p></p><p>add under it</p><p> </p><p> PHP Code:</p><p style="text-align: left"> [PHP]define('WEBBUILD', uberCore::GetWebBuild()); [/PHP] </p><p></p><p>open class.tpl.php</p><p> </p><p>change</p><p> PHP Code:</p><p style="text-align: left"> [PHP]$this->SetParam('web_build', '50_e3801d20ad745cc86660598ea0c4bdf4/15'); (your build will be different) [/PHP] </p><p></p><p>to</p><p> PHP Code:</p><p style="text-align: left"> [PHP]$this->SetParam('web_build', WEBBUILD); [/PHP] </p><p></p><p>create a php file named WebBuild.php and put this in it.</p><p> PHP Code:</p><p style="text-align: left"> [PHP]<?php </p> <p style="text-align: left">if (!defined('UBER') || !UBER) </p> <p style="text-align: left">{ </p> <p style="text-align: left"> exit; </p> <p style="text-align: left">} </p> <p style="text-align: left">function get_between($input, $start, $end) </p> <p style="text-align: left">{ </p> <p style="text-align: left"> $substr = substr($input, strlen($start)+strpos($input, $start), (strlen($input) - strpos($input, $end))*(-1)); </p> <p style="text-align: left"> return $substr; </p> <p style="text-align: left">} </p> <p style="text-align: left">$content = file_get_contents('http://habbo.com/'); </p> <p style="text-align: left">$webbuild = get_between($content, "http://images.habbo.com/habboweb/", "/web-gallery"); </p> <p style="text-align: left">dbquery("UPDATE site_config SET webbuild = '$webbuild' "); </p> <p style="text-align: left">?>[/PHP] </p><p></p><p>save that file in inc/cron_scripts</p><p> </p><p>open your database and look for table site_config and add a column called webbuild</p><p> </p><p>now open table site_cron and add a row withe these values..</p><p>id = whatever is next (mine was 6)</p><p>prio = 6 (doesnt really matter)</p><p>enabled = 1</p><p>scriptfile = webbuild.php</p><p>last_exec = leave this blank</p><p>exec_every = 1200 (you can play with this value, i believe its in seconds)</p></blockquote><p></p>
[QUOTE="jdude, post: 24801, member: 2476"] here is a nice little update for UberCMS - AutoUpdate WebBuild open class.core.php look for PHP Code: [LEFT] [PHP]public static function GetMaintenanceStatus() { return mysql_result(dbquery("SELECT maintenance FROM site_config LIMIT 1"), 0); } [/PHP] [/LEFT] add under it PHP Code: [LEFT] [PHP]public static function GetWebBuild() { return mysql_result(dbquery("SELECT webbuild FROM site_config LIMIT 1"), 0); } [/PHP][COLOR=#000000][COLOR=#007700] [/COLOR] [/COLOR] [/LEFT] open global.php search for PHP Code: [LEFT] [PHP]define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false)); [/PHP][COLOR=#000000][COLOR=#007700] [/COLOR] [/COLOR] [/LEFT] add under it PHP Code: [LEFT] [PHP]define('WEBBUILD', uberCore::GetWebBuild()); [/PHP][COLOR=#000000][COLOR=#007700] [/COLOR] [/COLOR] [/LEFT] open class.tpl.php change PHP Code: [LEFT] [PHP]$this->SetParam('web_build', '50_e3801d20ad745cc86660598ea0c4bdf4/15'); (your build will be different) [/PHP][COLOR=#000000][COLOR=#007700] [/COLOR] [/COLOR] [/LEFT] to PHP Code: [LEFT] [PHP]$this->SetParam('web_build', WEBBUILD); [/PHP][COLOR=#000000][COLOR=#007700] [/COLOR] [/COLOR] [/LEFT] create a php file named WebBuild.php and put this in it. PHP Code: [LEFT] [PHP]<?php if (!defined('UBER') || !UBER) { exit; } function get_between($input, $start, $end) { $substr = substr($input, strlen($start)+strpos($input, $start), (strlen($input) - strpos($input, $end))*(-1)); return $substr; } $content = file_get_contents('http://habbo.com/'); $webbuild = get_between($content, "http://images.habbo.com/habboweb/", "/web-gallery"); dbquery("UPDATE site_config SET webbuild = '$webbuild' "); ?>[/PHP] [/LEFT] save that file in inc/cron_scripts open your database and look for table site_config and add a column called webbuild now open table site_cron and add a row withe these values.. id = whatever is next (mine was 6) prio = 6 (doesnt really matter) enabled = 1 scriptfile = webbuild.php last_exec = leave this blank exec_every = 1200 (you can play with this value, i believe its in seconds) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[UberCMS]AutoUpdate WebBuild
Top