Author |
Message |
AndyB
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/50e5906d503900b86d7c3.jpg)
Joined: Jun 03, 2004
Posts: 231
Location: Torrevieja, Spain
|
Posted:
Tue Jan 19, 2010 4:28 pm |
|
Quick (ish) one guys;
I'm trying to modify a theme; I've managed to change all the various colours EXCEPT one set;
the expanding/ collapsing forums block (center)- I can't seem to work out which attribute it is I need to change for the font colour in the top of the table
([Forum] Topic Replies Author Views Last Post )
These are in bold.
If someone could please advise which css fill (theme or forums within the theme folder) and which particular part (style) it would be much appreciated.
I can provide a link to the dev server if required. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Jan 21, 2010 2:24 am |
|
I believe I put that directly into the block code. Take a look and if it isn't there let me know. I'm on my way into bed but I'll check back later. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
AndyB
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jan 21, 2010 4:06 am |
|
thanks, Raven. I'm guessing (if it is) it's just a matter of tweaking the code to pick up the css? (I'm guessing one of the fields from the forum css?)
I'll see if I can get access to the block code from work, and take a look ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
AndyB
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jan 21, 2010 5:02 am |
|
here's what I found (took some finding!)
in the forum collapsing block:
Code:global $admin, $bgcolor1, $bgcolor2, $db, $prefix, $sitename, $textcolor1, $textcolor2, $user, $user_prefix, $currentlang, $language;
|
I then looked into index.php and found
Code: if (file_exists('themes/'.$ThemeSel.'/modules/'.$name.'/'.$mod_file.'.php')) {
$modpath = 'themes/'.$ThemeSel.'/';
|
But I notice the font colour is the same for any theme, so guessed it's possibly not defined? As it turned out, that wasn't the case; the theme I'm "playing" with has had some issues (I managed to sort most of them by looking into the relevant files- nothing major- posting to wrong directories for images, etc.)
I then opened up theme/theme.php
I found the following:
Code:$block="left";
$bgcolor1 = "#ffffff";
$bgcolor2 = "#cccccc";
$bgcolor3 = "#ffffff";
$bgcolor4 = "#cccccc";
$textcolor1 = "#666666";
$textcolor2 = "#333333";
|
I figured I'd change the hex value (in my case for that block, $textcolor1) and it worked....
My question is (and it *may* be fairly simple for some one with more experience)
Is it possible to change either the reference in the forum collapsing block to pick up a particular field from the css file? (either the one for the forum, OR the one for the site)
And/ or do the same to the theme.php file? Maybe define somewhere in one of the main config files/ where the theme is defined in the DB that $color1,2,etc and bgcolor1,2 etc. are a particular field in the site's theme css file?
Just a thought. Sorry if I'm being a pain- figure if as much as possible is in one configuration file for the theme (css?) then it makes it easier for all blocks, whether used or not to pick up the theme....
Feedback welcome ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Thu Jan 21, 2010 7:08 am |
|
You can certainly edit the block to use whatever css classes you wish, but alot of modules use the $bgcolor1, $bgcolor2, $bgcolor3 and $bgcolor4 values so it wouldn't be easy to replace them globally. When this variable is used a hex value is expected, and you would end up with errors if you tried to replace it with a class... here is just one example from the content module:
Code:echo ' <tr style="background-color: '.$bgcolor4.';">'.PHP_EOL;
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
AndyB
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jan 21, 2010 7:48 am |
|
could you not use a configuration file (xml?) that substituted the variable for an equivalent declaration in the .css?
That way, no matter which theme any one was using/ if it changed, the colours would alter accordingly. (Not sure if I'm explaining myself here)
I think what I'm trying to say, is, instead of something being hard coded into a block/ module, the config file is used, thus saving any colour "mis-match" like I've just experienced. (Or does it do that already, and I've got it all wrapped around my tits) ![Razz](modules/Forums/images/smiles/icon_razz.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|