-
AuthorPosts
-
321fly Friend
321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 14, 2012 at 10:37 am #179920Hi, 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 15, 2012 at 10:17 am #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>1 user says Thank You to Ninja Lead for this useful post
321fly Friend321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 16, 2012 at 5:51 am #464377Thanx 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 NexNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 17, 2012 at 8:16 am #464513You 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.
-
AuthorPosts
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