Merge branch 'master' into zapp

This commit is contained in:
zotlabs 2018-06-03 17:58:24 -07:00
commit 4524d241a2
36 changed files with 710 additions and 120 deletions

View file

@ -71,14 +71,18 @@ class Poller {
$randfunc = db_getfunc('RAND');
$contacts = q("SELECT * FROM abook LEFT JOIN xchan on abook_xchan = xchan_hash
$contacts = q("SELECT abook.abook_updated, abook.abook_connected, abook.abook_feed,
abook.abook_channel, abook.abook_id, abook.abook_archived, abook.abook_pending,
abook.abook_ignored, abook.abook_blocked,
xchan.xchan_network,
account.account_lastlog, account.account_flags
FROM abook LEFT JOIN xchan on abook_xchan = xchan_hash
LEFT JOIN account on abook_account = account_id
where abook_self = 0
$sql_extra
AND (( account_flags = %d ) OR ( account_flags = %d )) $abandon_sql ORDER BY $randfunc",
intval(ACCOUNT_OK),
intval(ACCOUNT_UNVERIFIED) // FIXME
);
if($contacts) {

View file

@ -94,8 +94,7 @@ class Acl extends \Zotlabs\Web\Controller {
. " then POSITION('" . protect_sprintf(dbesc($search))
. "' IN xchan_name) else position('" . protect_sprintf(dbesc(punify($search))) . "' IN xchan_addr) end, ";
$col = ((strpos($search,'@') !== false) ? 'xchan_addr' : 'xchan_name' );
$sql_extra3 = "AND $col like " . protect_sprintf( "'%" . dbesc(($col === 'xchan_addr') ? punify($search) : $search) . "%'" ) . " ";
$sql_extra3 = "AND ( xchan_addr like " . protect_sprintf( "'%" . dbesc(punify($search)) . "%'" ) . " OR xchan_name like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ) ";
}
else {

View file

@ -19,6 +19,9 @@ class Channel extends \Zotlabs\Web\Controller {
function init() {
if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']))
goaway('search' . '?f=&search=' . $_GET['search']);
$which = null;
if(argc() > 1)
$which = argv(1);
@ -121,7 +124,9 @@ class Channel extends \Zotlabs\Web\Controller {
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'post');
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$search = ((x($_GET,'search')) ? $_GET['search'] : EMPTY_STR);
$groups = array();
@ -157,9 +162,12 @@ class Channel extends \Zotlabs\Web\Controller {
$static = channel_manual_conv_update(\App::$profile['profile_uid']);
//$o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']);
// $o .= common_friends_visitor_widget(\App::$profile['profile_uid']);
// search terms header
if($search) {
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => t('Search Results For:') . ' ' . htmlspecialchars($search, ENT_COMPAT,'UTF-8')
));
}
if($channel && $is_owner) {
$channel_acl = array(
@ -218,15 +226,13 @@ class Channel extends \Zotlabs\Web\Controller {
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
$search = EMPTY_STR;
if(x($_GET,'search')) {
$search = escape_tags($_GET['search']);
if($search) {
$search = escape_tags($search);
if(strpos($search,'#') === 0) {
$sql_extra2 .= term_query('item',substr($search,1),TERM_HASHTAG,TERM_COMMUNITYTAG);
$sql_extra .= term_query('item',substr($search,1),TERM_HASHTAG,TERM_COMMUNITYTAG);
}
else {
$sql_extra2 .= sprintf(" AND item.body like '%s' ",
$sql_extra .= sprintf(" AND item.body like '%s' ",
dbesc(protect_sprintf('%' . $search . '%'))
);
}
@ -283,6 +289,7 @@ class Channel extends \Zotlabs\Web\Controller {
if($datequery) {
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
$order = 'post';
}
if($datequery2) {
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
@ -292,6 +299,12 @@ class Channel extends \Zotlabs\Web\Controller {
$sql_extra2 .= " and item.item_thread_top != 0 ";
}
if($order === 'post')
$ordering = "created";
else
$ordering = "commented";
$itemspage = get_pconfig(local_channel(),'system','itemspage');
\App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
@ -308,13 +321,13 @@ class Channel extends \Zotlabs\Web\Controller {
}
}
else {
$r = q("SELECT item.parent AS item_id FROM item
$r = q("SELECT DISTINCT item.parent AS item_id, $ordering FROM item
left join abook on ( item.author_xchan = abook.abook_xchan $abook_uids )
WHERE true and item.uid = %d $item_normal
AND (abook.abook_blocked = 0 or abook.abook_flags is null)
AND item.item_wall = 1
$sql_extra $sql_extra2
ORDER BY created DESC, id $pager_sql ",
AND item.item_wall = 1 AND item.item_thread_top = 1
$sql_extra $sql_extra2
ORDER BY $ordering DESC $pager_sql ",
intval(\App::$profile['profile_uid'])
);
}
@ -323,7 +336,6 @@ class Channel extends \Zotlabs\Web\Controller {
$r = array();
}
}
if($r) {
$parents_str = ids_to_querystr($r,'item_id');
@ -339,7 +351,7 @@ class Channel extends \Zotlabs\Web\Controller {
xchan_query($items);
$items = fetch_post_tags($items, true);
$items = conv_sort($items,'created');
$items = conv_sort($items,$ordering);
if($load && $mid && (! count($items))) {
// This will happen if we don't have sufficient permissions
@ -384,7 +396,7 @@ class Channel extends \Zotlabs\Web\Controller {
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$search' => $search,
'$xchan' => '',
'$order' => '',
'$order' => $order,
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$file' => '',
'$cats' => (($category) ? urlencode($category) : ''),
@ -430,12 +442,13 @@ class Channel extends \Zotlabs\Web\Controller {
}
}
$mode = (($search) ? 'search' : 'channel');
if($checkjs->disabled()) {
$o .= conversation($items,'channel',$update,'traditional');
$o .= conversation($items,$mode,$update,'traditional');
}
else {
$o .= conversation($items,'channel',$update,$page_mode);
$o .= conversation($items,$mode,$update,$page_mode);
}
if((! $update) || ($checkjs->disabled())) {

View file

@ -9,6 +9,7 @@ namespace Zotlabs\Module;
require_once('include/photo/photo_driver.php');
require_once('include/channel.php');
require_once('include/photos.php');

View file

@ -14,6 +14,9 @@ class Network extends \Zotlabs\Web\Controller {
notice( t('Permission denied.') . EOL);
return;
}
if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']))
goaway('search' . '?f=&search=' . $_GET['search']);
if(count($_GET) < 2) {
$network_options = get_pconfig(local_channel(),'system','network_page_default');
@ -56,13 +59,26 @@ class Network extends \Zotlabs\Web\Controller {
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
$nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
$static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$verb = ((x($_REQUEST,'verb')) ? $_REQUEST['verb'] : '');
$order = get_pconfig(local_channel(), 'mod_network', 'order', 0);
switch($order) {
case 0:
$order = 'comment';
break;
case 1:
$order = 'post';
break;
case 2:
$nouveau = true;
break;
}
$search = (($_GET['search']) ? $_GET['search'] : '');
if($search) {
$_GET['netsearch'] = escape_tags($search);
@ -83,7 +99,7 @@ class Network extends \Zotlabs\Web\Controller {
}
if($datequery)
$_GET['order'] = 'post';
$order = 'post';
// filter by collection (e.g. group)
@ -106,16 +122,11 @@ class Network extends \Zotlabs\Web\Controller {
$def_acl = array('allow_gid' => '<' . $r[0]['hash'] . '>');
}
$default_cmin = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0);
$default_cmax = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmax',99) : 99);
// if no tabs are selected, defaults to comments
$cid = ((x($_GET,'cid')) ? intval($_GET['cid']) : 0);
$star = ((x($_GET,'star')) ? intval($_GET['star']) : 0);
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'comment');
$liked = ((x($_GET,'liked')) ? intval($_GET['liked']) : 0);
$conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0);
$spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0);
@ -129,12 +140,14 @@ class Network extends \Zotlabs\Web\Controller {
if(x($_GET,'search') || x($_GET,'file'))
$nouveau = true;
if($cid) {
$r = q("SELECT abook_xchan FROM abook WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
$cid_r = q("SELECT abook.abook_xchan, xchan.xchan_addr, xchan.xchan_name, xchan.xchan_url, xchan.xchan_photo_s, xchan.xchan_pubforum from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and abook_blocked = 0 limit 1",
intval($cid),
intval(local_channel())
);
if(! $r) {
if(! $cid_r) {
if($update) {
killme();
}
@ -143,13 +156,13 @@ class Network extends \Zotlabs\Web\Controller {
// NOTREACHED
}
if($_GET['pf'] === '1')
$deftag = '!' . t('forum') . '+' . intval($cid);
$deftag = '!{' . (($cid_r[0]['xchan_addr']) ? $cid_r[0]['xchan_addr'] : $cid_r[0]['xchan_url']) . '}';
else
$def_acl = [ 'allow_cid' => '<' . $r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
$def_acl = [ 'allow_cid' => '<' . $cid_r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
}
if(! $update) {
$tabs = network_tabs();
$tabs = ''; //network_tabs();
$o .= $tabs;
// search terms header
@ -227,6 +240,7 @@ class Network extends \Zotlabs\Web\Controller {
}
}
$item_thread_top = '';
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND (( author_xchan IN ( $contact_str ) OR owner_xchan in ( $contact_str )) or allow_gid like '" . protect_sprintf('%<' . dbesc($group_hash) . '>%') . "' ) and id = parent $item_normal ) ";
$x = group_rec_byhash(local_channel(), $group_hash);
@ -242,27 +256,23 @@ class Network extends \Zotlabs\Web\Controller {
$o .= $status_editor;
}
elseif($cid) {
$r = q("SELECT abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and abook_blocked = 0 limit 1",
intval($cid),
intval(local_channel())
);
if($r) {
$item_thread_top = '';
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or (body like '" . protect_sprintf('%' . $r[0]['xchan_url'] . '%') . "' and item_thread_top = 1 )) $item_normal ) ";
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => '<a href="' . zid($r[0]['xchan_url']) . '" ><img src="' . zid($r[0]['xchan_photo_s']) . '" alt="' . urlencode($r[0]['xchan_name']) . '" /></a> <a href="' . zid($r[0]['xchan_url']) . '" >' . $r[0]['xchan_name'] . '</a>'
));
$o = $tabs;
$o .= $title;
$o .= $status_editor;
}
else {
notice( t('Invalid connection.') . EOL);
goaway(z_root() . '/network');
elseif($cid_r) {
$item_thread_top = '';
if($load || $update) {
$p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal ORDER BY created DESC");
$p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'");
$p_str = ids_to_querystr(array_merge($p1,$p2),'parent');
$sql_extra = " AND item.parent IN ( $p_str ) ";
}
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => '<a href="' . zid($cid_r[0]['xchan_url']) . '" ><img src="' . zid($cid_r[0]['xchan_photo_s']) . '" alt="' . urlencode($cid_r[0]['xchan_name']) . '" /></a> <a href="' . zid($cid_r[0]['xchan_url']) . '" >' . $cid_r[0]['xchan_name'] . '</a>'
));
$o = $tabs;
$o .= $title;
$o .= $status_editor;
}
elseif($xchan) {
$r = q("select * from xchan where xchan_hash = '%s'",
@ -376,7 +386,7 @@ class Network extends \Zotlabs\Web\Controller {
if($conv) {
$item_thread_top = '';
$sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan like '%s' or item_mentionsme = 1 )) ",
$sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan = '%s' or item_mentionsme = 1 )) ",
dbesc(protect_sprintf($channel['channel_hash']))
);
}
@ -557,6 +567,9 @@ class Network extends \Zotlabs\Web\Controller {
}
$mode = (($nouveau) ? 'network-new' : 'network');
if($search)
$mode = 'search';
$o .= conversation($items,$mode,$update,$page_mode);

View file

@ -35,10 +35,12 @@ class Ping extends \Zotlabs\Web\Controller {
$result['birthdays_today'] = 0;
$result['all_events'] = 0;
$result['all_events_today'] = 0;
$result['notice'] = array();
$result['info'] = array();
$result['notice'] = [];
$result['info'] = [];
$result['pubs'] = 0;
$result['files'] = 0;
$result['forums'] = 0;
$result['forums_sub'] = [];
if(! $_SESSION['static_loadtime'])
$_SESSION['static_loadtime'] = datetime_convert();
@ -622,6 +624,58 @@ class Ping extends \Zotlabs\Web\Controller {
if(! ($vnotify & VNOTIFY_BIRTHDAY))
$result['birthdays'] = 0;
if($vnotify & VNOTIFY_FORUMS) {
$forums = get_forum_channels(local_channel());
if(! $forums) {
$result['forums'] = 0;
}
else {
$perms_sql = item_permissions_sql(local_channel()) . item_normal();
$fcount = count($forums);
$forums['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($forums[$x]['xchan_hash'])
);
if($r[0]['unseen']) {
$forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/network/?f=&cid=' . $forums[$x]['abook_id']);
$forums[$x]['name'] = $forums[$x]['xchan_name'];
$forums[$x]['url'] = $forums[$x]['xchan_url'];
$forums[$x]['photo'] = $forums[$x]['xchan_photo_s'];
$forums[$x]['unseen'] = $r[0]['unseen'];
$forums[$x]['private_forum'] = (($forums[$x]['private_forum']) ? 'lock' : '');
$forums[$x]['message'] = (($forums[$x]['private_forum']) ? t('Private forum') : t('Public forum'));
$forums['total'] = $forums['total'] + $r[0]['unseen'];
unset($forums[$x]['abook_id']);
unset($forums[$x]['xchan_hash']);
unset($forums[$x]['xchan_name']);
unset($forums[$x]['xchan_url']);
unset($forums[$x]['xchan_photo_s']);
//if($forums[$x]['private_forum'])
// unset($forums[$x]['private_forum']);
}
else {
unset($forums[$x]);
}
}
$result['forums'] = $forums['total'];
unset($forums['total']);
$result['forums_sub'] = $forums;
}
}
$x = json_encode($result);
$t8 = dba_timer();

View file

@ -213,6 +213,8 @@ class Channel {
$vnotify += intval($_POST['vnotify13']);
if(x($_POST,'vnotify14'))
$vnotify += intval($_POST['vnotify14']);
if(x($_POST,'vnotify15'))
$vnotify += intval($_POST['vnotify15']);
$always_show_in_notices = x($_POST,'always_show_in_notices') ? 1 : 0;
@ -597,6 +599,7 @@ class Channel {
'$vnotify12' => array('vnotify12', t('Unseen shared files'), ($vnotify & VNOTIFY_FILES), VNOTIFY_FILES, '', $yes_no),
'$vnotify13' => (($disable_discover_tab && !$site_firehose) ? array() : array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)),
'$vnotify14' => array('vnotify14', t('Unseen likes and dislikes'), ($vnotify & VNOTIFY_LIKE), VNOTIFY_LIKE, '', $yes_no),
'$vnotify15' => array('vnotify15', t('Unseen forum posts'), ($vnotify & VNOTIFY_FORUMS), VNOTIFY_FORUMS, '', $yes_no),
'$mailhost' => [ 'mailhost', t('Email notification hub (hostname)'), get_pconfig(local_channel(),'system','email_notify_host',\App::get_hostname()), sprintf( t('If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s'),\App::get_hostname()) ],
'$always_show_in_notices' => array('always_show_in_notices', t('Show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no),

View file

@ -0,0 +1,188 @@
<?php
namespace Zotlabs\Widget;
class Activity_filter {
function widget($arr) {
if(! local_channel())
return '';
$cmd = \App::$cmd;
$filter_active = false;
$tabs = [];
if(feature_enabled(local_channel(),'personal_tab')) {
if(x($_GET,'conv')) {
$conv_active = (($_GET['conv'] == 1) ? 'active' : '');
$filter_active = 'personal';
}
$tabs[] = [
'label' => t('Personal Posts'),
'icon' => 'user-circle',
'url' => z_root() . '/' . $cmd . '/?f=&conv=1',
'sel' => $conv_active,
'title' => t('Show posts that mention or involve me')
];
}
if(feature_enabled(local_channel(),'star_posts')) {
if(x($_GET,'star')) {
$starred_active = (($_GET['star'] == 1) ? 'active' : '');
$filter_active = 'star';
}
$tabs[] = [
'label' => t('Starred Posts'),
'icon' => 'star',
'url'=>z_root() . '/' . $cmd . '/?f=&star=1',
'sel'=>$starred_active,
'title' => t('Show posts that I have starred')
];
}
if(feature_enabled(local_channel(),'groups')) {
$groups = q("SELECT * FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval(local_channel())
);
if($groups) {
foreach($groups as $g) {
if(x($_GET,'gid')) {
$group_active = (($_GET['gid'] == $g['id']) ? 'active' : '');
$filter_active = 'group';
}
$gsub[] = [
'label' => $g['gname'],
'icon' => '',
'url' => z_root() . '/' . $cmd . '/?f=&gid=' . $g['id'],
'sel' => $group_active,
'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname'])
];
}
$tabs[] = [
'id' => 'privacy_groups',
'label' => t('Privacy Groups'),
'icon' => 'users',
'url' => '#',
'sel' => (($filter_active == 'group') ? true : false),
'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']),
'sub' => $gsub
];
}
}
if(feature_enabled(local_channel(),'filing')) {
$terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc",
intval(local_channel()),
intval(TERM_FILE)
);
if($terms) {
foreach($terms as $t) {
if(x($_GET,'file')) {
$file_active = (($_GET['file'] == $t['term']) ? 'active' : '');
$filter_active = 'file';
}
$tsub[] = [
'label' => $t['term'],
'icon' => '',
'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'],
'sel' => $file_active,
'title' => ''
];
}
$tabs[] = [
'label' => t('Saved Folders'),
'icon' => 'folder',
'url' => '#',
'sel' => (($filter_active == 'file') ? true : false),
'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']),
'sub' => $tsub
];
}
}
if(feature_enabled(local_channel(),'forums_tab')) {
$forums = get_forum_channels(local_channel());
if($forums) {
foreach($forums as $f) {
if(x($_GET,'pf') && x($_GET,'cid')) {
$forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
$filter_active = 'forums';
}
$fsub[] = [
'label' => $f['xchan_name'],
'img' => $f['xchan_photo_s'],
'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
'sel' => $forum_active,
'title' => t('Private forum'),
'lock' => (($f['private_forum']) ? 'lock' : '')
];
}
$tabs[] = [
'label' => t('Forums'),
'icon' => 'comments-o',
'url' => '#',
'sel' => (($filter_active == 'forums') ? true : false),
'title' => t('Show this forums posts'),
'sub' => $fsub
];
}
}
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 = [];
if($filter_active) {
$reset = [
'label' => '',
'icon' => 'remove',
'url'=> z_root() . '/' . $cmd,
'sel'=> '',
'title' => t('Remove active filter')
];
}
$arr = ['tabs' => $tabs];
call_hooks('network_tabs', $arr);
$o = '';
if($arr['tabs']) {
$content = replace_macros(get_markup_template('common_pills.tpl'), [
'$pills' => $arr['tabs']
]);
$o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [
'$title' => t('Activity Filters'),
'$reset' => $reset,
'$content' => $content
]);
}
return $o;
}
}

View file

@ -0,0 +1,128 @@
<?php
namespace Zotlabs\Widget;
class Activity_order {
function widget($arr) {
if(! local_channel())
return '';
if(! feature_enabled(local_channel(),'order_tab')) {
set_pconfig(local_channel(), 'mod_network', 'order', 0);
return '';
}
$commentord_active = '';
$postord_active = '';
$unthreaded_active = '';
if(x($_GET, 'order')) {
switch($_GET['order']){
case 'post':
$postord_active = 'active';
set_pconfig(local_channel(), 'mod_network', 'order', 1);
break;
case 'comment':
$commentord_active = 'active';
set_pconfig(local_channel(), 'mod_network', 'order', 0);
break;
case 'unthreaded':
$unthreaded_active = 'active';
set_pconfig(local_channel(), 'mod_network', 'order', 2);
break;
default:
$commentord_active = 'active';
}
}
else {
$order = get_pconfig(local_channel(), 'mod_network', 'order', 0);
switch($order) {
case 0:
$commentord_active = 'active';
break;
case 1:
$postord_active = 'active';
break;
case 2:
$unthreaded_active = 'active';
break;
default:
$commentord_active = 'active';
}
}
// override order for search results and filer results
if(x($_GET,'search') || x($_GET,'file')) {
$unthreaded_active = 'active';
$commentord_active = $postord_active = 'disabled';
}
$cmd = \App::$cmd;
$filter = '';
if(x($_GET,'cid'))
$filter .= '&cid=' . $_GET['cid'];
if(x($_GET,'gid'))
$filter .= '&gid=' . $_GET['gid'];
if(x($_GET,'star'))
$filter .= '&star=' . $_GET['star'];
if(x($_GET,'conv'))
$filter .= '&conv=' . $_GET['conv'];
if(x($_GET,'file'))
$filter .= '&file=' . $_GET['file'];
// tabs
$tabs = [];
$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'),
);
$arr = ['tabs' => $tabs];
call_hooks('network_tabs', $arr);
$o = '';
if($arr['tabs']) {
$content = replace_macros(get_markup_template('common_pills.tpl'), [
'$pills' => $arr['tabs'],
]);
$o = replace_macros(get_markup_template('common_widget.tpl'), [
'$title' => t('Activity Order'),
'$content' => $content,
]);
}
return $o;
}
}

View file

@ -51,7 +51,7 @@ class Forums {
$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 $limit ",
$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 and abook_archived = 0 $sql_extra order by xchan_name $limit ",
intval(local_channel())
);

View file

@ -111,6 +111,17 @@ class Notifications {
'label' => t('Mark all notices seen')
]
];
$notifications[] = [
'type' => 'forums',
'icon' => 'comments-o',
'severity' => 'secondary',
'label' => t('Forums'),
'title' => t('Forums'),
'filter' => [
'name_label' => t('Filter by name')
]
];
}
if(local_channel() && is_site_admin()) {

View file

@ -411,6 +411,7 @@ define ( 'VNOTIFY_REGISTER', 0x0400 );
define ( 'VNOTIFY_FILES', 0x0800 );
define ( 'VNOTIFY_PUBS', 0x1000 );
define ( 'VNOTIFY_LIKE', 0x2000 );
define ( 'VNOTIFY_FORUMS', 0x4000 );

View file

@ -0,0 +1,20 @@
<dl class="dl-horizontal">
<dt>General</dt>
<dd>El artículo es un tipo de documento de una naturaleza un poco especial, a mitad de camino entre las fichas de organización de trabajo ("cards") y las entradas normales, pero que está separado del stream social. Son muy adecuados para ayudar a escribir y organizar textos, con un formateo básico, pero completo, sobre cualquier tema, especialmente sobre documentación seriada, de forma más amplia que un wiki pero menos que un página web. Al no formar parte del stream social, para acceder a él hace falta conocer su dirección: <b>[URL del sitio]/articles/[nombre del usuario, sin dominio]</b>. Ahí estarán disponibles los distintas artículos que escriba, por orden de publicación.</dd>
<dt>Crear un artículo</dt>
<dd>
Crear un artículo nuevo es muy parecido a componer un nuevo post.<br><br>
<ul>
<li>
<b>Nombre del enlace de la página</b>: Este nombre es el del nombre del artículo para una URL estática
</li>
<li>
<b>Título</b>: El título se muestra en la parte de arriba del artículo
</li>
<li>
<b>Temas o Categorías</b>: Si tiene activada la opción <a href="/settings/features">Temas de las entradas</a> en su canal, entonces puede añadirlos al artículo. Estas categorías o temas se despliegan en la lista <b>Temas</b> en el panel de la izquierda y permiten filtrar su colección de artículos.
</li>
<li> <b>Sumario</b>: Es el espacio, entre las etiquetas predefinidas [summary][/summary], reservado para redactar un resumen del artículo, que aparecerá en su encabezado. El espacio disponible a continuación del sumario, en la ventana de composición, es el adecuado para la redacción del artículo en sí.
</ul>
</dd>
</dl>

1
doc/es Symbolic link
View file

@ -0,0 +1 @@
es-es

View file

@ -374,14 +374,19 @@ function contact_remove($channel_id, $abook_id) {
return false;
$r = q("select id from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d",
$r = q("select id from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d and item_retained = 0 and item_starred = 0",
dbesc($abook['abook_xchan']),
dbesc($abook['abook_xchan']),
intval($channel_id)
);
if($r) {
$r = fetch_post_tags($r,true);
foreach($r as $rr) {
drop_item($rr['id'],false);
$terms = get_terms_oftype($item['term'],TERM_FILE);
if(! $terms) {
drop_item($rr['id'],false);
}
}
}

View file

@ -1160,7 +1160,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>'
);

View file

@ -386,21 +386,30 @@ function get_features($filtered = true, $level = (-1)) {
],
[
'personal_tab',
t('Network Personal Tab'),
t('Enable tab to display only Network posts that you\'ve interacted on'),
'order_tab',
t('Alternate Stream Order'),
t('Ability to order the stream by last post date, last comment date or unthreaded activities'),
false,
get_config('feature_lock','personal_tab'),
feature_level('personal_tab',1),
get_config('feature_lock','order_tab'),
feature_level('order_tab',2),
],
[
'new_tab',
t('Network New Tab'),
t('Enable tab to display all new Network activity'),
'forums_tab',
t('Forum Filter'),
t('Ability to display only posts of a specific forum'),
false,
get_config('feature_lock','new_tab'),
feature_level('new_tab',2),
get_config('feature_lock','forums_tab'),
feature_level('forums_tab',1),
],
[
'personal_tab',
t('Personal Posts Filter'),
t('Ability to display only Network posts that you\'ve interacted on'),
false,
get_config('feature_lock','personal_tab'),
feature_level('personal_tab',1),
],
[

View file

@ -286,7 +286,7 @@ function group_side($every="connections",$each="group",$edit = false, $group_id
'text' => t('All Channels'),
'id' => 0,
'selected' => (($group_id == 0) ? 'group-selected' : ''),
'href' => $every . (($every === 'network') ? '?f=&gid=0' : '') . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : ''),
'href' => $every . (($every === 'network') ? '?f=&gid=0' : ''),
);

View file

@ -91,8 +91,10 @@ 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('Channel Manager'), "", t('Manage your channels'),'manage_nav_btn');
}
if(feature_enabled(local_channel(),'groups'))
$nav['group'] = array('group', t('Privacy Groups'),"", t('Manage your privacy groups'),'group_nav_btn');
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn');
@ -168,22 +170,20 @@ function nav($template = 'default') {
$nav['help'] = [$help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help];
}
$nav['search'] = ['search', t('Search'), "", t('Search site @name, !forum, #tag, ?docs, content')];
/**
*
* 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');
switch(App::$module) {
case 'network':
$search_form_action = 'network';
break;
case 'channel':
$search_form_action = 'channel';
break;
default:
$search_form_action = 'search';
}
$nav['search'] = ['search', t('Search'), "", t('Search site @name, !forum, #tag, ?docs, content'), $search_form_action];
/**
* Admin page
*/

View file

@ -3333,6 +3333,7 @@ function unique_multidim_array($array, $key) {
$i++;
}
return $temp_array;
<<<<<<< HEAD
}
@ -3394,4 +3395,57 @@ function array_path_exists($str,$arr) {
return false;
}
}
=======
}
function get_forum_channels($uid) {
if(! $uid)
return;
$xf = false;
$x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'",
intval($uid)
);
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($uid)
);
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 ");
$r = 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 and abook_archived = 0 $sql_extra order by xchan_name",
intval($uid)
);
for($x = 0; $x < count($r); $x ++) {
if($x3) {
foreach($x3 as $xx) {
if($r[$x]['xchan_hash'] == $xx['xchan']) {
$r[$x]['private_forum'] = 1;
}
}
}
}
return $r;
}
>>>>>>> master

