Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Ricky. on October 15, 2011, 09:50:15 AM

Title: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on October 15, 2011, 09:50:15 AM
Advance Facebook Like button with SEND button and Open Graph Support
by Ricky. |  Mod Support (http://ifandbut.com/talk/index.php?topic=50.0) | My Other Mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=34192)
For SMF 2.0 RC5, 2.0, 2.0.1



Download this MOD | View More Details (http://custom.simplemachines.org/mods/index.php?mod=3153)


Description


This Mod allows you to add Facebook like button at prominent location on your forum along with open graph and with option to specify your own image which will be shown along with your shared link on Facebook , you can use your logo as shared image which will help you to spread your name. With Open Graph Support it lets you to use features like Facebook Insight so that you can check how many people Liked and Shared your link on facebook etc.

You may get your facebook link App ID and Admin ID here (http://developers.facebook.com/docs/reference/plugins/like/). Though it may work without it also but obtaining one is recommended.


Features




Demo


Demo can be found here -->
Webmaster Forum- ifandbut.com (http://ifandbut.com)


Installation


Simply install it via package manager.


Installation on Custom Template


This MOD need manual modification in order to function on custom themes other than default. You can use Package Parser to do the required changes. If you are unsure about it then you can ask me.


Administration


After install you can access it through Admin Panel where you can specify your own Message for Guests as well as for Members.



Customization


This MOD allows you to have basic facebook like button on every page of the website, if not on topic, clicking like button will actually submit your main Forum URL and if on topic then it will submit your TOPIC url. You can turn off in-topic LIKE button which also includes FB send button.

Changelog


0.2 - Added feature to show FB like button on each posts of given topic.
        Removed FB like button from Administration Area to avoid unnecessary facebook OG calls

0.1 - Initial release
Title: Re: Advance Facebook Like button with OpenGraph
Post by: vbgamer45 on October 15, 2011, 09:53:43 AM
Awesome idea. The open graph part is awesome being able to track likes a lot easier.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 16, 2011, 03:29:36 PM
Thank you.. actually I was doing this on my few forum from long..really interesting to see what facebook is giving to your.. OR rather.. whats its taking :P... thought to share with SMF community also. :)
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Bancherd on October 17, 2011, 09:03:40 AM
Hmm, is this mod compatible with SMF2.0.1?  I am using SMF2.0.1 and managed to install this mod while emulating  SMF2.0.

However, when I went to the configuration page, I got blank screen.  :-\

Thanks.

;D
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 17, 2011, 11:56:09 AM
It is compatible with SMF2.0.1 , I only need to modify few small things, will update.
However, you got blank screen, that may due to that mod not properly installed.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Bancherd on October 18, 2011, 06:33:37 PM
Thanks for the response, I will wait for the update then try again.  :D
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 25, 2011, 07:44:36 AM
I have updated this MOD  to work with current version of SMF as well as added option to show FB like button on each post.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: PLAYBOY on October 27, 2011, 07:41:28 PM
Do you have to have an app id to use this mod? All i want is to have a facebook share or like button for each post (not each topic but post)
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 28, 2011, 01:45:07 AM
It will work without them too but obtaining one is easy, just use your current FB ccount and shall work. That way you can see how many pages are being liked, what traffic you get from FB and what traffic you sent to FB !
Title: Re: Advance Facebook Like button with OpenGraph
Post by: PLAYBOY on October 28, 2011, 02:25:29 AM
Yeah but to get an app id you have to give your real personal info (phone number/cc number etc.) otherwise you cant get your own app id.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 28, 2011, 02:39:08 AM
Well, then I have tested it and works without using them ie. leaving all blank ..Go ahead and use it.. only thing you need to do is to enable it..
Title: Re: Advance Facebook Like button with OpenGraph
Post by: PLAYBOY on October 28, 2011, 02:55:59 AM
Yeah i am using it now. Its very very nice. Good job with it. Thank you.

The only thing that kinda bothered me is that there is no option to disable the like button on the top right corner of each page. That button covers my search bar.

Also i think it would be helpful to have the options in permissions for each membergroup.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 28, 2011, 03:25:03 AM
hmm..

You can customize css so that it won't overlap with each other.  Hmm.. I will consider adding option to disable top button in future update.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: PLAYBOY on October 28, 2011, 03:48:52 AM
Can you help me out on that? Like what code i need to adjust and what should i do? I am not good at those.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 28, 2011, 04:37:00 AM
Link to your site ?
Title: Re: Advance Facebook Like button with OpenGraph
Post by: PLAYBOY on October 28, 2011, 04:56:55 AM
I can give you any file you need. Just ask.
I use Mineral Multicolor theme
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 28, 2011, 05:52:24 AM
PM me your site link if you have privacy concern.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Bancherd on October 28, 2011, 10:22:29 AM
Works great on my forum!  Thank you.  :)

My earlier problem must be due to my host's configurations.
Title: Re: Advance Facebook Like button with OpenGraph
Post by: PLAYBOY on October 28, 2011, 12:56:25 PM
Quote from: Ricky. on October 28, 2011, 05:52:24 AM
PM me your site link if you have privacy concern.

I actually do. I cant give my site address. Please understand.
But i can put any file  or a screenshot here
Title: Re: Advance Facebook Like button with OpenGraph
Post by: Ricky. on October 29, 2011, 12:51:54 AM
Well, then I suggest you to remove top button code.. its simply matter of removing one line..
In index.template.php
Find :
<fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like>
Remove it and make sure you don't touch anything else.


@Bancherd
I am glad you liked it.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on October 29, 2011, 06:46:09 AM
Some of my members say buttons mess up their view in the forum/messages. I think they use IE8 or maybe IE7.
I think moving the butons to the right corner of signature area would solve this problem. How can i do that?

Actually you know what would solve almost all of my problems? Putting an option for each member in their profile to enable/disable the buttons
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on October 29, 2011, 02:26:17 PM
It works fine in IE6 even. I have tested it.
Looks like some post content conflict .

Care to ask them what layout issue they are facing..

Anyways, you can show it sig area.. like, find following in your Display.template.php  , I am assuming you have mod already installed..
//Advance fb like with opengraph
if(!empty($modSettings['e_fb_enable']) && !empty($modSettings['e_fb_topic'])) {
if ($message['id'] == $context['first_message'])
echo '<div style="float:right;margin:5px">
<fb:like href="',$scripturl ,'?topic=',$context['current_topic'],'.0" send="true" width="300" show_faces="true" font=""></fb:like>
</div>';
elseif (!empty($modSettings['e_fb_post']))
echo '<div style="float:right;margin:5px">
<fb:like href="',$message['href'],'" send="true" width="300" show_faces="true" font=""></fb:like>
</div>';
}//Advance Fb like with OG


Cut it from there and paste it just before following :
// Show the member's signature?

Let me know if this position is good !
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: zebono2 on October 29, 2011, 07:49:58 PM
i cant find
      // Show the member's signature?
or
      // the upshrink image, right-floated

index.template.php

<?php
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2011 Simple Machines
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.0
 */

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''>
<head>'
;

// The ?fin20 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/index'$context['theme_variant'], '.css?fin20" />';

// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7''ie6''webkit') as $cssfix)
if ($context['browser']['is_' $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/'$cssfix'.css" />';

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/rtl.css" />';

// Here comes the JavaScript bits!
echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?fin20"></script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/theme.js?fin20"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
var fPmPopup = function ()
{
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' 
'''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>'
;

echo '
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
<meta name="keywords" content="' 
$context['meta_keywords'] . '" />' '''
<title>'
$context['page_title_html_safe'], '</title>';

// Bad Behavior Start
if (function_exists('bb2_insert_head')) {
  
bb2_insert_head();
}
// Bad Behavior End
// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="'
$context['canonical_url'], '" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="'
$scripturl'?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - '$txt['rss'], '" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];

echo '
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo !empty(
$settings['forum_width']) ? '
<div id="wrapper" style="width: ' 
$settings['forum_width'] . '">' '''
 <div id="header">
  <div id="lft-head">
 <div id="rit-head">
  <div id="userarea" class="smalltext">'
;
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
  echo '
<div id="my-avatar" class="clearfix">'
$context['user']['avatar']['image'], '</div>';
 echo '
 <ul class="reset">
 <li><b>'
$txt['hello_member'], ' '$context['user']['name'], '</b></li>';
  echo '
 <li><a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a></li>
 <li><a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a></li>
  <li>'
$context['current_time'],'</li>
 </ul>'
;
 }

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo sprintf($txt['welcome_guest'], $txt['guest_title']);
echo '
  <script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/sha1.js"></script>
  <form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" class="userlog"  size="10" />
<input type="password" name="passwrd" class="userlog"  size="10" />
<input type="submit" value="'
$txt['login'], '" class="button_submit" />
<input type="hidden" name="hash_passwrd" value="" />
</form>'
$context['current_time'],'<br />';
  }
  echo '
  </div>'
;

  // Show a random news item? (or you could pick one from news_lines...)
  if (!empty($settings['enable_news']))
  {
 echo '<div id="news">
<br /><b>'
$txt['news'], ':</b> '$context['random_news_line'], '</div>';
  }
echo '
 <div id="logo">
<a href="'
$scripturl'">', empty($context['header_logo_url_html_safe']) ? '<img src="'$settings['images_url']. '/theme/logo.png" alt="' $context['forum_name'] . '" title="' $context['forum_name'] . '" />' '<img src="' $context['header_logo_url_html_safe'] . '" alt="' $context['forum_name'] . '" title="' $context['forum_name'] . '" />''</a>
 </div>'
;
 echo '
 </div>
  </div>
</div>
  <div id="navibar">
  '
,template_menu(),'
 </div>
<div id="bodybg">'
;
 theme_linktree();
}

function 
template_body_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
  </div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footerarea">
 <div id="footer_section">
  <div class="frame">
<ul class="reset">
<li class="copyright">'
theme_copyright(), '</li>
<li><strong>MyTheme</strong> by, <a href="http://www.traxsdownload.com/" target="_blank" class="new_win" title=""><span>Trax</span></a></li>
<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="'
$txt['valid_xhtml'], '"><span>'$txt['xhtml'], '</span></a></li>
'
, !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' $scripturl '?action=.xml;type=rss" class="new_win"><span>' $txt['rss'] . '</span></a></li>' '''
<li class="last"><a id="button_wap2" href="'
$scripturl '?wap2" class="new_win"><span>'$txt['wap2'], '</span></a></li>
</ul>'
;

if (
$modSettings['badbehavior_display_stats']) {
if (!function_exists('bb2_insert_stats')) {
global $sourcedir;
require_once($sourcedir '/bad-behavior/BadBehavior-SMF.php'); }

 
bb2_insert_stats(); 
}
// Show the load time?
if ($context['show_load_time'])
echo '
<p>'
$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

echo '
   </div>
</div>
 </div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

// Reverse the linktree in right to left mode.
if ($context['right_to_left'])
$context['linktree'] = array_reverse($context['linktree'], true);

echo '
<div class="navigate_section">
<ul>'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
$i 1;
$count count($context['linktree']);
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';

// Don't show a separator for the last one (RTL mode)
if ($link_num != count($context['linktree']) - && $context['right_to_left'])
echo '«&nbsp;';

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

if($count == $i)
echo'<h1 style="font-size: 1em; display: inline;">';

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] .'</span>';

if($count == $i)
echo'</span>';
$i++;

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - && !$context['right_to_left'])
echo '&nbsp;»';

echo '
</li>'
;
}
echo '
</ul>
</div>'
;

$shown_linktree true;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

echo '
<div id="topnav">
<ul>'
;

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_'
$act'">
<a class="'
$button['active_button'] ? 'active ' '''" href="'$button['href'], '"', isset($button['target']) ? ' target="' $button['target'] . '"' '''>'$button['title'], '</a>';

if (!empty($button['sub_buttons']))
{
echo '
<ul>'
;

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="'
$childbutton['href'], '"', isset($childbutton['target']) ? ' target="' $childbutton['target'] . '"' '''>'$childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' '''</a>';

// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>'
;

foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a href="'
$grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' $grandchildbutton['target'] . '"' '''>'$grandchildbutton['title'], '</a>
</li>'
;

echo '
</ul>'
;
}

echo '
</li>'
;
}
echo '
</ul>'
;
}
echo '
</li>'
;
}

