aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-02 09:38:07 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-02 09:38:07 +0100
commitc3bada3c329cac9b712e0d4d0c5fb0bb73f24d45 (patch)
treea13c2d56c1b14ba99a853fb7494a9214d075554d
parent2e0180ba55e5cbefcfc4066a82dbcaa5b59cacc2 (diff)
parent23303391e070120851d505a2ec8f3b9b696329e2 (diff)
downloadvolse-hubzilla-c3bada3c329cac9b712e0d4d0c5fb0bb73f24d45.tar.gz
volse-hubzilla-c3bada3c329cac9b712e0d4d0c5fb0bb73f24d45.tar.bz2
volse-hubzilla-c3bada3c329cac9b712e0d4d0c5fb0bb73f24d45.zip
resolve merge conflict
-rw-r--r--Zotlabs/Access/PermissionRoles.php51
-rw-r--r--Zotlabs/Access/Permissions.php4
-rw-r--r--Zotlabs/Lib/NativeWiki.php2
-rw-r--r--Zotlabs/Module/Wiki.php11
-rw-r--r--Zotlabs/Web/Router.php25
-rwxr-xr-xboot.php19
-rw-r--r--doc/Tags-and-Mentions.md26
-rw-r--r--doc/context/en/settings/tokens/help.html2
-rw-r--r--doc/member/member_guide.bb70
-rw-r--r--doc/tags_and_mentions.bb73
-rw-r--r--doc/toc.html12
-rw-r--r--include/nav.php2
-rw-r--r--view/theme/redbasic/css/style.css16
-rwxr-xr-xview/tpl/login.tpl4
-rwxr-xr-xview/tpl/nav.tpl8
-rw-r--r--view/tpl/remote_login.tpl2
16 files changed, 161 insertions, 166 deletions
diff --git a/Zotlabs/Access/PermissionRoles.php b/Zotlabs/Access/PermissionRoles.php
index f21025442..d7e162197 100644
--- a/Zotlabs/Access/PermissionRoles.php
+++ b/Zotlabs/Access/PermissionRoles.php
@@ -8,7 +8,7 @@ use Zotlabs\Lib as Zlib;
class PermissionRoles {
static public function version() {
- return 1;
+ return 2;
}
static function role_perms($role) {
@@ -25,7 +25,7 @@ class PermissionRoles {
$ret['online'] = true;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'send_stream', 'post_wall', 'post_comments',
+ 'view_pages', 'view_wiki', 'send_stream', 'post_wall', 'post_comments',
'post_mail', 'chat', 'post_like', 'republish' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -38,7 +38,7 @@ class PermissionRoles {
$ret['online'] = true;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'send_stream', 'post_wall', 'post_comments',
+ 'view_pages', 'view_wiki', 'send_stream', 'post_wall', 'post_comments',
'post_mail', 'chat', 'post_like' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -52,7 +52,7 @@ class PermissionRoles {
$ret['online'] = false;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'send_stream', 'post_wall', 'post_comments',
+ 'view_pages', 'view_wiki', 'send_stream', 'post_wall', 'post_comments',
'post_mail', 'post_like' ];
$ret['limits'] = PermissionLimits::Std_Limits();
$ret['limits']['view_contacts'] = PERMS_SPECIFIC;
@@ -67,7 +67,7 @@ class PermissionRoles {
$ret['online'] = false;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'post_wall', 'post_comments', 'tag_deliver',
+ 'view_pages', 'view_wiki', 'post_wall', 'post_comments', 'tag_deliver',
'post_mail', 'post_like' , 'republish', 'chat' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -80,7 +80,7 @@ class PermissionRoles {
$ret['online'] = false;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'post_wall', 'post_comments', 'tag_deliver',
+ 'view_pages', 'view_wiki', 'post_wall', 'post_comments', 'tag_deliver',
'post_mail', 'post_like' , 'chat' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -95,7 +95,7 @@ class PermissionRoles {
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'post_wall', 'post_comments',
+ 'view_pages', 'view_wiki', 'post_wall', 'post_comments',
'post_mail', 'post_like' , 'chat' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -103,6 +103,7 @@ class PermissionRoles {
$ret['limits']['view_contacts'] = PERMS_SPECIFIC;
$ret['limits']['view_storage'] = PERMS_SPECIFIC;
$ret['limits']['view_pages'] = PERMS_SPECIFIC;
+ $ret['limits']['view_wiki'] = PERMS_SPECIFIC;
break;
@@ -114,7 +115,7 @@ class PermissionRoles {
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'send_stream', 'post_wall', 'post_comments',
+ 'view_pages', 'view_wiki', 'send_stream', 'post_wall', 'post_comments',
'post_mail', 'post_like' , 'republish' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -128,7 +129,7 @@ class PermissionRoles {
$ret['online'] = false;
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'send_stream', 'post_wall', 'post_comments',
+ 'view_pages', 'view_wiki', 'send_stream', 'post_wall', 'post_comments',
'post_mail', 'post_like' , 'republish' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -143,7 +144,7 @@ class PermissionRoles {
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'post_like' , 'republish' ];
+ 'view_pages', 'view_wiki', 'post_like' , 'republish' ];
$ret['limits'] = PermissionLimits::Std_Limits();
@@ -157,8 +158,8 @@ class PermissionRoles {
$ret['perms_connect'] = [
'view_stream', 'view_profile', 'view_contacts', 'view_storage',
- 'view_pages', 'write_storage', 'write_pages', 'post_wall', 'post_comments', 'tag_deliver',
- 'post_mail', 'post_like' , 'republish', 'chat' ];
+ 'view_pages', 'view_wiki', 'write_storage', 'write_pages', 'post_wall', 'post_comments', 'tag_deliver',
+ 'post_mail', 'post_like' , 'republish', 'chat', 'write_wiki' ];
$ret['limits'] = PermissionLimits::Std_Limits();
break;
@@ -185,6 +186,12 @@ class PermissionRoles {
// if($perm === 'mynewperm')
// \Zotlabs\Access\PermissionLimits::Set($uid,$perm,1);
+ if($perm === 'view_wiki')
+ \Zotlabs\Access\PermissionLimits::Set($uid,$perm,PERMS_PUBLIC);
+
+ if($perm === 'write_wiki')
+ \Zotlabs\Access\PermissionLimits::Set($uid,$perm,PERMS_SPECIFIC);
+
// set autoperms here if applicable
// choices are to set to 0, 1, or the value of an existing perm
@@ -195,7 +202,13 @@ class PermissionRoles {
$value = 0;
// if($perm === 'mynewperm')
- // $value = get_abconfig($uid,$c['channel_hash'],'autoperms','someexistingperm'));
+ // $value = get_abconfig($uid,$c['channel_hash'],'autoperms','someexistingperm');
+
+ if($perm === 'view_wiki')
+ $value = get_abconfig($uid,$c['channel_hash'],'autoperms','view_pages');
+
+ if($perm === 'write_wiki')
+ $value = get_abconfig($uid,$c['channel_hash'],'autoperms','write_pages');
if($c) {
set_abconfig($uid,$c['channel_hash'],'autoperms',$perm,$value);
@@ -212,8 +225,16 @@ class PermissionRoles {
// case 'mynewperm':
// choices are to set to 1, set to 0, or clone an existing perm
// set_abconfig($uid,$ab['abook_xchan'],'my_perms',$perm,
- // get_abconfig($uid,$ab['abook_xchan'],'my_perms','someexistingperm'));
-
+ // intval(get_abconfig($uid,$ab['abook_xchan'],'my_perms','someexistingperm')));
+
+ case 'view_wiki':
+ set_abconfig($uid,$ab['abook_xchan'],'my_perms',$perm,
+ intval(get_abconfig($uid,$ab['abook_xchan'],'my_perms','view_pages')));
+
+ case 'write_wiki':
+ set_abconfig($uid,$ab['abook_xchan'],'my_perms',$perm,
+ intval(get_abconfig($uid,$ab['abook_xchan'],'my_perms','write_pages')));
+
default:
break;
}
diff --git a/Zotlabs/Access/Permissions.php b/Zotlabs/Access/Permissions.php
index 5fded5f03..81408f122 100644
--- a/Zotlabs/Access/Permissions.php
+++ b/Zotlabs/Access/Permissions.php
@@ -36,7 +36,7 @@ class Permissions {
static public function version() {
// This must match the version in PermissionRoles.php before permission updates can run.
- return 1;
+ return 2;
}
@@ -50,7 +50,9 @@ class Permissions {
'view_storage' => t('Can view my file storage and photos'),
'write_storage' => t('Can upload/modify my file storage and photos'),
'view_pages' => t('Can view my channel webpages'),
+ 'view_wiki' => t('Can view my wiki pages'),
'write_pages' => t('Can create/edit my channel webpages'),
+ 'write_wiki' => t('Can write to my wiki pages'),
'post_wall' => t('Can post on my channel (wall) page'),
'post_comments' => t('Can comment on or like my posts'),
'post_mail' => t('Can send me private mail messages'),
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php
index ccb0ff150..519102d24 100644
--- a/Zotlabs/Lib/NativeWiki.php
+++ b/Zotlabs/Lib/NativeWiki.php
@@ -201,7 +201,7 @@ class NativeWiki {
else {
// TODO: Create a new permission setting for wiki analogous to webpages. Until
// then, use webpage permissions
- $write = perm_is_allowed($owner_id, $observer_hash,'write_pages');
+ $write = perm_is_allowed($owner_id, $observer_hash,'write_wiki');
return array('read' => true, 'write' => $write, 'success' => true);
}
}
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 5397deebe..d42c26681 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -45,6 +45,11 @@ class Wiki extends \Zotlabs\Web\Controller {
}
+ if(! perm_is_allowed(\App::$profile_uid,get_observer_hash(),'view_wiki')) {
+ notice( t('Permission denied.') . EOL);
+ return;
+ }
+
// TODO: Combine the interface configuration into a unified object
// Something like $interface = array('new_page_button' => false, 'new_wiki_button' => false, ...)
@@ -309,7 +314,11 @@ class Wiki extends \Zotlabs\Web\Controller {
return;
}
-
+ if(! perm_is_allowed(\App::$profile_uid,get_observer_hash(),'write_wiki')) {
+ notice( t('Permission denied.') . EOL);
+ return;
+ }
+
// /wiki/channel/preview
// Render mardown-formatted text in HTML for preview
if((argc() > 2) && (argv(2) === 'preview')) {
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 271836ba9..ba2e78b25 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -121,29 +121,24 @@ class Router {
/*
* The URL provided does not resolve to a valid module.
- *
- * On Dreamhost sites, quite often things go wrong for no apparent reason and they send us to '/internal_error.html'.
- * We don't like doing this, but as it occasionally accounts for 10-20% or more of all site traffic -
- * we are going to trap this and redirect back to the requested page. As long as you don't have a critical error on your page
- * this will often succeed and eventually do the right thing.
- *
- * Otherwise we are going to emit a 404 not found.
*/
if(! (\App::$module_loaded)) {
- // Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit.
+ $x = [
+ 'module' => $module,
+ 'installed' => \App::$module_loaded,
+ 'controller' => $this->controller
+ ];
+ call_hooks('page_not_found',$x);
+
+ // Stupid browser tried to pre-fetch our Javascript img template.
+ // Don't log the event or return anything - just quietly exit.
+
if((x($_SERVER, 'QUERY_STRING')) && preg_match('/{[0-9]}/', $_SERVER['QUERY_STRING']) !== 0) {
killme();
}
- if((x($_SERVER, 'QUERY_STRING'))
- && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html')
- && \App::$config['system']['dreamhost_error_hack']) {
- logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI'],LOGGER_DEBUG);
- goaway(z_root() . $_SERVER['REQUEST_URI']);
- }
-
if(get_config('system','log_404',true)) {
logger("Module {$module} not found.", LOGGER_DEBUG, LOG_WARNING);
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI']
diff --git a/boot.php b/boot.php
index 0eae8b3ed..8d007d805 100755
--- a/boot.php
+++ b/boot.php
@@ -1694,7 +1694,7 @@ function fix_system_urls($oldurl, $newurl) {
// link. This will most always depend on the value of App::$config['system']['register_policy'].
// returns the complete html for inserting into the page
-function login($register = false, $form_id = 'main-login', $hiddens=false) {
+function login($register = false, $form_id = 'main-login', $hiddens=false, $login_page = true) {
$o = '';
$reg = false;
$reglink = get_config('system', 'register_link');
@@ -1720,6 +1720,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
$o .= replace_macros($tpl,array(
'$dest_url' => $dest_url,
+ '$login_page' => $login_page,
'$logout' => t('Logout'),
'$login' => t('Login'),
'$form_id' => $form_id,
@@ -2463,6 +2464,7 @@ function check_for_new_perms() {
return;
$pregistered = get_config('system','perms');
+
$pcurrent = array_keys(\Zotlabs\Access\Permissions::Perms());
if(! $pregistered) {
@@ -2474,6 +2476,7 @@ function check_for_new_perms() {
foreach($pcurrent as $p) {
if(! in_array($p,$pregistered)) {
+
$found_new_perm = true;
// for all channels
$c = q("select channel_id from channel where true");
@@ -2481,12 +2484,12 @@ function check_for_new_perms() {
foreach($c as $cc) {
// get the permission role
$r = q("select v from pconfig where uid = %d and cat = 'system' and k = 'permissions_role'",
- intval($cc['uid'])
+ intval($cc['channel_id'])
);
if($r) {
// get a list of connections
$x = q("select abook_xchan from abook where abook_channel = %d and abook_self = 0",
- intval($cc['uid'])
+ intval($cc['channel_id'])
);
// get the permissions role details
$rp = \Zotlabs\Access\PermissionRoles::role_perms($r[0]['v']);
@@ -2494,23 +2497,23 @@ function check_for_new_perms() {
// for custom permission roles we need to customise how we initiate this new permission
if(array_key_exists('role',$rp) && ($rp['role'] === 'custom' || $rp['role'] === '')) {
- \Zotlabs\Access\PermissionRoles::new_custom_perms($cc['uid'],$p,$x);
+ \Zotlabs\Access\PermissionRoles::new_custom_perms($cc['channel_id'],$p,$x);
}
else {
// set the channel limits if appropriate or 0
if(array_key_exists('limits',$rp) && array_key_exists($p,$rp['limits'])) {
- \Zotlabs\Access\PermissionLimits::Set($cc['uid'],$p,$rp['limits'][$p]);
+ \Zotlabs\Access\PermissionLimits::Set($cc['channel_id'],$p,$rp['limits'][$p]);
}
else {
- \Zotlabs\Access\PermissionLimits::Set($cc['uid'],$p,0);
+ \Zotlabs\Access\PermissionLimits::Set($cc['channel_id'],$p,0);
}
- $set = ((array_key_exists('perms_connect',$rp) && array_key_exists($p,$rp['perms_connect'])) ? true : false);
+ $set = ((array_key_exists('perms_connect',$rp) && in_array($p,$rp['perms_connect'])) ? 1 : 0);
// foreach connection set to the perms_connect value
if($x) {
foreach($x as $xx) {
- set_abconfig($cc['uid'],$xx['abook_xchan'],'my_perms',$p,intval($set));
+ set_abconfig($cc['channel_id'],$xx['abook_xchan'],'my_perms',$p,intval($set));
}
}
}
diff --git a/doc/Tags-and-Mentions.md b/doc/Tags-and-Mentions.md
deleted file mode 100644
index f01b0ee74..000000000
--- a/doc/Tags-and-Mentions.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Tags and Mentions
-=================
-
-Like many other platforms, Red uses a special notation inside messages to indicate "tags" or contextual links to other entities.
-
-**Mentions**
-
-Channels are tagged by simply preceding their name with the @ character. Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts.
-
-When you start to mention somebody, it will create an auto-complete box to select from your immediate connections. Select one as appropriate. Some connections will be displayed in different colours. A light blue entry (using the default theme) indicates a channel which will redeliver to others if tagged. This is generally a conversation group or forum. But be aware that when tagged, the message will also go to anybody they choose, in addition to anybody you choose.
-
-**Private Mentions**
-
-If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to include them (and perhaps restrict the post from "everybody" if this was the default). You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda (in addition to any recipients you selected with the privacy selector - if any).
-
-You may also tag privacy groups which are "public". When you create or edit a privacy group, there is a checkbox to allow the group members to be seen by others. If this box is checked for a group and you tag (for instance) @!Friends - the post will be restricted to the Friends group. Check that the group is public before doing this - as there is no way to take back a post except to delete it. The group name will appear in the post and will alert members of that group that they are members of it.
-
-
-
-**Topical Tags**
-
-Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #cars will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration. The same rules apply as with names that spaces within tags are represented by the underscore character. It is therefore not possible to create a tag whose target contains an underscore.
-
-Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections.
-
-#include doc/macros/main_footer.bb;
diff --git a/doc/context/en/settings/tokens/help.html b/doc/context/en/settings/tokens/help.html
index d37a0fd2b..6d7e6b98d 100644
--- a/doc/context/en/settings/tokens/help.html
+++ b/doc/context/en/settings/tokens/help.html
@@ -1,5 +1,5 @@
<dl class="dl-horizontal">
- <dt>Guest Access Tokens</dt>
+ <dt><a href="/help/member/member_guide#Guest_Access_Tokens">Guest Access Tokens</a></dt>
<dd>
In order to facilitate sharing of private resources with non-members or members of federation nodes with limited identification discovery, Hubzilla should provide members with a mechanism to create and manage temporary ("throwaway") logins, aka "Zot Access Tokens". These tokens/credentials may be used to authenticate to a hubzilla site for the sole purpose of accessing privileged or access controlled resources (files, photos, posts, webpages, chatrooms, etc.).
</dd>
diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb
index c0ded4614..6d95b230c 100644
--- a/doc/member/member_guide.bb
+++ b/doc/member/member_guide.bb
@@ -53,7 +53,7 @@ To create an alternate profile, first go to [zrl=[baseurl]/settings/features]Set
Then select &quot;Edit Profiles&quot; from the menu of your $Projectname site. You may edit an existing profile, change the profile photo, add things to a profile or create a new profile. You may also create a &quot;clone&quot; of an existing profile if you only wish to change a few items but don't wish to enter all the information again. To do that, click on the profile you want to clone and choose &quot;Clone this profile&quot; there.
-In the list of your profiles, you can also choose the contacts who can see a specific profile. Just click on &quot;Edit visibility&quot; next to the profile in question (only available for the profiles that are not your default profile) and then click on user images to add them to or remove them from the group of people who can see this profile.
+In the list of your profiles, you can also choose the contacts who can see a specific profile. Just click on &quot;Edit visibility&quot; next to the profile in question (only available for the profiles that are not your default profile) and then click on specific connections to add them to or remove them from the group of people who can see this profile.
Once a profile has been selected, when the person views your profile, they will see the private profile you have assigned. If they are not authenticated, they will see your public profile.
@@ -290,7 +290,7 @@ The slider on the matrix page has both a minimum and maximum value. Posts will o
[h3]Guest Access Tokens[/h3]
Guest access tokens (sometimes called "Zot access tokens") allow you to share a file, folder, photo, album, or channel with a specific person or group of people who are not $Projectname members. These tokens allow you to share individual items by sending a link that includes the token in the URL; alternatively, people can actually [i]log in[/i] using the token credentials, after which they can seamlessly view whatever content has been shared with that token.
-To create and manage guest tokens, open the [zrl=[baseurl]/settings/tokens/]Guest Access Tokens[/zrl] settings page. A random token is generate with each page load, allowing you to create one by inputting an associated user name and optionally specifying an expiration date. Existing tokens are listed below the dialog and can be edited by selecting them or deleted by pressing the trash icon.
+To create and manage guest tokens, open the [zrl=[baseurl]/settings/tokens/]Guest Access Tokens[/zrl] settings page. A random token is generate with each page load, allowing you to create one by inputting an associated login name and optionally specifying an expiration date. Existing tokens are listed below the dialog and can be edited by selecting them or deleted by pressing the trash icon.
Additional permissions may be granted to the guest token by expanding the [b]Individual Permissions[/b] options and selecting privacy settings such as [b]Can view my channel stream and posts[/b] or [b]Can chat with me[/b].
@@ -305,13 +305,71 @@ $Projectname supports several markup languages for advanced formatting of conten
[tr][td]Webpage element[/td][td][url=[baseurl]/help/member/bbcode]BBcode[/url], Markdown, HTML[/td][/tr]
[/table]
+[h3]Tags And Mentions[/h3]
+Like many other platforms, $Projectname uses a special notation inside messages to indicate &quot;tags&quot; or contextual links to other entities.
+
+[h4]Mentions[/h4]
+Channels are tagged by simply preceding their name with the @ character.
+
+[code]
+@Jack
+[/code]
+
+When you start to mention somebody, it will create an auto-complete box to select from your immediate connections. Select one as appropriate.
+
+If the person mentioned is in the list of recipients for the post, they will receive a tag notification.
+
+[h4]Deliverable Mentions[/h4]
+
+Some connections in the mention auto-complete box behave differently than others. If you mention a channel which provides "re-delivery of mentions" it will also send the post to all of that channel's default delivery connections. This is how one posts to "forums". The auto-complete box will provide two entries for these channels, one will mention just the channel. The other will invoke re-delivery and be listed as the channel's "network".
+
+[code]
+@Gardening - mention the Gardening forum
+[/code]
+
+[code]
+@Gardening+ - mention the Gardening Forum and also post to the Gardening "network" (e.g. all the forum members; if you have permission to do so)
+[/code]
+
+[h4]Private Mentions[/h4]
+If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector.
+
+You may also tag privacy groups which are "public". When you create or edit a privacy group, there is a checkbox to allow the group members to be seen by others. If this box is checked for a group and you tag (for instance) @!Friends - the post will be restricted to the Friends group. Check that the group is public before doing this - as there is no way to take back a post except to delete it. The group name will appear in the post and will alert members of that group that they are members of it.
+
+[h4]Mentions and Comments[/h4]
+The above mechanisms only apply to "top-level" posts you create. Mentioning a channel with any of the above mechanisms has no effect in comments, except that the mentioned channel may receive a notification if they were already included as a recipient in the conversation.
+
+[h4]Topical Tags[/h4]
+Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #[zrl=[baseurl]/search?tag=cars]cars[/zrl] will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration.
+
+Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numeric hashtag, please add some descriptive text such as #2012-elections.
+
+[h4]Bookmarks[/h4]
+Bookmarks indicate a link which can be saved to your bookmark folder. They use the sequence #^ followed by the link. Often these are generatd automatically. If the 'bookmarker' addon is installed, this sequence will be converted to a bookmark icon when viewing the post or comment online and clicking the icon will save the bookmark. If the bookmarker addon is not installed, the post 'dropdown menu' contains a link for saving the bookmark or bookmarks.
+
+[h4]Spaces in Tags and Mentions[/h4]
+Where possible please use the auto-complete window to select tag and mention recipients, because it will generate a coded tag which uniquely identifies one channel. Names are sometimes ambiguous. However, you can "manually" tag a channel by matching the channel name or address.
+
+[code]
+@Robert Johnson
+[/code]
+
+will tag Robert Johnson, but we can only match one space. If the name was "Blind Lemon Jefferson" it won't be found unless you enclose the entire name in double quotes or change the spaces to underscores.
+
+[code]
+@"Blind Lemon Jefferson"
+@Blind_Lemon_Jefferson
+[/code]
+
+are both equivalent.
+
[h3]Web Pages[/h3]
-$Projectname enables users to create static webpages. To activate this feature, enable the [b]Web Pages[/b] feature in your [b][url=[baseurl]/settings/features/]Additional Features[/url][/b] section.
+$Projectname allows members and allowed connections to create static webpages. To activate this feature, enable the [b]Web Pages[/b] feature in your [b][url=[baseurl]/settings/features/]Additional Features[/url][/b] section.
Once enabled, a new tab will appear on your channel page labeled &quot;Webpages&quot;. Clicking this link will take you to the webpage editor. Pages will be accessible at [b][baseurl]/page/[observer=1][observer.webname][/observer][observer=0]channelname[/observer]/pagelinktitle[/b]
-The &quot;page link title&quot; box allows a user to specify the &quot;pagelinktitle&quot; of this URL. If no page link title is set, we will set one for you automatically, using the message ID of the item.
+The &quot;page link title&quot; box allows you to specify the &quot;pagelinktitle&quot; of this URL. If no page link title is set, we will set one for you automatically, using the message ID of the item.
Beneath the page creation box, a list of existing pages will appear with an &quot;edit&quot; link. Clicking this will take you to an editor, similar to that of the post editor, where you can make changes to your webpages.
@@ -767,12 +825,12 @@ When using WebDAV, the file is created with your channel's default file permissi
[h4]Cloud Desktop Clients - Windows[/h4]
-RedDav using Windows 7 graphical user interface wizard:
+WebDAV using Windows 7 graphical user interface wizard:
1. Left-click the Start-button to open the start menu.
2. Right-click the My computer icon to access its menu.
3. Left-click Map network drive... to open the connection dialog wizard.
4. Type #^[url=https://example.net/dav/your_channel_name]https://example.net/dav/your_channel_name[/url] in the textbox and click the Complete button where &quot;example.net&quot; is the URL of your hub.
-5. Type your $Projectname account's user name. IMPORTANT - NO at-sign or domain name.
+5. Type your $Projectname channel nickname. IMPORTANT - NO at-sign or domain name.
6. Type your $Projectname password
[h4]Cloud Desktop Clients - Linux[/h4]
diff --git a/doc/tags_and_mentions.bb b/doc/tags_and_mentions.bb
deleted file mode 100644
index c4f240631..000000000
--- a/doc/tags_and_mentions.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-[b]Tags And Mentions[/b]
-
-Like many other platforms, Red uses a special notation inside messages to indicate &quot;tags&quot; or contextual links to other entities.
-
-[b]Mentions[/b]
-
-Channels are tagged by simply preceding their name with the @ character.
-
-[code]
-@Jack
-[/code]
-
-When you start to mention somebody, it will create an auto-complete box to select from your immediate connections. Select one as appropriate.
-
-If the person mentioned is in the list of recipients for the post, they will receive a tag notification.
-
-
-[b]Deliverable Mentions[/b]
-
-Some connections in the mention auto-complete box behave differently than others. If you mention a channel which provides "re-delivery of mentions" it will also send the post to all of that channel's default delivery connections. This is how one posts to "forums". The auto-complete box will provide two entries for these channels, one will mention just the channel. The other will invoke re-delivery and be listed as the channel's "network".
-
-[code]
-@Gardening - mention the Gardening forum
-[/code]
-
-[code]
-@Gardening+ - mention the Gardening Forum and also post to the Gardening "network" (e.g. all the forum members; if you have permission to do so)
-[/code]
-
-
-
-[b]Private Mentions[/b]
-
-If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector.
-
-You may also tag privacy groups which are "public". When you create or edit a privacy group, there is a checkbox to allow the group members to be seen by others. If this box is checked for a group and you tag (for instance) @!Friends - the post will be restricted to the Friends group. Check that the group is public before doing this - as there is no way to take back a post except to delete it. The group name will appear in the post and will alert members of that group that they are members of it.
-
-
-[b]Mentions and Comments[/b]
-
-The above mechanisms only apply to "top-level" posts you create. Mentioning a channel with any of the above mechanisms has no effect in comments, except that the mentioned channel may receive a notification if they were already included as a recipient in the conversation.
-
-
-
-
-[b]Topical Tags[/b]
-
-Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #[zrl=https://friendicared.net/search?tag=cars]cars[/zrl] will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration.
-
-Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numeric hashtag, please add some descriptive text such as #[zrl=https://friendicared.net/search?tag=2012-elections]2012-elections[/zrl].
-
-[b]Bookmarks[/b]
-
-Bookmarks indicate a link which can be saved to your bookmark folder. They use the sequence #^ followed by the link. Often these are generatd automatically. If the 'bookmarker' addon is installed, this sequence will be converted to a bookmark icon when viewing the post or comment online and clicking the icon will save the bookmark. If the bookmarker addon is not installed, the post 'dropdown menu' contains a link for saving the bookmark or bookmarks.
-
-
-[b]Spaces in Tags and Mentions[/b]
-
-Where possible please use the auto-complete window to select tag and mention recipients, because it will generate a coded tag which uniquely identifies one channel. Names are sometimes ambiguous. However, you can "manually" tag a channel by matching the channel name or address.
-
-[code]
-@Robert Johnson
-[/code]
-
-will tag Robert Johnson, but we can only match one space. If the name was "Blind Lemon Jefferson" it won't be found unless you enclose the entire name in double quotes or change the spaces to underscores.
-
-[code]
-@"Blind Lemon Jefferson"
-@Blind_Lemon_Jefferson
-[/code]
-
-are both equivalent.
-#include doc/macros/main_footer.bb;
diff --git a/doc/toc.html b/doc/toc.html
index eeb0fe437..4c52c5e74 100644
--- a/doc/toc.html
+++ b/doc/toc.html
@@ -72,13 +72,10 @@
// Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
$(document).ready(function () {
$(".panel-collapse.in").find('a').each(function(){
- window.console.log($(this).attr('href'));
var url = document.createElement('a');
url.href = window.location;
var pageName = url.href.split('/').pop().split('#').shift();
- window.console.log('pageName: ' + pageName);
var linkName = $(this).attr('href').split('/').pop();
- window.console.log('linkName: ' + linkName);
if(pageName === linkName) {
var tocUl = $(this).closest('li').append('<ul>').find('ul');
tocUl.removeClass(); // Classes are automatically added to <ul> elements by something else
@@ -110,8 +107,17 @@
$('#doco-side-toc li')
.removeClass('selected-doco-nav')
.eq(i).addClass('selected-doco-nav');
+ if (typeof($('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]) !== 'undefined') {
+ window.history.pushState({}, '', location.href.split('#')[0] + '#' + $('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]);
+ }
}
});
});
+
+ // When the page loads, it does not scroll to the section specified in the URL because it
+ // has not been constructed yet by the script. This will reload the URL
+ if (typeof(location.href.split('#')[1]) !== 'undefined') {
+ location.replace(location.href)
+ }
});
</script>
diff --git a/include/nav.php b/include/nav.php
index 1adc352a7..894b30b45 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -112,7 +112,7 @@ EOT;
}
else {
if(! get_account_id()) {
- $nav['login'] = login();
+ $nav['login'] = login(true,'main-login',false,false);
$nav['loginmenu'][] = Array('login',t('Login'),'',t('Sign in'),'login_nav_btn');
}
else
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 3f1d9e992..d599fee50 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -2106,12 +2106,6 @@ dl.bb-dl > dd > li {
text-align: center;
}
-.rmagic-button {
- padding-top: 10px;
- margin-left: 10px;
- margin-bottom: 10px;
-}
-
#nav-login {
display: none;
width: 200px;
@@ -2119,3 +2113,13 @@ dl.bb-dl > dd > li {
border-radius: $radiuspx;
}
+
+.login-dropdown-menu {
+ padding: 8px;
+ background-color: #eee;
+}
+
+.rmagic-button {
+ margin: 15px 0 5px;
+
+}
diff --git a/view/tpl/login.tpl b/view/tpl/login.tpl
index d56c8f272..1c2841adf 100755
--- a/view/tpl/login.tpl
+++ b/view/tpl/login.tpl
@@ -1,4 +1,6 @@
+{{if $login_page}}
<div class="generic-content-wrapper-styled">
+{{/if}}
<form action="{{$dest_url}}" id="{{$form_id}}" method="post" >
<input type="hidden" name="auth-params" value="login" />
<div id="login-main">
@@ -17,5 +19,7 @@
<input type="hidden" name="{{$k}}" value="{{$v}}" />
{{/foreach}}
</form>
+{{if $login_page}}
</div>
<script type="text/javascript"> $(document).ready(function() { $("#id_{{$lname.0}}").focus();} );</script>
+{{/if}} \ No newline at end of file
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index bd829d4d3..f74c88ce7 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -147,16 +147,8 @@
<div id="nav-login" class="login-dropdown-menu" style="display:none; width:150%;">
{{$nav.login}}
{{$nav.remote_login}}
-
- <!-- {{foreach $nav.loginmenu as $loginmenu}}
- <li role="presentation"><a class="{{$loginmenu.2}}" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem" id="{{$loginmenu.4}}">{{$loginmenu.1}}</a></li>
- {{/foreach}} -->
</div>
</li>
-<!-- {{foreach $nav.loginmenu as $loginmenu}}
- <li role="presentation"><a class="{{$loginmenu.2}} visible-xs" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem">{{$loginmenu.1}}</a></li>
- {{/foreach}}
--->
{{/if}}
{{if $nav.register}}
diff --git a/view/tpl/remote_login.tpl b/view/tpl/remote_login.tpl
index 1d11fb712..e6d387265 100644
--- a/view/tpl/remote_login.tpl
+++ b/view/tpl/remote_login.tpl
@@ -1 +1 @@
-<a href="rmagic" class="btn btn-default rmagic-button">{{$title}}</a>
+<a href="rmagic" class="btn btn-block btn-success rmagic-button">{{$title}}</a>