'#description'=>t('These settings will render a button <strong>for each node</strong>, using its URL. If you only need a block with a fixed URL like your homepage, or dynamic URL for generic pages, better go to the <a href="@blocks">blocks</a> page to enable and configure the <em>Google +1 Button</em> block.',array('@blocks'=>url('admin/structure/block'))),
'#description'=>t('The button is wrapped in a div <div class="g-plusone-wrapper">[button]</div><br/>. Here you can enter CSS rules to style this wrapper. By default <em>margin: 0 1em 1em 1em;float:right</em><br />To disable totally the wrapper, input the word <em>nowrapper</em>'),
'#description'=>t('By default <em>Aliased</em>. If you change this setting, <strong>be aware</strong> that Google+ will see them as different URLs, so the button will not keep the previous counting.'),
'#tree'=>TRUE,// All the options in this fieldset will be grouped in 1 single variable.
'#collapsible'=>TRUE,
'#description'=>t('Get more information about these options from the documentation of the <a href="@api-doc">Google +1 API</a>.',array('@api-doc'=>'https://developers.google.com/+/plugins/+1button/')),
'#description'=>t('Input the language code you want from <a href="@api-doc">this list</a>. Leave empty to use the default <em>en-Us</em> language.<br/>If, and only if, you have a multi-lingual site using Locale module, then you can input a list of <strong>Google +1 language codes</strong> separated by commas. For example: <em>pt-br,fr,ru</em>',array('@api-doc'=>'https://developers.google.com/+/plugins/+1button/#available-languages')),
'#description'=>t('Location of the script file. By default: <em>page_bottom</em>, for performance reasons. Your theme <strong>must</strong> have the same region name.'),
'#description'=>t('By default enabled. If enabled, the Google+1 JavaScript will be loaded asynchronously, preventing that the browser gets blocked (waiting for the JavaScript load) in the pages where Google+1 button is present.'),
drupal_set_message(t('To finish enabling Google +1 button in your nodes, visit the <a href="@settings">settings</a> page. And remember to check the <a href="@perm">permissions</a> to view the button.',array('@settings'=>url('admin/config/services/google-plusone'),'@perm'=>url('admin/people/permissions',array('fragment'=>'module-google_plusone')))));
}
}
/**
* Implements hook_uninstall().
*/
functiongoogle_plusone_uninstall(){
variable_del('google_plusone_node_types');
variable_del('google_plusone_node_location');
variable_del('google_plusone_weight');
variable_del('google_plusone_block_settings');
variable_del('google_plusone_button_settings');
variable_del('google_plusone_advanced_settings');
}
/**
* 'count' parameter has been deprecated in favor of 'annotation' in the Google +1 API
* Updating variables according to the new API.
*/
functiongoogle_plusone_update_7001(){
// Updating settings of the G+ button for the node
'#description'=>t('Notice that these settings are exclusively for this block and they cover the basic options.<br /> The rest of settings will be taken from the <a href="@sett">general settings</a>.',array('@sett'=>url('admin/config/services/google-plusone'))),
'#title'=>t('URL address to use in the Google +1 button'),
'#type'=>'textfield',
'#default_value'=>$settings['url'],
'#description'=>t('3 different options: <br/><ol><li>Type an fixed, absolute URL. Remember to type the <em>http://</em> part.</li><li>Type <em><front></em></front> to use always your frontpage ($base_url), that is language-aware. </li><li>Leave empty. Then it will be used the current URL address present in that moment in that page where the block is.</li></ol>'),
'#description'=>t('By default aliased. It only will be applied when the previous setting <em>URL</em> has been left empty and it\'s a node page. <br/> If you change this setting, <strong>be aware</strong> that Google+ will see them as different URLs, so the button will not keep the previous counting.'),
'#description'=>t('To help with the layout and placement of the button, it will be rendered by default inside a wrapper: <div class="g-plusone-wrapper"> </div><br/>You can enter CSS rules to style this wrapper. By default <em>text-align:center</em><br />To disable totally the wrapper, input the word <em>nowrapper</em>'),
);
}
elseif($delta=='google_plusone_badge_block'){
$available_styles=array(
'badge'=>t('Standard Badge'),
'smallbadge'=>t('Small Badge'),
'smallicon'=>t('Small Icon'),
'mediumicon'=>t('Medium Icon'),
'largeicon'=>t('Large Icon'),
'no_badge'=>t('No Badge'),
);
$form['g1badge']=array(
'#type'=>'fieldset',
'#title'=>t('Badge Settings'),
'#description'=>t('Notice that these settings are exclusively for this block and they cover the basic options.<br /> The rest of settings will be taken from the <a href="@sett">general settings</a>.',array('@sett'=>url('admin/config/services/google-plusone'))),
'#description'=>t('Copy and paste here the whole URL of your page, including the <em>https://</em> part.<br /> For example: https://plus.google.com/u/0/101560853443212199687'),
'#description'=>t('Choose the style of badge. Preview the styles <a href="@preview" target="_blank">in the Google Developers site</a>',array('@preview'=>'https://developers.google.com/+/plugins/badge/preview')),