It would be great if we could use the Social Login icons as a Block and be able to put it anywhere we like.
I've made an attempt to expose the Social Login icons as a Block, but I did not succeed yet.
People that have code suggestions for that:
have a look at http://drupal.org/sandbox/s1l/1315560
you can easily add it to the function rpx_extras_socialloginicons_contents() and you're set.
(might save some time testing).
Once it's tested I suggest we commit it to the Janrain Engage module.
btw, using these as a block this is probably not the best solution for putting the icons on the registration page
#1207816: Include sign-in icons on the registration page
or for attaching it to the comments, but it would depend on your usecase I guess.
| Comment | File | Size | Author |
|---|---|---|---|
| social-login-icons-block.jpg | 22.63 KB | silkogelman |
Comments
Comment #1
Sk1Zy commentedI want to second this, would really like this feature as well.
Comment #2
Mihai Chiriac commentedAd these lines to the end of rpx_widgets.module file.
It practically takes the code from _rpx_user_login_form_alter() and embed it into a block named "RPX Block Icons".
Comment #3
elBradford commentedThis works for me, but the icons are so TINY. As a workaround I'm using a block with custom PHP that just uses the Engage widgets from their website (script with div). This module really needs some work in terms of block building / ui flexibility. Something like a function that accepts a few arguments and returns some basic html that developers can style with CSS would be just fine with me. Drop that in a block with PHP input style and customize it any way you want.
Comment #4
bulat commentedIt will be really cool if login_form_alter was turned into a separate block as it was done in the code example by Necropsique.
login_form_alter should be done by developers outside the module.
Code above seems to work fine for us.
Comment #5
Max_Headroom commentedI don't know where the above code comes from because I can't find it or the original function ( _rpx_user_login_form_alter() ) in module.
Maybe this was D6?
Anyway, all you need is this code to be put in a custom block or render with the block callback
Just a note, you can only have one "janrainEngageEmbed" ID per page, otherwise nothing shows. So, if you have normal login as well, make sure you disable Jainrain for it in settings.
Comment #6
saltednut@Necropsique - I would suggest posting a patch so its easier for the maintainer to commit your code and people will be able to test it out.