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 "theme-info.xml". The "theme-info.xml" file keeps data stored in it of things such as the theme name, the creator, and contact details. Here is an example of a "theme-info.xml" file taken from the "iGuides Theme".

  smf:iguides_theme 2.0 RC1.2 iGuides Theme info@simplemachines.org http://www.simplemachines.org/ html,body index   At first, this file may seem hard to understand. But all those tags are there to organize the information so that even a computer can understand it. All of the text between the    tags are comments. They are there for people to read, and will not affect how the file is interpreted by a computer. You can remove them when you know what each field does. You can open "theme-info.xml" in any normal text editor, and you can find the file in the root directory of your theme.

  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. Do not edit this, you do not need to, and chances are that it will break the file.

smf:iguides_theme 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 is recommended that you fill it in anyway. As the comments say, your name, a colon, then the theme name.

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 will not work on SMF 2.0, unless its image changes and you do not include the "index.template.php" file. You cannot just change this piece of code and expect the theme to work for another version of SMF.

iGuides Theme 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 does not 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.

info@simplemachines.org 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 "mailto" 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.

http://www.simplemachines.org/ This is your website URL. If a user wants to get updates for your theme, or maybe small theme hacks for it,

html,body 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.

index You do not really need to change this. You know you have "something.template.php" 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 are needed.

 If you have 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.

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

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

<?xml version="1.0"?> <theme-info xmlns="http://www.simplemachines.org/xml/theme-info" xmlns:smf="http://www.simplemachines.org/"> 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>