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!

MinCMS - RevCMS for Arcturus

Status
Not open for further replies.
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
MinCMS is a 2017 RevCMS edit to make it better and faster.
There's not much RevCMS code left :D

Github:

Bugs
- admin (housekeeping) not working (don't know why)
gif of base theme
dimaklt - MinCMS - RevCMS for Arcturus - RaGEZONE Forums

v0.2 will have many changes

Emulator and Database compatibility: Arcturus

What has changed so far?

Code:
  - config moved to root
  - language support added
  - interfaces removed
  - class.forms.php removed
  - MySQLi instead of MySQL
  - beautiful URLs
  - folder names changed
    - ase -> admin
    - app -> src
      - template -> view
        - skins -> views
          - hk -> admin
  - file names changed
    - class.*.php -> *.php
    - class.template.php -> view.php

Code Snippets
- config.php
Code:
<?php
  if(!defined('IN_INDEX')) { die(header('location: ./404')); }

  $config = (object) array(
    'in_dev' => true,
    'view' => 'hobba',
    'lang' => 'de',

    'mysql' => (object) array(
      'hostname' => 'localhost',
      'username' => 'root',
      'password' => '',
      'database' => 'habbo',
      'port' => 3306
    ),

    'hotel' => (object) array(
      'url' => 'http://localhost/',
      'name' => 'Habbo',
      'desc' => 'Best hotel around!',
      'email' => 'support@habbo.com',
      'in_maint' => false,

      'motto' => 'I <3 Habbo!',
      'credits' => 5000,
      'look_male' => 'hr-831-37.sh-305-62.wa-2007-0.lg-270-79.hd-180-1.ch-215-90',
      'look_female' => 'hd-600-1.lg-3057-82.ch-820-1330-1408.sh-3035-1325.hr-515-1396',

      'server_ip' => '127.0.0.1',
      'server_port' => 30000,

      'external_vars' => 'http://localhost/swf/gamedata/external_variables.txt',
      'external_texts' => 'http://localhost/swf/gamedata/external_flash_texts.txt',
      'product_data' => 'http://localhost/swf/gamedata/productdata.txt',
      'furni_data' => 'http://localhost/swf/gamedata/furnidata.xml',
      'swf_folder' => 'http://localhost/swf/gordon/PRODUCTION-201512170847-152005991/',
      'habbo_swf' => 'Habbo.swf'
    ),

    // invisible recaptcha
    'recaptcha' => (object) array(
      'active' => false,
      'key_private' => '',
      'key_site' => ''
    ),

    'social' => (object) array(
      'twitter' => '',
      'facebook' => '',
      'instagram' => ''
    )
  );

?>

- engine.php
Code:
<?php if (!defined('IN_INDEX')) { die(header('location: ../404')); }
  class engine {
    private $connected;
    public $mysqli;

    public function Initiate() {}

    public function __construct() {
      global $core, $config;

      if (!$this->connected) {
        $this->mysqli = new mysqli($config->mysql->hostname, $config->mysql->username, $config->mysql->password, $config->mysql->database) or exit($core->systemError('MySQLi Engine', 'MySQLi could not connect to host or database'));
        $this->connected = true;
      }
    }

    public function disconnect() {
      global $core;

      if ($this->connected) {
        if ($this->mysqli->close()) {
          $this->connected = false;
        } else {
          $core->systemError('MySQLi Engine', 'MySQLi could not disconnect.');
        }
      }
    }

    public function secure($var) {
      return $this->mysqli->real_escape_string(stripslashes(htmlspecialchars($var)));
    }

    public function query($sql) {
      return $this->mysqli->query($sql) or die($this->mysqli->error);
    }
  }
?>

How to make your own theme?
Code:
- enter src/view/views
  - create folder
    <theme name>
      -> admin
        -> src
          -> css (place your .css files here)
          -> js (place your .js files here)
          -> img (place your image files here)
      -> src
        -> css (place your .css files here)
        -> js (place your .js files here)
        -> img (place your image files here)
        -> hotel (needed for client, use the one provided in base theme)
      -> hotel.php (used to be client.php, use the one provided in base theme)
      -> logout.php (use the one provided in base theme)
  - need anything, just grab it from base theme


Credits
- MinCMS -> dimaklt
- RevCMS -> Kryptos
 
Last edited:
Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
Re: MinCMS - The RevCMS Edit you've been waiting for!

Not to whine but.. You took away the two reasons people still use Rev

1. They already know the structure and how to get it up and running easily.
2. The massive amount of out of the box compatible themes it has.

The second being the most important imo.

Adding prepared statements is nice and all, but most of the guys that use rev isn't going to know what that is and how to use it when they add raw php into their views because, hey, that's how rev folks roll.

On a better note, what other plans do you have for it?
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
Re: MinCMS - The RevCMS Edit you've been waiting for!

Not to whine but.. You took away the two reasons people still use Rev

1. They already know the structure and how to get it up and running easily.
2. The massive amount of out of the box compatible themes it has.

The second being the most important imo.

Adding prepared statements is nice and all, but most of the guys that use rev isn't going to know what that is and how to use it when they add raw php into their views because, hey, that's how rev folks roll.

On a better note, what other plans do you have for it?

1. It's easy to set up and I will make some themes for it (Priv like theme for example).
2. Out of the box compatible themes won't really work with Arcturus and RevCMS itself isn't made for the Arcturus database.

I'd like to keep some basics like {hotelname} and add more (if possible).
I thought about Bootstrap, but I don't really like it.

Housekeeping will be the next I work on after I finish user settings and homes in my theme (demo hotel will be available soon).

Suggestions are accepted :)
 
Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
Re: MinCMS - The RevCMS Edit you've been waiting for!

