Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

[SOLVED] Sociable plugin and XHTML Strict Validation


  #1  
Old Sep 9, 2009, 01:38 PM
cyboc
 
8 posts · Sep 2009
Hi I'm running Wordpress 2.8.4 with Atahualpa 3.4.1. I have had no problems until today when I installed Sociable 3.4.4. After adding the %sociable% info item to the post footer on the "Edit POST/PAGE INFO ITEMS" form, I started getting XHTML strict validation errors on http://validator.w3.org.

Here is one of the errors: document type does not allow element "ul" here. I traced that to this code snippet:
HTML Code:
<span class="sociable">
<ul>
	<li>...</li>
</ul>
</span>
If I remember my XHTML strict rules correctly, this is illegal because "span" is an inline element and "ul" is a block element. That is, you are not allowed to put a block element inside an inline element.

Instead of a "span" I think the code should generate a "div" when it is rendering the %sociable% info item.

I could be wrong though (I often am).
  #2  
Old Sep 19, 2009, 11:16 AM
cyboc
 
8 posts · Sep 2009
FWIW, I fixed this by making some minor changes to bfa_sociable2.php.

Specifically, I changed from this:
PHP Code:
$html .= "\n<span class=\"sociable\">\n";
...
$html .= "</ul>\n</span>\n"
to this:
PHP Code:
$html .= "\n<div class=\"sociable\">\n";
...
$html .= "</ul>\n</div>\n"
As you can see, I simply changed the span element to a div element. I hope that helps someone else that doesn't like seeing XHTML validation errors.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
W3C Validation eschweiler1986 Atahualpa 3 Wordpress theme 3 Sep 27, 2009 01:45 PM
Change theme code header from XHTML 1.0 Strict to XHTML 1.0 Transitional? Mikii New Versions, & Updating 2 Jul 19, 2009 12:34 PM
Get it XHTML valid? chris New Versions, & Updating 2 Feb 26, 2009 02:48 PM
problem with Layout MAX width and XHTML valididation frankhamm Atahualpa 3 Wordpress theme 4 Feb 18, 2009 05:04 AM
the plugin sociable networks is not working well.... Cactus Plugins & Atahualpa 6 Feb 7, 2009 05:30 PM


All times are GMT -6. The time now is 10:51 PM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.