Category ImageValidate Sociable Plugin

Posted By: Gremlette - 16 Oct 2009 @ 12:14 PM
Category: Coding Bits

As you can see on this website, I am using the sociable plugin.

There are NUMEROUS fixes that need to be made to make it validate W3C XHTML.

Heres ONE:
When you are wanting to display the sociable items on the index page where it will be repeated on every post for the same page. Validation result returns that it already has the ID’s specified.

CSS Basics dictate that you only use ‘ID’ ONCE on a page
‘CLASS’ is the re-usable css.

Go to the plugin sociable directory and find “sociable.php”

Edit the PHP file:

Line 777
$link .= ‘ id="’.esc_attr(strtolower(str_replace(" ", "", $sitename))).‘" ‘;
and change it to:
$link .= ‘ class="’.esc_attr(strtolower(str_replace(" ", "", $sitename))).‘" ‘;

Upload and this ‘id already declared’ issue is then fixed.

FIX TWO:

The original faded buttons look quite trick but there are some browsers out there that don’t understand the effects called by CSS. It is just the same as the moz-border rounded corners ….. IE6 at least, hasn’t got a clue, and W3C won’t pass it on validation.

I just decided to kill off practically the entire sociable css style sheet and replace it with eg.

.sociable
{margin:10px 0 10px 0; float:right; width:auto; display:block;}

.sociable ul
{display:inline; margin:0; padding:0 ;}

.sociable ul li
{background:none; display:inline; list-style-type:none; margin:0; padding:0;}

.sociable img
{border:1px solid #fff; margin:1px 2px 1px 2px; padding:0;}

.sociable-hovers:hover
{border:1px solid #999;}

This is a LOT shorter than the sociable.css was! IE6 likes it, and so does W3C. Note that with ‘float’ there must also be a width specified.

Tags: , , , , , ,

Last Edit: 27 Oct 2009 @ 03 03 PM

Comments are open

 

 Leave A Comment ...

You must be Logged in to Comment

XHTML:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

468x60-2
CHECK MY STATUSFOR HIRE! Get Details » . . . Rose Gibson Leaning over links