spam poison

First release


The release incorporates everything that I’ve been showcasing, and should offer you a plug-and-play environment based on MVC, working through a front controller with search engine friendly URLs.


Download

The download has been posted to the downloads section of the Qcodo website.

Installation steps

  1. Unzip the package into your webroot, or a subfolder.
  2. Open up index.tpl.php, and edit your <base> tag.
  3. Open your .htaccess file, and adjust your paths for 403 & 404 errors.
  4. Also adjust the RewriteBase in the .htaccess file.
  5. Open application/qcodo/includes/configuration.inc.php, and edit your paths as you’re used to, as well as your database connection details.

Changes

I haven’t sat still while blogging, and a bunch more things have been done, so please pay attention to the following changes and their impact.

  1. QForm.class.php has been edited, so Qcodo doesn’t use the different smaller JavaScript libs, but rather uses the packed alternative. If you want an explanation, check the Qcodo forums.
  2. The front controller has a static variable called $strTemplate, which defaults to index.tpl.php. By changing this variable in your code, you can instruct the front controller to use a different template if required. Thanks to Jon Kirkpatrick for the idea!
  3. The front controller also has a variable, $strPageTitle, that can be updated anywhere in the code for outputting a specific title. This isn’t that useful, but shows you how to set up defaults, and override them if required.
  4. The same goes for $blnJqueryEnabled, that defaults to false. When updated to true, the front controller will output the link to the jQuery library for inclusion.
  5. Also thanks to the idea of Jon, I’ve added a helper directory in the application folder, which holds static classes. The first helper is a DispatchHelper, that helps with dispatching off course. Take a look at application/helpers/DispatchHelper.class.php to see how it works. Basically you can use it to output the controller (e.g. “page”), action (e.g. “register”) and controller name (e.g. “PageRegister”) anywhere in your code.
  6. If you check Qcodo’s config file (configuration.inc.php), you’ll notice that I’ve added some custom paths to help out, such as __CONTROLLER_DIR__, __HELPER_DIR__, etc.
  7. If you would like to code generate, remove the .htaccess file both from the webroot and the application directory, since else you will not be able to reach Qcodo’s codegen.php.

You might find some remaining crap from testing in terms of controller and views, but feel free to delete those. That is all that I can think of for now.



Article information
Wroted: Wed, 10 Sep 2008 21:09:00 EEST
Autors: Shahways Romani
Added by: AlexParamonov at Sat, 29 Nov 2008 21:10:15 EET
Translation information
Added by: AlexParamonov at Sat, 29 Nov 2008 21:11:57 EET
Modified by: AlexParamonov at Wed, 03 Dec 2008 17:57:10 EET
Copyright © 2008-2010 Alexander Paramonov
Valid XHTML 1.0 Transitional