PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
AndyB
Worker
Worker


Joined: Jun 03, 2004
Posts: 229
Location: Tamworth, UK

PostPosted: Tue Jan 19, 2010 4:28 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Jan 21, 2010 2:24 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
AndyB
Worker
Worker


Joined: Jun 03, 2004
Posts: 229
Location: Tamworth, UK

PostPosted: Thu Jan 21, 2010 4:06 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
AndyB
Worker
Worker


Joined: Jun 03, 2004
Posts: 229
Location: Tamworth, UK

PostPosted: Thu Jan 21, 2010 5:02 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Thu Jan 21, 2010 7:08 am Reply with quote Back to top

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;
View user's profile Send private message
AndyB
Worker
Worker


Joined: Jun 03, 2004
Posts: 229
Location: Tamworth, UK

PostPosted: Thu Jan 21, 2010 7:48 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum