Support » Plugin: Tweeple » Configuring Entities

  • Resolved jeggers0

    (@jeggers0)


    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.

    Thanks,

    Jonathan

    http://wordpress.org/plugins/tweeple/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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,

    Jonathan

    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.

    Tus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Configuring Entities’ is closed to new replies.