Welcome to the RaGEZONE - MMORPG development forums.

Webbuild API

This is a discussion on Webbuild API within the Habbo Releases forums, part of the Habbo Hotel category; WebBuild API What is this API? This api simply grabs any resource on habbo's web server that is located within ...

Page 1 of 3 123 LastLast
Results 1 to 15 of 40
  1. #1
    I'm an asshole eat me out
    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    Corporal USA
    Posts
    3,675
    Liked
    1518
    Gamertag: CobeLeDev PSN ID: COBEx9 Steam ID: CobeLeGamer

    Webbuild API

    Click
    WebBuild API

    What is this API?

    This api simply grabs any resource on habbo's web server that is located within the web-build folder.

    Why do I need this?

    Well, this makes it easier to grab habbo javascript, css, and image resources with just 2 $_GET requests. This also masks your request from sulake who probably know all you hotel owners leach off of their resources and bandwith, etc.

    How do I use it..?

    For an example..

    Let's say you have something like this in your index page..
    PHP Code:
    <link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/1013/web-gallery/static/styles/home.css" type="text/css" /> 
    My API makes life simpler, as you can replace that code with this.

    PHP Code:
    <link rel="stylesheet" href="http://cobe.me/resources/habbo/webbuild/?file=home.css&type=css" type="text/css" /> 
    You don't have to worry about any auto-webbuild updater or manually updating your own, because this snazzy tool handles it all for you..

    The file types..?

    1. css
    2. cascading
    3. js
    4. javascript
    5. img
    6. image


    Link me to the download!!
    No download required.

    I will provide support if needed.





    Last edited by Makarov; 12-05-12 at 07:38 PM.

  2. #2
    Supervisor
    Rank
    Supervisor
    Join Date
    Jun 2007
    Location
    Jersey
    Posts
    4,030
    Liked
    946

    Re: Webbuild API

    Woo! Thanks for this. =)

  3. #3
    Best contributor of 2011
    Rank
    Moderator
    Join Date
    Jun 2007
    Location
    HM Offices
    Posts
    2,778
    Liked
    1064

    Re: Webbuild API

    Nice, thanks :d
    All the people who knock me down, only inspire me to do better'

    Quote Originally Posted by r63
    Your problems are not my problems therefore meaning I don't care. I explained and you said you didn't understand, you cannot say I didn't try to help, the fact you are unable to comprehend my help is not my issue.

  4. #4
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Mar 2009
    Posts
    245
    Liked
    19

    Re: Webbuild API

    UberCMS
    /inclues/class.tpl.php

    PHP Code:
    <?php

    class uberTpl
    {
        private 
    $outputData;
        private 
    $params = Array();
        private 
    $includeFiles = Array();
        
        public function 
    Init()
        {
            global 
    $core$users;
        
            
    $this->SetParam('''Holo');
            
    $this->SetParam('body_id''');
            
    $this->SetParam('page_title'' ');
            
    $this->SetParam('flash_build''flash_50_9');
            
    $this->SetParam('web_build''63_1dc60c6d6ea6e089c6893ab4e0541ee0/711');
            
    $this->SetParam('web_build_str''50-BUILD66 - 06.05.2010 22:28');
            
    $this->SetParam('req_path'WWW);
            
    $this->SetParam('www'WWW);
            
    $this->SetParam('badges''' WWW '/c_images/album1584/');
            
    $this->SetParam('hotel_status_fig'uberCore::GetSystemStatusString(true));
            
    $this->SetParam('hotel_status'uberCore::GetSystemStatusString(false));

            if (
    LOGGED_IN)
            {
                
    $this->SetParam('habboLoggedIn''true');
                
    $this->SetParam('habboName'USER_NAME);
            }
            else
            {
                
    $this->SetParam('habboLoggedIn''false');
                
    $this->SetParam('habboName''');
            }
        }
        
        public function 
    AddIncludeSet($set)
        {
            switch (
    strtolower($set))
            {
                case 
    "frontpage":
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=landing.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=frontpage.css&type=css''stylesheet'));            
                    break;
                    
                case 
    "register":

                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));            
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=embeddedregistration.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=simpleregistration.js&type=js'));
                    break;
            
                case 
    "process-template":
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=fullcontent.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=process.css&type=css''stylesheet'));    
                    break;
                    
                case 
    'myhabbo':
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=fullcontent.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));                
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/myhabbo.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/skins.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/dialogs.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/buttons.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/control.textarea.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/boxes.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=homeview.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=lightwindow.css&type=css''stylesheet'));
                    break;
                
                case 
    'default':
                default:
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=fullcontent.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));        
                    break;
            }
        }
        
        public function 
    AddGeneric($tplName)
        {
            
    $tpl = new Template($tplName);
            
    $this->outputData .= $tpl->GetHtml();
        }
        
        public function 
    AddTemplate($tpl)
        {
            
    $this->outputData .= $tpl->GetHtml();
        }
        
        public function 
    SetParam($param$value)
        {
            
    $this->params[$param] = is_object($value) ? $value->fetch() : $value;
        }
        
        public function 
    UnsetParam($param)
        {
            unset(
    $this->params[$param]);
        }
        
        public function 
    AddIncludeFile($incFile)
        {
            
    $this->includeFiles[] = $incFile;
        }
        
        public function 
    WriteIncludeFiles()
        {
            foreach (
    $this->includeFiles as $f)
            {
                
    $this->Write($f->GetHtml() . LB);
            }
        }
        
        public function 
    Write($str)
        {
            
    $this->outputData .= $str;
        }
        
        public function 
    FilterParams($str)
        {
            foreach (
    $this->params as $param => $value)
            {
                
    $str str_ireplace('%' $param '%'$value$str);
            }
            
            return 
    $str;
        }
        
        public function 
    Output()
        {
            global 
    $core;
        
            
    //$this->Write(LB . LB . '<!-- Took ' . (    round((microtime(true) - $core->execStart), 4)   ) . ' to output this page -->' . LB . LB);
            
            
    echo $this->FilterParams($this->outputData);
        }
    }

    class 
    Template
    {
        private 
    $params = Array();
        private 
    $tplName '';
        
        public function 
    Template($tplName)
        {
            
    $this->tplName $tplName;
        }
        
        public function 
    GetHtml()
        {
            global 
    $users;
        
            
    extract($this->params);
        
            
    $file CWD 'inc/tpl/' $this->tplName '.tpl';
        
            if (!
    file_exists($file))
            {
                
    uberCore::SystemError('Template system error''Could not load template: ' $this->tplName);
            }
            
            
    ob_start();
            include(
    $file);
            
    $data ob_get_contents();
            
    ob_end_clean();    
            
            return 
    $this->FilterParams($data);
        }
        
        public function 
    FilterParams($str)
        {
            foreach (
    $this->params as $param => $value)
            {
                if (
    is_object($value))
                {
                    continue;
                }
            
                
    $str str_ireplace('%' $param '%'$value$str);
            }
            
            return 
    $str;
        }
        
        public function 
    SetParam($param$value)
        {
            
    $this->params[$param] = $value;
        }
        
        public function 
    UnsetParam($param)
        {
            unset(
    $this->params[$param]);
        }        
    }

    class 
    IncludeFile
    {
        private 
    $type;
        private 
    $src;
        private 
    $rel;
        private 
    $name;

        public function 
    IncludeFile($type$src$rel ''$name '')
        {
            global 
    $tpl;
        
            
    $this->type $type;
            
    $this->src $src;
            
    $this->rel $rel;
            
    $this->name $name;
        }
        
        public function 
    GetHtml()
        {
            switch (
    $this->type)
            {
                case 
    'application/rss+xml':
                
                    return 
    '<link rel="' $this->rel '" type="' $this->type '" title="' $this->name '" href="' $this->src '" />';
            
                case 
    'text/javascript':
                
                    return 
    '<script src="' $this->src '" type="text/javascript"></script>';
                    
                case 
    'text/rocketscript':
                
                    return 
    '<script data-cfasync="true" src="' $this->src '"></script>';
                    
                case 
    'text/css':
                default:
                
                    return 
    '<link rel="' $this->rel '" href="' $this->src '" type="' $this->type '" />';
            }
        }
    }

    ?>
    Liam likes this.

  5. #5
    I'm an asshole eat me out
    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    Corporal USA
    Posts
    3,675
    Liked
    1518
    Gamertag: CobeLeDev PSN ID: COBEx9 Steam ID: CobeLeGamer

    Re: Webbuild API

    Quote Originally Posted by Ubercheese View Post
    UberCMS
    /inclues/class.tpl.php

    PHP Code:
    <?php

    class uberTpl
    {
        private 
    $outputData;
        private 
    $params = Array();
        private 
    $includeFiles = Array();
        
        public function 
    Init()
        {
            global 
    $core$users;
        
            
    $this->SetParam('''Holo');
            
    $this->SetParam('body_id''');
            
    $this->SetParam('page_title'' ');
            
    $this->SetParam('flash_build''flash_50_9');
            
    $this->SetParam('web_build''63_1dc60c6d6ea6e089c6893ab4e0541ee0/711');
            
    $this->SetParam('web_build_str''50-BUILD66 - 06.05.2010 22:28');
            
    $this->SetParam('req_path'WWW);
            
    $this->SetParam('www'WWW);
            
    $this->SetParam('badges''' WWW '/c_images/album1584/');
            
    $this->SetParam('hotel_status_fig'uberCore::GetSystemStatusString(true));
            
    $this->SetParam('hotel_status'uberCore::GetSystemStatusString(false));

            if (
    LOGGED_IN)
            {
                
    $this->SetParam('habboLoggedIn''true');
                
    $this->SetParam('habboName'USER_NAME);
            }
            else
            {
                
    $this->SetParam('habboLoggedIn''false');
                
    $this->SetParam('habboName''');
            }
        }
        
        public function 
    AddIncludeSet($set)
        {
            switch (
    strtolower($set))
            {
                case 
    "frontpage":
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=landing.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=frontpage.css&type=css''stylesheet'));            
                    break;
                    
                case 
    "register":

                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));            
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=embeddedregistration.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=simpleregistration.js&type=js'));
                    break;
            
                case 
    "process-template":
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=fullcontent.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=process.css&type=css''stylesheet'));    
                    break;
                    
                case 
    'myhabbo':
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=fullcontent.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));                
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/myhabbo.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/skins.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/dialogs.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/buttons.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/control.textarea.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo/boxes.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=myhabbo.css&type=css''stylesheet'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=homeview.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=lightwindow.css&type=css''stylesheet'));
                    break;
                
                case 
    'default':
                default:
                
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs2.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=visual.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=libs.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=common.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/javascript''http://cobe.me/resources/habbo/webbuild/?file=fullcontent.js&type=js'));
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=style.css&type=css''stylesheet'));        
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=buttons.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=boxes.css&type=css''stylesheet'));    
                    
    $this->AddIncludeFile(new IncludeFile('text/css''http://cobe.me/resources/habbo/webbuild/?file=tooltips.css&type=css''stylesheet'));        
                    break;
            }
        }
        
        public function 
    AddGeneric($tplName)
        {
            
    $tpl = new Template($tplName);
            
    $this->outputData .= $tpl->GetHtml();
        }
        
        public function 
    AddTemplate($tpl)
        {
            
    $this->outputData .= $tpl->GetHtml();
        }
        
        public function 
    SetParam($param$value)
        {
            
    $this->params[$param] = is_object($value) ? $value->fetch() : $value;
        }
        
        public function 
    UnsetParam($param)
        {
            unset(
    $this->params[$param]);
        }
        
        public function 
    AddIncludeFile($incFile)
        {
            
    $this->includeFiles[] = $incFile;
        }
        
        public function 
    WriteIncludeFiles()
        {
            foreach (
    $this->includeFiles as $f)
            {
                
    $this->Write($f->GetHtml() . LB);
            }
        }
        
        public function 
    Write($str)
        {
            
    $this->outputData .= $str;
        }
        
        public function 
    FilterParams($str)
        {
            foreach (
    $this->params as $param => $value)
            {
                
    $str str_ireplace('%' $param '%'$value$str);
            }
            
            return 
    $str;
        }
        
        public function 
    Output()
        {
            global 
    $core;
        
            
    //$this->Write(LB . LB . '<!-- Took ' . (    round((microtime(true) - $core->execStart), 4)   ) . ' to output this page -->' . LB . LB);
            
            
    echo $this->FilterParams($this->outputData);
        }
    }

    class 
    Template
    {
        private 
    $params = Array();
        private 
    $tplName '';
        
        public function 
    Template($tplName)
        {
            
    $this->tplName $tplName;
        }
        
        public function 
    GetHtml()
        {
            global 
    $users;
        
            
    extract($this->params);
        
            
    $file CWD 'inc/tpl/' $this->tplName '.tpl';
        
            if (!
    file_exists($file))
            {
                
    uberCore::SystemError('Template system error''Could not load template: ' $this->tplName);
            }
            
            
    ob_start();
            include(
    $file);
            
    $data ob_get_contents();
            
    ob_end_clean();    
            
            return 
    $this->FilterParams($data);
        }
        
        public function 
    FilterParams($str)
        {
            foreach (
    $this->params as $param => $value)
            {
                if (
    is_object($value))
                {
                    continue;
                }
            
                
    $str str_ireplace('%' $param '%'$value$str);
            }
            
            return 
    $str;
        }
        
        public function 
    SetParam($param$value)
        {
            
    $this->params[$param] = $value;
        }
        
        public function 
    UnsetParam($param)
        {
            unset(
    $this->params[$param]);
        }        
    }

    class 
    IncludeFile
    {
        private 
    $type;
        private 
    $src;
        private 
    $rel;
        private 
    $name;

        public function 
    IncludeFile($type$src$rel ''$name '')
        {
            global 
    $tpl;
        
            
    $this->type $type;
            
    $this->src $src;
            
    $this->rel $rel;
            
    $this->name $name;
        }
        
        public function 
    GetHtml()
        {
            switch (
    $this->type)
            {
                case 
    'application/rss+xml':
                
                    return 
    '<link rel="' $this->rel '" type="' $this->type '" title="' $this->name '" href="' $this->src '" />';
            
                case 
    'text/javascript':
                
                    return 
    '<script src="' $this->src '" type="text/javascript"></script>';
                    
                case 
    'text/rocketscript':
                
                    return 
    '<script data-cfasync="true" src="' $this->src '"></script>';
                    
                case 
    'text/css':
                default:
                
                    return 
    '<link rel="' $this->rel '" href="' $this->src '" type="' $this->type '" />';
            }
        }
    }

    ?>
    And.. the point of that post was?

  6. #6
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Mar 2009
    Posts
    245
    Liked
    19

    Re: Webbuild API

    Quote Originally Posted by Makarov View Post
    And.. the point of that post was?
    Replaced all of the Habbo.com style sheets and JavaScript with your URL, scroll down...
    Makarov and Liam like this.

  7. #7
    I'm an asshole eat me out
    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    Corporal USA
    Posts
    3,675
    Liked
    1518
    Gamertag: CobeLeDev PSN ID: COBEx9 Steam ID: CobeLeGamer

    Re: Webbuild API

    Quote Originally Posted by Ubercheese View Post
    Replaced all of the Habbo.com style sheets and JavaScript with your URL, scroll down...
    Oh sorry, didn't see the scroll bar. Thanks.

  8. #8
    Prepare the lulz
    Rank
    Moderator
    Join Date
    Mar 2009
    Location
    England
    Posts
    463
    Liked
    134

    Re: Webbuild API

    Thanks for this, I'll be sure to put this on my hotel when it's up. ^^

  9. #9
    I'm an asshole eat me out
    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    Corporal USA
    Posts
    3,675
    Liked
    1518
    Gamertag: CobeLeDev PSN ID: COBEx9 Steam ID: CobeLeGamer

    Re: Webbuild API

    Great!

    I've added another function just if you want to view the web build.

    PHP Code:
    $_webbuild file_get_contents('http://cobe.me/resources/habbo/webbuild/?action=view');

    echo 
    $_webbuild
    This will show the web build string.

  10. #10
    Creative One.
    Rank
    Subscriber
    Join Date
    Oct 2011
    Location
    Your Router
    Posts
    517
    Liked
    171

    Re: Webbuild API

    Nice, care to provide the backend code?

  11. #11
    Ultimate Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    The Netherlands
    Posts
    177
    Liked
    34
    Steam ID: MikeShotty

  12. #12
    I'm an asshole eat me out
    Rank
    Gamma
    Join Date
    Apr 2010
    Location
    Corporal USA
    Posts
    3,675
    Liked
    1518
    Gamertag: CobeLeDev PSN ID: COBEx9 Steam ID: CobeLeGamer

    Re: Webbuild API

    Not at the moment, but when I decide people should benefit off of it.. sure!

    Could you give me the exact location of the ones that don't work? I could fix it if I had the full dir.

  13. #13
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    351
    Liked
    96

    Re: Webbuild API

    Nice, give the source :D
    Sorry for my bad English I'm from the Netherlands.

    I'm Back bitch ;d
    Arjanterheegde.nl | retrotop100.nl | topserverlist.nl | drabbo.nl

    Love her

  14. #14
    Creative One.
    Rank
    Subscriber
    Join Date
    Oct 2011
    Location
    Your Router
    Posts
    517
    Liked
    171

    Re: Webbuild API

    Ah, are you using Curl, its pretty decent tho, nice job!
    Maybe add some server side Caching?

  15. #15
    Ultimate Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    The Netherlands
    Posts
    177
    Liked
    34
    Steam ID: MikeShotty

    Re: Webbuild API

    The most Javascripts are located in

    Code:
    http://images.habbo.com/habboweb/{webbuild}/web-gallery/static/js/{file}.js
    and CSS files here

    Code:
    http://images.habbo.com/habboweb/{webbuild}/web-gallery/styles/{file}.css
    http://images.habbo.com/habboweb/{webbuild}/web-gallery/static/styles/{file}.css
    I guess.
    Last edited by Nathandj; 12-05-12 at 08:29 PM.

 

 
Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •