Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Cms: µHabbo

Status
Not open for further replies.
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86

µHabbo 2.0
The best a man can get


CMS'es have been made for centuries, yet most of them fail on at least one of these points:

  1. Flexibility
    (e.g. you can use the CMS with just emulator)
  2. Modularity
    (e.g. you have to change many files in order to make little adaptations)
  3. Safety
    (e.g. people on a forum can add [img] [/img] to their signature, to log you out)
µHabbo tries to fix all the three of those problems: the CMS can work with all emulators, it's extensible with plugins and themes, and is protected from most attacks.

Another feature is that the CMS can answer each request with an HTML-response or a JSON-respons, depening on the HTTP Accept header. This way, you can easily AJAX-ify your theme's!

Libraries
µHabbo will use some libraries. In previous versions (≤ 1.6.2b) it utilized my own framework, yet that didn't seem to work well. The libraries µHabbo uses in version 2.0 are:
  • Xesau/Events (not available online yet)
  • (for template rendering)

Progress

Xesause - Cms: µHabbo - RaGEZONE Forums
= Not started,
Xesause - Cms: µHabbo - RaGEZONE Forums
= ~25%,
Xesause - Cms: µHabbo - RaGEZONE Forums
= ~50%,
Xesause - Cms: µHabbo - RaGEZONE Forums
= ~75%,
Xesause - Cms: µHabbo - RaGEZONE Forums
= Finished!

Xesause - Cms: µHabbo - RaGEZONE Forums
Default theme (please help me, I'm bad at designing)
Xesause - Cms: µHabbo - RaGEZONE Forums
Base structure and seom controllers

  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Authentication and forgot password
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Registration
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    User settings
Xesause - Cms: µHabbo - RaGEZONE Forums
Default language files

  • Xesause - Cms: µHabbo - RaGEZONE Forums
    English
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Dutch
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    French
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Spanish
Xesause - Cms: µHabbo - RaGEZONE Forums
Default database configurations
Xesause - Cms: µHabbo - RaGEZONE Forums
Events and plugin system
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Events related to authentication and account creation
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Events related to plugins
Xesause - Cms: µHabbo - RaGEZONE Forums
Page system
Xesause - Cms: µHabbo - RaGEZONE Forums
Some basic plugins
  • Facebook login
  • Minimail
Xesause - Cms: µHabbo - RaGEZONE Forums
Housekeeping

  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Layout (themes can provide their own layout, though that is not mandatory)
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Manage users and ranks
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Write and edit news articles
  • Xesause - Cms: µHabbo - RaGEZONE Forums
    Manage the catalogue (plugin)

Snippets
The code for the |translate-filter for templates:
PHP:
function translate($string)
{
    global $lang;
    $result = array_key_exists($string, $lang) ? $lang[$string] : $string;
    if (func_num_args() != 1)
    {
        $first = func_get_arg(1);
        if(is_array($first))
            foreach ($first as $key => $value)
                $result = str_replace('%'. $key, $value, $result);
        else
            for ($i = func_num_args() - 1; $i > 0; $i--)
                $result = str_replace('%'. $i, func_get_arg($i), $result);
    }
    return $result;
}

Login controller
PHP:
 static function login()
{
    if (CSRF != @$_POST['csrf_token'])
        exit();

    $login = @$_POST['login_login'];
    $password = @$_POST['login_password'];
    $remember = @$_POST['login_remember'];

    try {
        $user = User::select()
        ->where(\db('user', 'username'), QB::EQ, $login)
        ->whereOr(\db('user', 'email'), QB::EQ, $login)
        ->find();

        if (password_verify($password, $user->getPassword()))
        {
            // If remembered, login for a year, else for two hours
            $expireTime = time() + ($remember ? 31536000 : 7200);
            $session = Session::create($user, $_SERVER, $expireTime);

            if (HTTP_ACCEPT == 'JSON') {
                exit('{"success": true, "session_id": '. $session->id() .'}');
            } else {
                setcookie(COOKIEPF.'ssid', $session->id(), $expireTime, '/');
                App::redirect('');
            }
        } else {
            if (HTTP_ACCEPT == 'JSON') {
                exit('{"success": false, "error": "password_incorrect"}');
            } else {
                App::showMessage('error', 'error.login.password_incorrect', true);
                App::saveField('login_login', $login);
                App::redirect('');
            }
        }
    } catch (RangeException $ex) {
        if (HTTP_ACCEPT == 'JSON') {
            exit('{"success": false, "error": "login_not_found"}');
        } else {
            App::showMessage('error', 'error.login.login_not_found', true);
            App::saveField('login_login', $login);
            App::redirect('');
        }
    }
}

FAQ
Will this be released?
Yes it will. Also it will be completely free of charge.
A few plugins will be available too. If you really desperately need to show your support, there will be some premium plugins with higher complexity.

When will this be finished?
Whenever it's usable. Alpha releases will be distributed along the way of development.

Why don't you use [insert framework here]?
You haven't read properly. I tried using a framework in the 1.x iteration of this project, but it didn't work as well as I hoped it would, hence I decided to use separate components, listed in the Libraries-section.

Can I download this already?
Sure! There is an older version available, 1.6.2b.
 
Last edited:
Retired
Joined
Apr 15, 2015
Messages
715
Reaction score
238
The layout is new and fresh, I wish you all the best and i'll be keeping my eye on this development. :eek:tt:
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
Update:

- Integrated plugin setting manager into footer links plugin. Will update snippet asap
- Started working on the PhoenixPHP skin. Not much of a thing yet. Will take a while to filter out all the logic of the PHP files, and replace them by Twig tags.

P.S.: Also just noticed tapatalk replaces image links with the actual image... Gotta take care of that.
 
Last edited:
Newbie Spellweaver
Joined
Jan 11, 2015
Messages
15
Reaction score
0
Just make it a RevCms skin instead? I don't get why you'd need a plugin system for a CMS.. Just code what you need.
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
Just make it a RevCms skin instead? I don't get why you'd need a plugin system for a CMS.. Just code what you need.

I don't know if I shouldn't just ignore this altogether, you're appearing really dumb, but I will though. For gods sake, RevCMS sucks monkeyballs. It's by definition not even a content management system, and revolutionary, apart from the real use of classes rather than solely rely on function groups like PhxPHP, it isn't.

You'd really need a plugin system. Why? Because normal people don't like messing with code? Why would everyone use WordPress, Drupal and Joomla! if they could just code everything themselves, and add everything they need? Simplicity. Simplicity is the key to success. When people hear: "With this CMS you can set up an hotel in under a minute" they will be more attracted than when they see a tutorial spanning multiple pages, won't they?

Another thing why a plugin system is necessary is because when you don't have one, people will start editing the CMS to add features, and that makes it incompatible to features from others. When people post code on forums with edits, theres a certain chance it won't work because previous edits messed up.

Next time please thing before posting irrational claims.
 

pel

Skilled Illusionist
Joined
Jan 27, 2012
Messages
382
Reaction score
343
Looks nice. Already planed such a project too, started it with a friend but never finished it. Good Luck m8! Codes looking nice, maybe U create a documentation :)
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
Looks nice. Already planed such a project too, started it with a friend but never finished it. Good Luck m8! Codes looking nice, maybe U create a documentation :)

