[resolved] Configuring Entities (3 posts)

  1. jeggers0
    Posted 2 years ago #

    I'm a big fan of this plugin and its minimalism.

    I've been able to hook into the widget to change the template, adding the profile picture along the way, but I'm still unsure of how to use the "tweeple_do_entities" filter.

    I'm attempting to create something like the following:
    (Forgive the pseudocode.)

    $output .= sprintf('<img src="%s" />', $tweet['entities']['media']['media_url']);

    Any guidance in outputting the pbs.twimg.com entities would be extremely useful.




  2. jeggers0
    Posted 2 years ago #

    I was able to solve it. Set (tweeple_do_entities, true) and then setup a loop within the template loop.

    I chose this route for my current project:

    if( isset($tweet['entities']['media']) ) {
    foreach( $tweet['entities']['media'] as $media ) {
    $output .= sprintf( '<div class="tweet-image"><img src="%s:thumb" /></div>', $media['media_url_https']);}}

    Also, I'd like to note that if anyone is attempting to incorporate more into this plugin setting tweeple_do_cache to false helps tremendously.

    Again, thanks for the plugin,


  3. tus
    Posted 1 year ago #

    Hi Jonathan,

    Thanks for posting your solution. Are you able to expand your solution a bit more for the non techies. Where should we insert the code to get tweeple to show the profile pictures, or at the very least the twitter handles/ID.

    Thanks in advance.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Tweeple
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic