Site Specific Customisation

From MSpace

Revision as of 15:36, 24 November 2008 by Jl2 (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

Sites

Custom skins/configurations can be defined to change the way that mSpace appears.

Each site must be a self contained folder inside:

/sites

The mSpace system attempts to load files from the current site first but if it cannot find them it then attempts to the load them from the default directory. This provides a cascading file system that allows for specific sites to only need overload the parts of the default site that they wish to change.

Default

If no custom skin is used then the default is used:

/sites/default

Custom

When a custom site is used the system first tries to load the config file from:

/sites/{$current_site}/config.xml

This is where most of the customisation of how mSpace functions can be done

Creating a Custom skin

It is possible to overwrite any of the files found in the default skin by placing files of the same name inside a custom site's directory. It is also possible to add new files that are unique to the current site.

template.mhtml

The template.mhtml file is custom HTML file with some additional MHTML markup allowing for embedding mSpace elements directly into the template without the need for complex code.

HTML

/sites/{$current_site}/html

This directory is where all plain html content should be placed. A file named home.php would be accessed in the following way:

http://nameofsite/html/home.php

CSS

/sites/{$current_site}/css

This directory is where all site specific CSS content should be placed. A file named style.css would be accessed in the following way:

http://nameofsite/css/style.css

Images

/sites/{$current_site}/pics

This directory is where all site specific images content should be placed. A file named logo.jpg would be accessed in the following way:

http://nameofsite/pics/logo.jpg

Export

See Export Plugins

Using a Custom skin

In order to tell the system to use a custom skin you must first install the skin into the sites directory and then edit the following file (create it if it does not exist):

/config/config.php

Example /config/config.php file

<?php
	$httpVariables['template'] = 'eprints';
?>
Personal tools