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.
Hello,
I think it would ne really useful to have the twitter username display as a follow button.
Comment | File | Size | Author |
---|---|---|---|
#10 | twitter_follow_button-1988730-10.patch | 7.47 KB | opi |
#8 | twitter_follow_button-1988730-8.patch | 7.04 KB | frob |
#2 | twitter_follow_button-1988730-1.patch | 1.83 KB | frob |
Comments
Comment #1
opiNice idea !! I think the best could be a new formatter, don't you think so ?
Anyone, feel free to submit a patch !!
Comment #2
frobEasy enough.
For reference this is the twitter api doc page about this.
https://dev.twitter.com/docs/follow-button
I realize now that I have made this patch against the current release.
Comment #3
frobwow quick response. ;)
Comment #4
opiand quick patch too !!
Few things about your patch:
- Why not returning a render array, with '#theme' => 'link'
- With render array, we could add the js with #attached
- Instead of returning empty arguments like 'data-width', we could add formatter settings for these.
- 'data-lang' may use global $language (I care about i18n ;)
Btw, thanks for bringing up this idea, I try to work on this on the next days.
Comment #5
frobI thought about that, but this way was quicker and I need the functionality. Maybe later today I will add the settings to the array.
I will assign it to myself when I start back up on it.
Comment #6
frobLets see about this.
Comment #7
frobStill working on this. I have it using the render array. Now all that is left is to make it use settings. I should have for that tomorrow.
Leaving it assigned to me for now.
Comment #8
frobHows about this one.
Comment #9
frobany chance of this getting reviewed.
Comment #10
opi(sorry for the lag)
I rewamp the patch for several reasons:
- place the button markup into a theme function
- add some condition for summary & form (prevent warning when not using the button formatter)
Please test this patch, and I'll add it to the dev version
Comment #11
opi@frob : 2 years after, have you tested this patch ? ;)
I'll try to show some love to this module in the next weeks, and the "follow button" can be a part of the next stable release.
Comment #12
frobNope, I have not. Does it still apply.
Honestly, I don't work with many news sites anymore and I haven't used this in quite a while.
Comment #13
opiThanks for your quick answer. I'll test it soon, and ship it with the next stable release, hopefully.
Thanks for bootstrapping this feature !
Comment #15
opiApplied and commited to 7.x-1.5.
Thanks for your work.