Skip to content

Commit

Permalink
IDI-116: update fluid twitter feed
Browse files Browse the repository at this point in the history
  • Loading branch information
acheetham committed Jul 16, 2013
1 parent be19bc9 commit d462490
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 63 deletions.
4 changes: 1 addition & 3 deletions front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@
<?php endwhile; ?>

<div class="fl-col">
<?php get_template_part('tweets', 'aegisprog') ?>
<?php get_template_part('tweets', 'FluidProject') ?>
<?php get_template_part('tweets', 'SNOWocad') ?>

</div>

<div class="fl-col">
<?php get_template_part('tweets', 'FluidProject') ?>

<div class="idi-box">
<div class="idi-mailing-list">
<?php get_template_part("mailing-list-form"); ?>
Expand Down
4 changes: 3 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,8 @@ h3,
list-style: none;
}
.twitter-feed-group .tweet-date {
margin-top: 0.5em;
color: #959595;
font-style: italic;
text-decoration: none;
}
Expand Down Expand Up @@ -1815,4 +1817,4 @@ a.idi-project-link {
:-webkit-full-screen .fl-videoPlayer-video-play,
:-webkit-full-screen .fl-videoPlayer-overlay {
max-width: none;
}
}
15 changes: 8 additions & 7 deletions tweets-FluidProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
*/

require_once("wp-content/plugins/twitteroauth/twitteroauth/twitteroauth.php");
$twitter_un = "SNOWocad";
$num_tweets = 3;
$consumerkey = "fHDGIckUSPpd4koYiBVOw";
$consumersecret = "I3KKfzDT34eR9TXekZsXod750SdC2JydGVKj0ZFlU";
$accesstoken = "199785294-UB4hnT6tsbbRD2bKSUGNgryPnS4hDJjtQpPtFGx7";
$accesstokensecret = "kcXrb0WzyUYijk97u1RdFrG7hSS5vpyUbWxpfls";
$twitter_un = "FluidProject";
$num_tweets = 1;
$consumerkey = "luK78NyRjDEmMVhi6sgIw";
$consumersecret = "E6bY0ShFmtibIqWU0oHokCVZKYtPEvZcNyACBPzYqo";
$accesstoken = "123905660-DBVNC6meqlD4KgZrQcAuynwYaMxJsLqLiyrtkArR";
$accesstokensecret = "UhlTPgNowuNOsC0Oaw89PM29PcVRD4N14sAdkAUk";
$connection = new TwitterOAuth($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
$tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitter_un."&count=".$num_tweets);
//print_r($tweets);
Expand All @@ -39,7 +39,8 @@
$tweets = array_filter($tweets);
if(!empty($tweets)){
foreach($tweets as $tweet) {
echo '<li class="even">'.$tweet->text.'<br><a href="https://twitter.com/intent/retweet?tweet_id='.$tweet->id.'">retweet</a><hr style="height:1px;"></li>';
echo '<li class="tweet">'.$tweet->text.'<br/>
<span class="tweet-date">'.substr($tweet->created_at, 0, 16).'</span></li>';

}
} else{
Expand Down
6 changes: 3 additions & 3 deletions tweets-SNOWocad.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
require_once("wp-content/plugins/twitteroauth/twitteroauth/twitteroauth.php");
$twitter_un = "SNOWocad";
$num_tweets = 3;
$num_tweets = 1;
$consumerkey = "fHDGIckUSPpd4koYiBVOw";
$consumersecret = "I3KKfzDT34eR9TXekZsXod750SdC2JydGVKj0ZFlU";
$accesstoken = "199785294-UB4hnT6tsbbRD2bKSUGNgryPnS4hDJjtQpPtFGx7";
Expand All @@ -35,8 +35,8 @@
$tweets = array_filter($tweets);
if(!empty($tweets)){
foreach($tweets as $tweet) {
echo '<li class="even">'.$tweet->text.'<br><a href="https://twitter.com/intent/retweet?tweet_id='.$tweet->id.'">retweet</a><hr style="height:1px;"></li>';

echo '<li class="tweet">'.$tweet->text.'<br/>
<span class="tweet-date">'.substr($tweet->created_at, 0, 16).'</span></li>';
}
} else{
echo "<p>no tweets found</p>";
Expand Down
49 changes: 0 additions & 49 deletions tweets-aegisprog.php

This file was deleted.

0 comments on commit d462490

Please sign in to comment.