mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
readme
This commit is contained in:
parent
91ac38f18e
commit
a757749be6
4 changed files with 126 additions and 83 deletions
46
README.md
46
README.md
|
@ -1 +1,45 @@
|
||||||
This is ZAP, a Zot6 test/development server. Use at your own risk.
|
* ZAP
|
||||||
|
|
||||||
|
Zap is a social networking app running under the Zot/6 protocol and the LAMP web stack.
|
||||||
|
|
||||||
|
It is based on Red, which in turn is based on Hubzilla. It is otherwise unrelated to those projects and the software has a completely different scope and purpose.
|
||||||
|
|
||||||
|
|
||||||
|
19-July-2018
|
||||||
|
============
|
||||||
|
|
||||||
|
There is a lot more work yet to be done, but the basic Zap application is nearing alpha quality.
|
||||||
|
|
||||||
|
TODO before alpha release:
|
||||||
|
|
||||||
|
* convert mail to ActivityStreams
|
||||||
|
* test nomadic channels
|
||||||
|
* correct any links in the documentation and remove the descriptions of Hubzilla features which do not exist in Zap
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*** Things you should know
|
||||||
|
|
||||||
|
Zap is nomadic and does not federate with any other platform or protocol currently. It will only **ever** federate with nomadic-aware services/protocols. Full stop.
|
||||||
|
|
||||||
|
If you are looking for a specific Hubzilla feature, you came to the wrong place.
|
||||||
|
|
||||||
|
If you are looking for ActivityPub support, you came to the wrong place.
|
||||||
|
|
||||||
|
If you are looking for stable software, check back in a few months.
|
||||||
|
|
||||||
|
If you encounter issues, fix them and submit a pull request.
|
||||||
|
|
||||||
|
Pull requests which add unnecessary features will be ignored. These should be implemented using apps and/or addons.
|
||||||
|
|
||||||
|
The database configuration is not yet "stable". You probably do not want to install this as a production service at this time, and please do not use this software for storing any critical information which is not backed up elsewhere.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ use Zotlabs\Lib\Libsync;
|
||||||
|
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
require_once('include/event.php');
|
||||||
|
|
||||||
class Like extends \Zotlabs\Web\Controller {
|
class Like extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ class Like extends \Zotlabs\Web\Controller {
|
||||||
$bodyverb = t('%1$s likes %2$s\'s %3$s');
|
$bodyverb = t('%1$s likes %2$s\'s %3$s');
|
||||||
if($verb === 'dislike')
|
if($verb === 'dislike')
|
||||||
$bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
|
$bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
|
||||||
if($verb === 'attendyes')
|
if($verb === 'attendyes')
|
||||||
$bodyverb = t('%1$s is attending %2$s\'s %3$s');
|
$bodyverb = t('%1$s is attending %2$s\'s %3$s');
|
||||||
if($verb === 'attendno')
|
if($verb === 'attendno')
|
||||||
$bodyverb = t('%1$s is not attending %2$s\'s %3$s');
|
$bodyverb = t('%1$s is not attending %2$s\'s %3$s');
|
||||||
|
@ -368,9 +368,12 @@ class Like extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if(! isset($bodyverb))
|
if(! isset($bodyverb))
|
||||||
killme();
|
killme();
|
||||||
|
|
||||||
|
// @FIXME Not sure if this is still needed
|
||||||
|
// if(local_channel() && $verb === 'attendyes') {
|
||||||
|
// event_addtocal($item['id'],$ch[0]['channel_id']);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
if($extended_like) {
|
if($extended_like) {
|
||||||
$ulink = '[zrl=' . $ch[0]['xchan_url'] . ']' . $ch[0]['xchan_name'] . '[/zrl]';
|
$ulink = '[zrl=' . $ch[0]['xchan_url'] . ']' . $ch[0]['xchan_name'] . '[/zrl]';
|
||||||
$alink = '[zrl=' . $observer['xchan_url'] . ']' . $observer['xchan_name'] . '[/zrl]';
|
$alink = '[zrl=' . $observer['xchan_url'] . ']' . $observer['xchan_name'] . '[/zrl]';
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Activity_filter {
|
||||||
$tabs[] = [
|
$tabs[] = [
|
||||||
'label' => t('Personal Posts'),
|
'label' => t('Personal Posts'),
|
||||||
'icon' => 'user-circle',
|
'icon' => 'user-circle',
|
||||||
'url' => z_root() . '/' . $cmd . '/?f=&conv=1',
|
'url' => z_root() . '/' . $cmd . '/?conv=1',
|
||||||
'sel' => $conv_active,
|
'sel' => $conv_active,
|
||||||
'title' => t('Show posts that mention or involve me')
|
'title' => t('Show posts that mention or involve me')
|
||||||
];
|
];
|
||||||
|
@ -38,76 +38,72 @@ class Activity_filter {
|
||||||
$tabs[] = [
|
$tabs[] = [
|
||||||
'label' => t('Starred Posts'),
|
'label' => t('Starred Posts'),
|
||||||
'icon' => 'star',
|
'icon' => 'star',
|
||||||
'url'=>z_root() . '/' . $cmd . '/?f=&star=1',
|
'url'=>z_root() . '/' . $cmd . '/?star=1',
|
||||||
'sel'=>$starred_active,
|
'sel'=>$starred_active,
|
||||||
'title' => t('Show posts that I have starred')
|
'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) {
|
$groups = q("SELECT * FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
|
||||||
foreach($groups as $g) {
|
intval(local_channel())
|
||||||
if(x($_GET,'gid')) {
|
);
|
||||||
$group_active = (($_GET['gid'] == $g['id']) ? 'active' : '');
|
|
||||||
$filter_active = 'group';
|
if($groups) {
|
||||||
}
|
foreach($groups as $g) {
|
||||||
$gsub[] = [
|
if(x($_GET,'gid')) {
|
||||||
'label' => $g['gname'],
|
$group_active = (($_GET['gid'] == $g['id']) ? 'active' : '');
|
||||||
'icon' => '',
|
$filter_active = 'group';
|
||||||
'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[] = [
|
$gsub[] = [
|
||||||
'id' => 'privacy_groups',
|
'label' => $g['gname'],
|
||||||
'label' => t('Privacy Groups'),
|
'icon' => '',
|
||||||
'icon' => 'users',
|
'url' => z_root() . '/' . $cmd . '/?f=&gid=' . $g['id'],
|
||||||
'url' => '#',
|
'sel' => $group_active,
|
||||||
'sel' => (($filter_active == 'group') ? true : false),
|
'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname'])
|
||||||
'title' => t('Show my privacy groups'),
|
|
||||||
'sub' => $gsub
|
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
$tabs[] = [
|
||||||
|
'id' => 'privacy_groups',
|
||||||
|
'label' => t('Privacy Groups'),
|
||||||
|
'icon' => 'users',
|
||||||
|
'url' => '#',
|
||||||
|
'sel' => (($filter_active == 'group') ? true : false),
|
||||||
|
'title' => t('Show my privacy groups'),
|
||||||
|
'sub' => $gsub
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(feature_enabled(local_channel(),'forums_tab')) {
|
$forums = get_forum_channels(local_channel());
|
||||||
$forums = get_forum_channels(local_channel());
|
|
||||||
|
|
||||||
if($forums) {
|
if($forums) {
|
||||||
foreach($forums as $f) {
|
foreach($forums as $f) {
|
||||||
if(x($_GET,'pf') && x($_GET,'cid')) {
|
if(x($_GET,'pf') && x($_GET,'cid')) {
|
||||||
$forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
|
$forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
|
||||||
$filter_active = 'forums';
|
$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('Show posts to this forum'),
|
|
||||||
'lock' => (($f['private_forum']) ? 'lock' : '')
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
$fsub[] = [
|
||||||
$tabs[] = [
|
'label' => $f['xchan_name'],
|
||||||
'id' => 'forums',
|
'img' => $f['xchan_photo_s'],
|
||||||
'label' => t('Forums'),
|
'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
|
||||||
'icon' => 'comments-o',
|
'sel' => $forum_active,
|
||||||
'url' => '#',
|
'title' => t('Show posts to this forum'),
|
||||||
'sel' => (($filter_active == 'forums') ? true : false),
|
'lock' => (($f['private_forum']) ? 'lock' : '')
|
||||||
'title' => t('Show forums'),
|
|
||||||
'sub' => $fsub
|
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tabs[] = [
|
||||||
|
'id' => 'forums',
|
||||||
|
'label' => t('Forums'),
|
||||||
|
'icon' => 'comments-o',
|
||||||
|
'url' => '#',
|
||||||
|
'sel' => (($filter_active == 'forums') ? true : false),
|
||||||
|
'title' => t('Show forums'),
|
||||||
|
'sub' => $fsub
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(feature_enabled(local_channel(),'filing')) {
|
if(feature_enabled(local_channel(),'filing')) {
|
||||||
$terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc",
|
$terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
|
@ -142,30 +138,30 @@ class Activity_filter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(x($_GET,'search')) {
|
// if(x($_GET,'search')) {
|
||||||
$filter_active = 'search';
|
// $filter_active = 'search';
|
||||||
$tabs[] = [
|
// $tabs[] = [
|
||||||
'label' => t('Search'),
|
// 'label' => t('Search'),
|
||||||
'icon' => 'search',
|
// 'icon' => 'search',
|
||||||
'url' => z_root() . '/' . $cmd . '/?f=&search=' . $_GET['search'],
|
// 'url' => z_root() . '/' . $cmd . '/?search=' . $_GET['search'],
|
||||||
'sel' => 'active disabled',
|
// 'sel' => 'active disabled',
|
||||||
'title' => t('Panel search')
|
// 'title' => t('Panel search')
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
|
|
||||||
$name = [];
|
// $name = [];
|
||||||
if(feature_enabled(local_channel(),'name_tab')) {
|
// if(feature_enabled(local_channel(),'name_tab')) {
|
||||||
if(x($_GET,'cid') && ! x($_GET,'pf')) {
|
// if(x($_GET,'cid') && ! x($_GET,'pf')) {
|
||||||
$filter_active = 'name';
|
// $filter_active = 'name';
|
||||||
}
|
// }
|
||||||
$name = [
|
// $name = [
|
||||||
'label' => x($_GET,'name') ? $_GET['name'] : t('Filter by name'),
|
// 'label' => x($_GET,'name') ? $_GET['name'] : t('Filter by name'),
|
||||||
'icon' => 'filter',
|
// 'icon' => 'filter',
|
||||||
'url'=> z_root() . '/' . $cmd . '/',
|
// 'url'=> z_root() . '/' . $cmd . '/',
|
||||||
'sel'=> $filter_active == 'name' ? 'is-valid' : '',
|
// 'sel'=> $filter_active == 'name' ? 'is-valid' : '',
|
||||||
'title' => ''
|
// 'title' => ''
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
|
|
||||||
$reset = [];
|
$reset = [];
|
||||||
if($filter_active) {
|
if($filter_active) {
|
||||||
|
|
|
@ -187,7 +187,7 @@ function string2bb(element) {
|
||||||
match: /(^|\s)(\#)([^ \n]{2,})$/,
|
match: /(^|\s)(\#)([^ \n]{2,})$/,
|
||||||
index: 3,
|
index: 3,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
|
search: function(term, callback) { $.getJSON('/hashtags/' + '?f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
|
||||||
replace: function(item) { return "$1$2" + item.text + ' '; },
|
replace: function(item) { return "$1$2" + item.text + ' '; },
|
||||||
context: function(text) { return text.toLowerCase(); },
|
context: function(text) { return text.toLowerCase(); },
|
||||||
template: tag_format
|
template: tag_format
|
||||||
|
|
Loading…
Reference in a new issue