[Development] WambaPHP- The C_CMS that does everyhting! [Development]

Status
Not open for further replies.

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
Note: This will not be abandoned like CookieMS. I am actually having fun with this project.
-----

WambaPHP


Overview-
WambaPHP is a C_CMS ( Component Content Management System ) that does anything you need it to do. Easily. The C_CMS is now for Habbo usage, however, it was originally coded for blogging use.

Features-
  • MySQLi & PDO Database Connections.
  • Organization to the MAX.
  • Fully functional Admin Panel.
  • Template switching with pretty url's.
  • Shortcut params. {sitename}.
  • Support for the latest Xampp and IIS Builds.
  • Fully documented.
  • Version checker/Update notification system.
  • Database backups. (Configurable to set time/date.)
  • Page Caching.
  • Error logging.
Changelog (UPDATED)-
PHP:
###########################################################
 
# _    _                _          _____ _  _  _____  #
 
#| |  | |              | |        | ___ \ | | || ___ \  #
 
#| |  | | __ _ _ __ ___ | |__  __ _| |_/ / |_| || |_/ /  #
 
#| |/\| |/ _` | '_ ` _ \| '_ \ / _` |  __/|  _  ||  __/  #
 
#\  /\  / (_| | | | | | | |_) | (_| | |  | | | || |      #
 
# \/  \/ \__,_|_| |_| |_|_.__/ \__,_\_|  \_| |_/\_|      #
 
###########################################################
 
# -> WambaPHP Coded by CookieMonsta. Build 1.0.0b        #
 
# -> Changelog and Buglog are listed below.              #
 
###########################################################
 
 
 
 
 
 
 
 
 
# 11/1/12
 
    * Changelog
 
        + Started admin panel.
 
        + Ranking system 100% coded.
 
        + New admin panel functions. (delete user, make user admin, user list, make article)
 
        - Removed top header. It was ugly as fuck. (Default template.)
 
        + Added HABBO intergration. Users can now modify their settings to make WambaPHP a HABBO cms.
 
        + Blogging system coded 100%.
 
        - Removed article comments for now. It was bugging up the cms.
 
        + Page caching re-added in next BETA build.
 
        + Started to work on a new $_POST and $_GET filter.
 
    * Buglog
 
        * Any user can enter the admin panel.
 
        * There is MANY exploits. We will maybe add a filter later.
 
        * The params are not supported in any other directory then /Templates/{skin}
 
# 10/31/12 (mm/dd/yy)
 
    * Changelog
 
        + Added advanced error messages with some CSS styling.
 
        + Fixed a bug within the MySQL class that would not notify you of db errors.
 
        + Certain content is now only allowed to logged in users. (Configurable soon.)
 
        + Default Template is now highly recommended for best performance.
 
        + Full login page is now complete.
 
        + Security update: loggin in will now have a new method. -> login->loginproc->security_check-> Logged in.
 
        + Logged out page is now coded.
 
    * Buglog
 
        * There is MANY exploits. We will maybe add a filter later.
 
        * The params are not supported in any other directory then /Templates/{skin}
 