I was indeed planning on creating a documentation site, with all the widget places, such as footer.links.before andsettings.menu.above and...
On that site you'll also be able to offer themes and plugins ($)

I am currently working on the PhoenixPHP theme, and it's comming along quite nicely
Xesause - Cms: µHabbo - RaGEZONE Forums

(or )

Xesause - Cms: µHabbo - RaGEZONE Forums

(or )
 
Master Summoner
Joined
Dec 1, 2013
Messages
547
Reaction score
694
"On that site you'll also be able to offer themes and plugins ($)"
Dutch people and money
:flute:
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
Looks nice, hope this one is gonna be finished.
One thing: which emulator is this created for? Azure, Phoenix?

Forgot to state that:
All. There will be configuration files for all major databases.

"On that site you'll also be able to offer themes and plugins ($)"
Dutch people and money
:flute:

This is actually how I'm going to make money of the CMS. I'll release a Minimail plugin and a catalogue editor, as well maybe as a bot manager. I'll also release free plugins, of course

The color code you used there is #666. Illuminati confirmed.
--------------------------------------
Also added index.php snippet
(
 
Last edited:
Master Summoner
Joined
Dec 1, 2013
Messages
547
Reaction score
694
Forgot to state that:
All. There will be configuration files for all major databases.



This is actually how I'm going to make money of the CMS. I'll release a Minimail plugin and a catalogue editor, as well maybe as a bot manager. I'll also release free plugins, of course

The color code you used there is #666. Illuminati confirmed.
--------------------------------------
Also added index.php snippet
(
 
Experienced Elementalist
Joined
Aug 21, 2012
Messages
215
Reaction score
52
Nice project, I think I would code some skins and plugins for it too ;)
I will translate it into german, are there language files? (I think yes :'D)



Nice project, I think I would code some skins and plugins for it too ;)
I can translate it into german (and russian too).
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
Why does this needs a development thread if it's limited in the features. I still don't get it. What I have seen from you is just basic stuff :p

There will be a page manager soon, and profiles will be customizable too.

This dev thread is to get input from you too, so if yo just find thiz basic poop, give shout some ideas!

Nice project, I think I would code some skins and plugins for it too ;)
I will translate it into german, are there language files? (I think yes :'D)



Nice project, I think I would code some skins and plugins for it too ;)
I can translate it into german (and russian too).

I'll send you the english file so you can translate it. Thanks!

For the plugins, I'll make a site with documentation someday.

------------------

The premium plugins I have yet planned are:
- Minimail (will be €2,00)
- Catalogue manager (will be €5,00)

The free plugins:
- Footer links manager
- Bot manager
- Super password
- News comments system
 
Joined
Feb 22, 2012
Messages
2,103
Reaction score
1,271
Forgot to state that:
All. There will be configuration files for all major databases.



This is actually how I'm going to make money of the CMS. I'll release a Minimail plugin and a catalogue editor, as well maybe as a bot manager. I'll also release free plugins, of course

I don't think it's cool for sell for plugins, but well, it's your funeral (or your CMS'). Still, you could do some kind of shop, with plugin examples!
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
Doing a development stream now:





I don't think it's cool for sell for plugins, but well, it's your funeral (or your CMS'). Still, you could do some kind of shop, with plugin examples!

Well, I could also make big plugins and release them for free, but I put a lot of effort in these things.
 
Last edited:
Junior Spellweaver
Joined
Nov 11, 2012
Messages
144
Reaction score
11
To make your querys faster you can use
Code:
 PDO::ATTR_PERSISTENT => true
also instead of require_once use require its faster :D but its your choice ofcourse :p
 
Junior Spellweaver
Joined
Feb 2, 2015
Messages
181
Reaction score
86
To make your querys faster you can use
Code:
 PDO::ATTR_PERSISTENT => true
also instead of require_once use require its faster :D but its your choice ofcourse :p

require_once makes sure it's not require'd any time later, which is kinda useful when you have class definitions somewhere
 
Status
Not open for further replies.
Back
Top