21 replies [Last post]
mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hello all, i am facing a wierd problem in Firefox. I hav a video module, in a site i did, and the links appears in IE which is clickable, while, I n firefox i cant click it.

Its joomla based.... so then i hadnt tried validating, so plz excuse that...

Link :http://www.lasrockazz.eu.dd12904.kasserver.com/Joomla/
Signin Details.: trial
Password: abcd1234

After signing in, you will have to go to Community-> Video gallery

There you'll see a "nueur clip" link... it doesnt work in FF, works fine in IE6/7.

mihir Smiling
PS: Please Ignore the Colours, the client asked for them... Laughing out loud

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

Some prepping is necessary

neuer Clip
I suspect the hidden AP element is masking the div with the link. I didn't test, because inline styles are a PITA, and not worth the effort it takes to override. Too, there are about 200 html syntax errors that may or may not be involved.

Please correct your code ("Its joomla based.... so then i hadnt tried validating, so plz excuse that..."—the html still needs to be corrected.) and remove the inline styles to a stylesheet, or embed in the head.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi i did check validation,

hi i did check validation, and like all joomla sites, most of my html is fine, but the no.of modules, have their own css's that i do not need to include in my css. so these errors are of the modules and not my index. if u wish i can post the index and the css codes for you to see...

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

Most of your html is not OK.

Most of your html is not OK. And no, you don't need to post the html, I can view source (and post it to the validator) just fine.

I just ran http://www.lasrockazz.eu.dd12904.kasserver.com/Joomla/index.php?option=com_seyret&Itemid=139
through the W3 validator and got "Result: Failed validation, 192 errors". That's the page with the problems.

Validation or no, you have inline style attributes, along with intermingled javascript. Both are poor practice. I just did notice among the html errors, a <style></style> block within the body element. What's with that?

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

I think that this is going

I think that this is going over old ground? isn't it mihirc

http://csscreator.com/node/22066

I thought that you had sorted out the absurd implementation of joomla modules? if not and you are still showing the same horrendous markup errors then help from us is very unlikely, personally I have said all I'm going to on the subject of Joomla, I simply can't take that CMS seriously Smile

Sorry I realise this comes across as unhelpful? but we live and die by the standards, valid markup etc mantras partly as attempting to help with CSS problems is made very close to imposible with invalid code, and thus pointless.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi, i did make changes to 1

hi,

i did make changes to 1 module and if you check my companys site, they are 99% valid. but when it comes to sites with n number of modules made by diff companies, it seriously isnt really helpful and the only way out , is the painstaking process of making js that will make that particular extension valid. yea, i agree it is going the same way, as the last thread which i didmake it valid, and mine might be THE VALID SITE In Joomla.

@kk5st... if you check the css path, you will notice something like transmenu in it and that is an external module published. so i really cant help making it valid, as for my real question i havnt got a good reply yet... if you look through the html coding, then you wont find any problems i am quite sure...

mihir.Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

But you get the point here

But you get the point here don't you?

It's completely screwed up markup :shrug: why? I have never come across a popular CMS that allows it's module writers to make a mess of things in this way, what is the reason for it? it confuses the heck out of me.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi, there are loads of ppl

hi,

there are loads of ppl who are doing there best to get joomla, being validated. I am one of them. now the only thing is, we need ppl to work, basically the problems are known, the answers are known, there just arnt enough hands to copy re-write them on paper. technically each module that is published by 3rd party ppl should be validated. and those module if you go to joomla's site and see the extensions, you will find there are thousands and thousands and thousands...

So the only way out is each developer validates his own page, and then if he does another site, he does it again, and again and again...

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

mihirc

mihirc wrote:
<snip>
@kk5st... if you check the css path, you will notice something like transmenu in it and that is an external module published. so i really cant help making it valid, as for my real question i havnt got a good reply yet... if you look through the html coding, then you wont find any problems i am quite sure...

mihir.Smile
I am not at all concerned with the stylesheet yet. You have 192 html syntax errors on the page in question. In order to check the validity, you most save the source to file, then upload that file to the validator. The validator does not have direct access to that page and only sees the index page. Do as I described, and correct your errors. Many are critical.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi,

