Advertisement:

Author Topic: SA Facebook Integration  (Read 1033653 times)

Offline Buraaq

  • Semi-Newbie
  • *
  • Posts: 90
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #820 on: September 21, 2010, 02:36:28 PM »
Oh, so all I have to do is change the restrictions so that every member can access the boards right? But then, what would be the use of requiring registration if everyone is allowed to access all the boards. Thanks anyways though, I guess I will leave it as it is..

And manual edits, I thought about that too but I wasn't sure. sounds risky, given that my current version is working fine (after much efforts) and since the board is new and active, I wouldn't want to cause trouble for my new users. Might try it later, or will post on SA forums they might have a safer way about it..

Thanks a lot Spoogs. You have been great help  :)

Offline Spoogs

  • SMF Hero
  • ******
  • Posts: 1,676
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #821 on: September 21, 2010, 02:44:30 PM »
The guest dont have to be allowed to post .. .just allow to view should do the trick.

You're quite welcome... and if its working for ya then no need to mess with it. Easiest way to deal with it tho.. is download the necessary file (make a back up of your forum) copy the file you downloaded (just to be safe) make the edits upload to your server... if everything is working you're done... if not you still have the copy you made of the original just re-upload and you'll be back to where you were (in most cases)

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #822 on: September 21, 2010, 02:48:15 PM »
So far the new release is working just fine here.

Offline Buraaq

  • Semi-Newbie
  • *
  • Posts: 90
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #823 on: September 21, 2010, 03:00:38 PM »
Quote
and if its working for ya then no need to mess with it. Easiest way to deal with it tho.. is download the necessary file (make a back up of your forum) copy the file you downloaded (just to be safe) make the edits upload to your server... if everything is working you're done... if not you still have the copy you made of the original just re-upload and you'll be back to where you were (in most cases)

Yup I usually do that, unless I am pretty much sure what I am doing. I guess I will give it a try in a day or two; you never know SA might introduce a new revision by then =p

And the guest thing is indeed the case, thanks a lot! Worked well. I just allowed guests in the boards settings, but I will set the permissions for Guests so they can only view it. Perfect. Thanks a bunch mate!  ;)

Offline Spoogs

  • SMF Hero
  • ******
  • Posts: 1,676
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #824 on: September 21, 2010, 03:13:16 PM »

Offline neliojesus

  • Semi-Newbie
  • *
  • Posts: 40
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #825 on: September 21, 2010, 04:46:07 PM »
already installed the mod, I can login as an account associate from forum to facebook but I can not make records, can you help me?

Offline Buraaq

  • Semi-Newbie
  • *
  • Posts: 90
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #826 on: September 21, 2010, 05:10:31 PM »
Quote
I can login as an account associate from forum to facebook but I can not make records, can you help me?

Can you please elaborate a little on the above? I might be able to assist you if I can have a better picture of the problem you are facing.

Offline neliojesus

  • Semi-Newbie
  • *
  • Posts: 40
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #827 on: September 21, 2010, 05:25:59 PM »
the only problem is when trying to make a new account Across the facebook. When it appears that the text of the Privacy Policy or what it is, I click the button to proceguiu and it does refresh the page.

Besides all the features are working properly

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,868
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #828 on: September 21, 2010, 07:35:54 PM »
@ im looking into this

@ RAULVK confirmed as a bug

if you move it from where it is and put ifbefore this

Code: [Select]
}

if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template']))

Sticking it there will put it inside a foreach loop, causing it to be echoed out once for every template layer that's defined. A better option would be to modify and move it a bit...

Find the global variables list inside setupThemeContext() (one function above the one where the code is currently placed) and add $boardurl to that list.

Then...

Find:
Code: [Select]
    // Set some specific vars.