View file

@ -1,11 +1,3 @@
header #banner {
position: fixed;
top: 0px;
width: 33%;
margin-left: 33%;
margin-right: 33%;
}
main {
display: table;
table-layout: fixed;

View file

@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: Redmatrix\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-23 11:34+0200\n"
"PO-Revision-Date: 2018-05-06 07:46+0000\n"
"PO-Revision-Date: 2018-05-26 07:06+0000\n"
"Last-Translator: Philip Wittamore <philip@wittamore.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/red-matrix/language/fr/)\n"
"MIME-Version: 1.0\n"
@ -6943,7 +6943,7 @@ msgstr "À propos&nbsp;:"
#: ../../include/conversation.php:1052 ../../include/channel.php:1376
#: ../../include/connections.php:110
msgid "Connect"
msgstr "Ajouter/Suivre"
msgstr "Lier"
#: ../../Zotlabs/Module/Directory.php:339
msgid "Public Forum:"
@ -12750,7 +12750,7 @@ msgstr "Saisir nom ou centre d'intérêt"
#: ../../include/contact_widgets.php:21
msgid "Connect/Follow"
msgstr "Ajouter/Suivre"
msgstr "Lier et suivre"
#: ../../include/contact_widgets.php:22
msgid "Examples: Robert Morgenstein, Fishing"

View file

@ -1485,7 +1485,7 @@ App::$strings["Location:"] = "Emplacement&nbsp;:";
App::$strings["Description:"] = "Description&nbsp;:";
App::$strings["Hometown:"] = "Ville natale&nbsp;:";
App::$strings["About:"] = "À propos&nbsp;:";
App::$strings["Connect"] = "Ajouter/Suivre";
App::$strings["Connect"] = "Lier";
App::$strings["Public Forum:"] = "Forum public&nbsp;:";
App::$strings["Keywords: "] = "Mots-clefs&nbsp;:";
App::$strings["Don't suggest"] = "Ne pas suggérer";
@ -2868,7 +2868,7 @@ App::$strings["%d invitation available"] = array(
);
App::$strings["Find Channels"] = "Trouver des canaux";
App::$strings["Enter name or interest"] = "Saisir nom ou centre d'intérêt";
App::$strings["Connect/Follow"] = "Ajouter/Suivre";
App::$strings["Connect/Follow"] = "Lier et suivre";
App::$strings["Examples: Robert Morgenstein, Fishing"] = "Exemples: Guillaume Martin, Course à pieds";
App::$strings["Random Profile"] = "Un profil au hasard";
App::$strings["Invite Friends"] = "Inviter des amis";

View file

@ -420,6 +420,14 @@ function notificationsUpdate(cached_data) {
// Put the object into storage
sessionStorage.setItem('notifications_cache', JSON.stringify(data));
var fnotifs = [];
if(data.forums) {
$.each(data.forums_sub, function() {
fnotifs.push(this);
});
handleNotificationsItems('forums', fnotifs);
}
if(data.invalid == 1) {
window.location.href=window.location.href;
}
@ -451,7 +459,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();
}
@ -495,13 +503,13 @@ function handleNotifications(data) {
}
function handleNotificationsItems(notifyType, data) {
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
var notifications_tpl = ((notifyType == 'forums') ? unescape($("#nav-notifications-forums-template[rel=template]").html()) : unescape($("#nav-notifications-template[rel=template]").html()));
var notify_menu = $("#nav-" + notifyType + "-menu");
notify_menu.html('');
$(data).each(function() {
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top);
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top,this.unseen,this.private_forum);
notify_menu.append(html);
});
@ -812,6 +820,15 @@ function updateInit() {
if (initialLoad && (sessionStorage.getItem('notifications_cache') !== null)) {
var cached_data = JSON.parse(sessionStorage.getItem('notifications_cache'));
notificationsUpdate(cached_data);
var fnotifs = [];
if(cached_data.forums) {
$.each(cached_data.forums_sub, function() {
fnotifs.push(this);
});
handleNotificationsItems('forums', fnotifs);
}
}
if(! src) {
@ -1022,6 +1039,7 @@ function loadNotificationItems(notifyType) {
}
console.log('updating ' + notifyType + ' notifications...');
$.get(pingExCmd, function(data) {
if(data.invalid == 1) {
window.location.href=window.location.href;

View file

@ -1,9 +1,8 @@
[region=aside]
[widget=collections][/widget]
[widget=forums][/widget]
[widget=suggestions][/widget]
[widget=activity_order][/widget]
[widget=activity_filter][/widget]
[widget=savedsearch][/widget]
[widget=filer][/widget]
[widget=suggestions][/widget]
[widget=notes][/widget]
[/region]

View file

@ -593,7 +593,8 @@ footer {
background-color: $comment_item_colour;
}
#nav-notifications-template {
#nav-notifications-template,
#nav-notifications-forums-template {
display: none;
}
@ -837,6 +838,11 @@ div.jGrowl div.jGrowl-notification {
white-space: nowrap;
}
.notification.notification-forum {
font-size: 0.9rem;
color: $font_colour;
}
#acl-search::-webkit-input-placeholder {
/* non-fontawesome fonts set a fallback for text parts of the placeholder*/
font-family: ForkAwesome, sans-serif, arial, freesans;
@ -1271,9 +1277,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 +1804,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;
}

View file

@ -89,6 +89,11 @@ $(document).ready(function() {
tagClass: 'badge badge-pill badge-warning text-dark'
});
$('a.disabled').click(function(e) {
e.preventDefault();
e.stopPropagation();
});
var doctitle = document.title;
function checkNotify() {
var notifyUpdateElem = document.getElementById('notify-update');

View file

@ -0,0 +1,11 @@
<div class="widget">
<h3 class="d-flex justify-content-between align-items-center">
{{$title}}
{{if $reset}}
<a href="{{$reset.url}}" class="text-muted" title="{{$reset.title}}">
<i class="fa fa-fw fa-{{$reset.icon}}"></i>
</a>
{{/if}}
</h3>
{{$content}}
</div>

26
view/tpl/common_pills.tpl Executable file
View file

@ -0,0 +1,26 @@
<ul class="nav nav-pills flex-column">
{{foreach $pills as $p}}
<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}}
{{if $p.img}}<img class="menu-img-1" src="{{$p.img}}">{{/if}}
{{$p.label}}
{{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}}>
{{foreach $p.sub as $ps}}
<li class="nav-item"{{if $ps.id}} id="{{$ps.id}}"{{/if}}>
<a class="nav-link{{if $ps.sel}} {{$ps.sel}}{{/if}}" href="{{$ps.url}}"{{if $ps.title}} title="{{$ps.title}}"{{/if}}>
{{if $ps.icon}}<i class="fa fa-fw fa-{{$ps.icon}}"></i>{{/if}}
{{if $ps.img}}<img class="menu-img-1" src="{{$ps.img}}">{{/if}}
{{$ps.label}}
{{if $ps.lock}}<i class="fa fa-{{$ps.lock}} text-muted"></i>{{/if}}
</a>
</li>
{{/foreach}}
</ul>
{{/if}}
</li>
{{/foreach}}
</ul>

View file

@ -0,0 +1,6 @@
<div class="widget">
<h3>
{{$title}}
</h3>
{{$content}}
</div>

View file

@ -365,12 +365,12 @@ var activeCommentText = '';
if($('#jot-nocomment').val() > 0) {
$('#jot-nocomment').val(0);
$('#profile-nocomment, #profile-nocomment-sub').removeClass('fa-comments-o').addClass('fa-comments');
$('#profile-nocomment-wrapper').attr('title', '{{$nocomment_enabled}}');
$('#profile-nocomment-wrapper').attr('title', '{{$nocomment_enabled|escape:'javascript'}}');
}
else {
$('#jot-nocomment').val(1);
$('#profile-nocomment, #profile-nocomment-sub').removeClass('fa-comments').addClass('fa-comments-o');
$('#profile-nocomment-wrapper').attr('title', '{{$nocomment_disabled}}');
$('#profile-nocomment-wrapper').attr('title', '{{$nocomment_disabled|escape:'javascript'}}');
}
}

View file

@ -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}}
@ -119,7 +122,7 @@
<ul id="nav-right" class="navbar-nav ml-auto">
<li class="nav-item collapse clearfix" id="nav-search">
<form class="form-inline" method="get" action="search" role="search">
<form class="form-inline" method="get" action="{{$nav.search.4}}" role="search">
<input class="form-control form-control-sm mt-1 mr-2" id="nav-search-text" type="text" value="" placeholder="{{$help}}" name="search" title="{{$nav.search.3}}" onclick="this.submit();" onblur="closeMenu('nav-search'); openMenu('nav-search-btn');"/>
</form>
<div id="nav-search-spinner" class="spinner-wrapper">

