Beispiel #1
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $twitter_id = $instance['twitter_id'];
        $count = $instance['count'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        if ($twitter_id) {
            ?>
		<div class="widget_twitter">
			<ul class="tweets_list">
				<?php 
            echo display_latest_tweets($twitter_id, $count, true);
            ?>
			</ul>
		</div>
		<?php 
        }
        echo $after_widget;
    }
Beispiel #2
0
												<?php 
} elseif ($mtype == 'Twitter') {
    ?>
	
												<!----- Twitter  ---->
												<tr>
													<td><?php 
    echo $temailid;
    ?>
</td>
													<td><?php 
    echo $tpassword;
    ?>
</td>
													<td><?php 
    display_latest_tweets($twitter);
    ?>
													<br /><strong>Copy Below Link and Paste In an Email To Write a Review.</strong><br /><span style="color:#000;">https://twitter.com/<?php 
    echo $twitter;
    ?>
</span></td>	
												</tr>
												<!----- Google+  ---->
												<?php 
} elseif ($mtype == 'Gplus') {
    ?>
	
												<tr>
													<td><?php 
    echo $gemailid;
    ?>
Beispiel #3
0
                                $display_time = date($date_format, $tweet_time);
                            }
                            // Render the tweet.
                            #$twitter_html .= $tweet_wrap_open.$tweet_desc.$meta_wrap_open.'<a href="http://twitter.com/'.$twitter_user_id.'">'.$display_time.'</a>'.$meta_wrap_close.$tweet_wrap_close;
                            $twitter_html .= $tweet_wrap_open . $tweet_desc . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">' . '</a>' . $meta_wrap_close . $tweet_wrap_close;
                        }
                        // If we have processed enough tweets, stop.
                        if ($tweet_count >= $tweets_to_display) {
                            break;
                        }
                    }
                    // Close the twitter wrapping element.
                    $twitter_html .= $twitter_wrap_close;
                    echo $twitter_html;
                    // Generate a new cache file.
                    $file = @fopen($cache_file, 'w');
                    // Save the contents of output buffer to the file, and flush the buffer.
                    @fwrite($file, ob_get_contents());
                    @fclose($file);
                    ob_end_flush();
                }
            }
        }
    }
    // In case the RSS feed did not parse or load correctly, show a link to the Twitter account.
    if (!$tweet_found) {
        echo $twitter_wrap_open . $tweet_wrap_open . 'Oops, our twitter feed is unavailable right now. ' . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">Follow us on Twitter</a>' . $meta_wrap_close . $tweet_wrap_close . $twitter_wrap_close;
    }
}
display_latest_tweets('brucebot');
                                                <div class="details">
                                                    <p class="name"><?php 
            echo $each_twitter["name"];
            ?>
</p>
                                                    <p><a href="https://twitter.com/<?php 
            echo $each_twitter["tw"];
            ?>
" target="_blank">@<?php 
            echo $each_twitter["tw"];
            ?>
</a></p>
                                                </div>
                                            </div>
                                            <?php 
            echo display_latest_tweets($each_twitter["tw"], './twitter-' . $each_twitter["slug"] . '.txt', 1, false, '', '', '<p>', '</p>', '', '', 'd-M-Y H:i', false);
            ?>
                                        </div>
                                        <?php 
            $item++;
        }
    }
    ?>
                            </div>
                        </div>
                        <!-- ./ Twitter -->
                        <?php 
}
?>
                    </div>
                </div>
                                            <div class="details">
                                                <p class="name"><?php 
            the_title();
            ?>
</p>
                                                <p><a href="https://twitter.com/<?php 
            echo get_post_meta($post->ID, "Twitter", true);
            ?>
" target="_blank">@<?php 
            echo get_post_meta($post->ID, "Twitter", true);
            ?>
</a></p>
                                            </div>
                                        </div>
                                        <?php 
            echo display_latest_tweets(get_post_meta($post->ID, "Twitter", true), './twitter-' . get_post_meta($post->ID, "Twitter", true) . '.txt', 1, false, '', '', '<p>', '</p>', '', '', 'd-M-Y H:i', false);
            ?>
                                        
                                        <!--<span class="caret big"></span>-->
                                    </div>
                                    <a href="https://twitter.com/<?php 
            echo get_post_meta($post->ID, "Twitter", true);
            ?>
" target="_blank" class="ver-mas">Ver más tweets</a>
                                </div>
                            <?php 
        }
        ?>
                        </div>
                    </div>
                    
