New Landing How can we help? Themeforest Theme Support Dante Social share links not opening in new window

Viewing 15 posts - 1 through 15 (of 19 total)
  • Posted in: Dante
  • #164776
    eternalbeta
    Member
    Post count: 76

    The social share links don’t seem to open up in a new window. Looking at the code, being that there are specifications in there for height and width, it seems it should open in a new window. I was able add to the a link to make it target blank, but even that just opens a new tab, rather than a new window.

    I’ve seen this topic brought up in the past, but never really a definitive answer I don’t believe.

    #164798
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you provide us the link to your site?

    -Rui

    #164801
    eternalbeta
    Member
    Post count: 76
    This reply has been marked as private.
    #165029
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Where is social share links at this page http://54.145.187.224/on-demand/what-makes-a-man/.

    Thanks
    Mohammad

    #165148
    eternalbeta
    Member
    Post count: 76
    This reply has been marked as private.
    #165179
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I see only share this text but dont see any share icons.
    Thanks
    Mohammad

    #165180
    eternalbeta
    Member
    Post count: 76
    This reply has been marked as private.
    #165184
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit shortcodes.php file at /dante/swift-framework/

    Find this code:-
    function sf_social_share() {
    		
    		global $post;
    		
    		$title = get_the_title();
    		$permalink = get_permalink();
    		$image = wp_get_attachment_url(get_post_thumbnail_id());
    		$excerpt = strip_tags(get_the_excerpt());
    		
    		$share_output = "";
    		
    		$share_output .= '<div class="share-links curved-bar-styling clearfix">';
    		$share_output .= '<div class="share-text">'.__("Share this:", "swiftframework").'</div>';
    		$share_output .= '<ul class="social-icons">';
    		$share_output .= '<li class="facebook"><a href="http://www.facebook.com/sharer.php?u='.$permalink.'" class="post_share_facebook" onclick="javascript:window.open(this.href,
    			      "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=220,width=600");return false;"><i class="fa-facebook"></i><i class="fa-facebook"></i></a></li>';
    		$share_output .= '<li class="twitter"><a href="https://twitter.com/share?url='.$permalink.'" onclick="javascript:window.open(this.href,
    			      "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=260,width=600");return false;" class="product_share_twitter"><i class="fa-twitter"></i><i class="fa-twitter"></i></a></li>  '; 
    		$share_output .= '<li class="googleplus"><a href="https://plus.google.com/share?url='.$permalink.'" onclick="javascript:window.open(this.href,
    			      "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;"><i class="fa-google-plus"></i><i class="fa-google-plus"></i></a></li>';
    		$share_output .= '<li class="pinterest"><a href="http://pinterest.com/pin/create/button/?url='.$permalink.'&media='.$image.'&description='.$title.'" onclick="javascript:window.open(this.href,
    		  "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=320,width=600");return false;"><i class="fa-pinterest"></i><i class="fa-pinterest"></i></a></li>';
    		$share_output .= '<li class="mail"><a href="mailto:?subject='.urlencode($title).'&body='.$excerpt.' '.$permalink.'" class="product_share_email"><i class="ss-mail"></i><i class="ss-mail"></i></a></li>';
    		$share_output .= '</ul>';			
    		$share_output .= '</div>';
    			
    		return $share_output;
    	}
    
    Change with:-
    function sf_social_share() {
    		
    		global $post;
    		
    		$title = get_the_title();
    		$permalink = get_permalink();
    		$image = wp_get_attachment_url(get_post_thumbnail_id());
    		$excerpt = strip_tags(get_the_excerpt());
    		
    		$share_output = "";
    		
    		$share_output .= '<div class="share-links curved-bar-styling clearfix">';
    		$share_output .= '<div class="share-text">'.__("Share this:", "swiftframework").'</div>';
    		$share_output .= '<ul class="social-icons">';
    		$share_output .= '<li class="facebook"><a target="_blank" href="http://www.facebook.com/sharer.php?u='.$permalink.'" class="post_share_facebook" onclick="javascript:window.open(this.href,
    			      "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=220,width=600");return false;"><i class="fa-facebook"></i><i class="fa-facebook"></i></a></li>';
    		$share_output .= '<li class="twitter"><a target="_blank" href="https://twitter.com/share?url='.$permalink.'" onclick="javascript:window.open(this.href,
    			      "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=260,width=600");return false;" class="product_share_twitter"><i class="fa-twitter"></i><i class="fa-twitter"></i></a></li>  '; 
    		$share_output .= '<li class="googleplus"><a  target="_blank" href="https://plus.google.com/share?url='.$permalink.'" onclick="javascript:window.open(this.href,
    			      "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;"><i class="fa-google-plus"></i><i class="fa-google-plus"></i></a></li>';
    		$share_output .= '<li class="pinterest"><a target="_blank" href="http://pinterest.com/pin/create/button/?url='.$permalink.'&media='.$image.'&description='.$title.'" onclick="javascript:window.open(this.href,
    		  "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=320,width=600");return false;"><i class="fa-pinterest"></i><i class="fa-pinterest"></i></a></li>';
    		$share_output .= '<li class="mail"><a  target="_blank" href="mailto:?subject='.urlencode($title).'&body='.$excerpt.' '.$permalink.'" class="product_share_email"><i class="ss-mail"></i><i class="ss-mail"></i></a></li>';
    		$share_output .= '</ul>';			
    		$share_output .= '</div>';
    			
    		return $share_output;
    	}

    Thanks
    Mohammad

    #165393
    eternalbeta
    Member
    Post count: 76

    I’ve already attempted adding target=”_blank” to the a links as I mentioned in my original post. This just makes new tabs open, rather than a new window. Specifying a height and weight should force a new window to open, but it doesn’t seem to be working in this case.

    Thanks

    #165395
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    It seems all fine.

    The new tabs you talk about it’s called a window it doesn’t exist any other concept. It’s the browser that display in tabs or not.

    -Rui

    #165399
    eternalbeta
    Member
    Post count: 76
    This reply has been marked as private.
    #165405
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    yes, you are right(sorry didn’t read everything) it should open in a resized window, like in our demo.

    Maybe some plugin conflict. Can you try to disable all plugins, clear the cache and try again.

    -Rui

    #165409
    eternalbeta
    Member
    Post count: 76

    No problem. Just tried disabling all plug-ins and there was no change. I did also try pasting in the whole block of code that Mohammad put in before and this didn’t change anything either.

    #165412
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #165415
    eternalbeta
    Member
    Post count: 76
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.