View file

@ -127,12 +127,20 @@
{{$no_notifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span>
</div>
<div id="nav-notifications-template" rel="template">
<a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}" data-contact_name="{2}">
<a class="list-group-item clearfix notification {5}" href="{0}" title="{2}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}" data-contact_name="{2}">
<img class="menu-img-3" data-src="{1}">
<span class="contactname">{2}</span>
<span class="dropdown-sub-text">{3}<br>{4}</span>
</a>
</div>
<div id="nav-notifications-forums-template" rel="template">
<a class="list-group-item clearfix notification notification-forum" href="{0}" title="{3}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}" data-contact_name="{2}">
<span class="float-right badge badge-{{$notification.severity}}">{9}</span>
<img class="menu-img-1" src="{1}">
<span class="">{2}</span>
<i class="fa fa-{10} text-muted"></i>
</a>
</div>
<div id="notifications" class="navbar-nav">
{{foreach $notifications as $notification}}
<div class="collapse {{$notification.type}}-button">
@ -152,15 +160,19 @@
</div>
{{/if}}
{{if $notification.filter}}
{{if $notification.filter.posts_label}}
<div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only">
<i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}}
</div>
{{/if}}
{{if $notification.filter.name_label}}
<div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only">
<div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div>
<input id="cn-{{$notification.type}}-input" type="text" class="form-control form-control-sm" placeholder="{{$notification.filter.name_label}}">
<div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div>
</div>
{{/if}}
{{/if}}
<div id="nav-{{$notification.type}}-menu" class="">
{{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span>
</div>

View file

@ -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}}

View file

@ -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}}

View file

@ -147,6 +147,7 @@
{{include file="field_intcheckbox.tpl" field=$vnotify13}}
{{/if}}
{{include file="field_intcheckbox.tpl" field=$vnotify14}}
{{include file="field_intcheckbox.tpl" field=$vnotify15}}
{{include file="field_intcheckbox.tpl" field=$always_show_in_notices}}
{{include file="field_input.tpl" field=$evdays}}
</div>