echo '
</ul>
</div>'
;
}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$strip_options = array())
{
global $settings$context$txt$scripturl;

if (!is_array($strip_options))
$strip_options = array();

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a ' . (isset($value['active']) ? 'class="active" ' '') . 'href="' $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a>';
}

// No buttons? No button strip either.
if (empty($buttons))
return;

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
, !empty($direction) ? ' align_' $direction '''"', (empty($buttons) ? ' style="display: none;"' ''), (!empty($strip_options['id']) ? ' id="' $strip_options['id'] . '"'''), '>
<ul>
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;
}

?>



where do i put the code

if(!empty($modSettings['e_fb_enable']) && $context['current_action'] != 'admin'){
// Advance FB like with OG
echo '<span style="float: right; margin-top: 10px;"><div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'',(empty($modSettings['e_fb_appId'])?'your app id':$modSettings['e_fb_appId']),'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>
<fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>';
} // Advance FB like with OG

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on October 30, 2011, 01:28:35 AM
Thanks Ricky. Layout issues has been solved once the buttons moved to signature area.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on October 30, 2011, 08:06:22 AM
zebono2,
That code has to be there in header section of your index.template.php , it will work in 70% as generally are based off curve..

Whats your theme ?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on October 31, 2011, 02:20:49 PM
Im desperately in need of adding an option for members to disable these buttons. Please somebody help me about it.

I really dont want to uninstall this mod just because few of my VIP members are having layout issues. (I dont even know what kind of issues exactly because they are very old people and they know nothing about computers. They cant even send a screenshot for me to understand the issue.)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 01, 2011, 03:45:44 AM
Adding option for each member will need significant change.
Well, better is to see those member's past few post and see if it is actually causing any issue, also try to open your forum in older browser like IE6 / IE 7  to check if its something related to browser. Or else we can try some new location. I am not short in ideas !
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 01, 2011, 12:48:41 PM
How about putting an option for membergroup permissions? Would that be hard to do? Because at least i can disable it for those people.

