WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddToAny
[resolved] [Plugin: AddToAny: Share/Bookmark/Email Button] AddToAny Button in RSS feeds (7 posts)

  1. giuliano108
    Member
    Posted 3 years ago #

    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

  2. giuliano108
    Member
    Posted 3 years ago #

    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

  3. giuliano108
    Member
    Posted 3 years ago #

    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

  4. micropat
    Member
    Plugin Author

    Posted 3 years ago #

    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!

  5. micropat
    Member
    Plugin Author

    Posted 3 years ago #

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

  6. micropat
    Member
    Plugin Author

    Posted 3 years ago #

    Fixed in version .0.9.9.7.3.

  7. giuliano108
    Member
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags