diff --git a/Features.txt b/Features.txt new file mode 100644 index 0000000..fc612b6 --- /dev/null +++ b/Features.txt @@ -0,0 +1,20 @@ +//IMPLEMENTED + +MVC Architecture +SEO friendly routing +Config and overrides + + + +//TO DO +Caching +Helpers +Package Building +Grunt +Linting +View templating +AJAX Utils +Utilities +static content grouping and minification +XSS Helpers +JS Components (scroll to view, lazy loading, popup, product carousel) \ No newline at end of file diff --git a/README.md b/README.md index 5416c52..4d7e51e 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,6 @@ -#PIP +======= +QuickSilver +=========== -PIP is a tiny application framework built for people who use a LAMP stack. PIP aims to be as simple as possible to set up and use. +A Simple Lightweight PHP MVC Framework -Visit [http://gilbitron.github.com/PIP](http://gilbitron.github.com/PIP/) for more information and documentation. - -## Requirements - -* PHP 5.1 or greater -* MySQL 4.1.2 or greater -* The mod_rewrite Apache module - -## Installation - -* Download PIP and extract -* Navigate to `application/config/config.php` and fill in your `base_url` -* You are ready to rock! Point your browser to your `base_url` and hopefully see a welcome message. - -## Documentation - -Visit [http://gilbitron.github.com/PIP](http://gilbitron.github.com/PIP/) to see the documentation. - -## License - -PIP is released under the MIT license. - -Want to say thanks? [Consider tipping me](https://www.gittip.com/gilbitron). diff --git a/application/config/config.php b/application/config/config.php deleted file mode 100644 index d34579b..0000000 --- a/application/config/config.php +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/application/controllers/error.php b/application/controllers/error.controller.php similarity index 100% rename from application/controllers/error.php rename to application/controllers/error.controller.php diff --git a/application/controllers/main.php b/application/controllers/main.controller.php similarity index 69% rename from application/controllers/main.php rename to application/controllers/main.controller.php index b1c40ac..929b9a0 100644 --- a/application/controllers/main.php +++ b/application/controllers/main.controller.php @@ -4,7 +4,7 @@ class Main extends Controller { function index() { - $template = $this->loadView('main_view'); + $template = $this->loadView('main'); $template->render(); } diff --git a/application/controllers/sample.controller.php b/application/controllers/sample.controller.php new file mode 100644 index 0000000..40eef56 --- /dev/null +++ b/application/controllers/sample.controller.php @@ -0,0 +1,36 @@ +loadModel('sampleModel'); + $something = $login->getName(); + + $template = $this->loadView('sample'); + $template->set('name', $something); + $template->render(); + } + + function home() + { + $name = $_GET['name']; + + $template = $this->loadView('sample'); + $template->set('name', $name); + $template->render(); + } + + function plugin() + { + //Loading Plugins + $this->loadPlugin('strings'); + + //Loading Template + $template = $this->loadView('plugin'); + $template->render(); + } + +} + +?> diff --git a/application/helpers/url_helper.php b/application/helpers/url_helper.php index c9caf98..c491f7f 100644 --- a/application/helpers/url_helper.php +++ b/application/helpers/url_helper.php @@ -2,11 +2,7 @@ class Url_helper { - function base_url() - { - global $config; - return $config['base_url']; - } + function segment($seg) { diff --git a/application/models/example_model.php b/application/models/example_model.php deleted file mode 100644 index 18c960a..0000000 --- a/application/models/example_model.php +++ /dev/null @@ -1,14 +0,0 @@ -escapeString($id); - $result = $this->query('SELECT * FROM something WHERE id="'. $id .'"'); - return $result; - } - -} - -?> diff --git a/application/models/sampleModel.php b/application/models/sampleModel.php new file mode 100644 index 0000000..e4572e9 --- /dev/null +++ b/application/models/sampleModel.php @@ -0,0 +1,14 @@ + diff --git a/application/plugins/strings.class.php b/application/plugins/strings.class.php new file mode 100644 index 0000000..d669767 --- /dev/null +++ b/application/plugins/strings.class.php @@ -0,0 +1,57 @@ +\\1', $text); + $text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:;%_\+.~#?&\/\/=]+)/', '\\1\\2', $text); + $text = preg_replace('/(([0-9a-zA-Z\.\-\_]+)@([0-9a-zA-Z\.\-\_]+)\.([0-9a-zA-Z\.\-\_]+))/', '$1', $text); + return $text; +} + + +?> \ No newline at end of file diff --git a/application/views/footer.php b/application/views/footer.php index 691287b..082db47 100644 --- a/application/views/footer.php +++ b/application/views/footer.php @@ -1,2 +1,10 @@ +