Friday, December 28, 2012

Tips to Improve Your Self Confidence | Relationships | iDiva.com

';

//----------To Hide login div and the comment box
$("#logindiv").hide();
$("#maincommentdiv").hide();
// $("#facebooktwitteruserdetails").html(embededlogeddetails12);
$("#SiteLoginDiv").html(embededlogeddetails);
$("#CommonLoginDiv").hide();
$("#SiteLoginDiv").show();

//-To Show the Twitter Post Box
T("#maincommentdivfortweeter").tweetBox({
height: 100,
width: 600,
defaultContent: "http://toi.in/T5QG9Y",
onTweet : function (data){
//--------------Function to Post data to the insert2dbfile
var whihcflag = $("#whichcontype").val();
var first_name = $("#first_name").val();
var last_name = $("#second_name").val();
var screenName = $("#userscreenname").val();
var profile_url = $("#userprofilelink").val();
var profileImage = $("#userprofileimage").val();
var loginusertypeid = $("#loginusertypeid").val();
var comment_text = data.replace("http://toi.in/T5QG9Y","");

var comment_parentid = $("#comment_parentid").val();

var content_id = $("#content_id").val();
$.post("http://idiva.com/2db/comment2db.php",{'login_type':'twitter', 'whihcflag':whihcflag, 'first_name':first_name, 'last_name':last_name, 'screenName':screenName, 'profile_url':profile_url, 'profileImage':profileImage, 'loginusertypeid':loginusertypeid, 'comment_text':comment_text, 'content_id':content_id, 'comment_parentid':comment_parentid},function(data){
//alert(data);

if(jQuery.trim(data)=='error'){
$("#showerrorComment").html('User and password did not match.');
document.getElementById('showerrorComment').style.display="block";
}else if(jQuery.trim(data)=='BadName'){
$("#comment_text").focus();
$("#commentBoxRes").html('Please enter a valid name.');
document.getElementById('commentBoxRes').style.display="block";
}else if(trim(data)=='BadWord'){
$("#comment_text").focus();
$("#commentBoxRes").html('Whoa... STOP right there! Pls feed us love, not spam, links or abusive words :) Help us keep iDiva a happy place!');
document.getElementById('commentBoxRes').style.display="block";
}else{
//alert('here');
$("#commentBoxRes").show();
$.post("http://idiva.com/tpl/tplGetcommentadded.php",{"content_id":content_id,"pageval":"1","whichflag":whihcflag},function(data){ //alert(data);
$("#showcommentcontent").html(data);
var nocomments = $('#nocomments_'+18656).val();
//console.debug(nocomments);
if( nocomments > 0){
$('#comment_'+18656).html('');
$('#comment_'+18656).html(''+nocomments +' Comments ' );
}
});
}
});

}
});

