vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   facebook fan box (https://vborg.vbsupport.ru/showthread.php?t=285895)

Chadi 07-23-2012 11:20 PM

facebook fan box
 
I inserted the code for facebook fan box in one of the forum blocks.

Problem is that it causes the horizontal scrollbar in the site to appear. Once the FB code is removed entirely, scrollbar disappears too. Reducing the width in the code doesn't do anything odd enough. I've tried widths as small as 200.

Using this code:

Quote:

<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=";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like-box" align="center" data-href="http://www.facebook.com/talkjesus" data-width="230" data-height="480" data-show-faces="true" data-border-color="#ffffff" data-stream="false" data-header="false"></div>

Chadi 07-26-2012 08:06 PM

Would appreciate help on this. Thanks

ForceHSS 07-26-2012 09:05 PM

HTML or php what one did you pick

Chadi 07-26-2012 09:12 PM

I chose html since there is no php in the code

Chadi 08-13-2012 01:13 PM

Can someone please assist me on this? Thank you

ForceHSS 08-13-2012 03:18 PM

I know there is no php in it but I am sure there is a php version

Lynne 08-13-2012 03:46 PM

I can tell you right off the bat that that code will cause issues on your site if you are also using Facebook Connect. You cannot have two tags with the same id on a page.

Chadi 08-18-2012 03:26 PM

Thanks Lynne. Any way to work around this?

Lynne 08-18-2012 03:50 PM

Just change the id on this snippet. That may mean you need to write some custom css since there may be css written for that id already.

I just tried your code on my test site and I do not get a scroll bar at all. Can we get a link to see the problem on your site?

Chadi 08-18-2012 04:07 PM

<a href="http://www.talkjesus.com/forum.php" target="_blank">http://www.talkjesus.com/forum.php</a>

Problem fixed. (Thanks Lynne)

Changed

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

To

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


All times are GMT. The time now is 08:40 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.01080 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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