Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
985 views
in Q2A Core by
I would like to disable facebook login for some specific addresses. I know how to read the ip addresses and how to compare them. but how to disable the facebook login in the code is what i know. Any tips?
Q2A version: 1.5.4

1 Answer

0 votes
by
selected by
 
Best answer
What you can do is in facebook plugin qa-facebook-layer.php file

you can write your condition either with

if (strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret'))) condition or wrap this condition with your condition
by
Thanks, but how then can i disable the facebook plugin? I know the condition, but I am looking for something like this:
if (...)
$facebookEnabled=false

what is the right statement to replace $facebookEnabled=false ?
You see, I am not trying to see if facebook login is disabled, i wanna make it disabled upon some known condition.
by
Again I would say refer my answer with your condition.
by
Got it now, thank you.
by
You are welcome
by
from what I understood for such a combination of conditions:
if (strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret')) && 10<0){
facebook login should not be displayed(as 10 is not less than 0), but it still does! I made that change exactly where you mentioned in the qa-facebook-layer.php file, but it does not help!
by
But what is 10 and 0 ? I mean from where you are getting the value? Value must be come from the system to determine whether it is available or not.
by
10<0 It is a false statement which makes the entire statement false. you say if the condition is false the facebook login won't show, isnt it? that's not true! besides why waste time on chit chat? if you know the answer why dont you be generous and share it with us in more clear way? if you dont that's understandable
...