# 10/30/12 (mm/dd/yy)
 
    * Changelog
 
        + Started the project.
 
        + Created a simple MySQL class.
 
        + Created a simple Template class.
 
        + Created custom Urls for the template sys. (/index.php?page=[name])
 
        + Added funcitons & library directory along with a relocated classes folder.
 
        + Template choosing now working 100%. (configurable in the configuration AND installer.)
 
        + Started to create Login and registration forms.
 
        + Started the default template. (Credits to RastaLulz, owner of http://thehabbos.org for style.)
 
        + Created simple assets directory for each template.
 
        + Cleaned up core and classes files.
 
        + New storage folder added for cached pages, db backups, and error logs.
 
        + Proper configuration created.
 
        - Removed page cache for now. There was many bugs.
 
    * Buglog
 
        * The params are not supported in any other directory then /Templates/{skin}.

Development Snapshots (Default theme by )!
f8e66e983bc44951ae35ad9.png

511094b5c92f44268c2967e.png

d85967920cfb4329943ff35.png






Snippets-

Template Class
PHP:
<?php
    /*================================================================+\
    || # WambaPHP- An all around Component Content Management System. ||
    |+================================================================+|
    || # Copyright (C) 2012 CookieMonsta. All rights reserved.        ||
    || # http://www.devbest.com/user/CookieMonsta                    ||
    || # This was a scratch development. Love to devbest for support! ||
    |+================================================================+|
    || # WambaPHP is provided "as is" and comes without              ||
    || # warrenty of any kind. WambaPHP is free software!            ||
    || # License: GNU Public License 3.0                              ||
    || # http://opensource.org/licenses/gpl-license.php              ||
    \+================================================================*/
 
    /*
    *
    *  WambaPHP- Template Class
    *
    */
 
    // #################################################################
    // Secure this file.
        if(!Defined('WambaPHP_Secure')) die ("Direct Access Denied");
 
    // #################################################################
    // Start script. 
        // Define the template.
            Define('Skin',  $_CONFIG['Site']['Template']);
        // Define the class.
            class Template
    {
            private $values = Array();
            private $language;
            private $tpl;
 
            public function __construct()
        {
        // Gather config settings.
            Global $_SETTINGS, $_CONFIG;
        // Site params.
            $this->AddParam('Sitename', $_CONFIG['Site']['Name']);
            $this->AddParam('Sitemotto', $_CONFIG['Site']['Motto']);
            $this->AddParam('Template', $_CONFIG['Site']['Template']);
            $this->AddParam('Url', $_CONFIG['Site']['Url']);
            $this->AddParam('Skin', $_CONFIG['Site']['Template']);
            $this->AddParam('Username', $_SESSION['username']);
     
        }
            public function filter($values)
        {
            foreach($this->Value as $replace => $value) { $values = str_replace("{" . $replace . "}", $value, $values); }
            return $values;
        }
            public function Write($data)
        {
            $replace = $data.PHP_EOL;
            $this->tpl .= $replace;
        }
            public function AddParam($Tag, $Value)
        {
            $this->Value[$Tag] = $Value;
        }
            public function AddFile($file)
        {
            ob_start();
            if (file_exists('Application/Templates/' . Skin . '/' . $file . '.html'))
        {
            Require_once('Application/Templates/' . Skin . '/' . $file . '.html');
        } else {
            Die('<center><div style="width: 50%; border: 2px solid #FF0000; background-color: #FF8C8C; padding: 10px; padding-top: 0; font-family: Arial;"><h3>WambaPHP has Encountered an Error.</h3>WambaPHP has failed to load the template: <b>Application/Templates/ '. Skin .' /'.$file.'.html </b></div></center>');
        }
            $this->tpl .= ob_get_contents();
            ob_end_clean();
        }
            public function Finish()
        {
            print $this->filter($this->tpl);
        }
    }
 
    // #################################################################
    // Exit...
?>

MySQL Class
PHP:
<?php
    /*================================================================+\
    || # WambaPHP- An all around Component Content Management System. ||
    |+================================================================+|
    || # Copyright (C) 2012 CookieMonsta. All rights reserved.        ||
    || # http://www.devbest.com/user/CookieMonsta                    ||
    || # This was a scratch development. Love to devbest for support! ||
    |+================================================================+|
    || # WambaPHP is provided "as is" and comes without              ||
    || # warrenty of any kind. WambaPHP is free software!            ||
    || # License: GNU Public License 3.0                              ||
    || # http://opensource.org/licenses/gpl-license.php              ||
    \+================================================================*/
 
    /*
    *
    *  WambaPHP- MySQL Class
    *
    */
 
    // #################################################################
    // Secure this file.
        if(!Defined('WambaPHP_Secure')) die ("Direct Access Denied");
 
    // #################################################################
    // Start the script.
        // Define the class.
            class MySQL
            {
                public function __construct()
            {
        // Fetch Configuration variables.
          Global $_CONFIG;
              $this->host = $_CONFIG['MySQL']['Hostname'];
              $this->user = $_CONFIG['MySQL']['Username'];
              $this->pass = $_CONFIG['MySQL']['Password'];
              $this->db  = $_CONFIG['MySQL']['Database'];
            }
            public function connect()
            {
              $this->link = @mysql_connect($this->host,$this->user,$this->pass);
              if(!$this->link){ die('<center><div style="width: 50%; border: 2px solid #FF0000; background-color: #FF8C8C; padding: 10px; padding-top: 0; font-family: Arial;"><h3>WambaPHP has Encountered an Error.</h3>There was an error connecting to MySQL. The username or password is incorrect.</div></center>'); }
              if(($this->link) and ($this->db))
            {
              if(@mysql_select_db($this->db,$this->link)) Return True;
            }
                die('<center><div style="width: 50%; border: 2px solid #FF0000; background-color: #FF8C8C; padding: 10px; padding-top: 0; font-family: Arial;"><h3>WambaPHP has Encountered an Error.</h3>There was an error connecting to the database. Please check your configuration.</div></center>');
            }
                public function disconnect()
        {
                @mysql_close($this->link);
        }
        }
 
    // #################################################################
    // End...
?>

Core
PHP:
<?php
    /*================================================================+\
    || # WambaPHP- An all around Component Content Management System. ||
    |+================================================================+|
    || # Copyright (C) 2012 CookieMonsta. All rights reserved.        ||
    || # http://www.devbest.com/user/CookieMonsta                    ||
    || # This was a scratch development. Love to devbest for support! ||
    |+================================================================+|
    || # WambaPHP is provided "as is" and comes without              ||
    || # warrenty of any kind. WambaPHP is free software!            ||
    || # License: GNU Public License 3.0                              ||
    || # http://opensource.org/licenses/gpl-license.php              ||
    \+================================================================*/
 
    /*
    *
    *  WambaPHP- Core
    *
    */
 
    // #################################################################
    // Secure this file.
        if(!Defined('WambaPHP_Secure')) die ("Direct Access is Denied.");
 
    // #################################################################
    // Define class paths to initialize the CMS properly.
        Define('WambaPHP_ROOT','Application/');
        Define('WambaPHP_CONF','Management/');
        Define('WambaPHP_TEMP','Templates/');
        Define('WambaPHP_FUNC','Functions/');
        Define('WambaPHP_STOR','Storage/');
        Define('WambaPHP_LBRY','Library/');
        Define('WambaPHP_CLSS','Classes/');
 
    // #################################################################
    // Require class paths to initialize the CMS properly.
        // Require the error log core file to make it work properly.
            Require_once WambaPHP_ROOT . WambaPHP_STOR . 'Error_logs/Global.php';
        // Require configuration variables to use the users settings on the cms.
            Require_once WambaPHP_ROOT . WambaPHP_CONF . 'Configuration.php';
        // This template class initializes the enviroment to be able to use the template system.
            Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_CLSS . 'Class.Template.php';
        // Require the MySQL class so the cms is able to retrieve tables (etc) from the MySQL host.
            Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_CLSS . 'Class.MySQL.php';
        // Require this to grab the current date/time from MySQL.
            Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_FUNC . 'Function.Get_date.php';
        // Just an extra function.
            Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_FUNC . 'Function.Set_chmod.php';
     
    // #################################################################
    // Initialize WambaPHP's enviroment.
        // Initialize the MySQL Engine.
            $MySQL = new MySQL();
        // Initialize the Template
            $Template = new Template();
        // Connect to MySQL...
            $MySQL->connect();
     
    // #################################################################
    // End...
?>


If you are interested in testing some stuff, you can try my demo here: Just please don't DoS that ip. Be nice :)
NOTE!: I know there is major exploits, i havent made a filter yet. :)