Also we can try to put the buttons right under the member info on the left side panel.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 02, 2011, 07:27:18 AM
Ya, for membergroup, that won't be that hard but can't do any soon however,

For now , you can put all that code befpre <span class="botslice">

I have not check the location but should work good at that place.. also, I have another position if you want..try this.. first !
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 02, 2011, 12:41:22 PM
QuoteFor now , you can put all that code befpre <span class="botslice">

I cant find this code in index.template.php
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 02, 2011, 03:32:54 PM
Its in Display.template.php
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 02, 2011, 03:39:21 PM
But there are many of this code in display.template.php <span class="botslice">
Plus which code i should put before it?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 02, 2011, 03:58:04 PM
You have to put this code :
//Advance fb like with opengraph
if(!empty($modSettings['e_fb_enable']) && !empty($modSettings['e_fb_topic'])) {
if ($message['id'] == $context['first_message'])
echo '<div style="float:right;margin:5px">
<fb:like href="',$scripturl ,'?topic=',$context['current_topic'],'.0" send="true" width="300" show_faces="true" font=""></fb:like>
</div>';
elseif (!empty($modSettings['e_fb_post']))
echo '<div style="float:right;margin:5px">
<fb:like href="',$message['href'],'" send="true" width="300" show_faces="true" font=""></fb:like>
</div>';
}//Advance Fb like with OG

Currently I can't tell you exact location as I am not on computer currently. .. though you can try experimenting meanwhile...
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 02, 2011, 04:11:11 PM
I just tried now but it keeps giving me syntax error.
I think an option in the permission or another absolute solution would be better.

I really appreciate you try to help though.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ventic on November 03, 2011, 01:46:48 AM
Quote from: PLAYBOY on November 02, 2011, 04:11:11 PM
I just tried now but it keeps giving me syntax error.
I think an option in the permission or another absolute solution would be better.

I really appreciate you try to help though.
that happens to me too

lot of errors
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 03, 2011, 03:29:30 AM
Looks like this position is not very good .. is it ?

Anyways,  a new position you can try :
in Display.template.php
Find : <hr class="post_separator" />';

Replace with
';
//Advance fb like with opengraph
if(!empty($modSettings['e_fb_enable']) && !empty($modSettings['e_fb_topic'])) {
if ($message['id'] == $context['first_message'])
echo '<div class="windowbg" style="text-align:center;">
<span class="topslice">
<span></span>
</span>
<fb:like href="',$scripturl ,'?topic=',$context['current_topic'],'.0" send="true" width="500" show_faces="true" font=""></fb:like>
<span class="botslice">
<span></span>
</span>
</div>';
elseif (!empty($modSettings['e_fb_post']))
echo '<div class="',$message['alternate'] == 0 ? 'windowbg' : 'windowbg2','" style="text-align:center">
<span class="topslice">
<span></span>
</span>
<fb:like href="',$message['href'],'" send="true" width="500" show_faces="true" font=""></fb:like>
<span class="botslice">
<span></span>
</span>
</div>';
}//Advance Fb like with OG
echo '
<hr class="post_separator" />';

[/code]

Also not to forget to remove this code :

//Advance fb like with opengraph
if(!empty($modSettings['e_fb_enable']) && !empty($modSettings['e_fb_topic'])) {
if ($message['id'] == $context['first_message'])
echo '<div style="float:right;margin:5px">
<fb:like href="',$scripturl ,'?topic=',$context['current_topic'],'.0" send="true" width="300" show_faces="true" font=""></fb:like>
</div>';
elseif (!empty($modSettings['e_fb_post']))
echo '<div style="float:right;margin:5px">
<fb:like href="',$message['href'],'" send="true" width="300" show_faces="true" font=""></fb:like>
</div>';
}//Advance Fb like with OG
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 03, 2011, 08:24:44 AM
This is pretty good. I personally liked it a lot. But some of my members who have slow internet connections complaint about buttons slowing down the load time for each page. So i think an option in permission section or an option in every members profile would be the best for all the problems. Maybe it could be added in the next version (update).

Once i get the above option (or in a new update) i will translate this mod to Turkish. You have my word.

Thank you for all your help.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 03, 2011, 08:57:17 AM
Ya, it does slow down as for every post it needs to connect to FB server, you can disable for each post. However, in next update I will try to include Group permission for this MOD.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ventic on November 03, 2011, 09:00:05 AM
waiting your update
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 03, 2011, 12:41:12 PM
Is there any solution for the scroll bar issue yet?
http://www.simplemachines.org/community/index.php?topic=457963.msg3199714#msg3199714
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 03, 2011, 02:10:59 PM
Well, I gave it a good look, looks like FB creates an invisible iframe or something that causes that scroll bar, though not yet clear, once I get to know exact reason, I will fix it. Will update it here.. I guess there is not any urgency !
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 03, 2011, 02:17:34 PM
Time for an update... :)
FYI, If you put all the lines here, i will translate them to Turkish so you can add that to the update.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Manu.G on November 07, 2011, 03:32:54 AM

I installed the mod and everythings works fine the only problem I've is Internet Explorer :(

On the forum index the "Like" button isn't to see, I add the button manual because I use a copy of the Core-Theme and
modified it. I think the problem with IE are the java-scripts, there a way to much on my forum.

When I'm in a topic than the "Like" button upper the date is to see, but not when I'm on the Portal (SimplePortal 2.3.3)
or on Boradindex. Google Chrome and Mozilla showing everything perfect :)

Is there a way to solve the problem?


Next question :)
I haven't enabled "Show FB like button on each post" and it works fine, but when the topic is having more than 1 page
the "Like" button is to see on the first post of every page of the topic. Is there a way to change it?


Sorry, I'm not an English person and don't know to explain it better :)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 07, 2011, 03:57:18 AM
The upper part is important  as it contains call to FB Like script, so if on any page, upper script is not properly included, Like button won't work on rest of the page.

Regarding Like button on first post of second page, I had noticed it however, little short on time , will look into some work around.

So, now I have following to dos ..
1. Fix scroll bar issue,
2. On first post for second page, change link to actual post, not to whole topic.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Manu.G on November 07, 2011, 09:23:20 AM
The script are all included, and I think it's not a problem of the mod, it's a problem with my forum.
Could be there a way to much javascript installed and this is causing IE problems. I don't know, could be
possible.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 07, 2011, 10:40:22 AM
Excess of anything is bad.. :)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 07, 2011, 11:07:03 AM
Quote
So, now I have following to dos ..
1. Fix scroll bar issue,
2. On first post for second page, change link to actual post, not to whole topic.

Option for permission settings?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 07, 2011, 01:28:25 PM
Alright ..

1. Fix scroll bar issue,
2. On first post for second page, change link to actual post, not to whole topic.
3. Group based permission to turn it on / off.

I hope I get time soon !
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on November 07, 2011, 01:41:38 PM
"FYI, If you put all the lines here, i will translate them to Turkish so you can add that to the update."

