Need to Put Facebook Like Button On Top Next to Logo

I get two codes from here -



Button „Gefällt mir“ - Soziale Plugins - Dokumentation - Facebook for Developers



but i am not able to understand where to put those 2 codes.



To see the code click on Get code and you will understand…



Please guide me. Thanks

Hi

you need to include the first part of code in main.tpl ideally right after the opening tag.



The second part is the one that shows the button, so I ghuess you have to put it in top.tpl somewhere.



Fotis

there is no body tag in main.tpl



where to put the first part of code?

hi



if you use v 3.0.x thne yes yhere is no main.tpl, you need to edit index,tpl around line 20


```php {include file=“common_templates/styles.tpl” include_dropdown=true}

{include file=“common_templates/scripts.tpl”}




{if "SKINS_PANEL"|defined}
{include file="demo_skin_selector.tpl"}
{/if}
```

Its not coming…

i have put 1 code in index.tpl and 2nd code in html bock… below cart… but not coming… but if i put both the codes toghter in html block it works but it has overlapping problem when clicked on like… any fix??

I'm trying to do the same, when I paste the facebook SDK code after the tag, I get:



Fatal error: Smarty error: [in index.tpl line 312]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 589) in /home/camping/public_html/lib/smarty/Smarty.class.php on line 1095



Is there something else I need to enable/install for this type of script?

ok i found the fox for the overlaping but plz someone tell me where to put the 2nd part of code…If i want to put it next to my logo

you need to edit top.tpl and enter the new div containing the code.






Then make a css rule like


.fblike { float:left; padding: 5px; }



for that to float it and style it the right way beside logo and insert it in the styles.css of your skin.



But that rule is depending on your skin size and style.



Fotis

I have managed to add a like button to the homepage. I used the iframe code from Facebook Developers page and I pasted in the main.tpl file of my template.

Works but under the like button there is now a huge space before the other elements on the central content of th homepage.

Anyone know how to eliminate that space?