@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.

one more phame tweak for better social sharing -- make sure $uri is the full uri

Summary: basically when we're on a page we have a URIPath so set that and pass it over. I wasn't super duper happy with this but it seems to be the best way to pass this data.

Test Plan: verified the og:url was correct on my dev instance of phacility blog for both the main blog and individual post view

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

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

+14 -2
+1 -1
externals/skins/oblivious/header.php
··· 9 9 <body> 10 10 <div class="oblivious-info"> 11 11 <h1> 12 - <a href="<?php echo _e($uri); ?>"><?php 12 + <a href="<?php echo _e($home_uri); ?>"><?php 13 13 echo _e($blog->getName()); 14 14 ?></a> 15 15 </h1>
+11
src/applications/phame/skins/PhameBasicBlogSkin.php
··· 11 11 private $title; 12 12 private $description; 13 13 private $oGType; 14 + private $uriPath; 15 + 16 + public function setURIPath($uri_path) { 17 + $this->uriPath = $uri_path; 18 + return $this; 19 + } 20 + public function getURIPath() { 21 + return $this->uriPath; 22 + } 14 23 15 24 protected function setOGType($og_type) { 16 25 $this->oGType = $og_type; ··· 214 223 $this->setTitle($this->getBlog()->getName()); 215 224 $this->setDescription($this->getBlog()->getDescription()); 216 225 $this->setOGType('website'); 226 + $this->setURIPath(''); 217 227 if (preg_match('@^/post/(?P<name>.*)$@', $path, $matches)) { 218 228 $post = id(new PhamePostQuery()) 219 229 ->setViewer($user) ··· 226 236 $this->setTitle($post->getTitle()); 227 237 $this->setDescription($description); 228 238 $this->setOGType('article'); 239 + $this->setURIPath('post/'.$post->getPhameTitle()); 229 240 $view = head($this->buildPostViews(array($post))); 230 241 return $this->renderPostDetail($view); 231 242 }
+2 -1
src/applications/phame/skins/PhameBasicTemplateBlogSkin.php
··· 82 82 return array( 83 83 'skin' => $this, 84 84 'blog' => $this->getBlog(), 85 - 'uri' => $this->getURI(''), 85 + 'uri' => $this->getURI($this->getURIPath()), 86 + 'home_uri' => $this->getURI(''), 86 87 'title' => $this->getTitle(), 87 88 'description' => $this->getDescription(), 88 89 'og_type' => $this->getOGType(),