Main menu color

Hi,

is there a way to make the main menu color to be changed like on the myyearbook menu?colored menu

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 12 Jul 2010

no css pro here? :-)

My gf really wants this :-)

There must be a away, no?

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 17 Jul 2010

Ok, somehow I found out something :-)

Those are the codes I use!

In top_menu.css:

div.sys_top_menu a span.menu1{color:red}
div.sys_top_menu a span.menu2 {color:blue}
div.sys_top_menu a span.menu3{color:red}
div.sys_top_menu a span.menu4 {color:green}
div.sys_top_menu a span.menu5{color:orange}
div.sys_top_menu a span.menu6 {color:purple}
div.sys_top_menu a span.menu7{color:green}
div.sys_top_menu a span.menu8 {color:bred}
div.sys_top_menu a span.menu9{color:blue}
div.sys_top_menu a span.menu10 {color:green}
div.sys_top_menu a span.menu11{color:orange}

and in _sub_header.html:

<td class="top"  ><a href="http://filipina-dating-community.com/join.php"   class="top_link"><span class="down menu1" >Account</span>
<td class="top"  ><a href="http://filipina-dating-community.com/browse.php"   class="top_link"><span class="down menu2" >People</span>
<td class="top"  ><a href="http://filipina-dating-community.com/m/photos/home/"   class="top_link"><span class="down menu3" >Photos</span>
<td class="top"  ><a href="http://filipina-dating-community.com/m/videos/home/"   class="top_link"><span class="down menu4" >Video</span>
<td class="top"  ><a href="http://filipina-dating-community.com/forum/"   class="top_link"><span class="down menu5" >Forums</span>
<td class="top"  ><a href="http://filipina-dating-community.com/blogs/home/"   class="top_link"><span class="down menu6" >Blogs</span>
<td class="top"  ><a href="http://filipina-dating-community.com/m/groups/home/"   class="top_link"><span class="down menu7" >Groups</span>
<td class="top"  ><a href="http://filipina-dating-community.com/page/games"   class="top_link"><span class="down menu8" >Games</span>
<td class="top"  ><a href="http://filipina-dating-community.com/m/chat/home/"   class="top_link"><span class="down menu9" >Chat</span>
<td class="top"  ><a href="http://filipina-dating-community.com/search_home.php"   class="top_link"><span class="down menu10" >Search</span>
<td class="top"  ><a href="http://filipina-dating-community.com/help.php"   class="top_link"><span class="down menu11" >Help</span>

which of course generated another menu.

I try

<span class="down menu1" >Account</span>

only and a few other ways but no success!


Can anyone help me where to place the codes and the correct codes?

Thank you in advance :-)

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 19 Jul 2010

Hello man.

but maybe generate necessary top menu color via random? :)

you can check

templates\base\scripts\BxBaseMenu.php

function genTopItem(

as example near $sBoldStyle variable ;)

Quote · 19 Jul 2010

Thank you :-)

now I just need to figure what I add :-)

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 19 Jul 2010

With
$sBoldStyle = ($isBold) ? 'style="font-weight:bold;"' : 'style="COLOR: #ff0000;"';
I get the menu color to red, but how can I make this random color?

Of course I don't give up :-)

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 19 Jul 2010

A little another

instead

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;"' : 'style="COLOR: #ff0000;"';

make something like this:


1. adding new function:

function random_color(){
mt_srand((double)microtime()*1000000);
$c = '';
while(strlen($c)<6){
$c .= sprintf("%02X", mt_rand(0, 255));
}
return $c;
}

and after using it:

$sRandColor = '#' . $this->random_color();

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;color:'.$sRandColor.'"' : 'style="color:'.$sRandColor.'"';

(hope I not mess with quotes)  :)

Quote · 19 Jul 2010

You are an angel, its working now :-)

Thank you very much!


How can I make it bold?

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 19 Jul 2010

font-weight:bold;

mean bold text :)

Quote · 20 Jul 2010

That's what I first thought :-)

But then, http://filipina-dating-community.com/ it looks pretty un-bold :-)

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 20 Jul 2010

 

where in the code do you post that code

and also how do you change the header color

 