And add this before it:
Code: [Select]
    $like_layout = empty($modSettings['liketopiclayout']) ? 'standard' : 'button_count';
    $like_verb = empty($modSettings['liketopicverb']) ? 'like' : 'recommend';
    $like_colour = empty($modSettings['liketopiccolour']) ? 'light' : 'dark';   

    $context['html_headers'] .= '
    <script src="'.$boardurl.'/fbc/fbconnect.js" type="text/javascript"></script>
    <script type="text/javascript">
        var mod_settings_fb_app_pageid = "'.$modSettings['fb_app_pageid'].'";   
        var mod_settings_fb_app_stream = "'.$modSettings['fb_app_stream'].'";
        var mod_settings_fb_app_connection = "'.$modSettings['fb_app_connection'].'";
        var mod_settings_fb_app_width = "'.$modSettings['fb_app_width'].'";
        var mod_settings_fb_com_xid = "'.$modSettings['fb_app_comments_boxid'].'";
        var mod_settings_fb_li_xid = "'.$modSettings['fb_app_stream_boxid'].'";
        var mod_settings_fb_com_show = "'.$modSettings['fb_admin_commets_post'].'";
        var forum_name = "'.$context['forum_name'].'";
        var site_slogan = "'.$settings['site_slogan'].'";
        var like_layout = "'. $like_layout. '";
        var like_verb = "'. $like_verb. '";
        var like_colour = "'. $like_colour. '";
        var live_hight = "'.$modSettings['fb_app_stream_hight'].'";
        var live_width = "'.$modSettings['fb_app_stream_width'].'";
        var fp_width = "'.$modSettings['fb_app_fp_width'].'";
        var fp_row = "'.$modSettings['fb_app_e_fp_row'].'";
        var rec_width = "'.$modSettings['fb_app_rec_width'].'";
        var rec_hight = "'.$modSettings['fb_app_rec_hight'].'";
    </script>';

Some notes:
Using $context['html_headers'] will ensure it gets echoed out in the <head> section for every theme.
Defining the "like" settings separately is done because the inline conditionals cause it to output "light" or "dark" after a </script> tag otherwise (though I'm not quite sure why).
Commas can't be used to concatenate strings, so you have to change those to periods instead.

Hope that helps. It worked for me :)
Michael Eshom
Cincy Space - now open!

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 #829 on: September 22, 2010, 10:22:07 AM »
aha thanks Oldiesmann i only relised after further testing myself i will corect this in next revision
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 ahrasis

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #830 on: September 22, 2010, 10:31:41 AM »
Great news. I'll be awaiting too.

Offline Buraaq

  • Semi-Newbie
  • *
  • Posts: 90
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #831 on: September 22, 2010, 11:07:38 AM »
Hello again!

I have run into another problem, and this one is a major security risk!!

Here is the thing

My SA FC was working fine, but then I noticed that the IDs associated with my members were all jumbled up. Like there were total 18 members, and the last member who had joined us had an ID of 43 or something. So I wanted to fix it. I accessed my database, went to smf_members and changed the IDs there.

However, it seems that SA FC had associated FB profiles in relation to IDs, so now wrong FB profiles are associated with the wrong people!!

For example, this person abc had facebook profile http://www.facebook.com/abc and this other person xyz had profile http://www.facebook.com/xyz.
Lets say changing the IDs led to ABC's ID getting associated to XYZ. so now, if I visit XYZ's profile, his facebook profile link reads http://www.facebook.com/abc when it should be reading /xyz!!

This issue is because of IDs is my best guess, because before changing the IDs everything was fine.

How do I fix it, I have no clue. I have disabled the MOD for the meantime. I need to get this sorted out soon though. Any help please?? :'(

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 #832 on: September 22, 2010, 11:27:05 AM »
you can chnage the id's in the themes db table just like you did with the members

one question tho have you deleted any memebers cos it is usal for the id's to go out of whak i happens when you delete members it is not a bug :)

also it is very wise to always back up before editing things exspecily your db
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 Buraaq

  • Semi-Newbie
  • *
  • Posts: 90
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #833 on: September 22, 2010, 11:34:49 AM »
Quote
you can chnage the id's in the themes db table just like you did with the members

Well I would, but I wouldn't remember which ID to assign in order to get SA FB profiles to match with their forum users. Yes I deleted many members; I was trying to change the email templates so was testing them by registering myself every now and then and then rejecting myself, approving and so on  :D

