Forum Replies Created

Viewing 15 replies - 46 through 60 (of 61 total)
  • Thread Starter freerange

    (@freerange)

    Replace the slideshow.js file with this one – it adds 2 lines

    if(!document.getElementById("content-slideshow"))
    		return;		//Bail if we don't have a slideshow

    This causes it to bail gracefully if there is no slideshow on the page

    // Tutorial by https://ooyes.net/
    
    $slideshow = {
    	context: false,
    	tabs: false,
    	timeout: 8000,
    	fx: 'fade',
    	slideSpeed: 900,
    	tabSpeed: 900,   
    
        init: function() {
    	if(!document.getElementById("content-slideshow"))
    		return;		//Bail if we don't have a slideshow
            this.context = jQuery('#content-slideshow');
            this.tabs = jQuery('ul.slideshow-nav li', this.context);
            this.tabs.remove();
            this.startSlideshow();
        },
    
        startSlideshow: function() {
    
            jQuery('div.content_slideshow > ul', $slideshow.context).cycle({
                fx: $slideshow.fx,
                pager: jQuery('ul.slideshow-nav', $slideshow.context),
                pagerAnchorBuilder: $slideshow.startTabs,
                before: $slideshow.Tabactive,
    	    timeout: $slideshow.timeout,
                speed: $slideshow.slideSpeed,
                fastOnEvent: $slideshow.tabSpeed,
                pauseOnPagerHover: true,
                pause: true
            });
        },
    
        startTabs: function(i, slide) {
            return $slideshow.tabs.eq(i);
        },
    
        Tabactive: function(currentSlide, nextSlide) {
            var activeTab = jQuery('a[href="#' + nextSlide.id + '"]', $slideshow.context);
            if(activeTab.length) {
                $slideshow.tabs.removeClass('on');
                activeTab.parent().addClass('on');
            }
        }
    };
    
    jQuery(document).ready(function($) {
        $slideshow.init();
    });
    Plugin Author freerange

    (@freerange)

    Can you contact us at at [email protected] with more details so we can resolve the issue?

    Plugin Author freerange

    (@freerange)

    We believe this to be resolved – if not please contact [email protected]

    Plugin Author freerange

    (@freerange)

    What that means is our crawler couldn’t see the repost button on the page (or couldn’t load the page at all) when we tried to ingest the content. If that happens we suppress the button so we don’t show users a button that doesn’t work (the next rev of the plugin will grey out the button rather than hiding it).

    We took a look and there are a few odd things going on with your site – lets take this to email ([email protected]) so we can get into specifics.

    Plugin Author freerange

    (@freerange)

    We’re pretty sure it’s just a coincidence. Repost doesn’t do anything to DNS at all.

    DNS is the net equivalent of the phone book, it’s how google and browsers know which computer hosts https://www.whatever.com. The error you are seeing is google saying “hey you’re not in the phone book”. Since the repost plugin runs on your server and the error you are seeing is google saying it can’t even find your server to access it the two are unrelated.

    Plugin Author freerange

    (@freerange)

    The old data was cached – flushed the cache and now it’s working.

    Plugin Author freerange

    (@freerange)

    It looks like one of your other plugins is conflicting withe the Repost plugin – specifically wp_optin_pro is trying set headers on non html content and that’s breaking our plugin.

    A better solution would be for the plugin to check the size of the image and not attached itself to images smaller than a threshold value as this would solve globally for all social buttons.

    Thread Starter freerange

    (@freerange)

    Here is a fix that hides the button if the image size is 0 and check again on load to display the actual image.

    CB_Pinterest_Pinner = function(selector, not_selector, min_width, min_height){
        function init(selector, not_selector, min_width, min_height) {
            jQuery(selector).not(not_selector).each(function(index) {
                var extra_css = new Array("margin", "margin-top", "margin-bottom", "margin-left", "margin-right", "padding", "padding-top", "padding-bottom", "padding-left", "padding-right");
                var already_selected = jQuery(this).attr("cb_pinned");
                if(already_selected != "true") {
                    jQuery(this).attr("cb_pinned", "true");
                    var height = jQuery(this).height();
                    if( typeof height === "undefined") {
                        height = jQuery(this).attr("height");
                    }
                    var width = jQuery(this).width();
                    if( typeof width === "undefined") {
                        width = jQuery(this).attr("width");
                    }
    
                    width = parseInt(width);
                    height = parseInt(height);
    
                    min_width = parseInt(min_width);
                    min_height = parseInt(min_height);
    
                    if((height == 0 || height > min_height) && (width == 0 || width > min_width)) {
                        var theID = 'pin_images_' + index;
                        jQuery(this).wrap('<div class="cb_pin_images" id="' + theID + '" />');
                        jQuery('#' + theID).append('<a class="cb_pin_link" href="#">&nbsp;</a>');
                        jQuery('#' + theID + " a").click(image_click);
                        if(height > 0) {
                            jQuery('#' + theID).height(height);
                        }
                        if(width > 0) {
                            jQuery('#' + theID).width(width);
                        }
                        var len = extra_css.length;
                        for(var i = 0; i < len; i++) {
                            var css_attr_name = extra_css[i];
                            var css_attr_value = jQuery(this).css(css_attr_name);
                            if(!( typeof css_attr_value === "undefined")) {
                                jQuery('#' + theID).css(css_attr_name,css_attr_value);
                            }
                        }
                        jQuery('#' + theID).addClass(jQuery(this).attr("class"));
                        if(height == 0 || width == 0) {
                            jQuery('#' + theID+' a.cb_pin_link').hide();        //If we don't know the image size hide the button for now
                            jQuery(this).load(function() {
                                //Image now loaded, see if it's big enough
                                if(jQuery(this).height() > min_height && jQuery(this).width() > min_width) {
                                    jQuery(this).parent().find('.cb_pin_link').show();
                                }
                            })
                        }
                    }
                }
            });
        }
        function image_click(event) {
            var url = document.URL;
           /* TODO add somehow to determine if this is a link to a post or not.
            * This works for the most part but not completely
            * $link_parents =jQuery(this).parent().parent("a");
            alert($link_parents.length);
            if($link_parents && $link_parents.length == 1 ){
                //alert(typeof $link_parents.get(0));
                url = $link_parents.attr("href");
            }*/
            if(url.charAt(url.length - 1) == "/") {
                url = url.substring(0, url.length - 1);
            }
            url = encodeURIComponent(url);
            var media = jQuery(this).prev("img").attr("src");
            media = encodeURIComponent(media);
            var description = jQuery(this).attr("title");
            if( typeof description === "undefined" || jQuery.trim(description) == "" ) {
                description = jQuery(this).prev("img").attr("alt");
                if( typeof description === "undefined" || jQuery.trim(description) == "" ){
                    description = document.title;
                }
            }
            var href = 'https://pinterest.com/pin/create/button/?url=' + url + '&media=' + media + '&description=' + description;
            event.preventDefault();
            pin_this(href);
        }
        function pin_this(href) {
            window.open(href, "cb_pin_windows", "menubar=1,resizable=1,width=800,height=250");
        }
        init(selector, not_selector, min_width, min_height);
    }
    Plugin Author freerange

    (@freerange)

    fixed – delete and re-install the plugin and it should work – contact [email protected] if you need further help

    Plugin Author freerange

    (@freerange)

    If you email [email protected] we can set you a patched file ahead of getting it uploaded.

    Plugin Author freerange

    (@freerange)

    Yep we blew it – there was an error in one of the scripts. We have a patch and as soon as we can track down flint who has posting privileges here we’ll be pushing fixed code. Sorry about that.

    Plugin Author freerange

    (@freerange)

    We’d like to understand a little more about what you are doing – can you email [email protected] so we can discuss?

    By way of background we use the api key to decide which host profile applies and to match the domain so we know you have rights to the content. If you have many different sites under one install you’ll still want to manage them separately so we get the right site name etc. We may be able to provision an api to make this easier for you.

    Email [email protected] with your site url and we’ll shut it off.

    Thread Starter freerange

    (@freerange)

    I fixed it another way – the href is really only a fallback in case the JS fails so when I attach the click event in jQuery I now replace the href with a javascript:void(0); which seems to do the trick and should work for anybody else doing similar things.

    Thanks for your help.

Viewing 15 replies - 46 through 60 (of 61 total)