test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • 321fly Friend
    #179920

    Hi, when trying to add Facebook Like Box via Custom HTML module nothing appears. Am I doing right adding this to plugins/system/jat3/jat3/base-themes/page editing file default.php
    Tried both ways: adding js-code before </body> and after <body>

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

    That I used in CustomHTML
    <div class="fb-like-box" data-href="http://www.facebook.com/mypage" data-width="250" data-show-faces="true" data-stream="true" data-header="false"></div>

    According to video how to it must work. However on my Nex nothing appears. What is wrong?

    Maybe it is not the default.php I should add java-script?

    Ninja Lead Moderator
    #464302

    <em>@321fly 334383 wrote:</em><blockquote>plugins/system/jat3/jat3/base-themes/page editing file default.php</blockquote>

    This is wrong way. Please follow my suggestion as below:
    +Create new file facebook_like.js in templates/ja_nex/js

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

    + Go to Admin site->Extensions->Template Manager->Edit JA_Nex – Default->Layouts Tab->Edit Default->Add this script below “<!–Extra css load for this layout–>”
    <blockquote>
    <!–Extra css load for this layout–>
    <scripts>
    <file>js/facebook_like.js</file>
    </scripts>
    </blockquote>
    + Add custom HTML module with script

    <div id="fb-root"></div>
    <div class="fb-like-box" data-href="http://www.facebook.com/mypage" data-width="250" data-show-faces="true" data-stream="true" data-header="false"></div>

    321fly Friend
    #464377

    Thanx Ninja Lead, it helped.
    Is it the basic way to place social widgets FOR ALL JA template? I mean creating .js file in ja_nex/js
    I am gonna do same with Twitter.
    Could you pls explain how can I use/activate module positions User-1, User-2 etc. in Nex template
    or if there is a tutorial for adding/copying new module positions in Nex

    Ninja Lead Moderator
    #464513

    You can easy to add more position on JA Template, if you need to add middle position read more this link

    <blockquote>Go to Admin site->Extensions->Template Manager->Edit JA_Nex – Default->Layouts Tab->Edit Default->add new position</blockquote>

    And make new module with position just added above.

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

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

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