Skip to Content Skip to Menu

mod_uddeim produces invalid XHTML

  • Richard67
  • Richard67
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
12 years 7 months ago - 12 years 7 months ago #193918 by Richard67
mod_uddeim produces invalid XHTML was created by Richard67
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
Last edit: 12 years 7 months ago by Richard67.

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 7 months ago #193920 by slabbi
Replied by slabbi on topic Re: mod_uddeim produces invalid XHTML
Yes, you are right. I do not remember why I have reverted the changes. Nevertheless I have changed the code again. We will see what happens.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • Richard67
  • Richard67
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
12 years 7 months ago #193922 by Richard67
Replied by Richard67 on topic Re: mod_uddeim produces invalid XHTML
Hi slabbi,

have you changed your code back to what already was there but commented out?

Or have you done it based on what I proposed with my post here, using the "if ( defined( 'JPATH_ADMINISTRATOR' ) )" condition?

Just for interest.

Thanks and best regards,

Richard

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 7 months ago #193923 by slabbi
Replied by slabbi on topic Re: mod_uddeim produces invalid XHTML
I use the same code as you have proposed.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
The following user(s) said Thank You: Richard67

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum