Ravens PHP Scripts: Forums
 

 

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



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

PostPosted: Tue Dec 30, 2008 11:41 am Reply with quote

How do I get a custom menu to use the bgcolor1 and bgcolor2 of the loaded theme?

If the javascript menu has a file such as c_config.js that I place in the included folder and inside it has CSS classes? How do I "import" the default theme colors?

Example:

Here is part of the c_config.js file.
Code:


/******************************************************
   (2) MENU STYLES (CSS CLASSES)
*******************************************************/

// You can define different style classes here and then assign them globally to the menu tree(s)
// in section 3 below or set them to any UL element from your menu tree(s) in the page source


c_imagesPath=""; // path to the directory containing the menu images


c_styles['MM']=[ // MainMenu (the shorter the class name the better)
[
// MENU BOX STYLE
0,      // BorderWidth
'solid',   // BorderStyle (CSS valid values except 'none')
'#8F90C4',   // BorderColor ('color')
0,      // Padding
'#3A3A3A',   // Background ('color','transparent','[image_source]')
'',      // IEfilter (only transition filters work well - not static filters)
''      // Custom additional CSS for the menu box (valid CSS)
],[
// MENU ITEMS STYLE
1,      // BorderWidth
'solid',   // BorderStyle (CSS valid values except 'none')
'solid',   // OVER BorderStyle
'#FFF5C6',   // BorderColor ('color')
'#4d4c76',   // OVER BorderColor
4,      // Padding
'#FFF5C6',   // Background ('color','transparent','[image_source]')
'#CBCBEF',   // OVER Background
'#252455',   // Color
'#000000',   // OVER Color
'12px',      // FontSize (values in CSS valid units - %,em,ex,px,pt)
'verdana,arial,helvetica,sans-serif',   // FontFamily


This is from the [ Only registered users can see links on this board! Get registered or login! ] site and is one of several I could use. I just need it to be able to use whatever theme colors are on the site.

You open up any theme.php and it has its own...

$bgcolor1 = "#0B0D08";
$bgcolor2 = "3A3A3A";

How do I use these instead of what is coded in the classes?
 
View user's profile Send private message Visit poster's website ICQ Number
Guardian2003
Site Admin



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

PostPosted: Tue Dec 30, 2008 12:26 pm Reply with quote

You could try instead of
Code:
'#FFF5C6',

Code:
<?php echo $bgcolor; ?>

Might not work though unless you are 'including' the JS file into a php file.
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other

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 ©