aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-06-29 16:34:06 -0700
committerzotlabs <mike@macgirvin.com>2019-06-29 16:34:06 -0700
commit5ad6eeccdf7d1d260392031c6d4fc0e5308cc6b9 (patch)
tree2fe218403370569af83f46af766ef53994db18f1 /Zotlabs/Module/Channel.php
parent65cd33cb153ccc167567e0e4fbb3bf3856408add (diff)
downloadvolse-hubzilla-5ad6eeccdf7d1d260392031c6d4fc0e5308cc6b9.tar.gz
volse-hubzilla-5ad6eeccdf7d1d260392031c6d4fc0e5308cc6b9.tar.bz2
volse-hubzilla-5ad6eeccdf7d1d260392031c6d4fc0e5308cc6b9.zip
add opengraph meta info to channel page
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index afd82ed2f..b1639b213 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -111,6 +111,17 @@ class Channel extends Controller {
// we start loading content
profile_load($which,$profile);
+
+ App::$page['htmlhead'] .= '<meta property="og:title" content="' . htmlspecialchars($channel['channel_name']) . '">' . "\r\n";
+ App::$page['htmlhead'] .= '<meta property="og:image" content="' . $channel['xchan_photo_l'] . '">' . "\r\n";
+
+ if(App::$profile['about'] && perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_profile')) {
+ App::$page['htmlhead'] .= '<meta property="og:description" content="' . htmlspecialchars(App::$profile['about']) . '">' . "\r\n";
+ }
+ else {
+ App::$page['htmlhead'] .= '<meta property="og:description" content="' . htmlspecialchars(sprintf( t('This is the home page of %s.'), $channel['channel_name'])) . '">' . "\r\n";
+ }
+
}
function get($update = 0, $load = false) {