/*
 * Generate top menu elements
 */
    function genTopItem($sText, $sLink, $sTarget, $sOnclick, $bActive, $iItemID, $isBold = false, $sPicture = '') {
  $sActiveStyle = ($bActive) ? ' id="tm_active"' : '';

  if (!$bActive) {
   $s alt= $sOnclick ? ( ' alt="' . $sOnclick . '"' ) : '';
   $sTarget  = $sTarget  ? ( ' target="'  . $sTarget  . '"' ) : '';
  }

  $sLink = (strpos($sLink, 'http://') === false && !strlen($sOnclick)) ? $this->sSiteUrl . $sLink : $sLink;

  $sMoreIc alt= getTemplateIcon('tm_sitem_down.gif');

  $sSubMenu = $this->getAllSubMenus($iItemID);

 
 $sBoldStyle = ($isBold) ? 'style="font-weight:bold;"' : 'style="COLOR: #ff0000;"';

  $sImgTabStyle = $sPictureRep = '';
  if ($isBold && $sPicture != '') {
   $sPicturePath = getTemplateIcon($sPicture);
   $sPictureRep = <<<EOF
<img src="{$sPicturePath}" style="vertical-align:middle;width:16px;height:16px;" />
EOF;

   $sText = '&nbsp;';
   $sImgTabStyle = 'style="width:38px;"';
  }

  $sMainSubs = ($sSubMenu=='') ? '' : <<<EOF
 <!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
 <ul class="sub main_elements">
  {$sSubMenu}
  <li class="li_last_round">&nbsp;</li>
 </ul>
 <!--[if lte IE 6]></td></tr></table></a><![endif]-->
EOF;

  $this->sCode .= <<<EOF
<td class="top" {$sActiveStyle} {$sImgTabStyle}>
 <a href="{$sLink}" {$sOnclick} {$sTarget} class="top_link"><span class="down" {$sBoldStyle}>{$sPictureRep}{$sText}</span>
 <!--[if gte IE 7]><!--></a><!--<![endif]-->


 <div style="position:relative;display:block;">{$sMainSubs}</div>
</td>
EOF;
 }

Quote · 21 Jul 2010

function random_color(){
mt_srand((double)microtime()*1000000);
$c = '';
while(strlen($c)<6){
$c .= sprintf("%02X", mt_rand(0, 255));
}
return $c;
}



function genTopItem($sText, $sLink, $sTarget, $sOnclick, $bActive, $iItemID, $isBold = false, $sPicture = '') {

$sActiveStyle = ($bActive) ? ' id="tm_active"' : '';

if (!$bActive) {
$s alt= $sOnclick ? ( ' alt="' . $sOnclick . '"' ) : '';
$sTarget  = $sTarget  ? ( ' target="'  . $sTarget  . '"' ) : '';
}

$sLink = (strpos($sLink, 'http://') === false && !strlen($sOnclick)) ? $this->sSiteUrl . $sLink : $sLink;

$sMoreIc alt= getTemplateIcon('tm_sitem_down.gif');

$sSubMenu = $this->getAllSubMenus($iItemID);

$sRandColor = '#' . $this->random_color();

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;color:'.$sRandColor.'"' : 'style="color:'.$sRandColor.'"';

$sImgTabStyle = $sPictureRep = '';
if ($isBold && $sPicture != '') {

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 21 Jul 2010

Change header color if I'm not mistaken :-)

/templates/base/css/general.css

div.sys_main_logo {
position: relative;
z-index: 56;

background-color: #f4f4f4;
}

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 21 Jul 2010

i got a white page

 

 /*
 * Generate sub items of sub menu elements
 */
    function genSubItems( $iTItemID = 0 ) {
        if( !$iTItemID )
            $iTItemID = $this->aMenuInfo['currentTop'];

  $sSubItems = '';
        foreach( $this->aTopMenu as $iItemID => $aItem ) {
            if( $aItem['Type'] != 'custom' )
                continue;
            if( $aItem['Parent'] != $iTItemID )
                continue;
            if( !$this->checkToShow( $aItem ) )
                continue;

            //generate
            list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );

            $aItem['Link']    = $this->replaceMetas( $aItem['Link'] );
            $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );

            $bActive = ( $iItemID == $this->aMenuInfo['currentCustom'] );

            $sSubItems .= $this->genSubItem( _t( $aItem['Caption'] ), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive );
        }

  $this->sCode .= ($sSubItems=='') ? '<div class="subMenuContainerEmpty"></div>' : <<<EOF
   <div class="subMenuContainer">
    <table cellspacing="0" cellpadding="0"><tr>
     {$sSubItems}
    </tr></table>
   </div>
EOF;
    }

<added this >

 /*
 * Generate top menu elements
 */
    function random_color(){
mt_srand((double)microtime()*1000000);
$c = '';
while(strlen($c)<6){
$c .= sprintf("%02X", mt_rand(0, 255));
}
return $c;
}

 

