Commit 8e4b8b12a72383dd2ca950576e88ed3723ebe81c
- Diff rendering mode:
- inline
- side by side
entry.class.php
(31 / 23)
|   | |||
| 390 | 390 | var $action = 'favourited'; | |
| 391 | 391 | } | |
| 392 | 392 | ||
| 393 | class 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 | |||
| 393 | 414 | #TODO: make this more interesting | |
| 394 | 415 | class StatusUpdates extends MicroBlog{ | |
| 395 | 416 | function getSingleTitle(){ | |
| … | … | ||
| 589 | 589 | public static $static_domain = 'identi.ca'; | |
| 590 | 590 | public static $static_search_path = 'identi.ca/search/notice'; | |
| 591 | 591 | ||
| 592 | // function getSingleTitle(){ | ||
| 593 | // $title = parent::getSingleTitle(); | ||
| 594 | |||
| 595 | 592 | function format($message){ | |
| 596 | 593 | $message = parent::format($message); | |
| 597 | 594 | ||
| … | … | ||
| 599 | 599 | } | |
| 600 | 600 | } | |
| 601 | 601 | ||
| 602 | class IdenticaFavorites extends Favorites{ | ||
| 602 | class IdenticaFavorites extends MicroBlogFavorites{ | ||
| 603 | 603 | 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'; | ||
| 604 | 608 | ||
| 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); | ||
| 611 | 611 | } | |
| 612 | 612 | } | |
| 613 | 613 | ||
| … | … | ||
| 634 | 634 | public static $static_search_path = 'search.twitter.com/search'; | |
| 635 | 635 | } | |
| 636 | 636 | ||
| 637 | class TwitterFavorites extends Favorites{ | ||
| 637 | class TwitterFavorites extends MicroBlogFavorites{ | ||
| 638 | 638 | var $img = 'http://www.twitter.com/favicon.ico'; | |
| 639 | 639 | var $domain = 'twitter.com'; | |
| 640 | 640 | var $search_path = 'search.twitter.com/search'; | |
| 641 | 641 | public static $static_domain = 'twitter.com'; | |
| 642 | 642 | 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 | } | ||
| 649 | 643 | ||
| 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); | ||
| 656 | 646 | } | |
| 657 | 647 | } | |
| 658 | 648 |