Thanks!
 

Beast

Posting Freak
Sep 15, 2011
625
163
What is this cms for? Seems alot like thehabbos theme and I hope this is you actually coding. Also I wouldn't be impressed if someone ddos you lol.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
What is this cms for? Seems alot like thehabbos theme and I hope this is you actually coding. Also I wouldn't be impressed if someone ddos you lol.
The cms is basicly a cms that will support blogging, and habbo. It will be configurable.
And yeh, the habbos template.
 

Beast

Posting Freak
Sep 15, 2011
625
163
The cms is basicly a cms that will support blogging, and habbo. It will be configurable.
And yeh, the habbos template.

O lawd, why rip thehabbos theme... also I dont like the idea of "Blogging and habbo" but best of luck.
 

Magic

Posting Freak
Oct 11, 2012
1,026
196
What is this cms for? Seems alot like thehabbos theme and I hope this is you actually coding. Also I wouldn't be impressed if someone ddos you lol.

Sort of agree with him, It looks a lot like thehabbos. A bit risky
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
O lawd, why rip thehabbos theme... also I dont like the idea of "Blogging and habbo" but best of luck.
Well, its like.. Put it this way. You have 2 classes to the cms. Habbo, Blogging. For bloggers, you can make templates, and blog. for habbotards, you can make themes also, and use the cms as a habbo cms. With the support of multiple emulators too.

