Customizing through Images

Another major part of a forum’s appearance is created using images. Forum images can be divided into two main categories: those that are just for looks, and those that serve some function. The former might include a forum’s logo or menu link images, while examples of the latter would be new post indicators and posting buttons. By replacing any of these images, you can create a new user interface and adapt your forum’s design at the same time. If you are a graphic artist or experienced in creating your own images, you can create some awesome images to liven up your forum.

You can also download new graphics from phpBB communities, of course. Both phpBB.com and phpBBHacks.com, which offer style downloads as mentioned previously, also offer some graphic sets. Some of their image downloads are rank and emoticon images, but you can find packs of normal forum buttons too. A few style authors have also made special PSD image packs available, which can be used to create new images for their styles using Adobe Photoshop and other image editors. PSD packs for styles you install, if available, may be useful when adding new features to your forum later.

Installing New Images to Change the Look of Your Site

There are two ways to install new images to a phpBB forum. The first is to replace an existing image. Replacing an image entails finding or creating an image, renaming it with the same filename as an image already used on your forum, deleting the existing image, and putting the new image in the same location. This is a quick way of getting new graphics on your forum, but it will limit you to the same type of image previously in place. If you have a JPEG image, like a digital photo, that you want to use for a New Topic button in subSilver or subBook, you would have to convert it to a GIF image,

losing some picture quality in the process. For cases like this, it’s better to use the second method of installing new images: adding an image with a new filename. In order to get phpBB to detect the new filename, however, you may have to edit the template configuration file of the style in which you are installing the new image. If you will recall from earlier in the chapter, these files have a name matching that of a templates subdirectory, such as subSilver.cfg or subBook.cfg, and list many of the graphics found on a forum. The entries in this list usually resemble these examples:

$images[‘name’] = "$current_template_images/image.gif";
$images[‘name’] = "$current_template_images/{LANG}/image.gif";

If you open subBook.cfg in WordPad, you should see several lines in this format. Generally speaking, you should only edit the parts of a line after the last backslash and before the last quotation mark, which would be image.gif in the example. If your new image is not inside the images subdirectory of the style’s directory, like templates/ subBook/images, then you would need to replace $current_template_images with the correct path to the image. It is usually easier to simply put the new file in the style’s images directory. The special {LANG} placeholder allows phpBB to use different versions of an image in support of multiple languages.

The one image you might expect to find in the configuration file—the forum’s phpBB logo—is actually not there. To change the filename for the logo, you will have to edit overall_header.tpl. The HTML image tag for the logo resembles:

<img src="templates/subBook/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" />

Notice the phpBB logo is the logo_phpBB.gif file. Most people want to change the logo quickly, so this is a good file to experiment with replacing or renaming.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.131.168