Using BBA with Socializer

Permalink Browser Info Environment
I have a client that is using Blocks by Ajax on their site along with my Socializer addon. They said that everything works except for the Social Share block.

Social share uses JavaScript and iframes (actually it uses the standard share code from various social media). Could the JS/iframes be causing the issue? I thought I'd look for some direction before attempting to create a BBA template that may/may not work.

Thanks in advance.

Type: Pre-Sale
Status: In Progress
SkyBlueSofa
View Replies:
JohntheFish replied on at Permalink Reply
JohntheFish
When a block loads assets with addHeader/FooterItem(), those assets are loaded with the page rather than delayed.

The most likely scenario is the page loads, the scripts execute and don't find their target DOM, the ajax completes and loads the target DOM, but the scripts have already run and hence nothing happens.

Some alternatives:

Scripts may have an alternative interface where they are initialised/reinitialised explicitly by a call.
a) Put that call in a ready handler in script tags in the DOM that is ajax loaded.
OR
b) Add a handler for the BBAX event in the script file to call the initialization code.
OR
c) Rather than use events, use a polling interface, as per the howtohttp://www.concrete5.org/documentation/how-tos/developers/improve-r... . Also have a look at the BBAX template for the Google Maps block.

d) A completely different approach is to also change the way external scripts are loaded by putting the <script> </script> at the end of the BBAX part of the view (and removing them from the controller's addHeader/FooterItem().

e) Simliar to d, use script in the BBAX view to build the <script> tags.
JohntheFish replied on at Permalink Reply
JohntheFish
Hi Dave

Any update on this?

concrete5 Environment Information

# concrete5 Version
5.6.3.2

# concrete5 Packages
Ads for Page List+ (0.0.3.2), Attribute Displayer (1.0.1), Auto-Nav Pro (1.5.5), Blocks by AJAX (2.3.0.3), Bootstrap (3.1.1.4), Bootstrap Buttons (3.0.0.2), Bounce Box (1.0.2.2), Cache Vac Job (1.1.1), Cache Warmer Job (1.0), Clicky Web Analytics (1.3.2), Comments Moderation (2.0.2), External Link Tracking (5.5.0.0.4.3), Extreme Clean (1.0), Facebook Comments (1.4), Facebook Stream (1.0), Fancybox links (1.0), Favorites (1.6.0), FlexJob Scheduler (1.0.4), FlexSlider (2.2.0.5), Force Single Sublevel (1.0.1), Geocode (5.5.0.0.2), Goal Progress (1.0), Happy Cursor (1.1), Hardcoded Select Attribute (0.9), Infinite Scroller (5.6.0.0.3), Instant Search (1.1), JWPlayer Basic Video Player (1.363), Login (1.1.1), Mailing List (2.54), Maps for Page List+ (0.9.1.4), Oembed (1.2.0.1), Page Auto Redirect (2.0), Page List+ (5.6.0.0.0.5.6.2), Page List Thumbnail Views (5.6.0.0.0.5), Page Properties (1.0.1), Page Selector Attribute (1.1), Popular Pages (5.5.0.0.3.4), Popup Login (1.0.5), Pro Events (11.1.0), Pro Forms (7.5.9), Pro Tabs (1.1.1), QuizMaker Pro (1.4), Recent Comments (1.0), Register User Pro (1.3.15), Reviews (1.4.1), Reward (1.4.3), Search Experience Optimization (5.5.0.0.1.8), Socializer (5.6.0.0.6.1.6), Stack Randomizer (1.2.0), Stacks Search (1.0.3), Star Rating (2.0), The Void theme (1.0), Up Down Vote Lister (1.2.5), Users' Pages (1.0.1), YouTube Background FREE (1.3.3).

# concrete5 Overrides
blocks/page_list_plus, blocks/bb_fancybox_links, blocks/image, elements/header_search, elements/header_required.php, elements/form, elements/form.php, js/fancyboxsetup.js, libraries/view.bak.php, models/ProQuizUserUpdater.php, models/SkybluesofaPageListPlusMap.bak.php

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - On - In all cases.
Full Page Cache Lifetime - Every 15000 minutes.

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.4.27

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, ffmpeg, filter, ftp, gd, gettext, hash, iconv, imap, json, libxml, mbstring, mcrypt, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, zip, zlib.

# PHP Settings
max_execution_time - 120
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 1024M
post_max_size - 1024M
sql.safe_mode - Off
upload_max_filesize - 512M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 10000000
pcre.recursion_limit - 10000000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.