From 05654e498034329759351c4a64349734ce6b7204 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 4 Sep 2017 21:02:44 -0700 Subject: card embed improved --- Zotlabs/Module/Oep.php | 4 ++-- include/bbcode.php | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index 9a1317142..5e06d3540 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -172,7 +172,7 @@ class Oep extends \Zotlabs\Web\Controller { if(! perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_pages')) return $ret; - $sql_extra = items_permissions_sql($channel['channel_id'],get_observer_hash()); + $sql_extra = item_permissions_sql($channel['channel_id'],get_observer_hash()); $r = q("select * from iconfig where iconfig.cat = 'system' and iconfig.k = 'CARD' and iconfig.v = '%s' limit 1", dbesc($res) @@ -183,7 +183,7 @@ class Oep extends \Zotlabs\Web\Controller { else { return $ret; } - + $r = q("select * from item where item.uid = %d and item_type = %d $sql_extra order by item.created desc", diff --git a/include/bbcode.php b/include/bbcode.php index 470854f06..9a2a6eb9b 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -327,11 +327,16 @@ function bb_ShareAttributes($match) { if ($avatar != "") $headline .= '' . $author . ''; + if(strpos($link,'/cards/')) + $type = t('card'); + else + $type = t('post'); + // Bob Smith wrote the following post 2 hours ago $fmt = sprintf( t('%1$s wrote the following %2$s %3$s'), '' . $author . '', - '' . t('post') . '', + '' . $type . '', $reldate ); -- cgit v1.2.3