Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Who tweeted who?

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

0 comments on commit ae9d1d9

Please sign in to comment.
Something went wrong with that request. Please try again.