Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Thank you so much for your tremendous module.
I would like to reward my users that share content on social networks with http://drupal.org/project/userpoints and wondering if this might be in the works one day :)
Most appreciated!
Comments
Comment #1
Liliplanet CreditAttribution: Liliplanet commentedHad a reply from Berdir at http://drupal.org/node/1442284
Comment #2
TheCrow CreditAttribution: TheCrow commentedi agree... need to have a trackback system or something that check the presence of the content shared, otherwise is useless... :)
Comment #3
SilviuChingaru CreditAttribution: SilviuChingaru commentedYes but we can implement referrer.
I have the following scenario in mind:
A user click share on a page like this:
http://example.com/node/123
and I want the service link url to be:
http://example.com/referrer/[ref_code]/node/123
The referral function will redirect after referrer cookie is set to:
http://example.com/node/123
I replaced the original function of referral_get() using hook_menu_alter, with the following:
Is working fine, is redirecting to any page after referrer cookie is set and if last args are valid internal or alias drupal path but I can't alter url of service links to use this functionality.
Is there a way to alter url's of service links?
Comment #4
Liliplanet CreditAttribution: Liliplanet commentedthank you fiftyz! looking forward to this development :)
Comment #5
SilviuChingaru CreditAttribution: SilviuChingaru commentedTemporaly I solved by appending a custom param ref=true to end of url and then modify that url using hook_outbound_alter() where the ref is set to true. But is not an elegant way...
Comment #6
TheCrow CreditAttribution: TheCrow commentedhook_service_links_alter() works as all the alter functions... if you look the service_links_get_links() you may have more details about params.
Comment #7
SilviuChingaru CreditAttribution: SilviuChingaru commentedI saw the hook_service_links_alter() but we get a static 'link' key and we need to prepend to the service links url the referral link url wich is dynamic... I don't see a way to modify the service links url with dynamic content using hook_service_links_alter unless we rewrite a big part of service_links.module in our own module.
Comment #8
TheCrow CreditAttribution: TheCrow commentedmaybe i didnt got the point but you could add a callback function to every service and save the callback if already present in another field, then the link and settings will be elaborated by your function...
This solution is a little tricky but SL 2.x has been built over the old 1.x which was quite simple, that's why i wish rewrite the third version almost from zero starting with another perspective: #1353802: Service Links 3.x plan
Comment #9
Liliplanet CreditAttribution: Liliplanet commentedSolution using Rules Link and Autopost, see https://www.drupal.org/node/2313935