Support for SMF Tricks Themes & Mods

0 Members and 1 Guest are viewing this topic.

*
Grambel
Sniffer
Adding Facebook Like button
July 27, 2014, 04:23:42 PM
How to place facebook like button like this?

Picture attached.
« Last Edit: July 27, 2014, 04:25:44 PM by Grambel »






*
Daniel
#1
Webmaster
Re: Adding Facebook Like button
July 27, 2014, 07:57:01 PM
Go to https://developers.facebook.com/docs/plugins/like-button
Put options as in the following image and change what it says "your facebook page".


Then press the button "Get code", it will open a screen, and give click to "IFRAME" and copy the code that appears.


Index.template.php (Themes/Wrap)
Find:
Code: [Select]
echo'
<div id="wrapper">
<div id="header"><div class="wrapper">
<div class="logo">
<a href="', $scripturl, '"><img src="', !empty($context['header_logo_url_html_safe']) ? $context['header_logo_url_html_safe'] : ''. $settings['images_url'] . '/'. $context['theme_variant']. '/logo.png' ,'" alt="' . $context['forum_name'] . '" /></a>
</div>';
Replace with:
Code: [Select]
echo'
<div id="wrapper">
<div id="header"><div class="wrapper">
<div class="logo">
<a href="', $scripturl, '"><img src="', !empty($context['header_logo_url_html_safe']) ? $context['header_logo_url_html_safe'] : ''. $settings['images_url'] . '/'. $context['theme_variant']. '/logo.png' ,'" alt="' . $context['forum_name'] . '" /></a>
</div>
<div id="likefb">
fb code
</div>';

You have to change "fb code" for the code you copied earlier.

Index.css (Themes/Wrap/css)
Add to the end:
Code: [Select]
#likefb
{
float: left;
margin: 13px 5px 0;
}

Regards!
*
Grambel
#2
Sniffer
Re: Adding Facebook Like button
July 28, 2014, 11:08:46 AM
Thanks, it works fine with Wrap theme logo. However, when i add another logo which is 280x50 ( wrap theme logo is 175x50 ), facebook button looks fine, but navigation menu is broken now. If i use only my custom logo without facebook button, navigation menu looks fine. What changes i should make to fix this?
*
Daniel
#3
Webmaster
Re: Adding Facebook Like button
July 30, 2014, 08:02:04 PM
Thanks, it works fine with Wrap theme logo. However, when i add another logo which is 280x50 ( wrap theme logo is 175x50 ), facebook button looks fine, but navigation menu is broken now. If i use only my custom logo without facebook button, navigation menu looks fine. What changes i should make to fix this?
sorry for didn't reply yet, I leave you this message for you do not think I will not help you, is that during the week is difficult for me give support.
*
Daniel
#4
Webmaster
Re: Adding Facebook Like button
August 02, 2014, 03:14:18 PM
Ok, it's easier than I thought.
index.css (Themes/Wrap/css)
Search:
Code: [Select]
@media screen and (min-width: 1024px)Replace for:
Code: [Select]
@media screen and (min-width: 1170px)Search:
Code: [Select]
@media screen and (max-width: 1024px)Replace for:
Code: [Select]
@media screen and (max-width: 1169px)