Beispiel #6
0
                    }
                    // Close the twitter wrapping element.
                    $twitter_html .= $twitter_wrap_close;
                    echo $twitter_html;
                    // Generate a new cache file.
                    $file = @fopen($cache_file, 'w');
                    // Save the contents of output buffer to the file, and flush the buffer.
                    @fwrite($file, ob_get_contents());
                    @fclose($file);
                    ob_end_flush();
                }
            }
        }
    }
    // In case the RSS feed did not parse or load correctly, show a link to the Twitter account.
    if (!$tweet_found) {
        echo $twitter_wrap_open . $tweet_wrap_open . 'Oops, our twitter feed is unavailable right now. ' . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">Follow us on Twitter</a>' . $meta_wrap_close . $tweet_wrap_close . $twitter_wrap_close;
    }
}
display_latest_tweets($twitterUsername);
?>
			
		
		
		</div><!-- end Twitter -->
					
	</div>
	
	
	
</div>
Beispiel #7
0
                            default:
                                $display_time = date($date_format, $tweet_time);
                                break;
                        }
                    } else {
                        $display_time = date($date_format, $tweet_time);
                    }
                    // Render the tweet.
                    $twitter_html .= $tweet_wrap_open . html_entity_decode($tweet_desc) . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">' . $display_time . '</a>' . $meta_wrap_close . $tweet_wrap_close;
                    // If we have processed enough tweets, stop.
                    if ($tweet_count >= $tweets_to_display) {
                        break;
                    }
                }
                // Close the twitter wrapping element.
                $twitter_html .= $twitter_wrap_close;
                //echo $twitter_html;
                echo json_encode(array("date" => $display_time, "text" => $tweet_desc, "media" => $media_url));
                // Generate a new cache file.
                $file = fopen($cache_file, 'w');
                // Save the contents of output buffer to the file, and flush the buffer.
                fwrite($file, ob_get_contents());
                fclose($file);
                ob_end_flush();
            }
        }
    }
}
// Display latest tweets.
display_latest_tweets('benleah');
Beispiel #8
0
                            $twitter_html .= $tweet_wrap_open . $display_time . ': ' . $tweet_desc . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">@' . $twitter_user_id . '</a>' . $meta_wrap_close . $tweet_wrap_close;
                        }
                        // If we have processed enough tweets, stop.
                        if ($tweet_count >= $tweets_to_display) {
                            break;
                        }
                    }
                    // Close the twitter wrapping element.
                    $twitter_html .= $twitter_wrap_close;
                    //echo $twitter_html;
                    // Generate a new cache file.
                    //*
                    $file = @fopen($cache_file, 'w');
                    // Save the contents of output buffer to the file, and flush the buffer.
                    @fwrite($file, $twitter_html);
                    @fclose($file);
                    //*/
                    return $twitter_html;
                    ob_end_flush();
                }
            }
        }
    }
    // In case the RSS feed did not parse or load correctly, show a link to the Twitter account.
    if (!$tweet_found) {
        echo $twitter_wrap_open . $tweet_wrap_open . '' . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">Follow us on Twitter</a>' . $meta_wrap_close . $tweet_wrap_close . $twitter_wrap_close;
    }
}
if (isset($row_config['twitterid'])) {
    echo display_latest_tweets($row_config['twitterid']);
}
Beispiel #9
0
                    } else {
                        $display_time = date($date_format, $tweet_time);
                    }
                    // Render the tweet.
                    $twitter_html .= $tweet_wrap_open . html_entity_decode($tweet_desc) . $meta_wrap_open . '<a href="http://twitter.com/' . $twitter_user_id . '">' . $display_time . '</a>' . $meta_wrap_close . $tweet_wrap_close;
                    // If we have processed enough tweets, stop.
                    if ($tweet_count >= $tweets_to_display) {
                        break;
                    }
                }
                // Close the twitter wrapping element.
                $twitter_html .= $twitter_wrap_close;
                echo $twitter_html;
                // Generate a new cache file.
                $file = fopen($cache_file, 'w');
                // Save the contents of output buffer to the file, and flush the buffer.
                fwrite($file, ob_get_contents());
                fclose($file);
                ob_end_flush();
            }
        }
    }
}
// Display latest tweets. (Modify username to your Twitter handle)
display_latest_tweets('botname');
?>

</div>
    </div>
  </body>
</html>