Support

Pre-sales

#41629 Shortcodes for placing social login buttons in custom places

Posted in ‘Pre-sales and Account Questions’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by on Sunday, 23 March 2025 15:17 CDT

BrendanC123

Hi,

We are using a custom login form that we developed instead of the standard Joomla login./signup forms.

 

Is it possible for us to integrate the Akeeba social login buttons in areas other that the standard Joomla login/signup pages by using shortcodes or a different approach?

 

We basically want to keep our existing customized signup/login flow, but to add Akeeba social login buttons to it.

 

Thanks a lot. 

nicholas
Akeeba Staff
Manager

Of course you can. Akeeba SocialLogin simply uses Joomla 4's additional login buttons feature. This is a feature I had contributed myself about 5 years ago, to end the awkward tendency of every login method developer that doesn't rely on just a username and password to invent our own hack-ish method to show our login buttons. Now there is a standard in core Joomla.

All you have to do as a login form developer to consume this API is to use Joomla's helper static method, \Joomla\CMS\Helper\AuthenticationHelper::getLoginButtons() and render its results. Do remember to pass your login form's id attribute value as the sole parameter to this helper method; it's required for additional login buttons to work properly.

You can see how to render the results in modules/mod_login/tmpl/default.php, namely the block that starts with <?php foreach ($extraButtons as $button) :. The $extraButtons variable is simply the result of calling the helper method.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

BrendanC123

Cheers - struggling with this to be honest.

We are trying to integrate it within an existing <form> tag, using the latest Chronoforms.

Getting a few errors and I am guessing it's linked to the form component we are using.

 

 

     

nicholas
Akeeba Staff
Manager

Yep, you definitely need the FORM tag's id attribute to do that. You may want to reach out to the form component's developer to see if there is a way to get that information programmatically. From that point it's easy; it's just what I explained above.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system

This ticket has been automatically closed.

All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!