Tour of the file system

5 February 2018 | 27 views | Tags: Documentation

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.

/installation (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.

/js

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 (normally 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/extras

Holds a collection of scripts and tools you may find useful in customising your site, such as an offline password reset tool and Yubikey two-factor authentication script.

/trust_path/libraries

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

/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.

enclosure.php

Returns associated media / file attachments from content objects as forced downloads.

error.php

A custom 404 error page that looks nice and offers a search form. If you are using cPanel, point your custom error page to this file.

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).

rss.php

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

search.php

Presents a search form and search results to the public.

Copyright, all rights reserved.

Related

Tuskfish CMS Developer Guide

This guide will give you an overview of the architecture of Tuskfish CMS, how to write code to perform common operations and how to extend the system to suit yourself. The guide accompanies theĀ Tuskfish API documentation. Keep a copy handy as you read this guide. It is best to review links to the API where provided, as not every detail will be discussed in the text. This is the first version of the guide, so it is still a work in progress.