The reason i want you to list all the lines is because i dont wanna just translate what i could find then it will be half ass job. I remember translating many mods which has lot more lines then the ones in language.modification.php
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: stang7043 on November 11, 2011, 10:27:40 AM
Any chance this will be coded for 1.1.15 ? Id really like to add the like button for each post and not just for the entire thread. Any help would be appreciated.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: berntan on November 12, 2011, 10:39:23 AM
hi ricky,

my facebook like button is not showing in my theme.
but it's showing in the default theme. i can't find anything wrong.
what's the problem?
pls advice. tks
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 12, 2011, 10:46:21 AM
Hi Berntan:

You need to make manual edit in your custom theme, somewhere in header (at your desired location), add following code:
if(!empty($modSettings['e_fb_enable']) && $context['current_action'] != 'admin'){
// Advance FB like with OG
echo '<span style="float: right; margin-top: 10px;"><div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'',(empty($modSettings['e_fb_appId'])?'your app id':$modSettings['e_fb_appId']),'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>
<fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>';

As I guess only that one is missing.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: berntan on November 12, 2011, 10:53:08 AM
in index.template.php?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: berntan on November 12, 2011, 11:13:17 AM
hi ricky,

i can't add within header. error occurs.
i had pm u.

thanks mate
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 12, 2011, 12:42:36 PM
I can't give you exact location as you have custom theme, code I gave you can be placed anywhere in index.template.php (but should be in header). 
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Dan_y2k on November 22, 2011, 03:20:58 PM
Looks cool, probably WILL try this.

May I suggest (if no one suggested it yet) to move the Like & Send button to the left of the "Report to moderator" & "(IP) Logged"? Or better yet, right above them!

1 question though, can you make it language specific? I mean in the mod settings, Admin will have a text field called "Language", and he can insert his desired language? Like he_IL, in my case?

Last thing would be RTL support... Instead of floating it to the right, float it to the left...

Like I said, probably will test this, even though I prefer these suggestions will be implemented first. :)

Good job, and thanks for this mod. :)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on January 04, 2012, 05:19:34 PM
1- I dont have the buttons appear on the homepage. But everytime the homepage load, it also sends/inquires connect.facebook.net

2- There is still a big blank space on the right side of the forum cause by this mod. I think this was the scroll bar issue and it still continues.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on January 05, 2012, 01:09:54 PM
1- I dont have the buttons appear on the homepage. But everytime the homepage load, it also sends/inquires connect.facebook.net
Because   you theme may have missed code required to show button on top. Was there any install error for theme you are using ?

2- There is still a big blank space on the right side of the forum cause by this mod. I think this was the scroll bar issue and it still continues.
Because FB need more space then they promise to use in this widget , I have found fix for it, may need some code fixes , will do it soon.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on January 05, 2012, 04:57:33 PM
QuoteBecause   you theme may have missed code required to show button on top. Was there any install error for theme you are using ?

I dont think so. Bu i dont remember. Its been a long time. I may have fix the error and then install the mod. But i never force to install when the error is still there.

QuoteBecause FB need more space then they promise to use in this widget , I have found fix for it, may need some code fixes , will do it soon.

Oh please. Thank you.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 08, 2012, 04:34:12 PM
yeah, It does not show up on my test forum at all.And i searched everywhere for it.everything is enabled,but no show.
Version Information:
Forum version: SMF 2.0.1
Theme:Insidious by TD-Forums.
Modification Packages:
   Mod Name                                                Version    
1.    AjaxChat Integration                                3.2.2b
2.    SMF 2.0.1 Update                                            1.0
3.    Advance Facebook Like with OpenGraph    0.2    
4.    Soundcloud                                                    1.0    
5.    YouTube BBCode                                            2.6    
6.    New Hooks                                                    0.1    
7.    Quick Translation                                            0.5

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 08, 2012, 04:45:50 PM
I just read this,

Installation on Custom Template
This MOD need manual modification in order to function on custom themes other than default. You can use Package Parser to do the required changes. If you are unsure about it then you can ask me.

Does this mean I have to change files? , if so why cant this just be included in the package?..I'm not into changing files and such. It's best to just upload and click the install button and have it work properly,In my opinion. So in other words, It does not work? It does not make sense to sit here and change everything when It's stated it works..
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on January 09, 2012, 12:28:06 AM
Well, not really true, I need to modify this, just during installation select your custom theme also, in 90% cases, will be installed easily on other themes too.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 09, 2012, 03:10:20 PM
Quote from: Ricky. on January 09, 2012, 12:28:06 AM
Well, not really true, I need to modify this, just during installation select your custom theme also, in 90% cases, will be installed easily on other themes too.

I don't understand what you mean by " just during installation select your custom theme also ". does this also conflict with other mods that are similar to what this mod does?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on January 09, 2012, 11:47:39 PM
In version 2.0.x of SMF, it also install modification to custom themes automatically but you have to manually select it (Given that your custom theme is not very different from default theme in terms of page code.)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 12:03:34 PM
Quote from: Ricky. on January 09, 2012, 11:47:39 PM
In version 2.0.x of SMF, it also install modification to custom themes automatically but you have to manually select it (Given that your custom theme is not very different from default theme in terms of page code.)

" but you have to manually select it ".....How do I do this? I'm using the Insidious designed by TD-Forums theme.

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 12:35:22 PM
Admin > Package Manager > Advanced.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 01:04:20 PM
Quote from: mashby on January 10, 2012, 12:35:22 PM
Admin > Package Manager > Advanced.

Quote from: krash661 on January 08, 2012, 04:34:12 PM
yeah, It does not show up on my test forum at all.And i searched everywhere for it.everything is enabled,but no show.
Version Information:
Forum version: SMF 2.0.1
Theme:Insidious by TD-Forums.
Modification Packages:
   Mod Name                                                Version    
1.    AjaxChat Integration                                3.2.2b
2.    SMF 2.0.1 Update                                            1.0
3.    Advance Facebook Like with OpenGraph    0.2    
4.    Soundcloud                                                    1.0    
5.    YouTube BBCode                                            2.6    
6.    New Hooks                                                    0.1    
7.    Quick Translation                                            0.5

Mashby,I've already tried that.see you don't understand what's going on and you want to jump to conclusions and discipline me.

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 01:09:09 PM
Discipline you? OK. Not sure I'm doing that. Moderating maybe.

Advance Facebook Like with OpenGraph    0.2   
Below #7, do you see an Advanced link at all?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 01:16:23 PM
Quote from: mashby on January 10, 2012, 01:09:09 PM
Discipline you? OK. Not sure I'm doing that. Moderating maybe.

