Permalink
Browse files

Who tweeted who?

Not sure these are the right way round tho; to early and not enought breakfast!
  • Loading branch information...
1 parent 238889e commit ae9d1d98929bf6facc5b892cd1eacb395b8c2105 @jarofgreen committed Apr 28, 2012
Showing with 78 additions and 0 deletions.
  1. +22 −0 public_html/userTweetedYou.php
  2. +22 −0 public_html/userYouTweeted.php
  3. +17 −0 templates/userTweetedYou.htm
  4. +17 −0 templates/userYouTweeted.htm
View
22 public_html/userTweetedYou.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @package Flocklight
+ * @license GPLv3
+ * @see https://github.com/jarofgreen/flocklight
+ */
+require dirname(__FILE__).'/../src/global.php';
+
+
+$user = TwitterUser::findByUserName($_GET['id']);
+if (!$user) die('not found');
+
+$tpl = getSmarty();
+$tpl->assign('user',$user);
+
+$search = new TwitterUserSearch();
+$search->tweetsTo($user);
+$tpl->assign('searchUsers',$search);
+
+$tpl->display('userTweetedYou.htm');
+
+
View
22 public_html/userYouTweeted.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @package Flocklight
+ * @license GPLv3
+ * @see https://github.com/jarofgreen/flocklight
+ */
+require dirname(__FILE__).'/../src/global.php';
+
+
+$user = TwitterUser::findByUserName($_GET['id']);
+if (!$user) die('not found');
+
+$tpl = getSmarty();
+$tpl->assign('user',$user);
+
+$search = new TwitterUserSearch();
+$search->tweetsFrom($user);
+$tpl->assign('searchUsers',$search);
+
+$tpl->display('userYouTweeted.htm');
+
+
View
17 templates/userTweetedYou.htm
@@ -0,0 +1,17 @@
+
+{extends file="userPage.htm"}
+
+{block name="content"}
+
+ <h2>who tweeted them</h2>
+
+ <ul>
+ {while $user=$searchUsers->nextResult()}
+ <li>
+ <img src="{$user->getProfileImageURL()}" class="twitterAvatar">
+ <a href="/user.php?id={$user->getUserName()|escape:'url'}">{$user->getUserName()|escape}</a>
+ </li>
+ {/while}
+ </ul>
+
+{/block}
View
17 templates/userYouTweeted.htm
@@ -0,0 +1,17 @@
+
+{extends file="userPage.htm"}
+
+{block name="content"}
+
+ <h2>they tweeted</h2>
+
+ <ul>
+ {while $user=$searchUsers->nextResult()}
+ <li>
+ <img src="{$user->getProfileImageURL()}" class="twitterAvatar">
+ <a href="/user.php?id={$user->getUserName()|escape:'url'}">{$user->getUserName()|escape}</a>
+ </li>
+ {/while}
+ </ul>
+
+{/block}

0 comments on commit ae9d1d9

Please sign in to comment.