Closed (fixed)
Project:
Twitter
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2012 at 19:43 UTC
Updated:
22 Apr 2012 at 12:31 UTC
Is it possible to open the links to twitter users and/or URL's in a new window?
I have a twitter block using Views. I have tried to make the links show up in a new window but I can't find any options for that.
Any ideas?
Comments
Comment #1
abasso commentedI personally think this should be by default, anyway, if you are willing to hack the module, you have to change the following lines in the _twitter_filter_text function to:
PS. this is only for usernames/hastags, not urls in the tweet, for that use something like external links module.
Comment #2
juampynr commentedThe issue mentioned by @abasso has been fixed at #1386518: Hashtag and Account Links Broken (extra slash).
I think it makes sense to open these links in a new window. Best would be to give that option within Views as a filter setting.
Waiting for someone to suggest a patch for this.
Comment #3
juampynr commentedActually, it does make total sense to open these links in new windows.
Committed to Drupal 6 and 7 versions. Many thanks.
http://drupalcode.org/project/twitter.git/commitdiff/f7a5621
http://drupalcode.org/project/twitter.git/commitdiff/8784ff8
Comment #4
kjholla commentedI have made massive changes to the Views that are used to display the tweets. This was done in version 6-3.0 beta 9 though.
My changes do the following:
The modified view code uses the Custom PHP Field module to add a Custom PHP field to the Twitter View.
The PHP code in this new field is as below:
Custom PHP Field 1:
Custom PHP Field 2:
Regards,
KH
Comment #5
juampynr commentedCould be great if we can get some of that stuff in. There was an old issue where someone asked for twitpic previews.
Could you please write a separate issue per feature with a patch? That way me and the rest of the community can review, discuss and finally commit them.
Thanks!
Comment #6
kjholla commentedTo be honest, I tried writing a patch to begin with; but failed. Hence, I went ahead and edited the Twitter view using the Views interface on the site. I no longer use the Twitter block and page views that come with the module - I have now modified it to use the above code within the View using the Custom PHP field.
I can give it one more go but this may require someone who is more well-versed with the Views module and how the Twitter module interacts with it.
Regards,
KH