Support » Plugin: Display Tweets » No links to feed or individual tweets?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author MatthewRuddy

    (@matthewruddy)

    Hi @rchrisbishop, I’ll definitely have a look at this for you when working on the next update. Might be able to add it.

    Unfortunately not a feature at the moment. Very sorry about that.

    I look forward to it, thanks

    Maligno

    (@dagninogmailcom)

    link to tweets should be:

    https://twitter.com/SCREEN_NAME/status/ID_STR

    so, you will need to add (for getting de screen name):
    $settings = $this->validate_settings( get_option( 'displaytweets_settings' ) );

    inside the show() function and then use this for link:

    https://twitter.com/'.$settings['screen_name'].'/status/'.$this->format_tweet($tweet->id_str)

    $tweet->id_str has the tweet id

    Example:

    echo '<p>{$this->format_tweet( $tweet->text )}<br /><small class="muted"><a href="https://twitter.com/'.$settings['screen_name'].'/status/'.$this->format_tweet($tweet->id_str).'">- {$posted_since}</a></small></p>';

    I tried this and received

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /data/23/2/34/80/2197080/user/2412808/htdocs/wp-content/plugins/display-tweets-php/displaytweets.php on line 590

    Is there another step besides replacing
    echo "<p>{$this->format_tweet( $tweet->text )}<br /><small class=\"muted\">- {$posted_since} ago</small></p>";

    with

    echo '<p>{$this->format_tweet( $tweet->text )}<br /><small class="muted"><a href="https://twitter.com/'.$settings['screen_name'].'/status/'.$this->format_tweet($tweet->id_str).'">- {$posted_since}</a></small></p>';

    Plugin Author MatthewRuddy

    (@matthewruddy)

    Hey again. I’m uploading v1.0.3 of Display Tweets as I’m writing this, so give it a try and see if it does a better job.

    I’ve included a new WordPress filter which will link the tweet’s date to the tweet itself. To enable this filter, add the following code to your theme’s functions.php file.

    add_filter( 'displaytweets_link_date_to_tweet', '__return_true' );

    That should do the trick 🙂

    This works great. One more question – how would I get this to open a new window to the Tweet?

    target=”_blank” doesn’t seem to work on the displaytweets.php page.

    Plugin Author MatthewRuddy

    (@matthewruddy)

    Target blank should work, depending on how your browser handles it.

    I got it to work, thanks.

    I had to use target=\”_blank\”

    Hey Matthew – I like the idea of the plugin and it displays my latest tweet perfectly, however the links to the @names don’t work. They are a different color, but they don’t hover and they don’t link.

    Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘No links to feed or individual tweets?’ is closed to new replies.