Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • zomidaily Friend
    #193568

    Hi…

    How can I add Facebook comment at the end of every article? Would be great if you could setup as JA Fixel, build-in Facebook comment.

    Regards,
    Joseph

    Ninja Lead Moderator
    #517755

    In JA Fixel template, we add the following code which displays Facebook comment in article layout of Joomla content component. If you want to apply the same, you can open this file in template folder:

    templates/ja_template_name(default_template)/html/com_content/article/default.php

    And add following snippets:

    <?php if($tplparams->get('tpl_facebook_comment', 1)): ?>
    <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<?php echo $tplparams->get('tpl_facebook_appid', '') ? '&appId=' . $tplparams->get('tpl_facebook_appid', '') : '' ?>";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
    </script>

    <div class="fb-comments" data-href="<?php echo JUri::getInstance()->toString(array('scheme', 'host', 'port')) . $this->item->readmore_link ?>" data-num-posts="10"></div>
    <?php endif ?>

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Ninja Lead 10 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum