HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Diferent colors to diferent areas !!!

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#1795 (In Topic #412)
Avatar

Fan in training

Diferent colors to diferent areas !!!

This mod. allows you to select a back color for each table (Area) …
to do this ive changed "funcs.php" , "index.php", "layout.php", and "style.php"

At funcs.php (my Line 440), find :

Code

function start_table($fill="width=\"100%\"",$nowrap=0,$title="")
{
   echo get_table_start($fill,$nowrap,$title);
}

and replace by :

Code

function start_table($fill="width=\"100%\"",$nowrap=0,$title="",$identity="")
{
   echo get_table_start($fill,$nowrap,$title,$identity);
}

At index.php (my Line 117), find :

Code

start_table();


and replace by :

Code

   start_table("width=\"100%\"",0,"","MIDDLE");

At layout.php (my Line 191), find :

Code

put_in_table($tab);

and replace by :

Code

put_in_table($tab,"width=\"100%\"",0,"","HEADER");

At style.php (my Line 26), find :

Code

// The fill colour for tables
function get_fill_color()
{
   return "#E4EAF2";
}

and replace by:

Code

// The fill colour for tables
function get_fill_color($identity="")
{

// uncomment the next line to see the different titles u can use
//echo "    TITLE -> ".$identity;

   // color when drawing header
   if ($identity=="HEADER") return "red";
   else
    // color when drawing center table
   if ($identity=="MIDDLE") return "green";
   else
   if ($identity=="Menu") return "yellow";
   else
   if ($identity=="Stats") return "Blue";
   // here u can add more if (...) return color
   else
    return "#E4EAF2";
    
    
}

and at my line 88 replace :

Code

function get_table_start($fill="width=\"100%\"",$nowrap=0,$title="")
{
$baseurl=get_base_url()."/";
$theme=get_theme();
if ($nowrap==1) $wrap="nowrap=\"nowrap\""; else $wrap="";
$tc=get_title_color();
$fc=get_fill_color();

$out=<<<END
<table $fill border='0' cellpadding='2' cellspacing='0'>
   <tr>
      <td valign='top' height='100%'>
         <table width='100%' style='height: 100%; border: 1px solid #072A66' cellpadding="2" cellspacing="0">

END;
if ($title!="") $out.=<<<END
         <tr>
            <td height='23' nowrap="nowrap" bgcolor="$tc" align='center'  class="ttitle">
               <strong>$title</strong>
            </td>
         </tr>

END;
$out.=<<<END
         <tr>
            <td valign='top' bgcolor="$fc" height='100%' $wrap>

END;

return $out;
}

by :

Code

function get_table_start($fill="width=\"100%\"",$nowrap=0,$title="", $identity="")
{
$baseurl=get_base_url()."/";
$theme=get_theme();
if ($nowrap==1) $wrap="nowrap=\"nowrap\""; else $wrap="";
$tc=get_title_color();

if ($identity=="") $identity=$title;
$fc=get_fill_color($identity);


$out=<<<END
<table $fill border='0' cellpadding='2' cellspacing='0'>
   <tr>
      <td valign='top' height='100%'>
         <table width='100%' style='height: 100%; border: 1px solid #072A66' cellpadding="2" cellspacing="0">

END;
if ($title!="") $out.=<<<END
         <tr>
            <td height='23' nowrap="nowrap" bgcolor="$tc" align='center'  class="ttitle">
               <strong>$title</strong>
            </td>
         </tr>

END;
$out.=<<<END
         <tr>
            <td valign='top' bgcolor="$fc" height='100%' $wrap>

END;

return $out;
}



or download this style.php (base on default theme).


What all this does is identify what is beeing draw … the $identity var parsed into style.php has the identification of the "object" to be draw … so depending of the object i can select a color or do something else.

Ps- u can use the to change also the border colors (diferent border color to diferent tables) ..
Back to the top
 
Posted
Rating:
#1796
Avatar

Fan in training

Originally posted by Joao@Jul 8 2004, 04:47 PM
 This mod. allows you to select a back color for each table (Area) …
to do this ive changed "funcs.php" , "index.php", "layout.php", and "style.php"


What all this does is identify what is beeing draw … the $identity var parsed into style.php has the identification of the "object" to be draw … so depending of the object i can select a color or do something else.

Ps- u can use the to change also the border colors (diferent border color to diferent tables) ..
".. i love my english even sometimes i dont understand it.. " :lol:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: