Closed (fixed)
Project:
ShareThis
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Apr 2012 at 18:23 UTC
Updated:
7 Nov 2013 at 03:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rlangille commentedHere is the patch promised! Enjoy!
Comment #2
rlangille commentedComment #3
vchen commentedI'd love to try out this patch and review it. I'm sort of a newbie at applying patches. I know the basics of applying them manually, but this one is so long, I don't want to accidentally copy and paste the wrong thing in the wrong lines, or forget to delete everything that's needed.
Is there a way you can link it to a file with all the changes? Or is there a way that I don't know about to apply the changes faster without manually hunting down each chunk and making the changes?
Sorry if these are stupid questions.
Comment #4
hazah commentedPatch works as designed for me. Thanks!
Comment #5
kclarkson commentedI attempted to apply the patch using git but it didn't apply
Comment #6
hazah commentedI just copied the lines in and removed them manually right from my browser. I find that there's too much inconsistency so I just do this manually.
Comment #7
kclarkson commentedCan this patch be re-rolled so that it can be committed ?
Thanks !
Comment #8
jerenus commentedRe-rolled this patch for 7.x-2.x-dev. :)
Comment #9
robloachThe code looks pretty good, as long as we get some testers on it, I'd say it's RTBC.
Comment #10
tim.plunkettHere's a different patch, one that utilizes hook_field_extra_fields(), allowing it to work with Display Suite, and have the positioning be customizable per view mode per entity type.
That makes the view mode and content type selector only relevant for the "links" placement, so I've used #states to toggle that, and the 'block' and 'content' help text.
This will make #1239418: Can't used sharthis with Display Suite obsolete.
Comment #11
tim.plunkettComment #12
robloachThanks! I hope to have time for this sometime soon :-) .
Comment #13
tim.plunkettOops, made one mistake.
We should write tests for this ;)
Comment #14
kclarkson commentedWould love to get this committed !
Comment #15
zambrey commentedI'm not sure if I'm doing something wrong but after applying #13 the widget is displayed on every node type, regardless of settings on Manage Display tab.
Also in code there is a duplicated weight key:
Comment #16
Chaulky commentedRemoved the extra 'weight'. Will test shortly and report back.
Comment #17
Chaulky commentedMeant to include an interdiff even though it's so tiny.
Comment #18
Chaulky commentedWhy are you writing out all of the view modes? Is this to allow the user to choose which display modes will include the ShareThis buttons in the 'links'? If so, I get that, because we took away the "Show in Teaser" option and need to give it back somehow. But, for a site with a lot of content types, this quickly gets out of hand. We either need a better display for this (collapsible fieldsets or something) or we need to reduce the number of options.
This is going to add ShareThis buttons to every content type in every view mode. This is probably the wrong default behavior. Unfortunately it looks like you can't set it to hidden by default using hook_field_extra_fields().
Comment #19
Chaulky commented#15 When using the 'Content' option, you have to make the ShareThis buttons hidden on each view mode for each content type that you don't want it to show up on. By default, it will show up on all of them.
Comment #20
Chaulky commentedDid some testing and updated the patch (interdiff included). I didn't have any problems with the view mode settings for the "Content" location that #15 mentioned. However, I noticed that the settings for the "Links area" view modes didn't actually do anything. I added the proper checks in
sharethis_node_view(). I also added the option to choose which content types to enable ShareThis for when using the "Content" location. This was an effort to reduce the number of view modes you need to edit in "Manage Display" when you turn it on. This way if you have 6 node types, but you only enable it for one, you only need to go through the view mode settings for that one node type.The UI still seems a little clunky, but I think it's good enough unless someone wants to spend more time polishing it.
Comment #21
Chaulky commentedOops! Patch was empty, here it is for real this time.
Comment #22
altrugon commentedPatch in #21 can't be applied against the current 2.x-dev version.
Comment #23
molly_n commentedHere is a re-roll of the patch from #21 against the latest 7.x-2.x-dev
Comment #25
molly_n commentedOops, let's try this one
Comment #26
molly_n commentedComment #27
sardara commentedPatch seems good.
Comment #28
Gaofengzzz commentedPretty cool patch! I tested this patch from #25 and the new features works pretty fine.
But it seems this patch will break production server. I mean we need re-config Sharethis after apply this patch, otherwise these sharethis widgets will disappear. Maybe we need store $enabled_content_types in the same variable.
Comment #29
Gaofengzzz commentedI think the status should be "need review".
Comment #30
Chaulky commentedThe patch is already storing the new configuration in the {variables} table. I think we actually need to add an update hook to set the new configuration options based on the existing options. It's been a while since I worked on this patch, so I could be wrong.
Comment #31
kingswoodute commentedHey guys, just wanted to say - may the force be with you.
I would love to be able to add sharethis links to my search results!
Comment #32
Gaofengzzz commentedThanks very much
After more than two weeks, with no particular objections or further issues on this ticket, I went ahead and got it committed against the 7.x-2.x branch at 519efd0.
I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with this patch (we would surely be happy to hear your feedback).
Special thanks to @rlangille, @Jerenus, @Chaulky, @molly_n for re-implementing, Re-rolling, testing this patch.
Thanks again to everyone for your help, reviews, feedback and comments on this issue.
Cheers!