PureVolume

 
 
 
Blog Post
 
var authDelegate = new fyre.conv.RemoteAuthDelegate();

authDelegate.login = perform (handlers)

if (isLoggedIn Please log within above to publish the comment.

');

handlers.failure();

else

removeLfError();

handlers.success();

log_in_socially = function(dn, userid, site)

$.ajax(

url: "/data/common/livefyre/lf_social_login",

dataType: 'json',

data:

lfdn: dn,

lfuser: userid,

ssite: site

).done(function(profile)

//CBSi.log("== Social Login ==",profile,site);

if (profile.error)

//CBSi.log("Social login failed together with error: ", profile);

return null;

in addition

document.cookie = "lf_social_login="+ profile.socialsess +"; expires=0; path=/";

profile.socialsess = '1';

userObj = profile;

lf_user_profile = profile;

doLivefyreAuth(profile);

);

;

if (hasProfile == 0)

//CBSi.log("== adding acquire comment http://greatbigpodcast.com link ==");

// These People require a screen name

//$('.lf_auth_section a.lf_user_loggedout').html('Get a new Screen Title to Comment').addClass('loginLink');

$('.fyre .fyre-user-loggedout').hide();

var type = "";

$('head').append(style);

$('#getScreenName').show();

var screenNameContent = 'Get a new Screen Title to Comment';

$('#getScreenName').html(screenNameContent);

otherwise if (userObj.profile.valid_email_flag != '1')

$('.fyre .fyre-user-drop').hide();

var type = "";

$('head').append(style);

$('#getScreenName').show();

var screenNameContent = 'Validate your own email in order to Comment';

$('#getScreenName').html(screenNameContent);

/*

else

if (typeof userObj.profile.profile_url != 'undefined')

if (userObj.profile.profile_url)

//CBSi.log("== adding login profile links ==");

$('.fyre .fyre-box-wrapper a.fyre-user-profile-link').attr('href',userObj.profile.profile_url);

$('li.fyre-edit-profile-link').html('Edit Profile');

*/

changedDom = 1;

//console.log("== finished dom hacks ==");

;

operate updateCommentCounts(element,count)

//CBSi.log("== changing remark counts ==");

if (count == 1)

$(element).html('' + count + '   

else  Comments');

$(element).show();

$('.commentsCountLabel').html('comments');

$('.commentsCount').html(count);

if (isLoggedIn == 1)

//console.log("== Checking Match ==");

callFBApi = function()

var accessToken;

var uid;

//CBSi.injectJS('//connect.facebook.net/en_US/sdk.js#xfbml=1', 'facebook-jssdk');

/*

FB.init(

appId : '297742330311988',

oauth : true,

version: 'v2.3'

);

*/

FB.getLoginStatus(function(response)

if (response.status === 'connected')

handle_fb_response(response.authResponse);

else

FB.login(function(response)

if (response.authResponse)

handle_fb_response(response.authResponse);

/*

uid = response.authResponse.userID;

accessToken = response.authResponse.accessToken;

//CBSi.log("== FB APP DATA ==", response);

FB.api('/me', function(social) ; expires=0; path=/";

);

*/

);

);

;

handle_fb_response = function(authResponse)

uid = authResponse.userID;

accessToken = authResponse.accessToken;

FB.api('/me', function(social)

//CBSi.log("== FB USER DATA ==", social);

log_in_socially(social.name, social.username, 'fb');

document.cookie = "lf_social_info=);

function updateAuthorLinks()

$('.fyre-comment-username').each(function()

$(this).click(function()

window.location.href = $(this).attr('href');

);

);

$('.fyre-comment-author').each(function()

$(this).click(function()

window.location.href = $(this).attr('href');

);

);

operate updateOneLineComments()

//console.log("Checking Comments");

$(".fyre-comment-wrapper").each(function()

if ($(this).find(".fyre-comment").css('display') != 'none')

var commentText = $(this).find(".fyre-comment").html();

if (commentText != null)

var loopCtr = 0;

// regarding IE8

while ( (commentText.indexOf("

var isLoggedIn = 1;

if (cval)

try

fyre.conv.login(cval.token);

catch (e)

isLoggedIn = 0;



",' ');

loopCtr++;

//console.log(commentText);

$(this).find(".fyre-comment").css('display','none');

$(this).find(".fyre-comment-head").append(commentText);

// finish check pertaining to blank text

//console.log("Checking Height");

cntHeight = $(this).find(".fyre-comment-head").height();

if (cntHeight > 0)

//console.log("Setting Height");

cntHeight = -1 * ((cntHeight / 2) + 12);

$(this).find(".fyre-flag-link").css('top',cntHeight);

);

function change_profile_link(){

$(".fyre .fyre-box-list .fyre-edit-profile-link a").attr("href",'#');

$(".fyre .fyre-box-list .fyre-edit-profile-link a").attr("alt",'');

$('.fyre .fyre-box-list .fyre-edit-profile-link a').click(function() return false; );

$('.fyre .fyre-box-list .fyre-edit-profile-link').remove();

$(".fyre .fyre-comment-head .fyre-comment-username").attr("href",'#');

$(".fyre .fyre-comment-head .fyre-comment-username").attr("target",'');

$(".fyre .fyre-comment-head .fyre-comment-username").attr("alt",'');

$('.fyre .fyre-comment-head .fyre-comment-username').click(function() return false; );

$('.fyre .fyre-comment-head').each(function() {

var alltxt = $(this).html();

var nickname = $(this).find('.fyre-comment-username').html();

if (!(nickname == null)){

alltxt = "

operate removeLfError()

$('#cbsLfError').remove();

callTwitterApi = function()

window.open('/common/livefyre/V3/via_twitter?debug=32','twitterOauth','width=600,height=500,menu=0,status=0');

;

callTwitterApiHidden = function() /);

log_in_socially(arr1[2], arr1[3], 'twitter');

hasProfile = 1;

operate doLivefyreAuth(cval)

//console.log("== Attempting LF Login ==",cval);

By Zach Harper

//console.log(customStrings.signIn);

changeDOM = function()

// DOM hacks. Alter the actual UI for the dropdown box

//console.log("== Operating Dom Hacks ==");

Posted Aug 07, 2015 at 7:00pm

Comments

 
 
Advertisement

Posts (13)

 
Signup for PureVolume, or Login.