Advance Facebook Like with OpenGraph    0.2   
Below #7, do you see an Advanced link at all?
mashby,Do you want to log im my test forum as admin so you understand what's going on,that why this could be cleared up cause im being miss understood or I'm not understanding on all aspects ??
And this miss understanding is escalating into issues,im not having an attitude at all or trying to
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 01:20:50 PM
Sure, PM me some login credentials. Thanks.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 02:00:10 PM
You have to add your Facebook IDs in the Miscelleneous settings.
Admin > Configuration > Modification Settings.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 02:05:10 PM
Quote from: mashby on January 10, 2012, 02:00:10 PM
You have to add your Facebook IDs in the Miscelleneous settings.
Admin > Configuration > Modification Settings.
does the emulate 2.0rc3 effect any other mods that are not compatible with that version or lower,all my mods are 2.0.1 and some of them only function on 2.0.1 and  are not compatible with any versions lower than 2.0.1 ?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 02:08:14 PM
Quote from: mashby on January 10, 2012, 02:00:10 PM
You have to add your Facebook IDs in the Miscelleneous settings.
Admin > Configuration > Modification Settings.
and also,where's the buttons?they are not showing anywhere?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 02:12:55 PM
Emulate version doesn't affect installed mods. It just tells Package Manager to think of the installed software as the version in the field. You'll also notice a Revert link. To answer your question about it not showing up, please read the message you quoted.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 02:15:42 PM
Quote from: mashby on January 10, 2012, 02:12:55 PM
Emulate version doesn't affect installed mods. It just tells Package Manager to think of the installed software as the version in the field. You'll also notice a Revert link. To answer your question about it not showing up, please read the message you quoted.
please read below link ,it explains it should work with out all that,unless I don't understand?
http://www.simplemachines.org/community/index.php?topic=456027.msg3195840#msg3195840
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 02:32:02 PM
I'll let the mod author determine that. I have no idea.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 02:36:09 PM
Quote from: mashby on January 10, 2012, 02:32:02 PM
I'll let the mod author determine that. I have no idea.
Now you see what Ive been saying?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 02:39:57 PM
No.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 02:41:13 PM
mashby,then i found out this

" Installation on Custom Template
This MOD need manual modification in order to function on custom themes other than default. You can use Package Parser to do the required changes. If you are unsure about it then you can ask me. "


please read this conversation ,as it will show the new problem and how you miss understood what's going on and jumped on my case.

http://www.simplemachines.org/community/index.php?topic=456027.msg3246466#msg3246466
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mashby on January 10, 2012, 02:42:54 PM
I won't do that either. It's not my issue, it's yours. Thanks. You can read and understand better than I can.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 02:47:06 PM
Quote from: mashby on January 10, 2012, 02:42:54 PM
I won't do that either. It's not my issue, it's yours. Thanks. You can read and understand better than I can.
mashby,I know,thats what I was waiting for before you jumped on my case about all this.I understood.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 10, 2012, 05:03:45 PM
Quote from: Ricky. on January 09, 2012, 11:47:39 PM
In version 2.0.x of SMF, it also install modification to custom themes automatically but you have to manually select it (Given that your custom theme is not very different from default theme in terms of page code.)

Ricky, do you mean this(the below Image) when you say " but you have to manually select it  " ?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi1228.photobucket.com%2Falbums%2Fee460%2Fkrash661%2F7372cc20.png&hash=fec7b914e72b7ec00bfaae7729d722476b3f617e)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi1228.photobucket.com%2Falbums%2Fee460%2Fkrash661%2F02.png&hash=32842c397f66c763e49010a248dae3fc8b2f200f)
If so I've already tried that and it still wont work.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on January 11, 2012, 04:51:58 AM
Yes, this is what I mean. You now need to do manual changes to that theme.   See Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)
Also, please understand that we all are here volunteer, likewise mashby also tried to help you and you should be thankful to him.

I hope I am not asking too much here.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 11, 2012, 10:30:29 AM
Quote from: Ricky. on January 11, 2012, 04:51:58 AM
Yes, this is what I mean. You now need to do manual changes to that theme.   See Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)
Also, please understand that we all are here volunteer, likewise mashby also tried to help you and you should be thankful to him.

I hope I am not asking too much here.
I understand that,but that guy was trying to say i was being impatient cause i had 3 different subjects going at the same time in their proper places,then it became an issue cause i asked if i can put  codes on my site with out SMF or SMF mods...that guy didnt understand my situation and jumped to conclusions..and then it escalated cause of his lack of taking the time to read the conversations instead of assuming . He did not understand what was occurring.Then i was the one told i was being impatient and rude cause i said i could not wait for a mod to be merged when iwas told by the author " i dont know " on a time frame,I said i need these mods desperately so i cant wait for a " i dont know", that could be months as far as i know, so i asked if i can get these widgets on my site without SMF or the SMF mods. and they got pissed at that saying, Im  impatient. so honestly, i dont know.but I dont have a problem with being patient.
http://www.simplemachines.org/community/index.php?topic=465004.msg3247285#msg3247285
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on January 17, 2012, 12:15:57 AM
Just take it easy, we all here to help and even when you learn things, you can help others.

Now the mod, I hope you got it working :)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: krash661 on January 21, 2012, 03:27:10 PM
Quote from: Ricky. on January 17, 2012, 12:15:57 AM


Now the mod, I hope you got it working :)

NO , I have no knowledge in that changing files thing, so I dont bother doing that stuff... I just download and install the mods.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distante on January 31, 2012, 08:31:19 AM
Does anyone have a problem with the facebook SDK making a loop in Internet Explorer 8? I just to have this problem in joomla and fix it with the channel.html file and sending a header but I can't find the proper way to do it in smf.

And without this the mod can't function ok in Ie. =\
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on January 31, 2012, 09:59:10 AM
I can see it working in IE 8 .. where exactly you are facing problem ?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distante on January 31, 2012, 12:50:15 PM
This happen to me before in one site where I'm using joomla, the browser star to reload it self making a loop ( in here there are a topic about this: http://stackoverflow.com/questions/5640260/facebook-permissions-in-ie-causing-infinite-facebook-loop and also a lot of this in google searching "facebook internet explorer loop")

In my joomla site, I added the channel file and channel file ref in the script, also in the php the header send, (header('p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'); ) and then the problem stops, but I can't get it work in smf. I already ask where I bought my theme and confirm that isn't a theme problem.

I'm making tests and the "crash" in IE only happen when the tag <fb:like> is called, each time that I change to another page/topic in my forum IE crashes, but if the <fb:like> isn't in the code all works fine.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on February 01, 2012, 03:26:29 AM
Ok , may be something is causing issue or conflict as I have tested it on IE8 too, see http://ifandbut.com , its being used there.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distante on February 01, 2012, 08:58:56 AM
Oh! did you config anything special in your FB app? or just the default settings?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on February 23, 2012, 08:20:49 AM
By this mod, you get all features  FB offers properly integrated with SMF .
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distante on February 23, 2012, 12:46:56 PM
Is possible to enable/disable the sdk code in the administration? or I need to edit the code? Because I'm thinking of install the SA FB integration mod, that don't have Open Graph integrated, but have the FB login/register feature; and I'm not sure if the two mods can live together without messing with the code.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on February 24, 2012, 02:28:36 AM
I don't think it will interfere unless SA FB integration adds something similar to LIKE / Share button. 
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distante on February 24, 2012, 08:02:50 AM
Thanks ;) I will look into the code
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: pixeleyes on February 28, 2012, 10:34:46 AM
How I can change the place of LIKE/SEND buttons.
I want in bottom after post.

2. How to remove Facebook like button from Members & Profile pages.

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: dough29 on February 29, 2012, 09:46:27 AM
Hey there !

We are using this mod on our forum : forum-clio.com

We also avec the issue with the horizontal scrollbar.

I read that is in the TODO list so I'm waiting for this ;)

