Hello,
when I tried to validate with W3C markup validator pages of my site on which mod_uddeim is published, I am told there is a validation error caused by the element "link" for the popupex.css of mod_uddeim, which is not allowed in the body of XHTML documents.
I have checked the pages with firebug, and source code of mod_uddeim.php, and I've found out that with popup.css it is done right.
I have then modified mod_uddeim.php as follows, according to the way how it was already done with uddemodule.css before in file (the previosly present lines which were commented out show that it has been tried before but then has been given up):
Old code, lines 428 to 439:
Code:
echo "<link href=\"".$udd_moduleSubPath."/popup.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
echo "<script language=\"Javascript\" src=\"".$udd_moduleSubPath."/domLib.js\"></script>\n"
. "<script language=\"Javascript\" src=\"".$udd_moduleSubPath."/domTT.js\"></script>\n"
. "<script language=\"Javascript\" src=\"".$udd_moduleSubPath."/domTT_drag.js\"></script>\n";
// $css = $udd_moduleSubPath."/popup.css";
// uddeIMaddCSS($css);
// $temp = $udd_moduleSubPath."/domLib.js";
// uddeIMaddScript($temp);
// $temp = $udd_moduleSubPath."/domTT.js";
// uddeIMaddScript($temp);
// $temp = $udd_moduleSubPath."/domTT_drag.js";
// uddeIMaddScript($temp);
New code, lines 428 to 442:
Code:
if ( defined( 'JPATH_ADMINISTRATOR' ) ) { // this works in Joomla 1.5+
$css = $udd_moduleSubPath."/popup.css";
uddeIMaddCSS($css);
$temp = $udd_moduleSubPath."/domLib.js";
uddeIMaddScript($temp);
$temp = $udd_moduleSubPath."/domTT.js";
uddeIMaddScript($temp);
$temp = $udd_moduleSubPath."/domTT_drag.js";
uddeIMaddScript($temp);
} else {
echo "<link href=\"".$udd_moduleSubPath."/popup.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
echo "<script language=\"Javascript\" src=\"".$udd_moduleSubPath."/domLib.js\"></script>\n"
. "<script language=\"Javascript\" src=\"".$udd_moduleSubPath."/domTT.js\"></script>\n"
. "<script language=\"Javascript\" src=\"".$udd_moduleSubPath."/domTT_drag.js\"></script>\n";
}
And then old code, lines 461 to 463:
Code:
echo "<link href='".$udd_moduleSubPath."/popupex.css' rel='stylesheet' type='text/css' />\n";
// $css = $udd_moduleSubPath."/popupex.css";
// uddeIMaddCSS($css);
New code, lines 464 to 469 (new numbers with respect of previous change):
Code:
if ( defined( 'JPATH_ADMINISTRATOR' ) ) { // this works in Joomla 1.5+
$css = $udd_moduleSubPath."/popupex.css";
uddeIMaddCSS($css);
} else {
echo "<link href=\"".$udd_moduleSubPath."/popupex.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
}
These changes work for me, I have Joomla 2.5.2, and I get valid XHTML with these.
Can you please check if my changes are OK with respect to other versions and, if so, include into a future version of uddeIM?
And pls give me feedback on my suggested changes here.
Thanks in advance,
Richard