hi,
i know the importance of validating a page, and let me tell you if you take a look at my index, its FINE. the problem is joomla puts all the stuff directly in ur index, when a page loads, so all the crap that comes, is from there. an d you cant just check it, bcz it gets inside the index. Anyways, i am working very very hard to try and make a joomla site validate. i am almost there, just a few changes that i need to workout to make this site (www.tekdi.net) 100% valid.

mihir Smile
P.S.: Its Quarter to 2 here(in the morning), and i need to get to office by 10, so gotta pull myself away from the comp and to the bed.. even the coffee is finished now Sad Good Morning!!! Laughing out loud

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

Who cares if the bare nekkid

Who cares if the bare nekkid index page is valid? It's not the page with the problem. If a Joomla module is injecting the errors, open the module source and fix it.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

kk5st wrote:Who cares if the

kk5st wrote:
Who cares if the bare nekkid index page is valid? It's not the page with the problem. If a Joomla module is injecting the errors, open the module source and fix it.

gary

Yeah been over this point :shrug: it's why I posted the link earlier.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

Yeah been over this point

Hugo wrote:
Yeah been over this point :shrug: it's why I posted the link earlier.

Figured as much. Was trying a different tack to get past a basic misunderstanding of How Things Work

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Well, joomla sucks in

Well, joomla sucks in validation, and that is why i am trying to get as much help as possible to validate it. and there are thousand third party extensions, which need to be modified, and that might be a bit pain of pain to do, cause each site, has different requirement.

mihir.Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

Right now, you have only the

Right now, you have only the one page to sweat. Fix the modules that are used on this page; the other 999 modules don't matter.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Well, Yea, but that has

Well, Yea, but that has taken a back seat now, am trying to make my company's site validate, which is almost done.

once i do that i will turn to the others...

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Mihir harking back to the

Mihir harking back to the other post, did you not re-configure a module that was giving problems?

From what I saw on a check of Joomla sites two different modules demonstrated exactly the same problems, suggesting a core common problem with the method used to call and merge module parts into a page, does this not mean that the fix then is the same from module to module? but as Gary says focus on the problem at hand rather than the 1789 other modules.

I'm slightly interested in how the modules in Joomla are written to cause this problem. Drupal has many many third party modules and some are vastly complex bits of coding requiring javascript and css files apart from core scripting files yet the Drupal architecture provides a common method to include these modules into the app without upsetting anything, which clearly is quite an important part of a module implementation or CMS api.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi hugo, do i put the

hi hugo,

do i put the trans-menu modules code that is causing the validation problems to my home site? www.tekdi.net? as you will notice that, each module is having its own css, which the module includes in itself or its own index.php. As i mentioned in my earlier post, you add an php position in your div. Like this... <?php mosLoadModules ( 'left' ); ?> So if i publish a module in the left position, it kind of unzips itself in that position. So the css get's attached in the div. and that is why all the problem arise.

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

My real problem with this is

My real problem with this is that I can't believe that this has been allowed to happen this is not a matter of semantics, accessibility etc just of producing invalid code by any standards, I can't get my head around any module writer testing and accepting this to be ok!

In a sense now I'm defending Joomla in that I think that perhaps something has been missed in all this , that module call actually has a number of parameters that may be passed to it you are specifying one of them which I think is the default anyway there is also a $style parameter and two of the available values are 'raw' and 'xhtml' -2 ? what happens if you feed that xhtml value as it mentions wrapping in divs and of adding to header tags, header tags is a slightly unclear expression but could mean the page head element where scripts should live?

<?php mosLoadModules ( 'left', -2 ); ?>

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Well, here's the code... for

Well, here's the code... for Transmenu i.e. Dropdown menu which is published, on the topmenu module position.

I have given a bold tag to where the css is linked.

<?php

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

global $mosConfig_offset, $mosConfig_live_site, $gid;

// Module Params
$class_sfx = $params->get( 'class_sfx', '' );
$moduleclass_sfx = $params->get( 'moduleclass_sfx', '' );

