gagf
Member
Posts: 38
Registered: 3-25-2012
Member Is Offline
|
|
Facebook like button
Can someone help me with a piece of code to put a facebook like button up where search , memberslist, and FAQ are
I can get the button to show in the header area but don't know how to get it to show where my other links are
this is my like button code if it helps
Code: | <div class="fb-like" data-href="http://www.facebook.com/georgiagunforum" data-send="true" data-layout="button_count" data-width="450" data-show-faces="false"></div> |
|
|
gagf
Member
Posts: 38
Registered: 3-25-2012
Member Is Offline
|
|
anyone have any info that would help
|
|
vlonjat4ever
Member
Posts: 24
Registered: 9-5-2009
Location: In your HDD
Member Is Offline
Mood: Cool!
|
|
I suggest to use iframe not HTML5 becouse some old browsers not support it.
You can modify header.php
Open header.php
Find:
Code: | // 'Forum Rules'-link
if ($SETTINGS['bbrules'] == 'on') {
$links[] = '<img src="'.$imgdir.'/top_bbrules.gif" alt="'.$lang['altrules'].'" border="0" /> <a href="faq.php?page=forumrules"><font class="navtd">'.$lang['textbbrules'].'</font></a>';
} |
Add code below:
Code: | $links[] = '<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fgeorgiagunforum&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font&height=18" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:18px;" allowTransparency="true"></iframe>'; |
Save and try it.
=======================================
Another way to do this is to edit header template
Find in header template:
Code: | <td class="navtd"><font class="navtd">$searchlink $links $pluglink</font></td> |
and add iframe code like this:
Code: | <td class="navtd"><font class="navtd">$searchlink $links $pluglink <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fgeorgiagunforum&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font&height=18" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:18px;" allowTransparency="true"></iframe></font></td> |
I hope this helps you!
Francesko
|
|
gagf
Member
Posts: 38
Registered: 3-25-2012
Member Is Offline
|
|
added iframe code worked perfectly, thanks
|
|
vamsee
Experienced
Posts: 50
Registered: 1-5-2003
Member Is Offline
Mood: No Mood
|
|
iframe sucks !
here's how i did it for FB like and Google+ buttons in header
http://www.xmbforum.com/viewthread.php?tid=776489#pid1372935
1.login as admin and go to admin control panel
2. edit templates and below chose header template
3. find this code in header template :
<td class="navtd"><font class="navtd">$searchlink $links $pluglink</font>
</td>
and replace with :
<td class="navtd"><font class="navtd">$searchlink $links $pluglink</font><g:plusone size="medium"></g:plusone><script
src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="true" width="300" show_faces="false"
font="verdana"></fb:like><div id="fb-root"></div>
</td>
and save the template.
This will install Google +1 button and Facebook Like and Send buttons next to your site links and plugins(if any)
you can adjust the width="300" to suit your page width
and chose show_faces="true" if you want to show face thumbnails of those who like your pages.
|
|
vamsee
Experienced
Posts: 50
Registered: 1-5-2003
Member Is Offline
Mood: No Mood
|
|
is there any way to make this facebook like button addup all likes on all pages for each thread, instead of showing fresh like button for each page of
a thread
|
|
Aerosmith
Experienced
Posts: 26
Registered: 4-12-2002
Location: Earth
Member Is Offline
Mood: Semi-something
|
|
facebook sucks. big brother at its finest.
|
|
kuba1
XMB Project Manager
Posts: 161
Registered: 12-16-2007
Location: Here on this forum ;)
Member Is Offline
Mood: No Mood
|
|
there is no way we can make the facebook like button act that way ..... you are better off posting your question in the facebook developers forum.
|
|
vamsee
Experienced
Posts: 50
Registered: 1-5-2003
Member Is Offline
Mood: No Mood
|
|
SMF has a MOD called facebook integration, which is like XMB's facebook connect.
and it does what i said
|
|