SMF Support > SMF 2.0.x Support

Help with facebook share button

(1/2) > >>

cyberhat:
Hi every one I have a forum smf 2.0.2 have install lots of mod faceboo share,faceboo like non is working on default theme so I think since I have the code which is this
--- Code: ---function fb_share() {
if (is_single()) { ?>

<div class="fb_share">
    <a name="fb_share" type="box_count" share_url="<?php the_permalink() ?>"
      href="http://www.facebook.com/sharer.php">Share</a>
    <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
<?php }
}

add_action('thesis_hook_byline_item','fb_share');
--- End code ---
My question how can I do it manualy so that it we display on every post and topic in my forum please need help and thanks in advance

Upper-case crap removed by K@, leaving spelling, punctuation and grammar as-was

Orangine:
basically this part of the code is the sharer:

--- Code: ---<div class="fb_share">
    <a name="fb_share" type="box_count" share_url="<?php the_permalink() ?>"
      href="http://www.facebook.com/sharer.php">Share</a>
    <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
--- End code ---

you will need to insert it into Display.template.php of your current theme (or default theme if you don't have this file in your theme)

Arantor:
You might also want to check your keyboard, your Caps Lock button seems to be broken.

cyberhat:

--- Quote from: Orangine on August 04, 2012, 12:12:43 PM ---basically this part of the code is the sharer:

--- Code: ---<div class="fb_share">
    <a name="fb_share" type="box_count" share_url="<?php the_permalink() ?>"
      href="http://www.facebook.com/sharer.php">Share</a>
    <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
--- End code ---

you will need to insert it into Display.template.php of your current theme (or default theme if you don't have this file in your theme)

--- End quote ---

ok where we i put it on what line in my display.template.php

Orangine:
it depends where you want it to be displayed, need more details

Navigation

[0] Message Index

[#] Next page

Go to full version