Skip to main content

Tour of the file system (v2)

Files and directories

The organisation of the Tuskfish file system is described below.

/admin

Houses the back end pages for managing the site and adding content. Access is restricted to administrator only.

/cache

Stores image thumbnails associated with content objects to reduce processor load. The thumbnails are built by the image caching system.

/install (removed after installation)

The installation directory for a new site. Access this to begin the installation process, after configuring mainfile.php. You must delete it after installation is complete.

/vendor

Holds javascript libraries and other components used for presentation purposes, namely: Bootstrap, jQuery, TinyMCE and FontAwesome.

/themes

Stores template sets ("themes") for presenting and formatting the site and individual content objects. Each theme resides in it's own subdirectory.

/trust_path (should be moved outside of the web root)

Holds as much of the non-public facing code as possible to reduce the risk of access and abuse. This directory should be placed outside of the web root to prevent contents being accessed via browser.

/trust_path/cache

Stores pages built by the page caching system (when enabled in preferences) to reduce processor load.

/trust_path/database

Holds the SQLite database file for the site. The file should be readable/writeable by the server only (chmod 0600). This is important, as SQLite database access is controlled by file permissions, only.

/trust_path/libraries

Holds code libraries, including the core Tuskfish library and HTMLPurifier.

/trust_path/libraries/tuskfish/routingTable.php

A list of the base URLs on the system. This table (array) maps each URL to the MVVM+C components that must be instantiated to build it. If you want to add routes to the system you need to add them to this file.

/trust_path/log

Holds the error logfile for the site. Don't forget to check it occasionally, it will help you identify problems.

/uploads

Stores uploaded image and media files associated with content objects, in respective subdirectories.

.htaccess

Enables routing, via the 'FallbackResource' directive. You can put this directive in the Apache virtual host file for your site instead, if you have access to it, in which case you do not need this file. If you have installed Tuskfish in subdirectory of your web root then you need to edit the FallbackResource path to reflect this.

index.php

The main content page for the site. By default it presents a mixed stream of the most recent content in teaser (summary) review. The full descriptions of individual content items can also be viewed.

mainfile.php

Defines the base file path and URL constants for the site and includes essential files such as the configuration file. This file should be readable by the server only (chmod 0400).

Routes

Several URLs are also available on the front end via routing:

enclosure/

Streams associated media / file attachments from content objects to the browser, using the content ID as key.

gallery/

Presents a gallery of thumbnails from image content.

rss/

Generates RSS feeds for the whole site. Feeds for individual tags or collections can also be accessed by passing in the ID.

search/

Presents a search form and search results to the public.

Copyright, all rights reserved.