diff options
author | zotlabs <mike@macgirvin.com> | 2017-06-18 22:25:41 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-06-18 22:25:41 -0700 |
commit | b917cf1eccc62f5f533c0a61ffd699764b39e404 (patch) | |
tree | 09c849b0a4e545a360ad6910a2cf322d98dbc494 /include/conversation.php | |
parent | 4d5469f27ed2bea05dcfc4c286a9d14413a9e6b6 (diff) | |
download | volse-hubzilla-b917cf1eccc62f5f533c0a61ffd699764b39e404.tar.gz volse-hubzilla-b917cf1eccc62f5f533c0a61ffd699764b39e404.tar.bz2 volse-hubzilla-b917cf1eccc62f5f533c0a61ffd699764b39e404.zip |
allow moderated comments like wordpress if permissions are compatible
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/conversation.php b/include/conversation.php index 3f9ee5cfa..2eac2adde 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -533,6 +533,10 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ $live_update_div = '<div id="live-search"></div>' . "\r\n"; } + elseif ($mode === 'moderate') { + $profile_owner = local_channel(); + } + elseif ($mode === 'photos') { $profile_onwer = App::$profile['profile_uid']; $page_writeable = ($profile_owner == local_channel()); @@ -577,7 +581,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ if($items) { - if($mode === 'network-new' || $mode === 'search' || $mode === 'community') { + if(in_array($mode, [ 'network-new', 'search', 'community', 'moderate' ])) { // "New Item View" on network page or search page results // - just loop through the items and format them minimally for display @@ -609,14 +613,14 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($item['id'] != $item['parent'])) continue; - $nickname = $item['nickname']; +// $nickname = $item['nickname']; } - else - $nickname = App::$user['nickname']; +// else +// $nickname = App::$user['nickname']; - $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); - if($item['author-link'] && (! $item['author-name'])) - $profile_name = $item['author-link']; +// $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); +// if($item['author-link'] && (! $item['author-name'])) +// $profile_name = $item['author-link']; $sp = false; $profile_link = best_link_url($item,$sp); @@ -625,7 +629,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ else $profile_link = zid($profile_link); - $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); +// $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); $profile_name = $item['author']['xchan_name']; $profile_link = $item['author']['xchan_url']; @@ -679,6 +683,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ 'template' => $tpl, 'toplevel' => 'toplevel_item', 'mode' => $mode, + 'approve' => t('Approve'), + 'delete' => t('Delete'), 'id' => (($preview) ? 'P0' : $item['item_id']), 'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, $profile_url), 'profile_url' => $profile_link, |