Topic-icon Full Ajax

Active Subscriptions:

None
11 years 9 months ago #24022 by Milad
Full Ajax was created by Milad
hi i use full ajax plugin getsite.org.ua/en/fullajax/fullajax-and-social-buttons

where i got my content to be ajaxed but JFB connect didn't work with ajaxed content only google plus / linkedin / twitter

example
www.mogaz24.com/index.php?option=com_k2&...&id=13878&Itemid=294

regards joseph
The topic has been locked.
Support Specialist
11 years 9 months ago #24029 by alzander
Replied by alzander on topic Full Ajax
Joseph,
Can you explain more about what isn't working on your site, and where we can test? I just went to your page and the Login with Facebook button and the Like button both work for me. Where should I go to test where it isn't working?

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #24039 by Milad
Replied by Milad on topic Full Ajax
hi alzander sorry when you checked the ajax plugin was disabled i re-enabled it again so you can check

the ajax plugin simply ajaxsify Joomla style of loading content
check this link
www.mogaz24.com/index.php?option=com_k2&...&id=15006&Itemid=523

you will load fine and buttons appear BUT when you click any other links the button disappear

i tried playing with the plugin order but didn't succeed in getting it to work


regards

joe
The topic has been locked.
Support Specialist
11 years 9 months ago #24043 by alzander
Replied by alzander on topic Full Ajax
Joe,
Thanks for the explanation. The problem is that the right 'tags' are being rendered into the AJAX loaded page. However, the scripts we include from Facebook, Twitter, etc, all trigger off the 'DOM Ready' signal the browser sends when the page is fully loaded. Since you're using AJAX to load the buttons, that signal isn't being re-called.

There may be a way to force the social network libraries to re-scan the page for tags like <fb:like>, etc, but I don't know how to do that off-hand. That's not part of JFBConnect as we've never seen pages load that way. So, unfortunately, I don't have a good answer for you right now on how to fix that problem, other than disabling the AJAX loading of pages or disabling the social buttons from loading within any of the AJAX areas.

Sorry for the trouble. This is something we can look into, but I'm not sure how long it would take to get an answer or if it's even possible to insert the right code just into the AJAX area of the page.

Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #24051 by Milad
Replied by Milad on topic Full Ajax
hi again i checked with the plugin developers and with facebook dev directory ..

and i found this

getsite.org.ua/en/fullajax/fullajax-and-social-buttons

developers.facebook.com/docs/reference/j...ript/FB.XFBML.parse/

but i dont know which file should i edit for JFB connect or Full ajax as am not a developer but i could try ..

so could you guide me where to start could it be at /plugins/system/jfbcsystem/jfbcsystem.php

regards joe
The topic has been locked.
Support Specialist
11 years 9 months ago #24208 by alzander
Replied by alzander on topic Full Ajax
Joe,
Very sorry for the delay in getting back to this. The first link you reference actually explains what needs to be done to modify the Full AJAX plugin to tell the social widgets to refresh themselves. I'm not sure where the code for FLAX.Html.onall is that they mention, but if they are using a system or content plugin, I'd look in their file.

If you really want to modify JFBConnect, below may help you to do so. However, please note that these changes will be erased any time you upgrade. Since we have new releases (major or bug-fix) just about every month, that could mean a lot of re-modifying code. I'd highly recommend making the change the Full AJAX people recommend in your post instead.. but if not, edit the /plugins/content/jfbccontent/jfbccontent.php file. In there, around line 279, you'll see the following:
$buttonText .= $likeText;
            $buttonText .= '</div><div style="clear:left"></div>';
Add a few lines below that so it looks like:
$buttonText .= $likeText;
            $buttonText .= '</div><div style="clear:left"></div>';
            $buttonText .= '<script type="text/javascript">FB.XFBML.parse();gapi.plusone.go();</script>';
That *should* work, but some AJAX calls don't execute the Javascript included in them. It may be necessary to use the Full AJAX method above as that may force the calling of those 2 Javascript functions to refresh the widgets.

Definitely hope that helps, and sorry again for the delay!
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #24209 by Milad
Replied by Milad on topic Full Ajax
Thanks Dears it's working fine .. like a charm :)))

ALL working fine except for twitter and Linkedin .. buttons i tried making it like this after some search i tried adjusting the line to be belike below .. i didn't work


$buttonText .= '<script type="text/javascript">FB.XFBML.parse();gapi.plusone.go();IN.parse();twttr.widgets.load();</script>';

anyideas ?

regards
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #24210 by Milad
Replied by Milad on topic Full Ajax
update now twitter works after modifying the same line by adding spaces after each semi colon

$buttonText .= '<script type="text/javascript">FB.XFBML.parse();gapi.plusone.go(); IN.parse(); twttr.widgets.load();</script>';



but still linked in .
The topic has been locked.
Support Specialist
11 years 9 months ago #24220 by alzander
Replied by alzander on topic Full Ajax
Joe,
One thing I just noticed is that you're using the JFBConnect social buttons at the top of the article and the K2 buttons at the bottom. I'd recommend going into the K2 category settings and disabling the social buttons there. Then, in JFBConnect, set the buttons to show at top and bottom if you'd like. That may clear up some Javascript issues I'm seeing as well as decrease some load time as you're re-including a lot of Javascript when the page reloads.

Finally, I'm seeing Parse tags you've added, but they don't look to be in the content plugin anymore (they're not near the social buttons). Are you trying it differently now? They could also be moved by your FulAjax script to a different place in the document.

Either way, let me know if removing the K2 buttons helps!

Thanks,
Alex
The topic has been locked.