aboutsummaryrefslogtreecommitdiff
path: root/fblikebutton.module
diff options
context:
space:
mode:
Diffstat (limited to 'fblikebutton.module')
-rw-r--r--fblikebutton.module12
1 files changed, 11 insertions, 1 deletions
diff --git a/fblikebutton.module b/fblikebutton.module
index 09ffa44..0992cb4 100644
--- a/fblikebutton.module
+++ b/fblikebutton.module
@@ -68,6 +68,7 @@ function fblikebutton_node_view($node, $view_mode) {
'width' => variable_get('fblikebutton_iframe_width', '450'),
'send' => variable_get('fblikebutton_send', 'true'),
'other_css' => variable_get('fblikebutton_iframe_css', ''),
+ 'language' => variable_get('fblikebutton_language', 'en_US'),
);
if ($show) {
if ($showonteasers == 0) {
@@ -200,6 +201,12 @@ function fblikebutton_block_configure($delta = '') {
'#default_value' => variable_get('fblikebutton_bl_iframe_css', ''),
'#description' => t('Extra css attributes needed to make the iframe behave for your specific requirements. Will not necessarily overwrite existing styling. To alter the dimensions of the iframe, use the height and width fields found above.<br/>Example: <em>float: right; padding: 5px;</em>'),
);
+ $form['block']['fblikebutton_bl_language'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Language'),
+ '#default_value' => variable_get('fblikebutton_language', 'en_US'),
+ '#description' => t('Specific language to use. Default is English. Examples:<br/>French (France): <em>fr_FR</em><br/>French (Canada): <em>fr_CA</em>'),
+ );
}
return $form;
}
@@ -218,6 +225,7 @@ function fblikebutton_block_save($delta = '', $edit = array()) {
variable_set('fblikebutton_bl_iframe_width', $edit['fblikebutton_bl_iframe_width']);
variable_set('fblikebutton_bl_iframe_height', $edit['fblikebutton_bl_iframe_height']);
variable_set('fblikebutton_bl_iframe_css', $edit['fblikebutton_bl_iframe_css']);
+ variable_set('fblikebutton_bl_language', $edit['fblikebutton_bl_language']);
}
}
@@ -240,6 +248,7 @@ function fblikebutton_block_view($delta = '') {
'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);
}
@@ -257,7 +266,8 @@ function _fblikebutton_field($webpage_to_like, $conf) {
$font = $conf['font'];
// $send = $conf['send'];
$other_css = $conf['other_css'];
- $params = "href={$webpage_to_like}&layout={$layout}&show_faces={$show_faces}&width={$width}px&font={$font}&height={$height}px&action={$action}&colorscheme={$colorscheme}";
+ $language = $conf['language'];
+ $params = "href={$webpage_to_like}&layout={$layout}&show_faces={$show_faces}&width={$width}px&font={$font}&height={$height}px&action={$action}&colorscheme={$colorscheme}&locale={$language}";
$src = htmlentities($params);
$output = '<iframe src="https://www.facebook.com/plugins/like.php?' . $src . '" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: ' . $width . 'px; height: ' . $height . 'px;' . $other_css . '" allowTransparency="true"></iframe>';
return $output;