MoonPHP ~ The most advanced Habbo CMS as of 2015

Status
Not open for further replies.

Jaden

not so active
Aug 24, 2014
886
263
2Z1CwVB.png
Hello guys,
It's Moonshine with another Habbo Development. Hopefully, since I'm already deep into progress on this project i'll decide to release.

FAQ:
What is MoonPHP, when will it be released?
MoonPHP is a simple, yet advanced content management system written in PHP using no unofficial frameworks such as "xcache" etc. I focused on mainly on the simplicity and neatness of code and code structure while writing the main units which makes up MoonPHP's basic core infrastructure.

MoonPHP was written and has been active since July 16, 2015 and is now at version 3.0.3 BETA

What makes MoonPHP better than its competition?
To be frankly honest with you, I feel as though these CMS's that were written along time ago, such as Rev and Uber CMS, are not only deprecated-- they are obsolete, and can no longer be improved... just manipulated to the point where the CMS and its core classes aren't even needed anymore.

MoonPHP Security, Features, Enterprise.
MoonPHP has a variety of features a basic list of the most advanced features we have on said CMS. Here we have a brief explanation on how they work

  • Multi Lingual system and Geo locator API class which detects your country code based on your IP Address then searches the array for the language code which is matched to said country code-- if nothing is found, your language is not compatible and the system will render the default language which is default English
  • Forgot Password and email confirmation is another feature of MoonPHP, we've written our own SMTP Mailer class in PHP to send you emails from the hotel, this is an automated process but also can send mails to a user via Housekeeping.
  • Password Hashing MoonPHP's hashing system was based off of blowfish as it uses a salt to encrypt the password and the password is never actually decrypted on authentication-- just re-encrypted and checked for similarity. We use computer-generated salts 1 salt per user (randomized).
  • Compatibility MoonPHP will work with all mainstream emulators (and my own) such as Phoenix, Uber, Mango, Habbo (NodeJS), Kryptos (Java Emulator I'm working on), Plus, Azure, Mercury, etc.
  • Minimail, Hotrooms, Groups, Homes is an asset of MoonPHP. However its not our first priority but we'll get to it sooner or later (Minimail and Hotrooms are already finished)
  • News page is replicated to work exactly like ex.habbo.com
  • Avatar Selection/Avatar Creation/Avatar Settings is a prime asset of MoonPHP and we have already developed these features on our CMS so no need to worry about this getting left behind.
  • Quickregister, in-game Avatar Editor has been written and added to MoonPHP-- this took no time to be frank with you all.
  • Housekeeping, Store the store has been started on, the housekeeping has not. Although I do have an admin dashboard which I paid for on themeforest so I will be using that as a base. Store payments are automated once payment is complete the purchase is automatically added to your account. (To prevent confusion we've added a page in which list all your payments and transactions)

MoonPHP Snippets? Credits?
Keep reading for credits, snippets will be posted soon...

NOTICE:
MoonPHP is a framework.
Please do not ruin my CMS like most of you do with RevCMS. Learn how to use the database class because believe it or not, the way the database class is structured it eliminates the need for bare MySQL queries. Yet, I've included a Query() function although labeled it as deprecated for the hard headed kids who don't want to learn how to use the database functions to their advantage.

Database Structure:
There is no need AT ALL for bare MySQL queries as MoonPHP has replicated every possible function you could need for a basic Habbo CMS.

Insert to database ->
PHP:
<?php
global $MySql;
$MySql->Insert('users', [ 'username' => 'hilol232' ]);
?>
It is extremely simple to learn and once you get the hang of it, anythings possible.

Reassuring statements
I'll eventually write a guide on how to utilize this CMS and operate it to its best abilities on conclusion of release.


READ COMMENTED LINES
PHP:
// File name: EN.php because the system works by grabbing your language code by your country code
// If your language or country code is not recognized by MoonPHP than your language is not supported
// Unsupported languages would just render the default language file being EN.php
// MoonPHP Multi-lingual system (You will not actually see these comments in the real CMS)
// echo $Language->TypeMeIn; would return "Hey, you forgot to fill me!"
return (object)array(

    'InvalidSecurityCode' => 'The security code was invalid, please try again.',
    'TypeMeIn' => 'Hey, you forgot to fill me!',
    'EnterMail' => 'Please enter a valid email address!',
    'EnterPassword' => 'Please enter a valid email address',
    'EnterBirthdate' => 'Please supply a valid birthdate',
    'EnterTerms' => 'Please accept the terms of service',
    'PasswordShort' => 'Your password needs be at least 6 characters long',
    'MailInUse' => "The email you gave is already in use. If you're trying to create a new character, please <a href='{hotel_url}'>log in</a> with your Habbo account and click Add Character.",

    'PasswordLabel' => 'Password',
    'LoginSubmit' => 'Login',
    'LoginErrorPassword' => '',
    'RememberMe' => 'Keep me logged in',
    'ForgotPassword' => 'Forgot your password?',

    'FbButton' => 'Login with Facebook',
    'WaysToLogin' => 'More ways to login',

    'JoinButton' => 'Join Here',
    'JoinButtonSmall' => "(It's free)",
...

PHP:
// Insert function for MoonPHP's Database Engine.[/SIZE]
// Basic understanding on how it works under the hood

/**
* Used for secure insert executions to the database.
* @param $table table name
* @param array $data an array of columns and values
* @return string
*/
final public function Insert($table, array $data)
{
    ksort($data);

    $fieldNames = implode(',', array_keys($data));
    $fieldValues = ':' . implode(', :', array_keys($data));

    $stmt = $this->sql->prepare("INSERT INTO $table ($fieldNames) VALUES ($fieldValues)");

    foreach ($data as $key => $value) {
        $stmt->bindValue(":$key", $value);
    }

    $stmt->execute();
    $this->rowCount = $stmt->rowCount();
    return $this->sql->lastInsertId();
}
PHP:
// MoonPHP's page rendering system.
// Route/URL -> Route to Page Name -> Page Name to Page.php
// Caching is turned on for pages with a certain statement at the top.

global $Users;

$this->Title = 'Home';

$this->AddCSS('{gallery_url}/web-gallery/static/styles/common.css');

$this->AddJS('{gallery_url}/web-gallery/static/js/libs2.js');
$this->AddJS('{gallery_url}/web-gallery/static/js/visual.js');
$this->AddJS('{gallery_url}/web-gallery/static/js/libs.js');
$this->AddJS('{gallery_url}/web-gallery/static/js/common.js');
$this->AddJS('{gallery_url}/web-gallery/static/js/fullcontent.js');

$this->AddCSS('//fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic|Ubuntu+Medium');

$this->DrawHead('Header-JS');

$this->AddCSS('{gallery_url}/web-gallery/static/styles/lightweightmepage.css');

$this->WriteHead('<meta name="build" content="PRODUCTION-BUILD4019 - 31.08.2015 22:08 - com" />');

$this->Body['id'] = 'home';

include(HABBO.'/Includes/Header.php');

$PageId = 1;

include(HABBO.'/Includes/Navigator.php');

$this->Write('<div id="container">');
$this->Write('<div id="content" style="position: relative" class="clearfix">');

$this->Draw('Me-Info');

$this->Write('</div>');
$this->Write('</div>');

$this->Write('<script type="text/javascript">if (!$(document.body).hasClassName(\'process-template\')) { Rounder.init(); }</script>');

Quickregister JSon Error Parsing
Quickregister Captcha

Client Register [(User Selection) Wrote an API to generate smart usernames]
Client Register (Room Selection)

Me page
Avatar Selection
News page (Will be rewritten exactly like Habbo's)
Store page using red coins as CMS currency (optional)

Caching of Birthdate, Password Salt, etc.

Developers & Credits
Jaden Moonshine (Only Developer)

Credits
azaidi as I used his QuickTPL as a guide to writing my template system.
@Kiss for encouragement while in development stages (I guess)

 
Last edited:

Mexicano

El Patrón
Aug 14, 2013
363
175
Hope this gets finished, my full support to this development since i know how good you are at this:up:
 

Jaden

not so active
Aug 24, 2014
886
263
Hope this gets finished, my full support to this development since i know how good you are at this:up:
Thank you for your support, updated with further snippets and screenies!
 

griimnak

You're a slave to the money then you die
Jul 20, 2013
956
797
Goodluck on this, the language system is a cool idea.. actualy i haven't seen a language system yet in the habbotard community
 

Jaden

not so active
Aug 24, 2014
886
263
Goodluck on this, the language system is a cool idea.. actualy i haven't seen a language system yet in the habbotard community
Thanks, and notice guys I posted the thread a little too early so I'm updating the main post like every 10 seconds with more information... so be sure to check back!
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,744
1,326
I feel as if a language system is not only a horrible feature for our hotels at the moment, but it will double the amount of queries and time to load a simple page. It's a neat idea, but worthless without our emulators having a compatible language system on them itself, otherwise you're begging for trouble by mixing languages.
 

griimnak

You're a slave to the money then you die
Jul 20, 2013
956
797
I feel as if a language system is not only a horrible feature for our hotels at the moment, but it will double the amount of queries and time to load a simple page. It's a neat idea, but worthless without our emulators having a compatible language system on them itself, otherwise you're begging for trouble by mixing languages.
you can change client text through the external variables though right? i remember something like that back when i did habbo. Maybe you could make php check what langauge they are and load the client variables for that language
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,744
1,326
you can change client text through the external variables though right? i remember something like that back when i did habbo. Maybe you could make php check what langauge they are and load the client variables for that language
I'm talking about the actual users themselves, if the users are speaking numerous languages how would the hotel be fun if nobody can actually know what others are saying.
 

griimnak

You're a slave to the money then you die
Jul 20, 2013
956
797
I'm talking about the actual users themselves, if the users are speaking numerous languages how would the hotel be fun if nobody can actually know what others are saying.
valid point
 

Jaden

not so active
Aug 24, 2014
886
263
I feel as if a language system is not only a horrible feature for our hotels at the moment, but it will double the amount of queries and time to load a simple page. It's a neat idea, but worthless without our emulators having a compatible language system on them itself, otherwise you're begging for trouble by mixing languages.
The language system is not connected with the database at all, so querying won't be an issue.
And as for the emulator, Azure Emulator is multi-lingual as it is--- nevertheless the client's language is determined by the flash texts so that's a simple switch statement.

And hotel's are already having this problem--- I can't guarantee you will get anymore foreign users from this, but at least now your users can understand your CMS.
But if you really don't like foreign people speaking another language on your hotel then use the Geo Locator class as a framework and build your Anti-Foreigners System?
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
damn another project... anyway Good luck with this, maybe finish it this time?
 

Jaden

not so active
Aug 24, 2014
886
263
If it's done why is it in BETA?
That was a question... ok.
It's in BETA for bug-testing purposes and I'm looking for more features to add.
Also I'm going to include the New HabboWEB Theme in the release.
 

Shatter

Selling Dedicated Servers
Jan 8, 2014
537
145
The CMS is very cleanly coded. I have viewed it myself and I'm sure the perfectionist has changed everything since to make it even better. There are many unique things that Jaden has already implemented that makes this much better than other CMS options. Keep up the good work, can't wait to see the final release.
 

Jaden

not so active
Aug 24, 2014
886
263
Looking Forward into it. Goodluck Jaden
Thanks, friend!
 
My Routing System is similar to Nova's yet it's configured in the skin folder /Habbo/Includes/Route.php and /HabboWEB/Includes/Route.php
PHP:
<?php

global $MySql;

Route::get('/', 'Index.php');

Route::get('/account/password/identityResetForm', 'Forgot.php');

Route::get('/account/submit', 'Login.php');

Route::get('/account/logout', 'Logout.php');
Route::get('/account/logout_ok', 'Logout.php');

Route::get('/registration/start', 'Captcha.php');
Route::get('/registration/submit', 'Register.php');

Route::get('/articles', 'News.php');

Route::get('/client', 'Client.php');

if ($Users->IsLogged() !== false)
{
    Route::get('/', 'Me.php');
    Route::get('/me', 'Me.php');
   
    Route::get('/home', 'Home.php');
   
    Route::get('/api/newuser/name/check', 'Name-Check.php');
    Route::get('/api/newuser/name/select', 'Name-Check.php');
    Route::get('/api/user/look/save', 'Name-Select.php');
    Route::get('/api/newuser/room/select', 'Room-Select.php');
       
    Route::get('/store', 'Store.php');
   
    Route::get('/identity/avatars', 'Avatars.php');
    Route::get('/identity/useOrCreateAvatar', 'Avatar-Select.php');
    Route::get('/identity/add_avatar', 'Avatar-Create.php');
    Route::get('/identity/add_avatar_do', 'Avatar-Create.php');
    Route::get('/identity/add_avatar_messages', 'Avatar-Create.php');
   
    Route::AddNav('{user_username}', Array(
        'Home' => '/me',
        'My Page' => '/home'
    ));
   
    Route::AddNav('News', Array(
        'News' => '/articles'
    ));
}

Route::Init(WWW);
 

LittleChild

Member
Oct 10, 2015
92
12
Wow looks amazing, Cant wait to see what the code looks like, And the language system is amazing to! I dont think any hotel has that!
 

griimnak

You're a slave to the money then you die
Jul 20, 2013
956
797
Thanks, friend!
 
My Routing System is similar to Nova's yet it's configured in the skin folder /Habbo/Includes/Route.php and /HabboWEB/Includes/Route.php
PHP:
<?php

global $MySql;

Route::get('/', 'Index.php');

Route::get('/account/password/identityResetForm', 'Forgot.php');

Route::get('/account/submit', 'Login.php');

Route::get('/account/logout', 'Logout.php');
Route::get('/account/logout_ok', 'Logout.php');

Route::get('/registration/start', 'Captcha.php');
Route::get('/registration/submit', 'Register.php');

Route::get('/articles', 'News.php');

Route::get('/client', 'Client.php');

if ($Users->IsLogged() !== false)
{
    Route::get('/', 'Me.php');
    Route::get('/me', 'Me.php');
  
    Route::get('/home', 'Home.php');
  
    Route::get('/api/newuser/name/check', 'Name-Check.php');
    Route::get('/api/newuser/name/select', 'Name-Check.php');
    Route::get('/api/user/look/save', 'Name-Select.php');
    Route::get('/api/newuser/room/select', 'Room-Select.php');
      
    Route::get('/store', 'Store.php');
  
    Route::get('/identity/avatars', 'Avatars.php');
    Route::get('/identity/useOrCreateAvatar', 'Avatar-Select.php');
    Route::get('/identity/add_avatar', 'Avatar-Create.php');
    Route::get('/identity/add_avatar_do', 'Avatar-Create.php');
    Route::get('/identity/add_avatar_messages', 'Avatar-Create.php');
  
    Route::AddNav('{user_username}', Array(
        'Home' => '/me',
        'My Page' => '/home'
    ));
  
    Route::AddNav('News', Array(
        'News' => '/articles'
    ));
}

Route::Init(WWW);
looks pretty advanced vs something i'd write in php, you planning on making this an MVC type of cms?
 
Status
Not open for further replies.

Users who are viewing this thread

Top