Needs review
Project:
Service links
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2012 at 09:58 UTC
Updated:
12 May 2017 at 15:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chromix commentedThe button is loaded dynamically directly from Pinterest. You'd need to have a non-widget share link specifically for Pinterest. I don't think Pinterest supports anything like that. Anyone know otherwise?
Comment #2
FranCarstens commentedI've gotten pretty close...
By adding the following under general service I am getting everything except the node image.
If I could somehow call out the image URL this would work perfectly using the following:
Anybody know how to pull that image url in?
Comment #3
TheCrow commented@FranCarstens the 'preset' field and related function is what you need.
Comment #4
FranCarstens commentedThanks Crow. :D
Comment #5
vali hutchison commented@FranCarstens Any chance of providing the working code you used to for the custom Pinterest icon?
Comment #6
sethfreach commented@SlakerD, Rather than making a patch, a new small module was better for my needs. below is an example of service_links_pinterest.module that I'm using to create a simple Pinterest service link. I could make a project page out of it, but I think it's best folded into service_links, rather than continue as a stand alone module. There are a few opportunities in the code to specify the image based on the current node: directly in the service_links_pinterest_preset() function or by implementing a hook anywhere else with hook_service_links_pinterest_NODE_TYPE().
Comment #7
FranCarstens commented@Vali Hutchison
My workaround is unfortunately somewhat hardcoded, but it works. With a little work it should be possible to improve on it, but my php knowledge is lacking. I have the following:
I've added the following to the bottom of the general_services.module around line 142, in the "general_services_service_links" function:
Then I broke some rules and added the following to the service_links.module:
Around line 708, in the "_service_links_get_tags" function:
Then, around line 770, in the "$settings['tag'] = array(" I added the following:
And again around line 806 in the "$settings['subst'] = array(" I added the following:
Anybody who knows about coding will realise I have no idea what I'm doing, but, again, this worked for me.
You can change the icon using css background.
I am using:
version = "7.x-2.1+16-dev"
core = "7.x"
project = "service_links"
datestamp = "1362317389"
You can see it in use here: http://sqz.ee/Zk7
Comment #8
jenlamptonHere's a patch made from a similar approach in #7
Comment #9
jenlamptonsmall change to prevent PHP error on non-node pages.
Comment #10
Reuben Unruh commented#9 is working
Comment #11
Anonymous (not verified) commented#9 worked for me