vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Custom Pages not showing "Facebook Connect" button (https://vborg.vbsupport.ru/showthread.php?t=297263)

bzcomputers 04-16-2013 02:17 PM

Custom Pages not showing "Facebook Connect" button
 
I have some custom pages on which everything seems to work fine but the "Facebook" button will not show in the header.

When checking the page source code I see that the first line in the facebook_header template that is called is causing the element to be "hidden".


Code:

<li id="fb_headerbox" class="hidden">

Why is this line affecting my custom pages but not any of the standard vB pages when it is called.

kh99 04-16-2013 02:31 PM

I think there's a javascript file that needs to be included, which checks the user's status and makes the button visible if they're not already "connected". I don't know offhand exactly what it's called or how it gets included on the standard pages.

bzcomputers 04-16-2013 10:06 PM

Been searching for missing java or possibly css, but haven't come up with anything yet.

kh99 04-16-2013 10:10 PM

Hmm...are there any javascript errors on the page?

Can you give us a link to a page with the problem?

bzcomputers 04-16-2013 10:31 PM

no java errors.
here is a page that will not show the "Facebook" button:

http://www.cruisin.me/info/carnival/

It consistently will not show the "Facebook" button on all custom pages, but appears correctly on all vB standard pages.

-----------
Edit: These custom pages all reside outside of the forum directory, so if something in java/css is using a relative reference it probably isn't getting loaded. But I didn't find anything myself.

kh99 04-16-2013 10:42 PM

I think the facebook button that you've added at the top is interfering with the built-in one. I see these 2 warnings in the js console:

Code:

The "fb-root" div has not been created, auto-creating
FB.getLoginStatus() called before calling FB.init().


I think it might be because the new buttons call the facebook script before the html for the built-in vb button is reached. I'm not sure what to do about that - maybe try moving the js for the add buttons to be later in the code? I guess if it's a mod that will be difficult.

bzcomputers 04-16-2013 10:59 PM

Ahh, you found the conflict. Thanks.

It wasn't quite what you thought but I know where the conflict is now. The links at the top of the page are just hyperlinks to social pages with no java, so the issue wasn't there.


Lightbulb goes off... the "Facebook" connect button is not showing on ANY page that has "AddThis" social sharing code. Which for me is all custom pages, CMS articles, threads, etc - a ton of pages


Seems that anyone using AddThis on vBulletin should be seeing this issue.

-------------------------
Edit: Found some info on AddThis for asynchronous loading. Seems to have solved the conflict. Thanks again.

http://support.addthis.com/customer/...is-performance


All times are GMT. The time now is 10:27 PM.

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.01198 seconds
  • Memory Usage 1,725KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete