Advertisement:

Author Topic: SA Facebook Integration  (Read 1034868 times)

Offline Spoogs

  • SMF Hero
  • ******
  • Posts: 1,676
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1180 on: January 13, 2011, 10:45:10 AM »
@donnyfranks

what do you have as your site url and domain url in your facebook app

Offline donnyfranks

  • Newbie
  • *
  • Posts: 8
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1181 on: January 13, 2011, 08:42:37 PM »
site url in facebook app = "hxxp:forum.wtsps.com/ [nonactive]"
domain url = " wtsps.com" ewithotu http://


please help, the like, the share and everything else works except for the associate account, or login with facebook buttons, like i said if clicked it states the error :
Help.. i am using _258 and rc4 smf andwhenever i click on associate with facebook account, nothing happens, except the error on the forum that shows a box with a #4 in it, thats it, eveythign else seems to work right, but the connecting to facebook

i also get this error in error log:

 donnyfranks
     Today at 12:56:22 AM
 28312b3f16ae6a8b86c959e2fd7a5b44
 Type of error: Undefined
forum.wtsps.com/index.php?action=facebook;area=sync8: Undefined variable: txtFile: /homepages/10/d353714913/htdocs/forum/Sources/FB_Connect/FB_Connect_Subs.php
Line: 21

i am using the newest release of sa facebook connect, and the bnewest rc4 of SMF, i have tried this on a new blank forum, and the current forum.  i have tried it with the delault theme, and custom themes, and they all give the same error:

i have enclosed a snapshot of my settings in FB and in the forum admin page:

please let me know

the unchecked ones on the facebook admin forum, is because they create errors. i have rechecked them, so if possible you can test them


@donnyfranks

what do you have as your site url and domain url in your facebook app

Offline donnyfranks

  • Newbie
  • *
  • Posts: 8
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1182 on: January 13, 2011, 08:43:36 PM »
here is the facebook pic

Offline donnyfranks

  • Newbie
  • *
  • Posts: 8
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1183 on: January 13, 2011, 08:45:12 PM »
here is the pic of the forum when it creates the error!

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1184 on: January 13, 2011, 08:54:47 PM »
is there anything in your error logs?
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline donnyfranks

  • Newbie
  • *
  • Posts: 8
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1185 on: January 13, 2011, 08:57:21 PM »
the error logs says:

 28312b3f16ae6a8b86c959e2fd7a5b44
 Type of error: Undefined
forum.wtsps.com/index.php?action=facebook;area=sync8: Undefined variable: txtFile: /homepages/10/d353714913/htdocs/forum/Sources/FB_Connect/FB_Connect_Subs.php
Line: 21

Offline donnyfranks

  • Newbie
  • *
  • Posts: 8
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1186 on: January 13, 2011, 09:05:06 PM »
here is a pic of the html code: line 21 is highlighted, this is the only error i am getting in the error log

Offline !RFAN

  • Sr. Member
  • ****
  • Posts: 716
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1187 on: January 13, 2011, 09:50:10 PM »
did any body noticed a conflict between Enotify and SA Facebook Connect?

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1188 on: January 14, 2011, 01:24:56 PM »
@donnyfranks that tells me you have php4 and this mod reqires php5 to work your host should be able to update that for you

@!RFAN please do explain more?
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline donnyfranks

  • Newbie
  • *
  • Posts: 8
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1189 on: January 14, 2011, 11:16:09 PM »
THANKS - I SOLVED THE PROBLEM, THANKS TO YOUR HELP, I CHECKED MY SETTINGS, AND SAW WHERE THE .HTACCESS FILE SAID PHP 4, I CHANGED IT TO READ :
AddType x-mapp-php5 .php .php4 

AND NOW IT WORKS


but now i am getting this error:

   
hxxp:forum.wtsps.com/index.php? [nonactive]
2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
File: /homepages/10/d353714913/htdocs/forum/Themes/default/languages/Facebook.english.php (main sub template - eval?)
Line: 290

hxxp:forum.wtsps.com/index.php? [nonactive]
8: Undefined variable: user_info
File: /homepages/10/d353714913/htdocs/forum/Themes/default/languages/Facebook.english.php (main sub template - eval?)
Line: 290


but when looking at the file, there is no line 290, it stops on line 278

@donnyfranks that tells me you have php4 and this mod reqires php5 to work your host should be able to update that for you

@!RFAN please do explain more?
« Last Edit: January 15, 2011, 10:53:55 AM by donnyfranks »

Offline mattverg7

  • Newbie
  • *
  • Posts: 1
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1190 on: January 15, 2011, 03:23:28 AM »
Hey buddy SA. My name is Matthew and i'm a big fan of your addon. I've been in the process of wanting to use a different theme with your plugin. I'm sure in these 60 pages of communication there is a lot of talk about this but I wanted to see if there was a specific guide online or a walkthrough of some kind on how to integrate the plugin to other themes. I'm somewhat familiar with PHP and very familiar with HTML, but not familiar with SMF and its plugins etc.