I am stuck =(



Offline Spoogs

  • SMF Hero
  • ******
  • Posts: 1,676
  • Gender: Male
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #834 on: September 22, 2010, 11:48:44 AM »
1. Disassociate your FB account from your forum account
2. Go to http://www.facebook.com/editapps.php?ref=mb and click the "x" to remove the app

3. Re-Integrate with FB on your forum

(see if that helps)

Offline Buraaq

  • Semi-Newbie
  • *
  • Posts: 90
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #835 on: September 22, 2010, 11:55:45 AM »
Sounds a good option. You always have good suggestions to make spoogs, will give it a shot. Should work!  :D Thanks!!

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 #836 on: September 22, 2010, 12:21:42 PM »
spoogs is on the ball lol i didnt think of that one
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 neliojesus

  • Semi-Newbie
  • *
  • Posts: 40
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #837 on: September 22, 2010, 01:40:03 PM »
@ im looking into this

@ RAULVK confirmed as a bug

if you move it from where it is and put ifbefore this

Code: [Select]
}

if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template']))

Sticking it there will put it inside a foreach loop, causing it to be echoed out once for every template layer that's defined. A better option would be to modify and move it a bit...

Find the global variables list inside setupThemeContext() (one function above the one where the code is currently placed) and add $boardurl to that list.

Then...

Find:
Code: [Select]
    // Set some specific vars.
And add this before it:
Code: [Select]
    $like_layout = empty($modSettings['liketopiclayout']) ? 'standard' : 'button_count';
    $like_verb = empty($modSettings['liketopicverb']) ? 'like' : 'recommend';
    $like_colour = empty($modSettings['liketopiccolour']) ? 'light' : 'dark';   

    $context['html_headers'] .= '
    <script src="'.$boardurl.'/fbc/fbconnect.js" type="text/javascript"></script>
    <script type="text/javascript">
        var mod_settings_fb_app_pageid = "'.$modSettings['fb_app_pageid'].'";   
        var mod_settings_fb_app_stream = "'.$modSettings['fb_app_stream'].'";
        var mod_settings_fb_app_connection = "'.$modSettings['fb_app_connection'].'";
        var mod_settings_fb_app_width = "'.$modSettings['fb_app_width'].'";
        var mod_settings_fb_com_xid = "'.$modSettings['fb_app_comments_boxid'].'";
        var mod_settings_fb_li_xid = "'.$modSettings['fb_app_stream_boxid'].'";
        var mod_settings_fb_com_show = "'.$modSettings['fb_admin_commets_post'].'";
        var forum_name = "'.$context['forum_name'].'";
        var site_slogan = "'.$settings['site_slogan'].'";
        var like_layout = "'. $like_layout. '";
        var like_verb = "'. $like_verb. '";
        var like_colour = "'. $like_colour. '";
        var live_hight = "'.$modSettings['fb_app_stream_hight'].'";
        var live_width = "'.$modSettings['fb_app_stream_width'].'";
        var fp_width = "'.$modSettings['fb_app_fp_width'].'";
        var fp_row = "'.$modSettings['fb_app_e_fp_row'].'";
        var rec_width = "'.$modSettings['fb_app_rec_width'].'";
        var rec_hight = "'.$modSettings['fb_app_rec_hight'].'";
    </script>';

Some notes:
Using $context['html_headers'] will ensure it gets echoed out in the <head> section for every theme.
Defining the "like" settings separately is done because the inline conditionals cause it to output "light" or "dark" after a </script> tag otherwise (though I'm not quite sure why).
Commas can't be used to concatenate strings, so you have to change those to periods instead.

Hope that helps. It worked for me :)

where i do that? wich file?

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 #838 on: September 22, 2010, 02:09:00 PM »
subs.php
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 mikeymx5

  • Semi-Newbie
  • *
  • Posts: 63
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #839 on: September 25, 2010, 12:48:49 PM »
code is a bit sloppy for custom themes...

Code: [Select]
                   
            show_facebook_like('','',6);
I suggest a better way would be

Code: [Select]
            //manual edit facebook mod
            if (function_exists("show_facebook_like"))
            {show_facebook_like('','',6); }

this way if the mod is uninstalled and doesnt remove itself from your theme it doesnt crash SMF