THanks a lot !
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: GlitchPC on March 11, 2012, 08:51:27 AM
Ricky...

I just installed this mod...thanks!

As it stands...I have it configured the way I want it...with my FB Admin ID but, not an application ID.  I've only tried it once and it doesn't seem to be pulling the image from the location I added in the settings of this mod.  I've modified the code so that the Like and Send buttons are displayed on the left side...just under the topic.  I'm not sure if I need to configure anything else or, not.  I just want to make sure the image gets posted when I "Like" and "Post" the comment.  So far...it grabs whatever image is available.

May I make a suggestion?

Instead of giving permissions for this mod...just configure it so it is only used within certain boards.  As it stands now...it's almost perfect.  It just doesn't have a place on certain forums of my site.  I mean...I can see it on certain forums...but, I wouldn't necessarily use it in an Off Topic forum...know what I mean?

I look forward to your reply.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on March 11, 2012, 09:02:37 AM
You mean giving it board basis permission.
Well, there are so many things which can be done this mod, I am busy for a while but when I do I update, I will try to implement most of the suggestion.

Regarding image, you have to give full image page.

Quote from: pixeleyes on February 28, 2012, 10:34:46 AM
How I can change the place of LIKE/SEND buttons.
I want in bottom after post.

2. How to remove Facebook like button from Members & Profile pages.


On profile page, its actually linking to your main page, so if anyone clicks like on that page, he /she will actually like your forums' main page. I don't see reason to remove it from there.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: GlitchPC on March 11, 2012, 09:19:56 AM
The image is working now...

I forgot I had to make some additional code changes to my custom theme.

As far as permissions go....I just don't want the facebook like/send buttons used on certain forums.  Other than that...I'm completely satisfied with this mod.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: glennk on April 12, 2012, 05:54:05 PM
Hi guys, I cant find the settings options ?? Could you please offer some advice

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi24.photobucket.com%2Falbums%2Fc5%2Fbig_cod%2F2012%2Fcats.jpg&hash=4647483afb416e6ff95f65798be7c2f835cc5d17)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: InfoStrides on April 17, 2012, 12:49:04 AM
This mod is good but needs to be improved on. I installed it and it worked very well but interfere with post images. Instead of showing photos in the posts, it showed the inserted pictures on all posts when shared on Facebook.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: briggz5d on April 28, 2012, 04:14:19 PM
Like the other poster asked two questions - one being Moving the Like - send buttons UNDER the post content.. that would be the Best place for it..
Thats the only thing stopping me from using this mod..
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: mithun on May 19, 2012, 10:33:50 AM
Hellooooo..

I have installed and facebook like mod and enabled the settings in miscelleneous but i am unabled to see Likes.

Y? here i am going wrong?

www.technicalmyths.com

Thank you....

With Rgds,
Mithun Jain
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on May 21, 2012, 02:53:04 PM
You have to install it manually on custom theme..
See: Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: ADAMSIFTM on June 26, 2012, 07:08:44 PM
please i need your help what mod do i hv to install to show me fb like bottom on my site im using smf 2.0.2 please help tanx
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on June 27, 2012, 02:58:11 AM
You can do this with this mod itself , you will have to do some manual changes.  Install this mod and after installation , move some code to bottom :
Code (Find in index.template.php) Select

<fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>


And remove it, now will show this button in bottom :
Code (Find in index.template.php) Select
<div id="footer_section"><div class="frame">
<ul class="reset">
<li class="copyright">', theme_copyright(), '</li>


Code (After add) Select

' , !empty($modSettings['e_fb_enable']) ? '<li class="copyright"><fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like>' : '' , '


Remember, this code is not tested but it should give you some idea, it is based upon default curve theme, if you have any other custom theme, you may have to make changes accordingly.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Dan_y2k on July 09, 2012, 12:00:16 PM
Well, I couldn't really understand, and I have a question.

Does this mod allows you to like a specific post inside topics?
On other mods, when I like a specific post, what it shows after I refresh the page is that I like ALL the posts in the topic (and the topic itself).

Frankly, I prefer a simple mod (http://custom.simplemachines.org/mods/index.php?mod=3105), but to be able to like specific posts in each topic. I figured out that the problem is with the canonical url that SMF 2 outputs.

I'm considering on using your mod, but like I said, I prefer to keep everything simple.
If I knew how to use PHP to change the canonical url of a page in SMF 2 (let's say "$context['current_action'] = 'topic_page'" or something similar), only on specific actions (in my case the topic pages) I would have change it myself...
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Arantor on July 09, 2012, 12:06:57 PM
The problem isn't entirely down to the canonical URL, it's the fact that Facebook doesn't work on units of 'part of a page', it works for the whole page.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Dan_y2k on July 09, 2012, 12:17:06 PM
Quote from: Arantor on July 09, 2012, 12:06:57 PM
The problem isn't entirely down to the canonical URL, it's the fact that Facebook doesn't work on units of 'part of a page', it works for the whole page.

Well, if it did - I guess the "liking" and "sending" possibilites on a page, were endless. :) But probably would also take more loading time.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Arantor on July 09, 2012, 12:25:59 PM
The thing is, a message on its own isn't really often that useful, very often it's only really useful in the context of the stuff around it.

There are like mods that work per-post, just they're not tied to Facebook (which strikes me as a good thing)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Dan_y2k on July 09, 2012, 02:21:37 PM
Hmm, I guess you make a good point.

Although - It would be really nice though, if someone likes a single post, so people (including me) be able to see it's popularity alone, not the as the whole topic.
It can be good if someone likes a post, and when a user click on the link that someone liked, he's being directed directly to that post.
Let's say there's a topic, and in one post, there's an opinion on the whole subject of the topic. If someone likes that post, and a user on facebook will click on it's link, he'll go straight to that opinion.

Like I said, if I knew PHP I would make a change to the index.php?topic=x, and remove the canonical link of it, so the like button will be able to take the link of a single post, OR, I would leave the canonical link, AND make a canonical facebook link, using og:url - that will change on the current message that the user will be on, although my guess it won't work, since the canonical link must be the same.

Well, is there any method I can remove the canonical link only for topic view pages? Something like "$context['current_action'] = 'topic_page'"?
My topic indexing (in Google, etc) isn't important to me that much.

Thanks.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Arantor on July 09, 2012, 02:27:01 PM
-sigh- You could remove the canonical link and it wouldn't change a thing, except screwing up all your search engine handling. Facebook still wouldn't work how you want it to work!

Facebook Like does not work on a part-of-page context and removing the canonical URL won't change that.

(And really, do not change the canonical URL in topic pages, because it will seriously penalise you in Google for content duplication)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Dan_y2k on July 09, 2012, 02:36:44 PM
Well, I guess I'll stick to only topic liking... XD

Thanks alot Arantor. I hope to hear good news from you guys soon (you and Nao ;)). Keep up the good work.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Arantor on July 09, 2012, 02:39:34 PM
Or, as I already mentioned, you could use a mod that isn't Facebook-driven to indicate likes...
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Dan_y2k on July 09, 2012, 03:47:06 PM
Don't think so...

