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!

Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi] [PDO]

Status
Not open for further replies.
Joined
Feb 18, 2012
Messages
779
Reaction score
247
JaydenC - Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi] [PDO] - RaGEZONE Forums

What is Project Nevada?

Project Nevada is a content managment system for habbo hotel private servers, written & developed by myself and MerijnZ.


Features:
  • Avatar oriented (multiple avatars)
  • In-depth account settings
  • Huge in-depth housekeeping
  • Housekeeping catalogue creator
  • Profiles
  • Groups
  • Facebook API
  • Forgot password function
  • Private messaging system
  • Online chat API
  • Page creator with site editor in HK
  • Unique user-system
  • Multiple Skins / Templates
  • Full CMS Installer on http://
  • Webshop
  • Paypal IPN + PayGol
  • Multi Language (.lang files with variables around site)
  • Cloudflare class + API
  • Addons (Badgeshop etc)
  • Group forums
  • Database oriented pages + Menu
  • BCStorm + Phoenix Compatibility
  • More then 10+ skins
  • Dutch + English
  • External texts (.txt file for changing error text etc)
  • Housekeeping pin code
  • Editable permissions

These are some pictures of a base design of what we are going to do. There will of course be the basic habbo theme + possibly other CMS themes so you can switch over.


I have the .psd's for all of these files, I'l share when we release the CMS!

Snippets

Please not that these are just snippets, or base code and will be changed.

Router.Class
PHP:
<?php
/*
    .   .                   .      
    |\  |                   |      
    | \ | .-..    ._.-.  .-.| .-.  
    |  \|(.-' \  / (   )(   |(   )   Content Management System
    '   ' `--' `'   `-'`-`-'`-`-'`-  version 1.0 beta
    -----------------------------------------------
    Copyrights (c) 2013 Project Nevada
    This project is developed to imitate Habbo Hotel. All rights
    reserved to the developers of Nevada CMS 
    
    This project is licensed under the MIT license. This means that you may
    redistribute and edit with leaving the copyrights to the developers.
    
    Developers: 
    - Merijn K
    - Jayden C    
*/

namespace Nevada\Mvc;

class Router 
{
    public $pageParam;
    
    public function __construct()
    {
        /**
        * Navigates the webpage. First, we need to
        * explode the page render url and then we are going
        * to navigate each web page.
        */
        
       $this->pageParam = $_GET['url'];
       
       /**
       * If no page requested, just go to the index.
       * Nothing better todo, right?
       */
       
       if(!isset($this->pageParam))
       {
           echo 'Welkom op de index';
       } 
  
       /**
       * If the page that you requested don't exists,
       * give it a 404 Error 
       */
       
       ((file_exists(BASE . '/controller/' . $this->pageParam . '.php')) ?: die('404 error.'));
  
    }
}
?>

[B]Nevada.php[/B]

PHP:
<?php
/*
    .   .                   .      
    |\  |                   |      
    | \ | .-..    ._.-.  .-.| .-.  
    |  \|(.-' \  / (   )(   |(   )   Content Management System
    '   ' `--' `'   `-'`-`-'`-`-'`-  version 1.0 beta
    -----------------------------------------------
    Copyrights (c) 2013 Project Nevada
    This project is developed to imitate Habbo Hotel. All rights
    reserved to the developers of Nevada CMS 
    
    This project is licensed under the MIT license. This means that you may
    redistribute and edit with leaving the copyrights to the developers.
    
    Developers: 
    - Merijn K
    - Jayden C    
*/

namespace Nevada\Mvc;

class _Nevada
{             
    static $getLibs;
    
    /**
    * Here we gonna define the class names into
    * a variable 
    * 
    */
    
    static $core, $router, $request, $response;
         
    public function __construct($checkInstaller = true)
    {
       if($checkInstaller === true)
       {
           if(file_exists(BASE . '/install/installer.php'))
           {
               header('Location: '. BASE .'/install/installer.php');
               exit;
           }
       }
       
       /**
       * We need libraries to load, before we can do anything..
       * So we gonna load libs.
       */
       
       self::$getLibs = array('management', 'libs');
      
       foreach(self::$getLibs as $row)
       {    
           /**
           * Does every directory exists? If it doesnt
           * just give a die to the system.
           */
           
           ((is_dir(BASE . '/' . $row)) ?: die('The directory <b> ' . $row . ' </b> does not exists.'));
           
           foreach(glob(BASE . '/'.$row.'/*.php') as $includedFile)
           {
               require $includedFile;
           }
            
       }
       
      /**
      * Require the necessery classes.
      */
      
      self::$core = new Core();
      self::$router = new Router();

    }

}
?>

Demo

GitHub

We are going to take this development slow, but for sure it will be finished, perfectly.

