Steps to reproduce:
1. Enable the module.
2. Enter the module settings.
Now login button does not appear anywhere.
Reason:
/**
* Implements hook_form_alter().
*/
function friendconnect_form_comment_form_alter(&$form, $form_state) {
global $user;
friendconnect_add_gadget('login');
$form['friendconnect'] = array(
'#type' => 'fieldset',
'#title' => t('Google Friend Connect (leave a quick comment)'),
'#weight' => -1,
'#access' => !$user->uid && variable_get('friendconnect_siteid', ''),
);
$form['friendconnect']['friendconnect_display'] = array(
'#type' => 'markup',
'#prefix' => '
'#value' => t('Loading'),
'#suffix' => '
',
);
}
there is no such hook....
Solution:
/**
* Implements hook_form_alter().
*/
//function friendconnect_form_comment_form_alter(&$form, $form_state) {
function friendconnect_form_alter(&$form, $form_state, $form_id) {
global $user;
if ($form_id == 'user_login_block' || $form_id == 'user_login') {
friendconnect_add_gadget('login');
$form['friendconnect']['friendconnect_display'] = array(
'#type' => 'markup',
'#prefix' => '
'#value' => t('Loading'),
'#suffix' => '
',
);
}
}
and now render $form['friendconnect']['friendconnect_display'] in your corresponding tpl.