Search Results for 'sharing'

Results from the Forum
simchris
tagDiv Member

(((( SORRY … just noticed you were talking about the SOCIAL sidebar plugin, not the social SHARING icons above/below posts …. doh. Time for me to go back to sleep …. !! )))

  • This reply was modified 11 years by simchris.
careongo
Participant
#0

Hi team,

I am setting up Newspaper 6 for my new blog http://www.careongo.com/riseup.

Following are some queries I have for which your response will be highly appreciated:

1. How to insert icon in place of Home button?
2. How to move next previous ajax on the top of the block as in the earlier theme, I don’t want it to be at the bottom of the block
3. How can I change size of the social sharing button on the post at the top and bottom, I want to do something like what this website has done http://www.scoopwhoop.com/news/auto-driver-becomes-pilot/ (basically similar size buttons)
4. How to insert Sign up and email id (for subscribing) space below the post page

Thanks in anticipation. Looking for a speedy response.

yakir105
tagDiv Member

Hi,

It usually happens when loading the font file (which contains those icons) from another host/url. Check your browser’s console if you have an error like this – http://screencast.com/t/fKy2k43k9kc
The solution would be to load them from the same url as the site or try this solution – http://webmasters.stackexchange.com/questions/71630/font-blocked-from-loading-by-cross-origin-resource-sharing-policy-no-access-co

how i change the fonts url?

Thank’s

cem
tagDiv Member

the slider gets messed up by the speedbooster plugin, sooo…here is the code 😉 as I don’t know what I did other than the performance improvement tips ( Is this required? As the performance drops from 93 to 91 after activating it).

<?php
/*
	Plugin Name: tagDiv Speed Booster
	Plugin URI: http://tagdiv.com
	Description: Speed booster for Newspaper and Newsmag theme - It moves the styles and all the scripts of the theme to the bottom when needed. It activates internal theme optimizations for better speed and it adds async js .
	Author: tagDiv
	Version: 3.2
	Author URI: http://tagdiv.com
*/

/*

    3.2 - better bbpress support on newsmag
    3.1 - fixed issue with flashing white on load on newspaper theme
        - better compatibility with themes that do not have wp booster framework
        - Newsmag loads fonts in a bundle now
    3.0 - better visual composer support
    2.8 - Newsmag support added :)
    2.7 - fixed ie 9 10 11 window resize bug
    2.6 - fixed rendering bug on the loading of the page
    2.5 - code improvements, newspaper 4 compatibility
        - makes most of the javascript files use defer parsing
        - better compatibility with revolution slider
    2.4 - updated jquery version
        - support for https
    2.3 - fixed warnings when trying to move javascript files that are not registered
 */

define('TD_SPEED_BOOSTER' , 'v3.2');

class td_speed_booster {

    var $styles_for_footer = array(); // here we keep all the stylesheets IDs that we want to move to the footer

    var $is_ie = false; // if the browser is detected as IE, treat it differently

    var $async_js_scripts = array(
        'contact-form-7',
        'bbpress',
        'woocommerce',
        'site',
        'devicepx',
        'js_composer_front'
    );

    var $td_theme_name = '';
    var $td_theme_version = '';
    var $td_deploy_mode = '';

    function __construct() {
        add_action('td_wp_booster_loaded', array($this, 'td_wp_booster_loaded'));
    }

    function td_wp_booster_loaded() {
        // read the theme version and name if defined
        if (defined('TD_THEME_VERSION') and defined('TD_THEME_NAME') and defined('TD_DEPLOY_MODE')) {
            $this->td_theme_version = TD_THEME_VERSION;
            $this->td_theme_name = TD_THEME_NAME;
            $this->td_deploy_mode = TD_DEPLOY_MODE;
        } else {
            return;
        }

        // detect IE 8 9 10 11
        if (!empty($_SERVER['HTTP_USER_AGENT']) and (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0') !== false))) {
            $this->is_ie = true;
        }

        // add hooks
        add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts_hook'), 1002);  // 1002 priority - because visual composer has 1000 and we use 1001 in the wp010 theme
        add_action('wp_footer', array($this, 'wp_footer_hook'), 15);
        if ($this->is_ie === false) {
            add_action('wp_head', array($this, 'wp_head_hook'), 15);
        }
    }

    function enqueue_scripts_hook() {
        global $wp_scripts;

        //detect revmin - revolution slider and do not move jquery
        if( !is_admin() and !isset($wp_scripts->registered['revmin'])){
            if (is_ssl()) {
                $td_protocol = 'https';
            } else {
                $td_protocol = 'http';
            }

            wp_deregister_script('jquery');
            wp_register_script('jquery', ($td_protocol . '://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'), true, '1.11.1', true);
            wp_enqueue_script('jquery');
        }

        if ($this->td_theme_name == 'Newsmag') {
/*             wp 010*/
            $this->move_style_to_footer('js_composer_front');
            $this->move_style_to_footer('js_composer_custom_css');
        }

        // Newsmag dosn't move the css to the bottom as such, bbpress should stay at the top
        if ($this->td_theme_name != 'Newsmag') {
            $this->move_style_to_footer('bbp-default-bbpress');  //bpress old
            $this->move_style_to_footer('bbp-default');  //bpress
            $this->move_style_to_footer('google-font-rest');
            $this->move_style_to_footer('contact-form-7');
            $this->move_style_to_footer('genericons');
            $this->move_style_to_footer('jetpack');
            $this->move_style_to_footer('jetpack-widgets');
            $this->move_style_to_footer('jetpack-subscriptions');
			$this->move_style_to_footer('sharing-css');

        }

        /**
         * Move the style only on newspaper
         * @todo move the style also on newsmag after we fix all the issues
         */
        if ($this->is_ie === false and $this->td_theme_name == 'Newspaper') {
            $this->move_style_to_footer('td-bootstrap');
            $this->move_style_to_footer('td-theme'); //this is the main style of the theme, it depends on td-bootstrap to load
        }

        $this->move_style_to_footer('woocommerce_frontend_styles');

        //jetpack lost styles
        $this->move_style_to_footer('jetpack-subscriptions');
        $this->move_style_to_footer('jetpack-widgets');
        $this->move_style_to_footer('genericons');
        $this->move_style_to_footer('jetpack');
        $this->move_style_to_footer('td-theme');
		$this->move_style_to_footer('sharing-css');

        /**
         * move javascript to footer
         */
        $this->move_js_to_footer('themepunchtools');
        $this->move_js_to_footer('revmin');

        // remove strange custom.css file loaded by visual composer
        wp_deregister_style('js_composer_custom_css');

        // replace comment-reply.min.js with inline version

    }

    function wp_footer_hook() {
        //get the theme version for style
        $current_theme_version = $this->td_theme_version;

        //on demo mode, autogenerate version hourly + day
        if ($this->td_deploy_mode == 'demo') {
            $current_theme_version = date('jG');
        }

        foreach ($this->styles_for_footer as $style_id => $style_src) {
            echo "<link rel='stylesheet' id='" . $style_id . "-css'  href='" . $style_src . "?ver=" . $current_theme_version . "' type='text/css' media='all' />\n";
        }
    }

    function wp_head_hook() {
        if ($this->td_theme_name == 'Newspaper') {
            echo '<style>body {visibility:hidden;}</style>';
        }
    }

    function move_style_to_footer($style_id) {
        global $wp_styles;
        if (!empty($wp_styles->registered[$style_id]) and !empty($wp_styles->registered[$style_id]->src)) {
            $this->styles_for_footer[$style_id] = $wp_styles->registered[$style_id]->src;
            wp_deregister_style($style_id);
        }
    }

    function move_js_to_footer($js_id) {
        global $wp_scripts;
        if (isset($wp_scripts->registered[$js_id])) {
            wp_enqueue_script($js_id, ($wp_scripts->registered[$js_id]->src), '', $wp_scripts->registered[$js_id]->ver, true);
        }

    }

    function async_js_hook($url) {
        //check to see if we have js
        if (strpos( $url, '.js' ) === false) {
            return $url;
        }
        if ($this->strpos_array($url, $this->async_js_scripts) === false) {
            return $url;
        } else {
            return "$url' defer='defer";
        }
    }

    private function strpos_array($haystack_string, $needle_array, $offset=0) {
        foreach($needle_array as $query) {
            if(strpos($haystack_string, $query, $offset) !== false) {
                return true; // stop on first true result
            }
        }
        return false;
    }

}

new td_speed_booster();
  • This reply was modified 11 years by cem.
cem
tagDiv Member

thx Alin
unfortunately I’m not able to resolve the issue. At this moment all plugins are deactivated except composer and I get

Fatal error: Call to undefined function get_base_recaptcha_lang_code

I think I played too much with fucntion.php would be cool if someone would take a look and I think the prob for the jquery messages may lay here too.

EDIT: ok I commented the lang part out and now it works, somehow it was anyway double. The slider is also visible now though the thumbs and image are scaled too large, how can fix that one ?
On the jquery error before I assume I activate plugins one by one and see where the pain comes right ? and off I go..

<?php

/*  ----------------------------------------------------------------------------
    WordPress booster framework - this is our theme framework - all the content and settings are there
    It is not necessary to include it in the child theme only if you want to use the API
*/
if (!defined('TD_THEME_WP_BOOSTER')) {
	include TEMPLATEPATH . '/includes/td_config.php';
	include TEMPLATEPATH . '/includes/wp_booster/td_wp_booster_functions.php';
}

/*include theme.js under newsmag to put modal image on*/
/* include theme.js*/

/*wp_enqueue_script( 'theme-js', get_stylesheet_directory_uri() . '/js/theme.js', array( 'jquery'), NULL, TRUE );*/

remove_action( 'wp_head', 'wp_generator' ) ;
 remove_action( 'wp_head', 'wlwmanifest_link' ) ;
 remove_action( 'wp_head', 'rsd_link' ) ;
 remove_action( 'wp_head', 'feed_links', 2 );
 remove_action( 'wp_head', 'feed_links_extra', 3 );

 add_filter( 'pre_comment_content', 'wp_specialchars' );

 function no_errors_please(){
   return 'You appear to be up to no good. Please stop now!';
 }
 add_filter( 'login_errors', 'no_errors_please' );

 // and we hook our function via
 add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

 function delete_enclosure(){
  return '';
  }
  add_filter( 'get_enclosed', 'delete_enclosure' );
  add_filter( 'rss_enclosure', 'delete_enclosure' );
  add_filter( 'atom_enclosure', 'delete_enclosure' );

// function remove_cssjs_ver( $src ) {
//     if( strpos( $src, '?ver=' ) )
//         $src = remove_query_arg( 'ver', $src );
//     return $src;
// }
// add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
// add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

 add_filter( 'jpeg_quality', create_function( '', 'return 65;' ) );

//remove render blocking by jetpack
add_filter( 'jetpack_implode_frontend_css', '__return_false' );

 function remove_pingback_url( $output, $show ) {
     if ( $show == 'pingback_url' ) $output = '';
     return $output;
 }
 add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );

// add_action('init', 'myoverride', 100);
 function myoverride() {
     remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}

function dequeue_visual_composer_css() {
if (is_single()) {
    wp_dequeue_style('js_composer_front');
}
}

// Defer jQuery Parsing using the HTML5 defer property
if (!(is_admin() )) {
    function defer_parsing_of_js ( $url ) {
        if ( FALSE === strpos( $url, '.js' ) ) return $url;
        if ( strpos( $url, 'jquery.js' ) ) return $url;
        // return "$url' defer ";
        return "$url' defer onload='";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
}

// Remove WP version number from js and css files.
function remove_cssjs_ver( $src ) {
    if( strpos( $src, '?ver=' ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

function tweakjp_add_sharing_js() {
    wp_enqueue_script( 'sharing-js', WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 4 );
    $sharing_js_options = array(
        'lang'   => get_base_recaptcha_lang_code(),
        'counts' => apply_filters( 'jetpack_sharing_counts', true )
    );
    wp_localize_script( 'sharing-js', 'sharing_js_options', $sharing_js_options );
}
add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_js' );
 
function tweakjp_add_sharing_css() {
    wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL. 'sharing.css', false, JETPACK__VERSION );
}
add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_css' );
  • This reply was modified 11 years by cem.
findlay
tagDiv Member

Thanks for sharing Albnaldo. To be fair I’m going to give it another go sometime this week since up until now I have had few problems and those were quickly dealt with by TagDiv.

Anyway I appreciate you telling me about your experiences which have gone some way to restoring my faith in the theme.

Best wishes,

Derek

Alin [tagDiv]
tagDiv Staff

Hi,

You have these errors in the console – http://screencast.com/t/aGLY6Hjh2 please check this without any plugins active, leave just Visual Composer active, clear cache and see if you still have this issue with gallery.
Unfortunately this delay usually happens when speed booster is used as the css and js are moved at the bottom of the page structure, so that the page will load faster. That’s why the theme’s default style appears first then changes, because of the cascading property of css. To avoid this you could try to make the changes directly into theme’s style file.
I also checked your page source and those css resources are moved to the bottom, you also can check – http://screencast.com/t/vkHNjMZu only jetpack sharing css is not moved – http://screencast.com/t/YGTYW5v11oxY Try to move also that css and see if you still have this issue when you test pagespeed on mobile.

Thanks!

simchris
tagDiv Member

You would need to insert that into the template file for the module/layout for post page you happen to be using for your site. Look at the files in the root of the theme folder.

eg., if using single template 5 … well, guess which files that would be ? 😉

single_template_5.php
loop-single-5.php

so, if you look at loop-single.5 you might see this

<div class="td-post-text-content">
<?php echo $td_mod_single->get_content();?>
</div>

<div class="clearfix"></div>

<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_social_sharing();?>
<?php echo $td_mod_single->get_social_like_tweet();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>

And so you might insert your code either in footer area above the post pagination, replace the social sharing element; or after author box … etc.

Often you can test by simply putting some text into a spot in above file, like

<p>Happy Sunday Everybody - this is a test.</p>

and see where that prints on your post page.

Hope that helped 🙂

goteng
Participant
#0

I brought another social sharing button from “Korea SNS” Plug-in.
And I edited loop-single php files and td_module_single_base.php just a little.
But I couldn’t arrange them in a right way.
-> http://gotengvideo.com/archives/653
I want them to be in one line but the original ‘social sharing’ buttons and ‘korea sns’ buttons are seperated in different lines.
Can you help me to fix this problem? What should I change?

Pedro Ferreira
Participant
#0

Hi guys,

(contextual: no dev skills whatsoever, basic wordpress knowledge as you will probably find out by my question)

Probably (it there is a problem) this is not Newspaper/TagDiv related but maybe you can help me finding the best tool/solution to sort this out.

I’ve read plenty about the issue: differences between server (Awstats) / Analytics / Adsense traffic. I know enough to expect different traffic figures between the three based on the major issues in hand (server stats doesn’t comply with the tighter GAnalytics rules and Adsense might not be serving all my pageviews.

Nevertheless i find the diference in figures much bigger than the average difference ratios mentioned online so i was wondering if you would suggest any audit tool/service in order for me to check the health of the analytics tags on my newspaper powered website. I’ve just registred to PowermyAnalytics.com but i was wondering if is there another way for a Newspaper theme user to check tags (and any other relevant issues that might be affecting these numbers).

Sharing the figures:
Website: http://www.goalpoint.pt
AWstats traffic for May15 (visualized traffic):
19,014 unique users 34,403 sessions 583,123 pageviews

Analytics traffic (same period):
15,719 Un. Users 21,556 sessions 106,217 pageviews

Adsense traffic (same period): 39,502 pageviews

Hope anyone can advice me on this, thanks in advance,

Pedro Ferreira
GoalPoint

Alin [tagDiv]
tagDiv Staff

Hi,

Like Lucian said above the theme doesn’t have any other styles for the social sharing buttons, you will have to use a share plugin if you want something like that.
You can use this custom css in Theme Panel to hide more from author – http://screencast.com/t/T87QMqDNrv

.td-related-right {
display: none;
}
.td-related-title .td-related-left {
border-radius: 3px;
}

Thanks!

nf_prt
tagDiv Member

Hi!
hope this helps,
1) please see this: https://forum.tagdiv.com/topic/translation-to-russian-gallery/

2) if you want custom CSS for indivual elements of the page see this: https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524319
You can also place custom CSS in the Theme panel (theme panel-> custom css)

3) in the Theme panel click CATEGORIES menu, then select the desired category to show its options. There’s an option SHOW FEATURED SLIDER you can disable.

4) the theme “only” has twitter, fb, pinterest an g+ buttons. You can enable/disable them all at once, but not separatedly (theme panel-> post settings-> sharing).
Theme only has sharing buttons, you may want to have Open Graph too for better sharing. I use the theme buttons and yoast WordPress SEO plugin to manage the Open Graph.
There’s many things you can do:
– mannually add/remove buttons, edit file wp-content/themes/Newspaper/includes/modules/module_modifier/td_module_blog.php from line 64
– if you use jetpack plugin, you can disable the theme share buttons and enable jetpack sharing module, it has many buttons individually selectable and manages Open Graph too (but it’s bloated, bugged and dishonest – based on my opinion only)
– you can get a buttons plugin like Simple Share Buttons Adder and another for the open graph (yoast wordpress SEO, jetpack). Theres many plugins for this.

Alin [tagDiv]
tagDiv Staff

Hi,

Do you refer to the article share buttons? You can enable article sharing from Theme Panel > Post Settings – http://screencast.com/t/thJkYzPI7Fo

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

It usually happens when loading the font file (which contains those icons) from another host/url. Check your browser’s console as you have this error – http://screencast.com/t/1bBxeBkwP
The solution would be to load them from the same url as the site or try this solution – http://webmasters.stackexchange.com/questions/71630/font-blocked-from-loading-by-cross-origin-resource-sharing-policy-no-access-co

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Please try this custom css in Theme Panel > Custom Css – http://screencast.com/t/fPem04mtI

.td-post-sharing .td-classic-facebook iframe {
width: 130px !important;
}

Thanks!

Alin [tagDiv]
tagDiv Staff
Justrelaxed
tagDiv Member

Thanks again Alin,

Is it possible to get the social sharing (Stay connected http://themeforest.net/item/newsmag-news-magazine-newspaper/full_screen_preview/9512331) buttons from the newsmag template for my website (newspaper theme)?

I also would like to show user star ratings (post rating without login) by a few posts. How can I setup that visitors can place a starrating by an post? For example with 3 indicators; quality, price, reachability.

Like this: http://themeforest.net/item/newspaper/full_screen_preview/5489609

puffxl
Participant
#0

When a post is shared to Facebook a lot of text that doesn’t belongs to the post is pass to the Facebook wall.

Here’s a sample post:
Sample of the post

Facebook is adding categories and the post date along with the post title and is suppose to only load the excerpt.

Can someone help with this?

Thanks

Lucian
tagDiv Staff

Hi,

The theme doesn’t have an option to set the new window for the source/via but you can add target="_blank" attribute to the via and source URL like this: http://screencast.com/t/yoOl4J4eN

Not sure which default fb and twitter buttons you refer to but the theme doesn’t have any other styles for the social sharing buttons, just the one you use now: http://screencast.com/t/4vQWXw1p

Thanks

Lucian
tagDiv Staff

Hi,

Sorry for delay, we don’t work on weekends and yesterday it was day off in our country!
Unfortunately the theme doesn’t have an option to add the StumbleUpon share system there, the available sharing networks within the theme are Facebook, Twitter, G+ and Pinterest.

You can use a plugin to also add the StumbleUpon social or try to implement it yourself using their integration tips: http://help.stumbleupon.com/customer/portal/articles/665227-badges#article3
You would have to add it to the social sharing functions here: http://screencast.com/t/edCfFGmpfk

If you can’t manage to do this yourself we advise you to get a freelancer from site’s like: http://studio.envato.com/ to help you do it as we unfortunately cannot offer any type of custom work at this time.

Thanks

  • This reply was modified 11 years by Lucian.
Brain916
tagDiv Member

Since everyone is sharing, I will share mine:
http://www.sneakerfiles.com

Went simple with it. Wanted the focus to be more on the content, but I am very happy with it.

simchris
tagDiv Member

Those are elements of JETPACK, it looks like — NOT THE THEME.

You might need to hack the JetPack plugin, or perhaps go to Jetpack support forums for help on how to customize it.

Jetpack is NOT part of the theme. So, you should likely go to the support forum for Jetpack to get some additional help beyond what was already suggested.

You can TURN OFF the sharing buttons from Jetpack if you LOOK at the Jetpack panel, and then simply use the built-in theme sharing buttons ?

HELPS IF YOU ARE MORE SPECIFIC OF WHAT THE ‘PROBLEM’ ACTUALLY IS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

simchris
tagDiv Member

You can hack the theme functions to add any additional buttons you want — not everybody in the 10,000 clients TagDiv has all use the same social media tools. 90% of social media traffic is the main four social sites (FB, Twitter, Pinterest, G+).

Note you can easily add ANY custom social media elements to your site using very popular plugins like AddThis, ShareThis, etc. — which let you choose the exact buttons you want, sizes, shapes and locations and takes just a couple of minutes to setup.

eg

https://wordpress.org/plugins/search.php?q=social+sharing&=Search+Plugins

commercial
http://codecanyon.net/item/easy-social-share-buttons-for-wordpress/6394476

free
https://wordpress.org/plugins/simple-share-buttons-adder/

https://shareaholic.com/publishers/

Sid
Participant
#0

Guys i need whatsapp and stumbleupon sharing button next to pinterest.
Both are popular platform, why you not added

Sid
Participant
#0

Hey, I need StumbleUpon sharing button on http://www.blogrope.com
Same like you given the sharing bar below title in post

Viewing 25 results - 4,701 through 4,725 (of 5,508 total)