I'l have a basic demo up soon when we get a theme going & finish the classes.

Note: We wanted to start the development really early so we could post the updates for the next month ongoing. Thanks.
 

Attachments

You must be registered for see attachments list
Last edited:
Chasing 99 Red Balloons
Joined
Jan 9, 2008
Messages
857
Reaction score
229
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Having multiple avatars tied to a single user will also require modifying most servers, however it's nice to see people trying to make something different. How are you planning on handling MVC?
 
Junior Spellweaver
Joined
Dec 24, 2011
Messages
125
Reaction score
39
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Good Luck, with this Dev.
Smart to choose Merijn as developer his PHP is Clean and Nice!!
 
Joined
Feb 18, 2012
Messages
779
Reaction score
247
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Good Luck, with this Dev.
Smart to choose Merijn as developer his PHP is Clean and Nice!!

Yeah merijn is pretty awesome and as much as a total n00b he is he can code php like a motherlover.

Having multiple avatars tied to a single user will also require modifying most servers, however it's nice to see people trying to make something different. How are you planning on handling MVC?

Yes I figured that last night when I was trying to code it, just have a table linking ids probably would be a single query anyways.

Not sure, merijn is handling most of the heavy backend cause he already had something he wrote up for mvc so I will have to look at it later.
 
Junior Spellweaver
Joined
Jan 7, 2012
Messages
155
Reaction score
22
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

