XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Facebook like button
gagf
Member
***




Posts: 38
Registered: 3-25-2012
Member Is Offline


[*] posted on 4-3-2012 at 11:34 PM
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>
View user's profile View All Posts By User
gagf
Member
***




Posts: 38
Registered: 3-25-2012
Member Is Offline


[*] posted on 4-6-2012 at 01:10 AM


anyone have any info that would help
View user's profile View All Posts By User
vlonjat4ever
Member
***




Posts: 24
Registered: 9-5-2009
Location: In your HDD
Member Is Offline

Mood: Cool!

[*] posted on 4-6-2012 at 01:06 PM


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&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;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 &nbsp; <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fgeorgiagunforum&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;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
View user's profile Visit user's homepage View All Posts By User
gagf
Member
***




Posts: 38
Registered: 3-25-2012
Member Is Offline


[*] posted on 4-7-2012 at 03:08 AM


added iframe code worked perfectly, thanks
View user's profile View All Posts By User
vamsee
Experienced
***


Avatar


Posts: 50
Registered: 1-5-2003
Member Is Offline

Mood: No Mood

[*] posted on 4-18-2012 at 04:11 PM


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.






Life is taxing, and death is relaxing
Astrology in Modern World
View user's profile Visit user's homepage View All Posts By User
vamsee
Experienced
***


Avatar


Posts: 50
Registered: 1-5-2003
Member Is Offline

Mood: No Mood

[*] posted on 5-9-2012 at 03:56 PM


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



Life is taxing, and death is relaxing
Astrology in Modern World
View user's profile Visit user's homepage View All Posts By User
Aerosmith
Experienced
***




Posts: 26
Registered: 4-12-2002
Location: Earth
Member Is Offline

Mood: Semi-something

[*] posted on 5-10-2012 at 03:05 AM


facebook sucks. big brother at its finest.
View user's profile Visit user's homepage View All Posts By User
kuba1
XMB Project Manager
*********




Posts: 161
Registered: 12-16-2007
Location: Here on this forum ;)
Member Is Offline

Mood: No Mood

[*] posted on 5-14-2012 at 09:12 PM


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.



Hit this link often (Part of the XMB forum marketing campaign):

http://www.forummatrix.org/show/XMB

Testing the Signature Changing Code
View user's profile Visit user's homepage View All Posts By User
vamsee
Experienced
***


Avatar


Posts: 50
Registered: 1-5-2003
Member Is Offline

Mood: No Mood

[*] posted on 5-16-2012 at 07:55 PM


SMF has a MOD called facebook integration, which is like XMB's facebook connect.
and it does what i said



Life is taxing, and death is relaxing
Astrology in Modern World
View user's profile Visit user's homepage View All Posts By User

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 36.8% - SQL: 63.2%]