aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-22 15:39:06 -0800
committerzotlabs <mike@macgirvin.com>2017-11-22 15:39:06 -0800
commit6c178d44858bbdfd582d09eb4568d32292c0b2c2 (patch)
treeef71ebbdd8629b8c66a52f8b14d0e9db16670499 /include/conversation.php
parent8bd8af7d16d6b4fb40680bd33b99bbfd582a1208 (diff)
downloadvolse-hubzilla-6c178d44858bbdfd582d09eb4568d32292c0b2c2.tar.gz
volse-hubzilla-6c178d44858bbdfd582d09eb4568d32292c0b2c2.tar.bz2
volse-hubzilla-6c178d44858bbdfd582d09eb4568d32292c0b2c2.zip
article feature
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 1cbd9116c..8c75389c4 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -539,6 +539,15 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
$jsreload = $_SESSION['return_url'];
}
+ elseif ($mode === 'articles') {
+ $profile_owner = App::$profile['profile_uid'];
+ $page_writeable = ($profile_owner == local_channel());
+ $live_update_div = '<div id="live-articles"></div>' . "\r\n"
+ . "<script> var profile_uid = " . App::$profile['profile_uid']
+ . "; var netargs = '?f='; var profile_page = " . App::$pager['page'] . "; </script>\r\n";
+ $jsreload = $_SESSION['return_url'];
+ }
+
elseif ($mode === 'display') {
$profile_owner = local_channel();
@@ -714,7 +723,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
$conv_link_mid = (($mode == 'moderate') ? $item['parent_mid'] : $item['mid']);
- $conv_link = (($item['item_type'] == ITEM_TYPE_CARD) ? $item['plink'] : z_root() . '/display/' . gen_link_id($conv_link_mid));
+ $conv_link = ((in_array($item['item_type'],[ ITEM_TYPE_CARD, ITEM_TYPE_ARTICLE] )) ? $item['plink'] : z_root() . '/display/' . gen_link_id($conv_link_mid));
$tmp_item = array(
@@ -1887,6 +1896,17 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
'icon' => 'list'
);
}
+
+ if(feature_enabled($uid,'articles')) {
+ $tabs[] = array(
+ 'label' => t('articles'),
+ 'url' => z_root() . '/articles/' . $nickname,
+ 'sel' => ((argv(0) == 'articles') ? 'active' : ''),
+ 'title' => t('View Articles'),
+ 'id' => 'articles-tab',
+ 'icon' => 'file-text-o'
+ );
+ }
if($has_webpages && feature_enabled($uid,'webpages')) {
$tabs[] = array(