[SOLVED]Logout button on profile ?

1 year 8 months ago - 1 year 8 months ago #330379 by crony
[SOLVED]Logout button on profile ? was created by crony
Hello,
I think it was the case natively, but I'm not sure anymore. I'd like to add a logout button on the profile of the user, I'd like to make it clean...
Could you advise to do that ?
Thanks !
 

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

1 year 8 months ago #330390 by krileon
Replied by krileon on topic Logout button on profile ?
A logout button where exactly? Normally this would just be displayed by your CB Login Module or a Joomla menu item.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 8 months ago #330391 by crony
Replied by crony on topic Logout button on profile ?
Sorry, I indeed did not specify.
I mean in the profile page directly. I might want it under "edit your profile" as an other option.

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

1 year 8 months ago #330394 by krileon
Replied by krileon on topic Logout button on profile ?
Only way to insert new menu entries to CB Menu is via API. CB Auto Actions can do this using its CB Menu action type. You can place it elsewhere on profile by using a Custom HTML field as well and just supplying the HTML for your link with button Bootstrap CSS classes. You can also easily output link to logout anywhere substitutions are supported using the following.

[cb:url location="logout" /]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 8 months ago - 1 year 8 months ago #330401 by crony
Replied by crony on topic Logout button on profile ?
Well, in fact the url with this [cb:url location="logout" "/] is broken used as an html field in CB profile. And it's not also rendered as a proper url.
Also tried this
[cb:url location=%22logout%22 /]
But as the field was not rendered as a proper url, does not work better.
My css is perfectly working here.

I also tried directly in the "Title" field this :
[cb:url location="logout" /]
And here I have the url properly shown, but I can't show only the title of the field, and the CSS is not applying in this case, or is there a substitution possible of the url by a link.

So I ended up with :
<a class="uk-button uk-button-primary" href="index.php?option=com_comprofiler&view=logout" title="Logout">
    Logout
</a>
I guess this is okay to do like this ?
I noticed you may also use the _UE_MENU, but once again, substitution won't work as url !
Tried the CB Sub Action, but I didn't get exactly how it works, well next time... 

J! 4.x - CB 2.7.3
Attachments:

Please Log in to join the conversation.

1 year 8 months ago #330409 by krileon
Replied by krileon on topic Logout button on profile ?

Well, in fact the url with this [cb:url location="logout" "/] is broken used as an html field in CB profile. And it's not also rendered as a proper url.
Also tried this

It only works where substitutions are supported and you have an extra quote before the closing tag. Substitutions are not supported in the CB Menu tab parameters. My suggestion was for using CB Auto Actions to add a new menu item.

So I ended up with :

That should work perfectly fine. If you have a Joomla menu item for CBs logout page you can also add &Itemid=MENU_ID_HERE so it will use that menu item.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.219 seconds

Facebook Twitter LinkedIn