//$("#login-logout").append('Sign out of Twitter'); $("#signout").bind("click", function () { twttr.anywhere.signOut(); $("#first_name").val(''); $("#userscreenname").val(''); $("#userprofilelink").val(''); $("#userprofileimage").val(''); $("#loginusertypeid").val(''); window.location.reload(); }); } else { T("#twitter-connect-placeholder").connectButton({ authComplete: function(user) { // triggered when auth completed successfully window.location.reload(); } }); $("#maincommentdiv").show(); $("#maincommentdivfortweeter").hide(); }; }); });//------------Document Ready //-------------------FAcebook User Starts var badword=0; function postthecomment1() { var comment_text = ($("#comment_text").val()); var comment_text_fb = ($("#comment_text").val()); var comment_parentid = ($("#comment_parentid").val()); var content_id = ($("#content_id").val()); var whihcflag = $("#whichcontype").val(); $("#showerrorComment").hide(); $("#commentBoxRes").hide(); if($("#whichusertype").val()=='1') { if(comment_text==""){ errmsg = "Please Enter Your Comment"; $("#comment_text").val('') $('#comment_text').focus(); $("#showerrorComment").html(errmsg); document.getElementById('showerrorComment').style.display="block"; }else{ var first_name = $("#first_name").val(); var last_name = $("#second_name").val(); if($('#UsernameSelector').attr('checked') == true){ var screenName = 'Anonymous'; } else{ var screenName = $("#userscreenname").val(); } var profile_url = $("#userprofilelink").val(); var profileImage = $("#userprofileimage").val(); var loginusertypeid = $("#loginusertypeid").val(); $('#commentSubmit').attr('disabled','disabled'); $.post("http://idiva.com/2db/comment2db.php",{'login_type':'facebook','whihcflag':whihcflag,'first_name':first_name,'last_name':last_name,'screenName':screenName,'profile_url':profile_url,'profileImage':profileImage,'loginusertypeid':loginusertypeid,'comment_text':comment_text,"content_id":content_id,"comment_parentid":comment_parentid},function(data){ data=jQuery.trim(data); if(data=='error'){ $("#showerrorComment").html('User and password did not match.'); document.getElementById('showerrorComment').style.display="block"; } else if(data=='BadName'){ $("#Username").focus(); $("#showerrorComment").html('Please enter a valid name.'); $("#showerrorComment").show(); } else if(data=='BadWord'){ badword=1; $("#comment_text").focus(); $("#showerrorComment").show(); $("#showerrorComment").html('Whoa... STOP right there! Pls feed us love, not spam, links or abusive words :) Help us keep iDiva a happy place!'); }else{ $("#commentBoxRes").show(); $.post("http://idiva.com/tpl/tplGetcommentadded.php",{"content_id":content_id,"pageval":"1","whichflag":whihcflag},function(data){ //alert(data); $("#showcommentcontent").html(data); $("#commentBoxRes").show(); //$("#Username").val(''); //$("#Useremail").val(''); $("#comment_text").val(''); var nocomments = $('#nocomments_'+18656).val(); //console.debug(nocomments); if( nocomments > 0){ $('#comment_'+18656).html(''); $('#comment_'+18656).html(''+nocomments +' Comments ' ); } var message = comment_text_fb; //alert(message); var article_title = "Tips to Improve Your Self Confidence"; var article_page_link = "http://idiva.com/photogallery-relationships/tips-to-improve-your-self-confidence/18656/1"; var story_section ="Photogallery"; var story_section_url ="http://idiva.com/relationships"; var author_name = "TNN"; var author_name_url = "http://idiva.com/author/tnn/102"; var posteddate = "Dec 27th 2012 at 2:20PM" var article_image_path ="http://images.idiva.com/media/photogallery/2012/Dec/boost_your_confidence_120x90.jpg"; var attachment = { 'name': article_title, 'href': article_page_link ,'properties' : { 'Filed under': {'text': story_section, 'href': story_section_url}, 'Author ' : {'text': author_name, 'href':author_name_url}, 'Posted On': posteddate, 'caption': '' } ,'media': [{ 'type': 'image', 'src': article_image_path, 'href': article_page_link }] }; var action_links = [{'text':'Idiva', 'href':'http://www.idiva.com/'}]; //FB.Connect.streamPublish(message, attachment, action_links); streamPublish(attachment, 'Idiva', 'http://www.idiva.com/', 'Share idiva.com'); $('#commentSubmit').attr('disabled',''); }); } }); } } else { if($('#UsernameSelector').attr('checked') == true){ var username = 'Anonymous'; } else { var username = jQuery.trim($("#Username").val()); } var useremailid = jQuery.trim($("#Useremail").val()); var comment_parentid = ($("#comment_parentid").val()); var userpassword = ($("#Password").val()); var content_id = ($("#content_id").val()); var whihcflag = ($("#whichcontype").val()); var flag = 0; //alert(username); //alert(useremailid); if (comment_text==""){ errmsg = "Please Enter Your Comment"; $("#comment_text").val('') $('#comment_text').focus(); flag=1; }else if (username=="" || useremailid==""){ errmsg = "Please login to comment."; flag=1; }else if (userpassword == "" || userpassword == "Password"){ errmsg = "Please Enter Password"; $('#Password').focus(); flag=1; } if(flag==0) { //alert("asda"); $('#commentSubmit').attr('disabled','disabled'); $.post("http://idiva.com/2db/comment2db.php",{'login_type':'normaluser','EmailId':useremailid,'whihcflag':whihcflag,'Username':username,"userpassword":userpassword,"content_id":content_id,"comment_parentid":comment_parentid,'comment_text':comment_text},function(data){ data=jQuery.trim(data); if(data=='error'){ $("#showerrorComment").html('User and password did not match.'); $("#showerrorComment").show(); } else if(data=='BadName'){ $("#Username").focus(); $("#showerrorComment").html('Please enter a valid name.'); $("#showerrorComment").show(); } else if(data=='BadWord'){ $("#comment_text").focus(); $("#showerrorComment").html('Whoa... STOP right there! Pls feed us love, not spam, links or abusive words :) Help us keep iDiva a happy place!'); $("#showerrorComment").show(); } else if(data=='0'){ $("#comment_text").focus(); $("#showerrorComment").html('Name is either empty or invalid.'); $("#showerrorComment").show(); } else{ $("#commentBoxRes").show(); $.post("http://idiva.com/tpl/tplGetcommentadded.php",{"content_id":content_id,"pageval":"1","whichflag":whihcflag},function(data){ //alert(data); $("#showcommentcontent").html(data); var nocomments = $('#nocomments_'+18656).val(); //console.debug(nocomments); if( nocomments > 0){ $('#comment_'+18656).html(''); $('#comment_'+18656).html(''+nocomments +' Comments ' ); } $("#commentBoxRes").html('Thanks for posting the comments.'); document.getElementById('commentBoxRes').style.display="block"; //$("#Username").val(''); //$("#Useremail").val(''); $("#comment_text").val(''); }); } $('#commentSubmit').attr('disabled',''); del_cook('keepComment'); }); }else { $("#showerrorComment").html(errmsg); document.getElementById('showerrorComment').style.display="block"; } } } function clearText(field){ if (field.defaultValue == field.value) field.value = ''; else if (field.value == '') field.value = field.defaultValue; } function edittoAnonymous( val ){ if($('#'+val).val() == 'Anonymous' || $('#UsernameSelector').attr('checked') == false){ $('#'+val).val(readCookie("USERSCREENNAME") ); $('#emailuser').show(); }else{ $('#'+val).val('Anonymous'); $('#emailuser').hide(); } } function edittotext(val){ //console.debug($(val).attr("readonly")); $('#UsernameSelector').attr('checked',false); //$(val).attr("readonly",false); } function getCookie(c_name) { var i, x, y, ARRcookies = document.cookie.split(";"); for (i=0; i

Source: http://idiva.com/photogallery-relationships/tips-to-improve-your-self-confidence/18656

NBC Olympics Live Olympic medal count Medal Count 2012 London 2012 Fencing olympics chariots of fire nbc

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.