function fbconnect_prompt_page_links in Facebook Connect 6
Same name and namespace in other branches
- 6.2 fbconnect.pages.inc \fbconnect_prompt_page_links()
1 call to fbconnect_prompt_page_links()
- fbconnect_prompt_page in ./
fbconnect.pages.inc - Menu callback. Called when user perform facebook registration
File
- ./
fbconnect.pages.inc, line 17
Code
function fbconnect_prompt_page_links() {
$conf = fbconnect_get_config();
$params = array(
'!site_name' => $conf['invite_name'],
);
$reg_msg = t('Click here to create a new !site_name account with Facebook', $params);
$link_msg = t('Click here to connect your existing !site_name account with Facebook', $params);
$reg_attr = array();
if ($conf['fast_reg_mode']) {
$reg_js = <<<JS
function DoFastRegistration(link) {
FB.Connect.showPermissionDialog("email", function(perm) {
if (perm) {
window.location.href = link.href;
}
});
}
JS;
drupal_add_js($reg_js, 'inline');
$reg_attr = array(
'attributes' => array(
'onclick' => 'DoFastRegistration(this); return false;',
),
);
}
$reg_choice = l($reg_msg, 'fbconnect/register/create', $reg_attr);
$link_choice = l($link_msg, 'user', array(
'query' => 'destination=fbconnect',
));
return array(
$reg_choice,
$link_choice,
);
}