A major rewrite of AddThis module is long overdue and we are finally starting to work on it. Major causes for the rewrite include moving to AddThis.com API 2.0, rewriting the theming to be more flexible and enabling more ways of limiting AddThis button visibility.
This is my current idea on features included in 3.0 and their priorities. All features will get implemented at some point but we will start working with priority 1 and work our way to 2 & 3 from there. Version 3.0 will not be backwards compatible, however upgrading will be made as easy as possible. If you have done any custom theming for the module you will have to redo most of it in order to use 3.0.
Next version of AddThis module will be implemented for D6 and ported to D7 when in beta, D5 will not be supported. Older 2.x versions of the module will only get critical bugs fixed after 3.0 has been published.
If you have any comments, ideas or feedback about the module now is the time. Implementation work starts on this week (8.-14.3.2010) and we expect to have the new version in beta some time in April 2010.
Features
- Display button in full node display or teaser 1
- Views integration: user Addthis as a view field 1
- CCK field for AddThis 3
- View AddThis as a block 1
- API for limited visibility in node views 1
- Upgrade to Addthis.com API 2.0
- More flexible theming 2
- Enable local caching and aggregation 2
- Support for Addthis in RSS 1
- New admin interface 2
- Translation support 1
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | addthis-6.x-3.x-candidate.tar_.gz | 5.58 KB | les lim |
| #10 | addthis-6.x.tar_.gz | 5.3 KB | les lim |
Comments
Comment #1
les limThanks, wesku. Here's my breakdown of your feature list:
Features currently supported:
We're mostly making sure we don't break this basic functionality in the new version.
New functionality:
Upgrade to Addthis.com API 2.0
This is, of course, the primary reason for the rewrite in the first place.
Translation support 1
This should be low-hanging fruit. Passing $language->language into the addthis_config object should be enough.
New admin interface 2
Since AddThis now takes its default configuration as a single array (addthis_config) containing key/value pairs, we should rework the AddThis admin form to store the settings in the {variable} table the same way: as a single array of configured settings, keyed to the same keys as in the AddThis API. This will make loading the default settings much easier.
More flexible theming 2
I'm a big supporter of this. I would ideally like to be able to pass arbitrary $addthis_config and $addthis_share arrays directly into the theme function and have them override the defaults for that specific instance of the button.
Enable local caching and aggregation 2
This would be a killer feature. According to their FAQ, AddThis provides developers a certain URL from which to grab the code on request. Someone will need to follow up with them on this, I think.
Comment #2
les limQuestions about some of those features:
API for limited visibility in node views 1
I'm sure I don't have any objection; I'm just not sure I know what you mean. Are you talking about turning the button on/off on a per-node basis?
Support for Addthis in RSS 1
+1 for this, but maybe as a separate module, packaged along with AddThis. The AddThis RSS button is for accomplishing something pretty different from the normal AddThis button, and the basic functionality should probably be kept apart.
CCK field for AddThis 3
What would be the point of making a CCK field?
Comment #3
les limAlso, some features I'd like to see:
Comment #4
vesapalmu commentedOh, it seems my secondary bullets were lost in copy-paste. Here is a second try:
* Display button in full node display or teaser 1
As it is today.
* Views integration: user Addthis as a view field 1
Pretty much as it is today, some clean up for the actual code.
* CCK field for AddThis 3
Primary reason for this would be to enable different settings for each node and limit visibility using Content permissions module. Also we could support any number of display formaters enabling different look for different content types. This would also open the door for many additional improvements, but it should definitely be an optional feature.
* View AddThis as a block 1
As is. Perhaps with different theming options?
* API for limited visibility in node views 1
This would replace all current ways of limiting the button visibility. By default the button would always be visible to everybody. A hook should be created to enable limiting the visibility. Examples could be limiting visibility by content type, taxonomy, menu or for each node. This would be answer to many different feature requests.
* Upgrade to Addthis.com API 2.0
Pretty obvious. Most features of 2.0 API should be supported, but most likely nyt all of them. This would require more analysis.
* More flexible theming 2
This is something I'm pretty open for feedback on. Separate theming for toolbox is a good idea.
* Enable local caching and aggregation 2
Turned off by default, but should be implemented the same way google analytics module does it.
* Support for Addthis in RSS 1
This is a common feature request. Separate submodule could be a good idea. We should anyway split at least the visibility limiting stuff as separate submodules.
* New admin interface 2
Also a clean up to make the module easier to use.
* Translation support 1
Easy to implement and definitely required.
We have a few people working on this. Architecture for 3.0 should be agreed on and then we can split the tasks of implementing different parts of the module. I also have some ideas about the future of content sharing in Drupal and will make a separate blog post about those soon...
Comment #5
onaz commentedAddress book fuctionality #596818: No longer supports import of email contacts?? also requested in 3.0.
Comment #6
vesapalmu commented#5 - This is one part of API 2.0 that should be supported. We need to walk trough the API and figure out what will be supported by configuration and also leave a way for advanced users to extend the module configuration.
Another thing missing from my original list are the context issues. We have to start using real URLs and figure out the context of the button. For example users want to use node urls in most cases where you list nodes (views, RSS), but you may also end up with addthis block on a view, taxonomy page or something similar. There are currently few issues about this, but I don't want to start changing the sharing logic for 2.x versions of the module.
Comment #7
vesapalmu commentedIssue queue cleanup continues. Moving another request here:
mrayyan:
I've just noticed that with AddThis API, you can easily setup a template for twitter and such. Where you can assemble something like this:
" I've just read this cool post {{title}} at {{url}} ~ check it out".
It will be great if AddThis can support this without hacking the code.
Agreed. This should be supported without hacking.
Comment #8
vesapalmu commentedSome more theming requests: #531978: Provide array ready for theme('links') etc.
Comment #9
vesapalmu commentedComment #10
les limHere's a possible starting point for the 6.x-3.x-dev branch leveraging API 2.0. No new features have been implemented, but I reworked the admin interface so that addthis_config options can be stored in a single variable to match the new API. The theme function has also been completely rewritten.
This should be fully functional, if feature-limited, but the admin options haven't been built out completely. I just put enough in there to make sure it would work.
Comment #11
Percept commentedJust an idea: Would it be possible to have drupal communicate with the addthis api trough this module so we could for example create a view depending on "most shared" items?
Comment #12
eojthebraveDoes the API allow us to query for a list of supported services? It might be nice if _addthis_services_list() could get the list of services via the API and cache it locally. That way we don't have to update the module every time AddThis adds a new service.
Comment #13
les limThere's no API query for a list of services yet, but it looks like it might be in development:
http://addthis.com/forum/viewtopic.php?f=8&t=23360
I sent an email to the API developer asking about it.
Comment #14
les limI took some time today to flesh out the module framework from #10 into something fully workable. The biggest changes are support for the AddThis Toolbox, which is totally sweet, and the decision to smash the services configuration back into the main configuration form. The checkbox-based configuration from the earlier effort didn't account for the need to place the chosen services in arbitrary order.
I'd invite improvements or replacements to some of the details of this implementation, particularly regarding the theme functions. But I do think the structure of the module is sound, and could serve as the basis for a 6.x-3.x branch which we can start submitting actual patches against.
Here's the list of features from this thread, separated by what's implemented in this candidate and what needs to be resolved.
Implemented:
Display button in full node display or teaser
Views integration: Addthis as a view field
View AddThis as a block
Upgrade to Addthis.com API 2.0
More flexible theming
New admin interface
Translation support
theme_addthis_toolbox function and admin option (#3)
Address book option on email shares (#5)
dynamic generation and caching for the services list (#12)
Not yet implemented:
CCK field for AddThis
API for limited visibility in node views
Enable local caching and aggregation
Support for Addthis in RSS
context issues (#6)
Share template support (#7)
API function to return a links array (#8)
Views integration with AddThis analytics (#11)
Comment #15
tsvenson commentedLooking forward to the release of this, subscribing.
Comment #16
AdrianB commentedVery interesting, subscribing.
Comment #17
dalinOne thing that I'd love to see with AddThis is better performance. Currently there are some easy opportunities for improvement. Currently the module adds a lot of JS/CSS/stuff during page load. These either block the page load, or just add more things that need to happen before the page is done loading. But since everything other than the button images are not required for page loading, they can be lazy loaded. Here's an example:
This mimics the technique used by Google Analytics but more jQuery oriented. You can use the same technique to load CSS, iframes, or whatever else.
Comment #18
brucepomeroy commentedAddThis offers integration with Google Analytics. It would be great if this was an option in the AddThis module. So if someone has the AddThis module and the Google Analytics module on the same Drupal site there would be an option to have your AddThis activity tracked under GA. Thanks and great work!
Comment #19
archimedes commentedDoes 3.0 support the AddThis Toolbox yet? (http://addthis.com/help/toolbox) If not, I'd like to suggest that we add that support...
Edit: Whoops. Looks like that was indeed answered above. Feel free to ignore this comment...
Comment #20
archimedes commentedI've been doing some more reading on some of the more recent developments of AddThis. In addition to Google Analytics integration (+1 brucepomeroy), I'd also like to see Facebook Like support (http://addthis.com/gallery/toolbox-facebook-like) and clickback tracking support (http://addthis.com/help/clickbacks).
What is the status of the 3.0 module update?
Comment #21
nancydruAccording to my CEO, the only part he wants is the RSS as seen at http://sethgodin.typepad.com/.
Comment #22
izmeez commentedsubscribing with interest
Comment #23
eojthebrave@NancyDru, I believe that that is just a question of configuration. You should be able to configure the module to just display the "buttons" that you want. If however that's not the case you might want to open a new issue as this one is focused on a complete re-write of the module.
Comment #24
les lim@eojthebrave: this isn't yet the case, unfortunately. In the past, the Addthis RSS button was an entirely separate offering than the regular Addthis service, and it couldn't be integrated into the regular button. The issue appears to be moot, since AddThis has since removed the RSS service from their website.
It does look like they might bring it back as a feature of the regular service, though: http://www.addthis.com/forum/viewtopic.php?f=4&t=25244
Comment #25
nancydru@lesmana: It's good to know that I wasn't going blind because I couldn't find it.
@eojthebrave: I was mentioning as a priority setting suggestion, since it is listed above.
In the meantime, I just coded a replacement for the standard Drupal RSS item. It took a whole 5 lines of code.
Comment #26
eojthebraveOops, sorry for any confusion. :)
Comment #27
izmeez commented@NancyDru
Would you be willing to share your code for the RSS ?
Thanks,
Izzy
Comment #28
nancydruThe else clause is what was there before.
Comment #29
les limI completely missed that there was an official 3.x dev release until looking at the project page just now. Posting notice here for anyone tracking this issue.
It looks like almost all of my code from #14 was included as-is in the release. A note of attribution on the project page or the README.txt would be nice to see.
Marking this fixed -- issues related to the official dev version should be created separately.
Comment #30
vesapalmu commentedSorry about missing the attribution originally lesmana. I just added it to README and we will also try our best to mention any contributors in commit and release notes.