PHP:
class Avatar() {
??

And you're using $ENGINE without initializing it (global $ENGINE)
 
Joined
Jun 23, 2010
Messages
2,324
Reaction score
2,195
PHP:
class Avatar() {
??And you're using $ENGINE without initializing it (global $ENGINE)
Can be initialized out of the class

PHP:
class Avatar() {
??And you're using $ENGINE without initializing it (global $ENGINE)
Can be initialized out of the class since its a global variable. Although its not recommend to use globals.
 
Custom Title Activated
Loyal Member
Joined
Oct 26, 2012
Messages
2,357
Reaction score
1,086
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Damn, as I saw Merijn's hate my hope disappeared (yes, I hate him because he flamed my work without seeing it very good), but for you, the thread poster, I wish YOU all the best.

Good luck.
 
Joined
Feb 18, 2012
Messages
779
Reaction score
247
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

PHP:
class Avatar() {
??

And you're using $ENGINE without initializing it (global $ENGINE)

I havent seen th MVC yet or any classes for that matter so I based this off of what I did on my CMS, I'l let merijn change it to work with the system..

Damn, as I saw Merijn's hate my hope disappeared (yes, I hate him because he flamed my work without seeing it very good), but for you, the thread poster, I wish YOU all the best.

Good luck.

Yeah hes an idiot but a crazy php coder : )

Thanks!
 
Joined
Feb 18, 2012
Messages
779
Reaction score
247
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

To all emu developers; if you wan't this compatible with your emulator just send us the name of your EMU + the different structures etc.
 
Experienced Elementalist
Joined
Aug 28, 2012
Messages
214
Reaction score
137
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Hey, Jayden! I want to wish you good luck on you (and Merijn's) project and hope to see more updates!

OF: my ex-girlfriend's name is Nevada lol.
 
Experienced Elementalist
Joined
Mar 24, 2009
Messages
261
Reaction score
121
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Good luck, looking pre' good so far.
 
Joined
Jul 29, 2010
Messages
720
Reaction score
515
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Not bad, but only because Merijn works with you ;D

Hey, Jayden! I want to wish you good luck on you (and Merijn's) project and hope to see more updates!

OF: my ex-girlfriend's name is Nevada lol.
LOL, i guess your ex-girlfriend was ugly like the name?
 
Junior Spellweaver
Joined
Oct 31, 2010
Messages
132
Reaction score
16
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

Goodluck with this Jayden :)!
 
Joined
Feb 18, 2012
Messages
779
Reaction score
247
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

^Thanks

More updates soon, don't even think merijn knows about this thread lol.

I'l be away for 5 days
 
Skilled Illusionist
Joined
Dec 25, 2009
Messages
370
Reaction score
234
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

I didn't know you maked a development thread bro, lol.
Busy now with creating a new GitHub account and downloading Git... It's rly hard for Linux :( *wine*

Well, doesn't matter anyways, here got some st00f for ya.

PHP:
<?php
/*
    .   .                   .      
    |\  |                   |      
    | \ | .-..    ._.-.  .-.| .-.  
    |  \|(.-' \  / (   )(   |(   )   Content Management System
    '   ' `--' `'   `-'`-`-'`-`-'`-  version 1.0 beta
    -----------------------------------------------
    Copyrights (c) 2013 Project Nevada
    This project is developed to imitate Habbo Hotel. All rights
    reserved to the developers of Nevada CMS 
    
    This project is licensed under the MIT license. This means that you may
    redistribute and edit with leaving the copyrights to the developers.
    
    Developers: 
    - Merijn K
    - Jayden C    
*/

namespace Nevada\Mvc;

class Response 
{
    public $_route = array();
    public $sessionStorage = array();
    
    public function __construct()
    {
        /**
        * We need to create a session storage
        * before you can actually use sessions.
        * Lets do it!
        */
        
        try {
            /**
            * Start the session interpreter.
            */
            
            session_start();
			
        }catch(Exception $e)
        {
            trigger_error('Sessions could not start. ' . $e->getMessage());
        }
    }
    
    public function session($key, $value = null)
    {                                           
        if($value == null) {
            $this->sessionStorage = $_SESSION[$key];
            
            /**
            * Check if the session really exists.. If it does
            * exists, we can kill it.
            */
            
            if(isset($this->sessionStorage))
            {
                unset($this->sessionStorage);
            }
        } else
        {
            /**
            * The session does not exists, so we want
            * to create it. Alright, lets do it.
            * 
            * @var Response
            */
           $this->sessionStorage = $_SESSION[$key] = $value; 
        }
        
        return $this->sessionStorage;
        
        
    }
    
    public function init(Closure $route=null)
    {
        $this->_route = $route;
        
        if(is_callable($this->_route))
        {
            $this->_route();
        }
        
    }
}
?>

This class is not done yet. I will post updates as much I can do.

[
Having multiple avatars tied to a single user will also require modifying most servers, however it's nice to see people trying to make something different. How are you planning on handling MVC?

I don't think so. Modifying servers? Explain me more. I don't think that's neceserry.
 
Last edited:
Joined
Feb 18, 2012
Messages
779
Reaction score
247
Re: Project Nevada [MVC] [PHP OOP] [Multi-functional] [MySQLi]

I didn't know you maked a development thread bro, lol.
Busy now with creating a new GitHub account and downloading Git... It's rly hard for Linux :( *wine*

Well, doesn't matter anyways, here got some st00f for ya.

PHP:
<?php
/*
    .   .                   .      
    |\  |                   |      
    | \ | .-..    ._.-.  .-.| .-.  
    |  \|(.-' \  / (   )(   |(   )   Content Management System
    '   ' `--' `'   `-'`-`-'`-`-'`-  version 1.0 beta
    -----------------------------------------------
    Copyrights (c) 2013 Project Nevada
    This project is developed to imitate Habbo Hotel. All rights
    reserved to the developers of Nevada CMS 
    
    This project is licensed under the MIT license. This means that you may
    redistribute and edit with leaving the copyrights to the developers.
    
    Developers: 
    - Merijn K
    - Jayden C    
*/

namespace Nevada\Mvc;

class Response 
{
    public $_route = array();
    public $sessionStorage = array();
    
    public function __construct()
    {
        /**
        * We need to create a session storage
        * before you can actually use sessions.
        * Lets do it!
        */
        
        try {
            /**
            * Start the session interpreter.
            */
            
            session_start();
			
        }catch(Exception $e)
        {
            trigger_error('Sessions could not start. ' . $e->getMessage());
        }
    }
    
    public function session($key, $value = null)
    {                                           
        if($value == null) {
            $this->sessionStorage = $_SESSION[$key];
            
            /**
            * Check if the session really exists.. If it does
            * exists, we can kill it.
            */
            
            if(isset($this->sessionStorage))
            {
                unset($this->sessionStorage);
            }
        } else
        {
            /**
            * The session does not exists, so we want
            * to create it. Alright, lets do it.
            * 
            * @var Response
            */
           $this->sessionStorage = $_SESSION[$key] = $value; 
        }
        
        return $this->sessionStorage;
        
        
    }
    
    public function init(Closure $route=null)
    {
        $this->_route = $route;
        
        if(is_callable($this->_route))
        {
            $this->_route();
        }
        
    }
}
?>

This class is not done yet. I will post updates as much I can do.

[

I don't think so. Modifying servers? Explain me more. I don't think that's neceserry.

No, I think he meant modifying the database at the least. Unless he did it differently. You could simply do it like this

Code:
Table - users_accounts

id - etc
email - attach emails from
accounts - array of accounts (1,34,430 etc)

witch is a simple query at the least.

*UPDATE*
updating main thread

Github -
 
Last edited:
Joined
Feb 18, 2012
Messages
779
Reaction score
247
MIGHT do a license system.. Taking all suggestions as of now.

PS: I guess "Obe A" has been added to our development without my permission.. we'll talk about this merijn :p:
 
Status
Not open for further replies.
Back
Top