A few fixes to generate valid XHTML

matt_harrold - May 5, 2007 - 15:29
Project:addtofavorites
Version:5.x-1.x-dev
Component:User interface
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

Hi,

can someone please add the following changes to addtofavorites.module to make it generate valid XHTML ...

line 146 old : href=\"javascript:addtofavorites";
line 146 new : href=\"#\" onclick=\"javascript:addtofavorites";

line 150 old: $links .= " alt=\"" . $display_text_site . "\" align=\"absmiddle\" />";
line 150 new: $links .= " alt=\"" . $display_text_site . "\" style=\"vertical-align:absmiddle;\" />";

line 154 old: $links .= "
\n"; //if we don't display links then align horizontally the icons
line 154 new: $links .= "
\n"; //if we don't display links then align horizontally the icons

Similar changes need to be made on lines 159,163,167,176.

Or you could just swap in the attached patched version.

Once done, addtofavorites will be generating a block of valid XHTML.

thanks,

Matt

AttachmentSize
addtofavorites.module.php_.txt7.87 KB

#1

thierry_gd - May 6, 2007 - 11:24
Status:active» needs review

Ok for :
line 146 old : href=\"javascript:addtofavorites";
line 146 new : href=\"#\" onclick=\"javascript:addtofavorites";

For :
line 150 old: $links .= " alt=\"" . $display_text_site . "\" align=\"absmiddle\" />";
line 150 new: $links .= " alt=\"" . $display_text_site . "\" style=\"vertical-align:absmiddle;\" />";

==> this make the icon not correctly aligned with the text, so didn't used it in new version

line 154 old: $links .= "

==> I don't undestand the modoification

Alreeady commited the 1st change, need explanation for the 3rd one, and a slight change for the second one to commit them also

#2

matt_harrold - May 6, 2007 - 12:31

Hi,

the vertical-align:absmiddle css rule 'should' look the same as align='absmiddle', but experimentation might be required to find a suitable replacement for the deprecated align attribute.

The third change should have read ...

change [br] tags to [br /] tags.

cheers,

Matt

#3

thierry_gd - May 6, 2007 - 13:17

OK for changing [br] tags to [br /] tags.

For vertical-align: ... experimentation is required

Commited with change on br. Will commit again with modification on alignment when find the right alignment

#4

thierry_gd - May 6, 2007 - 17:29
Status:needs review» fixed

Fixed the alignment

#5

Anonymous - May 20, 2007 - 17:30
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.