Please let me know the best way to approach this concern. Thanks much.

Offline !RFAN

  • Sr. Member
  • ****
  • Posts: 716
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1191 on: January 15, 2011, 03:56:22 AM »
i was using enotify nd this mod... but i got an error when i tested a new registration... i was not able to register a member using facebook connect and when i removed enotify it was working again :s

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1192 on: January 16, 2011, 05:15:28 PM »
@donnyfranks
 you have to disable eval and it will show the true error

@mattverg7
you can get the edits from the mods page here selected your version and parse it

@!RFAN
oh ill look into thiswhat error did you get?
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline !RFAN

  • Sr. Member
  • ****
  • Posts: 716
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1193 on: January 17, 2011, 04:01:20 AM »
({ "title": "Notification Feed", "generator": "ENotify Modification for Simple Machines Forum", "items": [ ] })

Offline jekwumoore

  • Semi-Newbie
  • *
  • Posts: 53
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1194 on: January 19, 2011, 06:41:48 AM »
I installed it and when I try to log in via facebook which was successful but it just log into the admin account which means anyone that uses facebook to log into my forum with gain access to my admin control, what went wrong?
Does it have to do with the ip?


Now I know where the problem is. It has to do with the hosting company, the result above was from a free web hosting account. I tried it out on my main site and it worked well
we rule the world

Offline jekwumoore

  • Semi-Newbie
  • *
  • Posts: 53
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1195 on: January 19, 2011, 08:36:00 AM »
I am trying to put code for this index.template php file for my as theme

three things I have not figured where to add after or add before

1-<body>';
2- </form>';   
3-   if (!empty($context['user']['avatar']))   
these are present in the default theme but I can't find them in as theme, below is the code of indextemplate of as theme.

Code: [Select]
<?php
// Version: 1.1; index

