Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
807 views
in Q2A Core by
How could one seperate the facebook button (later openID and others) to have it always in the same place without changing the position after login / logout ?

1 Answer

+1 vote
by
 
Best answer
Use an advanced theme to override function nav($navtype) where $navtype=='user', changing the output order in that case,
by
edited by
I was unable to do so, as I did not find out how to check if the situation is Logged In or Logged out.
But I found a way through css with the classes defined in the script:

.qa-nav-user-item {display:inline; margin-left:6px;} <<<<< no float !

Then adding these classes:

.qa-nav-user-account{float:left;}
.qa-nav-user-login{float:left;}
.qa-nav-user-register{float:left;}
.qa-nav-user-logout{float:right;}

.qa-nav-user-Facebook{float:right;}

So the Facebook button is always in the upper right, should work on the original theme as well..(I hope)

It is not very elegant, but may be someone finds it helpful..

monk333
by
qa_get_logged_in_userid() returns the logged in userid, or null if no user is logged in.
by
edited by
Thanks, this is a nice function. Does it work everywhere ? For example in sidepanel to build a users account box with some info ? Like welcome message and users latest actions from the users page or similar ? - I will play around with that..still learning.

Edit:

Something like

Welcome USER+Avatar, you have actually xxx points You need only yyy to become a (usertitle) . Get x points for any question and y for answers.....
...