Create a Custom Theme

This tutorial will guide you step by step in creating a custom theme for your InterWorx system. Custom themes can be used for re-branding the system for your customers, or just to create a custom look and feel.

With the release of InterWorx 4.0, the theming system has been simplified while increasing the flexibility of user themes. Unfortunately, some older custom themes are incompatible and will need to be upgraded.

The InterWorx theme system is used in the themes that ship with InterWorx. The "InterWorx" theme is the root theme - all other themes are based on this theme.

How Themes Work

Every theme is comprised of several important elements. Customizing your new theme is simply a matter of changing some aspects of these elements.

Element Location Role
Base InterWorx CSS Not part of download Provides the base look and feel for most elements. This is not editable, and must be overridden in your theme CSS if desired
NodeWorx CSS /nodeworx/theme.css This CSS file is the heart of your theme. Loaded after the base CSS, it's the place to go to for creating a custom look. This file is actually loaded for both NodeWorx and SiteWorx, and may be all you need to edit.
SiteWorx CSS /siteworx/theme.css This CSS file is for SiteWorx-specific modifications for your theme. It's loaded after the base CSS and the NodeWorx CSS. This file generally has the least data in it - for some official InterWorx themes it's actually empty!
NodeWorx Images /nodeworx/images/ Folder containing all images accessible to your theme for NodeWorx.
SiteWorx Images /siteworx/images/ Folder containing all images accessible to your theme for SiteWorx.
Header /nodeworx/header.tpl, /siteworx/header.tpl Top framework of the theme
Footer /nodeworx/footer.tpl, /siteworx/footer.tpl Bottom framework of the theme
Manifest File /nodeworx/manifest.txt Describes the theme.

Download an Existing Theme

The first step in creating a custom theme is downloading an existing one. InterWorx leverages the "Cascading" part of "Cascading Style Sheets" to allow new changes to be built upon the existing styles and layout.

Download the Theme

  1. Click the Icon NodeWorx menu item if it is not already open.
  2. Click the Icon Themes menu item.
  3. Choose the theme you want to base your new theme on
  4. Click the 'Download' link
  5. Extract the downloaded file to your desktop

Changing the Logos

The simplest form of customization is to replace the InterWorx logo and SiteWorx/NodeWorx logos with your own. In each theme, there are two images for NodeWorx and two for SiteWorx that are the logos used in the headers. These are "hd_left.gif" and "hd_right.gif".

Simply edit or replace these images with your own (must be .gif format) and edit the manifest file before uploading your new theme!

Changing the Logos: Advanced

Another possibility is to use a different file entirely, and not convert to .gif. This lets you use higher-resolution images, such as PNG or JPG.

  1. Put your new image in /nodeworx/images
  2. Open /nodeworx/header.tpl in the download
  3. Find hd_left.gif or hd_right.gif
  4. Replace with your new image name
  5. Repeat for SiteWorx, if desired
The header and footer are not rendered as part of the csstest.html file included with the download. You'll need to complete your theme and upload it before you'll be able to see the differences

Changing the Colors and Graphics

All colors and graphics other than the header logos are assigned and positioned using CSS.

Use of the Firefox plugin Firebug is highly recommended.

To customize your theme, the best place to start is the NodeWorx theme.css. Any changes to SiteWorx specifically should be made in the SiteWorx theme.css.

Changing the Layout

Changing the layout is possible in two ways: CSS, or editing header.tpl and footer.tpl. Changing the layout is beyond the scope of this tutorial.

Using csstest.html

In the /nodeworx/ folder of the download, you'll find an html file called csstest.html. This file has been specifically altered to work from your local machine, so that you can test some base elements of your custom theme without the trouble of zipping up your changes and uploading them repeatedly.

Simply open the file in your browser to see most changes as you make them. Changes to header.tpl and footer.tpl will not show up, sorry.

Update the Thumbnail

In the /nodeworx/images/ folder, there is an image called thumbnail.jpg. This image is used to show a preview of your theme on the Theme Management page. The image will ultimately be displayed at 320x262 (roughly 25% of 1280x1024) so that's the best size for the least distortion.

Edit the Manifest File

Once you've changed all your images, you'll notice a manifest.txt file in the /nodeworx/ folder in the zip file you downloaded. This file is used to tell InterWorx some information about your theme. Open this file in your text editing program and edit it according to your preferences.

manifest.txt entries

Directive Purpose
[vanillaice] This is the system name of your theme. This must be unique, alphanumeric, and contain no punctuation or spaces.
name This is the display name shown on the Themes page and in the dropdowns for selecting themes.
author This is the person who created the Theme, obviously in this case it would be you.
hd_left_url Link used when clicking on the logo image at the top left.
hd_right_url Link used when clicking on the logo image at the top right.
help_url Link used when clicking the "Help" link

All other directives in the manifest are not used in InterWorx.

Upload/Add Your Theme to InterWorx-CP

Now, you've edited the style sheet and the images according to your preference. For the most part, you're finished making your theme. Now you need to zip the folders up and upload them.

Zip Your Theme

  1. Select the siteworx and nodeworx folders on your desktop.
  2. Right click on one of them and you should see the option 'Send To'. Select this option and then you should see 'Compressed (zipped) folder'. Select this option and in a couple seconds, you should see a file on your desktop called siteworx.zip or nodeworx.zip depending on which one you right clicked on.
  3. Rename this file to whatever you named your theme.

Add Your Theme

  1. Click the Icon NodeWorx menu item if it is not already open.
  2. Click the Icon Themes menu item.
  3. A list of themes is shown.
  4. Click the [ Add Theme ] link. You will be redirected to a page with an upload box.
  5. Click the button to locate the zip file on your computer.
  6. Click the button to begin the upload of your theme.
  7. You will see the following message at the top of the screen: Theme Added Successfully.

Select Your Theme

  1. Click the Icon NodeWorx menu item if it is not already open.
  2. Click the Icon User Accounts menu item.
  3. A list of users is shown.
  4. Click the [ Edit ] link for the current user (you).
  5. Use the Theme: dropdown to choose the theme for the user.
  6. Click the button to save the change.
  7. InterWorx-CP will refresh and you will see your chosen theme.
Congratulations! You've successfully created your own InterWorx-CP theme.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash