3 final class PhabricatorPhameApplication
extends PhabricatorApplication
{
5 public function getName() {
9 public function getBaseURI() {
13 public function getIcon() {
17 public function getShortDescription() {
18 return pht('Internal and External Blogs');
21 public function getTitleGlyph() {
22 return "\xe2\x9c\xa9";
25 public function getHelpDocumentationArticles(PhabricatorUser
$viewer) {
28 'name' => pht('Phame User Guide'),
29 'href' => PhabricatorEnv
::getDoclink('Phame User Guide'),
34 public function getRoutes() {
36 '/J(?P<id>[1-9]\d*)' => 'PhamePostViewController',
38 '' => 'PhameHomeController',
40 // NOTE: The live routes include an initial "/", so leave it off
42 '(?P<live>live)/(?P<blogID>\d+)' => $this->getLiveRoutes(),
44 '(?:query/(?P<queryKey>[^/]+)/)?' => 'PhamePostListController',
45 'blogger/(?P<bloggername>[\w\.-_]+)/' => 'PhamePostListController',
46 $this->getEditRoutePattern('edit/')
47 => 'PhamePostEditController',
48 'history/(?P<id>\d+)/' => 'PhamePostHistoryController',
49 'view/(?P<id>\d+)/(?:(?P<slug>[^/]+)/)?' => 'PhamePostViewController',
50 '(?P<action>publish|unpublish)/(?P<id>\d+)/'
51 => 'PhamePostPublishController',
52 'preview/' => 'PhabricatorMarkupPreviewController',
53 'move/(?P<id>\d+)/' => 'PhamePostMoveController',
54 'archive/(?P<id>\d+)/' => 'PhamePostArchiveController',
55 'header/(?P<id>[1-9]\d*)/' => 'PhamePostHeaderPictureController',
58 '(?:query/(?P<queryKey>[^/]+)/)?' => 'PhameBlogListController',
59 'archive/(?P<id>[^/]+)/' => 'PhameBlogArchiveController',
60 $this->getEditRoutePattern('edit/')
61 => 'PhameBlogEditController',
62 'view/(?P<blogID>\d+)/' => 'PhameBlogViewController',
63 'manage/(?P<id>[^/]+)/' => 'PhameBlogManageController',
64 'feed/(?P<id>[^/]+)/' => 'PhameBlogFeedController',
65 'picture/(?P<id>[1-9]\d*)/' => 'PhameBlogProfilePictureController',
66 'header/(?P<id>[1-9]\d*)/' => 'PhameBlogHeaderPictureController',
72 public function getBlogRoutes() {
73 return $this->getLiveRoutes() +
array(
74 '/status/' => 'PhabricatorStatusController',
75 '/favicon.ico' => 'PhabricatorFaviconController',
76 '/robots.txt' => 'PhabricatorRobotsBlogController',
80 private function getLiveRoutes() {
83 '' => 'PhameBlogViewController',
84 'post/(?P<id>\d+)/(?:(?P<slug>[^/]+)/)?' => 'PhamePostViewController',
90 public function getQuicksandURIPatternBlacklist() {
96 public function getRemarkupRules() {
98 new PhamePostRemarkupRule(),
103 protected function getCustomCapabilities() {
105 PhameBlogCreateCapability
::CAPABILITY
=> array(
106 'default' => PhabricatorPolicies
::POLICY_USER
,
107 'caption' => pht('Default create policy for blogs.'),