Could someone tell me how customize the height of Google +1 button?
Here's my page http://cinema5.ru/Vozhd-Raznokozhih
The height of Google+1 button in 24px, I need it 20 to look similar with others (facebook_like, and twitter)
Found this solution: http://drupal.org/node/1203442#comment-4678780 Which is for version 6.x-3.0-beta1 of this module

But in my version (7.x-4.0-alpha1) there's no "Custom services" tab or, at least, I didn't find any. Instead, there's a field "AddThis custom configuration code" with exampe: var addthis_config = {}

I tried to use some parameters from <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>. (source)
As far as I understand I need to put g:plusone:size="medium" in that custom configuration code field.
But adding var addthis_config = {g:plusone:size="medium"} didn't help at all :)

Any advice is appreciated.

Comments

switch’s picture

Component: Documentation » User interface
sydo’s picture

Was struggling with this too. Still looking for a solution to use the Addthis field within a content and getting the G+1 button a smaller size.

If you do not need a field but can settle with a block then you can do the following:

First enable PHP filter module as explained in https://drupal.org/node/1046700
Create a block and add the Addthis code to it in the block body and set the text type to php.
Save the block and place it on your page.

The following code will do within the block body (more can be found on the addthis site):

<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51da8b4f29e1b1bc"></script>
sydo’s picture

After checking some code in the Addthis modules it seems that I found the solution.

Open file ...\modules\addthis\addthis_displays\addthis_displays.addthis.inc
Change the word standard into medium in the following code:

case 'google_plusone':
        $items[$service]['#attributes'] += array(
          'g:plusone:size' => ($orientation ? 'standard' : 'tall')
        );

Did the trick for me.

gisle’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This support request is 3 years old and is about an outdated version of the module.

A solution is suggested in #3, but is not responded to.

I hope that this means that it is fixed, or that the problem is no longer relveant, so I am closing.