[UberCMS]AutoUpdate WebBuild - Updated with SQL
here is a nice little update for UberCMS - AutoUpdate WebBuild
open class.core.php
look for
PHP Code:
public static function GetMaintenanceStatus()
{
return mysql_result(dbquery("SELECT maintenance FROM site_config LIMIT 1"), 0);
}
add under it
PHP Code:
public static function GetWebBuild()
{
return mysql_result(dbquery("SELECT webbuild FROM site_config LIMIT 1"), 0);
}
open global.php
search for
PHP Code:
define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false));
add under it
PHP Code:
define('WEBBUILD', uberCore::GetWebBuild());
open class.tpl.php
change
PHP Code:
$this->SetParam('web_build', '50_e3801d20ad745cc86660598ea0c4bdf4/15'); (your build will be different)
to
PHP Code:
$this->SetParam('web_build', WEBBUILD);
create a php file named WebBuild.php and put this in it.
PHP Code:
<?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' ");
?>
save that file in inc/cron_scripts
Run this SQL
PHP Code:
INSERT INTO `site_cron` VALUES (6, 6, '1', 'webbuild.php', '', 1200);
and this one
PHP Code:
ALTER TABLE site_config ADD webbuild CHAR(40);
Done....
Re: [UberCMS]AutoUpdate WebBuild
Good Job, Ima use this ;)
\
Re: [UberCMS]AutoUpdate WebBuild
thanks for this dude, will help alot of people :]
Re: [UberCMS]AutoUpdate WebBuild
im already using this :P becuz of u :D *hes my dad so thats why...* wait i wish ther was a LOVE BUTTON :D
Re: [UberCMS]AutoUpdate WebBuild
Re: [UberCMS]AutoUpdate WebBuild
Wait, I don't know what to add in the database, help please D:
---------- Post added at 07:10 PM ---------- Previous post was at 06:30 PM ----------
help??
Re: [UberCMS]AutoUpdate WebBuild
Awesome! Thanks alot for this!
Re: [UberCMS]AutoUpdate WebBuild
Doesn't work it is like the first UberCMS that isn't fixed in class.core.
Re: [UberCMS]AutoUpdate WebBuild
Then you have added it wrong. It works fine here.
Re: [UberCMS]AutoUpdate WebBuild
I have done all correctly..
Re: [UberCMS]AutoUpdate WebBuild
Doubt it. It works here, if it doesn't work with you then you have done something wrong.
Re: [UberCMS]AutoUpdate WebBuild
I have added the colummns in the database, i use uber vergin CMS.
Re: [UberCMS]AutoUpdate WebBuild
Use my webbuild pack??? R63 /126 full??
Re: [UberCMS]AutoUpdate WebBuild
Re: [UberCMS]AutoUpdate WebBuild
This is good work, could be better here and there but its okay I guess. A little too simple for a high rating. 5/10