vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Add Facebook comments to threads (https://vborg.vbsupport.ru/showthread.php?t=239023)

K!nG 12-18-2011 11:21 PM

Quote:

Originally Posted by Replicators (Post 2278721)
Hey K!ng, try this

Code:

<!-- FB Comments -->
<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=APP ID";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<h2 class="blockhead" style="padding-top:5px;"><b><span class="optiontitle">Facebook Comments</span></b></h2>
<div id="thread_tags_list" class="thread_info_block blockbody formcontrols floatcontainer">
          <div class="blockrow floatcontainer">
                <div id='tag_list_cell'>
<center><div class="fb-comments" data-href="http://www.yourdomain.com/{vb:raw thread_url}" data-num-posts="2" data-width="800" data-colorscheme="dark"></div></center>
</div>
            </div>
        </div>
<img src="clear.gif" height="10" /><br />
<!-- /FB Comments -->

Change APP ID with your app id on facebook, and change yourdomain.com with your domain, and also change data width to how wide you want it, along with color scheme to dark or light.



Hmmmm seems like its for dark themse because the comment window is black & default text for the comment is white and i am using default vbulletin theme and after posting comment its hard to read.. u can't even see fb username or anything, I have to highglit to see which user comment & what is the comment, so any suggestions on this ???

thanks
Thanks :)

Replicators 12-20-2011 12:26 AM

Quote:

Originally Posted by K!nG (Post 2278974)
Hmmmm seems like its for dark themse because the comment window is black & default text for the comment is white and i am using default vbulletin theme and after posting comment its hard to read.. u can't even see fb username or anything, I have to highglit to see which user comment & what is the comment, so any suggestions on this ???

thanks
Thanks :)

Where it says "<center><div class="fb-comments" data-href="http://www.yourdomain.com/{vb:raw thread_url}" data-num-posts="2" data-width="800" data-colorscheme="dark"></div></center>" Replace dark with light.

K!nG 12-21-2011 10:04 PM

Thanks,

That solved my issue and now everything is looking goood :)

sivaganeshk 12-24-2011 12:35 PM

Hey, are you an expert in vbulletin mod creation ?

alawee.blawee 12-25-2011 10:45 PM

its not working with me. it just shows the title but nothing shows up like the print screen.
what should I do please?

my forum's link is mriraq.com/vb

djscoop 12-25-2011 10:56 PM

Quote:

Originally Posted by alawee.blawee (Post 2280974)
its not working with me. it just shows the title but nothing shows up like the print screen.
what should I do please?

my forum's link is mriraq.com/vb

im having the same issue

Replicators 12-26-2011 02:36 AM

Try reading the last posts and find that we have corrected the problems ourselves.

alawee.blawee 12-26-2011 02:52 AM

i used the code you mentioned in reply 110 sir
it shows up perfectly but when i post nothing go to facebook at all.

hyperviperx99 12-29-2011 06:04 AM

Quote:

Originally Posted by Gemma (Post 2278297)
The Facebook Comments code has changed bigtime.

Replacing your current code with something like this should work

Code:

<!-- FB Comments -->
<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";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
    <h2 class="blockhead" style="padding-top:5px;"><span class="optiontitle">Facebook Comments</span></h2>
        <div id="thread_tags_list" class="thread_info_block blockbody formcontrols floatcontainer">
          <div class="blockrow floatcontainer">
                <div id='tag_list_cell'>
<fb:comments <link rel="canonical" href="{vb:raw thread_url}" num_posts="5" width="500"></fb:comments>
</div>
            </div>
        </div>
<img src="clear.gif" height="10" /><br />
        <!-- /FB Comments -->


Thanks Gemma! You're awesome

Where do I put the API key from here ?

MrBig 12-31-2011 03:55 AM

How can i change the width to match the thread?


All times are GMT. The time now is 02:50 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01281 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete