wolfier
Not New Member
Posts: 2
wolfier said 0 great things
|
Post by wolfier on May 28, 2011 19:14:53 GMT -8
You'll probably need to move it above your profile sections code Oh that solved my problem... thanks ;D
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Jul 15, 2011 19:24:27 GMT -8
Updated to use Facebook API <script type="text/javascript"> (function(options){ if(pb_action != "viewprofile" || /Error Has Occurred/.test(document.title))return; options = options||{}; options.num_posts = options.num_posts||6; var user = location.href.match(/\buser=(\w+)/)?RegExp.$1:pb_username, loc = options.customDomain||location.hostname; 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>'; options.width = options.width||td.offsetWidth; td.lastChild.innerHTML = '<fb:comments href="http://' + loc + '/?action=viewprofile&user=' + user + '" num_posts="' + options.num_posts + '" width="'+ options.width +'" xid="action=viewprofile&user='+user+'"></fb:comments>'; if(!window.FB){ var scr = document.createElement("script"); scr.type = options.scriptType||"text/javascript"; scr.src = options.scriptSource||"http://connect.facebook.net/en_US/all.js#xfbml=1"; document.getElementsByTagName("head")[0].appendChild(scr); } break; } } } })(); </script> Notes:The code accepts optional parameters that can be used to tailor it to your needs. To pass parameters you can add them as arguments to the function by editing the last line like so })({width:300, customDomain:"wormocodes.com"});Here are a list of the parameters the code recognizes, (all parameter names are case-sensitive): - customDomain - If you use a custom domain for your forum set this parameter so comments don't fluctuate depending on if read/written from custom domain or standard proboards.com domain.
example: })({customDomain:"wormocodes.com"});
- num_posts - the maximum number of comments to show (defaults to 6 if not specified)
example: })({num_posts:10});
- width - the width of the comment box in pixels. If not specified the code will try to figure out what to set it at based on the width of the container so if you use a forum resizing code which runs after this code then you'll probably want to specify a width that more closely matches the final width of the forum.
example: })({width:310});
|
|
nosisia
Not New Member
Posts: 2
nosisia said 0 great things
|
Post by nosisia on Mar 17, 2012 14:13:31 GMT -8
Where on this code can I change the text color for the comments?
|
|
|
Post by Wormopolis on Mar 18, 2012 3:27:25 GMT -8
Good question.. Im trying to do that myself now...
standard CSS isnt overriding it...
|
|