/* 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'] = '1.1.4';

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

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

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

// load custom language strings
loadLanguage('ThemeStrings');
}

// The main sub template above the content.
function template_main_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>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['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'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 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'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';
// the fontsize
    
if($context['user']['is_logged'])
echo '<style type="text/css"><!--
body
{
font-size: ' 
, !empty($options['mysize']) ? $options['mysize'] : 'small' ';
margin: auto;
}
 --></style>'
;
else{
if(isset($_COOKIE['size']))
$gsize=$_COOKIE['size'];
else
$gsize='small';

echo '<style type="text/css"><!--
body
{
font-size: ' 
$gsize ';
}
 --></style>'
;
}

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<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']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - 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" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
//Specify affected tags. Add or remove from list:
var tgs = new Array( \'td\',\'tr\');

//Specify spectrum of different font sizes:
var szs = new Array( \'xx-small\',\'x-small\',\'small\',\'medium\',\'large\',\'x-large\' );
'
;

// setup the array to start with
$fsize=array('xx-small' => 'x-small' => 1'small' => 2'medium' => 3'large' => 4'x-large' => 5);
if(!empty(
$options['mysize']))
$what=$fsize[$options['mysize']];
else
$what=2;

echo 
'
var startSz = '
.$what.';

function ts( trgt,inc ) {
if (!document.getElementById) return
var d = document,cEl = null,sz = startSz,i,j,cTags;

sz += inc;
if ( sz < 0 ) sz = 0;
if ( sz > 3 ) sz = 3;
startSz = sz;


if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

cEl.style.fontSize = szs[ sz ];

for ( i = 0 ; i < tgs.length ; i++ ) {
cTags = cEl.getElementsByTagName( tgs[ i ] );
for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
}
    setmysize(szs[ sz ]);
 }

 function tsreset( trgt ) {
if (!document.getElementById) return
var d = document,cEl = null,sz = startSz,i,j,cTags;

sz = 2;
startSz = sz;


if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

cEl.style.fontSize = szs[ sz ];

for ( i = 0 ; i < tgs.length ; i++ ) {
cTags = cEl.getElementsByTagName( tgs[ i ] );
for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
}
    setmysize(szs[ sz ]);
 }

// ]]></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['theme_url'], '/mootools.js"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['theme_url'], '/menu.js"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['theme_url'], '/main.js"></script>';
echo 
'
</head>
<body>
   <div id="header">
      <div id="head-l">
    <div id="head-r">
<a href="'
.$scripturl.'?action=forum" title=""><span id="logo"> </span></a>';
echo '
  </div>  
 </div>
</div>
         <div id="toolbar">
<div id="fancymenu">
   '
,template_menu(),'
      </div>
         </div><br />
 <div id="mainarea">
 <div id="sag1">
  <div id="sol1">
   <div id="alt1">
    <div id="altsag1">
     <div id="altsol1">
<div id="ust1">
 <div id="ustsag1">
  <div id="ustsol1">'
;
            echo 
'
 <div id="navarea1">
  <div id="arama">'
;
if ($context['user']['is_logged'])
{
echo '<b>'$txt['hello_member_ndt'], ' '$context['user']['name'], '</b><br />';

echo '<a href="'$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br /><a href="'$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
'
$txt['welcome_guest'], ' ';
}
              echo 
'
    </div>'
;
      echo '
<div id="news">
   <span class="smalltext"><b>'
$txt[102], '</b>: <br />'$context['random_news_line'], '</span>
</div></div><br />'
;


}

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

  echo '
 </div>
      </div>
     </div>
    </div>
   </div>
  </div>
 </div>
</div>
</div><br />'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
  <div id="footer">
    <div id="footer-l">
 <div id="footer-r">
          <div id="footerarea">
<span class="smalltext">'
theme_copyright(), '
 <strong>Theme As</strong> &copy; 2009, by <a href="http://www.fussilet.com" target="_blank"> Fussilet</a></span><br />
                           <a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>'
;
// Show the load time?
if ($context['show_load_time'])
echo '
<p align="center"><span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span></p>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

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

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>';
echo 
'

</body>
</html>'
;
}

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

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 0ex; padding-bottom: 0ex; padding-left: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

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

// 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']) - 1)
echo '&nbsp;|&nbsp;';
}

echo '</div>';
}

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

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''logout''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Start of the tab section.
echo '
<ul>'
;

// Show the default [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'home' 'current' '' '"><a href="'$scripturl'">' $txt[103] , '</a></li>';

// Show the [help] button.
echo ($current_action=='help' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'help' 'current' '' '"><a href="'$scripturl'?action=help">' $txt[119] , '</a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action=='search' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'search' 'current' '' '"><a href="'$scripturl'?action=search">' $txt[182] , '</a></li>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action=='admin' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'admin' 'current' '' '"><a href="'$scripturl'?action=admin">' $txt[2] , '</a></li>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action=='profile' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'profile' 'current' '' '"><a href="'$scripturl'?action=profile">' $txt[79] , '</a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action=='pm' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'pm' 'current' '' '"><a href="'$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a></li>';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action=='calendar' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'calendar' 'current' '' '"><a href="'$scripturl'?action=calendar">' $txt['calendar24'] , '</a></li>';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' '' '
<li class="' 
$current_action == 'mlist' 'current' '' '"><a href="'$scripturl'?action=mlist">' $txt[331] , '</a></li>';

// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' '' '
      <li><a href="'
$scripturl'?action=login">' $txt[34] , '</a></li>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' '' '
     <li><a href="'
$scripturl'?action=register">' $txt[97] , '</a></li>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' '' '
      <li><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a></li>';

echo '</ul>';
}


// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

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

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(''$button_strip) , '</td>';
}

?>
we rule the world

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1196 on: January 19, 2011, 12:25:53 PM »
i guess you usng 0.2 version iof the mod?

if so

1: is there on line 258 <body>
2: isnt there so the next best thing would be ', $txt['welcome_guest'], ' '; on line 295
3: isnt there eaither so the next best thing would be echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />'; on line 286
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline jekwumoore

  • Semi-Newbie
  • *
  • Posts: 53
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1197 on: January 19, 2011, 01:21:20 PM »
I am using SA_FBConnect_0.2_smf11x.

Anyways I figured out a way on how to do it but I will try yours too to know the best that fits my theme, thanks
we rule the world

Offline Gold3agle

  • Newbie
  • *
  • Posts: 1
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1198 on: January 20, 2011, 03:15:32 PM »
Hi Guys,

Well I love the idea of this mod, especially as I am wanting to trail a forum out and its SMF vs phpBB at present. phpBB defo havent got anything like this so SMF is currently ahead.

Ok, no my particular problems :(

I installed the mod and it would appear to have installed ok. I created a new app and inserted the keys and id's where required.
I then go to the homepage and have tried in 3 separate browsers and get very little.

If im logged in as Admin I get a "Associate Account with Facebook" link which takes me to a new page ttelling me my account is not associated and would I like to. Underneath that im assuming I should have either a Link or ;) a button saying "Connect" but im getting neither. All I see are the words "Connect with Facebook" .

Im running SMF 2.0 RC4 and im running this mod as 1.0 RC4 using the default template.

I have to admit its driving me nuts as everything points to having got it all setup right and everything installing right. Yet it doesnt want to work.

Its not some new fancy Facebook "Upgrade / Improvement" we keep hearing about is it lol.

Many thanks

Tom.

Offline Bobn

  • Full Member
  • ***
  • Posts: 561
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #1199 on: January 21, 2011, 06:58:21 PM »
Any luck with being able to post to a fan page instead of my profile page?