-
BeerCMS 2.0.1 [PHP, OOP, From Scratch]
BeerCMS
2.0.1
Introduction
BeerCMS is a lightweight system for Phoenix and Uber. It is designed to provide you with a sleek design, and to give you full security for your Hotel.
Speed
BeerCMS will automatically pre-load pages for you so that the pages will be ready when the animation changes pages. It will also tell the browser to use a cached copy of the page if their is one available.
Test site
You can visit my test site; http://beercms.cz.cc or the new design; http://hejula.net/beercms. This will be updated every week or so, so it won't be up to date.
Stuff within
- Basic user system
- Newsletter system
- Pre-loaded pages
- Phoenix/Uber support
- Neatly coded
- Easily editable Smarty files (TPLs)
- IIS support (provided with a web.config)
- XAMPP support (provided with a .htaccess)
Credits
(also given in the files)
Sledmore - Needed a little bit of CSS from his site
Makarov - Needed a little bit of JQuery from his site
Nominal - Needed a little bit of CSS from his site
Hejula - Helping me with alot of the design
YungTmk - Web hosting for the test site
Screenshot(s)
(scroll through the thread for more)
http://i43.tinypic.com/258z575.png
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Your homepage is hella-bear, good luck.
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Good luck, ash. Remember if you need any help, just contact me on msn. :)
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
You know there is a option in html5 to cache pages?!
http://slides.html5rocks.com/#app-cache
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
joopie
Wow, just found out about that. Thanks!
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Would love to see a snippet and juge how 'neat' this is.
Anywhore, good luck.
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
Kryptos
Would love to see a snippet and juge how 'neat' this is.
Anywhore, good luck.
Global.php
PHP Code:
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* BeerCMS - A lightweight CMS designed for BeerEmu *
* Also works with Phoenix and Uber *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright (c)2011 Steffen *
* Copyright (c)2011 nobrain *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This program is free software: you can redistribute *
* it and/or modify it under the terms of the GNU *
* Public License as published by the Free Software *
* Foundation, either version 3 of the License , or *
* (at your option) any later version. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
require_once '_inc/config.php';
require_once '_inc/core.php';
@session_start();
define(sname, $config['site']['sname']);
define(lname, $config['site']['lname']);
define(host, $config['mysql']['host']);
define(type, $config['mysql']['type']);
define(user, $config['mysql']['user']);
define(pass, $config['mysql']['pass']);
define(data, $config['mysql']['data']);
// Execute
$sql = new sql();
// MySQL connection
$sql->Connect(host, user, pass, data);
?>
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
Jupos
Global.php
PHP Code:
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* BeerCMS - A lightweight CMS designed for BeerEmu *
* Also works with Phoenix and Uber *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright (c)2011 Steffen *
* Copyright (c)2011 nobrain *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This program is free software: you can redistribute *
* it and/or modify it under the terms of the GNU *
* Public License as published by the Free Software *
* Foundation, either version 3 of the License , or *
* (at your option) any later version. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
require_once '_inc/config.php';
require_once '_inc/core.php';
@session_start();
define(sname, $config['site']['sname']);
define(lname, $config['site']['lname']);
define(host, $config['mysql']['host']);
define(type, $config['mysql']['type']);
define(user, $config['mysql']['user']);
define(pass, $config['mysql']['pass']);
define(data, $config['mysql']['data']);
// Execute
$sql = new sql();
// MySQL connection
$sql->Connect(host, user, pass, data);
?>
That's not very neat.... Almost all CMS' do that.
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
Kryptos
That's not very neat.... Almost all CMS' do that.
And you have forgot it is in development, firstly he needs to get everything working, then make it neat. Isn't that the smartest thing to do?
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
Law
And you have forgot it is in development, firstly he needs to get everything working, then make it neat. Isn't that the smartest thing to do?
No, that's not very smart.
That's like me coding something like PhoenixPHP: messy, insecure and procedural style; and then recoding that into something like RevCMS: clean, secure and OOP.
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
I agree. Have one class that dictates how all classes are executed and used.
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
Kryptos
No, that's not very smart.
That's like me coding something like PhoenixPHP: messy, insecure and procedural style; and then recoding that into something like RevCMS: clean, secure and OOP.
The way I'm helping people is also like this:
(just for the newbs who want to edit it easily)
PHP Code:
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* BeerCMS - A lightweight CMS designed for BeerEmu *
* Also works with Phoenix and Uber *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright (c)2011 Steffen *
* Copyright (c)2011 nobrain *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This program is free software: you can redistribute *
* it and/or modify it under the terms of the GNU *
* Public License as published by the Free Software *
* Foundation, either version 3 of the License , or *
* (at your option) any later version. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
require_once 'global.php';
/* Header */
require_once 'Public/templates/header.tpl';
/* Footer */
require_once 'Public/templates/footer.tpl';
?>
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Quote:
Originally Posted by
Kryptos
No, that's not very smart.
That's like me coding something like PhoenixPHP: messy, insecure and procedural style; and then recoding that into something like RevCMS: clean, secure and OOP.
So, if I am doing "fuckd up ugly coding" in the start just to make it work, then recode it to become neat afterwards isn't smart?
"If I make a sucky cms once, wouldn't the next cms I become better?"
That means, I learn stuff as I go on coding, and the next thing you make will become better, if you code something in the first place, then recode it afterwards it will be better.
You know what I mean?
-
Re: BeerCMS 2.0.1 [PHP, OOP, From Scratch]
Wanted to post an Example..
PHP Code:
<?php
/*
* --------------------------------------------
* SULAKEWEB - HABBO CONTENT MANAGEMENT SYSTEM
* PROJECT REVISION CODENAME: BLOWFIS
* --------------------------------------------
* COPYRIGHT 2011 COBE MAKAROV
* --------------------------------------------
* SYSTEM RELEASED UNDER THE GNU PUBLIC
* LICENSE V3. NONE OF THE DEVELOPERS ARE
* AFFILIATED WITH THE SERVER(S) RAN WITH THE
* HABBO CONTENT MANAGEMENT SYSTEM SULAKEWEB
* --------------------------------------------
* SOFTWARE COMPATIBLE WITH THE FOLLOWING OS
* WINDOWS XP, VISTA, 7, 8
* MACINTOSH OSX LEOPARD, SNOW LEOPARD, LION
* LINUX DEBIAN, UBUNTU, FEDORA
* iOS3(S), iOS4(S), iOS5
* ANDROID 2.2, ANDROID 2.3.X, ANDROID 3.X
* --------------------------------------------
* @author: Cobe Makarov
* --------------------------------------------
*/
include('./inc/classes/class.bootstrap.php');
$bt = new Sulake\Bootstrap();
if(!defined('Page') || !defined('Template')){
die('klstrybro, now gtfo!');
}
$bt->current = Template;
$bt->tpl->AddArg('logo', $bt->config['name']);
$bt->tpl->AddArg('tag', $bt->config['tag']);
$bt->core->SecureFormData();
$bt->tpl->Initialize();
?>
<!DOCTYPE html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php
$bt->core->SetTitle($bt->config['name'].'-'.Page);
?>
</head>
Code:
$bt->#
$bt->core->#
$bt->habbo->#
$bt->tpl->#
$bt->db->#