Ejemplo n.º 1
0
function ssba_twitter($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    // format the URL into friendly code
    $twitterShareText = urlencode(html_entity_decode($strPageTitle . ' ' . $arrSettings['ssba_twitter_text'], ENT_COMPAT, 'UTF-8'));
    // twitter share link
    $htmlShareButtons = '<a data-site="" class="ssba_twitter_share" href="http://twitter.com/share?url=' . $urlCurrentPage . '&amp;text=' . $twitterShareText . '" ' . ($arrSettings['ssba_share_new_window'] == 'Y' ? ' target="_blank" ' : NULL) . ($arrSettings['ssba_rel_nofollow'] == 'Y' ? ' rel="nofollow"' : NULL) . '>';
    // if image set is not custom
    if ($arrSettings['ssba_image_set'] != 'custom') {
        // show ssba image
        $htmlShareButtons .= '<img src="' . plugins_url() . '/simple-share-buttons-adder/buttons/' . $arrSettings['ssba_image_set'] . '/twitter.png" title="Twitter" class="ssba ssba-img" alt="Tweet about this on Twitter" />';
    } else {
        // show custom image
        $htmlShareButtons .= '<img src="' . $arrSettings['ssba_custom_twitter'] . '" title="Twitter" class="ssba ssba-img" alt="Tweet about this on Twitter" />';
    }
    // close href
    $htmlShareButtons .= '</a>';
    // if show share count is set to Y
    if ($arrSettings['ssba_show_share_count'] == 'Y' && $booShowShareCount == true) {
        $htmlShareButtons .= '<span class="ssba_sharecount">' . getTwitterShareCount($urlCurrentPage) . '</span>';
        // add to our db
        updateSharedCount('twitter', $urlCurrentPage);
    }
    // return share buttons
    return $htmlShareButtons;
}
function ssba_twitter($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    // format the URL into friendly code
    $twitterShareText = urlencode(html_entity_decode($strPageTitle . ' ' . $arrSettings['ssba_twitter_text'], ENT_COMPAT, 'UTF-8'));
    // twitter share link
    $htmlShareButtons .= '<a id="ssba_twitter_share" href="http://twitter.com/share?url=' . $urlCurrentPage . '&text=' . $twitterShareText . '" ' . ($arrSettings['ssba_share_new_window'] == 'Y' ? 'target="_blank"' : NULL) . '>';
    // if image set is not custom
    if ($arrSettings['ssba_image_set'] != 'custom') {
        // show ssba image
        $htmlShareButtons .= '<img title="Twitter" class="ssba" alt="Twitter" src="' . WP_PLUGIN_URL . '/simple-share-buttons-adder/buttons/' . $arrSettings['ssba_image_set'] . '/twitter.png" />';
    } else {
        // show custom image
        $htmlShareButtons .= '<img title="Twitter" class="ssba" src="' . $arrSettings['ssba_custom_twitter'] . '" alt="Twitter" />';
    }
    // close href
    $htmlShareButtons .= '</a>';
    // if show share count is set to Y
    if ($arrSettings['ssba_show_share_count'] == 'Y' && $booShowShareCount == true) {
        $htmlShareButtons .= '<span class="ssba_sharecount">' . getTwitterShareCount($urlCurrentPage) . '</span>';
    }
    // return share buttons
    return $htmlShareButtons;
}
Ejemplo n.º 3
0
/**
 * Create Twitter Share Button
 **/
function sssp_twitter($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    $var_btn_cls = $booShowShareCount ? 's3d twitter' : 's3d twitter no-counter';
    // format the URL into friendly code
    $twitterShareText = urlencode(html_entity_decode($strPageTitle . ' ' . $arrSettings['sssp_twitter_text'], ENT_COMPAT, 'UTF-8'));
    $htmlShareButtons = '<a class="' . $var_btn_cls . '" href="http://twitter.com/share?url=' . $urlCurrentPage . '&amp;text=' . $twitterShareText . '" ' . ($arrSettings['sssp_share_new_window'] == 'yes' ? ' target="_blank" ' : NULL) . ($arrSettings['sssp_rel_nofollow'] == 'yes' ? ' rel="nofollow"' : NULL) . '>';
    $htmlShareButtons .= '<span><i class="fa fa-twitter"></i></span>';
    if ($booShowShareCount) {
        $htmlShareButtons .= '<span class="counter">' . number_format(getTwitterShareCount($urlCurrentPage)) . '</span>';
    }
    $htmlShareButtons .= '</a>';
    return $htmlShareButtons;
}
Ejemplo n.º 4
0
"><?php 
echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago';
?>
</a><li></ul>
	    <h2><a href="<?php 
echo $post_link;
?>
"><?php 
echo get_the_title($post_id);
?>
</a></h2>
	    <ul class="nav nav-align-right nav-padding-none interative"><li><a href="<?php 
echo $post_link;
?>
"><?php 
echo getTwitterShareCount($post_link) + getFacebookShareCount($post_link);
?>
 <?php 
_E('Shares');
?>
</a></li><li class="divider">/</li><li><a href="<?php 
echo get_permalink(get_the_ID());
?>
"><?php 
echo getPostViews(get_the_ID());
?>
</a></li><li class="divider">/</li><li><a href="<?php 
echo $post_link;
?>
"><?php 
echo get_comments_number();
Ejemplo n.º 5
0
    }
    ?>
		<?php 
}
?>
		</div>
		<h1 class="story-title"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h1>
			<ul class="nav nav-align-right nav-interative-social">
				<li class="hidden-xs social-share-count"><span><?php 
echo getRedditShareCount(get_permalink()) + getPinterestShareCount(get_permalink()) + getTwitterShareCount(get_permalink()) + getFacebookShareCount(get_permalink());
?>
</span> <b>Shares</b></li>
				<li class="social-fb"><a href="https://www.facebook.com/sharer/sharer.php?u=<?php 
the_permalink();
?>
" target='_blank'><span class="fa fa-facebook"></span><span class="hidden-xs"> like</span></a></li>
				<li class="social-twitter"><a href="https://twitter.com/intent/tweet?url=<?php 
the_permalink();
?>
" target='_blank'><span class="fa fa-twitter"></span><span class="hidden-xs"> tweet</span></a></li>
				<li class="social-reddit"><a href="http://www.reddit.com/submit?url=<?php 
the_permalink();
?>
" target='_blank'><span class="fa fa-reddit"></span><span class="hidden-xs"> submit</span></a></li>
				<li class="social-pinterest"><a href="http://www.pinterest.com/pin/create/button/?url=<?php