Skip to content

Setting Up

Stephen Hohner edited this page May 1, 2013 · 4 revisions

Installation

In order to begin with the NexusFramework you must first have your copy of the framework accessible by the sites you want to integrate with the framework, so start off with downloading/checking out the repository and putting it at a directory that is easily accessible. If applicable, you could also just use the repository as the root directory for your sites documents. Currently NexusFramework requires PHP 5.3 (or higher) in order to be in working condition due to the functionality used.

Initialization

To start off, the index page you should start off with is located at the root of the repository (index.php). If you've installed the framework at separate directory, you'll likely be required to edit the framework path at index.php:4 to the proper root directory of the framework installation, making sure to require the file loader.inc.php from the nexus framework installed at your discretion. You'll have to make sure you have proper read/write flags for the folder for your site.

Configuration

The file used for configuration, that should be at the root of your site, is named framework.config.php of which is used to define your configuration for your site, this is generally used for just defines and ...

For a generic configuration make sure you have your framework.config.php created, begin with the PHP block (<?php ?>), thereafter it's as simple as defining your variables specific for your website: For example, to setup a title that'll work across pages:

define("TITLE_FORMAT", "{{PAGENAME}} - Hello World");
The following would register {{PAGENAME}} as the defined page name, while also appending - Hello World to each page. If our page was named "Generic", in this example it'd be displayed as Generic - Hello World.

define("DEFAULT_PAGE_NAME", "N/A");
This allows you to have it so if a page is unnamed it'll resort to what you've set for the default.

define("META_KEYWORDS", "...");
define("META_DESCRIPTION", "...");
This allows you to describe the tags/description for what your website is about, added into your head tag as the appropriate meta html tag.

...

Clone this wiki locally