Fork me on GitHub

Nibble Development

Nibble Development

PHP classes and libraries for developers

Getting started with the Nibble Framework

Having chosen to use the Nibble PHP Framework, the first thing you need to do is upload it to your server. The four directories; Lib, Templates, Web and Bites should be uploaded to the root of your site. The only small requirement is that the Web root points to the Web directory. Most hosting providers should allow this as a simple process however it is possible to modify the httpd.conf file if your hosting company does not have a method to change the Web root. The reason for having the lib, templates and bites directories below the Web root is to prevent access to the files via the URL from users browsing the site.

If your hosting company does allow you to change the Web root via the control panel, it will probably look something like this when you edit the domain: Screenshot from Dreamhost Web panel, note that the Web root is /web.

Dreamhost panel: change web root
Below is an example script that can be used to point to the Web root in the httpd.conf file if you cannot use a simpler service:

Setting up the database and other site constants

The next and last phase of setting up the Nibble Framework is storing the database and site credentials. There are two ways to do this, if you have completed the first phase (see above) you can simply navigate to the domain you have installed the Nibble Framework on. This page should then be displayed:

Install Nibble Framework config page

If you complete this page with the correct credentials, the setup will be complete. If you make a mistake you can either follow the second method to correct your mistake or, if the credentials are incorrect for any databases, the system will inform you an let you complete the above form again.

The second method is to simply fill in the lib/config/config.php file with the correct constant values:

You can edit this file at any point if you wish to change databases etc.

Nibble PHP Framework plug-ins (Bites)

In the following documentation there are many references to Bites. In the Nibble PHP Framework, Bites are simply plug-ins that add functionality to the system. The word Bites is used because its an awesome (terrible) pun on Nybbles and Bytes (measurements of file size on computer systems). You should notice that one of the four main directories that comes with the Nibble PHP Framework is Bites. In this directory, all Bites should be placed. The default Bite is called “bites”. This Bite is the system that manages all other Bites, therefore please do not remove it as the framework will not function without it.

Bites come in a number of different varieties that are explained in the Bites directory structure and configuration section. In summery, there are three levels of Bites:

  1. Global Bites: Bites such as a user system that affects the entire Nibble PHP Framework installation. I.e. The user system runs over the top of all other levels of Bites.
  2. Full system Bites: These Bites add whole systems or areas to a site. A good example of this is a Blog Bite which adds a blogging system to the site.
  3. Additional functionality Bites: These Bites add functionality to full system Bites. An example might be adding rating functionality to blog posts if that functionality does not come with the Blog Bite.

In order that developers may get used to the structure of Bites, a number of example Bites are available to download and explore in the package. The package contains at least one example of each level of Bite.

Installing Bites on the Nibble PHP Framework

Once you have one or more Bites that you want to use, all you need to do is upload each Bite directory to the Nibble PHP Framework “bites” directory:

Once you have uploaded your Bite, simply navigate to You will see a drag and drop interface that allows you to simply drag your uploaded Bites from the asleep(inactive) to the awake(active/installed) column:

manage bites page

Nothing else is needed to install the Bite, the system will move all required scripts etc to the correct places.

Luke Rotherfield

Freelance PHP Developer
is a PHP developer dedicated to writing the most awesome liraries for his fellow devs :) enjoy

Latest posts by Luke Rotherfield (see all)

Leave a Comment