Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Feb 15, 2011 22:05:08 GMT -8
Warning: This has been tested only in js consoles of (Browsers Tested: ) firefox and IE and also since I am not the owner of the proboards.com domain the plugin could be pulled from the gigya service, but for now it works. Place script in main footer and a new section should be added when viewing profiles that allows reading and posting comments. You must be logged in to both the forum and at least one social network to post comments and see friends-only comments (public comments should be viewable to all). [July, 15, 2011] Updated Code found here <script> (function(action){ if(action==false || pb_username=="Guest" || /Error Has Occurred/.test(document.title))return; var user = location.href.match(/\buser=(\w+)/)?RegExp.$1:pb_username var gtn="getElementsByTagName", tb = document[gtn]('tbody'),td,tr,hr,ir,b; for(ir=tb.length-1;ir>0;ir--){ if(tb[ir].rows[0] && tb[ir].rows[0].cells[0] && tb[ir].rows[0].cells[0] && tb[ir].rows[0].cells[0].colSpan==2 && tb[ir].rows[0].cells[0]){ if((b=tb[ir].rows[0].cells[0][gtn]('b')) && b[0] && /Member's Bio/.test(b[0].innerHTML)){ tr = tb[ir].insertRow(-1); td=tr.insertCell(-1); td.colSpan=2; td.innerHTML = '<font size="2"><b>Profile Comments</b><hr size="1"></font>'; tr = tb[ir].insertRow(-1); td=tr.insertCell(-1); td.colSpan=2; td.innerHTML = '<div id="profilecomments"></div>'; var cconf = {APIKey: '2_g9UfmPl76B_bIfr_AifJujgM15nkwmDOg9caV56JcjmwHlwW6ag3mVV7PVj69Oos'}; var cparams = {site:17934238,stream:pb_forum+"."+user,width:td.offsetWidth,height:450,containerID:'profilecomments'}; gigya.services.socialize.showChatUI(cconf,cparams); break; } } } })(!!(pb_action=="viewprofile")) </script> Attachments:
|
|
|
Post by Wormopolis on Feb 15, 2011 22:40:49 GMT -8
I really need to research gigya services...
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Feb 16, 2011 0:01:31 GMT -8
I really need to research gigya services... I inadvertently left some of the diagnostic lines in the social friends code so if you open firebug in FF and reload the main page you can inspect the data being passed between gigya and the forum in the console tab. That should give you a better insight on how the API is being used.
|
|
|
Post by Wormopolis on Feb 22, 2011 0:49:51 GMT -8
running on this forum, but everytime I try to connect to a service it just says failed to connect.
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Feb 22, 2011 15:35:52 GMT -8
Are you able to use the standard Proboards social login or do you get an error there as well? Are you perhaps already logged into the Social Friends in InfoCenter? From what I understand all logins are proxied through Gigya. What network are you trying to login with and which browser? Did you perhaps tell that network that you no longer want to share with proboards.com. For example I can login to yahoo.com,go into my account preferences and see every site I have allowed to use my social data. If I click on community.proboards.com and tell Yahoo to no longer allow that site to use my data then I would no longer be able to use the standard Proboards social login on login page. Here is what I see after logging in on your profile and adding a comment Once you login you should be able to see that comment I made and make one of your own. The friends tab will contain private comments only friends will be able to see. There is currently an intermittent "too many connections" error on this forum perhaps it's related
|
|
|
Post by Wormopolis on Feb 22, 2011 17:11:59 GMT -8
I tried a few things late last night, but Im going to see what I can do now. I will disconnect all sharing from site and info center first as suggested.
|
|
|
Post by Wormopolis on Feb 22, 2011 17:18:52 GMT -8
I can see your comment, regardless of being logged into any account.
logged out of all gigya accounts in FF and still received "cannot connect" error on facebook and yahoo.
can see comments in IE regardless of shared account. logged out of all accounts in IE.
IE also returns error.
going to yahoo to check what accounts are being shared and see if I can sever them all.
|
|
|
Post by Wormopolis on Feb 22, 2011 17:24:25 GMT -8
severed all accounts including proboards from my yahoo prefs. testing again
|
|
|
Post by Wormopolis on Feb 22, 2011 17:25:34 GMT -8
I can still see your comment, but when I clicked to start using yahoo I go tthis now: Failed connecting. Please try again later
|
|
|
Post by Wormopolis on Feb 22, 2011 17:30:34 GMT -8
ok.. just severed all accoutn in facebook.. trying it now...
dammit. got the same message. I really want this to work but Im not sure what I am missing.
|
|
|
Post by Wormopolis on Feb 22, 2011 17:31:30 GMT -8
going into modifyprofile and telling it to link to the site works however in both IE and FF
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Feb 23, 2011 1:32:57 GMT -8
Now that's weird because I don't have any social networks permanently linked to proboards, yet I can login to InfoCenter and Profile with no problem. The documentation I read seems to also be wrong since it stated that one had to be logged in (to the network) to see comments but as a guest not logged into the forum or a network I can still read them (everyone tab) just fine, the friends tab is what requires login. I'd remove the must-be-logged-into-the forum requirement from the code so guests can also read comments except for this new wrinkle of having to have the account linked (by Proboards) in order to work (which guests cannot do, only logged in members)? Thanks for the report Wormo, can you remove the forum-member requirement from both codes to test if there's a problem using it as guest by someone who has never used Proboards standard social login? Profile Comments:if(action==false || pb_username=="Guest" || /Error Has Occurred/.test(document.title))return; |
Social Networking Friends:})(pb_action=="home" && pb_username!='Guest') </script> |
|
|
|
Post by Wormopolis on Feb 23, 2011 1:46:37 GMT -8
that has been done.
I got caught up in another code so I didnt try testing more on my PC. I will do that tomorrow.
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Feb 23, 2011 2:23:33 GMT -8
Actually the way I have the InfoCenter code written guests still wouldn't be able to use it since it makes use of the action=changevisibility link in order to add hide/unhide friends list functionality. Guests obviously do not have that option so the code never identifies the appropriate InfoCenter section if viewing as guest
|
|
|
Post by Wormopolis on Feb 23, 2011 3:02:40 GMT -8
|
|