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.
I think it would be usefull to have a setting: twitter_account. This would allow editors to add the Twitter account for which the widget is added.
This will be used to replace:
<a href="https://twitter.com/twitterapi">Tweets by @twitterapi</a>
with
<a href="https://twitter.com/twitter_account">Tweets by @twitter_account</a>
Comments
Comment #1
mfernea CreditAttribution: mfernea commentedI'm posting a patch for this.
Comment #2
mfernea CreditAttribution: mfernea commentedComment #4
mfernea CreditAttribution: mfernea commentedI've updated the tests also.
Comment #5
gboudrias CreditAttribution: gboudrias commentedYou're missing the element that actually changes the account in the feed. I don't know if that's intentional? I rerolled the patch while adding this in the link options:
'data-screen-name' => $config['twitter_account'],
Works for me.
Comment #6
mfernea CreditAttribution: mfernea commentedThanks for help! I saw that you also improved the description of the field. But you set the field as not required. Is this intentional? As I see it, it has to be required.
Comment #7
gboudrias CreditAttribution: gboudrias commentedArgh, I knew I'd forgotten something... No it's not intentional... I don't know if it's worth submitting another patch, I'm sure the module maintainers can correct my mistake easily enough.
Comment #8
mfernea CreditAttribution: mfernea commentedI'm uploading a new one, just to be sure it's fine. :)
Comment #9
gboudrias CreditAttribution: gboudrias commentedThanks :)
Comment #10
ladybug_3777 CreditAttribution: ladybug_3777 commentedI just wrote a patch that will allow users to override the twitter username that is being displayed. Perhaps we should combine my patch with this one? (Sorry I didn't see this issue before writing my patch)
https://drupal.org/node/2230823
Comment #11
mfernea CreditAttribution: mfernea commentedThe main difference between the two patches is that this one uses an extra column in the db. I would go for this one since it's already RTBC.
If it's considered useful we can merge the two patches.
Comment #12
gboudrias CreditAttribution: gboudrias commentedI vote for this one too :)
Can anyone commit this?
Comment #13
ladybug_3777 CreditAttribution: ladybug_3777 commentedFYI, I tested this patch and it works wonderfully, I also vote for it to be committed!
Comment #14
Devin Carlson CreditAttribution: Devin Carlson commentedAn updated patch with a few minor fixes.
Comment #15
Devin Carlson CreditAttribution: Devin Carlson commentedTested #14 and committed to Twitter Block 7.x-2.x.
I'll roll a new release shortly.
Comment #17
ladybug_3777 CreditAttribution: ladybug_3777 commentedThis new patch #14 does not work the same as patch #8! I'm disappointed that patch #14 is what was added to version 2.2 instead of version #8 because patch #14 doesn't allow you to override the twitter username using the data-screen-name attribute.
Why was that part removed?
I wish the community had been given a chance to provide input on the newer patch before it was committed to a major release. I feel like it didn't get a chance to be properly tested either IMHO.
Comment #18
ladybug_3777 CreditAttribution: ladybug_3777 commentedNew issue and patch added here https://www.drupal.org/node/2300407 for those that are looking to get this functionality back.
Comment #19
mfernea CreditAttribution: mfernea commentedIndeed, there's a slip-up. I'll have a look at the patch in the new ticket.
Comment #20
ladybug_3777 CreditAttribution: ladybug_3777 commentedI agree, it is a slip-up. Just a heads up, my new issue has been modified without my prior knowledge. My patch is still there and it still gives back the functionality that was lost, but the title and my description has been changed by someone else. It can be confusing when you link over (although mfernea I think you linked over and read it before it was modified, thanks!)