Topic-icon Logout button and Automatic Logon

Active Subscriptions:

None
14 years 2 weeks ago #23150 by ventluc
Hello!

I installed Joomla 2.5 and Jlinked 1.1.0 and JFBConnect 4.1.2. I have two problems:

1) If a user registers in my web site using his Facebook (Linkedln) credentials the second time he connects to it he is logged in automatically with his Facebook (or Linkedln) credentials even if he didn't push the "Connect with Facebook" (Linedln) button!! Why? Is it possible that a user is logged in my website only if he completes the login procedure through the login form?

2) I would like that when I user connects to and log in my web site the Welcome message ("Benvenuto Luca, ") and the logout button appear in the same line. Is it possible? How can I do? In fact the standard view shows the Welcome message and the logout button in two different lines (with the welcome message first). I tried to modify the logout.php file but without success. In the logout.php file I have found a function getLogoutButton() that should return html code but I couldn't find the code because it seems to be defined somewhere else...but where? :(

Thanks a lot in advance.

Luca
The topic has been locked.
Support Specialist
14 years 1 week ago #23180 by alzander
1) It sounds like you have the Automatically Login Facebook Users feature enabled. If so, when a users visits your site that has already approved your Facebook Application, JFBConnect will act as though they just clicked the "Login With Facebook" button. If you don't want that behavior, you should disable that feature.

There is no Automatically login LinkedIn users feature. There isn't any way that we know that a user should automatically be logged in with their LinkedIn credentials since LinkedIn operates very differently than Facebook.

2) To put those on the same line, try simply adding the following to your template's CSS file:
.logout-button {float:left;}

Hope that helps, but if not, let us know!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 1 week ago #23181 by ventluc
Ok,

about point 2) I haven't understood which CSS file I have to modify.....which CSS file do you refer to?

Thanks a lot in advance!!

Luca
The topic has been locked.
Support Specialist
14 years 1 week ago #23191 by alzander
It's best if you put it in your own template's CSS file. Every template is different though, so I cant tell you the exact file. Some have special files meant for 'overides' by the users, others just recommend adding it at the end of the main template.css file (which usually exists).

That code can pretty much go in any CSS file that is going to load on the page though, just so you know.

Hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 1 week ago #23206 by ventluc
Ok,

but forget for a moment the template's css file. As I told you in you code (logout.php) there is a php function called getLogoutButton() that I suppose it defines html code of logout button: where is it defined? Then you told I must define a "logout-button" style (or class) in my template.css. This means that you used this css style in your code. If I am right I suppose you defined a css default file in the case that there is no "logout-button" style defined in the template.css of the user. In fact what happen if no "logout-button" style is defined somewhere? If I suppose correctly where is you default css file with "logout-button" style defined?
Let me know, thanks.
The topic has been locked.
Support Specialist
14 years 1 week ago #23211 by alzander
Luca,
No, JFBConnect doesn't apply any styles to that button by default. We include the class declaration so that you can easily override the 'default' styles from the browser that are applied to any div. Without us applying the 'logout-button' (and other) styles, you'd have to do a lot more work to style different elements of the page.

If you wanted to change the name of the class from logout-button, or you wanted to change the actual HTML of the logout button code that we insert, I can gladly let you know where that function is defined. I think that's a bit more than you're looking for though.

Hope that makes sense!
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 1 week ago #23228 by ventluc
Ok Alex,

thanks a lot for your support!! Anyway can you tell me where getLogoutButton() function is defined so that I can change the actual HTML of the logout button code? It will be a good programming exercise! :)

Luca
The topic has been locked.
Support Specialist
14 years 1 week ago #23232 by alzander
The code for the getLogoutButton() function can be found in the /components/com_jfbconnect/libraries/facebook.php file. It should be pretty obvious where the actual HTML code is in there. The main thing that's happening in that function is that the translated text for your language is fetched to make the Logout With Facebook button show correctly for your language.

Hope that helps, but if you need anything else, just let us know!

Alex
The topic has been locked.
Active Subscriptions:

None
14 years 1 week ago #23412 by ventluc
Hello Alex,

I tried to add the following code in my css template:

.logout-button {float:left;}

but without result...in fact as you can see in the screen shoot attached to this message the "Logout" button is under the text "Benvenuto Luca Ventura" and I would like them both in the same line (the button must appear in the same line but on the right of "Benvenuto Luca Ventura").

Let me know.

Thanks in advance.

Luca


File Attachment:
The topic has been locked.
Active Subscriptions:

None
14 years 1 week ago #23413 by ventluc
Sorry for the past message...I emptied the cache of the browser and now it works!!! Thanks a lot!!
The topic has been locked.