The template files phpBB uses are located in the folder called templates/ found in the phpBB/ folder in the folder in which you extracted the phpBB zip (or .tar.gz ) file. This is the folder where the file config.php is found. On your server you may have put the files from the root folder in another folder, perhaps one called forums/.
Note: I will from now on type folder names as with a trailing slash (example: templates/) and file names without a trailing, this is standard syntax and is good to know because it’s how you type file paths on most server operating systems. I may also refer to folders as 'directories'.
If you look inside the templates/ folder you will see at least one folder, most likely named subSilver. This folder contains all the template files for the default subSilver template which is the template included with all phpBB installations. It is wise to keep this folder, even if you create your own theme, since many MODs and other parts of phpBB depend on it.
Now that we've located the templates/ folder the next logical step is to create a folder for our new template. Start by going to the templates/ folder on your harddrive where you extracted the phpBB files. We will use subSilver and base our design on it, so start by making a copy of that folder. Once the copy process is complete, rename the new folder myTemplate.
Since we copied subSilver all the files in the myTemplate/ folder will be the original subSilver files. We will be required to edit these as they refer to the subSilver template, and not your new myTemplate template. To change all references we first have to rename two files manually, and then replace a piece of text inside all the other files. Don't worry, it's not very hard, and only takes a minute.
Begin by opening the myTemplate/ folder, locate the files subSilver.css and subSilver.cfg, then rename these files to myTemplate.css and myTemplate.cfg respectively.
Next step is to replace all instances of the string "subSilver" inside the files in this folder. String is a programmer's term for a fragment of text. A string is also a type of variable used for storing values that consist of characters, but I'll explain variables later.
Windows users, download the application BK ReplaceEm from this website which we will use to replace subSilver strings inside our new template: http://www.orbit.org/replace/
Mac user should try Smultron: http://smultron.sourceforge.net/index.html
Linux/UNIX users can use GREP or AWK. I will not provide any instructions for Smultron, I do not have a Mac myself but I've been told it's easy to use.
Those using UNIX/Linux should be familiar enough with their operating system to be able to use GREP or AWK.
If you need help, please ask someone you know, use Google or post in my forums and I'll try to help you.
Below is a short tutorial on using ReplaceEm.
After you have downloaded and installed the ReplaceEm application, start it. You will see a screen similar to the one below (click to zoom):
Start by clicking Add Group, type myTemplate and press Enter. Then right-click on the new Replace Group you just made and select "Add File(s)"
Click "Use folder", in the field "Include File Filter", enter "*.tpl,*.cfg". Click the Backup tab and uncheck "Enable file backup" Now click the "..." button next to the field labeled "Source File / Folder Path" and select the myTemplate/ folder we created in the previous steps, then click OK.
Now look in the lower portion of the application, where there are two columns with captions "Original Text" and "Replament Text". Double-click to the top-left one and enter subSilver, then double-click the top right one and enter myTemplate. It should look something like this, again click the image to zoom:
Now select Replace -> Start-Replacing. You will see a progress bar and a log which means the replacement process is complete. Scroll to the bottom of the log, 84 files should have been processed, 18 altered.
Tada! Now you have your own template! Hang on and read about how you go about installing it.
If you replaced the files in the download location, as instructed, copy the myTemplate/ folder from the templates/ folder there to either the template design board’s templates/ folder on the server or to the phpBB templates/ folder located in your local web server’s web root folder, depending on your setup.
Now go to your template design board. Either by accessing your local web server by entering localhost/phpBB2 in your browser’s location field, provided phpBB is located in the phpBB2 folder in your local web server’s web root directory. Or by going to the website address (URL) where the board is. Log in and go to the administration panel and click Add under Styles Admin, if everything was done correctly in the previous steps you should now see a template called myTemplate in the list of templates that you can install. Click “Install” next to it and you’re done.
Before we can start playing around with this template there are two things we should do: set it as default template for the board, and set it to override user styles, you can access these options by clicking Configuration under General Admin. By doing this you can see how well the template works both for guests and users that have logged in. Another advantage is that you won’t have to worry about logging in all the time. You’ll spend a lot of time making small changes in files and reloading in your browser to see the results.
Wow, wasn’t that easy? Or at least far from as hard as you’d imagined? It won’t get more difficult either, so on to the next chapter where we begin editing our newly created subSilver clone.