Closed (duplicate)
Project:
ShareThis
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2011 at 14:58 UTC
Updated:
16 Apr 2013 at 20:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
swentel commentedAlso, in hook_node_view sharethis, should use a decent key like say 'sharethis', not 'my_additional_field'
Comment #2
swentel commentedThis is better code:
Comment #3
Lennard commentedSo i hope that code will be added that makes the work with that module for future easier.
THX @ swentel
Comment #4
Lennard commentedThe code have litle mistake !
The worked code is:
it work with sharethis_node_view changed to:
Comment #5
bendruapal commentedwhere does this code go? which file? where do i copy paste it?
Comment #6
bendruapal commentedFor all other beginners.. I copied the first part of the code into line 255 of sharethis.module. and replaced sharethis_node_view with second part of code as mentioned above.. works fine with DS now and a big thank you to Lennard for the code.
Comment #7
jbm commentedHello, why did you need this code? A share this field appear automatically in display suite.
Comment #8
roborn commentedHere's the patch for #4
I also fixed and simplified code for the absolute url $mPath
Comment #9
Lennard commentedWhy does the features in long time not added in the new version ???
I can't understand this.
Comment #10
robloachIs this up to 2.x-dev?
Comment #11
jvalencia commentedAs per #7, what is the issue we are fixing?
Comment #12
ishmael-sanchez commentedI'm not concerned about the DS implementation but as mentioned in #1
if refinements that make it compatible with DS will also allow the sharethis to be rendered without having to write
print render($content['my_additional_field']);that would be awesome. Hope that clears things up at least a little bit. The module works great other that little weird rendering thing. Thanks for contributing.Comment #13
m_wiking commentedI'm a bit confused. As per #7 it's working. I'm using the latest dev version and it doesn't work with Display suit.
The patches that are posted in this thread are not working either. What is the status now? It's a but confusing.
Comment #14
kclarkson commentedI too find this post confusing.
Can someone answer if this Patch is already included in the Dev version?
Comment #15
tinarey commentedMhm, this is very confusing... here's what I figured:
- installed stable version, patched > "2 out of 3 hunks FAILED"; I now have a ShareThis field under manage display, but the icons don't show up on the node
- installed .dev version > get the icons in the right place but don't have a field to control under manage display... now that is weird. Also the ShareThis icons open a new window although I have the overlay (Multi-Post Widget) enabled in the settings... argh. (So I reckon the patch is not included in the .dev version)
- tried patching the .dev version > "2 out of 3 hunks FAILED" and I get a fatal error.
Does this clarify anything at all?
EDIT
btw here's a quick'n'dirty workaround (using the dev version but should be possible w/ the other one as well):
- in the ShareThis settings, set the location to "Block"
- under manage display create a new block field and choose the ShareThis block
At least this way you get full control over where to place the ShareThis icons (instead of just roughly assigning it to body or the links region). However the Facebook and Twitter links still open in a new window while mail and sharethis open in an overlay, not sure if this is correct behaviour...
Comment #16
Lennard commented@ RaspberryBlack
the codes works only on the 2.0 or 2.2 Version not use it in 2.2-Dev.
I can not unterstand why the maintainer all the posts about display suite ignored.
Edit: for Use with new 2.2-Dev or higher is easier use only this one.
Add follow code to sharethis.module and have fun with sharethis and display suite.
For future now i hope this code will integrate in further versions .. a big please to the maintainer.
Comment #17
Lennard commentedIs it now possible to implement the code for future.
A little answer is a good thing.
Thanks Lennard
Comment #18
tinarey commentedSorry Lennard, I'm working flat out on other projects and haven't got around trying this yet... Hopefully I'll find some time this week.
Comment #19
Lennard commentedThanks Rasberry i hope too.
Its not really worked it is only to insert the code.
I run the last code inside the last Developer Version on 2 websites and its worked perfektly.
Comment #20
Lennard commentedWhat is so difficult to add a simple worked code in new review ?
Please implement it ... Thanks.
Comment #21
Lennard commentedAt all that will used sharethis with Display Suite Module.
Implement simple follow code in sharethis.module:
It works with latest Developer Version and 2.4 Version of Sharethis.
Its simple code but makes full compatible to use with display suite module.
Comment #22
rlangille commentedI have added a patch that not only works for Display Suite, but also works for custom view modes added via hook_entity_info_alter, and I believe it to be a better solution that just making it work for Display Suite. Check it out over here: http://drupal.org/node/1555004
Comment #23
anilmadhub commentedQuick solution for me, i selected "Links area" as location in ShareThis configuration and i just use the "Link" field in manage display.
Hope this helps.
Comment #24
vchen commented#23 worked for me! Thanks!
Comment #25
hazah commentedThanks for the tip in #22, @rlangille. The combo is exactly what I was looking for.
I had to modify the function code a little because of the way the patch changed some of the data structures.
Comment #26
tim.plunkettThe patch in #1555004: Incompatible with custom view modes #8 didn't fully support DS, but the one in #10 does.
Comment #27
kubilayrd commented#23- Great idea! Worked for me, thanks.
Comment #28
langelhc commented@anilmadhub #23- Works for me, thnks.