PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 Backgound images fix 
Description: How to make the theme element "Background Image" work.
Author: Bill Knight
Date: Wed Dec 22, 2004 5:32 pm
Type: Fix
Keywords: Background-image, overall-header.tpl
Category: Styles
In the article "Problems with subSilver and backgrounds" on Tue Oct 29, 2002 3:03 pm , Techie-Micheal says:
Quote:
Are you having trouble with background images not showing up in the subSilver theme? Try this fix posted by Bender (changed by me to input into css definitions)
1. Open overall_header.tpl in templates/subSilver.
2. Find this:
Code:
 
body {
   background-color: {T_BODY_BGCOLOR};


3. Add this code after it:
Code:
 
background-image: url(templates/subSilver/images/background.gif);


(replace filename with correct name)
4. Save and reupload.
5. Upload your image to the subSilver/images directory (make sure filename is the same as one that you put in overall_header.tpl)!


While this technique will work, It just a work around. if at some point you decide to change your background image, you will need to edit the overall_header.tpl file again.

I suggest that rather than entering a hard coded path as a bandaid, that you actually fix the problem by adding the missing code elements that keep the feature from working as originally intended.

Find the segment
Code:
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
   background-color: {T_BODY_BGCOLOR};
   scrollbar-face-color: {T_TR_COLOR2};


Inline to this segment find:
Code:
   background-color: {T_BODY_BGCOLOR};

After this add:
Code:

   background-image: url({T_BODY_BACKGROUND});

This will allow you to utilize the Style Administration panel to change the background image of your forum without having to manually edit the template. Remeber to define the path to the backgound image file from th root of your phpbb directory, e.g. "templates/subSilver/images/background.gif" if you are storing your background image in the subSilver images subdirectory.

Edited - Removed all caps - Techie-Micheal [03/30/05]
Edited - Fixed a typo - Techie-Micheal [03/30/05]

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.