@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Phame - fix some issues with feed reported on github (290, 291)

Summary: we need a link with type=self to pass xml validation. Note we will always fail validation until we remove any sigil-related stuff from the resultant HTML since we just made that up for our purposes. Also serves up the feed link on the blog view controller, complete with tooltip about how the custom domain stuff isn't supported.

Test Plan: viewed a blog page and liked the feed uri property. viewed a feed and verified the new link self stuff. post push I'll try the validator again.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, vrana

Differential Revision: https://secure.phabricator.com/D5667

+27 -2
+9 -2
src/applications/phame/controller/blog/PhameBlogFeedController.php
··· 33 33 ->withVisibility(PhamePost::VISIBILITY_PUBLISHED) 34 34 ->execute(); 35 35 36 + $blog_uri = PhabricatorEnv::getProductionURI( 37 + $this->getApplicationURI('blog/feed/'.$blog->getID().'/')); 36 38 $content = array(); 37 39 $content[] = phutil_tag('title', array(), $blog->getName()); 38 - $content[] = phutil_tag('id', array(), PhabricatorEnv::getProductionURI( 39 - '/phame/blog/view/'.$blog->getID().'/')); 40 + $content[] = phutil_tag('id', array(), $blog_uri); 41 + $content[] = phutil_tag('link', 42 + array( 43 + 'rel' => 'self', 44 + 'type' => 'application/atom+xml', 45 + 'href' => $blog_uri 46 + )); 40 47 41 48 $updated = $blog->getDateModified(); 42 49 if ($posts) {
+18
src/applications/phame/controller/blog/PhameBlogViewController.php
··· 65 65 } 66 66 67 67 private function renderProperties(PhameBlog $blog, PhabricatorUser $user) { 68 + require_celerity_resource('aphront-tooltip-css'); 69 + Javelin::initBehavior('phabricator-tooltips'); 70 + 68 71 $properties = new PhabricatorPropertyListView(); 69 72 70 73 $properties->addProperty( ··· 74 77 $properties->addProperty( 75 78 pht('Domain'), 76 79 $blog->getDomain()); 80 + 81 + $feed_uri = PhabricatorEnv::getProductionURI( 82 + $this->getApplicationURI('blog/feed/'.$blog->getID().'/')); 83 + $properties->addProperty( 84 + pht('Atom URI'), 85 + javelin_tag('a', 86 + array( 87 + 'href' => $feed_uri, 88 + 'sigil' => 'has-tooltip', 89 + 'meta' => array( 90 + 'tip' => pht('Atom URI does not support custom domains.'), 91 + 'size' => 320, 92 + ) 93 + ), 94 + $feed_uri)); 77 95 78 96 $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions( 79 97 $user,