Forum
Welcome, Guest
Please Login to access forum.
Fast Social Share - W3C Valid Code (1 viewing) 
Go to bottom
TOPIC: Fast Social Share - W3C Valid Code
#4796
Webilicious
Fresh Boarder
Posts: 3
User Offline
Fast Social Share - W3C Valid Code Karma: 0  
Hi,

I recently discovered Fast Social Share and am very impressed with the speed!

Thanks very much for providing this for free!

I made some changes on my v2.0 copy so that the extension passes the W3C validator at http://validator.w3.org and am sharing the changes here in case others find this useful.

Issue 1: W3C validator states: "Error: Attribute . not allowed on element div at this point."

There seems to be an extraneous period in the code in /plugins/content/fastsocialshare/fastsocialshare.php

Line 129:
Code:

data-layout="' . $layout . '" .
Amended to:
Code:

data-layout="' . $layout . '"
Issue 2: W3C validator states: "Element glusone not allowed as child of element div in this context." Some code in /plugins/content/fastsocialshare/fastsocialshare.php needs to be updated to be valid under HTML 5. Line 226:
Code:

$type = 'size="' . $params->get("plusType", 'medium') . '"';
Amended to:
Code:

$type = 'data-size="' . $params->get("plusType", 'medium') . '"';
Line 231:
Code:

$plusButton = "<g:plusone annotation='$shareAnnotation' $type href='$url'></g:plusone>";
Amended to:
Code:

$plusButton = "<div class='g-plusone' data-annotation='$shareAnnotation' $type data-href='$url'></div>";
Line 235:
Code:

$gShareButton = "<g:plus annotation='$shareAnnotation' href='$url' action='share'></g:plus>";
Amended to:
Code:

$gShareButton = "<g:plus data-annotation='$shareAnnotation' data-href='$url' data-action='share'></g:plus>";
 
Logged Logged  
  The administrator has disabled public write access.
#4797
John Dagelmore
Admin
Posts: 3722
User Online Now
Re:Fast Social Share - W3C Valid Code Karma: 79  
Thank you very much to share!
 
Logged Logged  
  The administrator has disabled public write access.
#4798
Webilicious
Fresh Boarder
Posts: 3
User Offline
Re:Fast Social Share - W3C Valid Code Karma: 0  
You are very welcome!
 
Logged Logged  
  The administrator has disabled public write access.
#4829
Webilicious
Fresh Boarder
Posts: 3
User Offline
Re:Fast Social Share - W3C Valid Code Karma: 0  
And another one.

Issue: W3C validator states: "Error: Duplicate ID fb-root."

IDs need to be unique (e.g. where there are multiple instances of buttons on a blog page etc)

File: /plugins/content/fastsocialshare/fastsocialshare.php

Line 106:
Code:

<div id="fb-root"></div>
Amended to:
Code:

<div class="fb-root"></div>
 
Logged Logged  
  The administrator has disabled public write access.
Go to top