On the project page, it says ShareThis has integration for Views 2. Since Views in Drupal 7 is on version 3, this means there is currently no Views integration for ShareThis in Drupal 7.

I tested the module and attempted to see if the project page might simply be out of date, but did not find a ShareThis field to add to Views. So I take this to mean there is no Views 3 compatibility yet. (Unless ShareThis' Views integration is done in some other way than a field?)

Has any work been done for the port to Views 3? Or anyone looked into what it will take?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jvalencia’s picture

To my knowledge no one has worked on it yet.

It's currently under nice to have. There is a block component that works with Panels, but it's unclear as to how to provide a good views integration. If you know how, feel free to patch !

cwithout’s picture

I'll try to look into it when I have some time, because I think I may need it for a coming project. I have another to work on before getting to that one though, so if anybody else wants to work on it, go ahead and assume I haven't started unless I've come back and said otherwise.

aaron.r.carlton’s picture

Status: Active » Needs review
FileSize
3.28 KB

Here is a patch which adds a simple field handler. Ripped a lot off from: http://drupal.org/node/447628

Also - please note that the patch here: http://drupal.org/node/1335836#comment-5310072

need to be applied first.

cwithout’s picture

Thanks for the work, aaron. I'm finally working on the project where I need this. Came in handy.

I couldn't get patch in #3 to apply. Must be out of date with current dev.

There have been some changes in views handlers which changes how it should be written. So I built off what aaron.r.carlton did but rewrote the handler, modeling it after the handlers in Views 7.x-3.1. I also moved the views files into a 'views' directory to keep things organized. Also in testing, it seemed that the extra '/' between $base_url and url() was extraneous, so I removed it.

Regarding the dependency on #1335836: Function get_button_HTML Should be a theme, I wasn't able to get that patch to apply either. So in order to (hopefully) get this issue committed quickly, I went back to the method that doesn't require the #1335836 patch and included comments that explain the code can be changed when that issue is resolved.

markroyko’s picture

Thanks! I applied these patches manually, so I didn't test the patch file itself, but I'm very happy to report that this works in the latest dev version. Great job, cristinawithout!

mattys’s picture

knowing nothing about adding patches, i tried adding manually, and it works, facebook, etc. icons showing in views lists http://www.cosmeticsurgerylaw.co.uk/pip-implants-compensation-breast-imp...

darthf1’s picture

i can confirm that #4 works with the latest dev version.

jherencia’s picture

Status: Needs review » Reviewed & tested by the community

This works perfect, thank you @cristinawithout.

RobLoach’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

charlie charles’s picture

Issue summary: View changes

In feature now in sharethis?