diff options
author | zotlabs <mike@macgirvin.com> | 2018-03-27 18:01:20 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-03-27 18:01:20 -0700 |
commit | 08274ffab733a2e7c861006d6ba72f4695b069e6 (patch) | |
tree | b14d3dd107c9452056297fbde6aa048a64eb991c | |
parent | 5ea11d1222c24330dee496dade4bd08d362e95bd (diff) | |
download | volse-hubzilla-08274ffab733a2e7c861006d6ba72f4695b069e6.tar.gz volse-hubzilla-08274ffab733a2e7c861006d6ba72f4695b069e6.tar.bz2 volse-hubzilla-08274ffab733a2e7c861006d6ba72f4695b069e6.zip |
put vcard widget with author of top-level post on display page
-rw-r--r-- | Zotlabs/Module/Display.php | 10 | ||||
-rw-r--r-- | include/connections.php | 1 | ||||
-rw-r--r-- | view/pdl/mod_display.pdl | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index fa29ce66c..d3047bc59 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -102,7 +102,7 @@ class Display extends \Zotlabs\Web\Controller { if($decoded) $item_hash = $decoded; - $r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, item_blocked from item where mid like '%s' limit 1", + $r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid like '%s' limit 1", dbesc($item_hash . '%') ); @@ -110,6 +110,13 @@ class Display extends \Zotlabs\Web\Controller { $target_item = $r[0]; } + $x = q("select * from xchan where xchan_hash = '%s' limit 1", + dbesc($target_item['author_xchan']) + ); + if($x) { + \App::$poi = $x[0]; + } + //if the item is to be moderated redirect to /moderate if($target_item['item_blocked'] == ITEM_MODERATED) { goaway(z_root() . '/moderate/' . $target_item['id']); @@ -169,6 +176,7 @@ class Display extends \Zotlabs\Web\Controller { } } + $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0); diff --git a/include/connections.php b/include/connections.php index c5d74d4ca..8d1b9e07f 100644 --- a/include/connections.php +++ b/include/connections.php @@ -100,7 +100,6 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { if(! $xchan) return; -// FIXME - show connect button to observer if appropriate $connect = false; if(local_channel()) { $r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1", diff --git a/view/pdl/mod_display.pdl b/view/pdl/mod_display.pdl index 95f069031..a5461df50 100644 --- a/view/pdl/mod_display.pdl +++ b/view/pdl/mod_display.pdl @@ -1,3 +1,6 @@ +[region=aside] +[widget=vcard][/widget] +[/region] [region=right_aside] [widget=notifications][/widget] [widget=newmember][/widget] |