This will require me to use more settings (depends on the mod), hold my fingers crossed that it will get updated when a new version of SMF 2 comes out, make people register (my community is pretty public, so it's not a must-have to register), and probably won't show up the specific posts on Facebook, which what I needed from the start...
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Arantor on July 09, 2012, 03:50:01 PM
*shrug* You can't have what you want.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 22, 2012, 11:32:38 PM
Having issues getting this to work with custom theme premiummgc

After uploading the package successfully, when you click install all checks are positive, except for the index.template in my custom theme. Of the checks it does, the only one it errors on is :

Fine

// the upshrink image, right-floated


add before

            if(!empty($modSettings['e_fb_enable']) && $context['current_action'] != 'admin'){   
            // Advance FB like with OG
               echo '<span style="float: right; margin-top: 10px;"><div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'',(empty($modSettings['e_fb_appId'])?'your app id':$modSettings['e_fb_appId']),'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>
         <fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>';
            } // Advance FB like with OG

this theme does not have that section.

After comparing the index.template from this custom theme to the one from default theme, I see that the package is just trying to paste in this code after the:

function template_body_above() , which is is this custom theme index.template file.

I attempted to paste in the above FB code right after function template_body_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

But no luck. The facebook icons do not show up at all in either the default theme, which had no errors, or the custom theme I was attempting to modify

Any help would be greatly appreciated!
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 22, 2012, 11:53:10 PM
Update Ricky:

I am attempting to manually modify my index.template of this custom theme. You noted on an earlier post what code needs to be pasted into the header of a custom index.template file, so I did this.

I found:

function template_body_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;
   
   echo'
   

<div id="header"><div class="frame">
      <div id="top_section">
         <h1 class="forumtitle">
            <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? '<img src="'. $settings['images_url'].'/theme/logo.png" alt="' .$context['forum_name']. '"/>' : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
         </h1>
         <br class="clear"/>
         
         <div class="news normaltext">';

And made it:

function template_body_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;
   
   echo'
   

<div id="header"><div class="frame">
      <div id="top_section">
         <h1 class="forumtitle">
            <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? '<img src="'. $settings['images_url'].'/theme/logo.png" alt="' .$context['forum_name']. '"/>' : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
         </h1>
         <br class="clear"/>
         
         <div class="news normaltext">';

            if(!empty($modSettings['e_fb_enable']) && $context['current_action'] != 'admin'){   
            // Advance FB like with OG
               echo '<span style="float: right; margin-top: 10px;"><div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'',(empty($modSettings['e_fb_appId'])?'your app id':$modSettings['e_fb_appId']),'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>
         <fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>';

And now I get a parse error. Any ideas? Could really use help to get this working. thanks
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 22, 2012, 11:54:36 PM
Error is:

Template Parse Error!
There was a problem loading the /Themes/premiummgc/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on September 24, 2012, 02:33:48 AM
Well, lets try afresh, in your Themes/premiummgc/index.template.php
Code (find) Select

</h1>
<br class="clear"/>


Replace with
</h1>';
if(!empty($modSettings['e_fb_enable']) && $context['current_action'] != 'admin'){
// Advance FB like with OG
echo '<span style="float: right; margin-top: 10px;"><div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'',(empty($modSettings['e_fb_appId'])?'your app id':$modSettings['e_fb_appId']),'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>
<fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>';
} // Advance FB like with OG

echo ' <br class="clear"/>


I have tested and worked as expected.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 24, 2012, 10:07:09 AM
Hi Ricky,

Thanks for the reply. The modification you suggested took away the parse error, however FB like or send does not show up anywhere on any page. In the admin the check boxes are selected to show the like and send buttons.

What can I do to help you help me make this work? Do you need to see the files used?

I appreciate your help
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on September 24, 2012, 11:06:15 AM
I suggest you to uninstall the MOD (but keeping the changes done on index.template.php of premiummgc theme and install it again and let me know.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 24, 2012, 12:46:07 PM
I did as you requested, keeping the last change you instructed me to make to index.template in the custom theme, uninstall then reinstall, and no such luck. Still nothing.

Would you like me to post certain files to review? If so please just let me know which ones.

I appreciate your time in this
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on September 25, 2012, 01:01:13 AM
post your index.template.php as well as post screenshot of your admin area..
Here what I suspect that you may not be editing right file..
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 25, 2012, 12:12:38 PM
Hi Ricky,

I am attaching my index.template file from my custom theme directory, and an image of the admin area. Any help is greatly appreciated!

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.nicholaspaul.net%2Fn%2Fimages%2Fadminarea.jpg&hash=15a946bd731da8ff51ed03fa8a6d6d8dd020aa8b)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on September 26, 2012, 12:56:22 AM
You need to enable first option too, that is overall switch to turn it ON/OFF
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 26, 2012, 02:01:08 PM
I will give that a try and report back. Thanks
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 26, 2012, 02:05:22 PM
Did you notice anything else that would be preventing this from showing up in my code? I am attaching the default/display.template also for review

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 26, 2012, 09:54:45 PM
No such luck checking that box.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.nicholaspaul.net%2Fn%2Fimages%2Fadminarea2.jpg&hash=f727b602bb1cd8695d595c9f64ba51c3901231f6)

I attached my display.template.php from the default theme directory and here is the index.template from my custom theme again

Any ideas why this isnt showing up?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: distrue on September 26, 2012, 10:03:03 PM
Please help me get this working
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on September 27, 2012, 01:53:39 AM
I don't see instance of my FB mod in your Display.template.php , I am not sure but looks like mod is not being installed properly. May be you can send me your forum details in PM so that I can see myself whenever I have some free time.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: thermus on October 14, 2012, 02:32:01 AM
I am trying to get this installed on a custom theme. Everything works until this point...

This is code is not found...

Code: (Find)
Quote// the upshrink image, right-floated

Which means I am not sure where to paste...

Code: (Before)
Quoteif(!empty($modSettings['e_fb_enable']) && $context['current_action'] != 'admin'){   
            // Advance FB like with OG
               echo '<span style="float: right; margin-top: 10px;"><div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: \'',(empty($modSettings['e_fb_appId'])?'your app id':$modSettings['e_fb_appId']),'\', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement(\'script\'); e.async = true;
    e.src = document.location.protocol +
      \'//connect.facebook.net/en_US/all.js\';
    document.getElementById(\'fb-root\').appendChild(e);
  }());
</script>
         <fb:like send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like></span>';
            } // Advance FB like with OG
   

I attached my index.template.php. Can someone tell me where I should paste this in so I can get it working?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on October 15, 2012, 02:47:58 AM
It is not possible to suggest location without seeing theme live also, since you are using custom theme, it will be very easy for custom theme author to suggest you location.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: thermus on October 15, 2012, 08:43:10 PM
toyotaoutlaws.com is the website. I would be happy to give you login info if you can possibly help me out on this on...  O:)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on October 16, 2012, 10:15:40 AM
I just checked your index.template.php and looks like you have added but it is overlapped by other elements.
I am attaching modified index.template.php , remember to take backup of your current file as this code is not tested as I don't have this theme with me.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: techguy on November 03, 2012, 02:08:44 PM
I want users on my site to click on like us and only then certain article would be visible
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on November 04, 2012, 02:28:51 PM
That is something different than what this mod offer, what you asked can be done but that will be something completely new, I can try but only when I get time.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: kkattfish on November 07, 2012, 11:48:28 AM
Using helios multi theme and i cannot get the like buttons or anything to show up. 
i have manually attempted to add the files and still nothing. 

