WordPress.org

Ready to get started?Download WordPress

Forums

Latest Tweets Widget
[resolved] Links don't show (21 posts)

  1. wpnewbie69
    Member
    Posted 11 months ago #

    I noticed that the links get truncated for some reason making them unclickable.

    This:
    Angry Asian American, a new show from @angryasianman @jennyyangtv on @ISATVofficial Watch the first angry ep. here: http://ow.ly/uPKum

    Turns into this:
    RT @Kollaboration: Angry Asian American, a new show from @angryasianman @jennyyangtv on @ISATVofficial Watch the first angry ep. here: http…

    Is this a bug or is there a setting I can change in theming?

    https://wordpress.org/plugins/latest-tweets-widget/

  2. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    What version are you using?

    The current development version uses completely different approach the linkifying, so might fix your problem. Can you try it and let me know?

    Direct link to zip:
    http://downloads.wordpress.org/plugin/latest-tweets-widget.zip

  3. wpnewbie69
    Member
    Posted 11 months ago #

    I was using 1.0.15 before upgrading to the development version. However, the problem is still there.

  4. wpnewbie69
    Member
    Posted 11 months ago #

    The output is exactly 140 characters so maybe there's a limit which can be removed somehow?

  5. wpnewbie69
    Member
    Posted 11 months ago #

    RT @Kollaboration: Angry Asian American, a new show from @angryasianman @jennyyangtv on @ISATVofficial Watch the first angry ep. here: http…

  6. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    Ok, I'll look at it.
    Can you post the link from twitter.com of that tweet that has the problem, please?

  7. wpnewbie69
    Member
    Posted 11 months ago #

    Sure, here you go: https://twitter.com/Kollaboration/status/447067728160231424

    Sorry for the multiple posts. Not sure what happened there.

  8. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    I just tested your timeline with both the last version of the plugin 1.0.15 and also the new dev version, which will become 1.1.0.

    I can't reproduce your problem. The ow.ly link appears fine.

    Something else must be going on. Try disabling all plugins except for latest-tweets-widget.

  9. wpnewbie69
    Member
    Posted 11 months ago #

    Strange. I just tried disabling all of my plugins and the problem still remains...

  10. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    What theme? I ran a clean install with twentyfourteen.

  11. wpnewbie69
    Member
    Posted 11 months ago #

    I'm using the Adapt theme: http://themeforest.net/item/adapt-a-responsive-wordpress-theme/2564586

    This is the actual site it's on (tweet on top left): http://tinyurl.com/k-sandbox

    (Currently trying to get the tweet to scroll like a marquee so don't mind the sudden cut off.)

  12. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    I see it. I'm not going to purchase a $50 theme to test it, but have you checked if the problem persists with other themes?

    You could also try calling latest_tweets_render_html() directly and inspecting the output. That should ensure its unfiltered.

  13. wpnewbie69
    Member
    Posted 11 months ago #

    I just activated the twenty fourteen theme with only the Latest Tweet plugin activated and added:

    <?php echo latest_tweets_render_html( 'ISATVOfficial', 1, true ); ?>

    and I still get the same output...

    You can see it on the site.

  14. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    Ah, I can reproduce now.
    the link you gave me was for @Kollaboration which is fine. I see now it's the RT that is broken. Now I can reproduce I should be able to fix. I'll get back shortly.

  15. wpnewbie69
    Member
    Posted 11 months ago #

    Awesome, thank you!

  16. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    I'm sorry to say that the truncated tweet is coming from twitter.

    The retweet would url be https://twitter.com/isatvofficial/status/447119023319162881

    Which if you click it you'll see redirects to the original tweet. The actual retweet has "RT @..." at the front which pushes it over 140 characters. (As you pointed out earlier)

    The only way around this is if I request the original tweet for all 140 character RTs. That's doable, but obviously comes with a performance overhead. As it's probably an edge case (and there's caching), it's worth doing. I'll put this on my list, but I can't guarantee when it'll get implemented.

  17. wpnewbie69
    Member
    Posted 11 months ago #

    Ah, I see. Ok, Tim. Thanks for taking the time to address the issue.

  18. madhatter301
    Member
    Posted 11 months ago #

    I had a similar issue so I modified the plugin slightly to get my desired output.

    When tweets are returned from the API they also contain a retweeted_status key in the array if they are a retweet. This in turn actually contains the original tweet text rather than one with shortened url's etc. I just did a check for this value and set the text to it if it was present. So in the main latest-tweets.php file around line 87 where it starts to loop over the tweets I first of all reset the $retweeted_status value to null since it'll be created again after the extract method if it is present, then check and set the text to the retweet text if required. Something like this:

    foreach( $tweets as $tweet ){
                $retweeted_status = null;
    
                extract( $tweet );
    
                if( isset($retweeted_status) && array_key_exists('text', $retweeted_status))
                {
                    $text = 'RT ' . $retweeted_status['text'];
                }

    Hope that helps

  19. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    This is awesome, thanks. I didn't spot that key when I was looking at this before. I'll look at including this fix in the next version.

  20. timwhitlock
    Member
    Plugin Author

    Posted 11 months ago #

    Works great. I've made the change, here:
    https://github.com/timwhitlock/wp-twitter-widget/commit/4b11f3636bec0ec0ca7736ee321f1f4b3e808047

    Will go live in the next stable release of the plugin.

    Thanks both.

  21. madhatter301
    Member
    Posted 11 months ago #

    Good stuff :) Thanks for the excellent plugin Tim, appreciate your work!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.