Logo

Theme Creation

GNUMP3d supports the idea of themes, a collection of template files which can be used to alter the appearance of the server.

Several themes will be installed when you install the server, such as 'LaFrere', 'Nausicaa', and 'default' - each of the supplied themes is shown upon the screenshots page.

A theme consists of nothing more than a directory containing a number of HTML files. The theme name is the name of the directory which contains these files, (by default all themes will be installed in /usr/share/gnump3d).

HTML Templates

The output of the server is generated by inserting text into one of the template files. Each of the template files is used for a different type of output:

FilePurpose
index.htmlUsed for displaying directory listings.
error.htmlUsed for all error output.
plugin.htmlA generic template which can be used by any plugin.
search.htmlUsed for displaying the search form.
stats.htmlUsed for showing song/client statistics.
results.htmlUsed for displaying search results.

Other files

Other files may also be placed within the theme directory, for example any graphics or stylesheets you theme requires.

Files which are placed in the theme directory should be referred to via absolute paths within your HTML files.

For example if your theme contains an image used as a logo, 'logo.jpg' it should be placed in /usr/share/gnump3d/your-theme-name/logo.jpg. And in the HTML files it should be referred to as <img src="/logo.jpg"> (ie. absolutely)

Theme Overrides

The 'gnump3d.conf' configuration file is where the output formats for files and directories is specified. Rather than requiring the user to change these settings manually when changing themes it is possible to override some of these settings in a theme configuration file, 'config.ini'.

The following settings may be overridden:

More overrides may become possible if it becomes obvious they are needed.

Theme Credit

If you include a file 'AUTHOR' within your theme directory the first line of this will be read and displayed next to your themes name upon the preferences page.

This file may contain HTML tags, making it ideal for displaying your name, and linking to your homepage.

Advanced Theming

Since version 2.3 GNUMP3d supports the ability to include other files, and to include the output of commands.

See the advanced theming page for further details.

Questions?

If after studying the supplied themes you still have some questions about how the system works, or are having problems achieving a particular effect then feel free to mail me, or the mailing lists