diff --git a/fb_likebox.module b/fb_likebox.module index e533e9a..0ce9cf4 100644 --- a/fb_likebox.module +++ b/fb_likebox.module @@ -35,8 +35,8 @@ function fb_likebox_block_configure($delta = '') { $form['fb_likebox_display_settings']['fb_likebox_url'] = array( '#type' => 'textfield', '#title' => t('Facebook Page URL'), - '#default_value' => variable_get('fb_likebox_url', 'https://www.facebook.com/FacebookDevelopers'), - '#description' => t('Enter the Facebook Page URL. I.e.: https://www.facebook.com/FacebookDevelopers'), + '#default_value' => variable_get('fb_likebox_url', 'http://www.facebook.com/wikisaber.es'), + '#description' => t('Enter the Facebook Page URL. I.e.: http://www.facebook.com/wikisaber.es'), '#required' => TRUE, ); $form['fb_likebox_display_settings']['fb_likebox_colorscheme'] = array( @@ -105,6 +105,13 @@ function fb_likebox_block_configure($delta = '') { '#description' => t('For Places: specifies whether the stream contains posts from the Places wall or just checkins from friends.'), '#required' => TRUE, ); + $form['fb_likebox_display_settings']['fb_likebox_iframe_title'] = array( + '#type' => 'textfield', + '#title' => t('iFrame title attribute'), + '#default_value' => variable_get('fb_likebox_iframe_title', 'Like us on Facebook!'), + '#description' => t('The value of the iFrame title attribute.'), + '#required' => TRUE, + ); // Theming settings. $form['fb_likebox_theming_settings']['fb_likebox_width'] = array( '#type' => 'textfield', @@ -142,6 +149,7 @@ function fb_likebox_block_configure($delta = '') { '#description' => t('Specifies whether or not to show a border around the plugin. Set to false to style the iframe with your custom CSS.'), '#required' => TRUE, ); + return $form; } } @@ -153,7 +161,7 @@ function fb_likebox_block_view($delta = '') { switch ($delta) { case '0': // Get the values given in the admin form. - $fb_url = variable_get('fb_likebox_url', 'https://www.facebook.com/FacebookDevelopers'); + $fb_url = variable_get('fb_likebox_url', 'http://www.facebook.com/wikisaber.es'); $fb_colorscheme = variable_get('fb_likebox_colorscheme', 'light'); $fb_header = variable_get('fb_likebox_header', 'true'); $fb_stream = variable_get('fb_likebox_stream', 'true'); @@ -164,11 +172,25 @@ function fb_likebox_block_view($delta = '') { $fb_height = variable_get('fb_likebox_height', '556'); $fb_show_border = variable_get('fb_likebox_show_border', 'true'); $fb_force_wall = variable_get('fb_likebox_force_wall', 'false'); + $fb_iframe_title = variable_get('fb_likebox_iframe_title', 'Like us on Facebook!'); // Set the subject of the block - $block['subject'] = t('@site_name on Facebook', array('@site_name' => variable_get('site_name', 'Default site name'))); + $block['subject'] = t('@site_name on Facebook', array( + '@site_name' => variable_get('site_name', 'Default site name')) + ); // Call to the theming function. - $block['content'] = theme('fb_likebox_facebook', array('fb_url' => $fb_url, 'fb_colorscheme' => $fb_colorscheme, 'fb_header' => $fb_header, 'fb_stream' => $fb_stream, - 'fb_show_faces' => $fb_show_faces, 'fb_scrolling' => $fb_scrolling, 'fb_width' => $fb_width, 'fb_width_units' => $fb_width_units, 'fb_height' => $fb_height, 'fb_show_border' => $fb_show_border, 'fb_force_wall' => $fb_force_wall)); + $block['content'] = theme('fb_likebox_facebook', array( + 'fb_url' => $fb_url, + 'fb_colorscheme' => $fb_colorscheme, + 'fb_header' => $fb_header, + 'fb_stream' => $fb_stream, + 'fb_show_faces' => $fb_show_faces, + 'fb_scrolling' => $fb_scrolling, + 'fb_width' => $fb_width, + 'fb_width_units' => $fb_width_units, + 'fb_height' => $fb_height, + 'fb_show_border' => $fb_show_border, + 'fb_force_wall' => $fb_force_wall, + 'fb_iframe_title' => $fb_iframe_title)); return $block; } } @@ -191,6 +213,7 @@ function fb_likebox_block_save($delta = '', $edit = array()) { variable_set('fb_likebox_height', check_plain($edit['fb_likebox_height'])); variable_set('fb_likebox_show_border', check_plain($edit['fb_likebox_show_border'])); variable_set('fb_likebox_force_wall', check_plain($edit['fb_likebox_force_wall'])); + variable_set('fb_likebox_iframe_title', check_plain($edit['fb_likebox_iframe_title'])); } } @@ -208,10 +231,11 @@ function fb_likebox_theme($existing, $type, $theme, $path) { 'fb_show_faces' => NULL, 'fb_scrolling' => NULL, 'fb_width' => NULL, - 'fb_width_unit' => NULL, + 'fb_width_units' => NULL, 'fb_height' => NULL, 'fb_show_border' => NULL, 'fb_force_wall' => NULL, + 'fb_iframe_title' => NULL, ), 'template' => 'fb_likebox', 'path' => $path . '/templates', diff --git a/templates/fb_likebox.tpl.php b/templates/fb_likebox.tpl.php index 4dda3c0..000a3ea 100644 --- a/templates/fb_likebox.tpl.php +++ b/templates/fb_likebox.tpl.php @@ -11,5 +11,6 @@ src="//www.facebook.com/plugins/likebox.php?href=&width=" frameborder="0" style="border: none; overflow: hidden; width: ; height: px;" -allowTransparency="true"> +allowTransparency="true" +title="">