$menutype = $params->get( 'menutype', 'mainmenu' );
$menu_style = $params->get( 'menu_style', 'vertical' );
$show_placeholder = intval($params->get( 'show_placeholder', 0 ));
$root_placeholder_style = trim($params->get( 'root_placeholder_style', 'mainlevel' ));
$sub_placeholder_style = trim($params->get( 'sub_placeholder_style', 'sublevel' ));

$show_separator = intval($params->get( 'show_separator', 0 ));
$separator_str = $params->get( 'separator_str', ' | ' );
$separator_img = trim($params->get( 'separator_img', '' ));

$submenu_direction = $params->get( 'submenu_direction', 'right' );
$submenu_position = $params->get( 'submenu_position', 'topRight' );
$left_offset = intval($params->get( 'left_offset', 0 ));
$top_offset = intval($params->get( 'top_offset', 0 ));
$menu_padding = intval($params->get( 'menu_padding', 3 ));
$item_padding = intval($params->get( 'item_padding', 1 ));
$dingbatSize = intval($params->get( 'dingbatSize', 16 ));
$hideDelay = intval($params->get( 'hideDelay', 1000 ));
$slideTime = intval($params->get( 'slideTime', 400 ));

$shadowSize = intval($params->get( 'shadowSize', 2 ));
$shadowOffset = intval($params->get( 'shadowOffset', 3 ));
$shadowColor = substr($params->get( 'shadowColor' ), 0, 1) == '#' ? $params->get( 'shadowColor' ) : "#888";
$shadow_opacity = intval(str_replace('%', '', $params->get( 'shadow_opacity', 40)));

$menu_background = $params->get( 'menu_background', 'auto' );
$backgroundColor = substr($params->get( 'backgroundColor' ), 0, 1) == '#' ? $params->get( 'backgroundColor' ) : "#555";
$background_opacity = intval(str_replace('%', '', $params->get( 'background_opacity', 80)));

$menu_image = intval($params->get( 'menu_image', 0 ));
$hide_menu_name = intval($params->get( 'hide_menu_name', 0 ));
$menu_image_alignment = $params->get( 'menu_image_alignment', 'left' );
$menu_image_width = intval($params->get( 'menu_image_width', 16 ));
$menu_image_height = intval($params->get( 'menu_image_height', 16 ));
$menu_image_margin = intval($params->get( 'menu_image_margin', 5 ));

// test if data is already in mainframe storage
$test = $mainframe->get("d4j_transmenu_totals_$menutype", 0);
if ( !$test ) {
$query = "SELECT COUNT( id ) AS count, parent"
. "\n FROM #__menu"
. "\n WHERE menutype = '$menutype'"
. "\n AND access <= $gid"
. "\n AND sublevel = 0"
. "\n AND published = 1"
. ($show_placeholder ? '' : "\n AND type != 'separator'")
. "\n GROUP BY parent"
;
$database->setQuery( $query );
$totals = $database->loadObjectList();

// store data in mainframe storage
$mainframe->set( "d4j_transmenu_totals_$menutype", $totals );
}

// test if data is already in mainframe storage
$test = $mainframe->get("d4j_transmenu_items_$menutype", 0);
if ( !$test ) {
$query = "SELECT id, name, link, type, parent, browserNav, params"
. "\n FROM #__menu"
. "\n WHERE menutype = '$menutype'"
. "\n AND access <= $gid"
. "\n AND sublevel = 0"
. "\n AND published = 1"
. ($show_placeholder ? '' : "\n AND type != 'separator'")
. "\n ORDER BY ordering"
;
$database->setQuery( $query );
$items = $database->loadObjectList();

// store data in mainframe storage
$mainframe->set( "d4j_transmenu_items_$menutype", $items );
}

