Changeset 35524
- Timestamp:
- 10/09/09 00:16:00 (4 years ago)
- Location:
- websites/events.php.gr.jp/trunk/app
- Files:
-
- 1 added
- 3 modified
-
controllers/events_controller.php (modified) (2 diffs)
-
models/twitter.php (added)
-
views/event/show.ctp (modified) (1 diff)
-
webroot/css/phpgrjp.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
websites/events.php.gr.jp/trunk/app/controllers/events_controller.php
r20685 r35524 16 16 var $name = 'Event'; 17 17 var $helpers = array('Rss', 'Datespan', 'Javascript'); 18 var $uses = array('Event', 'Trackback','User' );18 var $uses = array('Event', 'Trackback','User', 'Twitter'); 19 19 20 20 /** … … 129 129 $this->set('is_over', $this->Event->isOver($id)); 130 130 $this->set('data', $re); 131 132 $this->set( 'twitter', $this->Twitter->read(array("%23phpstudy","%23phpstudy-{$id}")) ) ; 133 $this->set( 'twitter_hashtag', "#phpstudy,#phpstudy-{$id}" ) ; 131 134 } 132 135 -
websites/events.php.gr.jp/trunk/app/views/event/show.ctp
r28857 r35524 162 162 </div> 163 163 <?php endif; ?> 164 <div class="twitter"> 165 <h3>Twitterコメント一覧(ハッシュタグ: <?php echo $twitter_hashtag; ?>)</h3> 166 <?php foreach ($twitter->results as $tweet) { ?> 167 <div class="twitter-post"> 168 <div class="twitter-post-image"> 169 <?php echo $html->link( 170 $html->image($tweet->profile_image_url, array('alt'=> $tweet->from_user, 'border'=>"0")), 171 "http://twitter.com/{$tweet->from_user}", 172 array('class' => 'author', 'target' => '_blank'), 173 false,false 174 ) ;?> 175 </div> 176 <div class="twitter-post-body"> 177 <?php echo $html->link( 178 $tweet->from_user, 179 'http://twitter.com/' . $tweet->from_user, 180 array('class' => 'author', 'target' => '_blank') 181 ); ?><br /> 182 <?php echo ($tweet->text); ?> 183 (<?php echo $html->link( 184 $time->relativeTime($tweet->created_at), 185 "http://twitter.com/{$tweet->from_user}/status/{$tweet->id}", 186 array('class' => 'timestamp', 'target' => '_blank') 187 ); ?>)<br style="clear: both;" /> 188 </div> 189 </div> 190 <?php } ?> 191 </div> 164 192 165 193 <div id="trackback"> -
websites/events.php.gr.jp/trunk/app/webroot/css/phpgrjp.css
r19081 r35524 333 333 } 334 334 335 .twitter-post { 336 border-bottom: 1px dashed #B5D6FF; 337 margin-left: 20px; 338 margin-right: 20px; 339 margin-bottom: 3px; 340 } 341 342 .twitter-post img{ 343 float: left; 344 margin-left: 10px; 345 margin-right: 10px; 346 } 347 348 .twitter-post-body { 349 font-size:small; 350 margin-bottom: 3px; 351 } 335 352 /* header */ 336 353
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)