Codoforum related discussions
social login

How to show the social sign up buttons of twitter google and Facebook in the register page as well, as of now its only being displayed in the login page.

How to show the social sign up buttons of twitter google and Facebook in the register page as well, as of now its only being displayed in the login page.

You can directly edit the plugin uni_login in
sites/default/plugins/uni_login/uni_login.php

Make the following changes:

In body() around line 212

Replace

        $container = $dom->getElementById('codo_register_form');

with

        $container = $dom->getElementById('codo_login_container');
        $container2 = $dom->getElementById('codo_register_form');

Then

Replace

        $container->innertext = $html . $container->innertext;

with

        $container->innertext = $html . $container->innertext;
        $container2->innertext = $html . $container2->innertext;

Then add the folowing at the end of the file

CODOF\Hook::add('tpl_before_user_register', array($uni, "head"));
CODOF\Hook::add('tpl_after_user_register', array($uni, "body"));

You should now be able to see the login buttons in the register page.

You can directly edit the plugin `uni_login` in `sites/default/plugins/uni_login/uni_login.php` Make the following changes: In body() around line 212 Replace ``` $container = $dom->getElementById('codo_register_form'); ``` with ``` $container = $dom->getElementById('codo_login_container'); $container2 = $dom->getElementById('codo_register_form'); ``` Then Replace ``` $container->innertext = $html . $container->innertext; ``` with ``` $container->innertext = $html . $container->innertext; $container2->innertext = $html . $container2->innertext; ``` Then add the folowing at the end of the file ``` CODOF\Hook::add('tpl_before_user_register', array($uni, "head")); CODOF\Hook::add('tpl_after_user_register', array($uni, "body")); ``` You should now be able to see the login buttons in the register page.
172
1
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft