aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Ping.php61
-rw-r--r--Zotlabs/Widget/Activity_filter.php7
-rw-r--r--Zotlabs/Widget/Activity_order.php3
-rw-r--r--Zotlabs/Widget/Notifications.php15
-rw-r--r--include/conversation.php2
-rw-r--r--include/nav.php18
-rw-r--r--view/js/main.js2
-rw-r--r--view/theme/redbasic/css/style.css13
-rwxr-xr-xview/tpl/common_pills.tpl4
-rwxr-xr-xview/tpl/navbar_default.tpl3
-rw-r--r--view/tpl/profile_tabs.tpl4
-rwxr-xr-xview/tpl/profile_vcard.tpl2
12 files changed, 109 insertions, 25 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index bb80adc41..a43d9863e 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -39,6 +39,7 @@ class Ping extends \Zotlabs\Web\Controller {
$result['info'] = array();
$result['pubs'] = 0;
$result['files'] = 0;
+ $result['forums'] = 0;
if(! $_SESSION['static_loadtime'])
$_SESSION['static_loadtime'] = datetime_convert();
@@ -622,6 +623,66 @@ class Ping extends \Zotlabs\Web\Controller {
if(! ($vnotify & VNOTIFY_BIRTHDAY))
$result['birthdays'] = 0;
+
+
+#### unseen forum
+
+ $perms_sql = item_permissions_sql(local_channel()) . item_normal();
+
+ $xf = false;
+
+ $x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'",
+ intval(local_channel())
+ );
+ if($x1) {
+ $xc = ids_to_querystr($x1,'xchan',true);
+
+ $x2 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'tag_deliver' and v = '1' and xchan in (" . $xc . ") ",
+ intval(local_channel())
+ );
+
+ if($x2) {
+ $xf = ids_to_querystr($x2,'xchan',true);
+
+ // private forums
+ $x3 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'post_wall' and v = '1' and xchan in (" . $xc . ") and not xchan in (" . $xf . ") ",
+ intval(local_channel())
+ );
+ if($x3) {
+ $xf = ids_to_querystr(array_merge($x2,$x3),'xchan',true);
+ }
+ }
+ }
+
+ $sql_extra = (($xf) ? " and ( xchan_hash in (" . $xf . ") or xchan_pubforum = 1 ) " : " and xchan_pubforum = 1 ");
+
+ $r1 = q("select abook_id, xchan_hash, xchan_name, xchan_url, xchan_photo_s from abook left join xchan on abook_xchan = xchan_hash where xchan_deleted = 0 and abook_channel = %d and abook_pending = 0 and abook_ignored = 0 and abook_blocked = 0 $sql_extra order by xchan_name",
+ intval(local_channel())
+ );
+
+ if(! $r1) {
+ $result['forums'] = 0;
+ }
+ else {
+ $fcount = count($r1);
+ $r1['total'] = 0;
+ for($x = 0; $x < $fcount; $x ++) {
+ $r = q("select sum(item_unseen) as unseen from item
+ where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ",
+ intval(local_channel()),
+ dbesc($r1[$x]['xchan_hash'])
+ );
+ if($r[0]['unseen']) {
+ $r1[$x]['unseen'] = $r[0]['unseen'];
+ $r1['total'] = $r1['total'] + $r[0]['unseen'];
+ }
+ else {
+ unset($r1[$x]);
+ }
+ }
+ $result['forums'] = $r1['total'];
+ }
+
$x = json_encode($result);
$t8 = dba_timer();
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index b9c68da30..a123b739a 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -111,6 +111,13 @@ class Activity_filter {
if(x($_GET,'search')) {
$filter_active = 'search';
+ $tabs[] = [
+ 'label' => t('Search'),
+ 'icon' => 'search',
+ 'url' => z_root() . '/' . $cmd . '/?f=&search=' . $_GET['search'],
+ 'sel' => 'active disabled',
+ 'title' => t('Panel search'),
+ ];
}
$reset = [];
diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php
index 93bfc5a26..534d6caee 100644
--- a/Zotlabs/Widget/Activity_order.php
+++ b/Zotlabs/Widget/Activity_order.php
@@ -84,18 +84,21 @@ class Activity_order {
$tabs[] = [
'label' => t('Commented Date'),
+ 'icon' => '',
'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . $filter,
'sel'=> $commentord_active,
'title' => t('Order by last commented date'),
];
$tabs[] = [
'label' => t('Posted Date'),
+ 'icon' => '',
'url'=>z_root() . '/' . $cmd . '?f=&order=post' . $filter,
'sel'=> $postord_active,
'title' => t('Order by last posted date'),
];
$tabs[] = array(
'label' => t('Date Unthreaded'),
+ 'icon' => '',
'url' => z_root() . '/' . $cmd . '?f=&order=unthreaded' . $filter,
'sel' => $unthreaded_active,
'title' => t('Order unthreaded by date'),
diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php
index fc78a2a39..1be467ba6 100644
--- a/Zotlabs/Widget/Notifications.php
+++ b/Zotlabs/Widget/Notifications.php
@@ -111,6 +111,21 @@ class Notifications {
'label' => t('Mark all notices seen')
]
];
+
+ $notifications[] = [
+ 'type' => 'forums',
+ 'icon' => 'comments-o',
+ 'severity' => 'secondary',
+ 'label' => t('Forums'),
+ 'title' => t('Forums'),
+ 'viewall' => [
+ //'url' => 'notifications/system',
+ //'label' => t('View all notices')
+ ],
+ 'markall' => [
+ //'label' => t('Mark all notices seen')
+ ]
+ ];
}
if(local_channel() && is_site_admin()) {
diff --git a/include/conversation.php b/include/conversation.php
index 4a1cdc7da..61ca208b2 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1162,7 +1162,7 @@ function builtin_activity_puller($item, &$conv_responses) {
if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
$name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown'));
$url = (($item['author_xchan'] && $item['author']['xchan_photo_s'])
- ? '<a class="dropdown-item" href="' . chanlink_hash($item['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" />' . $name . '</a>'
+ ? '<a class="dropdown-item" href="' . chanlink_hash($item['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" /> ' . $name . '</a>'
: '<a class="dropdown-item" href="#" class="disabled">' . $name . '</a>'
);
diff --git a/include/nav.php b/include/nav.php
index 994819ed4..d83337481 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -91,9 +91,11 @@ function nav($template = 'default') {
if(local_channel()) {
if(! $_SESSION['delegate']) {
- $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
+ $nav['manage'] = array('manage', t('Manage Channels'), "", t('Manage your channels'),'manage_nav_btn');
}
+ $nav['group'] = array('group', t('Manage Privacy Groups'),"", t('Add and edit privacy groups'),'group_nav_btn');
+
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn');
@@ -182,20 +184,6 @@ function nav($template = 'default') {
$nav['search'] = ['search', t('Search'), "", t('Search site @name, !forum, #tag, ?docs, content'), $search_form_action];
-
- /**
- *
- * The following nav links are only show to logged in users
- *
- */
-
- if(local_channel()) {
- if(! $_SESSION['delegate']) {
- $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
- }
- $nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn');
- }
-
/**
* Admin page
*/
diff --git a/view/js/main.js b/view/js/main.js
index 3e24e8177..63ab938f0 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -451,7 +451,7 @@ function notificationsUpdate(cached_data) {
}
function handleNotifications(data) {
- if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) {
+ if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs || data.forums) {
$('.notifications-btn').css('opacity', 1);
$('#no_notifications').hide();
}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 4488dcddd..002fa700a 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1271,9 +1271,8 @@ img.mail-conv-sender-photo {
}
.menu-img-1 {
- height: 1.5em;
- width: 1.5em;
- margin-right: 5px;
+ height: 1.28571429em;
+ width: 1.28571429em;
border-radius: $radius;
}
@@ -1799,3 +1798,11 @@ dl.bb-dl > dd > li {
.cover-photo-review {
margin-bottom: 10px;
}
+
+.hover-fx-hide {
+ opacity: 0;
+}
+
+.hover-fx-show:hover .hover-fx-hide {
+ opacity: 1;
+}
diff --git a/view/tpl/common_pills.tpl b/view/tpl/common_pills.tpl
index 37d500bd1..8f4381f3d 100755
--- a/view/tpl/common_pills.tpl
+++ b/view/tpl/common_pills.tpl
@@ -1,10 +1,10 @@
<ul class="nav nav-pills flex-column">
{{foreach $pills as $p}}
- <li class="nav-item"{{if $p.id}} id="{{$p.id}}"{{/if}}>
+ <li class="nav-item hover-fx-show"{{if $p.id}} id="{{$p.id}}"{{/if}}>
<a class="nav-link{{if $p.sel}} {{$p.sel}}{{/if}}" href="{{$p.url}}"{{if $p.title}} title="{{$p.title}}"{{/if}}{{if $p.sub}} onclick="{{if $p.sel}}closeOpen('{{$p.id}}_sub');{{else}}openClose('{{$p.id}}_sub');{{/if}} return false;"{{/if}}>
{{if $p.icon}}<i class="fa fa-fw fa-{{$p.icon}}"></i>{{/if}}
{{$p.label}}
- {{if $p.sub}}<i class="fa fa-fw fa-caret-down"></i>{{/if}}
+ {{if $p.sub}}<i class="fa fa-fw fa-caret-down hover-fx-hide"></i>{{/if}}
</a>
{{if $p.sub}}
<ul class="nav nav-pills flex-column ml-4" id="{{$p.id}}_sub"{{if !$p.sel}} style="display: none;"{{/if}}>
diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl
index ebcadf365..0eb0a964c 100755
--- a/view/tpl/navbar_default.tpl
+++ b/view/tpl/navbar_default.tpl
@@ -27,6 +27,9 @@
{{foreach $nav.usermenu as $usermenu}}
<a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a>
{{/foreach}}
+ {{if $nav.group}}
+ <a class="dropdown-item" href="{{$nav.group.0}}" title="{{$nav.group.3}}" role="menuitem" id="{{$nav.group.4}}">{{$nav.group.1}}</a>
+ {{/if}}
{{if $nav.manage}}
<a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a>
{{/if}}
diff --git a/view/tpl/profile_tabs.tpl b/view/tpl/profile_tabs.tpl
index e77da23f3..dd9fbc52b 100644
--- a/view/tpl/profile_tabs.tpl
+++ b/view/tpl/profile_tabs.tpl
@@ -1,5 +1,5 @@
-<div class="dropdown-header text-white-50 d-lg-none" ><img src="{{$thumb}}" class="menu-img-1">{{$name}}</div>
-<div class="dropdown-header text-black-50 d-none d-lg-block"><img src="{{$thumb}}" class="menu-img-1">{{$name}}</div>
+<div class="dropdown-header text-white-50 d-lg-none" ><img src="{{$thumb}}" class="menu-img-1"> {{$name}}</div>
+<div class="dropdown-header text-black-50 d-none d-lg-block"><img src="{{$thumb}}" class="menu-img-1"> {{$name}}</div>
{{foreach $tabs as $tab}}
<a class="dropdown-item{{if $tab.sel}} {{$tab.sel}}{{/if}}" href="{{$tab.url}}"{{if $tab.title}} title="{{$tab.title}}"{{/if}}><i class="fa fa-fw fa-{{$tab.icon}} generic-icons-nav"></i>{{$tab.label}}</a>
{{/foreach}}
diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl
index 07e6dcc0a..262bf257f 100755
--- a/view/tpl/profile_vcard.tpl
+++ b/view/tpl/profile_vcard.tpl
@@ -11,7 +11,7 @@
<a class="dropdown-toggle" data-toggle="dropdown" href="#" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a>
<div class="dropdown-menu dropdown-menu-right" role="menu">
{{foreach $editmenu.menu.entries as $e}}
- <a href="profiles/{{$e.id}}" class="dropdown-item"><img class="menu-img-1" src='{{$e.photo}}'>{{$e.profile_name}}</a>
+ <a href="profiles/{{$e.id}}" class="dropdown-item"><img class="menu-img-1" src='{{$e.photo}}'> {{$e.profile_name}}</a>
{{/foreach}}
<a href="profile_photo" class="dropdown-item">{{$editmenu.menu.chg_photo}}</a>
{{if $editmenu.menu.cr_new}}<a href="profiles/new" id="profile-listing-new-link" class="dropdown-item">{{$editmenu.menu.cr_new}}</a>{{/if}}