Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
ZipCMS [PDO][Efficient TPL System][Framework]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="IntactDev" data-source="post: 225035" data-attributes="member: 24757"><p>Hello DevBest!</p><p></p><p>Today, I am releasing this first project that I could say that I've actually <strong>COMPLETED</strong> (that has been released. <img src="/styles/default/xenforo/smilies/emojione/wink.png" class="smilie" loading="lazy" alt=";)" title="Wink ;)" data-shortname=";)" />)</p><p></p><p>ZipCMS is a framework made for developers to expand upon to create their website. ZipCMS makes it extremely easy to add functionality to your website pages, with minimal effort. There isn't much I can explain, but I will let your view the code yourself, and see what it does, and how it works.</p><p></p><p><strong>SNIPPETS:</strong></p><p>class.zcore.php</p><p>[PHP]<?php</p><p></p><p>class zCore {</p><p></p><p> final public function findFunction($z) {</p><p> global $zip, $mail;</p><p></p><p> if(!isset($z) || empty($z)) {</p><p> $z = 'index';</p><p> }</p><p></p><p> switch($z) {</p><p> case 'prices':</p><p> $mail->compileMail();</p><p> break;</p><p> }</p><p> }</p><p>}</p><p>?>[/PHP]</p><p></p><p>engine.php</p><p>[PHP]<?php</p><p>session_start();</p><p></p><p>error_reporting(E_ALL);</p><p>ini_set('display_errors', '1');</p><p></p><p>define('D', DIRECTORY_SEPARATOR);</p><p>define('Z', '_zip' . D);</p><p>define('L', '_lib' . D);</p><p>define('C', '_class'. D);</p><p></p><p>require Z . 'config.php';</p><p>require Z . L . 'common.php';</p><p></p><p>try {</p><p> $db = new PDO($zip['Database']['Data']['Source']['Name'], $zip['Database']['Username'], $zip['Database']['Password']);</p><p>} catch(PDOException $e) {</p><p> die(zipError('ZipDB: Connection Failed', $e->getMessage()));</p><p>}</p><p></p><p>require Z . C . 'class.ztpl.php';</p><p>require Z . C . 'class.zcore.php';</p><p>require Z . C . 'class.zmail.php';</p><p></p><p>$tpl = new zTpl();</p><p>$core = new zCore();</p><p>?>[/PHP]</p><p></p><p>index.php</p><p>[PHP]</p><p><?php</p><p>require 'engine.php';</p><p></p><p>$core->findFunction(secure(@$_GET['url']));</p><p></p><p>$tpl->addTpl();</p><p>$tpl->display();</p><p>?>[/PHP]</p><p></p><p><strong>DEMO: </strong>[<a href="http://intactdev.nu/" target="_blank">click here</a>]</p><p></p><p><strong>TO INSTALL:</strong></p><ol> <li data-xf-list-type="ol">Download ZipCMS from [<a href="http://downloads.intactdev.nu/zipCMS.zip" target="_blank">here</a>].</li> <li data-xf-list-type="ol">Extract it to your webserver.</li> <li data-xf-list-type="ol">Navigate to '_zip' --> 'config.php' and edit it accordingly.</li> <li data-xf-list-type="ol">Go to your webserver via your web browser, and read all the pages that will provide some information about ZipCMS.</li> </ol><p>To add functions, go to '_zip' --> '_class' --> 'class.zcore.php' and open it in your default code editor. Once it's open, add a new case in the following format:</p><p>[PHP]case '(page name)':</p><p> $classWhereFunctionIsLocated->functionName();</p><p>break;[/PHP]</p><p>This code will tell ZipCMS to execute that function whenever you're on that page. All you have to do is make the PHP class and function, and you're good to go.</p><p></p><p>Enjoy</p></blockquote><p></p>
[QUOTE="IntactDev, post: 225035, member: 24757"] Hello DevBest! Today, I am releasing this first project that I could say that I've actually [B]COMPLETED[/B] (that has been released. ;)) ZipCMS is a framework made for developers to expand upon to create their website. ZipCMS makes it extremely easy to add functionality to your website pages, with minimal effort. There isn't much I can explain, but I will let your view the code yourself, and see what it does, and how it works. [B]SNIPPETS:[/B] class.zcore.php [PHP]<?php class zCore { final public function findFunction($z) { global $zip, $mail; if(!isset($z) || empty($z)) { $z = 'index'; } switch($z) { case 'prices': $mail->compileMail(); break; } } } ?>[/PHP] engine.php [PHP]<?php session_start(); error_reporting(E_ALL); ini_set('display_errors', '1'); define('D', DIRECTORY_SEPARATOR); define('Z', '_zip' . D); define('L', '_lib' . D); define('C', '_class'. D); require Z . 'config.php'; require Z . L . 'common.php'; try { $db = new PDO($zip['Database']['Data']['Source']['Name'], $zip['Database']['Username'], $zip['Database']['Password']); } catch(PDOException $e) { die(zipError('ZipDB: Connection Failed', $e->getMessage())); } require Z . C . 'class.ztpl.php'; require Z . C . 'class.zcore.php'; require Z . C . 'class.zmail.php'; $tpl = new zTpl(); $core = new zCore(); ?>[/PHP] index.php [PHP] <?php require 'engine.php'; $core->findFunction(secure(@$_GET['url'])); $tpl->addTpl(); $tpl->display(); ?>[/PHP] [B]DEMO: [/B][[URL='http://intactdev.nu/']click here[/URL]] [B]TO INSTALL:[/B] [LIST=1] [*]Download ZipCMS from [[URL='http://downloads.intactdev.nu/zipCMS.zip']here[/URL]]. [*]Extract it to your webserver. [*]Navigate to '_zip' --> 'config.php' and edit it accordingly. [*]Go to your webserver via your web browser, and read all the pages that will provide some information about ZipCMS. [/LIST] To add functions, go to '_zip' --> '_class' --> 'class.zcore.php' and open it in your default code editor. Once it's open, add a new case in the following format: [PHP]case '(page name)': $classWhereFunctionIsLocated->functionName(); break;[/PHP] This code will tell ZipCMS to execute that function whenever you're on that page. All you have to do is make the PHP class and function, and you're good to go. Enjoy [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
ZipCMS [PDO][Efficient TPL System][Framework]
Top