function genTopItem($sText, $sLink, $sTarget, $sOnclick, $bActive, $iItemID, $isBold = false, $sPicture = '') {

$sActiveStyle = ($bActive) ? ' id="tm_active"' : '';

if (!$bActive) {
$s alt= $sOnclick ? ( ' alt="' . $sOnclick . '"' ) : '';
$sTarget  = $sTarget  ? ( ' target="'  . $sTarget  . '"' ) : '';
}

$sLink = (strpos($sLink, 'http://') === false && !strlen($sOnclick)) ? $this->sSiteUrl . $sLink : $sLink;

$sMoreIc alt= getTemplateIcon('tm_sitem_down.gif');

$sSubMenu = $this->getAllSubMenus($iItemID);

$sRandColor = '#' . $this->random_color();

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;color:'.$sRandColor.'"' : 'style="color:'.$sRandColor.'"';

$sImgTabStyle = $sPictureRep = '';
if ($isBold && $sPicture != '') { 

 

Stop here


<img src="{$sPicturePath}" style="vertical-align:middle;width:16px;height:16px;" />
EOF;

   $sText = '&nbsp;';
   $sImgTabStyle = 'style="width:38px;"';
  }

  $sMainSubs = ($sSubMenu=='') ? '' : <<<EOF
 <!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
 <ul class="sub main_elements">
  {$sSubMenu}
  <li class="li_last_round">&nbsp;</li>
 </ul>
 <!--[if lte IE 6]></td></tr></table></a><![endif]-->
EOF;

  $this->sCode .= <<<EOF
<td class="top" {$sActiveStyle} {$sImgTabStyle}>
 <a href="{$sLink}" {$sOnclick} {$sTarget} class="top_link"><span class="down" {$sBoldStyle}>{$sPictureRep}{$sText}</span>
 <!--[if gte IE 7]><!--></a><!--<![endif]-->
 <div style="position:relative;display:block;">{$sMainSubs}</div>
</td>
EOF;
 }
 /*
 * Get parent of submenu element
 */
 function genSubFirstItem( $iTItemID = 0 ) {
  if( !$iTItemID )
   $iTItemID = $this->aMenuInfo['currentTop'];

  foreach( $this->aTopMenu as $iItemID => $aItem ) {
   if( $aItem['Type'] != 'custom' )
    continue;
   
   if( $aItem['Parent'] != $iTItemID )
    continue;
   
   if( !$this->checkToShow( $aItem ) )
    continue;
   
   return $iItemID;
  }
 }

 /*
 * Generate header for sub items of sub menu elements
 */
 function genSubHeader( $iTItemID, $iFirstID, $sCaption, $sDisplay, $sPicture = '' ) {
  $sLoginSecti alt= $sSubElementCapti alt= $sProfStatusMessage = $sProfStatusMessageWhen = $sProfileActi alt= '';
  $sCapti alt= $sProfStatusMessageEl = $sMiddleImg = '';

  if ($this->aMenuInfo['currentCustom'] == 0 && $iFirstID > 0) $this->aMenuInfo['currentCustom'] = $iFirstID;
  //comment need when take header for profile page
  if ($this->sCustomSubHeader == '' && $this->aMenuInfo['currentCustom'] > 0) {
   $sSubCapIc alt= getTemplateIcon('_submenu_capt_right.gif');
   $sSubElementCapti alt= _t($this->aTopMenu[$this->aMenuInfo['currentCustom']]['Caption']);

   $sCustomPic = $this->aTopMenu[$this->aMenuInfo['currentCustom']]['Picture'];
   $sPicture = ($sCustomPic != '') ? $sCustomPic : $sPicture;

   $sMiddleImg = '<img src="'.$sSubCapIcon.'" />';
   $sSubElementCapti alt= <<<EOF
<f alt="font-weight:normal;">{$sSubElementCaption}</font>
EOF;

Quote · 21 Jul 2010

COULD SOMEONE PLEASE WALK ME THROUGH THIS CAUSE I WOULD ALSO LIKE THIS. THANKS:)

Quote · 2 Aug 2010

Don't Shout, it's rude.

COULD SOMEONE PLEASE WALK ME THROUGH THIS CAUSE I WOULD ALSO LIKE THIS. THANKS:)

There are none so blind as those that will not see.
Quote · 2 Aug 2010

I did follow Andrew's steps and I did it even though I'm not a programmer!

Read, back up, try and you will succeed :-)

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 2 Aug 2010

Hi,

 

I have try to give all the command as per suggestion of Andrewp for random color chnage of Main Menu.

 

But unable to get BOLD TEXT of menu.

 

I have given following line command.

 

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;color:'.$sRandColor.'"' : 'style="color:'.$sRandColor.'"';

 

What is the command line for change Main Menu Text to Bold Text ?

 

Also what is the command line for change submenu text to bold text and where to change it ?

 

I have dolphin 7.0.4 version.

 

Thanks in advance

Quote · 5 Feb 2011

This is the line:

$sBoldStyle = ($isBold)

but it is as bold as bold as it gets. I know strange cos it does not seem to be bold at all :-) but thats it :-)

Hi,

 

I have try to give all the command as per suggestion of Andrewp for random color chnage of Main Menu.

 

But unable to get BOLD TEXT of menu.

 

I have given following line command.

 

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;color:'.$sRandColor.'"' : 'style="color:'.$sRandColor.'"';

 

What is the command line for change Main Menu Text to Bold Text ?

 

Also what is the command line for change submenu text to bold text and where to change it ?

 

I have dolphin 7.0.4 version.

 

Thanks in advance

 

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 5 Feb 2011

Dear Diddy,

Where to add command line as per your suggetion ?

$sBoldStyle = ($isBold)

 

I have given following line

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;color:'.$sRandColor.'"' : 'style="color:'.$sRandColor.'"';

 

Also try to add following line in above/after the above line....

$sBoldStyle = ($isBold)

 

But there is no effect.

I dont have so much knowledge.

my website is www.nundhatad.org

Please help me..

Thanks in advance

 

Quote · 5 Feb 2011

@nundhated

thats it, you will not get it more bold. Same on my site!

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 5 Feb 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.