Commit 8e4b8b12a72383dd2ca950576e88ed3723ebe81c

  • avatar
  • blaise.ca <balleyne @d…b.privatedns.com>
  • Wed Nov 04 02:57:03 CET 2009
Added formatting support for Identica favourites.
  
390390 var $action = 'favourited';
391391}
392392
393class MicroBlogFavorites extends Favorites{
394 function format($message){
395 return MicroBlog::format($message);
396 }
397
398 function getSingleTitle(){
399 $message = $this->format($this->title);
400 $message = preg_replace('/^([\w]+)\: /i', '<a href="'.$this->link.'">$1</a>: ', $message);
401 return $this->getAuthor() ." $this->action ". $message;
402 }
403
404 function getSingleDescription(){
405 return '';
406 }
407
408 function getAuthor(){
409 return 'Blaise'; #TODO: harcoded author
410 }
411
412}
413
393414#TODO: make this more interesting
394415class StatusUpdates extends MicroBlog{
395416 function getSingleTitle(){
589589 public static $static_domain = 'identi.ca';
590590 public static $static_search_path = 'identi.ca/search/notice';
591591
592// function getSingleTitle(){
593// $title = parent::getSingleTitle();
594
595592 function format($message){
596593 $message = parent::format($message);
597594
599599 }
600600}
601601
602class IdenticaFavorites extends Favorites{
602class IdenticaFavorites extends MicroBlogFavorites{
603603 var $img = 'http://identi.ca/favicon.ico';
604 var $domain = 'identi.ca';
605 var $search_path = 'identi.ca/search/notice';
606 public static $static_domain = 'identi.ca';
607 public static $static_search_path = 'identi.ca/search/notice';
604608
605 function getSingleDescription(){
606 return '';
607 }
608
609 function getAuthor(){
610 return 'Blaise'; #TODO: hardcoded author
609 function format($message){
610 return Identica::format($message);
611611 }
612612}
613613
634634 public static $static_search_path = 'search.twitter.com/search';
635635}
636636
637class TwitterFavorites extends Favorites{
637class TwitterFavorites extends MicroBlogFavorites{
638638 var $img = 'http://www.twitter.com/favicon.ico';
639639 var $domain = 'twitter.com';
640640 var $search_path = 'search.twitter.com/search';
641641 public static $static_domain = 'twitter.com';
642642 public static $static_search_path = 'search.twitter.com/search';
643
644 function getSingleTitle(){
645 $message = Twitter::format($this->title);
646 $message = preg_replace('/^([\w]+)\: /i', '<a href="'.$this->link.'">$1</a>: ', $message);
647 return $this->getAuthor() ." $this->action ". $message;
648 }
649643
650 function getSingleDescription(){
651 return '';
652 }
653
654 function getAuthor(){
655 return 'Blaise'; #TODO: harcoded author
644 function format($message){
645 return Twitter::format($message);
656646 }
657647}
658648