Merge branch 'master' of https://github.com/friendica/red
This commit is contained in:
commit
5c885e91a3
1
boot.php
1
boot.php
@ -576,6 +576,7 @@ function startup() {
|
|||||||
|
|
||||||
class App {
|
class App {
|
||||||
|
|
||||||
|
public $install = false; // true if we are installing the software
|
||||||
|
|
||||||
public $account = null; // account record of the logged-in account
|
public $account = null; // account record of the logged-in account
|
||||||
public $channel = null; // channel record of the current channel of the logged-in account
|
public $channel = null; // channel record of the current channel of the logged-in account
|
||||||
|
@ -152,7 +152,7 @@ function menu_edit($arr) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return q("update menu set menu_name = '%s', menu_desc = '%s', menu_flags = %d,
|
return q("update menu set menu_name = '%s', menu_desc = '%s', menu_flags = %d
|
||||||
where menu_id = %d and menu_channel_id = %d limit 1",
|
where menu_id = %d and menu_channel_id = %d limit 1",
|
||||||
dbesc($menu_name),
|
dbesc($menu_name),
|
||||||
dbesc($menu_desc),
|
dbesc($menu_desc),
|
||||||
|
@ -24,7 +24,7 @@ function get_perms() {
|
|||||||
'post_mail' => array('channel_w_mail', intval(PERMS_W_MAIL), false, t('Can send me private mail messages'), ''),
|
'post_mail' => array('channel_w_mail', intval(PERMS_W_MAIL), false, t('Can send me private mail messages'), ''),
|
||||||
'post_photos' => array('channel_w_photos', intval(PERMS_W_PHOTOS), false, t('Can post photos to my photo albums'), ''),
|
'post_photos' => array('channel_w_photos', intval(PERMS_W_PHOTOS), false, t('Can post photos to my photo albums'), ''),
|
||||||
'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post @mentions'), t('Advanced - useful for creating group forum channels')),
|
'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post @mentions'), t('Advanced - useful for creating group forum channels')),
|
||||||
'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('Requires compatible chat plugin')),
|
'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('')),
|
||||||
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my "public" file storage'), ''),
|
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my "public" file storage'), ''),
|
||||||
'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my "public" pages'), ''),
|
'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my "public" pages'), ''),
|
||||||
|
|
||||||
|
35
include/spam.php
Normal file
35
include/spam.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php /** @file */
|
||||||
|
|
||||||
|
|
||||||
|
function string_splitter($s) {
|
||||||
|
|
||||||
|
if(! $s)
|
||||||
|
return array();
|
||||||
|
|
||||||
|
$s = preg_replace('/\pP+/','',$s);
|
||||||
|
|
||||||
|
$x = mb_split("\[|\]|\s",$s);
|
||||||
|
|
||||||
|
$ret = array();
|
||||||
|
if($x) {
|
||||||
|
foreach($x as $y) {
|
||||||
|
if(mb_strlen($y) > 2)
|
||||||
|
$ret[] = substr($y,0,64);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function get_words($uid,$list) {
|
||||||
|
|
||||||
|
stringify($list,true);
|
||||||
|
|
||||||
|
$r = q("select * from spam where term in ( " . $list . ") and uid = %d",
|
||||||
|
intval($uid)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
10
index.php
10
index.php
@ -23,7 +23,7 @@ $a = new App;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true);
|
$a->install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true);
|
||||||
|
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
|
|
||||||
@ -38,8 +38,8 @@ $a->language = get_best_language();
|
|||||||
|
|
||||||
require_once("include/dba/dba_driver.php");
|
require_once("include/dba/dba_driver.php");
|
||||||
|
|
||||||
if(! $install) {
|
if(! $a->install) {
|
||||||
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $install);
|
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $a->install);
|
||||||
unset($db_host, $db_port, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_port, $db_user, $db_pass, $db_data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,7 +91,7 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) {
|
|||||||
load_translation_table($a->language);
|
load_translation_table($a->language);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((x($_GET,'zid')) && (! $install)) {
|
if((x($_GET,'zid')) && (! $a->install)) {
|
||||||
$a->query_string = preg_replace('/[\?&]zid=(.*?)([\?&]|$)/is','',$a->query_string);
|
$a->query_string = preg_replace('/[\?&]zid=(.*?)([\?&]|$)/is','',$a->query_string);
|
||||||
if(! local_user()) {
|
if(! local_user()) {
|
||||||
$_SESSION['my_address'] = $_GET['zid'];
|
$_SESSION['my_address'] = $_GET['zid'];
|
||||||
@ -116,7 +116,7 @@ if(! x($_SESSION,'sysmsg_info'))
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if($install) {
|
if($a->install) {
|
||||||
/* Allow an exception for the view module so that pcss will be interpreted during installation */
|
/* Allow an exception for the view module so that pcss will be interpreted during installation */
|
||||||
if($a->module != 'view')
|
if($a->module != 'view')
|
||||||
$a->module = 'setup';
|
$a->module = 'setup';
|
||||||
|
@ -205,7 +205,7 @@ class b8_storage_frndc extends b8_storage_base
|
|||||||
foreach($to_create as $term) {
|
foreach($to_create as $term) {
|
||||||
if(strlen($sql))
|
if(strlen($sql))
|
||||||
$sql .= ',';
|
$sql .= ',';
|
||||||
$sql .= sprintf("(term,datetime,uid) values('%s','%s',%d)",
|
$sql .= sprintf("(term,date,uid) values('%s','%s',%d)",
|
||||||
dbesc(str_tolower($term))
|
dbesc(str_tolower($term))
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
intval($uid)
|
intval($uid)
|
||||||
@ -280,16 +280,16 @@ class b8_storage_frndc extends b8_storage_base
|
|||||||
|
|
||||||
$result = q('
|
$result = q('
|
||||||
DELETE FROM ' . $this->config['table_name'] . '
|
DELETE FROM ' . $this->config['table_name'] . '
|
||||||
WHERE token IN ("' . implode('", "', $this->_deletes) . '") AND uid = ' . $this->uid);
|
WHERE term IN ("' . implode('", "', $this->_deletes) . '") AND uid = ' . $this->uid);
|
||||||
|
|
||||||
$this->_deletes = array();
|
$this->_deletes = array();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($this->_puts) > 0) {
|
if(count($this->_puts) > 0) {
|
||||||
|
//fixme
|
||||||
$result = q('
|
$result = q('
|
||||||
INSERT INTO ' . $this->config['table_name'] . '(token, count, uid)
|
INSERT INTO ' . $this->config['table_name'] . '(term, count, uid)
|
||||||
VALUES ' . implode(', ', $this->_puts));
|
VALUES ' . implode(', ', $this->_puts));
|
||||||
|
|
||||||
$this->_puts = array();
|
$this->_puts = array();
|
||||||
|
@ -56,6 +56,7 @@ function chatsvc_content(&$a) {
|
|||||||
|
|
||||||
$status = strip_tags($_REQUEST['status']);
|
$status = strip_tags($_REQUEST['status']);
|
||||||
$room_id = intval($a->data['chat']['room_id']);
|
$room_id = intval($a->data['chat']['room_id']);
|
||||||
|
$stopped = ((x($_REQUEST,'stopped') && intval($_REQUEST['stopped'])) ? true : false);
|
||||||
|
|
||||||
if($status && $room_id) {
|
if($status && $room_id) {
|
||||||
|
|
||||||
@ -74,58 +75,60 @@ function chatsvc_content(&$a) {
|
|||||||
goaway(z_root() . '/chat/' . $x[0]['channel_address'] . '/' . $room_id);
|
goaway(z_root() . '/chat/' . $x[0]['channel_address'] . '/' . $room_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! $stopped) {
|
||||||
|
|
||||||
$lastseen = intval($_REQUEST['last']);
|
$lastseen = intval($_REQUEST['last']);
|
||||||
|
|
||||||
$ret = array('success' => false);
|
$ret = array('success' => false);
|
||||||
|
|
||||||
$sql_extra = permissions_sql($a->data['chat']['uid']);
|
$sql_extra = permissions_sql($a->data['chat']['uid']);
|
||||||
|
|
||||||
$r = q("select * from chatroom where cr_uid = %d and cr_id = %d $sql_extra",
|
$r = q("select * from chatroom where cr_uid = %d and cr_id = %d $sql_extra",
|
||||||
intval($a->data['chat']['uid']),
|
intval($a->data['chat']['uid']),
|
||||||
intval($a->data['chat']['room_id'])
|
intval($a->data['chat']['room_id'])
|
||||||
);
|
);
|
||||||
if(! $r)
|
if(! $r)
|
||||||
json_return_and_die($ret);
|
json_return_and_die($ret);
|
||||||
|
|
||||||
$inroom = array();
|
$inroom = array();
|
||||||
|
|
||||||
$r = q("select * from chatpresence left join xchan on xchan_hash = cp_xchan where cp_room = %d order by xchan_name",
|
$r = q("select * from chatpresence left join xchan on xchan_hash = cp_xchan where cp_room = %d order by xchan_name",
|
||||||
intval($a->data['chat']['room_id'])
|
intval($a->data['chat']['room_id'])
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
switch($rr['cp_status']) {
|
switch($rr['cp_status']) {
|
||||||
case 'away':
|
case 'away':
|
||||||
$status = t('Away');
|
$status = t('Away');
|
||||||
break;
|
break;
|
||||||
case 'online':
|
case 'online':
|
||||||
default:
|
default:
|
||||||
$status = t('Online');
|
$status = t('Online');
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
|
||||||
}
|
}
|
||||||
|
|
||||||
$inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$chats = array();
|
$chats = array();
|
||||||
|
|
||||||
$r = q("select * from chat left join xchan on chat_xchan = xchan_hash where chat_room = %d and chat_id > %d",
|
$r = q("select * from chat left join xchan on chat_xchan = xchan_hash where chat_room = %d and chat_id > %d",
|
||||||
intval($a->data['chat']['room_id']),
|
intval($a->data['chat']['room_id']),
|
||||||
intval($lastseen)
|
intval($lastseen)
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$chats[] = array(
|
$chats[] = array(
|
||||||
'id' => $rr['chat_id'],
|
'id' => $rr['chat_id'],
|
||||||
'img' => zid($rr['xchan_photo_m']),
|
'img' => zid($rr['xchan_photo_m']),
|
||||||
'img_type' => $rr['xchan_photo_mimetype'],
|
'img_type' => $rr['xchan_photo_mimetype'],
|
||||||
'name' => $rr['xchan_name'],
|
'name' => $rr['xchan_name'],
|
||||||
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'c'),
|
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'c'),
|
||||||
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'r'),
|
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'r'),
|
||||||
'text' => smilies(bbcode($rr['chat_text']))
|
'text' => smilies(bbcode($rr['chat_text']))
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,9 +140,10 @@ function chatsvc_content(&$a) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$ret['success'] = true;
|
$ret['success'] = true;
|
||||||
$ret['inroom'] = $inroom;
|
if(! $stopped) {
|
||||||
$ret['chats'] = $chats;
|
$ret['inroom'] = $inroom;
|
||||||
|
$ret['chats'] = $chats;
|
||||||
|
}
|
||||||
json_return_and_die($ret);
|
json_return_and_die($ret);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -442,13 +442,13 @@ function connedit_content(&$a) {
|
|||||||
'$perms' => $perms,
|
'$perms' => $perms,
|
||||||
'$forum' => t('Forum Members'),
|
'$forum' => t('Forum Members'),
|
||||||
'$soapbox' => t('Soapbox'),
|
'$soapbox' => t('Soapbox'),
|
||||||
'$full' => t('Full Sharing'),
|
'$full' => t('Full Sharing (typical social network permissions)'),
|
||||||
'$cautious' => t('Cautious Sharing'),
|
'$cautious' => t('Cautious Sharing '),
|
||||||
'$follow' => t('Follow Only'),
|
'$follow' => t('Follow Only'),
|
||||||
'$permlbl' => t('Individual Permissions'),
|
'$permlbl' => t('Individual Permissions'),
|
||||||
'$permnote' => t('Some permissions may be inherited from your channel <a href="settings">privacy settings</a>, which have higher priority. Changing those inherited settings on this page will have no effect.'),
|
'$permnote' => t('Some permissions may be inherited from your channel <a href="settings">privacy settings</a>, which have higher priority than individual settings. Changing those inherited settings on this page will have no effect.'),
|
||||||
'$advanced' => t('Advanced Permissions'),
|
'$advanced' => t('Advanced Permissions'),
|
||||||
'$quick' => t('Quick Links'),
|
'$quick' => t('Simple Permissions (select one and submit)'),
|
||||||
'$common_link' => $a->get_baseurl(true) . '/common/loc/' . local_user() . '/' . $contact['id'],
|
'$common_link' => $a->get_baseurl(true) . '/common/loc/' . local_user() . '/' . $contact['id'],
|
||||||
'$all_friends' => $all_friends,
|
'$all_friends' => $all_friends,
|
||||||
'$relation_text' => $relation_text,
|
'$relation_text' => $relation_text,
|
||||||
|
@ -8,6 +8,8 @@ function menu_post(&$a) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
$_REQUEST['menu_channel_id'] = local_user();
|
$_REQUEST['menu_channel_id'] = local_user();
|
||||||
|
if($_REQUEST['menu_bookmark'])
|
||||||
|
$_REQUEST['menu_flags'] = MENU_BOOKMARK;
|
||||||
|
|
||||||
$menu_id = ((argc() > 1) ? intval(argv(1)) : 0);
|
$menu_id = ((argc() > 1) ? intval(argv(1)) : 0);
|
||||||
if($menu_id) {
|
if($menu_id) {
|
||||||
@ -76,6 +78,7 @@ function menu_content(&$a) {
|
|||||||
'$header' => t('New Menu'),
|
'$header' => t('New Menu'),
|
||||||
'$menu_name' => array('menu_name', t('Menu name'), '', t('Must be unique, only seen by you'), '*'),
|
'$menu_name' => array('menu_name', t('Menu name'), '', t('Must be unique, only seen by you'), '*'),
|
||||||
'$menu_desc' => array('menu_desc', t('Menu title'), '', t('Menu title as seen by others'), ''),
|
'$menu_desc' => array('menu_desc', t('Menu title'), '', t('Menu title as seen by others'), ''),
|
||||||
|
'$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), 0 , t('Menu may be used to store saved bookmarks'), ''),
|
||||||
'$submit' => t('Create')
|
'$submit' => t('Create')
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
@ -104,6 +107,7 @@ function menu_content(&$a) {
|
|||||||
'$editcontents' => t('Edit menu contents'),
|
'$editcontents' => t('Edit menu contents'),
|
||||||
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
|
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
|
||||||
'$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''),
|
'$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''),
|
||||||
|
'$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu may be used to store saved bookmarks'), ''),
|
||||||
'$submit' => t('Modify')
|
'$submit' => t('Modify')
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -919,19 +919,21 @@ function settings_content(&$a) {
|
|||||||
'$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''),
|
'$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''),
|
||||||
'$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''),
|
'$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''),
|
||||||
|
|
||||||
'$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel publishes adult content.')),
|
'$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel frequently or regularly publishes adult content. (Please tag any adult material and/or nudity with #NSFW)')),
|
||||||
|
|
||||||
'$h_prv' => t('Security and Privacy Settings'),
|
'$h_prv' => t('Security and Privacy Settings'),
|
||||||
|
|
||||||
'$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents showing if you are available for chat')),
|
'$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online')),
|
||||||
|
|
||||||
'$lbl_pmacro' => t('Quick Privacy Settings:'),
|
'$lbl_pmacro' => t('Simple Privacy Settings:'),
|
||||||
'$pmacro3' => t('Very Public - extremely permissive'),
|
'$pmacro3' => t('Very Public - <em>extremely permissive (should be used with caution)</em>'),
|
||||||
'$pmacro2' => t('Typical - default public, privacy when desired'),
|
'$pmacro2' => t('Typical - <em>default public, privacy when desired (similar to social network permissions but with improved privacy)</em>'),
|
||||||
'$pmacro1' => t('Private - default private, rarely open or public'),
|
'$pmacro1' => t('Private - <em>default private, never open or public</em>'),
|
||||||
'$pmacro0' => t('Blocked - default blocked to/from everybody'),
|
'$pmacro0' => t('Blocked - <em>default blocked to/from everybody</em>'),
|
||||||
'$permiss_arr' => $permiss,
|
'$permiss_arr' => $permiss,
|
||||||
|
|
||||||
|
'$lbl_p2macro' => t('Advanced Privacy Settings'),
|
||||||
|
|
||||||
'$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')),
|
'$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')),
|
||||||
'$permissions' => t('Default Post Permissions'),
|
'$permissions' => t('Default Post Permissions'),
|
||||||
'$permdesc' => t("\x28click to open/close\x29"),
|
'$permdesc' => t("\x28click to open/close\x29"),
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
.chatContainer {
|
#chatContainer {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatTopBar {
|
#chatTopBar {
|
||||||
float: left;
|
float: left;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
width: 650px;
|
width: 650px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatUsers {
|
#chatUsers {
|
||||||
float: right;
|
float: right;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #000;
|
border: 1px solid #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatBottomBar {
|
#chatBottomBar {
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
@ -135,3 +135,17 @@
|
|||||||
.contact-entry-end {
|
.contact-entry-end {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#abook-advanced-panel, #abook-advanced {
|
||||||
|
opacity: 0.3;
|
||||||
|
filter:alpha(opacity=30);
|
||||||
|
}
|
||||||
|
|
||||||
|
#abook-advanced-panel:hover, #abook-advanced:hover {
|
||||||
|
opacity: 1.0;
|
||||||
|
filter:alpha(opacity=100);
|
||||||
|
}
|
||||||
|
|
||||||
|
#abook-advanced {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
@ -1,3 +1,17 @@
|
|||||||
|
#settings-permissions-wrapper, #settings-perm-advanced {
|
||||||
|
opacity: 0.3;
|
||||||
|
filter:alpha(opacity=30);
|
||||||
|
}
|
||||||
|
|
||||||
|
#settings-permissions-wrapper:hover, #settings-perm-advanced:hover {
|
||||||
|
opacity: 1.0;
|
||||||
|
filter:alpha(opacity=100);
|
||||||
|
}
|
||||||
|
|
||||||
|
#settings-perm-advanced {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
#settings-permissions-wrapper .field {
|
#settings-permissions-wrapper .field {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
@ -74,9 +74,17 @@ function redbasic_form(&$a, $arr) {
|
|||||||
|
|
||||||
$nav_colours = array (
|
$nav_colours = array (
|
||||||
'' => t('Scheme Default'),
|
'' => t('Scheme Default'),
|
||||||
'red' => t('red'),
|
'red' => 'red',
|
||||||
'black' => t('black'),
|
'pink' => 'pink',
|
||||||
'silver' => t('silver'),
|
'green' => 'green',
|
||||||
|
'blue' => 'blue',
|
||||||
|
'purple' => 'purple',
|
||||||
|
'black' => 'black',
|
||||||
|
'orange' => 'orange',
|
||||||
|
'brown' => 'brown',
|
||||||
|
'grey' => 'grey',
|
||||||
|
'gold' => 'gold',
|
||||||
|
'silver' => t('silver'),
|
||||||
);
|
);
|
||||||
|
|
||||||
if(feature_enabled(local_user(),'expert'))
|
if(feature_enabled(local_user(),'expert'))
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
// Get the UID of the channel owner
|
|
||||||
|
if(! $a->install) {
|
||||||
|
// Get the UID of the channel owner
|
||||||
$uid = get_theme_uid();
|
$uid = get_theme_uid();
|
||||||
|
|
||||||
if($uid)
|
if($uid)
|
||||||
@ -32,6 +34,8 @@
|
|||||||
$top_photo=get_pconfig($uid,'redbasic','top_photo');
|
$top_photo=get_pconfig($uid,'redbasic','top_photo');
|
||||||
$reply_photo=get_pconfig($uid,'redbasic','reply_photo');
|
$reply_photo=get_pconfig($uid,'redbasic','reply_photo');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Now load the scheme. If a value is changed above, we'll keep the settings
|
// Now load the scheme. If a value is changed above, we'll keep the settings
|
||||||
// If not, we'll keep those defined by the schema
|
// If not, we'll keep those defined by the schema
|
||||||
// Setting $scheme to '' wasn't working for some reason, so we'll check it's
|
// Setting $scheme to '' wasn't working for some reason, so we'll check it's
|
||||||
@ -133,6 +137,38 @@
|
|||||||
$nav_bg_1 = $nav_bg_2 = $nav_bg_3 = $nav_bg_4 = "silver";
|
$nav_bg_1 = $nav_bg_2 = $nav_bg_3 = $nav_bg_4 = "silver";
|
||||||
$search_background = '#EEEEEE';
|
$search_background = '#EEEEEE';
|
||||||
}
|
}
|
||||||
|
if($nav_colour === "pink") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#FFC1CA";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#FFC1CA";
|
||||||
|
}
|
||||||
|
if($nav_colour === "green") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#5CD65C";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#5CD65C";
|
||||||
|
}
|
||||||
|
if($nav_colour === "blue") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#1872a2";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#1872a2";
|
||||||
|
}
|
||||||
|
if($nav_colour === "purple") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#551A8B";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#551A8B";
|
||||||
|
}
|
||||||
|
if($nav_colour === "orange") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#FF3D0D";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#FF3D0D";
|
||||||
|
}
|
||||||
|
if($nav_colour === "brown") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#330000";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#330000";
|
||||||
|
}
|
||||||
|
if($nav_colour === "grey") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#2e2f2e";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#2e2f2e";
|
||||||
|
}
|
||||||
|
if($nav_colour === "gold") {
|
||||||
|
$nav_bg_1 = $nav_bg_3 = "#FFAA00";
|
||||||
|
$nav_bg_2 = $nav_bg_4 = "#FFAA00";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Apply the settings
|
// Apply the settings
|
||||||
|
@ -31,18 +31,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>{{$permlbl}}</h3>
|
|
||||||
<div id="perm-desc" class="descriptive-text">{{$permnote}}</div>
|
|
||||||
|
|
||||||
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
|
|
||||||
<input type="hidden" name="contact_id" value="{{$contact_id}}">
|
|
||||||
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
|
|
||||||
|
|
||||||
{{if $noperms}}
|
|
||||||
<div id="noperm-msg" class="warning-text">{{$noperms}}</div>
|
|
||||||
<div id="noperm-text" class="descriptive-text">{{$noperm_desc}}</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
|
|
||||||
{{if $is_pending}}
|
{{if $is_pending}}
|
||||||
<div class="abook-pending-contact">
|
<div class="abook-pending-contact">
|
||||||
@ -50,8 +38,32 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $multiprofs }}
|
||||||
|
<div>
|
||||||
|
<h3>{{$lbl_vis1}}</h3>
|
||||||
|
<div>{{$lbl_vis2}}</div>
|
||||||
|
|
||||||
|
{{$profile_select}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<h3>{{$permlbl}}</h3>
|
||||||
|
<div id="perm-desc" class="descriptive-text">{{$permnote}}</div>
|
||||||
|
|
||||||
|
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
|
||||||
|
<input type="hidden" name="contact_id" value="{{$contact_id}}">
|
||||||
|
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
|
||||||
|
|
||||||
|
{{* {{if $noperms}}
|
||||||
|
<div id="noperm-msg" class="warning-text">{{$noperms}}</div>
|
||||||
|
<div id="noperm-text" class="descriptive-text">{{$noperm_desc}}</div>
|
||||||
|
{{/if}}
|
||||||
|
*}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<b>{{$quick}}</b>
|
<h3>{{$quick}}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{{if $self}}
|
{{if $self}}
|
||||||
<li><span class="fakelink" onclick="connectForum(); // $('#abook-edit-form').submit();">{{$forum}}</span></li>
|
<li><span class="fakelink" onclick="connectForum(); // $('#abook-edit-form').submit();">{{$forum}}</span></li>
|
||||||
@ -62,6 +74,9 @@
|
|||||||
<li><span class="fakelink" onclick="connectFollowOnly(); // $('#abook-edit-form').submit();">{{$follow}}</span></li>
|
<li><span class="fakelink" onclick="connectFollowOnly(); // $('#abook-edit-form').submit();">{{$follow}}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
|
||||||
|
|
||||||
|
|
||||||
<div id="abook-advanced" class="fakelink" onclick="openClose('abook-advanced-panel');">{{$advanced}}</div>
|
<div id="abook-advanced" class="fakelink" onclick="openClose('abook-advanced-panel');">{{$advanced}}</div>
|
||||||
|
|
||||||
<div id="abook-advanced-panel" style="display: block;">
|
<div id="abook-advanced-panel" style="display: block;">
|
||||||
@ -76,14 +91,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if $multiprofs }}
|
|
||||||
<div>
|
|
||||||
<h3>{{$lbl_vis1}}</h3>
|
|
||||||
<div>{{$lbl_vis2}}</div>
|
|
||||||
|
|
||||||
{{$profile_select}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
|
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ $('#chat-form').submit(function(ev) {
|
|||||||
|
|
||||||
function load_chats() {
|
function load_chats() {
|
||||||
|
|
||||||
$.get("chatsvc?f=&room_id=" + room_id + '&last=' + last_chat,function(data) {
|
$.get("chatsvc?f=&room_id=" + room_id + '&last=' + last_chat + ((stopped) ? '&stopped=1' : ''),function(data) {
|
||||||
if(data.success) {
|
if(data.success && (! stopped)) {
|
||||||
update_inroom(data.inroom);
|
update_inroom(data.inroom);
|
||||||
update_chats(data.chats);
|
update_chats(data.chats);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
{{include file="field_input.tpl" field=$menu_name}}
|
{{include file="field_input.tpl" field=$menu_name}}
|
||||||
{{include file="field_input.tpl" field=$menu_desc}}
|
{{include file="field_input.tpl" field=$menu_desc}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$menu_bookmark}}
|
||||||
<div class="menuedit-submit-wrapper" >
|
<div class="menuedit-submit-wrapper" >
|
||||||
<input type="submit" name="submit" class="menuedit-submit" value="{{$submit}}" />
|
<input type="submit" name="submit" class="menuedit-submit" value="{{$submit}}" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,15 +25,16 @@
|
|||||||
{{include file="field_checkbox.tpl" field=$hide_presence}}
|
{{include file="field_checkbox.tpl" field=$hide_presence}}
|
||||||
|
|
||||||
|
|
||||||
<div id="settings-privacy-macros">{{$lbl_pmacro}}</div>
|
<h3 id="settings-privacy-macros">{{$lbl_pmacro}}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" onclick="channel_privacy_macro(3); return false" id="settings_pmacro3">{{$pmacro3}}</a></li>
|
|
||||||
<li><a href="#" onclick="channel_privacy_macro(2); return false" id="settings_pmacro2">{{$pmacro2}}</a></li>
|
<li><a href="#" onclick="channel_privacy_macro(2); return false" id="settings_pmacro2">{{$pmacro2}}</a></li>
|
||||||
<li><a href="#" onclick="channel_privacy_macro(1); return false" id="settings_pmacro1">{{$pmacro1}}</a></li>
|
<li><a href="#" onclick="channel_privacy_macro(1); return false" id="settings_pmacro1">{{$pmacro1}}</a></li>
|
||||||
|
<li><a href="#" onclick="channel_privacy_macro(3); return false" id="settings_pmacro3">{{$pmacro3}}</a></li>
|
||||||
<li><a href="#" onclick="channel_privacy_macro(0); return false" id="settings_pmacro0">{{$pmacro0}}</a></li>
|
<li><a href="#" onclick="channel_privacy_macro(0); return false" id="settings_pmacro0">{{$pmacro0}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="settings-perm-advanced">{{$lbl_p2macro}}</h3>
|
||||||
|
|
||||||
<div id="settings-permissions-wrapper">
|
<div id="settings-permissions-wrapper">
|
||||||
{{foreach $permiss_arr as $permit}}
|
{{foreach $permiss_arr as $permit}}
|
||||||
|
Reference in New Issue
Block a user