Edited: If you use the old code then only members can see the facebook plug-in comment box and they can comment. Please use the new code, both members and non-members can see the facebook plug-in comment box and both members and non-members can comment using facebook account. 

Hey NCs,

Hope you will be very happy after  successfully using my killer tip.

Instruction is very simple: Just copy and paste the  following code into Custom Code. You may want to change data-width follow jay's instruction here.

The Old Code

<script type="text/javascript">
x$(document).ready(function(){
x$("div.texteditor").after('<div id="fb-root"></div><div class="fb-comments"></div>');
});
</script>

The New Code

<script type="text/javascript">
x$(document).ready(function(){
x$("div#discussionReplies").before('<div id="fb-root"></div><div class="fb-comments"></div>');
});
</script>

 

 

Want to give a different look to your ning site?  Mail me at bernardmax2@gmail.com

 

Live Preview: Here

Example:

 

Tags: Add, FACEBOOK, Killer, Tip:, box, comment, every, forum, page., to

Views: 5375

Reply to This

Replies to This Discussion

OK thanks

It's possible there may be some conflict with other scripts. The one I use works fine, but it's just on one page, nowhere else.

can someone show me a site its working on so i can figure out why o=its not working on mine?

Bernard posted the link above, but it looks like he uninstalled it. You can see mine here, but it's not the same code.

Hmm. Actually it is the same code, but there's another part missing.

can u look ast my site www,.dreadlockssite.com see if u can figure out why its not working i do see some of the fb divs wheni  examine the ci[ode but not sure im seeing them all

let me try the code on my other site

not working on  either site

whats wriong/

from the code it should be pretty simple it just adds the divs below the texteditor

but for some reason i think theres got to be code missing that inserts the cintent into the divs..right?

You can find the entire code here, but if you want to use it for a page, you have to insert different parts of the code in certain fields. Jen outlines how it's done in this discussion at her site.

ok i knew this had to be incomplete haha i knew it wasnt making sense

ok

im still not getting this i think i

heres the  code i edited the way i think it should be edited

at begining of custom code so it  places the divs 1st right i have

<script type="text/javascript">
x$(document).ready(function(){
x$("div.texteditor").after('<div id="fb-root"></div><div class="fb-comments" data-href="http://www.dreadlockssite.com" data-num-posts="4" data-width="470" data-colorscheme="dark"></div>');
});
</script>

thrn  end of custom code i have

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=142545245757763";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

This goes into the page HTML:

<div id="fb-root"></div>


This goes into the Page Custom Code Box:

<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=142545245757763";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


This goes into the page HTML:

<div class="fb-comments" data-href="http://jensocial.com/page/testing-fbc" data-num-posts="2" data-width="700"></div>


Replace Jen's url with the url of the page you want the comment box to display on.

if i donrt want it on a page just forums blogs etc like this tip what do i do and why isnt itr working i think it should be working as i have it now but its not

RSS

Latest Activity

Bree replied to soaringeagle's discussion '3.0 feature request'
"I hope this feature will be added, as SE says it will really help to drive activity and allow…"
45 minutes ago

NC for Hire
Bernard Lama replied to Indrie Florin Gabriel's discussion 'Buton More Disapears'
"You are welcome Gabriel."
1 hour ago
Kos replied to Angie Fisher's discussion 'Help for a 3.0 Newbie Please....'
"Create a 2nd page and save it. Once saved a box will appear "make subtab". Check that and…"
2 hours ago
Riccardo Rossini replied to Alex's discussion 'More styling in the Design Studio'
"Alex, can you please consider this…"
2 hours ago
Riccardo Rossini replied to Riccardo Rossini's discussion 'Severe bug!' in the group The Sandbox
"Tha problem is still not solved...:(("
2 hours ago
Riccardo Rossini replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Subtables overlap the menù.."
3 hours ago
Indrie Florin Gabriel replied to Indrie Florin Gabriel's discussion 'Buton More Disapears'
"It's works, Thank you Bernard!"
3 hours ago
Melinda Orr replied to JFarrow's discussion 'Ning Emails Going to Spam?'
"Thanks Chris...will contact support to see the latest :)  "
3 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service