Hi there...
Thanks for the great input here, unfortunately I didn't get it to work with Dynamic Drive DOM Image Rollover (I fear, I simply included the js file wrongly - I'm new to Web-Design

), so I simply took the image mouseover and mouseout effects from mambo ("Advanced" register in the insert image popup for content items) and got it to work without...
You simply replace the "$image="-Line in Chucks Post with the following and can forget about including the JS file...
$image = '<img src="'. mamboCore::get('mosConfig_live_site') .'/images/stories/'. $mitem->name .'.gif" onmouseover="this.src=\''. mamboCore::get('mosConfig_live_site') .'/images/stories/'. $mitem->name .'_over.gif\'" onmouseout="this.src=\''. mamboCore::get('mosConfig_live_site') .'/images/stories/'. $mitem->name .'.gif\'" border="0" alt="'. $mitem->name .'"/>';
So the menu item name is the name of the image und for over-images filenames add "_over"... (thanks Gerry!)
Was just a bit tricky coz of the quotation marks, but it works fine on: "www.kleintierordination.com" (not allowed to post urls yet)...
Kyeema
Quote:
Originally Posted by chucktrukk Well, I was wrong. That didn't work. But this is how I hacked it. Below the code is how I got it to work.
Lines 83-111: PHP Code: default: // formerly case 2
// open in parent window
$txt = '<a href="'. $mitem->link .'" class="'. $menuclass .'" '. $id .'>';
}
if ( $params->get( 'menu_images' ) ) {
$menu_params = new stdClass();
$menu_params =& new mosParameters( $mitem->params );
$menu_image = $menu_params->def( 'menu_image', -1 );
if ( ( $menu_image <> '-1' ) && $menu_image ) {
$image = '<img src="'. $mosConfig_live_site .'/images/stories/'. $menu_image .'" border="0" alt="'. $mitem->name .'" srcover="'. $mosConfig_live_site .'/images/stories/'. $mitem->name .'"/>';
if ( $params->get( 'menu_images_align' ) ) {
$txt = $image;
} else {
//$txt = $image .' '. $txt;
$txt = $txt .' '. $image;
}
}
}
if ($level > 0)
$txt.= $mitem->name;
$txt.='</a>';
return $txt;
break;
}
First I went to Dynamic Drive DOM Image Rollover and installed their script. Very easy.
The only extra step involved is renaming your menus to the new rollover image, such as home_over.gif. I wanted my submenus to stay as text links, so at the bottom, I added "if level is greater than 0, then show the text".
The website is www.radministries.com/discipleship/index.php. I didn't design the website, another designer did. I am just porting it over to Mambo for them. I am still in the process with it, so if you see anything that could be tweaked on it, please let me know.
Chuck |