Articles

"; // Workaround for some renders and double ampersand if (FF_resource.scriptDeferred.state() === 'pending' && !FF_resource.scriptLoading) { script = document.createElement('script'); script.src = "https://www.myiv.com/wp-content/plugins/flow-flow-social-streams/js/public.js"; script.onload = function( script, textStatus ) { FF_resource.scriptDeferred.resolve(); }; document.body.appendChild(script); FF_resource.scriptLoading = true; } if (FF_resource.styleDeferred.state() === 'pending' && !FF_resource.styleLoading) { style = document.createElement('link'); style.type = "text/css"; style.id = "ff_style"; style.rel = "stylesheet"; style.href = "https://www.myiv.com/wp-content/plugins/flow-flow-social-streams/css/public.css"; style.media = "screen"; style.onload = function( script, textStatus ) { FF_resource.styleDeferred.resolve(); }; document.getElementsByTagName("head")[0].appendChild(style); FF_resource.styleLoading = true; } $cont.addClass('ff-layout-' + streamOpts.layout); if (!isMobile) $cont.css('minHeight', '1000px'); ajaxDeferred = isLS && sessionStorage.getItem(hash) ? {} : $.get(opts.ajaxurl, data) ; $.when( ajaxDeferred, FF_resource.scriptDeferred, FF_resource.styleDeferred ).done(function ( data ) { var response, $errCont, err; var moderation = 0; var original = (isLS && sessionStorage.getItem(hash)) ? sessionStorage.getItem(hash) : data[0]; try { response = JSON.parse(original); } catch (e) { window.console && window.console.log('Flow-Flow gets invalid data from server'); if (opts.isAdmin || opts.isLog) { $errCont = $('
If you see this message then you have administrator permissions and Flow-Flow got invalid data from server. Please provide error message below if you are doing support request.
'); $cont.before($errCont); $errCont.find('.ff-err-info').html(original == '' ? 'Empty response from server' : original) } return; } opts.streams['stream' + streamOpts.id]['items'] = response; if (!FlowFlowOpts.dependencies) FlowFlowOpts.dependencies = {}; var requests = []; var request, extension, style; for ( extension in FlowFlowOpts.dependencies ) { if ( FlowFlowOpts.dependencies[extension] && FlowFlowOpts.dependencies[extension] !== 'loaded') { request = $.getScript( opts.plugin_base + '-' + extension + '/js/ff_' + extension + '_public.js'); requests.push(request); style = document.createElement('link'); style.type = "text/css"; style.rel = "stylesheet"; style.id = "ff_ad_style"; style.href = opts.plugin_base + '-' + extension + '/css/ff_' + extension + '_public.css'; style.media = "screen"; document.getElementsByTagName("head")[0].appendChild(style); FlowFlowOpts.dependencies[extension] = 'loaded'; } } var resourcesLoaded = $.when.apply($, requests); resourcesLoaded.done(function(){ var $stream, width; $stream = FlowFlow.buildStreamWith(response, streamOpts, moderation, FlowFlowOpts.dependencies); if (isLS && response.items.length > 0 && response.hash.length > 0) sessionStorage.setItem(response.hash, original); var num = streamOpts.layout === 'compact' || (streamOpts.mobileslider === 'yep' && isMobile)? (streamOpts.mobileslider === 'yep' ? 3 : streamOpts['cards-num']) : false; $cont.append($stream); if (typeof $stream !== 'string') { FlowFlow.setupGrid($cont.find('.ff-stream-wrapper'), num, streamOpts.scrolltop === 'yep', streamOpts.gallery === 'yep', streamOpts, $cont); } setTimeout(function(){ $cont.find('.ff-header').removeClass('ff-loading').end().find('.ff-loader').addClass('ff-squeezed').delay(300).hide(); }, 0); }).fail(function(){ console.log('Flow-Flow: resource loading failed') }); var isErr = response.status === "errors"; if ((opts.isAdmin || opts.isLog) && isErr) { $errCont = $('
If you see this then you are administrator and Flow-Flow got errors from APIs while requesting data. Please go to plugin admin and after refreshing page check for error(s) on stream settings page. Please provide error message info if you are doing support request.'); $cont.before($errCont); } if (opts.isAdmin && response.status === 'building') { window.console && window.console.log(response); $cont.prepend($('
ADMIN INFO: Feeds cache is being built in background. Please wait for changes to apply. Page reload is required.')); } }); function isLocalStorageNameSupported() { var testKey = 'test', storage = window.sessionStorage; try { storage.setItem(testKey, '1'); storage.removeItem(testKey); return true; } catch (error) { return false; } }; return false; }(jQuery));

Pin It on Pinterest