Support » Plugin: Share Buttons by AddThis » [Plugin: AddThis featuring Sharing Buttons / Facebook Like / Tweet Button] Custom Button styles not

  • Resolved jamk



    I started updating my WPMU sites to WP3.1 and noticed that AddThis-plugin has developed a lot from the 1.6.x versions I’m currently using. Especially the Setup-page has been overhauled. Unfortunately, I can’t anymore find an option to choose my own custom style which I’ve added to the addthis_social_widget.php file into the array of styles at line 49: $addthis_styles = array(...)

    The Setup-page apparently doesn’t take account the added styles anymore. In the old version they automatically appeared in the drop-down option called “Button style”. I guess in the new version they should appear in the “Basic” section under the “additional style options” link.

    Please take account that many ppl have added their own styles to use in blogs etc and fix this!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • After looking into this myself later, I found out that one needs to add own button styles nowadays to a different slot in the addthis_social_widget.php file. Now they must be added to $addthis_new_styles array. I copied the Plus sign share style and changed the images and it’s now working. Thanks for all the moral support btw 😉


    Can you elaborate more on what you did. Do you mean that you started with this and then customized it?

    $addthis_styles = array(
                          'share' => array('img'=>'lg-share-%lang%.gif', 'w'=>125, 'h'=>16),
                          'bookmark' => array('img'=>'lg-bookmark-en.gif', 'w'=>125, 'h'=>16),
                          'addthis' => array('img'=>'lg-addthis-en.gif', 'w'=>125, 'h'=>16),
                          'share-small' => array('img'=>'sm-share-%lang%.gif', 'w'=>83, 'h'=>16),
                          'bookmark-small' => array('img'=>'sm-bookmark-en.gif', 'w'=>83, 'h'=>16),
                          'plus' => array('img'=>'sm-plus.gif', 'w'=>16, 'h'=>16)
                          /* Add your own style here, like this:
                            , 'custom' => array('img'=>'', 'w'=>16, 'h'=>16) */
    $addthis_new_styles = array(
                          'plus' => array('img'=>'sm-plus.gif', 'w'=>16, 'h'=>16)

    If so, then I am having no luck at all with that code!

    I am using this to include in my theme. Is this correct?

    do_action( 'addthis_widget' )

    It seems that $addthis_styles doesn’t have any function anymore – all the available button styles are in the $addthis_new_styles array. That array has different structure – I duplicated the last one and modified according to my own buttons, like this:

    $addthis_new_styles = array(
        'small_toolbox' => array( 'src' =>  '<div class="addthis_toolbox addthis_default_style addthis_" %s ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>', 'img' => 'toolbox-small.png', 'name' => 'Small Toolbox', 'above' => 'hidden ', 'below' => ''
        ), // 32x32
        'jamk' => array( 'src' => '<div><a class="addthis_button" href="" %s><img src="/wp-content/plugins/addthis/img/jamk-button.gif" width="59" height="16" alt="JAMK Addthis" style="border:0"/></a></div>', 'img' => 'jamk-button.gif', 'name' => 'JAMK Addthis', 'above' => 'hidden ', 'below' => 'hidden'
        ), // JAMK

    The only problem is that every time the plugin is updated, I need to reinsert the added style to the source – it’d be better if they could be added from theme’s functions.php or such place. Anyone wanna help me with that? 🙂

    I don’t call the addthis-widget from my theme, I use the plugin’s own insert method which suits me well (and gives individual bloggers the option to disable it if desired)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: AddThis featuring Sharing Buttons / Facebook Like / Tweet Button] Custom Button styles not’ is closed to new replies.