if (!defined('_TRANSMENU_FUNCTION_DEFINED')) {
define('_TRANSMENU_FUNCTION_DEFINED', 1);

// Functions to retrieve menu items
function has_child($menu_id, $menutype) {
global $mainframe;

// pull data from mainframe storage
$totals = $mainframe->get("d4j_transmenu_totals_$menutype");

$total_count = '';

foreach( $totals as $total ) {
// collect data for parent
if ( $total->parent == $menu_id ) {
$total_count = $total->count;
}
}

if ($total_count) {
return true;
} else {
return false;
}
}

function get_child_list_menu($parent_id, $menutype, $menu_image, $hide_menu_name, $menu_image_width, $menu_image_height, $menu_image_margin, $menu_image_alignment, $transmenu_id) {
global $mainframe;

$js_code = '';
$i = 0;

// pull data from mainframe storage
$items = $mainframe->get("d4j_transmenu_items_$menutype");

$rows = array();
foreach( $items as $item ) {
// collect data for parent
if ( $item->parent == $parent_id ) {
$rows[] = $item;
}
}

if ( count($rows) ) {
foreach ($rows AS $row) {
$item_params =& new mosParameters($row->params);
if ($menu_image) {
if ($hide_menu_name) {
$item_title = ($item_params->get('menu_image','') != '' AND !is_numeric($item_params->get('menu_image',''))) ? 'get('menu_image').'\" width=\"'.$menu_image_width.'\" height=\"'.$menu_image_height.'\" border=\"0\" style=\"margin-right:'.$menu_image_margin.'px;\" align=\"absmiddle\" />' : $row->name;
} else {
$item_title = (($item_params->get('menu_image','') != '' AND !is_numeric($item_params->get('menu_image','')) AND $menu_image_alignment == 'left') ? 'get('menu_image').'\" width=\"'.$menu_image_width.'\" height=\"'.$menu_image_height.'\" border=\"0\" style=\"margin-right:'.$menu_image_margin.'px;\" align=\"absmiddle\" />' : '').$row->name.(($item_params->get('menu_image','') != '' AND !is_numeric($item_params->get('menu_image','')) AND $menu_image_alignment == 'right') ? 'get('menu_image').'\" width=\"'.$menu_image_width.'\" height=\"'.$menu_image_height.'\" border=\"0\" style=\"margin-left:'.$menu_image_margin.'px;\" align=\"absmiddle\" />' : '').'", "'.($row->type == 'url' ? $row->link : sefRelToAbs($row->link.'&Itemid='.$row->id));
}
} else {
$item_title = $row->name;
}
$js_code .= "\n\t\t".$transmenu_id.'_menu'.$parent_id.'.addItem("'.$item_title.'", "'.($row->type == 'separator' ? '#' : ($row->type == 'url' ? $row->link : sefRelToAbs($row->link.'&Itemid='.$row->id))).'", '.$row->browserNav.');';
if (has_child($row->id, $menutype)) {
$js_code .= "\n\t\t".'var '.$transmenu_id.'_menu'.$row->id.' = '.$transmenu_id.'_menu'.$parent_id.'.addMenu('.$transmenu_id.'_menu'.$parent_id.'.items['.$i.']);';
$js_code .= get_child_list_menu($row->id, $menutype, $menu_image, $hide_menu_name, $menu_image_width, $menu_image_height, $menu_image_margin, $menu_image_alignment, $transmenu_id);
}
$i++;
}
}

return $js_code;
}
}

$transmenu_id = 'transmenu'.rand(0, 100000);
?>

" style="display:none">

<?php
if (!defined('_TRANSMENU_CSS_INCLUDED')) { define('_TRANSMENU_CSS_INCLUDED', 1);
?>
/modules/mod_d4j_transmenu.css" />
<?php

}
?>

/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */
/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */
.transMenu .background {
position:absolute;
left:0px; top:0px;
z-index:1;
-moz-opacity:<?php echo ($background_opacity / 100); ?>;
filter:alpha(opacity=<?php echo $background_opacity; ?>);
}
/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */
.transMenu .shadowRight {
position:absolute;
z-index:3;
top:3px; width:2px;
-moz-opacity:<?php echo ($shadow_opacity / 100); ?>;
filter:alpha(opacity=<?php echo $shadow_opacity; ?>);
}
/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */
.transMenu .shadowBottom {
position:absolute;
z-index:1;
left:3px; height:2px;
-moz-opacity:<?php echo ($shadow_opacity / 100); ?>;
filter:alpha(opacity=<?php echo $shadow_opacity; ?>);
}

<?php
if (!defined('_TRANSMENU_JS_INCLUDED')) {
define('_TRANSMENU_JS_INCLUDED', 1);
?>

function getBgColor(root) {
var bgColor = '';
if (typeof root.style != '') {
if (typeof root.style.backgroundColor != 'undefined' && root.style.backgroundColor != '') {
bgColor = root.style.backgroundColor;
}
} else if (typeof root.bgColor != 'undefined' && root.bgColor != '') {
bgColor = root.bgColor;
} else {
bgColor = getBgColor(root.parentNode);
}
return bgColor;
}

/modules/mod_d4j_transmenu/transmenu.compact.js">
<?php
}
?>

// Menu Class Suffix
var menu_class_suffix = "<?php echo $class_sfx; ?>";

// Placeholder CSS class
var sub_placeholder_style = "<?php echo $sub_placeholder_style; ?>";

// TransMenu settings
TransMenu.spacerGif = "modules/mod_d4j_transmenu/img/x.gif"; // path to a transparent spacer gif
TransMenu.dingbatOn = "modules/mod_d4j_transmenu/img/submenu-on.gif"; // path to the active sub menu dingbat
TransMenu.dingbatOff = "modules/mod_d4j_transmenu/img/submenu-off.gif"; // path to the inactive sub menu dingbat
TransMenu.shadowPng = "modules/mod_d4j_transmenu/img/grey-40.png"; // a PNG graphic to serve as the shadow for mac IE5
TransMenu.backgroundPng = "modules/mod_d4j_transmenu/img/white-90.png"; // a PNG graphic to server as the background for mac IE5
TransMenu.dingbatSize = <?php echo $dingbatSize; ?>;
TransMenu.menuPadding = <?php echo $menu_padding; ?>;
TransMenu.itemPadding = <?php echo $item_padding; ?>;
TransMenu.shadowSize = <?php echo $shadowSize; ?>;
TransMenu.shadowOffset = <?php echo $shadowOffset; ?>;
TransMenu.shadowColor = "<?php echo $shadowColor; ?>";

<?php
if ($menu_background == 'auto') {
?>
TransMenu.backgroundColor = getBgColor(document.getElementById('<?php echo $transmenu_id; ?>'));
TransMenu.backgroundColor = TransMenu.backgroundColor == '' ? '<?php echo $backgroundColor; ?>' : TransMenu.backgroundColor;
<?php
} else {
?>
TransMenu.backgroundColor = "<?php echo $backgroundColor; ?>";
<?php
}
?>

TransMenu.hideDelay = <?php echo $hideDelay; ?>;
TransMenu.slideTime = <?php echo $slideTime; ?>;

// if supported, initialize TransMenu
function initTransMenu() {
if (TransMenu.isSupported()) {
TransMenu.initialize();
}
}

<?php
// pull data from mainframe storage
$items = $mainframe->get("d4j_transmenu_items_$menutype");

$top_level = array();
foreach( $items as $item ) {
// collect data for top level
if ( $item->parent == 0 ) {
$top_level[] = $item;
}
}

echo '';

if ($menu_style == 'horizontal') {
echo '';
}

if ($show_separator) {
$top_level_count = count($top_level);
$current_index = 0;
}
foreach ($top_level as $row) {
$menu_params =& new mosParameters($row->params);

if ($menu_style == 'vertical') {
echo '';
}

if ($menu_image) {
if ($hide_menu_name) {
$menu_title = ($menu_params->get('menu_image','') != '' AND !is_numeric($menu_params->get('menu_image',''))) ? 'get('menu_image').'" width="'.$menu_image_width.'" height="'.$menu_image_height.'" border="0" style="margin-right:'.$menu_image_margin.'px;" align="absmiddle" />' : $row->name;
} else {
$menu_title = (($menu_params->get('menu_image','') != '' AND !is_numeric($menu_params->get('menu_image','')) AND $menu_image_alignment == 'left') ? 'get('menu_image').'" width="'.$menu_image_width.'" height="'.$menu_image_height.'" border="0" style="margin-right:'.$menu_image_margin.'px;" align="absmiddle" />' : '').$row->name.(($menu_params->get('menu_image','') != '' AND !is_numeric($menu_params->get('menu_image','')) AND $menu_image_alignment == 'right') ? 'get('menu_image').'" width="'.$menu_image_width.'" height="'.$menu_image_height.'" border="0" style="margin-left:'.$menu_image_margin.'px;" align="absmiddle" />' : '');
}
} else {
$menu_title = $row->name;
}

if ( $row->type == 'separator' ) { // this menu item is a placeholder, dont hyperlink it
echo '

id.'" class="'.$root_placeholder_style.$class_sfx.'">'.$menu_title.'
';
} else {
if ( $row->type == 'url' ) {
$url = $row->link;
} else {
$url = sefRelToAbs($row->link.'&Itemid='.$row->id);
}

if ($row->browserNav == 1) {
$url .= '" target="_blank';
} elseif ($row->browserNav == 2) {
$url .= '" onclick="javascript: window.open(\''.$url.'\', \'\', \'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550\'); return false';
}

echo '';
}

if ($menu_style == 'vertical') {
echo '';
}

if ($show_separator) {
$current_index++;
if ($current_index < $top_level_count) {
if ($menu_style == 'vertical') {
echo '';
}
echo '';
if ($show_separator == 1) {
echo $separator_str;
} else {
echo '';
}
echo '';
if ($menu_style == 'vertical') {
echo '';
}
}
}
}

if ($menu_style == 'horizontal') {
echo '';
}

echo '';
?>

if (TransMenu.isSupported()) {
self['<?php echo $transmenu_id; ?>'] = new TransMenuSet(TransMenu.direction.<?php echo $submenu_direction; ?>, <?php echo $left_offset; ?>, <?php echo $top_offset; ?>, TransMenu.reference.<?php echo $submenu_position; ?>);
<?php
foreach ($top_level AS $item) {
if (has_child($item->id, $menutype)) {
echo "\n\t\t".'var '.$transmenu_id.'_menu'.$item->id.' = self[\''.$transmenu_id.'\'].addMenu(document.getElementById("'.$transmenu_id.'_menu'.$item->id.'"));';
echo get_child_list_menu($item->id, $menutype, $menu_image, $hide_menu_name, $menu_image_width, $menu_image_height, $menu_image_margin, $menu_image_alignment, $transmenu_id)."\n";
} else {
echo "\n\t\t".'document.getElementById(\''.$transmenu_id.'_menu'.$item->id.'\').onmouseover = function() { self[\''.$transmenu_id.'\'].hideCurrent(); }';
}
}

echo "\n";
?>
TransMenu.renderAll();
}
if (window.addEventListener) {
window.addEventListener('load', initTransMenu, false);
} else if (window.attachEvent) {
var tmev = window.attachEvent('onload', initTransMenu);
} else {
initTransMenu();
}

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

I can't help with that, it's

I can't help with that, it's just wrong Smile

They claimed that it would be updated to be valid :shrug: doesn't look as though they can be bothered or are you using an old version?

You might want to read (if you havn't come across it already) this post by someone who modified the workings of this module.

http://designforjoomla.com/forum/index.php?topic=81.msg1293#msg1293

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 6 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Hi, sorry for the late

Hi,
sorry for the late reply, i am at home and on a dialup. so its a bit hard to work on. anyways, i am using the latest version, so there is no issue with that. as for the link, it was great, and it helped me understand waht the person was trying to do, but his hack wont work for me, so am back to square one and trying to make my own code. have to do with a stable mind and with enough time to spare, with broadband Laughing out loud

As for validation, well too much work, so has to take a back-seat, we i.e. my company are working on a very very prestigious project. Its more on the social side. Will tell you about in detail and take your comments as well... sometime later.

mihir. Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com