aboutsummaryrefslogtreecommitdiff
path: root/mod/twitter/views/default/widgets/twitter/view.php
blob: 71caaf3804e394391487707b4201d1576c8ba4ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
    
     /**
	 * Elgg twitter view page
	 *
	 * @package ElggTwitter
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Curverider Ltd <info@elgg.com>
	 * @copyright Curverider Ltd 2008-2010
	 * @link http://elgg.com/
	 */
	 
	 //some required params
	 
	 $username = $vars['entity']->twitter_username;
	 $num = $vars['entity']->twitter_num;
	 
    // if the twitter username is empty, then do not show
    if($username){
	 
?>

<div id="twitter_widget">
<ul id="twitter_update_list"></ul>
<p class="visit_twitter"><a href="http://twitter.com/<?php echo $username; ?>"><?php echo elgg_echo("twitter:visit"); ?></a></p>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $username; ?>.json?callback=twitterCallback2&count=<?php echo $num; ?>"></script>
<?php 
    } else {
        
      echo "<div class=\"contentWrapper\"><p>" . elgg_echo("twitter:notset") . ".</p></div>";
      
  }
?>
</div>