WordPress.org

Ready to get started?Download WordPress

Forums

Social Sharing Toolkit
Fixes for errors - HTML5 themes (5 posts)

  1. ganphx
    Member
    Posted 1 year ago #

    Line 10 in includes/buttons/button_email.php should be encoding the spaces of the page title.

    $url = 'mailto:?subject='.rawurlencode($title).'&body='.$url;

    Wrapping spans around the Facebook div fb_like button code causes the subsequent social buttons not to render due to validation errors. The code needs to be changed to use div's:

    Line 73 in includes/buttons/button.facebook.php

    return '<div style="display: inline-block; width: '.$width.'px; height: '.$height.'px; overflow: hidden;">'.$retval.'</div>';

    In social_sharing_toolkit.php

    function get_bookmark_button($button, $url, $title, $type, $display = 'div', $align = '', $id = '', $media = '', $description = '', $text = '', $icon = '') {
    		$retval = '';
    		if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
    			$retval = '</div><div class="mr_social_sharing_wrapper">';
    		} else {
    			$display = "div";
    			foreach ($this->buttons as $tmp) {
    				if (method_exists($tmp, $button)) {
    					$retval = '<'.$display.' style="display: inline-block;" class="mr_social_sharing'.$align.'">'.$tmp->$button($url, $title, $type, $id, $media, $description, $text, $icon).'</'.$display.'>';
    				}
    			}
    		}
    		return $retval;
    	}

    Results:

    <div style="display: inline-block;" class="mr_social_sharing_top">
    <div style="display: inline-block; width: 51px; height: 24px; overflow: hidden;">
    <div class="fb-like" data-href="http://www.domain.com/" data-send="false" data-width="51" data-show-faces="false"></div>
    </div>

    http://wordpress.org/extend/plugins/social-sharing-toolkit/

  2. DieselandJuice
    Member
    Posted 1 year ago #

    Thank you for this!!

  3. nihil.core
    Member
    Posted 1 year ago #

    UP!
    I still get a lot of Javascript errors in the console due to the bad behavior of the Facebook Like button.

    Example

    Unsafe JavaScript attempt to access frame with URL
    http://www.yoursite.com/
    from frame with URL
    http://www.facebook.com/plugins/like.php?channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D11%23cb%3Df51707e84%26origin%3Dhttp%253A%252F%252Fwww.yoursite.com%252Ff3f60f759c%26domain%3Dwww.yoursite.com%26relation%3Dparent.parent&extended_social_context=false&href=http%3A%2F%2Fwww.yoursite.com%2Fexample-page%2F&layout=button_count&locale=en_US&node_type=link&sdk=joey&send=false&show_faces=false&width=90.
    Domains, protocols and ports must match.

    Any other possible solution???

  4. ENWest011
    Member
    Posted 1 year ago #

    This is great! Thank you!

  5. Rob Roy
    Member
    Posted 12 months ago #

    Has anyone started using a different social plugin? I don't like that this developer is hard coding his facebook app id and basically stealing all of the plugin's users facebook user data.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.