Theme-info.xml

When you create a theme, you can decide to package your theme in order to upload it to the SMF Theme Site and allow other users to install your theme on their forum. One of the files that you need when packaging your themes is "[i]theme-info.xml[/i]". The "[i]theme-info.xml[/i]" file keeps data stored in it of things such as the theme name, the creator, and contact details. Here is an example of a "[i]theme-info.xml[/i]" file taken from the "iGuides Theme".

[code=iGuides Theme]   smf:iguides_theme 2.0 RC1.2 iGuides Theme info@simplemachines.org http://www.simplemachines.org/ html,body index   [/code]

It may look hard to understand as you take a look at it for the first few times, however it's very simple to understand. All of the text inbetween the "[i][/i]" tags are comments. This means that they have no bearing on what the "[i]theme-info.xml[/i]" file actually does. Each of the comments in "[i]theme-info.xml[/i]" by default help you out on how to use the file. You can remove them when you know what each field does, though. "[i]theme-info.xml[/i]" will open in any normal text editor, and you can find the file in the root directory of your theme.

[hr]

[code=1,2] [/code]

The first two lines here show that the XML Version of the file is 1.0, and that it is a theme-info file - which allows SMF to read it. Don't edit this, you don't need to, and chances are that it will break the file.

[code=3,4] smf:iguides_theme[/code]

These two lines tell you who made the theme, and what the theme is called. This is mainly used when uploading your theme to the SMF Theme Site, but it's recommended that you fill it in anyway. As the comments say, your name, a colon, then the theme name.

[code=5] 2.0 RC1.2 [/code]

This line tells you what version of SMF this theme is made for. By default, it is the version of SMF that you installed the theme from, in this case, SMF 2.0 RC1.2. Obviously, if you make the theme for SMF 1.1.X, it won't work on SMF 2.0, unless it's image changes and you don't include the "[i]index.template.php[/i]" file. You cannot just change this piece of code and expect the theme to work for another version of SMF.

[code=6,7] iGuides Theme [/code]

As you could guess from this, this is the theme name. This appears where the user decides to change their theme, and in the Admin Panel where you can set the default theme, and reset the themes... This can use spaces, so doesn't have to have underscores or have it as one long word. When you copied the default theme, you chose the name of the theme then. However if you want to change it again, this is the place.

[code=8,9] info@simplemachines.org [/code]

This decides who the author is. It includes your EMail Address, so people can contact you, aswell as your name. In the "Latest and Greatest Themes" in your Admin Panel, it has the theme name, followed by the author name. The author name there has a "[i]mailto[/i]" link to the EMail Address that you put in here. That means that if someone likes your theme or wants to contact you about something, they can by using that Address.

[code=10,11] http://www.simplemachines.org/ [/code]

This is your website URL. If a user wants to get updates for your theme, or maybe small theme hacks for it,

[code=12,13] html,body [/code]

Within the themes template files, you have layers. The layers are like, tags, etcetera. As by default, the html and body layers are the two that only really needed to be used, but as you get better with theming, you will learn about the other layers that you can put in there.

[code=14,15] index [/code]

You don't really need to change this. You know you have "[i]something.template.php[/i]" files in your theme directory? This bit of code tells it to load any specific templates, on startup. What is already in there, "index" is perfect for it, because that then calls all other templates when they're needed.

[code=16,17] [/code]

If you've based your theme off of something, or another theme, then this is the place to put it. If you just thought it up out of your head, then you can leave this blank.

[code=18][/code]

This signifies the end of the "[i]theme-info[/i]" file, so that SMF will stop reading the file from there on.

[hr]

So now that you know about the functions that "[i]theme-info.xml[/i]" uses and has, so try creating your own by editing the current one you have. You don't have to do this, but alot of people do, and it makes it seem clearer. Remove the "[i][/i]" tags and the content of them. That frees up seven lines and make it alot easier to see and read. Then edit the rest so it suits your theme. This is what the iGuides "[i]theme-info.xml[/i]" ends up as.

[code]<?xml version="1.0"?>  iKorp:iGuidesTheme</id> 2.0 RC1.2 iGuides Theme <author name="iKorp">adminstrator@ikorp.net http://www.ikorp.net/ html,body index </based-on> </theme-info>[/code]