Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
Donovan
Client



Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Wed Jun 07, 2006 11:50 am Reply with quote

'$bgcolor1' and '$bgcolor2', etc... is set in the theme.php

If, in my custom module pages I set my bgcolor to '$bgcolor1' I get this bright green color that is nowhere near the '$bgcolor1' variable.

Example:

Code:
<table width="100%" border="2" cellpadding="2" align="center" cellspacing="0" style="border-collapse: collapse;" bgcolor='$bgcolor2' bordercolor="#111111">

   <tr>
      <td height="25" colspan="2" align="left" bgcolor='$bgcolor1'><b><font class="content">Vital Statistics</font></b></td>
   </tr>
   <tr>
      <td align="center" bgcolor='$bgcolor2'>


What I want to do is make the colors of my module integrated with whichever theme is shown.
 
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Wed Jun 07, 2006 11:59 am Reply with quote

It should work exactly as you've described it.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Wed Jun 07, 2006 12:08 pm Reply with quote

That of course is the whole idea of having a theme.
I am the last person who should answer questions on themes BUT I will try.
I presume you have preciously declared the values of your $bgcolor like this
Code:
$bgcolor1 = "#FFFFFF";

$bgcolor2 = "#101070";
$bgcolor3 = "#e6e6e6";
$bgcolor4 = "#e6e6e6";
$textcolor1 = "#FFFFFF";
$textcolor2 = "#000000";
so that when you decalr bgcolor as having one the $ values it knows what it should be?
 
View user's profile Send private message Send e-mail
Donovan







PostPosted: Wed Jun 07, 2006 12:09 pm Reply with quote

This is what I get. It doesn't matter what theme I use.

Image
 
Donovan







PostPosted: Wed Jun 07, 2006 12:14 pm Reply with quote

The current theme used.

Code:
/************************************************************/


/* Theme Colors Definition                                  */

/************************************************************/



$bgcolor1 = "#474646";

$bgcolor2 = "#474646";

$bgcolor3 = "#474646";

$bgcolor4 = "#474646";

$textcolor1 = "#FFFFFF";

$textcolor2 = "#FFFFFF";



In my modules pages.

Code:
global $module_name, $db, $prefix, $admin_file, $bgcolor1, $bgcolor2;
 
kguske







PostPosted: Wed Jun 07, 2006 12:59 pm Reply with quote

I was going to suggest making sure it was a global variable, but you've already done that. Can you display the value on the page? I'd guess it's being overwritten somewhere.
 
Guardian2003







PostPosted: Wed Jun 07, 2006 2:58 pm Reply with quote

kguske - god catch!
I'm wondering whether there is a css or style sheet being included somewhere.
 
kguske







PostPosted: Wed Jun 07, 2006 3:09 pm Reply with quote

Another good point, Guardian2003. You can use a color picker to identify the HTML color, then a good source scanner like Crimson Editor to find where that exists in your source (php, css, js, etc.).
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Jun 07, 2006 8:14 pm Reply with quote

Donovan, is the original lines that you posted "wrapped" in a HEREDOC or is this code outside the <?php .... ?> tags?

By the way, when you look at the generated source wihtin the browser, what do you see after the bgcolor= text? I want to follow up on a "hunch"...

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Donovan







PostPosted: Wed Jun 07, 2006 9:16 pm Reply with quote

It was outside of php. I will have to check and view source.
 
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Thu Jun 08, 2006 5:15 am Reply with quote

please provide me with a link to view your website. I can also help if you can provide me with your ftp access for a short while. That color code is somewhere within your theme.

_________________
Themes BB Skins [ Only registered users can see links on this board! Get registered or login! ]
Graphic Tees [ Only registered users can see links on this board! Get registered or login! ]
Paranormal Tees [ Only registered users can see links on this board! Get registered or login! ]
Ghost Stories & More [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
montego







PostPosted: Thu Jun 08, 2006 5:44 am Reply with quote

It would be good to find out first whether the $bgcolor1 is being "parsed" or being taken "literally". That is why I asked Donovan the question. He should be able to quickly tell by looking at the source of the HTML in his browser.
 
jaded







PostPosted: Thu Jun 08, 2006 8:10 am Reply with quote

true but in the case he doesnt know. seeing the site and or my going into it would be the fastest way to fix it for him.
 
Donovan







PostPosted: Thu Jun 08, 2006 8:14 am Reply with quote

This seems to work.

Code:
<td align="center" bgcolor= <?php echo $bgcolor2 ?>><b><font class="title">Personnel File of <?php echo $soldierName ?></font></b></td>


Thanks everyone.
 
montego







PostPosted: Fri Jun 09, 2006 7:13 am Reply with quote

Wink

You're welcome.

By the way, if you are concerned about XHTML compliance, you may want to have it look like this :

bgcolor="<?php echo $bgcolor2 ?>">

For XHTML, every attribute must be quoted and that can be either single or double quotes.

Best regards,
montego
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©