From f9f4f8da0a73108ddf3935867f27ccc35ae9a054 Mon Sep 17 00:00:00 2001 From: cria-cow Date: Mon, 10 Jul 2017 18:51:55 -0400 Subject: [PATCH] Update twitter card configuration (the photo card is deprecated) to allow inline previews in Twitter. --- php/helpers/getGraphHeader.php | 8 +++++--- robots.txt | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/php/helpers/getGraphHeader.php b/php/helpers/getGraphHeader.php index c50b173..a330c74 100644 --- a/php/helpers/getGraphHeader.php +++ b/php/helpers/getGraphHeader.php @@ -25,7 +25,7 @@ function getGraphHeader($photoID) { $parseUrl = parse_url('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); $url = '//' . $parseUrl['host'] . $parseUrl['path'] . '?' . $parseUrl['query']; - $picture = '//' . $parseUrl['host'] . $parseUrl['path'] . '/../uploads/' . $dir . '/' . $row->url; + $picture = 'http://' . $parseUrl['host'] . '/uploads/' . $dir . '/' . $row->url; $url = htmlentities($url); $picture = htmlentities($picture); @@ -39,9 +39,11 @@ function getGraphHeader($photoID) { $return .= ''; $return .= ''; - $return .= ''; + $return .= ''; $return .= ''; - $return .= ''; + $return .= ''; + $return .= ''; + $return .= ''; $return .= ''; $return .= ''; diff --git a/robots.txt b/robots.txt index 8ddc059..691c5ad 100644 --- a/robots.txt +++ b/robots.txt @@ -4,5 +4,4 @@ Disallow: /dist/ Disallow: /docs/ Disallow: /php/ Disallow: /plugins/ -Disallow: /src/ -Disallow: /uploads/ \ No newline at end of file +Disallow: /src/ \ No newline at end of file