my index.template.php and display.template.php are attached if you can help me out. 
below is also a screen shot of the settings.  in misc.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.themonkeymafia.info%2Fimages%2Faorazscreen.jpg&hash=1af9e2bed6f6ccea1a74eb6ebae6c7cfc7ad199b)

Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: techguy on November 11, 2012, 09:41:05 AM
Quote from: Ricky. on November 04, 2012, 02:28:51 PM
That is something different than what this mod offer, what you asked can be done but that will be something completely new, I can try but only when I get time.

Please do I when u get time
Thanks for your efforts
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on December 29, 2012, 07:06:40 PM
- It doesnt install in 2.0.3 without emulation
- You cant use the mod without an App ID which you have to give your full personal information to FB to get.

I would love to use this mod and I dont need the OpenGraph. So there should be an option to use everything else if you dont have an App ID. Wish I could use it.
Very nice mod. Good job.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on December 30, 2012, 11:48:37 AM
This mod is compatible with 2.0.3 , though I need to update package so that one don't need emulation.

As far as I remember, it works without APP ID, if you don't have one, just leave it blank.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: PLAYBOY on December 30, 2012, 01:31:27 PM
QuoteAs far as I remember, it works without APP ID, if you don't have one, just leave it blank.

It didnt work in my forum when i left it blank. I didnt see any kinda like button anywhere at all.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on December 30, 2012, 01:34:34 PM
Well, then they may have changed things, but .. have you tried it on default theme ?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: MarkS on February 09, 2013, 06:23:09 AM
sorry m8 did not work for me on any theme
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: pastorvictor on February 11, 2013, 11:16:50 PM
Does this mod work on 2.0.4?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Matthew K. on February 11, 2013, 11:24:51 PM
Using version emulate yep!
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: dan4ever on May 19, 2013, 06:18:02 PM
I need help to, I have 2.0.4 and install with emulate, but nothing happens.
The installer had problem with Theme/core/index.template.php but I use Curl as default.
I change this file manual....



Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: ENRESINADO on May 29, 2013, 10:54:06 AM
Hi,

I have some hidden boards, that are seen only by some users, so makes no sense the like button is shown in those boards, and inside the first post of a topic, just because, as well as the admin panel, the link that will be shared to facebook, will not work to persons that aren't registered in the forum, as well as the users that don't have permission to view those boards.

Is there any solution for these?
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on May 29, 2013, 02:35:25 PM
So far there is no solution for it, there is new version already being worked upon , may be something can be added to tackle situation like yours.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: ENRESINADO on May 30, 2013, 04:24:07 AM
Ok Ricky, thanks for your feedback.

Then I'll wait for that new version :)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: LexM on August 01, 2013, 05:22:21 PM
Hello Ricky,

I manage to install your modification on SMF 2.0.4, but I'm having one small issue. One the post pages the window for the "Send" function is cut out (please check the attached picture).

Any idea?

Thank you very much for your help!

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fs9.postimg.org%2F5w5ubw4n3%2FUntitled.png&hash=97b5eda4c7d236fcf1d99a0eccfb5000293991c8)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on August 02, 2013, 12:02:05 AM
Ya, I am aware of this issue, yet to find why it cuts off, though primary investigation shows FB should have used higher z-index etc.. so that overlay remains visible even of its parent container is smaller. Need to figure out some way around.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: LexM on August 02, 2013, 10:48:28 AM
Quote from: Ricky. on August 02, 2013, 12:02:05 AM
Ya, I am aware of this issue, yet to find why it cuts off, though primary investigation shows FB should have used higher z-index etc.. so that overlay remains visible even of its parent container is smaller. Need to figure out some way around.

Is it possible to move to the left the Like and Send buttons?

Thanks!
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: LexM on August 02, 2013, 04:36:03 PM
Quote from: Ricky. on August 02, 2013, 12:02:05 AM
Ya, I am aware of this issue, yet to find why it cuts off, though primary investigation shows FB should have used higher z-index etc.. so that overlay remains visible even of its parent container is smaller. Need to figure out some way around.

In Display.Template.php of my theme, I have made these changes:

Old:
echo '<div style="float:right;margin:5px">
<fb:like href="',$scripturl ,'?topic=',$context['current_topic'],'.0" send="true" width="300" show_faces="true" font=""></fb:like></div>';

New:
echo '<div style="float:right;margin:50px" class="fb-like" data-width="400" data-show-faces="true" data-send="true"></div>';

Seems to be working
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fs14.postimg.org%2Fc08orq0tt%2Fimage.png&hash=412d63a23db7a11b9ca173f92f3c03c5a8859c1c)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on August 03, 2013, 12:00:29 AM
Thats nice.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: LexM on August 11, 2013, 02:37:34 PM
Hello Ricky,

How do I add the description to the modification?
"The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags."

I couldn't find anywhere a way to input the text describing my website to facebook.

Thank you for your help!

Best!
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: nix_ee on December 12, 2013, 06:17:40 PM
Is there any news of a newer version of this please, Ricky? I'm on 2.0.6 and there's no option to install/emulate an older version? Thanks :)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on December 13, 2013, 03:51:26 AM
This should work on 2.0.6 ..

When you see list of packages in Admin, there is option to change version.
How can I install a mod that doesn't work in my SMF version? (http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: AZMazda3 on April 05, 2014, 11:26:47 AM
Anyone get this to work on 2.0.7? I have been unable to do so. Although this mod seems great, I do not necessarily care about the like buttons, just the fact that it adds the OG info easily for FB to read.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on April 18, 2014, 02:52:06 AM
I have to re-look into it as it seems few things are changed from FB side.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Toni8 on April 18, 2014, 03:41:48 PM
Quote from: AZMazda3 on April 05, 2014, 11:26:47 AM
Anyone get this to work on 2.0.7? I have been unable to do so. Although this mod seems great, I do not necessarily care about the like buttons, just the fact that it adds the OG info easily for FB to read.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.forumnacional.pt%2FSmileys%2Fdefault%2Femoji106.png&hash=082ec8f5c6ee798860cac2e4590497119d8cde01)
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: saurabh1938 on September 01, 2014, 06:02:36 PM
Can I assume this mod is expired and not to be used? and also support will not be there
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Ricky. on October 05, 2014, 07:56:30 AM
Yes, this mod need rework and I am quite occupied for now.
Title: Re: Advance Facebook Like button with OpenGraph (For Each Post)
Post by: Bounty_y2k on December 31, 2014, 11:10:56 AM
Hi,I installed your mod with few minor errors that I fixed. I had to revert my forum to 2.0.2 to instal it and I had to manually edit my index.template.php file. Still after enableing the mod and setting everything up it wont work like its supposed to.
When I post a link on my facebook wall it will add only the images I use for logo as og:image not the one in posts.
Even when checking with facebook debugger it still shows up only logo images of my forum and no post images at all.
Did I do anything wrong? This is one of thing this mod is supposed to do,right?
Any other way of managing this except this mod?
Thank you.