• First of all, great plugin! The dynamic switch to the horizontal bar and ability to disable the Sharebar on particular posts/pages are great features that other similar plugins lack. There is one problem I ran into, however:

    Basic settings: Sharebar enabled on all posts and pages (I then disabled the Sharebar on most pages). When the “Display horizontal Sharebar if the page is resized to less than x px?” box is checked, the horizontal bar appears on posts/pages even when it is supposed to be disabled for that page.

    I took a look at the sharebar.php file and discovered the problem. The “function sharebar_horizontal” function (lines 120-129) doesn’t check the value of “$sharebar_hide“. Here is the reworked function:

    function sharebar_horizontal($print = true){
    	global $wpdb, $post;
    	$sharebar_hide = get_post_meta($post->ID, 'sharebar_hide', true);
    	if(empty($sharebar_hide)) {
    		if(get_option('sharebar_horizontal')){
    			global $wpdb;
    			$str = '<ul id="sharebarx">';
    			$results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".$wpdb->prefix."sharebar WHERE enabled=1 ORDER BY position, id ASC")); $str .= "\n";
    			foreach($results as $result) { $str .= '<li>'.sharebar_filter($result->small).'</li>'; }
    			$str .= '</ul>';
    			if($print) echo $str; else return $str;
    		}
    	}
    }

    Hope this helps anyone else who runs into the same problem. Hopefully Dolon will include this in the next update.

    https://www.ads-software.com/extend/plugins/sharebar/

Viewing 1 replies (of 1 total)
  • Thread Starter Josh

    (@jnadal)

    Wish you would have included this fix in the recent update. My boss called me today because the sharebar was showing up where it shouldn’t on our website homepage. I thought, that is strange, I thought I fixed this months ago.

    Well, I did, but when I updated the plugin the other day it un-fixed it. ??

    PLEASE please please, include the new function in the next update.

Viewing 1 replies (of 1 total)
  • The topic ‘Horizontal bar displays when it shouldn't – SOLUTION’ is closed to new replies.