WordPress.org

Support

Support » Plugins and Hacks » AddToAny Share Buttons » [Resolved] [Plugin: AddToAny: Share/Bookmark/Email Button] AddToAny Button in RSS feeds

[Resolved] [Plugin: AddToAny: Share/Bookmark/Email Button] AddToAny Button in RSS feeds

  • Dear AddToAny authors/users,

    If I choose to “Display at the bottom of posts in the feed”, the button indeed shows, but the generated code looks like this:

    <p><img alt=”Share” src=”http://www.108.bz/share_save_171_16_orange.png”> </p>

    (the “_orange.png” suffix it’s because I’m using a custom image for the button)

    There’s no mention of the Post’s name/link, why? Is that the expected behaviour? I briefly peeked at the source code, the “ADDTOANY_SHARE_SAVE_BUTTON” function seems to ignore the linkname/linkurl args, when dealing with feed content…

    Could you please confirm?

    thanks a lot for your help,
    ciao,

    Giuliano

Viewing 6 replies - 1 through 6 (of 6 total)
  • Sorry, here’s the verbatim code:

    <p><a href="http://www.addtoany.com/share_save" target="_blank"><img alt="Share" src="http://www.108.bz/share_save_171_16_orange.png"></a> </p>


    Giuliano

    The patch below (against AddToAny plugin version 0.9.9.7.2) solves the issue for me:

    ———-8<———-8<———-

    *** add-to-any.0.9.9.7.2/add-to-any.php	Thu Jan  6 11:22:19 2011
    --- add-to-any/add-to-any.php	Wed Jan 12 23:49:08 2011
    ***************
    *** 230,235 ****
    --- 230,239 ----
      		. $style . $button_target
      		. '>' . $button . '</a>' . $html_wrap_close . $html_container_close;
    
    +     if( is_feed() ) {
    +         $button_html = preg_replace('/( href="http:\/\/www\.addtoany\.com\/share_save)"/','\1'."?linkurl=".$linkurl_enc."&linkname=".$linkname_enc.'"',$button_html); // inject linkurl/linkname
    +     }
    +
      	// If not a feed
      	if( !is_feed() ) {
      		if (function_exists('is_ssl') ) // @since 2.6.0
    ***************
    *** 1026,1029 ****
      add_filter("plugin_action_links", 'A2A_SHARE_SAVE_actlinks', 10, 2);
    
    ! ?>
    \ No newline at end of file
    --- 1030,1033 ----
      add_filter("plugin_action_links", 'A2A_SHARE_SAVE_actlinks', 10, 2);
    
    ! ?>

    ———-8<———-8<———-

    ciao,

    Giuliano

    Plugin Author micropat

    @micropat

    Thanks, Giuliano, you found a bug! Previous versions had the required parameters but recent versions failed to consider the sharing button in the RSS feed.

    This will be fixed in the next release. Thanks again!

    Plugin Author micropat

    @micropat

    And an awesome patch?! Giuliano, you are a rock star!

    Plugin Author micropat

    @micropat

    Fixed in version .0.9.9.7.3.

    Just tried it: works like a charm.
    Thanks Micropat for the great response time! And thank you also for providing the best WordPress sharing/bookmarking “button” (I really mean that after having tested all of the competition).

    ciao,

    Giuliano

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: AddToAny: Share/Bookmark/Email Button] AddToAny Button in RSS feeds’ is closed to new replies.
Skip to toolbar