And for the template, ill change it soon. Once again, its only a template. Not the actual cms. So when its released, if i still have the default as thehabbos template, you can change it.
 

Beast

Posting Freak
Sep 15, 2011
625
163
Well, its like.. Put it this way. You have 2 classes to the cms. Habbo, Blogging. For bloggers, you can make templates, and blog. for habbotards, you can make themes also, and use the cms as a habbo cms. With the support of multiple emulators too.

And for the template, ill change it soon. Once again, its only a template. Not the actual cms. So when its released, if i still have the default as thehabbos template, you can change it.

Just go with 2 separate cms ...
 

Khalil

IDK
Dec 6, 2011
1,642
786
1#: If your making a cms from "scratch" why not just make a template from scratch too, instead of ripping josh.
2#: I haven't currently saw any big difference from the functions included in the same, what does make this cms unique or different from other cms's (other than the codes).
3#: Are you codes from scratch ? Cause i think i saw that template class somewhere.

Other than what i'v listed, it looks fine, good luck.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
1#: If your making a cms from "scratch" why not just make a template from scratch too, instead of ripping josh.
2#: I haven't currently saw any big difference from the functions included in the same, what does make this cms unique or different from other cms's (other than the codes).
3#: Are you codes from scratch ? Cause i think i saw that template class somewhere.

Other than what i'v listed, it looks fine, good luck.
1. Agreed.
2. It just started. Duh it has nothing unique yet xD
3. Scratch. View the changelog for more info on that.
Don't give up, if you do i'll cut you where it hurts.
Lul.
 

Queef

Some people...
Jul 27, 2012
645
289
Protect your PC from your mother this time.
Don't just delete it cause you feel like it.
Don't say your leaving habbo again and come back weeks later.

Do all that and ill be impressed.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
Protect your PC from your mother this time.
Don't just delete it cause you feel like it.
Don't say your leaving habbo again and come back weeks later.

Do all that and ill be impressed.
[2] this.
I didn't delete it. I just didnt feel like doing it anymore, and abondoned it. 
Moderator: Move to habbo section please. I will update the thread in a minute.
 
Jan 17, 2012
649
166
Some of this code looks familiar to the DevBest Starter Kit by .

Good luck with this anyway.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
Some of this code looks familiar to the DevBest Starter Kit by @garretjoey.

Good luck with this anyway.
Yes, but no. What you see familiar is the MySQL class wich was originally created by someone on stackoverflow. And then garretjoey made it into his kit. I used that MySQL class. But only for now. I plan on connecting to the db via MySQLi as it has been proven faster.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
New habbo index.

d85967920cfb4329943ff35.png
 
WambaPHP Build 1.0.0b


Hello. When i was in the development of CookieMS i never released any betas or that, so now i will with my new project.

Whats Included-
  • MySQL Class.
  • Template Class.
  • Habbo Template index page.
  • Custom web-gallery.
  • Extendable!
You may develop upon it if you wish. It's really fun to work on top of. (The cms is still in development obvs.)
Note: To install, for now untill the installer is done, navigate to Application/Management/Configuration.php
Templates are stored in Application/Templates/{template}/'. $file .'.html
TO USE THE PAGE SYSTEM: (should be stored in Application/Templates/{template}/'. $file .'.html)
Credits-
  • CookieMonsta | Development, creating, etc.
  • AmirZ | Ripping web-gallery.
  • Habbo.com | Habbo template.
  • garetyjoey | Page system.
NOTE THAT THE CMS IS STILL GOING TO BE DEVELOPED! THIS IS JUST FOR PEOPLE THAT WISH TO BUILD ON TO THIS!

For more info, report to the dev thread:

Download:  
New quickregister.

e41878dcbde84115b83181e.png
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
does the FB Login works?
Facebook login isn't working yet. However, it will be availible in the next beta build.

Register (after choosing your birthday and sex):
35b63d9a629940f3b853354.png
 
Status
Not open for further replies.

Users who are viewing this thread

Top