 | Customizing Styles |  |
Posted: 05/05/2007 3:56 AM |
|
|
|
|
|
| Seagull |
| Posts |
111 |
| Word Cnt. |
6,112 |
| BDay |
May 8 |
| Sign |
Taurus |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 5:30 PM
|

|
|
|
|
 |
I want to change some things on a few of my styles , I thought I have seen a few threads on this but just searched and didnt find what I was looking for , does anyone know of any good articles on customizing your styles and maybe even shows you each section broke down and what that section is called , i guess like a schematic of phpbb or something  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 4:01 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:30 PM
Location: St Pete, FL
|

|
|
|
|
 |
I've never seen any documentation like that out there. Of course I haven't been looking for it either, so it could exist...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 4:18 AM |
|
|
|
|
|
| Seagull |
| Posts |
111 |
| Word Cnt. |
6,112 |
| BDay |
May 8 |
| Sign |
Taurus |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 5:30 PM
|

|
|
|
|
 |
| I found something like it when I was doing IBP so thought maybe there was something similar for phpbb.......... so what do I need to change to make the are I post in all white instead of the alternating colors sub Silver uses ? |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 4:49 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:30 PM
Location: St Pete, FL
|

|
|
|
|
 |
In your View Topic page, the alternating colors are set in your viewtopic.php file. The code looks like this:
| Code:
|
|
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
|
In your viewtopic_body.tpl file, the assignment looks like this:
| Code:
|
|
<td class="{postrow.ROW_CLASS}"
|
The $theme settings are assigned in your functions.php file in the setup_style function which retrieves the information from your phpbb_themes table. So to see the settings for td_class1 and td_class2, you would go into your ACP Styles Admin section and click on Management. Then on the right, click on Edit:
When you scroll down, you will find the Table Cell Class settings:
But we still aren't done. All this tells us is the classes to look for in your subSilver.ces file. So when you open the subSilver.css file in your favorite editor, you will find the settings for the row1 and row2 classes:
| Code:
|
/* Main table cell colours and backgrounds */
td.row1 { background-color: #EFEFEF; }
td.row2 { background-color: #DEE3E7; }
td.row3 { background-color: #D1D7DC; }
|
So if you want them to display all white, you could change it to look like this:
| Code:
|
/* Main table cell colours and backgrounds */
td.row1 { background-color: #FFFFFF; }
td.row2 { background-color: #FFFFFF; }
td.row3 { background-color: #D1D7DC; }
|
Unfortunately, subSilver and some of the other templates include the style settings in the overall_header.tpl files and ignore the settings in the subSilver.css files. So in the subSilver overall_header.tpl file, you would find these settings:
| Code:
|
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
|
So you could change it to look like this if you want row1 and row2 to have the same color:
| Code:
|
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR1}; }
td.row3 { background-color: {T_TR_COLOR3}; }
|
Then if you want the color to be white, you could modify it in Styles Admin Management:
Of course, this may affect the colors all over your forum and it is a lot of hoops to jump through to change one setting. So you may want to create a new class if you only want to change the color in this one section. You could create a row4 in your overall_header.tpl file and set the color to white:
| Code:
|
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
td.row4 { background-color: #FFFFFF; }
|
Then you can change the code in the viewtopic_body.tpl file to use the new class:
OPEN
viewtopic_body.tpl
FIND
| Code:
|
|
<td class="{postrow.ROW_CLASS}"
|
REPLACE WITH
I hope that didn't confuse you more. Changing the template colors can get confusing...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 6:11 PM |
|
|
|
|
|
| Seagull |
| Posts |
111 |
| Word Cnt. |
6,112 |
| BDay |
May 8 |
| Sign |
Taurus |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 5:30 PM
|

|
|
|
|
 |
lmao no that didnt confuse me at all thanks Nightrider its a lil overwhelming at first glance but thats the info i need so will just take my time and test it on other site b4 messing with live one , Thanks |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 6:28 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:30 PM
Location: St Pete, FL
|

|
|
|
|
 |
Good. I was afraid that my explanation might make things less clear. Even when you understand all of what I posted, it can be a guessing game when trying to adjust the class settings on a template. It would be nice if all the alternatve template styles settings were assigned the same way in order to minimize the confusion...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 6:59 PM |
|
|
|
|
|
| Seagull |
| Posts |
111 |
| Word Cnt. |
6,112 |
| BDay |
May 8 |
| Sign |
Taurus |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 5:30 PM
|

|
|
|
|
 |
| I agree it would make it easier , I tried changing it b4 and when got posting area white so was most the rest of the section so gave up figured building the site was more important now thats bout done they want it purrtied up some lol |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 8:30 PM |
|
|
|
|
|
| Caravan |
| Posts |
282 |
| Word Cnt. |
31,380 |
| BDay |
Apr 14 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Nov 01, 2006
Local time: 5:30 PM
Location: Denver, PA
|

|
|
|
|
 |
That was a great walkthrough Nightrider. I agree, I wish there was some sort of consistency with the different templates, it can be tricking figuring out what is controlled where. I started with the challenges of personalizing subsilver, which at the time was really hard to figure out. Since then I have only really worked with 4 different templates and each one had their own challenges. When it came down to it and I needed to get something done, I used the method mentioned last in nightrider's post. If you learn a little css you can easily change almost anything on your template by creating a new class for your desired result.
What things are you looking to change? Just start with one and take your time, play around to learn how to tweak it more. If you have any questions I can try to help you, but I am still just learning myself.....each template brings a new adventure.  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/05/2007 10:33 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:30 PM
Location: St Pete, FL
|

|
|
|
|
 |
When I decided to add templates here in RCF, I added 24 new templates. As I found out that some didn't play nice with the MODs that I was trying to install, I removed them one at a time until we were down to 12 templates. Now we only have one difficult template installed here and no one really uses it. So I've been tempted to remove it as well. Without the noteBoard template, I doubt that I would have much trouble installing any MOD into any of the remaining 11 templates...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Customizing Styles |  |
Posted: 05/06/2007 5:54 PM |
|
|
|
|
|
| Sparrow |
| Posts |
45 |
| Word Cnt. |
5,039 |
| BDay |
N/A |
| Sign |
N/A |
| Sex |
 |
|
|
|
Joined: Sep 24, 2006
Local time: 11:30 PM
|

|
|
|
|
 |
Not so long ago I came across this Template Design Guide. It´s a very nicely written and designed guide. Recommendable reading.
I think you should really start from scratch with a copy of subSilver and turn it into something completely different, your own unique personal style. And when you have finished that style and are completely satisfied with it you install it on your liveboard.
I recommend you install a local server on your homecomputer because that makes working on a style much easier and quicker. |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|