function fblikebutton_block_view in Facebook Like Button 7
Same name and namespace in other branches
- 7.2 fblikebutton.module \fblikebutton_block_view()
Implementation of hook_block_view()
File
- ./
fblikebutton.module, line 235 - Adds Facebook's "Like" button to each selected node type. Adds a block with a global static value where users can "Like" the URL set by admins.
Code
function fblikebutton_block_view($delta = '') {
global $base_url;
$block = array();
switch ($delta) {
case 'fblikebutton_block':
default:
$addr = variable_get('fblikebutton_block_url', $base_url);
$conf = array(
'layout' => variable_get('fblikebutton_bl_layout', "standard"),
'action' => variable_get('fblikebutton_bl_action', "like"),
'color_scheme' => variable_get('fblikebutton_bl_color_scheme', "light"),
'show_faces' => variable_get('fblikebutton_bl_show_faces', "false"),
'font' => variable_get('fblikebutton_bl_font', "arial"),
'height' => variable_get('fblikebutton_bl_iframe_height', '80'),
'width' => variable_get('fblikebutton_bl_iframe_width', '450'),
'other_css' => variable_get('fblikebutton_bl_iframe_css', ''),
'language' => variable_get('fblikebutton_bl_language', 'en_US'),
);
$block['content'] = _fblikebutton_field($addr, $conf);
}
return $block;
}