Done with the core for Translation system (for now)
Plugins configuration file is now SimpleXML
Added template system
Added template skin configuration file
Added HabboID (Login with email)
HabboID supports multipile avatars
Added PayGol API Script
Removed Jampo Mail
Rewrited most of the commands (for better performance)
Added bans & IP Bans
Cool facts:
Language system is using in average 0.005 secounds to complete
Template system is using in average 0.01 secounds to complete
New features:
Logs all purchases in .txt files
Stores all error messages that a user gets
HabboID now supports user identity (user can create a custom login username) (optinal ofcourse)
Staff page (plugin)
Top stats (plugin)
HabboASE new features:
Advanced User lookup, Clones, includes Rooms, room chatlogs, cfhs, badges, Inventory (What user has in hand) and Login logs (with IP)
Bans and manage bans (appeals etc.)
Edit user
Edit rooms
Edit badges
Hotel alert
Staff alert
Fake login (login as)
Starting with Homes and Groups (homes) when im done with the template system
/* Internal Information (version etc) */ define('VB', '1.0.0'); define('S', 'core/'); //Location where all system files are define('P', 'plugins/'); //Where plugins are located (X . S . P) define('B', 'storage/'); //Where cache, config and temp files are located (X . S . B) define('C', 'system/'); //Where config files are located (X . S . B . C) define('L', 'languages/'); //Where lanuages files are located (X . S . B . L) define('E', 'servers/'); //Where server files are located (X . S . B . E) define('H', 'purchases/'); //Where completed purchases logs are stored. (X . S . B . E) define('F', 'errors/'); //Where CMS Error logs are stored (X . S . B . F) define('K', 'skins/'); //Where all skins (tempalte) files are located (X . S . K) if(!defined('X')) define('X', ''); //If global.php is called from a higher folder then X will be defined, if not call it ''
/*Check if the server is able to run HabboCMS */ if(ini_get('safe_mode')) die("For HabboCMS to work please turn PHP Safe-Mode to 'Off' read more here: <a href='http://php.net/manual/en/features.safe-mode.php'>PHP Safe mode Manual</a>"); if(!function_exists('curl_init')) die("Your web server does not have 'curl' extension installed. For HabboCMS to work you must install 'php-curl' (# yum install php-curl)"); if(!function_exists('mysql_connect')) die("Your web server does not have 'mysql' extension installed. For HabboCMS to work you must install 'php-mysql' (# yum install php-mysql)"); if(!function_exists('mcrypt_decrypt')) die("Your web server does not have 'mcrypt' extension installed. For HabboCMS to work you must install 'php-mcrypt' (# yum install php53-mcrypt)");
/* Check if all required exists */ if(!file_exists(X . S . B . C . 'general.php')) die("Could not find your HabboCMS Config file. Please re-install HabboCMS"); //General Config file if(!file_exists(X . S . B . C . 'sql.php')) die("Could not find Database settings. Please re-install HabboCMS");
/* Include all required files */ require X . S . B . C . "general.php";
/* Check if all general variables are there */ if(!isset($_HabboCMS['website']['www'], $_HabboCMS['website']['shortname'], $_HabboCMS['website']['sitename'], $_HabboCMS['website']['language'], $_HabboCMS['website']['hash'], $_HabboCMS['website']['plugins'], $_HabboCMS['website']['webgallery'], $_HabboCMS['website']['gallery_rev'], $_HabboCMS['website']['skin'], $_HabboCMS['client']['gordon'], $_HabboCMS['client']['ip'], $_HabboCMS['client']['direct_ip'], $_HabboCMS['client']['port'], $_HabboCMS['client']['variables'], $_HabboCMS['client']['texts'], $_HabboCMS['client']['productdata'], $_HabboCMS['client']['furnidata'], $_HabboCMS['MUS']['active'], $_HabboCMS['MUS']['ip'], $_HabboCMS['MUS']['port'], $_HabboCMS['server']['type'], $_HabboCMS['general']['newbiemotto'], $_HabboCMS['general']['startcredits'], $_HabboCMS['general']['startpixels'], $_HabboCMS['mail']['supportmail'], $_HabboCMS['mail']['replyto'], $_HabboCMS['facebook']['enabled'], $_HabboCMS['facebook']['app_id'], $_HabboCMS['facebook']['app_id_secret'], $_HabboCMS['facebook']['permissions'], $_HabboCMS['twitter']['name'])) die("Missing variable from configuration file, please re-install HabboCMS");
/* Check if language and server files exists */ if(!file_exists(X . S . B . L . $_HabboCMS['website']['language'] . '.php')) die("Could not find your HabboCMS Config file. Please re-install HabboCMS"); //Check if language file exists if(!file_exists(X . S . B . E . $_HabboCMS['server']['type'] . '.php')) die("Could not find Database settings. Please re-install HabboCMS"); //Check if server files exists
/* Get language file and server file */ //require X . S . B . L . $_HabboCMS['website']['language'] . '.php'; require X . S . B . E . $_HabboCMS['server']['type'] . '.php';
/* Check if data comes from CloudFlare and get real IP Adress */ if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; //define('USING_CLOUDFLARE', true); }
/* Start Sessions */ session_start();
/* Check if banned */ if (!empty($_SESSION['website_banned'])) { header("Location: /banned"); exit; }
/* Check if all class files exists */ if(!file_exists(X . S . "functions.habbocms.php")) die("Could not find class file <b>fucntions.habbocms.php</b>. Please re-install HabboCMS"); if(!file_exists(X . S . "translator.habbocms.php")) die("Could not find class file <b>translator.habbocms.php</b>. Please re-install HabboCMS"); if(!file_exists(X . S . "core.habbocms.php")) die("Could not find class file <b>core.habbocms.php</b>. Please re-install HabboCMS"); if(!file_exists(X . S . "sql.habbocms.php")) die("Could not find class file <b>sql.habbocms.php</b>. Please re-install HabboCMS"); if(!file_exists(X . S . "users.habbocms.php")) die("Could not find class file <b>users.habbocms.php</b>. Please re-install HabboCMS"); if(!file_exists(X . S . "template.habbocms.php")) die("Could not find class file <b>template.habbocms.php</b>. Please re-install HabboCMS"); if(!file_exists(X . S . "plugins.habbocms.php")) die("Could not find class file <b>plugins.habbocms.php</b>. Please re-install HabboCMS");
/* Include server files */ require X . S . "functions.habbocms.php"; require X . S . "translator.habbocms.php"; require X . S . "core.habbocms.php"; require X . S . "sql.habbocms.php"; require X . S . "users.habbocms.php"; require X . S . "template.habbocms.php"; require X . S . "plugins.habbocms.php";
/* Install and set variables for system class files */ $core = new HabboCMS; $sql = new HabboSQL; $users = new HabboUsers; $plugins = new HabboPlugins; $html = new HabboTemplate; ?>
<?php class HabboTranslator { public $s = array(); function __construct($page) { global $_HabboCMS; $start = microtime(true); $sections = explode(',', $page); foreach ($sections as $page) { require X . S . B . L . $_HabboCMS['website']['language'] . '.php'; $this->s = array_merge($this->s,$s); } $total_time = round(((microtime(true)) - $start), 4); echo '<!-- language system installed in: ' . $total_time . ' secounds -->'; } /*Removes cache that was generated when the class was called*/ public function clear_cache() { unset($this->s); $this->s = array(); return true; }
public function s($key, $replace = array()) { $key = $this->s[$key];
}
} ?>
I will make an video of me developing soon ;)
09-11-12
AppleLion
Re: HabboCMS [PHP, MySQL] [All Emus]
I can translate it to Dutch if you Like ;D
13-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
Working on habblet/ajax but its killing me, any suggestions?
maybe how to debug what habbo.com does when it sends headers etc
17-11-12
AppleLion
Re: HabboCMS [PHP, MySQL] [All Emus]
I use now PHPRETRO, but i dont wanna lose user accounts or that they must make a NEW account... Can you make a thing that you can use a another Password Hash code? So people dont lose there users :(
18-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by AppleLion
I use now PHPRETRO, but i dont wanna lose user accounts or that they must make a NEW account... Can you make a thing that you can use a another Password Hash code? So people dont lose there users :(
That would be possible, I can do that
18-11-12
NoBrain
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by AppleLion
I use now PHPRETRO, but i dont wanna lose user accounts or that they must make a NEW account... Can you make a thing that you can use a another Password Hash code? So people dont lose there users :(
That's easy, just set the hashing algorithm in the configuration so it can be changed, it will also need the salt in the configuration. :)
SHA-3 FTW!
18-11-12
Hejula
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by ησвяαιη
That's easy, just set the hashing algorithm in the configuration so it can be changed, it will also need the salt in the configuration. :)
SHA-3 FTW!
SHA-3 is pretty impressive. Just read the Wiki page about it!
I hope he can make a thing that i can import my users and that the progam can change it to the Hash of that CMS.
Idea:
A tool to import users that change all password Hashes to the new Hash.
18-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by AppleLion
Im not a expert in that things O_O
I hope he can make a thing that i can import my users and that the progam can change it to the Hash of that CMS.
Idea:
A tool to import users that change all password Hashes to the new Hash.
Not planing on using the same hash method as PHPRetro, so there will be like a button saying "Click here to import your old account" and they type in username and password and it automaticlly changes the hash. Like Sulake did when they merged the english speaking hotels
19-11-12
AppleLion
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Oleaa
Not planing on using the same hash method as PHPRetro, so there will be like a button saying "Click here to import your old account" and they type in username and password and it automaticlly changes the hash. Like Sulake did when they merged the english speaking hotels
That's GREAT! You're Amazing:ott:
24-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
I'm starting to hate PHP more and more,
so fuck PHP I will go for ruby with rails next time
24-11-12
Joopie
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Oleaa
I'm starting to hate PHP more and more,
so fuck PHP I will go for ruby with rails next time
Can you atleast say why you hate PHP? :P
24-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
I created a template system,
the class HabboTemplate is installing the page with function __construct which makes me not allow to make another class or call other db functions ($db, $sql, $general_sql etc) without getting the member function error.
If that made sense
Im sure I have done something wrong or there is a fix on this but... fml
24-11-12
Joopie
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Oleaa
I created a template system,
the class HabboTemplate is installing the page with function __construct which makes me not allow to make another class or call other db functions ($db, $sql, $general_sql etc) without getting the member function error.
If that made sense
Im sure I have done something wrong or there is a fix on this but... fml
Error message and code of where the line is, and maybe your template class?
Maybe I can help you :)
29-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
New plugin class
PHP Code:
<?php class HabboPlugins { public $plugins = array(); private $keys = array( 'current_page' => URL, 's' => S, 'e' => E, 'p' => P, 'b' => B, );
function __construct() { global $_HabboCMS, $users, $debug, $core; if(!$_HabboCMS['website']['plugins']) return false; $debug->StartClock('plugins'); $xml = json_decode(json_encode((array) simplexml_load_string(file_get_contents(X . S . P . 'plugins.xml'))), 1); $this->plugins = $xml; foreach($xml as $name => $array) { if(isset($xml[$name]['@attributes']['active']) && $xml[$name]['@attributes']['active'] == 1) { require $this->filter($xml[$name]['path']) . $xml[$name]['onload']; } } echo '<!-- Took to ' . $debug->StopClock('plugins') . ' secounds to load plugins -->'; }
// In wamp like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path // of the certificate as shown below. // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { // error_log("Got " . curl_error($ch) . " when processing IPN data"); curl_close($ch); exit; } curl_close($ch);
// STEP 3: Inspect IPN validation result and act accordingly
if (strcmp ($res, "VERIFIED") == 0) { // check whether the payment_status is Completed // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email // check that payment_amount/payment_currency are correct // process payment
} else if (strcmp ($res, "INVALID") == 0) { // log for manual investigation die("Invalid."); } ?>
Source: x.com
29-11-12
harbihotel
Re: HabboCMS [PHP, MySQL] [All Emus]
This is looking awesome. Can't wait for a release to use with my Phoenix Emu.
29-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Geese
Your structure is brutal from the snippets you provided. You have a bunch of good ideas and features but your strategy to implement them is wrong. You will find your project harder and harder to develop as you add more modules and wrappers to your project because of the poor structure it has. This will turn away customers, which will make all of this pointless.
I highly suggest you start over rather than build from what you have or do a simpler project.
yeah, maybe. I need to work alot with the structureand how things are combined
Quote:
This will turn away customers, which will make all of this pointless.
I'm mainly coding for my own hotel so there is a point.
Changes: Plugin system now using JSON for config reading instead of XML
29-11-12
seanrom
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Geese
No because you are posting this in the development section which means it's supposed to be released. What's the point in making something and releasing it if only you plan to use it? The community cannot use this, it's horrid. Nobody can extend your code, so why would they switch when they can easily extend on Uber CMS and other CMSs that poses a strong structure.
I stick with my opinion that you should start over or do a smaller project.
Yes, it will be released, and if people don't wanna use it? Idc.
If people don't wanna 'extend' it? Idc.
Also I want to know where the code is so 'horrid' and in what snippet. Most of the snippets I have posted is now completly changed now anyways.. How can you drag out of nowhere that the structure is bad without even seeing the whole script? How it all works together?
Thanks for the feedback. I'll work on the structure as I've said. I also challenge you to make something better that the community can "use" or people can "extend" and the structure is perfect.
29-11-12
Raz0rDot
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Geese
This will turn away customers, which will make all of this pointless.
Customers? He's not going to sell this or make profit from the CMS. I suggest you get your facts straight. HabboCMS doesn't have a bad structure as long as the main dev. understands it, and it's functional. Other developers could use the plugin hook, or templating system for further developing after this.
Retros themselves are pointless if you mean a bad structure makes them lose "customers". As long as no-one pays anything for it, there's no customers involved. Only users and maybe a few whom decide to develop from this CMS. Even that shouldn't matter. Users won't go into the codes unless they develop it, and still that wouldn't really be necessary considering the fact that there's a plugin hook function as well.
I'll agree with you that it's not easy to extend from it, but not many people really care for that these days. Just look at phoenix. Too many use the non-cracked version as they don't care that they cannot extend it themselves, or are just too lazy to do so.
This CMS will definitely be a great asset to the community even though it's not easy to extend from.
You sir made my day.
30-11-12
AppleLion
Re: HabboCMS [PHP, MySQL] [All Emus]
Quote:
Originally Posted by Oleaa
People set their own hash in the config file.
Heres also the PayPal API that i use.
Removed the give vip and credits etc part, you can do that yourself not that hard!
PHP Code:
<?php
ini_set('display_errors', 1);
$contents = '';
// STEP 1: Read POST data
// reading posted data from directly from $_POST causes serialization
// issues with array data in POST
// reading raw POST data from input stream instead.
$raw_post_data = file_get_contents('php://input');
$raw_post_array = explode('&', $raw_post_data);
$myPost = array();
foreach ($raw_post_array as $keyval) {
$keyval = explode ('=', $keyval);
if (count($keyval) == 2)
$myPost[$keyval[0]] = urldecode($keyval[1]);
}
// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';
if(function_exists('get_magic_quotes_gpc')) {
$get_magic_quotes_exists = true;
}
foreach ($myPost as $key => $value) {
if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {
$value = urlencode(stripslashes($value));
} else {
$value = urlencode($value);
}
$req .= "&$key=$value";
}
// STEP 2: Post IPN data back to paypal to validate
// In wamp like environments that do not come bundled with root authority certificates,
// please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path
// of the certificate as shown below.
// curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
if( !($res = curl_exec($ch)) ) {
// error_log("Got " . curl_error($ch) . " when processing IPN data");
curl_close($ch);
exit;
}
curl_close($ch);
// STEP 3: Inspect IPN validation result and act accordingly
if (strcmp ($res, "VERIFIED") == 0) {
// check whether the payment_status is Completed
// check that txn_id has not been previously processed
// check that receiver_email is your Primary PayPal email
// check that payment_amount/payment_currency are correct
// process payment
// In wamp like environments that do not come bundled with root authority certificates,
// please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path
// of the certificate as shown below.
// curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
if( !($res = curl_exec($ch)) ) {
// error_log("Got " . curl_error($ch) . " when processing IPN data");
curl_close($ch);
exit;
}
curl_close($ch);
// STEP 3: Inspect IPN validation result and act accordingly
if (strcmp ($res, "VERIFIED") == 0) {
// check whether the payment_status is Completed
// check that txn_id has not been previously processed
// check that receiver_email is your Primary PayPal email
// check that payment_amount/payment_currency are correct
// process payment
// In wamp like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path // of the certificate as shown below. // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { // error_log("Got " . curl_error($ch) . " when processing IPN data"); curl_close($ch); exit; } curl_close($ch);
// STEP 3: Inspect IPN validation result and act accordingly
if (strcmp ($res, "VERIFIED") == 0) { // check whether the payment_status is Completed // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email // check that payment_amount/payment_currency are correct // process payment