Removing Other Changes
The need to remove new files and database changes is common to both methods of removing file changes reviewed before the previous example. New files added by a modification are quick and easy to deal with: just delete them. Removing database changes is a more complex aspect of uninstallation; however, phpMyAdmin is a handy tool for making this simple. When a modification has added a new table or a new column in a table, you can locate this addition in phpMyAdmin and click a Delete link, which often takes the form of a trash can icon, next to it. phpMyAdmin will ask you to confirm the deletion (or dropping, as it is called when dealing with tables or columns); do so and the change will be gone.
Example Modifications
Thousands of modifications for phpBB have been released for public use in the years since phpBB first appeared. Think of almost any feature you might like to add to or remove from a phpBB forum, and there will probably be at least one modification for that already. New modifications are created and released each week so the possibilities for customizing a forum through this method are endless.
One of the most popular modifications is the massive File Attachment Mod, which contains over 140 files. It adds a new feature to phpBB's posting forums allowing users to upload files that will be attached to and displayed with their posts. Another commonly used example is Modify Profile, formerly known as Add New Field to Profile. This modification is an instruction guide for adding new information fields to user registration and profile-editing forms. Many different kinds of fields can be added, ranging from simple text entry boxes to drop-down selection lists. The data stored in the new field can also be displayed in public profiles, topics, posts, and other places throughout a forum.
Dozens of modifications alter or add new BBCodes. User and administration management tools, online games, stores, chat rooms, recent topics, download systems, phpBB bug fixes or upgrades, and website portals are examples of some other widely used modifications.
These lists are only scratching the surface when it comes to describing the types of modifications available for your use. It will definitely be worth your time to check out a few websites that list modifications; you will find something that you want to install at your forum if you look closely enough. Chances are you will find many things to use in customizing your forum.
Moving Elements
Some layout alterations can be made to your forum without taking the time to search for a detailed modification. While you can find modification downloads for some of these, modifications often don't deal with layout issues very well. The differences in templates, and sometimes those created by other modifications, often force forum administrators to rearrange their layout without any help. In order to move elements like this, you will need to have at least a basic knowledge of HTML coding.
You might have noticed that subSilver and subBook have some statistical data and a login box at the bottom of their forum index pages. One popular change that you can make is to move one or more of those elements to another part of the page. By finding the layout code that creates them in index_body.tpl and placing it closer to the top of the file, you can emphasize that your users should log in or the number of users and posts on your forum.
Adding New Elements to Your Forum
Creating new areas in your forum will usually require a full modification, complete with instructions. There are a couple of simple things that can be done without a modification, however. One of these is to add a new link to your forum's header menu.
Time For Action—Adding a Menu Link
16. Locate and open the templates/subBook/overall_header.tpl file for editing. You can use the subSilver overall_header.tpl file instead, if you like.
17. Find the line in this file containing the code <!--BEGIN switch_user_logged_out -->. There will be several tab spaces at the beginning of the line.
18.Insert the following code on a new line before the code you just located: <a href="{U_VIEWONLINE}" class="mainmenu"><img src="templates/subBook/images/icon_mini_members.gif" width="12" height="13"border="0" alt="{L_WHO_IS_ONLINE}" hspace="3" />{L_WHO_IS_ONLINE}</a></span>
19. Save your changes to the file and view your forum. You may need to reload or refresh the forum page, but you should see a new Who is Online link with the other links near the top of the forum.
What Just Happened? The menu links of your forum, like Profile, FAQ, and Search, are created by HTML stored in the overall_header.tpl template file. By duplicating a line or series of lines that creates one of these links and altering the line a little, you can create a new menu link. In this case, the new link points to the viewonline.php file, which displays a list of users currently visiting the forum. If these steps were written up as a modification, they might look like this:
# #-----[ OPEN ]------------------------------------------ # templates/subBook/overall_header.tpl # #-----[ FIND ]------------------------------------------ # <!-- BEGIN switch_user_logged_out --> <a href="{U_REGISTER}" class="mainmenu"><img src="templates/subBook/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span> <!-- END switch_user_logged_out --> # #-----[ BEFORE, ADD ]------------------------------------------ # <a href="{U_VIEWONLINE}" class="mainmenu"><img src="templates/subBook/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_WHO_IS_ONLINE}" hspace="3" />{L_WHO_IS_ONLINE}</a> </span> # #-----[ SAVE/CLOSE ALL FILES ]--------------------------------------
#
# End
Adding New Languages
Another common change made by forum administrators is the installation of new language files. If you plan to have many visitors who are fluent in languages other than English or cannot read English, you might want to download and install a language pack from phpBB.com's Downloads section. Each language pack adds a new option to the Board Language drop-down list in user profiles and the Administration Control Panel. Selecting that option will cause the forum to be displayed in that language. Posts will not be translated, but many links and other default text will.
When adding language packs, you should keep in mind that you may have to edit the new language files. Some modifications will include new language files or instructions for editing language files. If you add a new language and do not copy these changes to that language, then some text will not appear on your forum. This situation is similar to that for modifications and templates; you must edit every language, even if the modification's instructions only mention one.
Summary
phpBB is excellent and powerful forum software in many areas. Customization possibilities are one of the strongest. With the skills and knowledge you've gained in this chapter, you can give your forum a complete face-lift or expand its features beyond anything you might have imagined. Specifically, you learned:
-
A phpBB style creates the appearance of a forum
-
Editing a style's components allows you to change any aspect of
the appearance
-
Modifications are instructions for changing phpBB's features, and usually have a special format
-
How to install and remove styles and modifications downloaded from websites
-
Methods of editing any of phpBB's files and solving errors
Later chapters will expand on these topics somewhat by discussing details of creating your own styles and modifications.