by lliss: make config array generation into a single funciton and fix issue on the admin page for static button language selection.
#1437354 by kbemelmans and jonhattan - Adding display suite integration.
by lliss: Add better help text for localization options to the config pages.
#1668256 by goye2cz: Fixed the broken language setting on the dynamic fblike button.
by lliss make the send attribute explicit. See iframe code generated at http://developers.facebook.com/docs/reference/plugins/like/ for more info.
#1570374 by jgtrescazes, Stakcreativa: Fixes the display issue caused by the iframe having 'px' string after the width and height values. Also makes the language parameter optional.
#1664410 by lliss: Fixed the display failure of the fb button by changing the show_faces options that are stored as drupal variables to booleans and then outputting 'true' and 'false' text when generating the ifrome.
* Settings for the dynamic FB button in full node viewmode and teaser viewmode.
*/
functionfblikebutton_dynamic_settings(){
$fblikebutton_node_options=node_type_get_names();
$form['fblikebutton_dynamic_description']=array(
'#markup'=>'<p>'.t('Configure the dynamic Like button. This Like button will like the URL you\'r visiting. You can set the content types on which the button displays, choose to display it in the content block or it\'s own block and set the appearance.').'</p>',
'#description'=>t('If <em>Content area</em> is selected, the button will appear in the same area as the node content. If <em>Own block</em> is selected the Like button gets it\'s own block, which you can position at the '.l(t('block page'),'admin/structure/block').'. When you select <em>Links area</em> the Like button will be visible in the links area, usually at the bottom of the node (When you select this last option you may want to adjust the Appearance settings).'),
'#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>'),
'#description'=>t('Show profile pictures below the button. Only works if <em>Layout style</em> (found above) is set to <em>Standard</em> (otherwise, value is ignored).'),
'#description'=>t('The weight determines where, at the content block, the like button will appear. The larger the weight, the lower it will appear on the node. For example, if you want the button to appear more toward the top of the node, choose <em>-40</em> as opposed to <em>-39, -38, 0, 1,</em> or <em>50,</em> etc. To position the Like button in its own block, go to the '.l(t('block page'),'admin/structure/block').'.'),
'#description'=>t('Specific language to use. Default is English. Examples:<br />French (France): <em>fr_FR</em><br />French (Canada): <em>fr_CA</em><br />More information can be found at http://developers.facebook.com/docs/internationalization/ and a full XML list can be found at http://www.facebook.com/translations/FacebookLocales.xml'),
'#markup'=>'<p>'.t('Set the static URL to like with the button. This Like button will like the given URL, no matter on which page it is displayed. To position this block go the '.l(t('block page'),'admin/structure/block').'.</p>'),
'#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>'),
'#description'=>t('Specific language to use. Default is English. Examples:<br />French (France): <em>fr_FR</em><br />French (Canada): <em>fr_CA</em><br />More information can be found at http://developers.facebook.com/docs/internationalization/ and a full XML list can be found at http://www.facebook.com/translations/FacebookLocales.xml'),
form_set_error('fblikebutton_iframe_width',t('The width of the like button must be a positive number that is greater than 0 (examples: 201 or 450 or 1024).'));
form_set_error('fblikebutton_iframe_height',t('The height of the like button must be a positive number that is greater than 0 (examples: 201 or 450 or 1024).'));
form_set_error('fblikebutton_bl_iframe_width',t('The width of the like button must be a positive number that is greater than 0 (examples: 201 or 450 or 1024).'));
form_set_error('fblikebutton_bl_iframe_height',t('The height of the like button must be a positive number that is greater than 0 (examples: 201 or 450 or 1024).'));
description = Adds a configurable <em>Like</em> button for Facebook to each selected node type, as well as a configurable block with a <em>Like</em> box in it.
core = 7.x
configure = admin/config/fblikebutton
; Information added by drupal.org packaging script on 2012-11-26
* Remove old values and replace with properly-formatted values, as some sites are experiencing problems from previous update.
*/
functionfblikebutton_update_7201(){
// Just delete the variable and inform the administrator that the value has been set to false, and if it should be true, then they need to manually set it to true.
// Too much confusion has occurred with the word "true" and the PHP boolean TRUE, and it's causing the button not to show up on some sites.
variable_del('fblikebutton_show_faces');
variable_set('fblikebutton_show_faces',TRUE);
variable_del('fblikebutton_bl_show_faces');
variable_set('fblikebutton_bl_show_faces',TRUE);
cache_clear_all();
drupal_set_message(t('The Facebook Like Button has been updated successfully. However, if you previously set the values of "show faces" to "Do not show faces", you will need to set those values back to "Do not show faces" now by visiting the settings page for both the').' '.l(t('static'),'admin/config/fblikebutton/static').' '.t('and the').' '.l(t('dynamic'),'admin/config/fblikebutton/dynamic').' '.t('settings pages for the Facebook Like Button.'));
'description'=>'Configure the settings for the static Like button as it appears in the block (liking a given url). Use this to like for example your Facebook fanpage.',
'#markup'=>'<p>'.t('To configure the URL and the appearance of the button go to the '.l(t('static Like button settings'),'admin/config/fblikebutton/static').'. Make sure you set the right permissions on the '.l(t('permissions page'),'admin/people/permissions').'.</p>'),
'#markup'=>'<p>'.t('To configure the visibility and the appearance of the button go to the '.l(t('dynamic Like button settings'),'admin/config/fblikebutton/dynamic').'. You can enhance the visibility settings by using the settings on this page. Make sure you set the right permissions on the '.l(t('permissions page'),'admin/people/permissions').'.</p>'),