function fbconnect_invite_friends_page in Facebook Connect 7.2
Same name and namespace in other branches
- 8.2 fbconnect_invite/fbconnect_invite.module \fbconnect_invite_friends_page()
- 6.2 fbconnect_invite/fbconnect_invite.module \fbconnect_invite_friends_page()
Render the facebook friends invite form.
1 string reference to 'fbconnect_invite_friends_page'
- fbconnect_invite_menu in fbconnect_invite/
fbconnect_invite.module - Implements hook_menu().
File
- fbconnect_invite/
fbconnect_invite.module, line 112
Code
function fbconnect_invite_friends_page() {
global $base_url;
global $user;
$site = variable_get('site_name', $base_url);
$type = check_plain(variable_get('fbconnect_invite_name', $site));
$join_btn = check_plain(variable_get('fbconnect_invite_label', t('Become a Member!')));
$invite_msg = check_plain(variable_get('fbconnect_invite_msg', t('Enjoy!')));
$action_txt = check_plain(t('Please select the Facebook friends you want to invite'));
$invite_dest = isset($_GET['destination']) ? $_GET['destination'] : '';
$accept_url = url('fbconnect/invite/accept/' . $user->uid, array(
'absolute' => TRUE,
'query' => array(
'destination' => urlencode($invite_dest),
),
));
$content = "{$invite_msg} <fb:req-choice url=\"{$accept_url}\" label=\"{$join_btn}\" />";
$request_form_attributes = array(
'method' => 'POST',
'action' => url($invite_dest, array(
'absolute' => TRUE,
)),
'type' => $type,
'content' => $content,
'invite' => TRUE,
);
$friends_selector_attributes = array(
'cols' => "6",
'rows' => "6",
'max' => "35",
'showborder' => "false",
'actiontext' => $action_txt,
'bypass' => "cancel",
);
return theme('fbconnect_invite_form', array(
'request_form_attributes' => $request_form_attributes,
'friends_selector_attributes' => $friends_selector_attributes,
));
}