I will make some themes for it (Priv like theme for example).

They don't want a few themes, they want all the themes.

If you are going to edit rev, make it unique. Add some new features that makes this cms worth using. Right now you're offering prepared statements for hundreds of themes. Not really a trade most users are going to take.
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
Re: MinCMS - The RevCMS Edit you've been waiting for!

They don't want a few themes, they want all the themes.

If you are going to edit rev, make it unique. Add some new features that makes this cms worth using. Right now you're offering prepared statements for hundreds of themes. Not really a trade most users are going to take.

There are already new features and more to come.
- language system
- clean code
- beautiful urls ~ /home/<username> instead of /index.php?url=home&user=<username>
- more config options
- Arcturus compatibility
- MySQLi
- ..

Most themes I saw were just image edits of habbos old theme with really bad and unsecure code.

Honestly.. I don't like PHP that much. But I wanted to recode Rev for years now. I'm still a beginner with PHP and MySQL.
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Oct 26, 2012
Messages
2,357
Reaction score
1,086
I was excited when I saw the Arcturus CMS part, it went a bit down when I saw it's based on RevCMS. Nonetheless, good luck with your development! Maybe you should go over to a scratch CMS, but if you don't, I still would encourage you to finish it.
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
Github:

- admin (housekeeping) not working (don't know why)

gif of base theme:

dimaklt - MinCMS - RevCMS for Arcturus - RaGEZONE Forums


v0.2 will have many changes
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
Try to be consistent, avoid global variables and use spaces not tabs. Try to comment your code as well, it's good practice and helps even the most experienced developer. Also try to avoid doing the following using if statements:

dimaklt - MinCMS - RevCMS for Arcturus - RaGEZONE Forums


dimaklt - MinCMS - RevCMS for Arcturus - RaGEZONE Forums

How to avoid global variables in functions?

I don't like the if statements there too.
 
Junior Spellweaver
Joined
Jun 16, 2016
Messages
119
Reaction score
41
MinCMS is a 2017 RevCMS edit to make it better and faster.
There's not much RevCMS code left :D



Github:

Bugs
- admin (housekeeping) not working (don't know why)
gif of base theme
dimaklt - MinCMS - RevCMS for Arcturus - RaGEZONE Forums

v0.2 will have many changes

Emulator and Database compatibility: Arcturus

What has changed so far?

Code:
  - config moved to root
  - language support added
  - interfaces removed
  - class.forms.php removed
  - MySQLi instead of MySQL
  - beautiful URLs
  - folder names changed
    - ase -> admin
    - app -> src
      - template -> view
        - skins -> views
          - hk -> admin
  - file names changed
    - class.*.php -> *.php
    - class.template.php -> view.php

Code Snippets
- config.php
Code:
<?php
  if(!defined('IN_INDEX')) { die(header('location: ./404')); }

  $config = (object) array(
    'in_dev' => true,
    'view' => 'hobba',
    'lang' => 'de',

    'mysql' => (object) array(
      'hostname' => 'localhost',
      'username' => 'root',
      'password' => '',
      'database' => 'habbo',
      'port' => 3306
    ),

    'hotel' => (object) array(
      'url' => 'http://localhost/',
      'name' => 'Habbo',
      'desc' => 'Best hotel around!',
      'email' => 'support@habbo.com',
      'in_maint' => false,

      'motto' => 'I <3 Habbo!',
      'credits' => 5000,
      'look_male' => 'hr-831-37.sh-305-62.wa-2007-0.lg-270-79.hd-180-1.ch-215-90',
      'look_female' => 'hd-600-1.lg-3057-82.ch-820-1330-1408.sh-3035-1325.hr-515-1396',

      'server_ip' => '127.0.0.1',
      'server_port' => 30000,

      'external_vars' => 'http://localhost/swf/gamedata/external_variables.txt',
      'external_texts' => 'http://localhost/swf/gamedata/external_flash_texts.txt',
      'product_data' => 'http://localhost/swf/gamedata/productdata.txt',
      'furni_data' => 'http://localhost/swf/gamedata/furnidata.xml',
      'swf_folder' => 'http://localhost/swf/gordon/PRODUCTION-201512170847-152005991/',
      'habbo_swf' => 'Habbo.swf'
    ),

    // invisible recaptcha
    'recaptcha' => (object) array(
      'active' => false,
      'key_private' => '',
      'key_site' => ''
    ),

    'social' => (object) array(
      'twitter' => '',
      'facebook' => '',
      'instagram' => ''
    )
  );

?>

- engine.php
Code:
<?php if (!defined('IN_INDEX')) { die(header('location: ../404')); }
  class engine {
    private $connected;
    public $mysqli;

    public function Initiate() {}

    public function __construct() {
      global $core, $config;

      if (!$this->connected) {
        $this->mysqli = new mysqli($config->mysql->hostname, $config->mysql->username, $config->mysql->password, $config->mysql->database) or exit($core->systemError('MySQLi Engine', 'MySQLi could not connect to host or database'));
        $this->connected = true;
      }
    }

    public function disconnect() {
      global $core;

      if ($this->connected) {
        if ($this->mysqli->close()) {
          $this->connected = false;
        } else {
          $core->systemError('MySQLi Engine', 'MySQLi could not disconnect.');
        }
      }
    }

    public function secure($var) {
      return $this->mysqli->real_escape_string(stripslashes(htmlspecialchars($var)));
    }

    public function query($sql) {
      return $this->mysqli->query($sql) or die($this->mysqli->error);
    }
  }
?>

How to make your own theme?
Code:
- enter src/view/views
  - create folder
    <theme name>
      -> admin
        -> src
          -> css (place your .css files here)
          -> js (place your .js files here)
          -> img (place your image files here)
      -> src
        -> css (place your .css files here)
        -> js (place your .js files here)
        -> img (place your image files here)
        -> hotel (needed for client, use the one provided in base theme)
      -> hotel.php (used to be client.php, use the one provided in base theme)
      -> logout.php (use the one provided in base theme)
  - need anything, just grab it from base theme


Credits
- MinCMS -> dimaklt
- RevCMS -> Kryptos

Nice work, good code, i'll check it out! ;)
I have nice themes from Mitchel in HTML & CSS
Take an look, it will be nice if its on the cms
UPDATE
I have fixed that its generate users for the Plus db now
 
Last edited by a moderator:
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
I'll have a look at them and may add one or two :)
 
git bisect -m
Loyal Member
Joined
Sep 2, 2011
Messages
2,171
Reaction score
916
I wish good luck to you.

But I need to advise: Add in your opening message that you are a newbie in programming and this is also for learning. This will likely avoid bad criticism.

Also, try to read some PHP guides. I know that someway learning with practice it's the best way. But some of the bad codes found on your CMS are from Rev, and not yours, so it's not fair you receive the guilty of bad code from RevCMS.

The best way of avoiding Global Variables it's creating Factories, or Storages. Likely Factories for Settings and things like that.

Global variables actually on php 5.6+ are "secure", but it's good following new coding patterns to make a equity and clean code.

Good luck.
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
I wish good luck to you.

But I need to advise: Add in your opening message that you are a newbie in programming and this is also for learning. This will likely avoid bad criticism.

Also, try to read some PHP guides. I know that someway learning with practice it's the best way. But some of the bad codes found on your CMS are from Rev, and not yours, so it's not fair you receive the guilty of bad code from RevCMS.

The best way of avoiding Global Variables it's creating Factories, or Storages. Likely Factories for Settings and things like that.

Global variables actually on php 5.6+ are "secure", but it's good following new coding patterns to make a equity and clean code.

Good luck.

Thank you.

I made some changes that may be on Github soon.
- no nested ifs in register and login anymore
- small fixes


I decided to pause/stop this project and make my own CMS from scratch. Therefore I will learn PHP or use another language (JavaScript) for it.
 
"(still lacks brains)"
Loyal Member
Joined
Sep 2, 2011
Messages
2,371
Reaction score
1,361
Thank you.

I made some changes that may be on Github soon.
- no nested ifs in register and login anymore
- small fixes


I decided to pause/stop this project and make my own CMS from scratch. Therefore I will learn PHP or use another language (JavaScript) for it.

I suggest you learn a proper framework while developing this, for example or , rather than writing something from scratch. This will also help you in enterprise workplaces if you ever decide to go down that route in the far future as a career. Learning multiple frameworks is a big plus. You will also realise how clean frameworks can keep things :)
 
Status
Not open for further replies.
Back
Top