I've been working on a major patch to update the AddToAny module for a few days now. In the interim, I see that there have been several new requests pertaining to exactly the items I was working on.
Specifically:
Incorrect URLs for Block view: http://drupal.org/node/482682
Add an AddToAny Subscribe module: http://drupal.org/node/490610
Add to Any button in a block? or similar?: http://drupal.org/node/534756
So, the attached patch does the following:
- Fixes the basic Save/Share block so that it will use the node url and title of the current page, if the current page is a node.
- Fixes the links section Save/Share buttons so that in the blog teaser page each button uses it's corresponding node id and title.
- Adds a Subscribe button block that has independent config options in the block configure page. Included are Feed Name and Feed URL settings. Feed name will default to use the Page Title module front page name if that module is enabled and configured. Otherwise it defaults to the drupal site name setting. The Feed URL defaults to the default site feed.
- Adds some additional description text for the Additional Javascript setting.
- Adds some additional description text for the Custom Image URL setting.
- Adds missing basic button images for both types.
Also attached is a complete images directory that should replace the existing images directory in the current release.
Note that the blocks use the block visibility permissions and do not rely on the permissions page settings at all. The "view addtoany" permission affects only the Save/Share buttons that get embedded into the node links or content.
Finally, I'd considered providing a function that could be used to embed the buttons in theme templates, but decided against it since that could be done by using the button generator at addtoany.com and placing the custom code into your template. Also, the subscribe block only supports a single feed url. Again, should you have a need for multiple feed buttons for different feeds, the button generator at addtoany.com would be more useful and flexible than anything this module would provide.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | addtoany.module.patch | 11.91 KB | fred0 |
| images.zip | 20.48 KB | fred0 | |
| addtoany.admin_.inc_.patch | 2.95 KB | fred0 | |
| addtoany.module.patch | 12.04 KB | fred0 |
Comments
Comment #1
fred0 commentedActually, just realized the fix for the Save/Share block from http://drupal.org/node/482682#comment-1960324 is a more elegant solution so, here is a slight update to the module patch to use that Drupal api call instead.
Comment #2
fred0 commentedJust wanted to update this issue to say that I have been running AddToAny with this patch on a live site for over a month now with no issues. WOuld love to have some other feedback and review for this and see it rolled into the next release.
Cheers.
Comment #3
micropat commentedThanks very much for the work, Frederick. Will review.
Comment #4
fred0 commentedGreat! BTW, I have this running on several live sites already.
Comment #5
micropat commentedAll your changes except the Subscribe button were incorporated into version 2.4, though the Subscribe button is still on the roadmap for this module.
The main difference with your patch is that it does not load the AddToAny script call in the footer, which is a primary feature of version 2. The reason the script is loaded in the footer is so that content always loads sooner than the AddToAny script.
Another feature of version 2 is multiple button optimization, which calls the AddToAny menu initiation function instead of requesting the external script again via another inline SCRIPT tag. Most modern browsers elegantly handle multiple instances of the same script on the same page, but guess which browser does a poor job at this... *undramatic pause*: IE. ;-)
Thanks again, Frederick!