Themes and Templates

 

Overview

Xoops comes with a small selection of themes, sometimes called "skins". Many hundreds of other ready made themes are available for download. Users then change the logo and look to suit their preferences. In practice many users choose a theme which has an appropriate layout, and alter the appearance by changing the themes html file and style sheet in the theme's folder. Some webmasters have created stunning individual looking sites.

See this example

Note: When you are editing your theme.html or the style sheet(s) based in your theme folder and you wish to see changes immediately, go to your site admin, and let your mouse hover over the System Admin Icon--then choose Preferences->General Settings, and look for this field:

Update module template .html files from themes/your theme/templates directory?

Set this to Yes

If this option is enabled, files will be updated automatically if there are newer files under the themes directory for the current theme.


How to change your Logo

To change your logo, right click on the logo on your site and choose "Properties". This will show you the path to your logo and the name of your logo file. Go to the same file on your server and overwrite this with your own image, renaming your image with the same name as the exiting logo. Dimensions for the image can be changed in the theme.html in your theme folder.


How to change your default theme

Three themes come with your Xoops download. They are located in your themes folder on your server here:

www.yoursite.com/themes.

Inside your Themes folder on your server you will find the folders for the Xoops themes provided with your Xoops distribution i.e.

default
x2t
phpkaox

To change your default theme go to System Admin--> Preferences--> General Settings and then go to the "Default theme" dropdown box. The theme called "default" is the theme that loads on install. Now click update att he bottom of the screen to confirm your settings.


Change the look of your theme

To edit the look of your theme go to your theme folder and edit theme.html and style.css inside your themes folder. Some themes also have styleNN.css for Netscape, and styleMAC.css for Mac computers.

Remember: If you are editing  the theme.html and style.css files in your themes folder and nothing appears to change, you must change a setting in System Admin-->Preferences-->General Settings

Look for this setting:

Update module template .html files from themes/your theme/templates directory

Now set this to "YES"


How to clone Templates:

Most themes use the default "Template". Templates control the layout and some behaviors and functions of individual blocks and modules. Most existing Xoops themes are based on the Xoops "default" template. The X2t theme has its own Template in the extras folder of your Xoops distribution.

You can't edit the default template, you must clone it first, and edit the clone.

To clone the default template go to System Admin->Templates, and click Clone next to the default template, you may call this clone anything you wish. Xoops will now install the cloned template. After you have done this, go to System Admin->Preferences->General Settings and make the clone your default Template.

Then go back to System Admin-->Templates, a tick should be located to the right of the default template. You may need to click on "Generate" if any of the module files have a "red" generate link.


Editing a block's layout:

Your Blocks layout is controlled from Templates and any related style.css classes.  Go to  System->Admin-> Blocks and look for the block you wish to alter. Then click "Edit" to the right of the block. In the next dialogue box you will see "Edit Template". Click this, and you will see the code for your block. You will also see the "classes" that are being called which relate to the style.css sheet(s) in your themes folder.


Practice uploading a template.

Most existing themes are based on the Default Template. Some themes you download may have its own template. These template files are in a compressed format. tar.gzip

To upload a Template to Xoops the file must be in this tar.gz format.

In your extras folder their is a "tar.gz" template for the X2t theme. To upload this Template go to System Admin-->Templates, and then go to the Upload browse box and browse to this "tar.gz" file in your local computer's Xoops download:

Look for the folder called "extras"
inside that folder you will find this folder:

theme_x2t

Select this file: x2t.tar.gz and then click upload

You can call this anything you like, if you don't add a name XOOPS will just add a default name.  After you have done this, go to System Admin-->Preferences-->General Settings, and make x2t your default theme, and also choose the uploaded template as your default Template. (there is drop downs for both)

Then go back to System Admin-->Templates, and you will see a tick to the right of your default template. You may need to to click "generate" to create the editable files for individual modules you install.

See this on the "Wiki" for more explanation about Themes and Templates"

http://wiki.xoops.org/wakka.php?wakka=ThemesVsTemplates


Downloading and Installing Themes

You can of course download other themes and upload them into your themes folder on your server using FTP to:

www.yoursite.com/themes

Be careful to upload the correct folder structure. Your download may have a folder inside a folder when you uncompress the files

themename (not this one)
themename (upload this one with the theme.html and other files inside)

Once again go to System Admin->Preferences-> General Settings, and make your new theme your default. XOOPS will recognize the theme you uploaded.


How to use the theme changing block

A handy tool for visually editing themes is to launch the theme changing "block", this will allow you to see and edit the appearance of the themes without changing the default theme. To do this go to System Admin-> Blocks and activate the "Themes" block.

You can make this block only visible to webmasters in System Admin-> Groups if desired. If you wish the block to be visible to anonymous users go to System Admin->Groups-> Anonymous Users, then click Edit, and put a checkmark in the themes block access box, and then click update to confirm your settings

Where can I find Theme Tutorials

http://dcdezines.ca/modules/articles/

Where can I find themes to download?

Xoops Downloads

http://www.7dana.com/

http://www.xoops-themes.org

http://www.montisarts.com/modules/news/

http://www.gooberhead.net/modules/news/

www.4thefort.com

http://www.dcdezines.ca/ (Also good for theme design tutorials)

http://t-tech.org/

http://xoops.imagocn.net

http://www.bassmanthemes.x8r.com (new addition 6/6/2004)

Lots more theme sites exist which can be found doing a Google search using Xoops theme as the keyword. Also a search the Xoops forums will bring up a lot of choices.


 

 

 jackj macambridge.com