Merge remote-tracking branch 'upstream/dev' into website-export

This commit is contained in:
Andrew Manning 2016-08-23 06:57:10 -04:00
commit 420aa4bc44
28 changed files with 6126 additions and 5926 deletions

View File

@ -45,7 +45,7 @@ class System {
static public function get_server_role() {
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['server_role'])
return \App::$config['system']['server_role'];
return 'pro';
return 'standard';
}
static public function get_std_version() {

View File

@ -72,6 +72,7 @@ class Acl extends \Zotlabs\Web\Controller {
);
$permitted = ids_to_array($x,'xchan');
}
@ -249,7 +250,7 @@ class Acl extends \Zotlabs\Web\Controller {
);
if($z) {
foreach($z as $zz) {
if(in_array($zz['id'],$permitted)) {
if(in_array($zz['hash'],$permitted)) {
$r[] = $zz;
}
}

View File

@ -1341,6 +1341,7 @@ class Admin extends \Zotlabs\Web\Controller {
'$str_minversion' => t('Minimum project version: '),
'$str_maxversion' => t('Maximum project version: '),
'$str_minphpversion' => t('Minimum PHP version: '),
'$str_serverroles' => t('Compatible Server Roles: '),
'$str_requires' => t('Requires: '),
'$disabled' => t('Disabled - version incompatibility'),

View File

@ -140,7 +140,8 @@ class Channel extends \Zotlabs\Web\Controller {
'profile_uid' => \App::$profile['profile_uid'],
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true
'bbcode' => true,
'jotnets' => true
);
$o .= status_editor($a,$x);

View File

@ -73,7 +73,8 @@ class Display extends \Zotlabs\Web\Controller {
'expanded' => true,
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true
'bbcode' => true,
'jotnets' => true
);
$o = '<div id="jot-popup">';

View File

@ -159,7 +159,7 @@ class Network extends \Zotlabs\Web\Controller {
'allow_gid' => $channel['channel_allow_gid'],
'deny_cid' => $channel['channel_deny_cid'],
'deny_gid' => $channel['channel_deny_gid']
);
);
$private_editing = ((($group || $cid) && (! intval($_GET['pf']))) ? true : false);
@ -176,7 +176,8 @@ class Network extends \Zotlabs\Web\Controller {
'profile_uid' => local_channel(),
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
'bbcode' => true
'bbcode' => true,
'jotnets' => true
);
if($deftag)
$x['pretext'] = $deftag;

View File

@ -126,7 +126,10 @@ class Rpost extends \Zotlabs\Web\Controller {
'source' => ((x($_REQUEST,'source')) ? strip_tags($_REQUEST['source']) : ''),
'return_path' => 'rpost/return',
'bbco_autocomplete' => 'bbcode',
'bbcode' => true
'editor_autocomplete'=> true,
'bbcode' => true,
'jotnets' => true
);
$editor = status_editor($a,$x);

View File

@ -101,7 +101,7 @@ class Setup extends \Zotlabs\Web\Controller {
$timezone = notags(trim($_POST['timezone']));
$adminmail = notags(trim($_POST['adminmail']));
$siteurl = notags(trim($_POST['siteurl']));
$advanced = ((intval($_POST['advanced'])) ? 'pro' : 'basic');
$advanced = ((intval($_POST['advanced'])) ? 'standard' : 'basic');
if($siteurl != z_root()) {
$test = z_fetch_url($siteurl."/setup/testrewrite");

View File

@ -149,15 +149,6 @@ define ( 'MAX_IMAGE_LENGTH', -1 );
define ( 'DEFAULT_DB_ENGINE', 'MyISAM' );
/**
* SSL redirection policies
*/
define ( 'SSL_POLICY_NONE', 0 );
define ( 'SSL_POLICY_FULL', 1 );
define ( 'SSL_POLICY_SELFSIGN', 2 ); // NOT supported in Red
/**
* log levels
*/
@ -168,6 +159,15 @@ define ( 'LOGGER_DEBUG', 2 );
define ( 'LOGGER_DATA', 3 );
define ( 'LOGGER_ALL', 4 );
/**
* Server roles
*/
define ( 'SERVER_ROLE_BASIC', 0x0001 );
define ( 'SERVER_ROLE_STANDARD', 0x0002 );
define ( 'SERVER_ROLE_PRO', 0x0004 );
/**
* registration policies
*/
@ -612,11 +612,11 @@ function sys_boot() {
if(UNO)
App::$config['system']['server_role'] = 'basic';
else
App::$config['system']['server_role'] = 'pro';
App::$config['system']['server_role'] = 'standard';
}
if(! (array_key_exists('server_role',App::$config['system']) && App::$config['system']['server_role']))
App::$config['system']['server_role'] = 'pro';
App::$config['system']['server_role'] = 'standard';
App::$timezone = ((App::$config['system']['timezone']) ? App::$config['system']['timezone'] : 'UTC');
date_default_timezone_set(App::$timezone);
@ -760,7 +760,7 @@ class miniApp {
class App {
public static $install = false; // true if we are installing the software
public static $role = 0; // server role (constant, not the string)
public static $account = null; // account record of the logged-in account
public static $channel = null; // channel record of the current channel of the logged-in account
public static $observer = null; // xchan record of the page observer
@ -1044,6 +1044,31 @@ class App {
}
}
public static function get_role() {
if(! self::$role)
return self::set_role();
return self::$role;
}
public static function set_role() {
$role_str = \Zotlabs\Lib\System::get_server_role();
switch($role_str) {
case 'basic':
$role = SERVER_ROLE_BASIC;
break;
case 'pro':
$role = SERVER_ROLE_PRO;
break;
case 'standard':
default:
$role = SERVER_ROLE_STANDARD;
break;
}
self::$role = $role;
return $role;
}
public static function get_scheme() {
return self::$scheme;
}

View File

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Contributor Covenant 1.4.0</title>
<style>
body {
font-family: monospace;
padding: 4em;
}
a {
color: #990000;
}
</style>
<link rel="alternate" hreflang="de" href="version/1/3/0/de/" />
<link rel="alternate" hreflang="es" href="version/1/4/es/" />
<link rel="alternate" hreflang="fr" href="version/1/3/0/fr/" />
<link rel="alternate" hreflang="hu" href="version/1/3/0/hu/" />
<link rel="alternate" hreflang="it" href="version/1/3/0/it/" />
<link rel="alternate" hreflang="ja" href="version/1/3/0/ja/" />
<link rel="alternate" hreflang="pl" href="version/1/4/pl/" />
<link rel="alternate" hreflang="pt" href="version/1/3/0/pt/" />
<link rel="alternate" hreflang="pt" href="version/1/3/0/pt_br/" />
<link rel="alternate" hreflang="ru" href="version/1/3/0/ru/" />
<link rel="alternate" hreflang="sl" href="version/1/4/sl/" />
<link rel="alternate" hreflang="uk" href="version/1/4/uk/" />
</head>
<body>
<h1>Contributor Covenant Code of Conduct</h1>
<h2>Our Pledge</h2>
<p>In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.</p>
<h2>Our Standards</h2>
<p>Examples of behavior that contributes to creating a positive environment
include:</p>
<ul>
<li>Using welcoming and inclusive language</li>
<li>Being respectful of differing viewpoints and experiences</li>
<li>Gracefully accepting constructive criticism</li>
<li>Focusing on what is best for the community</li>
<li>Showing empathy towards other community members</li>
</ul>
<p>Examples of unacceptable behavior by participants include:</p>
<ul>
<li>The use of sexualized language or imagery and unwelcome sexual attention or advances</li>
<li>Trolling, insulting/derogatory comments, and personal or political attacks</li>
<li>Public or private harassment</li>
<li>Publishing others' private information, such as a physical or electronic address, without explicit permission</li>
<li>Other conduct which could reasonably be considered inappropriate in a professional setting</li>
</ul>
<h2>Our Responsibilities</h2>
<p>Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.</p>
<p>Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.</p>
<h2>Scope</h2>
<p>This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.</p>
<h2>Enforcement</h2>
<p>Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at project&#x40;hubzilla.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.</p>
<p>Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.</p>
<h2>Attribution</h2>
<p>This Code of Conduct is adapted from the <a href="http://contributor-covenant.org">Contributor Covenant</a>, version 1.4,
available at <a href="http://contributor-covenant.org/version/1/4/">http://contributor-covenant.org/version/1/4</a>.</p>
</body>
</html>

View File

@ -27,5 +27,5 @@
[zrl=[baseurl]/help/dev_beginner]Step-for-step manual for beginning developers[/zrl]
[h3]External Resources[/h3]
[url=https://zothub.com/channel/one]Development Channel[/url]
[url=https://grid.reticu.li/channel/hubzilla]Development Channel[/url]
[url=https://federated.social/channel/postgres]Postgres-specific $Projectname Admin Support Channel[/url]

View File

@ -1,6 +1,6 @@
[b]$Projectname Developer Guide[/b]
We're pretty relaxed when it comes to developers. We don't have a lot of rules. Some of us are over-worked and if you want to help we're happy to let you help. That said, attention to a few guidelines will make the process smoother and make it easier to work together. We have developers from across the globe with different abilities and different cultural backgrounds and different levels of patience. Our primary rule is to respect others. Sometimes this is hard and sometimes we have very different opinions of how things should work, but if everybody makes an effort, we'll get along just fine.
We're pretty relaxed when it comes to developers. We don't have a lot of rules. Some of us are over-worked and if you want to help we're happy to let you help. That said, attention to a few guidelines will make the process smoother and make it easier to work together. All developers are expected to abide by our [zrl=[baseurl]/help/contributor/covenant]code of conduct[/zrl]. We have developers from across the globe with different abilities and different cultural backgrounds and different levels of patience. Our primary rule is to respect others. Sometimes this is hard and sometimes we have very different opinions of how things should work, but if everybody makes an effort, we'll get along just fine.
[b]Here is how you can join us.[/b]

View File

@ -0,0 +1,47 @@
Feature: Zot Access Tokens
Status: Draft
Date: 15 July 2016
Purpose:
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.).
Scope:
Zot Access Tokens do not convey membership in the site or network. In particular, they do not provide an account or channel; which may be necessary to interact with the hub owner or with others in the network or federation of networks. In most cases they can only be used to consume restricted resources and do not have an ability to create those resources, however this ability may be provided by custom configurations or in future releases or addons.
For instance the ability for a temporary login to access a chatroom may provide suitable permission to create chat messages inside that chatroom.
Implementation:
Zot Access Tokens are managed through a "tab" of the settings page. Access to this tab may be controlled by site configuration. On this page, channels may create, edit, list, and remove any access tokens under their control.
The form to create/edit accepts three parameters, a human readable name, a password or access token, and an optional expiration. Once expired, the access token is no longer valid, may no longer be used, and will be automatically purged from the list of temporary accounts. The password field in the create/edit forms displays the text of the access token and not an obscured password. By default we will create a token using the autoname() function, which generally produces a random character sequence which is "pronounceable", hence easy to convey or remember. This can be changed to any other character sequence which is acceptable to the site password complexity policy. (In most Hubzilla installations this imposes a minimum of three characters, but may be extended by plugin or site policy).
Usage:
We do not specify mechanisms for sharing these tokens with others. Any communication method may be used. Any tokens you have created are added to the Access Control List selector and may be used anywhere that Access Control Lists are provided.
Example: A visitor arrives at your site. She has an access token you have provided, and attempts to visit one of your photo albums (which is restricted to be viewed only by yourself and one temporary identity). Permission is denied.
The visitor now selects "Login" from the menu navigation bar. This presents a login page. She enters the name and password you have provided her, and she can now view the restricted photo album.
Alternatively, you may share a link to a protected file by adding a parameter "&zat=abc123" to the URL, where the string "abc123" is the access token or password for the temporary login. No further negotiation is required, and the file is presented.
Zot Acess Tokens are represented internally as an authenticated "observer". Querying the observer in code should return a pseudo or system generated xchan with an unknown protocol and a default profile photo. It will match (successfully) any access control rule which allows authenticated observers.
Security Considerations:
The URL form of authentication is inherently less secure than using a login, but may be preferable for some uses of this feature. It probably should not be transmitted over non-SSL links.
Future development:
It might be desirable for future implementations to provide an options for single-use, where the access token is removed promptly following first use.

View File

@ -148,11 +148,6 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
array_walk($deny_cid,'fixacl');
array_walk($deny_gid,'fixacl');
}
$jotnets = '';
if($show_jotnets) {
call_hooks('jot_networks', $jotnets);
}
$r = q("SELECT id, hash, gname FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval(local_channel())
@ -181,8 +176,6 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
'$allowgid' => json_encode($allow_gid),
'$denycid' => json_encode($deny_cid),
'$denygid' => json_encode($deny_gid),
'$jnetModalTitle' => t('Other networks and post services'),
'$jotnets' => $jotnets,
'$aclModalTitle' => t('Permissions'),
'$aclModalDesc' => $dialog_description,
'$aclModalDismiss' => t('Close'),

View File

@ -1381,6 +1381,11 @@ function zid($s,$address = '') {
if (! strlen($s) || strpos($s,'zid='))
return $s;
$m = parse_url($s);
$fragment = ((array_key_exists('fragment',$m) && $m['fragment']) ? $m['fragment'] : false);
if($fragment !== false)
$s = str_replace('#' . $fragment,'',$s);
$has_params = ((strpos($s,'?')) ? true : false);
$num_slashes = substr_count($s, '/');
if (! $has_params)
@ -1401,6 +1406,11 @@ function zid($s,$address = '') {
else
$zurl = $s;
// put fragment at the end
if($fragment)
$zurl .= '#' . $fragment;
$arr = array('url' => $s, 'zid' => urlencode($myaddr), 'result' => $zurl);
call_hooks('zid', $arr);

View File

@ -1200,8 +1200,6 @@ function status_editor($a, $x, $popup = false) {
$tpl = get_markup_template('jot.tpl');
$jotplugins = '';
$preview = t('Preview');
if(x($x, 'hide_preview'))
$preview = '';
@ -1218,8 +1216,14 @@ function status_editor($a, $x, $popup = false) {
if(! $cipher)
$cipher = 'aes256';
$jotplugins = '';
call_hooks('jot_tool', $jotplugins);
$jotnets = '';
if(x($x,'jotnets')) {
call_hooks('jot_networks', $jotnets);
}
$o .= replace_macros($tpl, array(
'$return_path' => ((x($x, 'return_path')) ? $x['return_path'] : App::$query_string),
'$action' => z_root() . '/item',
@ -1276,6 +1280,8 @@ function status_editor($a, $x, $popup = false) {
'$preview' => $preview,
'$source' => ((x($x, 'source')) ? $x['source'] : ''),
'$jotplugins' => $jotplugins,
'$jotnets' => $jotnets,
'$jotnets_label' => t('Other networks and post services'),
'$defexpire' => $defexpire,
'$feature_expire' => $feature_expire,
'$expires' => t('Set expiration date'),

View File

@ -1627,8 +1627,21 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
$arr['commented'] = ((x($arr,'commented') !== false) ? datetime_convert('UTC','UTC',$arr['commented']) : datetime_convert());
$arr['comments_closed'] = ((x($arr,'comments_closed') !== false) ? datetime_convert('UTC','UTC',$arr['comments_closed']) : NULL_DATE);
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
if($deliver) {
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
}
else {
// When deliver flag is false, we are *probably* performing an import or bulk migration.
// If one updates the changed timestamp it will be made available to zotfeed and delivery
// will still take place through backdoor methods. Since these fields are rarely used
// otherwise, just preserve the original timestamp.
$arr['received'] = ((x($arr,'received') !== false) ? datetime_convert('UTC','UTC',$arr['received']) : datetime_convert());
$arr['changed'] = ((x($arr,'changed') !== false) ? datetime_convert('UTC','UTC',$arr['changed']) : datetime_convert());
}
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : '');
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
@ -2035,8 +2048,22 @@ function item_store_update($arr,$allow_exec = false, $deliver = true) {
$arr['comments_closed'] = $orig[0]['comments_closed'];
$arr['commented'] = $orig[0]['commented'];
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
if($deliver) {
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
}
else {
// When deliver flag is false, we are *probably* performing an import or bulk migration.
// If one updates the changed timestamp it will be made available to zotfeed and delivery
// will still take place through backdoor methods. Since these fields are rarely used
// otherwise, just preserve the original timestamp.
$arr['received'] = $orig[0]['received'];
$arr['changed'] = $orig[0]['changed'];
}
$arr['route'] = ((array_key_exists('route',$arr)) ? trim($arr['route']) : $orig[0]['route']);
$arr['diaspora_meta'] = ((x($arr,'diaspora_meta')) ? $arr['diaspora_meta'] : $orig[0]['diaspora_meta']);
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : $orig[0]['location']);

View File

@ -404,6 +404,18 @@ function check_plugin_versions($info) {
return false;
}
}
if(array_key_exists('serverroles',$info)) {
$role = \Zotlabs\Lib\System::get_server_role();
if(! (
stristr($info['serverroles'],'*')
|| stristr($info['serverroles'],'any')
|| stristr($info['serverroles'],$role))) {
logger('serverrole limit: ' . $info['name'],LOGGER_NORMAL,LOG_WARNING);
return false;
}
}
if(array_key_exists('requires',$info)) {
$arr = explode(',',$info['requires']);

View File

@ -3708,6 +3708,8 @@ function zotinfo($arr) {
}
}
$ztarget_hash = (($ztarget && $zsig) ? make_xchan_hash($ztarget,$zsig) : '' );
$r = null;
if(strlen($zhash)) {
@ -3783,11 +3785,11 @@ function zotinfo($arr) {
if($role === 'forum' || $role === 'repository') {
$public_forum = true;
}
else {
elseif($ztarget_hash) {
// check if it has characteristics of a public forum based on custom permissions.
$t = q("select * from abconfig where abconfig.cat = 'my_perms' and abconfig.chan = %d and abconfig.xchan = '%s' and abconfig.k in ('tag_deliver', 'send_stream') ",
intval($e['channel_id']),
dbesc($e['channel_hash'])
dbesc($ztarget_hash)
);
$ch = 0;
@ -3889,9 +3891,6 @@ function zotinfo($arr) {
$ret['follow_url'] = z_root() . '/follow?f=&url=%s';
$ztarget_hash = (($ztarget && $zsig)
? make_xchan_hash($ztarget,$zsig)
: '' );
$permissions = get_all_perms($e['channel_id'],$ztarget_hash,false);

View File

@ -47,9 +47,9 @@ App::$config['system']['location_hash'] = 'if the auto install failed, put a uni
// Choices are 'basic', 'standard', and 'pro'.
// basic sets up the sevrer for basic social networking and removes "complicated" features
// standard provides most desired features except e-commerce
// pro gives you access to everything
// pro gives you access to everything, but removes cross-platform federation/emulation
App::$config['system']['server_role'] = 'pro';
App::$config['system']['server_role'] = 'standard';
// These lines set additional security headers to be sent with all responses

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* jot */
.jothidden input {
.jothidden input[type="text"] {
border: 0px;
margin: 0px;
height: 39px;
@ -70,6 +70,10 @@
margin-bottom: 30px;
}
#profile-jot-plugin-wrapper {
margin-top: 10px;
}
#profile-rotator-wrapper {
float: left;
}
@ -78,14 +82,6 @@
padding: 15px 0px 0px 15px;
}
.profile-jot-net {
float: left;
margin-right: 10px;
margin-top: 5px;
margin-bottom: 5px;
padding: 5px;
}
/* conversation */
.thread-wrapper.toplevel_item {

View File

@ -100,13 +100,6 @@ ACL.prototype.on_submit = function() {
$(that.deny_cid).each(function(i,v) {
that.form_id.append("<input class='acl-field' type='hidden' name='contact_deny[]' value='"+v+"'>");
});
var formfields = $('.profile-jot-net input').serializeArray();
$.each(formfields, function(i, field) {
that.form_id.append("<input class='acl-field' type='hidden' name='"+field.name+"' value='"+field.value+"'>");
});
};
ACL.prototype.search = function() {
@ -283,6 +276,7 @@ ACL.prototype.update_view = function(value) {
/* jot acl */
$('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-lock').addClass('fa-unlock');
$('#dbtn-jotnets').show();
$('.profile-jot-net input').attr('disabled', false);
}
@ -295,6 +289,7 @@ ACL.prototype.update_view = function(value) {
/* jot acl */
$('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
$('#dbtn-jotnets').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
}
@ -306,6 +301,7 @@ ACL.prototype.update_view = function(value) {
/* jot acl */
$('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
$('#dbtn-jotnets').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
}
@ -317,10 +313,12 @@ ACL.prototype.update_view = function(value) {
/* jot acl */
if(that.allow_gid.length === 0 && that.allow_cid.length === 0 && that.deny_gid.length === 0 && that.deny_cid.length === 0 && value === 'custom') {
$('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-lock').addClass('fa-unlock');
$('#dbtn-jotnets').show();
$('.profile-jot-net input').attr('disabled', false);
}
else {
$('#jot-perms-icon, #dialog-perms-icon').removeClass('fa-unlock').addClass('fa-lock');
$('#dbtn-jotnets').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
}
}

View File

@ -27,16 +27,6 @@
</div>
{{/if}}
{{if $jotnets}}
<div class="jotnets-wrapper" role="tab" id="jotnets-wrapper">
<a data-toggle="collapse" class="btn btn-block btn-default" href="#jotnets-collapse" aria-expanded="false" aria-controls="jotnets-collapse">{{$jnetModalTitle}} <span class="caret"></span></a>
</div>
<div id="jotnets-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="acl-select">
{{$jotnets}}
<div class="clear"></div>
</div>
{{/if}}
<div id="acl-wrapper">
<div id="acl-list">
<div id="acl-search-wrapper">
@ -47,13 +37,14 @@
<div id="acl-list-content"></div>
</div>
</div>
<span id="acl-fields"></span>
</div>
<div class="acl-list-item" rel="acl-template" style="display:none">
<img data-src="{0}"><p>{1}</p>
<button class="acl-button-hide btn btn-xs btn-default"><i class="fa fa-times"></i> {{$hide}}</button>
<button class="acl-button-show btn btn-xs btn-default"><i class="fa fa-check"></i> {{$show}}</button>
</div>
</div>
<div class="modal-footer clear">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$aclModalDismiss}}</button>

View File

@ -24,6 +24,9 @@
{{if $info.minphpversion}}
<p class="versionlimit">{{$str_minphpversion}}{{$info.minphpversion}}</p>
{{/if}}
{{if $info.serverroles}}
<p class="versionlimit">{{$str_serverroles}}{{$info.serverroles}}</p>
{{/if}}
{{if $info.requires}}
<p class="versionlimit">{{$str_requires}}{{$info.requires}}</p>
{{/if}}

View File

@ -80,10 +80,10 @@
</button>
{{/if}}
{{if $embedPhotos}}
<button id="embed-photo-wrapper" class="btn btn-default btn-sm" title="{{$embedPhotos}}" onclick="initializeEmbedPhotoDialog();return false;">
<i id="embed-photo" class="fa fa-file-image-o jot-icons"></i>
</button>
{{/if}}
<button id="embed-photo-wrapper" class="btn btn-default btn-sm" title="{{$embedPhotos}}" onclick="initializeEmbedPhotoDialog();return false;">
<i id="embed-photo" class="fa fa-file-image-o jot-icons"></i>
</button>
{{/if}}
</div>
<div class="btn-group hidden-xs hidden-sm">
{{if $setloc}}
@ -130,7 +130,7 @@
<button type="button" id="more-tools" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i id="more-tools-icon" class="fa fa-caret-down jot-icons"></i>
</button>
<ul class="dropdown-menu dropdown-menu" role="menu">
<ul class="dropdown-menu" role="menu">
{{if $visitor}}
{{if $writefiles}}
<li><a id="wall-file-upload-sub" href="#" ><i class="fa fa-paperclip"></i>&nbsp;{{$attach}}</a></li>
@ -173,17 +173,42 @@
<i class="fa fa-eye jot-icons" ></i>
</button>
{{/if}}
{{if $jotnets}}
<button id="dbtn-jotnets" class="btn btn-default btn-sm" data-toggle="modal" data-target="#jotnetsModal" type="button" title="{{$jotnets_label}}" style="{{if $lockstate == 'lock'}}display: none;{{/if}}">
<i class="fa fa-share-alt jot-icons"></i>
</button>
{{/if}}
{{if $showacl}}
<button id="dbtn-acl" class="acl-select btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button" data-form_id="profile-jot-form">
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button" data-form_id="profile-jot-form">
<i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>{{if $bang}}&nbsp;<i class="fa fa-exclamation jot-icons"></i>{{/if}}
</button>
{{/if}}
<button id="dbtn-submit" class="acl-submit btn btn-primary btn-sm" type="submit" tabindex=3 name="button-submit">{{$share}}</button>
<button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" tabindex="3" name="button-submit">{{$share}}</button>
</div>
<div id="profile-jot-perms-end"></div>
<div class="clear"></div>
{{if $jotplugins}}
<div id="profile-jot-plugin-wrapper">
{{$jotplugins}}
</div>
{{/if}}
{{if $jotnets}}
<div class="modal" id="jotnetsModal" tabindex="-1" role="dialog" aria-labelledby="jotnetsModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="expiryModalLabel">{{$jotnets_label}}</h4>
</div>
<div class="modal-body">
{{$jotnets}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{{/if}}
</div>
<div id="profile-jot-text-loading"></div>
<div id="profile-jot-end" class="clear"></div>
@ -197,70 +222,78 @@
{{if $feature_expire}}
<!-- Modal for item expiry-->
<div class="modal" id="expiryModal" tabindex="-1" role="dialog" aria-labelledby="expiryModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="expiryModalLabel">{{$expires}}</h4>
</div>
<!-- <div class="modal-body"> -->
<div class="modal-body form-group" style="width:90%">
<div class='date'><input type='text' placeholder='yyyy-mm-dd HH:MM' name='start_text' id='expiration-date' class="form-control" /></div><script type='text/javascript'>$(function () {var picker = $('#expiration-date').datetimepicker({format:'Y-m-d H:i', minDate: 0 }); })</script>
</div>
<!-- </div> -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$expiryModalCANCEL}}</button>
<button id="expiry-modal-OKButton" type="button" class="btn btn-primary">{{$expiryModalOK}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="expiryModalLabel">{{$expires}}</h4>
</div>
<div class="modal-body form-group" style="width:90%">
<div class="date">
<input type="text" placeholder="yyyy-mm-dd HH:MM" name="start_text" id="expiration-date" class="form-control" />
</div>
<script>
$(function () {
var picker = $('#expiration-date').datetimepicker({format:'Y-m-d H:i', minDate: 0 });
});
</script>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$expiryModalCANCEL}}</button>
<button id="expiry-modal-OKButton" type="button" class="btn btn-primary">{{$expiryModalOK}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{{/if}}
{{if $feature_future}}
<!-- Modal for item created-->
<div class="modal" id="createdModal" tabindex="-1" role="dialog" aria-labelledby="createdModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="createdModalLabel">{{$future_txt}}</h4>
</div>
<!-- <div class="modal-body"> -->
<div class="modal-body form-group" style="width:90%">
<div class='date'><input type='text' placeholder='yyyy-mm-dd HH:MM' name='created_text' id='created-date' class="form-control" /></div><script type='text/javascript'>$(function () {var picker = $('#created-date').datetimepicker({format:'Y-m-d H:i', minDate: 0 }); })</script>
</div>
<!-- </div> -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$expiryModalCANCEL}}</button>
<button id="created-modal-OKButton" type="button" class="btn btn-primary">{{$expiryModalOK}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="createdModalLabel">{{$future_txt}}</h4>
</div>
<div class="modal-body form-group" style="width:90%">
<div class="date">
<input type="text" placeholder="yyyy-mm-dd HH:MM" name="created_text" id="created-date" class="form-control" />
</div>
<script>
$(function () {
var picker = $('#created-date').datetimepicker({format:'Y-m-d H:i', minDate: 0 });
});
</script>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$expiryModalCANCEL}}</button>
<button id="created-modal-OKButton" type="button" class="btn btn-primary">{{$expiryModalOK}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{{/if}}
{{if $embedPhotos}}
<div class="modal" id="embedPhotoModal" tabindex="-1" role="dialog" aria-labelledby="embedPhotoLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h4>
</div>
<div class="modal-body" id="embedPhotoModalBody" >
<div id="embedPhotoModalBodyAlbumListDialog" class="hide">
<div id="embedPhotoModalBodyAlbumList"></div>
</div>
<div id="embedPhotoModalBodyAlbumDialog" class="hide">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h4>
</div>
<div class="modal-body" id="embedPhotoModalBody" >
<div id="embedPhotoModalBodyAlbumListDialog" class="hide">
<div id="embedPhotoModalBodyAlbumList"></div>
</div>
<div id="embedPhotoModalBodyAlbumDialog" class="hide"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{{/if}}

View File

@ -1,52 +1,9 @@
<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script type="text/javascript" src="view/js/ajaxupload.js" ></script>
<script language="javascript" type="text/javascript">
var plaintext = '{{$editselect}}';
if(plaintext != 'none') {
tinyMCE.init({
theme : "advanced",
mode : "specific_textareas",
editor_selector: /(profile-jot-text|prvmail-text)/,
plugins : "bbcode,paste",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_blockformats : "blockquote,code",
gecko_spellcheck : true,
paste_text_sticky : true,
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
force_p_newlines : false,
force_br_newlines : true,
forced_root_block : '',
convert_urls: false,
content_css: "{{$baseurl}}/view/custom_tinymce.css",
//Character count
theme_advanced_path : false,
setup : function(ed) {
ed.onInit.add(function(ed) {
ed.pasteAsPlainText = true;
var editorId = ed.editorId;
var textarea = $('#'+editorId);
if (typeof(textarea.attr('tabindex')) != "undefined") {
$('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
textarea.attr('tabindex', null);
}
});
}
});
}
else
$("#prvmail-text").editor_autocomplete(baseurl+"/acl");
</script>
<script type="text/javascript" src="view/js/ajaxupload.js" ></script>
<script>
$(document).ready(function() {
var file_uploader = new window.AjaxUpload(
@ -114,12 +71,8 @@ else
}
function addmailtext(data) {
if(plaintext == 'none') {
var currentText = $("#prvmail-text").val();
$("#prvmail-text").val(currentText + data);
}
else
tinyMCE.execCommand('mceInsertRawHTML',false,data);
var currentText = $("#prvmail-text").val();
$("#prvmail-text").val(currentText + data);
}

View File

@ -1,36 +1,2 @@
<script language="javascript" type="text/javascript"
src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "{{$editselect}}",
plugins : "bbcode,paste",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_blockformats : "blockquote,code",
gecko_spellcheck : true,
paste_text_sticky : true,
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
force_p_newlines : false,
force_br_newlines : true,
forced_root_block : '',
content_css: "{{$baseurl}}/view/custom_tinymce.css",
theme_advanced_path : false,
setup : function(ed) {
ed.onInit.add(function(ed) {
ed.pasteAsPlainText = true;
});
}
});
</script>
<script language="javascript" type="text/javascript"></script>