'div', ); $output = ''; if ($not_connected_markup) { $output .= '<' . $options['wrapper'] . ' class=fb_not_connected>' . $not_connected_markup . ''; } if ($connected_markup) { $output .= '<' . $options['wrapper'] . ' class=fb_connected>' . $connected_markup . ''; } return $output; } function theme_fb_login_button($text = NULL, $options = array()) { // Facebook used to provide default text. No longer, apparently. if (!$text) { $text = t('Connect'); } // Merge in defaults $options += array( 'attributes' => array(), 'connected_markup' => NULL, ); if (!isset($options['attributes']['scope'])) { // Which permissions to prompt for? $perms = array(); drupal_alter('fb_required_perms', $perms); if (count($perms)) { $options['attributes']['scope'] = implode(',', $perms); } } $button = '' . ($text ? '' . check_plain($text) . '' : '') . ''; // Show picture instead of button when user is connected. if ($options['connected_markup']) { $button = '
' . $button . '
' . '
' . $options['connected_markup'] . '
'; } return $button; } function theme_fb_username($fbu, $object, $orig) { if (!$fbu || arg(0) == 'admin') { return $orig; } $wrap_pre = "$orig"; $wrap_post = "\n"; $ifcantsee = ''; if ($object->uid && user_access('access user profiles')) { // Provide link if local account. $wrap_pre = $wrap_pre . ''; $wrap_post = '' . $wrap_post; $ifcantsee = 'ifcantsee="' . addslashes(check_plain($object->name)) . '"'; } $fbml = ""; $output = $wrap_pre . $fbml . $wrap_post; return $output; } function theme_fb_user_picture($fbu, $object, $orig) { if (!$fbu) return $orig; // http://developers.facebook.com/docs/reference/fbml/profile-pic $fbml = ""; $wrap_pre = '' . $orig . '
'; $wrap_post = '
'; if ($object->uid && user_access('access user profiles')) { // Provide link to local account. $wrap_pre = $wrap_pre . ''; $wrap_post = '' . $wrap_post; } return $wrap_pre . $fbml . $wrap_post; } function theme_fb_fbml_popup($elem) { // Hide this markup until javascript shows it. $t = '
\n"; $t .= '' . check_plain($elem['#link_text']) .''; $t .= '
'; $t .= $elem['#children']; $t .= "
\n"; return $t; }