From c1a633ddeede7fd2de1b1a186edcbb4222ed51ec Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 10 Aug 2013 16:28:05 +0100 Subject: Missing include for new_keypair --- include/account.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/account.php b/include/account.php index 6dfb5ae1e..ab442ab39 100644 --- a/include/account.php +++ b/include/account.php @@ -6,6 +6,7 @@ require_once('include/plugin.php'); require_once('include/text.php'); require_once('include/language.php'); require_once('include/datetime.php'); +require_once('include/crypto.php'); function check_account_email($email) { -- cgit v1.2.3 From 9f2b651491c464f783420a99b4a83fde63e0d044 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sun, 11 Aug 2013 00:21:56 +0100 Subject: How did that end up there? Move sample config to right place. --- doc/install/sample-lighttpd.conf | 85 ++++++++++++++++++++++++++++++++++++++++ sample-lighttpd.conf | 85 ---------------------------------------- 2 files changed, 85 insertions(+), 85 deletions(-) create mode 100644 doc/install/sample-lighttpd.conf delete mode 100644 sample-lighttpd.conf diff --git a/doc/install/sample-lighttpd.conf b/doc/install/sample-lighttpd.conf new file mode 100644 index 000000000..213719ac9 --- /dev/null +++ b/doc/install/sample-lighttpd.conf @@ -0,0 +1,85 @@ +# See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions + +### LOAD MODULES +server.modules = ( + "mod_access", + "mod_accesslog", + "mod_fastcgi", + "mod_redirect", + "mod_rewrite" +) + +### BASIC STUFF +server.port = 80 + +server.username = "http" + +server.groupname = "http" + +server.document-root = "/path/to/your/www/files" #adjust to your setup + +server.errorlog = "/var/log/lighttpd/error.log" + +accesslog.filename = "/var/log/lighttpd/access.log" + +### DISABLE DIR LISTING +dir-listing.activate = "disable" + +### DISABLE REJECT EXPECT HEADER +### (needed for curl POST requests - otherwise they fail with error 417) +server.reject-expect-100-with-417 = "disable" + +### DEFINE SUPPORTED INDEX FILENAMES +index-file.names = ( + "index.html", + "index.htm", + "index.php" +) + +### DEFINE SUPPORTED MIME TYPES +mimetype.assign = ( + ".html" => "text/html", + ".htm" => "text/html", + ".css" => "text/css", + ".txt" => "text/plain", + ".svg" => "image/svg+xml", + ".jpg" => "image/jpeg", + ".png" => "image/png" +) + +### DONT EVER SERVE FILES WITH EXTENSION +static-file.exclude-extensions = ( ".php" ) + +### PHP WITH PHP-FPM +### (needs php-fpm installed and running) +fastcgi.server = ( + ".php" => ( + "localhost" => ( + "socket" => "/run/php-fpm/php-fpm.sock", + "broken-scriptfilename" => "enable", + "allow-x-sendfile" => "enable" + ) + ) +) + +### ENABLE SSL +$SERVER["socket"] == ":443" { + ssl.engine = "enable" + ssl.ca-file = "/etc/lighttpd/certs/ca-certs.crt" #adjust to your needs + ssl.pemfile = "/etc/lighttpd/certs/red-ssl.crt" #adjust to your needs +} + +### RISTRICT ACCESS TO DIRECTORYS AND FILES +$HTTP["url"] =~ "\.(out|log|htaccess)$" { + url.access-deny = ("") +} + +$HTTP["url"] =~ "(^|/)\.git" { + url.access-deny = ("") +} + +### URL REWRITE RULES +url.rewrite-if-not-file = ( + "^\/([^\?]*)\?(.*)$" => "/index.php?q=$1&$2", + "^\/(.*)$" => "/index.php?q=$1" +) diff --git a/sample-lighttpd.conf b/sample-lighttpd.conf deleted file mode 100644 index 213719ac9..000000000 --- a/sample-lighttpd.conf +++ /dev/null @@ -1,85 +0,0 @@ -# See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions - -### LOAD MODULES -server.modules = ( - "mod_access", - "mod_accesslog", - "mod_fastcgi", - "mod_redirect", - "mod_rewrite" -) - -### BASIC STUFF -server.port = 80 - -server.username = "http" - -server.groupname = "http" - -server.document-root = "/path/to/your/www/files" #adjust to your setup - -server.errorlog = "/var/log/lighttpd/error.log" - -accesslog.filename = "/var/log/lighttpd/access.log" - -### DISABLE DIR LISTING -dir-listing.activate = "disable" - -### DISABLE REJECT EXPECT HEADER -### (needed for curl POST requests - otherwise they fail with error 417) -server.reject-expect-100-with-417 = "disable" - -### DEFINE SUPPORTED INDEX FILENAMES -index-file.names = ( - "index.html", - "index.htm", - "index.php" -) - -### DEFINE SUPPORTED MIME TYPES -mimetype.assign = ( - ".html" => "text/html", - ".htm" => "text/html", - ".css" => "text/css", - ".txt" => "text/plain", - ".svg" => "image/svg+xml", - ".jpg" => "image/jpeg", - ".png" => "image/png" -) - -### DONT EVER SERVE FILES WITH EXTENSION -static-file.exclude-extensions = ( ".php" ) - -### PHP WITH PHP-FPM -### (needs php-fpm installed and running) -fastcgi.server = ( - ".php" => ( - "localhost" => ( - "socket" => "/run/php-fpm/php-fpm.sock", - "broken-scriptfilename" => "enable", - "allow-x-sendfile" => "enable" - ) - ) -) - -### ENABLE SSL -$SERVER["socket"] == ":443" { - ssl.engine = "enable" - ssl.ca-file = "/etc/lighttpd/certs/ca-certs.crt" #adjust to your needs - ssl.pemfile = "/etc/lighttpd/certs/red-ssl.crt" #adjust to your needs -} - -### RISTRICT ACCESS TO DIRECTORYS AND FILES -$HTTP["url"] =~ "\.(out|log|htaccess)$" { - url.access-deny = ("") -} - -$HTTP["url"] =~ "(^|/)\.git" { - url.access-deny = ("") -} - -### URL REWRITE RULES -url.rewrite-if-not-file = ( - "^\/([^\?]*)\?(.*)$" => "/index.php?q=$1&$2", - "^\/(.*)$" => "/index.php?q=$1" -) -- cgit v1.2.3 From 94e589fee8fef5bc7937059c459564902a725c75 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr." Date: Sun, 11 Aug 2013 08:17:42 -0300 Subject: Update install.txt - fix shell command and path instruction - Fix chown with chmod - Fix path from view/smarty3 to view/tpl/smarty3 --- install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.txt b/install.txt index ecd0b190d..b25f22133 100644 --- a/install.txt +++ b/install.txt @@ -47,7 +47,7 @@ you might have trouble getting everything to work.] `mkdir view/tpl/smarty3` - `chown 777 view/smarty3` + `chmod 777 view/tpl/smarty3` - For installing addons -- cgit v1.2.3 From 5aa508dba77ed69e1aa8810623e75d15ad15c2ad Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 16:12:40 -0700 Subject: don't import any hubloc that doesn't have a sitekey. Eventually we should also verify that it is a valid key, as we've already seen one case where one character got mangled and messed up communication. --- include/zot.php | 9 +++++++-- version.inc | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/zot.php b/include/zot.php index d1bc03bc2..bddbc9bee 100644 --- a/include/zot.php +++ b/include/zot.php @@ -583,9 +583,14 @@ function import_xchan($arr) { intval(HUBLOC_FLAGS_PRIMARY), intval($r[0]['hubloc_id']) ); + update_modtime($xchan_hash); + $changed = true; } - update_modtime($xchan_hash); - $changed = true; + continue; + } + + if(! $location['sitekey']) { + logger('import_xchan: empty hubloc sitekey. ' . print_r($location,true)); continue; } diff --git a/version.inc b/version.inc index 82ebb3399..208912a37 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-08-09.400 +2013-08-11.402 -- cgit v1.2.3 From d7a9db10881b8d9de1b5f7e2a2dfae3df396fb45 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 16:56:06 -0700 Subject: important bits we need to allow php executable content. These must be explicitly allowed - but only if the account has ACCOUNT_ROLE_ALLOWCODE and *only* for web pages and profile fields. This content cannot be transmitted to other sites. --- boot.php | 4 ++-- include/items.php | 53 +++++++++++++++++++++++++++++++++++------------------ include/text.php | 16 ++++++++++++++++ 3 files changed, 53 insertions(+), 20 deletions(-) diff --git a/boot.php b/boot.php index 4868046c6..1fd0d2172 100755 --- a/boot.php +++ b/boot.php @@ -434,8 +434,8 @@ define ( 'ACCOUNT_PENDING', 0x0010 ); * Account roles */ -define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 ); - +define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 ); +define ( 'ACCOUNT_ROLE_ALLOWCODE', 0x0001 ); /** * Item visibility diff --git a/include/items.php b/include/items.php index e71fd0350..7662f7823 100755 --- a/include/items.php +++ b/include/items.php @@ -1342,7 +1342,7 @@ function encode_rel_links($links) { return xmlify($o); } -function item_store($arr,$force_parent = false) { +function item_store($arr,$allow_exec = false) { if(! $arr['uid']) { logger('item_store: no uid'); @@ -1357,6 +1357,13 @@ function item_store($arr,$force_parent = false) { unset($arr['parent']); $arr['mimetype'] = ((x($arr,'mimetype')) ? notags(trim($arr['mimetype'])) : 'text/bbcode'); + + if(($arr['mimetype'] == 'application/x-php') && (! $allow_exec)) { + logger('item_store: php mimetype but allow_exec is denied.'); + return 0; + } + + $arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : ''); $arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : ''); @@ -1369,7 +1376,7 @@ function item_store($arr,$force_parent = false) { // this is a bit messy - we really need an input filter chain that temporarily undoes obscuring - if($arr['mimetype'] != 'text/html') { + if($arr['mimetype'] != 'text/html' && $arr['mimetype'] != 'application/x-php') { if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false)) $arr['body'] = escape_tags($arr['body']); if((strpos($arr['title'],'<') !== false) || (strpos($arr['title'],'>') !== false)) @@ -1665,7 +1672,7 @@ function item_store($arr,$force_parent = false) { -function item_store_update($arr,$force_parent = false) { +function item_store_update($arr,$allow_exec = false) { if(! intval($arr['uid'])) { logger('item_store_update: no uid'); @@ -1696,24 +1703,35 @@ function item_store_update($arr,$force_parent = false) { $arr = $translate['item']; } + $arr['mimetype'] = ((x($arr,'mimetype')) ? notags(trim($arr['mimetype'])) : 'text/bbcode'); + + if(($arr['mimetype'] == 'application/x-php') && (! $allow_exec)) { + logger('item_store: php mimetype but allow_exec is denied.'); + return 0; + } + + // Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin. - if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false)) - $arr['body'] = escape_tags($arr['body']); + if($arr['mimetype'] != 'text/html' && $arr['mimetype'] != 'application/x-php') { - if((x($arr,'object')) && is_array($arr['object'])) { - activity_sanitise($arr['object']); - $arr['object'] = json_encode($arr['object']); - } + if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false)) + $arr['body'] = escape_tags($arr['body']); - if((x($arr,'target')) && is_array($arr['target'])) { - activity_sanitise($arr['target']); - $arr['target'] = json_encode($arr['target']); - } + if((x($arr,'object')) && is_array($arr['object'])) { + activity_sanitise($arr['object']); + $arr['object'] = json_encode($arr['object']); + } - if((x($arr,'attach')) && is_array($arr['attach'])) { - activity_sanitise($arr['attach']); - $arr['attach'] = json_encode($arr['attach']); + if((x($arr,'target')) && is_array($arr['target'])) { + activity_sanitise($arr['target']); + $arr['target'] = json_encode($arr['target']); + } + + if((x($arr,'attach')) && is_array($arr['attach'])) { + activity_sanitise($arr['attach']); + $arr['attach'] = json_encode($arr['attach']); + } } $orig = q("select * from item where id = %d and uid = %d limit 1", @@ -1740,7 +1758,6 @@ function item_store_update($arr,$force_parent = false) { $arr['commented'] = datetime_convert(); $arr['received'] = datetime_convert(); $arr['changed'] = datetime_convert(); - $arr['mimetype'] = ((x($arr,'mimetype')) ? notags(trim($arr['mimetype'])) : 'text/bbcode'); $arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : ''); $arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : ''); $arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : ''); @@ -2692,7 +2709,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) } } - $r = item_store($datarray,$force_parent); + $r = item_store($datarray); continue; } diff --git a/include/text.php b/include/text.php index 61b39cb59..99d5c9d78 100755 --- a/include/text.php +++ b/include/text.php @@ -1142,6 +1142,22 @@ function prepare_text($text,$content_type = 'text/bbcode') { $s = Markdown($text); break; + // No security checking is done here at display time - so we need to verify + // that the author is allowed to use PHP before storing. We also cannot allow + // importation of PHP text bodies from other sites. Therefore this content + // type is only valid for web pages (and profile details). + + // It may be possible to provide a PHP message body which is evaluated on the + // sender's site before sending it elsewhere. In that case we will have a + // different content-type here. + + case 'application/x-php': + ob_start(); + eval($text); + $s = ob_get_contents(); + ob_end_clean(); + break; + case 'text/bbcode': case '': default: -- cgit v1.2.3 From 6191cfef2adaa52019940cc448e28e2ad1a7ae6d Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 19:04:07 -0700 Subject: check these in so I can go back and find out why the stylsheet is horked --- boot.php | 6 +++++- include/menu.php | 40 ++++++++++++++++++++++++++++++++++++++++ install/database.sql | 6 +++++- install/update.php | 14 +++++++++++++- view/tpl/usermenu.tpl | 11 +++++++++++ 5 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 include/menu.php create mode 100644 view/tpl/usermenu.tpl diff --git a/boot.php b/boot.php index 1fd0d2172..02162bb6a 100755 --- a/boot.php +++ b/boot.php @@ -43,7 +43,7 @@ require_once('include/taxonomy.php'); define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1058 ); +define ( 'DB_UPDATE_VERSION', 1059 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -288,6 +288,10 @@ define ( 'ATTACH_FLAG_OS', 0x0002); +define ( 'MENU_ITEM_ZID', 0x0001); + + + /** * Maximum number of "people who like (or don't like) this" that we will list by name */ diff --git a/include/menu.php b/include/menu.php new file mode 100644 index 000000000..98c18a45b --- /dev/null +++ b/include/menu.php @@ -0,0 +1,40 @@ + $r[0], 'items' => $x ); + + + } + return null; +} + + +function menu_render($menu) { + if(! $menu) + return ''; + for($x = 0; $x < count($menu['items']); $x ++) + if($menu['items']['mitem_flags'] & MENU_ITEM_ZID) + $menu['items']['link'] = zid($menu['items']['link']); + + return replace_macros(get_markup_template('usermenu.tpl'),array( + '$menu' => $menu['menu'], + '$items' => $menu['items'] + )); +} diff --git a/install/database.sql b/install/database.sql index cd1c72ac6..0a86b8321 100644 --- a/install/database.sql +++ b/install/database.sql @@ -530,15 +530,18 @@ CREATE TABLE IF NOT EXISTS `manage` ( CREATE TABLE IF NOT EXISTS `menu` ( `menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `menu_channel_id` int(10) unsigned NOT NULL DEFAULT '0', + `menu_name` char(255) NOT NULL DEFAULT '', `menu_desc` char(255) NOT NULL DEFAULT '', PRIMARY KEY (`menu_id`), - KEY `menu_channel_id` (`menu_channel_id`) + KEY `menu_channel_id` (`menu_channel_id`), + KEY `menu_name` (`menu_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `menu_item` ( `mitem_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mitem_link` char(255) NOT NULL DEFAULT '', `mitem_desc` char(255) NOT NULL DEFAULT '', + `mitem_flags` int(11) NOT NULL DEFAULT '0', `allow_cid` mediumtext NOT NULL, `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, @@ -547,6 +550,7 @@ CREATE TABLE IF NOT EXISTS `menu_item` ( `mitem_menu_id` int(10) unsigned NOT NULL DEFAULT '0', `mitem_order` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`mitem_id`), + KEY `mitem_flags` (`mitem_flags`), KEY `mitem_channel_id` (`mitem_channel_id`), KEY `mitem_menu_id` (`mitem_menu_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/install/update.php b/install/update.php index c09bc9d64..c97b5619f 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ +
{{$menu.menu_desc}}
+{{if $items }} + +{{/if}} +
+ -- cgit v1.2.3 From 1600e72158500f002716057882762b0a375eef8f Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 19:20:05 -0700 Subject: debugging user menus --- include/menu.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/menu.php b/include/menu.php index 98c18a45b..783212a5b 100644 --- a/include/menu.php +++ b/include/menu.php @@ -4,7 +4,7 @@ require_once('include/security.php'); function menu_fetch($name,$uid,$observer_xchan) { - $sql_options = permission_sql($uid); + $sql_options = permissions_sql($uid); $r = q("select * from menu where menu_channel_id = %d and menu_name = '%s' limit 1", intval($uid), @@ -14,14 +14,12 @@ function menu_fetch($name,$uid,$observer_xchan) { $x = q("select * from menu_item where mitem_menu_id = %d and mitem_channel_id = %d $sql_options order by mitem_order asc, mitem_desc asc", - intval($x[0]['menu_id']), + intval($r[0]['menu_id']), intval($uid) ); - - $result = array('menu' => $r[0], 'items' => $x ); - - + return array('menu' => $r[0], 'items' => $x ); } + return null; } -- cgit v1.2.3 From 98c5bce56a1732e964fb2b3b39f89b1d3eadc696 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 21:18:32 -0700 Subject: more menu manage functions - should be everything we need to get started --- include/menu.php | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) diff --git a/include/menu.php b/include/menu.php index 783212a5b..ad9d3eb1c 100644 --- a/include/menu.php +++ b/include/menu.php @@ -36,3 +36,190 @@ function menu_render($menu) { '$items' => $menu['items'] )); } + + +function menu_create($arr) { + + + $menu_name = trim(escape_tags($arr['menu_name'])); + $menu_desc = trim(escape_tags($arr['menu_desc'])); + + if(! $menu_desc) + $menu_desc = $menu_name; + + if(! $menu_name) + return false; + + + $menu_channel_id = intval($arr['menu_channel_id']); + + $r = q("select * from menu where menu_name = '%s' and menu_channel_id = %d limit 1", + dbesc($menu_name), + intval($menu_channel_id) + ); + + if($r) + return false; + + $r = q("insert into menu ( menu_name, menu_desc, menu_channel_id ) + values( '%s', '%s', %d )", + dbesc($menu_name), + dbesc($menu_desc), + intval($menu_channel_id) + ); + if(! $r) + return false; + + $r = q("select menu_id from menu where menu_name = '%s' and menu_channel_id = %d limit 1", + dbesc($menu_name), + intval($menu_channel_id) + ); + if($r) + return $r[0]['menu_id']; + return false; + +} + + +function menu_edit($arr) { + + $menu_id = intval($arr['menu_id']); + + $menu_name = trim(escape_tags($arr['menu_name'])); + $menu_desc = trim(escape_tags($arr['menu_desc'])); + + if(! $menu_desc) + $menu_desc = $menu_name; + + if(! $menu_name) + return false; + + + $menu_channel_id = intval($arr['menu_channel_id']); + + $r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1", + intval($menu_id), + intval($menu_channel_id) + ); + if(! $r) { + logger('menu_edit: not found: ' . print_r($arr,true)); + return false; + } + + + $r = q("select * from menu where menu_name = '%s' and menu_channel_id = %d limit 1", + dbesc($menu_name), + intval($menu_channel_id) + ); + + if($r) + return false; + + return q("update menu set menu_name = '%s', menu_desc = '%s' + where menu_id = %d and menu_channel_id = %d limit 1", + dbesc($menu_name), + dbesc($menu_desc), + intval($menu_id), + intval($menu_channel_id) + ); +} + +function menu_delete($menu_name, $uid) { + $r = q("select menu_id from menu where menu_name = '%s' and menu_channel_id = %d limit 1", + dbesc($menu_name), + intval($uid) + ); + + if($r) + return menu_delete_id($r[0]['menu_id'],$uid); + return false; +} + +function menu_delete_id($menu_id, $uid) { + $r = q("select menu_id from menu where menu_id = %d and menu_channel_id = %d limit 1", + intval($menu_id), + intval($uid) + ); + if($r) { + $x = q("delete from menu_item where mitem_menu_id = %d and mitem_channel_id = %d", + intval($menu_id), + intval($uid) + ); + return q("delete from menu where menu_id = %d and menu_channel_id = %d limit 1", + intval($menu_id), + intval($uid) + ); + } + return false; +} + + +function menu_add_item($menu_id, $uid, $arr) { + + + $mitem_link = escape_tags($arr['mitem_link']); + $mitem_desc = escape_tags($arr['mitem_desc']); + $mitem_order = intval($arr['mitem_order']); + $mitem_flags = intval($arr['mitem_flags']); + $allow_cid = perms2str($arr['allow_cid']); + $allow_gid = perms2str($arr['allow_gid']); + $deny_cid = perms2str($arr['deny_cid']); + $deny_gid = perms2str($arr['deny_gid']); + + $r = q("insert into menu_item ( mitem_link, mitem_desc, mitem_flags, allow_cid, allow_gid, deny_cid, deny_gid, mitem_channel_id, mitem_menu_id, mitem_order ) values ( '%s', '%s', %d, '%s', '%s', '%s', '%s', %d, %d, %d ) ", + dbesc($mitem_link), + dbesc($mitem_desc), + intval($mitem_flags), + dbesc($allow_cid), + dbesc($allow_gid), + dbesc($deny_cid), + dbesc($deny_gid), + intval($uid), + intval($menu_id), + intval($mitem_order) + ); + return $r; + +} + +function menu_edit_item($menu_id, $uid, $arr) { + + + $mitem_id = intval($arr['mitem_id']); + $mitem_link = escape_tags($arr['mitem_link']); + $mitem_desc = escape_tags($arr['mitem_desc']); + $mitem_order = intval($arr['mitem_order']); + $mitem_flags = intval($arr['mitem_flags']); + $allow_cid = perms2str($arr['allow_cid']); + $allow_gid = perms2str($arr['allow_gid']); + $deny_cid = perms2str($arr['deny_cid']); + $deny_gid = perms2str($arr['deny_gid']); + + $r = q("update menu_item set mitem_link = '%s', mitem_desc = '%s', mitem_flags = %d, allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', mitem_order = %d where mitem_channel_id = %d and mitem_menu_id = %d and mitem_id = %d limit 1", + dbesc($mitem_link), + dbesc($mitem_desc), + intval($mitem_flags), + dbesc($allow_cid), + dbesc($allow_gid), + dbesc($deny_cid), + dbesc($deny_gid), + intval($mitem_order), + intval($uid), + intval($menu_id), + intval($mitem_id) + ); + return $r; +} + + + + +function menu_del_item($menu_id,$uid,$item_id) { + $r = q("delete from menu_item where mitem_menu_id = %d and mitem_channel_id = %d and mitem_id = %d limit 1", + intval($menu_id), + intval($uid), + intval($item_id) + ); + return $r; +} + -- cgit v1.2.3 From 95abc1600bd8bea80a6307bb1375ed343f9b839b Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Aug 2013 01:01:28 -0700 Subject: theme personal menus so they look more or less like widgets --- version.inc | 2 +- view/theme/redbasic/css/style.css | 10 +++++++++- view/tpl/usermenu.tpl | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/version.inc b/version.inc index 208912a37..d95786ab1 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-08-11.402 +2013-08-12.403 diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 8d33913c4..9687443df 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2065,7 +2065,7 @@ aside input[type='text'] { width: 174px; } -.widget { +.widget, .pmenu { border-bottom: 1px solid #eec; padding: 8px; margin-top: 5px; @@ -3586,3 +3586,11 @@ margin-right: auto; div.page-list-item { margin: 20px; } + +.pmenu ul { + list-style-type: none; +} + +.pmenu li { + margin-left: -20px; +} \ No newline at end of file diff --git a/view/tpl/usermenu.tpl b/view/tpl/usermenu.tpl index 1eb3f9127..771ae4b2a 100644 --- a/view/tpl/usermenu.tpl +++ b/view/tpl/usermenu.tpl @@ -1,5 +1,7 @@
-
{{$menu.menu_desc}}
+{{if $menu.menu_desc}} +

{{$menu.menu_desc}}

+{{/if}} {{if $items }}
    {{foreach $items as $mitem }} -- cgit v1.2.3 From a7803a8eafa19664e08587596dcebeef7c63b84d Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Aug 2013 03:10:34 -0700 Subject: menu module --- mod/menu.php | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 mod/menu.php diff --git a/mod/menu.php b/mod/menu.php new file mode 100644 index 000000000..aeb885f7d --- /dev/null +++ b/mod/menu.php @@ -0,0 +1,96 @@ +get_channel(); + $menu_id = ((argc() > 1) ? intval(argv(1)) : 0); + + + + $menu_name = (($_REQUEST['menu_name']) ? $_REQUEST['menu_name'] : ''); + $menu_desc = (($_REQUEST['menu_desc']) ? $_REQUEST['menu_desc'] : ''); + + + $mitem_link = (($_REQUEST['mitem_link']) ? $_REQUEST['menu_link'] : ''); + $mitem_desc = (($_REQUEST['mitem_desc']) ? $_REQUEST['mitem_desc'] : ''); + $mitem_order = (($_REQUEST['mitem_order']) ? intval($_REQUEST['mitem_order']) : 0); + $mitem_id = (($_REQUEST['mitem_id']) ? intval($_REQUEST['mitem_id']) : 0); + + $mitem_flags = (($_REQUEST['mitem_zid']) ? MENU_ITEM_ZID : 0); + + + if ((! $_REQUEST['contact_allow']) + && (! $_REQUEST['group_allow']) + && (! $_REQUEST['contact_deny']) + && (! $_REQUEST['group_deny'])) { + $str_group_allow = $channel['channel_allow_gid']; + $str_contact_allow = $channel['channel_allow_cid']; + $str_group_deny = $channel['channel_deny_gid']; + $str_contact_deny = $channel['channel_deny_cid']; + } + else { + + // use the posted permissions + + $str_group_allow = perms2str($_REQUEST['group_allow']); + $str_contact_allow = perms2str($_REQUEST['contact_allow']); + $str_group_deny = perms2str($_REQUEST['group_deny']); + $str_contact_deny = perms2str($_REQUEST['contact_deny']); + } + + + +} + + +function menu_content(&$a) { + + if(! local_user()) { + notice( t('Permission denied.') . EOL); + return ''; + } + + + if(argc() == 1) { + // list menus + + } + + + if(argc() > 1) { + if(argv(1) === 'new') { + // new menu + + + + } + + elseif(intval(argv(1))) { + if(argc() == 3 && argv(2) == 'drop') { + $r = menu_delete_id(intval(argv(1)),local_user()); + if($r) + info( t('Menu deleted.') . EOL); + else + notice( t('Menu could not be deleted.'). EOL); + + goaway(z_root() . '/menu'); + } + else { + // edit menu + + + } + } + + } + +} -- cgit v1.2.3 From 28a8b821b0586ec430a554c520bc079f9d4dc63f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Aug 2013 03:25:37 -0700 Subject: add mod_mitem to manage menu items --- mod/menu.php | 35 ---------------------- mod/mitem.php | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 35 deletions(-) create mode 100644 mod/mitem.php diff --git a/mod/menu.php b/mod/menu.php index aeb885f7d..3198027f4 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -2,10 +2,6 @@ require_once('include/menu.php'); -// probably should split this into two modules - with this being the CRUD module for menu -// and mod_mitem to do the same for menu_items -// Currently this file has pieces of both - function menu_post(&$a) { if(! local_user()) @@ -14,41 +10,10 @@ function menu_post(&$a) { $channel = $a->get_channel(); $menu_id = ((argc() > 1) ? intval(argv(1)) : 0); - - $menu_name = (($_REQUEST['menu_name']) ? $_REQUEST['menu_name'] : ''); $menu_desc = (($_REQUEST['menu_desc']) ? $_REQUEST['menu_desc'] : ''); - $mitem_link = (($_REQUEST['mitem_link']) ? $_REQUEST['menu_link'] : ''); - $mitem_desc = (($_REQUEST['mitem_desc']) ? $_REQUEST['mitem_desc'] : ''); - $mitem_order = (($_REQUEST['mitem_order']) ? intval($_REQUEST['mitem_order']) : 0); - $mitem_id = (($_REQUEST['mitem_id']) ? intval($_REQUEST['mitem_id']) : 0); - - $mitem_flags = (($_REQUEST['mitem_zid']) ? MENU_ITEM_ZID : 0); - - - if ((! $_REQUEST['contact_allow']) - && (! $_REQUEST['group_allow']) - && (! $_REQUEST['contact_deny']) - && (! $_REQUEST['group_deny'])) { - $str_group_allow = $channel['channel_allow_gid']; - $str_contact_allow = $channel['channel_allow_cid']; - $str_group_deny = $channel['channel_deny_gid']; - $str_contact_deny = $channel['channel_deny_cid']; - } - else { - - // use the posted permissions - - $str_group_allow = perms2str($_REQUEST['group_allow']); - $str_contact_allow = perms2str($_REQUEST['contact_allow']); - $str_group_deny = perms2str($_REQUEST['group_deny']); - $str_contact_deny = perms2str($_REQUEST['contact_deny']); - } - - - } diff --git a/mod/mitem.php b/mod/mitem.php new file mode 100644 index 000000000..b2ccaa341 --- /dev/null +++ b/mod/mitem.php @@ -0,0 +1,95 @@ +get_channel(); + $mitem_id = ((argc() > 1) ? intval(argv(1)) : 0); + + $mitem_link = (($_REQUEST['mitem_link']) ? $_REQUEST['menu_link'] : ''); + $mitem_desc = (($_REQUEST['mitem_desc']) ? $_REQUEST['mitem_desc'] : ''); + $mitem_order = (($_REQUEST['mitem_order']) ? intval($_REQUEST['mitem_order']) : 0); + $mitem_id = (($_REQUEST['mitem_id']) ? intval($_REQUEST['mitem_id']) : 0); + + $mitem_flags = (($_REQUEST['mitem_zid']) ? MENU_ITEM_ZID : 0); + + + if ((! $_REQUEST['contact_allow']) + && (! $_REQUEST['group_allow']) + && (! $_REQUEST['contact_deny']) + && (! $_REQUEST['group_deny'])) { + $str_group_allow = $channel['channel_allow_gid']; + $str_contact_allow = $channel['channel_allow_cid']; + $str_group_deny = $channel['channel_deny_gid']; + $str_contact_deny = $channel['channel_deny_cid']; + } + else { + + // use the posted permissions + + $str_group_allow = perms2str($_REQUEST['group_allow']); + $str_contact_allow = perms2str($_REQUEST['contact_allow']); + $str_group_deny = perms2str($_REQUEST['group_deny']); + $str_contact_deny = perms2str($_REQUEST['contact_deny']); + } + +} + + +function mitem_content(&$a) { + + if(! local_user()) { + notice( t('Permission denied.') . EOL); + return ''; + } + + + if(argc() == 1) { + // list menus + + } + + + if(argc() > 1) { + if(argv(1) === 'new') { + // new menu + + + + } + + elseif(intval(argv(1))) { + $m = q("select * from menu_item where mitem_id = %d and mitem_channel_id = %d limit 1", + intval(argv(1)), + intval(local_user()) + ); + if(! $m) { + notice( t('Menu item not found.') . EOL); + goaway(z_root() . '/menu'); + } + + $mitem = $m[0]; + if(argc() == 3 && argv(2) == 'drop') { + $r = menu_del_item($mitem['mitem_menu_id'], local_user(),intval(argv(1))); + if($r) + info( t('Menu item deleted.') . EOL); + else + notice( t('Menu item could not be deleted.'). EOL); + + goaway(z_root() . '/menu'); + } + else { + // edit menu item + + + } + } + + } + + + + +} -- cgit v1.2.3 From f6ec3b591291aee2531ff84bd466b9f26e669337 Mon Sep 17 00:00:00 2001 From: pixelroot Date: Mon, 12 Aug 2013 14:46:08 +0200 Subject: modified: view/ru/messages.po --- view/ru/messages.po | 610 +++++++++++++++++++++++++++------------------------- 1 file changed, 313 insertions(+), 297 deletions(-) diff --git a/view/ru/messages.po b/view/ru/messages.po index 2121278e2..d89794ee1 100644 --- a/view/ru/messages.po +++ b/view/ru/messages.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: Red Matrix\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-09 00:02-0700\n" -"PO-Revision-Date: 2013-08-09 10:01+0000\n" +"POT-Creation-Date: 2013-08-09 03:55-0700\n" +"PO-Revision-Date: 2013-08-12 12:42+0000\n" "Last-Translator: alexej \n" "Language-Team: Russian (http://www.transifex.com/projects/p/red-matrix/language/ru/)\n" "MIME-Version: 1.0\n" @@ -129,7 +129,7 @@ msgstr "" #: ../../include/enotify.php:232 #, php-format msgid "Please visit %s to view and/or reply to the conversation." -msgstr "" +msgstr "Пожалуйста, посетите %s для просмотра и/или ответа разговора." #: ../../include/enotify.php:165 #, php-format @@ -149,66 +149,66 @@ msgstr "" #: ../../include/enotify.php:195 #, php-format msgid "[Red:Notify] %s tagged you" -msgstr "" +msgstr "[Red:Уведомление] %s добавил у вас тег" #: ../../include/enotify.php:196 #, php-format msgid "%1$s tagged you at %2$s" -msgstr "" +msgstr "%1$s добавил у вас тег в %2$s" #: ../../include/enotify.php:197 #, php-format msgid "%1$s [zrl=%2$s]tagged you[/zrl]." -msgstr "" +msgstr "%1$s [zrl=%2$s]добавил у вас тег[/zrl]." #: ../../include/enotify.php:209 #, php-format msgid "[Red:Notify] %1$s poked you" -msgstr "" +msgstr "[Red:Уведомление] %1$s подпихнул вас" #: ../../include/enotify.php:210 #, php-format msgid "%1$s poked you at %2$s" -msgstr "" +msgstr "%1$s подпихнул вас в %2$s" #: ../../include/enotify.php:211 #, php-format msgid "%1$s [zrl=%2$s]poked you[/zrl]." -msgstr "" +msgstr "%1$s [zrl=%2$s]подпихнул вас[/zrl]." #: ../../include/enotify.php:226 #, php-format msgid "[Red:Notify] %s tagged your post" -msgstr "" +msgstr "[Red:Уведомление] %s добавил у вас в сообщении тег" #: ../../include/enotify.php:227 #, php-format msgid "%1$s tagged your post at %2$s" -msgstr "" +msgstr "%1$s добавил у вас в сообщении тег %2$s" #: ../../include/enotify.php:228 #, php-format msgid "%1$s tagged [zrl=%2$s]your post[/zrl]" -msgstr "" +msgstr "%1$s добавил тег [zrl=%2$s] у вас в сообщении[/zrl]" #: ../../include/enotify.php:239 msgid "[Red:Notify] Introduction received" -msgstr "" +msgstr "[Red:Уведомление] введение получено" #: ../../include/enotify.php:240 #, php-format msgid "You've received an introduction from '%1$s' at %2$s" -msgstr "" +msgstr "Вы получили введение от '%1$s' at %2$s" #: ../../include/enotify.php:241 #, php-format msgid "You've received [zrl=%1$s]an introduction[/zrl] from %2$s." -msgstr "" +msgstr "Вы получили [zrl=%1$s]введение[/zrl] от %2$s." #: ../../include/enotify.php:244 ../../include/enotify.php:262 #, php-format msgid "You may visit their profile at %s" -msgstr "" +msgstr "Вы можете посетить ​​профиль в %s" #: ../../include/enotify.php:246 #, php-format @@ -217,12 +217,12 @@ msgstr "" #: ../../include/enotify.php:253 msgid "[Red:Notify] Friend suggestion received" -msgstr "" +msgstr "[Red:Уведомление] Получено предложение дружить" #: ../../include/enotify.php:254 #, php-format msgid "You've received a friend suggestion from '%1$s' at %2$s" -msgstr "" +msgstr "Вы получили предложение дружить с '%1$s' от %2$s" #: ../../include/enotify.php:255 #, php-format @@ -259,7 +259,7 @@ msgstr "" #: ../../include/Contact.php:430 ../../include/conversation.php:887 msgid "Poke" -msgstr "" +msgstr "Подпихнуть" #: ../../include/Contact.php:431 ../../include/conversation.php:881 msgid "View Status" @@ -281,11 +281,11 @@ msgstr "Сообщения сети" #: ../../include/Contact.php:435 ../../include/conversation.php:885 msgid "Edit Contact" -msgstr "Редактировать контакт" +msgstr "Редактировать канал" #: ../../include/Contact.php:436 ../../include/conversation.php:886 msgid "Send PM" -msgstr "Отправить PM" +msgstr "Отправить личное сообщение" #: ../../include/contact_selectors.php:30 msgid "Unknown | Not categorised" @@ -309,7 +309,7 @@ msgstr "OK, наверное безвредно" #: ../../include/contact_selectors.php:35 msgid "Reputable, has my trust" -msgstr "" +msgstr "Авторитетно, имеет мое доверие" #: ../../include/contact_selectors.php:54 msgid "Frequently" @@ -347,8 +347,8 @@ msgstr "OStatus" msgid "RSS/Atom" msgstr "RSS/Atom" -#: ../../include/contact_selectors.php:77 ../../mod/admin.php:626 -#: ../../mod/admin.php:635 ../../boot.php:1364 +#: ../../include/contact_selectors.php:77 ../../mod/admin.php:636 +#: ../../mod/admin.php:645 ../../boot.php:1364 msgid "Email" msgstr "E-mail" @@ -378,7 +378,7 @@ msgstr "MySpace" #: ../../include/contact_widgets.php:6 msgid "Add New Connection" -msgstr "Добавить новый контакт" +msgstr "Добавить новый канал" #: ../../include/contact_widgets.php:7 msgid "Enter the channel address" @@ -419,7 +419,7 @@ msgstr "Поиск" #: ../../include/contact_widgets.php:34 ../../mod/suggest.php:64 msgid "Channel Suggestions" -msgstr "Рекомендации контактов" +msgstr "Рекомендации каналов" #: ../../include/contact_widgets.php:35 msgid "Similar Interests" @@ -449,9 +449,9 @@ msgstr "Категории" #, php-format msgid "%d connection in common" msgid_plural "%d connections in common" -msgstr[0] "%d совместная связь" -msgstr[1] "%d совместные связи" -msgstr[2] "%d совместные контакты" +msgstr[0] "%d совместный канал" +msgstr[1] "%d совместных канала" +msgstr[2] "%d совместных каналов" #: ../../include/contact_widgets.php:126 ../../include/js_strings.php:7 #: ../../include/ItemObject.php:255 @@ -720,7 +720,7 @@ msgstr "" #: ../../include/features.php:59 msgid "Dislike Posts" -msgstr "" +msgstr "Сообщение не нравится" #: ../../include/features.php:59 msgid "Ability to dislike posts/comments" @@ -809,11 +809,11 @@ msgstr "все" #: ../../include/js_strings.php:13 msgid "timeago.prefixAgo" -msgstr "" +msgstr "timeago.prefixAgo" #: ../../include/js_strings.php:14 msgid "timeago.suffixAgo" -msgstr "" +msgstr "timeago.suffixAgo" #: ../../include/js_strings.php:15 msgid "ago" @@ -874,7 +874,7 @@ msgstr "%d лет" #: ../../include/js_strings.php:29 msgid "timeago.numbers" -msgstr "" +msgstr "timeago.numbers" #: ../../include/message.php:17 msgid "No recipient provided." @@ -986,7 +986,7 @@ msgstr "Что вам не нравится:" #: ../../include/profile_advanced.php:67 msgid "Contact information and Social Networks:" -msgstr "Контактная информация и социальные сети:" +msgstr "Информация и социальные сети канала:" #: ../../include/profile_advanced.php:69 msgid "Musical interests:" @@ -1045,7 +1045,7 @@ msgstr "Закончить эту сессию" #: ../../include/nav.php:74 ../../include/nav.php:116 #: ../../include/nav.php:148 msgid "Home" -msgstr "Моя страница" +msgstr "Мой канал" #: ../../include/nav.php:74 ../../include/nav.php:148 msgid "Your posts and conversations" @@ -1159,11 +1159,11 @@ msgstr "Пометить все оповещения канала как про #: ../../include/nav.php:153 msgid "Intros" -msgstr "Контакты" +msgstr "Каналы" #: ../../include/nav.php:153 ../../mod/connections.php:544 msgid "New Connections" -msgstr "Новые контакты" +msgstr "Новые каналы" #: ../../include/nav.php:154 msgid "See all channel introductions" @@ -1238,7 +1238,7 @@ msgid "Manage Your Channels" msgstr "Управление каналов" #: ../../include/nav.php:175 ../../mod/settings.php:107 -#: ../../mod/admin.php:718 ../../mod/admin.php:923 +#: ../../mod/admin.php:728 ../../mod/admin.php:933 msgid "Settings" msgstr "Настройки" @@ -1248,7 +1248,7 @@ msgstr "Настройки аккаунта/канала" #: ../../include/nav.php:177 ../../mod/connections.php:650 msgid "Connections" -msgstr "Контакты" +msgstr "Связи" #: ../../include/nav.php:177 msgid "Manage/Edit Friends and Connections" @@ -1305,7 +1305,7 @@ msgstr "" #: ../../mod/new_channel.php:97 ../../mod/manage.php:6 #: ../../mod/crepair.php:115 ../../mod/nogroup.php:25 #: ../../mod/profile_photo.php:197 ../../mod/profile_photo.php:210 -#: ../../mod/editwebpage.php:42 ../../mod/notifications.php:66 +#: ../../mod/editwebpage.php:48 ../../mod/notifications.php:66 #: ../../mod/editpost.php:11 ../../mod/poke.php:128 ../../mod/channel.php:115 #: ../../mod/fsuggest.php:78 ../../mod/suggest.php:32 #: ../../mod/register.php:60 ../../mod/regmod.php:18 ../../mod/mood.php:112 @@ -1483,7 +1483,7 @@ msgstr "Неверный" msgid "Sex Addict" msgstr "Секс наркоман" -#: ../../include/profile_selectors.php:42 ../../include/identity.php:233 +#: ../../include/profile_selectors.php:42 ../../include/identity.php:224 #: ../../mod/network.php:381 ../../mod/connections.php:367 msgid "Friends" msgstr "Друзья" @@ -1578,59 +1578,59 @@ msgstr "Не действительный адрес электронной по #: ../../include/account.php:24 msgid "Your email domain is not among those allowed on this site" -msgstr "" +msgstr "Домен электронной почты не входит в число тех, которые разрешены на этом сайте" #: ../../include/account.php:30 msgid "Your email address is already registered at this site." -msgstr "" +msgstr "Ваш адрес электронной почты уже зарегистрирован на этом сайте." #: ../../include/account.php:63 msgid "An invitation is required." -msgstr "" +msgstr "Требуется приглашение." #: ../../include/account.php:67 msgid "Invitation could not be verified." -msgstr "" +msgstr "Не удалось проверить приглашение." #: ../../include/account.php:117 msgid "Please enter the required information." -msgstr "" +msgstr "Пожалуйста, введите необходимую информацию." -#: ../../include/account.php:178 +#: ../../include/account.php:185 msgid "Failed to store account information." -msgstr "" +msgstr "Не удалось сохранить информацию аккаунта." -#: ../../include/account.php:264 +#: ../../include/account.php:271 #, php-format msgid "Registration request at %s" msgstr "Требуется регистрация на %s" -#: ../../include/account.php:266 ../../include/account.php:293 -#: ../../include/account.php:350 ../../boot.php:1202 +#: ../../include/account.php:273 ../../include/account.php:300 +#: ../../include/account.php:357 ../../boot.php:1202 msgid "Administrator" msgstr "Администратор" -#: ../../include/account.php:288 +#: ../../include/account.php:295 msgid "your registration password" msgstr "Ваш пароль регистрации" -#: ../../include/account.php:291 ../../include/account.php:348 +#: ../../include/account.php:298 ../../include/account.php:355 #, php-format msgid "Registration details for %s" msgstr "Регистрационные данные для %s" -#: ../../include/account.php:357 +#: ../../include/account.php:364 msgid "Account approved." msgstr "Аккаунт утвержден." -#: ../../include/account.php:391 +#: ../../include/account.php:398 #, php-format msgid "Registration revoked for %s" msgstr "Регистрация отозвана для %s" #: ../../include/identity.php:14 msgid "Unable to obtain identity information from database" -msgstr "" +msgstr "Невозможно получить идентификационную информацию из базы данных" #: ../../include/identity.php:36 msgid "Empty name" @@ -1647,13 +1647,13 @@ msgstr "идентификатор аккаунта отсутствует" #: ../../include/identity.php:95 msgid "" "Nickname has unsupported characters or is already being used on this site." -msgstr "" +msgstr "Псевдоним имеет недопустимые символы или уже используется на этом сайте." #: ../../include/identity.php:143 msgid "Unable to retrieve created identity" msgstr "" -#: ../../include/identity.php:208 +#: ../../include/identity.php:199 msgid "Default Profile" msgstr "Профиль по умолчанию" @@ -1708,19 +1708,19 @@ msgstr "новее" #: ../../include/text.php:620 msgid "No connections" -msgstr "Нет контактов" +msgstr "Нет каналов" #: ../../include/text.php:631 #, php-format msgid "%d Connection" msgid_plural "%d Connections" -msgstr[0] "%d Связи" -msgstr[1] "%d Связи" -msgstr[2] "%d Контактов" +msgstr[0] "%d канал" +msgstr[1] "%d канала" +msgstr[2] "%d каналов" #: ../../include/text.php:643 msgid "View Connections" -msgstr "Просмотр контактов" +msgstr "Просмотр каналов" #: ../../include/text.php:704 ../../mod/filer.php:36 msgid "Save" @@ -1728,11 +1728,11 @@ msgstr "Запомнить" #: ../../include/text.php:742 msgid "poke" -msgstr "" +msgstr "подпихнуть" #: ../../include/text.php:742 ../../include/conversation.php:227 msgid "poked" -msgstr "" +msgstr "подпихнул" #: ../../include/text.php:743 msgid "ping" @@ -2118,19 +2118,19 @@ msgstr "Тэги" #: ../../include/taxonomy.php:187 msgid "have" -msgstr "" +msgstr "иметь" #: ../../include/taxonomy.php:187 msgid "has" -msgstr "" +msgstr "есть" #: ../../include/taxonomy.php:188 msgid "want" -msgstr "" +msgstr "хотеть" #: ../../include/taxonomy.php:188 msgid "wants" -msgstr "" +msgstr "хочет" #: ../../include/taxonomy.php:189 ../../include/ItemObject.php:165 msgid "like" @@ -2150,7 +2150,7 @@ msgstr "мне не-нравиться" #: ../../include/attach.php:184 ../../include/attach.php:232 msgid "Item was not found." -msgstr "" +msgstr "Элемент не найден." #: ../../include/attach.php:285 msgid "No source file." @@ -2167,11 +2167,11 @@ msgstr "Не удается найти файл для пересмотра / о #: ../../include/attach.php:331 #, php-format msgid "File exceeds size limit of %d" -msgstr "" +msgstr "Файл превышает предельный размер %d" #: ../../include/attach.php:424 msgid "File upload failed. Possible system limit or action terminated." -msgstr "" +msgstr "Загрузка файла не удалась. Возможно система перегружена или попытка прекращена." #: ../../include/attach.php:436 msgid "Stored file could not be verified. Upload failed." @@ -2186,14 +2186,14 @@ msgid "Private Message" msgstr "Личное сообщение" #: ../../include/ItemObject.php:92 ../../mod/webpages.php:68 -#: ../../mod/settings.php:670 ../../mod/editwebpage.php:97 +#: ../../mod/settings.php:670 ../../mod/editwebpage.php:103 #: ../../mod/editpost.php:76 msgid "Edit" msgstr "Редактировать" #: ../../include/ItemObject.php:104 ../../include/conversation.php:613 #: ../../mod/settings.php:671 ../../mod/group.php:182 -#: ../../mod/photos.php:1162 ../../mod/admin.php:630 +#: ../../mod/photos.php:1162 ../../mod/admin.php:640 #: ../../mod/connections.php:334 msgid "Delete" msgstr "Удалить" @@ -2216,7 +2216,7 @@ msgstr "удалить маркировку" #: ../../include/ItemObject.php:144 msgid "toggle star status" -msgstr "" +msgstr "переключение статуса маркировки" #: ../../include/ItemObject.php:148 msgid "starred" @@ -2228,11 +2228,11 @@ msgstr "добавить тег" #: ../../include/ItemObject.php:165 ../../mod/photos.php:1049 msgid "I like this (toggle)" -msgstr "" +msgstr "мне это нравится (переключение)" #: ../../include/ItemObject.php:166 ../../mod/photos.php:1050 msgid "I don't like this (toggle)" -msgstr "" +msgstr "мне это не нравится (переключение)" #: ../../include/ItemObject.php:168 msgid "Share this" @@ -2267,7 +2267,7 @@ msgstr " от %s" #: ../../include/ItemObject.php:233 ../../include/conversation.php:678 #: ../../include/conversation.php:1034 ../../mod/photos.php:1052 #: ../../mod/message.php:297 ../../mod/message.php:430 -#: ../../mod/editwebpage.php:106 ../../mod/editpost.php:85 +#: ../../mod/editwebpage.php:112 ../../mod/editpost.php:85 msgid "Please wait" msgstr "Подождите пожалуйста" @@ -2276,8 +2276,8 @@ msgstr "Подождите пожалуйста" msgid "%d comment" msgid_plural "%d comments" msgstr[0] "%d комментарий" -msgstr[1] "%d комментариев" -msgstr[2] "%d комментария" +msgstr[1] "%d комментария" +msgstr[2] "%d комментариев" #: ../../include/ItemObject.php:502 ../../mod/photos.php:1067 #: ../../mod/photos.php:1105 ../../mod/photos.php:1132 @@ -2293,8 +2293,8 @@ msgstr "Это вы" #: ../../mod/photos.php:769 ../../mod/photos.php:1031 #: ../../mod/photos.php:1070 ../../mod/photos.php:1108 #: ../../mod/photos.php:1135 ../../mod/message.php:298 -#: ../../mod/message.php:429 ../../mod/admin.php:400 ../../mod/admin.php:623 -#: ../../mod/admin.php:759 ../../mod/admin.php:958 ../../mod/admin.php:1045 +#: ../../mod/message.php:429 ../../mod/admin.php:409 ../../mod/admin.php:633 +#: ../../mod/admin.php:769 ../../mod/admin.php:968 ../../mod/admin.php:1055 #: ../../mod/connections.php:411 ../../mod/profiles.php:529 #: ../../mod/import.php:356 ../../mod/crepair.php:166 ../../mod/poke.php:166 #: ../../mod/fsuggest.php:108 ../../mod/mood.php:135 @@ -2337,7 +2337,7 @@ msgid "Video" msgstr "Видео" #: ../../include/ItemObject.php:514 ../../include/conversation.php:1052 -#: ../../mod/photos.php:1071 ../../mod/editwebpage.php:126 +#: ../../mod/photos.php:1071 ../../mod/editwebpage.php:132 #: ../../mod/editpost.php:105 msgid "Preview" msgstr "Предварительный просмотр" @@ -2349,32 +2349,32 @@ msgstr "канал" #: ../../include/conversation.php:155 ../../mod/like.php:133 #, php-format msgid "%1$s likes %2$s's %3$s" -msgstr "" +msgstr "%1$s нравится %2$s's %3$s" #: ../../include/conversation.php:158 ../../mod/like.php:135 #, php-format msgid "%1$s doesn't like %2$s's %3$s" -msgstr "" +msgstr "%1$s не нравится %2$s's %3$s" #: ../../include/conversation.php:192 #, php-format msgid "%1$s is now connected with %2$s" -msgstr "" +msgstr "%1$s теперь соединен с %2$s" #: ../../include/conversation.php:223 #, php-format msgid "%1$s poked %2$s" -msgstr "" +msgstr "%1$s подпихнул %2$s" #: ../../include/conversation.php:245 ../../mod/mood.php:63 #, php-format msgid "%1$s is currently %2$s" -msgstr "" +msgstr "%1$s в настоящее время %2$s" #: ../../include/conversation.php:637 #, php-format msgid "View %s's profile @ %s" -msgstr "" +msgstr "Просмотр %s's профиля @ %s" #: ../../include/conversation.php:676 msgid "View in context" @@ -2419,7 +2419,7 @@ msgstr "и" #: ../../include/conversation.php:964 #, php-format msgid ", and %d other people" -msgstr "" +msgstr ", и %d другие люди" #: ../../include/conversation.php:965 #, php-format @@ -2469,7 +2469,7 @@ msgid "Page link title" msgstr "Ссылка заголовока страницы" #: ../../include/conversation.php:1015 ../../mod/message.php:295 -#: ../../mod/message.php:427 ../../mod/editwebpage.php:98 +#: ../../mod/message.php:427 ../../mod/editwebpage.php:104 #: ../../mod/editpost.php:77 msgid "Upload photo" msgstr "Загрузить фотографию" @@ -2478,7 +2478,7 @@ msgstr "Загрузить фотографию" msgid "upload photo" msgstr "загрузить фотографию" -#: ../../include/conversation.php:1017 ../../mod/editwebpage.php:99 +#: ../../include/conversation.php:1017 ../../mod/editwebpage.php:105 #: ../../mod/editpost.php:78 msgid "Attach file" msgstr "Прикрепить файл" @@ -2488,7 +2488,7 @@ msgid "attach file" msgstr "прикрепить файл" #: ../../include/conversation.php:1019 ../../mod/message.php:296 -#: ../../mod/message.php:428 ../../mod/editwebpage.php:100 +#: ../../mod/message.php:428 ../../mod/editwebpage.php:106 #: ../../mod/editpost.php:79 msgid "Insert web link" msgstr "Вставить веб-ссылку" @@ -2513,7 +2513,7 @@ msgstr "Вставить аудио-ссылку" msgid "audio link" msgstr "аудио-ссылка" -#: ../../include/conversation.php:1025 ../../mod/editwebpage.php:104 +#: ../../include/conversation.php:1025 ../../mod/editwebpage.php:110 #: ../../mod/editpost.php:83 msgid "Set your location" msgstr "Указание своего расположения" @@ -2522,7 +2522,7 @@ msgstr "Указание своего расположения" msgid "set location" msgstr "указание расположения" -#: ../../include/conversation.php:1027 ../../mod/editwebpage.php:105 +#: ../../include/conversation.php:1027 ../../mod/editwebpage.php:111 #: ../../mod/editpost.php:84 msgid "Clear browser location" msgstr "Стереть указание расположения" @@ -2531,17 +2531,17 @@ msgstr "Стереть указание расположения" msgid "clear location" msgstr "стереть указание расположения" -#: ../../include/conversation.php:1030 ../../mod/editwebpage.php:118 +#: ../../include/conversation.php:1030 ../../mod/editwebpage.php:124 #: ../../mod/editpost.php:97 msgid "Set title" msgstr "Заголовок" -#: ../../include/conversation.php:1033 ../../mod/editwebpage.php:120 +#: ../../include/conversation.php:1033 ../../mod/editwebpage.php:126 #: ../../mod/editpost.php:99 msgid "Categories (comma-separated list)" msgstr "Категории (список через запятую)" -#: ../../include/conversation.php:1035 ../../mod/editwebpage.php:107 +#: ../../include/conversation.php:1035 ../../mod/editwebpage.php:113 #: ../../mod/editpost.php:86 msgid "Permission settings" msgstr "Настройки разрешений" @@ -2550,12 +2550,12 @@ msgstr "Настройки разрешений" msgid "permissions" msgstr "разрешения" -#: ../../include/conversation.php:1044 ../../mod/editwebpage.php:115 +#: ../../include/conversation.php:1044 ../../mod/editwebpage.php:121 #: ../../mod/editpost.php:94 msgid "Public post" msgstr "Публичное сообщение" -#: ../../include/conversation.php:1046 ../../mod/editwebpage.php:121 +#: ../../include/conversation.php:1046 ../../mod/editwebpage.php:127 #: ../../mod/editpost.php:100 msgid "Example: bob@example.com, mary@example.com" msgstr "Пример: bob@example.com, mary@example.com" @@ -2566,8 +2566,8 @@ msgid "Permission denied" msgstr "Доступ запрещен" #: ../../include/items.php:3223 ../../mod/page.php:62 ../../mod/viewsrc.php:18 -#: ../../mod/home.php:64 ../../mod/admin.php:142 ../../mod/admin.php:667 -#: ../../mod/admin.php:866 ../../mod/display.php:33 +#: ../../mod/home.php:64 ../../mod/admin.php:142 ../../mod/admin.php:677 +#: ../../mod/admin.php:876 ../../mod/display.php:33 msgid "Item not found." msgstr "Элемент не найден." @@ -2581,11 +2581,11 @@ msgstr "Коллекция не найдена." #: ../../include/items.php:3566 msgid "Collection has no members." -msgstr "" +msgstr "В коллекции нет ни одного пользователя." #: ../../include/items.php:3582 msgid "Connection not found." -msgstr "Контакт не найден." +msgstr "Канал не найден." #: ../../include/bbcode.php:94 ../../include/bbcode.php:442 #: ../../include/bbcode.php:445 @@ -2615,15 +2615,15 @@ msgstr "Не канал." #: ../../mod/common.php:47 msgid "Common connections" -msgstr "Общие контакты" +msgstr "Общие каналы" #: ../../mod/common.php:52 msgid "No connections in common." -msgstr "Общих контактов нет." +msgstr "Общих каналов нет." #: ../../mod/events.php:66 msgid "Event title and start time are required." -msgstr "" +msgstr "Название события и время начала требуется." #: ../../mod/events.php:281 msgid "l, F j" @@ -2668,7 +2668,7 @@ msgstr "Необходимо" #: ../../mod/events.php:441 msgid "Finish date/time is not known or not relevant" -msgstr "" +msgstr "Дата окончания / время окончания не известны или не релевантны" #: ../../mod/events.php:443 msgid "Event Finishes:" @@ -2676,7 +2676,7 @@ msgstr "\t\nКонец мероприятий:" #: ../../mod/events.php:446 msgid "Adjust for viewer timezone" -msgstr "" +msgstr "Отрегулируйте для просмотра часовых поясов" #: ../../mod/events.php:448 msgid "Description:" @@ -2705,7 +2705,7 @@ msgstr "" #: ../../mod/thing.php:175 msgid "not yet implemented." -msgstr "" +msgstr "еще не реализовано." #: ../../mod/thing.php:181 msgid "Add Stuff to your Profile" @@ -2751,19 +2751,19 @@ msgstr "" #: ../../mod/invite.php:90 #, php-format msgid "%s : Message delivery failed." -msgstr "" +msgstr "%s : Доставка сообщения не удалась." #: ../../mod/invite.php:94 #, php-format msgid "%d message sent." msgid_plural "%d messages sent." -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "%d сообщение отправленно." +msgstr[1] "%d сообщения отправленно." +msgstr[2] "%d сообщений отправленно." #: ../../mod/invite.php:113 msgid "You have no more invitations available" -msgstr "" +msgstr "У вас больше нет приглашений" #: ../../mod/invite.php:139 msgid "Send invitations" @@ -2790,7 +2790,7 @@ msgstr "" #: ../../mod/invite.php:146 msgid "Please visit my channel at" -msgstr "" +msgstr "Пожалуйста, посетите мой канал на" #: ../../mod/invite.php:150 msgid "" @@ -2859,7 +2859,7 @@ msgstr "" #: ../../mod/apps.php:8 msgid "No installed applications." -msgstr "" +msgstr "Нет установленных приложений." #: ../../mod/apps.php:13 msgid "Applications" @@ -3317,7 +3317,7 @@ msgid "Cancel" msgstr "Отменить" #: ../../mod/settings.php:610 ../../mod/settings.php:636 -#: ../../mod/admin.php:626 ../../mod/crepair.php:148 +#: ../../mod/admin.php:636 ../../mod/crepair.php:148 msgid "Name" msgstr "Имя" @@ -3339,7 +3339,7 @@ msgstr "URL-адрес значка" #: ../../mod/settings.php:625 msgid "You can't edit this application." -msgstr "" +msgstr "Вы не можете редактировать это приложение." #: ../../mod/settings.php:668 msgid "Connected Apps" @@ -3359,7 +3359,7 @@ msgstr "Удалить разрешение" #: ../../mod/settings.php:685 msgid "No feature settings configured" -msgstr "" +msgstr "Параметры функций не настроены" #: ../../mod/settings.php:693 msgid "Feature Settings" @@ -3413,9 +3413,9 @@ msgstr "Дополнительные функции" msgid "Connector Settings" msgstr "Настройки соединителя" -#: ../../mod/settings.php:801 ../../mod/admin.php:359 +#: ../../mod/settings.php:801 ../../mod/admin.php:361 msgid "No special theme for mobile devices" -msgstr "" +msgstr "Нет специальной темы для мобильных устройств" #: ../../mod/settings.php:841 msgid "Display Settings" @@ -3427,7 +3427,7 @@ msgstr "Тема отображения:" #: ../../mod/settings.php:848 msgid "Mobile Theme:" -msgstr "" +msgstr "Мобильная тема отображения:" #: ../../mod/settings.php:849 msgid "Update browser every xx seconds" @@ -3447,7 +3447,7 @@ msgstr "Максимум 100 элементов" #: ../../mod/settings.php:851 msgid "Don't show emoticons" -msgstr "" +msgstr "Не показывать emoticons" #: ../../mod/settings.php:887 msgid "Nobody except yourself" @@ -3475,7 +3475,7 @@ msgstr "Любой в интернете" #: ../../mod/settings.php:965 msgid "Publish your default profile in the network directory" -msgstr "" +msgstr "Публикация вашего профиля по умолчанию в каталоге сети" #: ../../mod/settings.php:970 msgid "Allow us to suggest you as a potential friend to new members?" @@ -3661,7 +3661,7 @@ msgstr "Общественный доступ запрещен." #: ../../mod/viewconnections.php:57 msgid "No connections." -msgstr "Никаких контактов." +msgstr "Никаких каналов." #: ../../mod/viewconnections.php:69 ../../mod/nogroup.php:40 #, php-format @@ -3670,7 +3670,7 @@ msgstr "" #: ../../mod/viewconnections.php:84 msgid "View Connnections" -msgstr "Просмотр контактов" +msgstr "Просмотр каналов" #: ../../mod/tagrm.php:41 msgid "Tag removed" @@ -3682,7 +3682,7 @@ msgstr "Удалить Тег" #: ../../mod/tagrm.php:81 msgid "Select a tag to remove: " -msgstr "" +msgstr "Выбрать тег для удаления: " #: ../../mod/tagrm.php:93 ../../mod/delegate.php:130 msgid "Remove" @@ -3785,7 +3785,7 @@ msgstr "Коллекция удалена." #: ../../mod/group.php:115 msgid "Unable to remove collection." -msgstr "" +msgstr "Невозможно удалить коллекцию." #: ../../mod/group.php:188 msgid "Collection Editor" @@ -3834,7 +3834,7 @@ msgstr "Никакие фотографии не выбраны" #: ../../mod/photos.php:622 msgid "Access to this item is restricted." -msgstr "" +msgstr "Доступ к этому элементу ограничен." #: ../../mod/photos.php:686 #, php-format @@ -3869,7 +3869,7 @@ msgstr "Разрешения" #: ../../mod/photos.php:754 ../../mod/photos.php:776 ../../mod/photos.php:1223 #: ../../mod/photos.php:1238 msgid "Contact Photos" -msgstr "Фотографии контактов" +msgstr "Фотографии канала" #: ../../mod/photos.php:780 msgid "Edit Album" @@ -4185,29 +4185,29 @@ msgstr "Группа пуста" #: ../../mod/network.php:473 msgid "Contact: " -msgstr "Контакт: " +msgstr "Канал: " #: ../../mod/network.php:476 msgid "Invalid contact." -msgstr "Неправильный контакт." +msgstr "Недействительный канал." #: ../../mod/admin.php:48 msgid "Theme settings updated." msgstr "Настройки темы обновленны." -#: ../../mod/admin.php:83 ../../mod/admin.php:399 +#: ../../mod/admin.php:83 ../../mod/admin.php:408 msgid "Site" msgstr "Сайт" -#: ../../mod/admin.php:84 ../../mod/admin.php:622 ../../mod/admin.php:634 +#: ../../mod/admin.php:84 ../../mod/admin.php:632 ../../mod/admin.php:644 msgid "Users" msgstr "Пользователи" -#: ../../mod/admin.php:85 ../../mod/admin.php:716 ../../mod/admin.php:758 +#: ../../mod/admin.php:85 ../../mod/admin.php:726 ../../mod/admin.php:768 msgid "Plugins" msgstr "Плагины" -#: ../../mod/admin.php:86 ../../mod/admin.php:921 ../../mod/admin.php:957 +#: ../../mod/admin.php:86 ../../mod/admin.php:931 ../../mod/admin.php:967 msgid "Themes" msgstr "Темы" @@ -4215,7 +4215,7 @@ msgstr "Темы" msgid "DB updates" msgstr "Обновления базы данных" -#: ../../mod/admin.php:101 ../../mod/admin.php:108 ../../mod/admin.php:1044 +#: ../../mod/admin.php:101 ../../mod/admin.php:108 ../../mod/admin.php:1054 msgid "Logs" msgstr "Журналы" @@ -4231,9 +4231,9 @@ msgstr "Регистрации пользователей, которые жду msgid "Message queues" msgstr "Очередь непрочитанный сообщений" -#: ../../mod/admin.php:185 ../../mod/admin.php:398 ../../mod/admin.php:621 -#: ../../mod/admin.php:715 ../../mod/admin.php:757 ../../mod/admin.php:920 -#: ../../mod/admin.php:956 ../../mod/admin.php:1043 +#: ../../mod/admin.php:185 ../../mod/admin.php:407 ../../mod/admin.php:631 +#: ../../mod/admin.php:725 ../../mod/admin.php:767 ../../mod/admin.php:930 +#: ../../mod/admin.php:966 ../../mod/admin.php:1053 msgid "Administration" msgstr "Администрация" @@ -4257,264 +4257,280 @@ msgstr "Версия" msgid "Active plugins" msgstr "Активные плагины" -#: ../../mod/admin.php:330 +#: ../../mod/admin.php:332 msgid "Site settings updated." msgstr "Настройки сайта обновлены." -#: ../../mod/admin.php:361 +#: ../../mod/admin.php:363 msgid "No special theme for accessibility" msgstr "" -#: ../../mod/admin.php:386 +#: ../../mod/admin.php:388 msgid "Closed" msgstr "Регистрация закрыта" -#: ../../mod/admin.php:387 +#: ../../mod/admin.php:389 msgid "Requires approval" msgstr "Регистрация требует подтверждения" -#: ../../mod/admin.php:388 +#: ../../mod/admin.php:390 msgid "Open" msgstr "Регистрация открыта" -#: ../../mod/admin.php:392 +#: ../../mod/admin.php:395 +msgid "Private" +msgstr "" + +#: ../../mod/admin.php:396 +msgid "Paid Access" +msgstr "" + +#: ../../mod/admin.php:397 +msgid "Free Access" +msgstr "" + +#: ../../mod/admin.php:401 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: ../../mod/admin.php:393 +#: ../../mod/admin.php:402 msgid "Force all links to use SSL" msgstr "Заставить все ссылки использовать SSL" -#: ../../mod/admin.php:401 ../../mod/register.php:166 +#: ../../mod/admin.php:410 ../../mod/register.php:166 msgid "Registration" msgstr "Регистрация" -#: ../../mod/admin.php:402 +#: ../../mod/admin.php:411 msgid "File upload" msgstr "Загрузка файла" -#: ../../mod/admin.php:403 +#: ../../mod/admin.php:412 msgid "Policies" msgstr "Правила" -#: ../../mod/admin.php:404 +#: ../../mod/admin.php:413 msgid "Advanced" msgstr "Дополнительно" -#: ../../mod/admin.php:408 +#: ../../mod/admin.php:417 msgid "Site name" msgstr "Название сайта" -#: ../../mod/admin.php:409 +#: ../../mod/admin.php:418 msgid "Banner/Logo" msgstr "Баннер / логотип" -#: ../../mod/admin.php:410 +#: ../../mod/admin.php:419 msgid "System language" msgstr "Язык системы" -#: ../../mod/admin.php:411 +#: ../../mod/admin.php:420 msgid "System theme" msgstr "Тема системы" -#: ../../mod/admin.php:411 +#: ../../mod/admin.php:420 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "" -#: ../../mod/admin.php:412 +#: ../../mod/admin.php:421 msgid "Mobile system theme" -msgstr "" +msgstr "Мобильная тема системы" -#: ../../mod/admin.php:412 +#: ../../mod/admin.php:421 msgid "Theme for mobile devices" -msgstr "" +msgstr "Тема для мобильных устройств" -#: ../../mod/admin.php:413 +#: ../../mod/admin.php:422 msgid "Accessibility system theme" msgstr "" -#: ../../mod/admin.php:413 +#: ../../mod/admin.php:422 msgid "Accessibility theme" msgstr "" -#: ../../mod/admin.php:414 +#: ../../mod/admin.php:423 msgid "Channel to use for this website's static pages" msgstr "" -#: ../../mod/admin.php:414 +#: ../../mod/admin.php:423 msgid "Site Channel" msgstr "Канал сайта" -#: ../../mod/admin.php:415 +#: ../../mod/admin.php:424 msgid "SSL link policy" msgstr "Правила SSL-ссылки" -#: ../../mod/admin.php:415 +#: ../../mod/admin.php:424 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: ../../mod/admin.php:416 +#: ../../mod/admin.php:425 msgid "Maximum image size" msgstr "Максимальный размер" -#: ../../mod/admin.php:416 +#: ../../mod/admin.php:425 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: ../../mod/admin.php:417 +#: ../../mod/admin.php:426 msgid "Register policy" msgstr "Статус регистрации" -#: ../../mod/admin.php:418 +#: ../../mod/admin.php:427 +msgid "Access policy" +msgstr "" + +#: ../../mod/admin.php:428 msgid "Register text" msgstr "Текст регистрации" -#: ../../mod/admin.php:418 +#: ../../mod/admin.php:428 msgid "Will be displayed prominently on the registration page." msgstr "" -#: ../../mod/admin.php:419 +#: ../../mod/admin.php:429 msgid "Accounts abandoned after x days" msgstr "" -#: ../../mod/admin.php:419 +#: ../../mod/admin.php:429 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: ../../mod/admin.php:420 +#: ../../mod/admin.php:430 msgid "Allowed friend domains" msgstr "" -#: ../../mod/admin.php:420 +#: ../../mod/admin.php:430 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "" -#: ../../mod/admin.php:421 +#: ../../mod/admin.php:431 msgid "Allowed email domains" msgstr "" -#: ../../mod/admin.php:421 +#: ../../mod/admin.php:431 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "" -#: ../../mod/admin.php:422 +#: ../../mod/admin.php:432 msgid "Block public" msgstr "Блокировать публичный доступ" -#: ../../mod/admin.php:422 +#: ../../mod/admin.php:432 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "" -#: ../../mod/admin.php:423 +#: ../../mod/admin.php:433 msgid "Force publish" msgstr "Заставить публиковать" -#: ../../mod/admin.php:423 +#: ../../mod/admin.php:433 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: ../../mod/admin.php:425 +#: ../../mod/admin.php:435 msgid "Proxy user" msgstr "Proxy пользователь" -#: ../../mod/admin.php:426 +#: ../../mod/admin.php:436 msgid "Proxy URL" msgstr "Proxy URL" -#: ../../mod/admin.php:427 +#: ../../mod/admin.php:437 msgid "Network timeout" msgstr "Время ожидания сети" -#: ../../mod/admin.php:427 +#: ../../mod/admin.php:437 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: ../../mod/admin.php:428 +#: ../../mod/admin.php:438 msgid "Delivery interval" msgstr "Интервал доставки" -#: ../../mod/admin.php:428 +#: ../../mod/admin.php:438 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "" -#: ../../mod/admin.php:429 +#: ../../mod/admin.php:439 msgid "Poll interval" msgstr "Интервал опроса" -#: ../../mod/admin.php:429 +#: ../../mod/admin.php:439 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "" -#: ../../mod/admin.php:430 +#: ../../mod/admin.php:440 msgid "Maximum Load Average" msgstr "" -#: ../../mod/admin.php:430 +#: ../../mod/admin.php:440 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "" -#: ../../mod/admin.php:446 +#: ../../mod/admin.php:456 msgid "Update has been marked successful" msgstr "" -#: ../../mod/admin.php:456 +#: ../../mod/admin.php:466 #, php-format msgid "Executing %s failed. Check system logs." msgstr "" -#: ../../mod/admin.php:459 +#: ../../mod/admin.php:469 #, php-format msgid "Update %s was successfully applied." msgstr "" -#: ../../mod/admin.php:463 +#: ../../mod/admin.php:473 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "" -#: ../../mod/admin.php:466 +#: ../../mod/admin.php:476 #, php-format msgid "Update function %s could not be found." msgstr "" -#: ../../mod/admin.php:481 +#: ../../mod/admin.php:491 msgid "No failed updates." msgstr "Ошибок обновлений нет." -#: ../../mod/admin.php:485 +#: ../../mod/admin.php:495 msgid "Failed Updates" msgstr "Обновления с ошибками" -#: ../../mod/admin.php:487 +#: ../../mod/admin.php:497 msgid "Mark success (if update was manually applied)" msgstr "" -#: ../../mod/admin.php:488 +#: ../../mod/admin.php:498 msgid "Attempt to execute this update step automatically" msgstr "" -#: ../../mod/admin.php:514 +#: ../../mod/admin.php:524 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" @@ -4522,176 +4538,176 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: ../../mod/admin.php:521 +#: ../../mod/admin.php:531 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" -msgstr[0] "%s контакт удален" -msgstr[1] "%s контакта удалены" -msgstr[2] "%s контакты удалены" +msgstr[0] "%s канал удален" +msgstr[1] "%s канала удалены" +msgstr[2] "%s каналов удалено" -#: ../../mod/admin.php:552 +#: ../../mod/admin.php:562 msgid "Account not found" msgstr "Аккаунт не найден" -#: ../../mod/admin.php:563 +#: ../../mod/admin.php:573 #, php-format msgid "User '%s' deleted" -msgstr "Контакт '%s' удален" +msgstr "Пользователь '%s' удален" -#: ../../mod/admin.php:572 +#: ../../mod/admin.php:582 #, php-format msgid "User '%s' unblocked" -msgstr "Контакт '%s' разрешен" +msgstr "Пользователь '%s' разрешен" -#: ../../mod/admin.php:572 +#: ../../mod/admin.php:582 #, php-format msgid "User '%s' blocked" -msgstr "Контакт '%s' заблокирован" +msgstr "Пользователь '%s' заблокирован" -#: ../../mod/admin.php:603 +#: ../../mod/admin.php:613 msgid "Normal Account" msgstr "Нормальный аккаунт" -#: ../../mod/admin.php:604 +#: ../../mod/admin.php:614 msgid "Soapbox Account" msgstr "Soapbox аккаунт" -#: ../../mod/admin.php:605 +#: ../../mod/admin.php:615 msgid "Community/Celebrity Account" msgstr "Community/Celebrity аккаунт" -#: ../../mod/admin.php:606 +#: ../../mod/admin.php:616 msgid "Automatic Friend Account" msgstr "Аккаунт \"автоматически друзья\"" -#: ../../mod/admin.php:624 +#: ../../mod/admin.php:634 msgid "select all" msgstr "выбрать все" -#: ../../mod/admin.php:625 +#: ../../mod/admin.php:635 msgid "User registrations waiting for confirm" msgstr "Регистрации пользователей ждут подтверждения" -#: ../../mod/admin.php:626 +#: ../../mod/admin.php:636 msgid "Request date" msgstr "Дата запроса" -#: ../../mod/admin.php:627 +#: ../../mod/admin.php:637 msgid "No registrations." msgstr "Регистраций нет." -#: ../../mod/admin.php:628 ../../mod/intro.php:11 ../../mod/intro.php:98 +#: ../../mod/admin.php:638 ../../mod/intro.php:11 ../../mod/intro.php:98 #: ../../mod/notifications.php:159 ../../mod/notifications.php:206 msgid "Approve" msgstr "Утвердить" -#: ../../mod/admin.php:629 +#: ../../mod/admin.php:639 msgid "Deny" msgstr "Запретить" -#: ../../mod/admin.php:631 ../../mod/intro.php:14 ../../mod/intro.php:99 +#: ../../mod/admin.php:641 ../../mod/intro.php:14 ../../mod/intro.php:99 #: ../../mod/connections.php:308 ../../mod/connections.php:449 msgid "Block" msgstr "Заблокировать" -#: ../../mod/admin.php:632 ../../mod/connections.php:308 +#: ../../mod/admin.php:642 ../../mod/connections.php:308 #: ../../mod/connections.php:449 msgid "Unblock" msgstr "Разрешить" -#: ../../mod/admin.php:635 +#: ../../mod/admin.php:645 msgid "Register date" msgstr "Дата регистрации" -#: ../../mod/admin.php:635 +#: ../../mod/admin.php:645 msgid "Last login" msgstr "Последний вход" -#: ../../mod/admin.php:635 +#: ../../mod/admin.php:645 msgid "Service Class" msgstr "Класс службы" -#: ../../mod/admin.php:637 +#: ../../mod/admin.php:647 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: ../../mod/admin.php:638 +#: ../../mod/admin.php:648 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: ../../mod/admin.php:679 +#: ../../mod/admin.php:689 #, php-format msgid "Plugin %s disabled." msgstr "Плагин %s отключен." -#: ../../mod/admin.php:683 +#: ../../mod/admin.php:693 #, php-format msgid "Plugin %s enabled." msgstr "Плагин %s включен." -#: ../../mod/admin.php:693 ../../mod/admin.php:891 +#: ../../mod/admin.php:703 ../../mod/admin.php:901 msgid "Disable" msgstr "Запретить" -#: ../../mod/admin.php:695 ../../mod/admin.php:893 +#: ../../mod/admin.php:705 ../../mod/admin.php:903 msgid "Enable" msgstr "Разрешить" -#: ../../mod/admin.php:717 ../../mod/admin.php:922 +#: ../../mod/admin.php:727 ../../mod/admin.php:932 msgid "Toggle" msgstr "Переключить" -#: ../../mod/admin.php:725 ../../mod/admin.php:932 +#: ../../mod/admin.php:735 ../../mod/admin.php:942 msgid "Author: " msgstr "Автор: " -#: ../../mod/admin.php:726 ../../mod/admin.php:933 +#: ../../mod/admin.php:736 ../../mod/admin.php:943 msgid "Maintainer: " msgstr "Обслуживающий: " -#: ../../mod/admin.php:855 +#: ../../mod/admin.php:865 msgid "No themes found." msgstr "Темы не найдены." -#: ../../mod/admin.php:914 +#: ../../mod/admin.php:924 msgid "Screenshot" msgstr "Скриншот" -#: ../../mod/admin.php:962 +#: ../../mod/admin.php:972 msgid "[Experimental]" msgstr "[экспериментальный]" -#: ../../mod/admin.php:963 +#: ../../mod/admin.php:973 msgid "[Unsupported]" msgstr "[неподдерживаемый]" -#: ../../mod/admin.php:990 +#: ../../mod/admin.php:1000 msgid "Log settings updated." msgstr "Настройки журнала обновленны." -#: ../../mod/admin.php:1046 +#: ../../mod/admin.php:1056 msgid "Clear" msgstr "Очистить" -#: ../../mod/admin.php:1052 +#: ../../mod/admin.php:1062 msgid "Debugging" msgstr "Включить/Выключить" -#: ../../mod/admin.php:1053 +#: ../../mod/admin.php:1063 msgid "Log file" msgstr "Файл журнала" -#: ../../mod/admin.php:1053 +#: ../../mod/admin.php:1063 msgid "" "Must be writable by web server. Relative to your Red top-level directory." msgstr "Должна быть доступна для записи веб-сервером. Относительно верхнего уровня веб-сайта." -#: ../../mod/admin.php:1054 +#: ../../mod/admin.php:1064 msgid "Log level" msgstr "Уровень журнала" @@ -4704,11 +4720,11 @@ msgstr "Игнорировать" #: ../../mod/intro.php:29 ../../mod/connections.php:117 msgid "Connection updated." -msgstr "Контакт обновлен." +msgstr "Канал обновлен." #: ../../mod/intro.php:31 msgid "Connection update failed." -msgstr "Ошибка обновления контакта." +msgstr "Ошибка обновления канала." #: ../../mod/intro.php:56 msgid "Introductions and Connection Requests" @@ -4725,7 +4741,7 @@ msgstr "Системная ошибка. Пожалуйста, повторит #: ../../mod/intro.php:95 ../../mod/connections.php:455 #: ../../mod/notifications.php:155 ../../mod/notifications.php:202 msgid "Hide this contact from others" -msgstr "Скрыть этот контакт от других" +msgstr "Скрыть этот канал от других" #: ../../mod/intro.php:96 ../../mod/notifications.php:156 #: ../../mod/notifications.php:203 @@ -4810,12 +4826,12 @@ msgstr "Канал не одобрен" #: ../../mod/connections.php:277 msgid "Contact has been removed." -msgstr "Контакт удален." +msgstr "Канал удален." #: ../../mod/connections.php:297 #, php-format msgid "View %s's profile" -msgstr "" +msgstr "Просмотр %s's профиля" #: ../../mod/connections.php:301 msgid "Refresh Permissions" @@ -4827,7 +4843,7 @@ msgstr "" #: ../../mod/connections.php:311 msgid "Block or Unblock this connection" -msgstr "Запретить или разрешить этот контакт" +msgstr "Запретить или разрешить этот канал" #: ../../mod/connections.php:315 ../../mod/connections.php:450 msgid "Unignore" @@ -4835,7 +4851,7 @@ msgstr "Не игнорировать" #: ../../mod/connections.php:318 msgid "Ignore or Unignore this connection" -msgstr "Игнорировать или не игнорировать этот контакт" +msgstr "Игнорировать или не игнорировать этот канал" #: ../../mod/connections.php:321 msgid "Unarchive" @@ -4847,7 +4863,7 @@ msgstr "Заархивировать" #: ../../mod/connections.php:324 msgid "Archive or Unarchive this connection" -msgstr " Заархивировать или разархивировать этот контакт" +msgstr " Заархивировать или разархивировать этот канал" #: ../../mod/connections.php:327 msgid "Unhide" @@ -4859,11 +4875,11 @@ msgstr "Скрыть" #: ../../mod/connections.php:330 msgid "Hide or Unhide this connection" -msgstr "Скрыть или показывать этот контакт" +msgstr "Скрыть или показывать этот канал" #: ../../mod/connections.php:337 msgid "Delete this connection" -msgstr "Удалить этот контакт" +msgstr "Удалить этот канал" #: ../../mod/connections.php:370 msgid "Unknown" @@ -4871,7 +4887,7 @@ msgstr "Неизвестный" #: ../../mod/connections.php:380 ../../mod/connections.php:408 msgid "Approve this connection" -msgstr "Утвердить этот контакт" +msgstr "Утвердить этот канал" #: ../../mod/connections.php:380 msgid "Accept connection to allow communication" @@ -4904,7 +4920,7 @@ msgstr "" #: ../../mod/connections.php:410 msgid "" "This may be appropriate based on your privacy " -"settings, though you may wish to review the \"Advanced Permissions\"" +"settings, though you may wish to review the \"Advanced Permissions\"." msgstr "" #: ../../mod/connections.php:412 @@ -4920,11 +4936,11 @@ msgstr "" #: ../../mod/connections.php:414 msgid "Contact Information / Notes" -msgstr "Контактная информация / Примечания" +msgstr "Информация / Примечания о канале" #: ../../mod/connections.php:415 msgid "Edit contact notes" -msgstr "Редактировать примечания контакта" +msgstr "Редактировать примечания канала" #: ../../mod/connections.php:417 msgid "Their Settings" @@ -4940,7 +4956,7 @@ msgstr "Участники форума" #: ../../mod/connections.php:421 msgid "Soapbox" -msgstr "" +msgstr "Soapbox" #: ../../mod/connections.php:422 msgid "Full Sharing" @@ -4976,15 +4992,15 @@ msgstr "Быстрые ссылки" #: ../../mod/connections.php:432 #, php-format msgid "Visit %s's profile - %s" -msgstr "" +msgstr "Посетить %s's ​​профиль - %s" #: ../../mod/connections.php:433 msgid "Block/Unblock contact" -msgstr "Запретить/разрешить контакт" +msgstr "Запретить/разрешить канал" #: ../../mod/connections.php:434 msgid "Ignore contact" -msgstr "Игнорировать контакт" +msgstr "Игнорировать канал" #: ../../mod/connections.php:435 msgid "Repair URL settings" @@ -4996,7 +5012,7 @@ msgstr "Просмотр разговоров" #: ../../mod/connections.php:438 msgid "Delete contact" -msgstr "Удалить контакт" +msgstr "Удалить канал" #: ../../mod/connections.php:441 msgid "Last update:" @@ -5057,19 +5073,19 @@ msgstr "Рекомендации" #: ../../mod/connections.php:541 msgid "Suggest new connections" -msgstr "Предлагать новые контакты" +msgstr "Предлагать новые каналы" #: ../../mod/connections.php:547 msgid "Show pending (new) connections" -msgstr "Просмотр (новых) ждущих контактов" +msgstr "Просмотр (новых) ждущих каналов" #: ../../mod/connections.php:550 msgid "All Connections" -msgstr "Все контакты" +msgstr "Все каналы" #: ../../mod/connections.php:553 msgid "Show all connections" -msgstr "Просмотр всех контактв" +msgstr "Просмотр всех каналов" #: ../../mod/connections.php:556 msgid "Unblocked" @@ -5077,23 +5093,23 @@ msgstr "Разрешенные" #: ../../mod/connections.php:559 msgid "Only show unblocked connections" -msgstr "Показать только разрешенные контакты" +msgstr "Показать только разрешенные каналы" #: ../../mod/connections.php:566 msgid "Only show blocked connections" -msgstr "Показать только заблокированные контакты" +msgstr "Показать только заблокированные каналы" #: ../../mod/connections.php:573 msgid "Only show ignored connections" -msgstr "Показать только проигнорированные контакты" +msgstr "Показать только проигнорированные каналы" #: ../../mod/connections.php:580 msgid "Only show archived connections" -msgstr "Показать только архивированные контакты" +msgstr "Показать только архивированные каналы" #: ../../mod/connections.php:587 msgid "Only show hidden connections" -msgstr "Показать только скрытые контакты" +msgstr "Показать только скрытые каналы" #: ../../mod/connections.php:629 #, php-format @@ -5102,11 +5118,11 @@ msgstr "%1$s [%2$s]" #: ../../mod/connections.php:630 ../../mod/nogroup.php:41 msgid "Edit contact" -msgstr "Редактировать контакт" +msgstr "Редактировать канал" #: ../../mod/connections.php:654 msgid "Search your connections" -msgstr "Поиск контактов" +msgstr "Поиск каналов" #: ../../mod/connections.php:655 msgid "Finding: " @@ -5331,7 +5347,7 @@ msgstr "Хобби / интересы" #: ../../mod/profiles.php:561 msgid "Contact information and Social Networks" -msgstr "Контактная информация и социальные сети" +msgstr "Информация и социальные сети канала" #: ../../mod/profiles.php:562 msgid "My other channels" @@ -5417,7 +5433,7 @@ msgstr "" #: ../../mod/new_channel.php:112 msgid "Choose a short nickname" -msgstr "" +msgstr "Выберите короткий псевдоним" #: ../../mod/new_channel.php:113 msgid "" @@ -5435,7 +5451,7 @@ msgstr "Создать" #: ../../mod/lostpass.php:15 msgid "No valid account found." -msgstr "" +msgstr "Действительный аккаунт не найден." #: ../../mod/lostpass.php:29 msgid "Password reset request issued. Check your email." @@ -5444,12 +5460,12 @@ msgstr "" #: ../../mod/lostpass.php:35 ../../mod/lostpass.php:102 #, php-format msgid "Site Member (%s)" -msgstr "" +msgstr "Участник сайта (%s)" #: ../../mod/lostpass.php:40 #, php-format msgid "Password reset requested at %s" -msgstr "" +msgstr "Требуется сброс пароля на %s" #: ../../mod/lostpass.php:63 msgid "" @@ -5625,16 +5641,16 @@ msgstr "" #: ../../mod/crepair.php:104 msgid "Contact update failed." -msgstr "Ошибка обновления контакта." +msgstr "Ошибка обновления канала." #: ../../mod/crepair.php:129 ../../mod/fsuggest.php:20 #: ../../mod/fsuggest.php:92 msgid "Contact not found." -msgstr "Контакт не найден." +msgstr "Канал не найден." #: ../../mod/crepair.php:135 msgid "Repair Contact Settings" -msgstr "Починить настройки контакта" +msgstr "Починить настройки канала" #: ../../mod/crepair.php:137 msgid "" @@ -5650,7 +5666,7 @@ msgstr "" #: ../../mod/crepair.php:144 msgid "Return to contact editor" -msgstr "Вернуться к редактору контакта" +msgstr "Вернуться к редактору канала" #: ../../mod/crepair.php:149 msgid "Account Nickname" @@ -5772,23 +5788,23 @@ msgstr "Загрузка изображениея прошла безуспеш msgid "Image size reduction [%s] failed." msgstr "" -#: ../../mod/editwebpage.php:30 ../../mod/editpost.php:18 +#: ../../mod/editwebpage.php:36 ../../mod/editpost.php:18 msgid "Item not found" msgstr "Элемент не найден" -#: ../../mod/editwebpage.php:63 ../../mod/editpost.php:38 +#: ../../mod/editwebpage.php:69 ../../mod/editpost.php:38 msgid "Edit post" msgstr "Редактировать сообщение" -#: ../../mod/editwebpage.php:101 ../../mod/editpost.php:80 +#: ../../mod/editwebpage.php:107 ../../mod/editpost.php:80 msgid "Insert YouTube video" msgstr "Вставить YouTube видео" -#: ../../mod/editwebpage.php:102 ../../mod/editpost.php:81 +#: ../../mod/editwebpage.php:108 ../../mod/editpost.php:81 msgid "Insert Vorbis [.ogg] video" msgstr "Вставить Vorbis [.ogg] видео" -#: ../../mod/editwebpage.php:103 ../../mod/editpost.php:82 +#: ../../mod/editwebpage.php:109 ../../mod/editpost.php:82 msgid "Insert Vorbis [.ogg] audio" msgstr "Вставить Vorbis [.ogg] музыку" @@ -6005,7 +6021,7 @@ msgstr "Видно" #: ../../mod/profperm.php:139 msgid "All Contacts (with secure profile access)" -msgstr "Все контакты (с доступом защищенному профилю)" +msgstr "Все каналы (с доступом защищенному профилю)" #: ../../mod/siteinfo.php:51 #, php-format @@ -6171,7 +6187,7 @@ msgstr "" #: ../../view/theme/redbasic/php/config.php:159 #: ../../view/theme/redstrap/php/config.php:136 msgid "Set colour scheme" -msgstr "" +msgstr "Установите цветовую схему" #: ../../view/theme/redbasic/php/config.php:142 #: ../../view/theme/redstrap/php/config.php:137 @@ -6186,7 +6202,7 @@ msgstr "" #: ../../view/theme/redbasic/php/config.php:144 #: ../../view/theme/redstrap/php/config.php:139 msgid "Display style" -msgstr "" +msgstr "Стиль отображения" #: ../../view/theme/redbasic/php/config.php:145 #: ../../view/theme/redstrap/php/config.php:140 @@ -6205,7 +6221,7 @@ msgstr "" #: ../../view/theme/redbasic/php/config.php:148 msgid "Corner radius" -msgstr "" +msgstr "Угловой радиус" #: ../../view/theme/redbasic/php/config.php:148 msgid "0-99 default: 5" @@ -6219,7 +6235,7 @@ msgstr "" #: ../../boot.php:1199 #, php-format msgid "Update Error at %s" -msgstr "" +msgstr "Ошибка обновления на %s" #: ../../boot.php:1336 msgid "Create a New Account" @@ -6311,4 +6327,4 @@ msgstr "" #: ../../boot.php:2346 msgid "toggle mobile" -msgstr "" +msgstr "мобильное подключение" -- cgit v1.2.3 From b860188f710b5d113d8de196e4ae75f0a166e3bc Mon Sep 17 00:00:00 2001 From: pixelroot Date: Mon, 12 Aug 2013 15:46:01 +0200 Subject: modified: view/ru/messages.po --- view/ru/messages.po | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/view/ru/messages.po b/view/ru/messages.po index d89794ee1..267b799f4 100644 --- a/view/ru/messages.po +++ b/view/ru/messages.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Red Matrix\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-08-09 03:55-0700\n" -"PO-Revision-Date: 2013-08-12 12:42+0000\n" +"PO-Revision-Date: 2013-08-12 13:40+0000\n" "Last-Translator: alexej \n" "Language-Team: Russian (http://www.transifex.com/projects/p/red-matrix/language/ru/)\n" "MIME-Version: 1.0\n" @@ -1720,7 +1720,7 @@ msgstr[2] "%d каналов" #: ../../include/text.php:643 msgid "View Connections" -msgstr "Просмотр каналов" +msgstr "Просмотр открытых каналов" #: ../../include/text.php:704 ../../mod/filer.php:36 msgid "Save" @@ -4229,7 +4229,7 @@ msgstr "Регистрации пользователей, которые жду #: ../../mod/admin.php:180 msgid "Message queues" -msgstr "Очередь непрочитанный сообщений" +msgstr "Непрочитанный сообщений" #: ../../mod/admin.php:185 ../../mod/admin.php:407 ../../mod/admin.php:631 #: ../../mod/admin.php:725 ../../mod/admin.php:767 ../../mod/admin.php:930 @@ -4243,15 +4243,15 @@ msgstr "Резюме" #: ../../mod/admin.php:188 msgid "Registered users" -msgstr "Зарегистрированных пользователeй" +msgstr "Всего пользователeй" #: ../../mod/admin.php:190 msgid "Pending registrations" -msgstr "Утверждения регистрации ждут" +msgstr "Ждут утверждения" #: ../../mod/admin.php:191 msgid "Version" -msgstr "Версия" +msgstr "Версия системы" #: ../../mod/admin.php:193 msgid "Active plugins" @@ -4279,15 +4279,15 @@ msgstr "Регистрация открыта" #: ../../mod/admin.php:395 msgid "Private" -msgstr "" +msgstr "Личный доступ" #: ../../mod/admin.php:396 msgid "Paid Access" -msgstr "" +msgstr "Платный доступ" #: ../../mod/admin.php:397 msgid "Free Access" -msgstr "" +msgstr "Свободный доступ" #: ../../mod/admin.php:401 msgid "No SSL policy, links will track page SSL state" @@ -4383,7 +4383,7 @@ msgstr "Статус регистрации" #: ../../mod/admin.php:427 msgid "Access policy" -msgstr "" +msgstr "Правила доступа" #: ../../mod/admin.php:428 msgid "Register text" @@ -4595,7 +4595,7 @@ msgstr "Дата запроса" #: ../../mod/admin.php:637 msgid "No registrations." -msgstr "Регистраций нет." +msgstr "Новых регистраций пока нет." #: ../../mod/admin.php:638 ../../mod/intro.php:11 ../../mod/intro.php:98 #: ../../mod/notifications.php:159 ../../mod/notifications.php:206 -- cgit v1.2.3 From 04f8de184e8c925e38335eb18c102985ce421f95 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Aug 2013 17:42:52 -0700 Subject: block content-type (called ITEM_BUILDBLOCK to avoid confusion with content that is blocked) --- boot.php | 1 + include/notifier.php | 5 +++++ mod/item.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/boot.php b/boot.php index 02162bb6a..6d5ca337b 100755 --- a/boot.php +++ b/boot.php @@ -454,6 +454,7 @@ define ( 'ITEM_DELETED', 0x0010); define ( 'ITEM_UNPUBLISHED', 0x0020); define ( 'ITEM_WEBPAGE', 0x0040); // is a static web page, not a conversational item define ( 'ITEM_DELAYED_PUBLISH', 0x0080); +define ( 'ITEM_BUILDBLOCK', 0x0100); // Named thusly to make sure nobody confuses this with ITEM_BLOCKED /** * Item Flags diff --git a/include/notifier.php b/include/notifier.php index dea9d6072..a0c07200a 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -241,6 +241,11 @@ function notifier_run($argv, $argc){ return; } + if($target_item['item_restrict'] & ITEM_BUILDBLOCK) { + logger('notifier: target item ITEM_BUILDBLOCK', LOGGER_DEBUG); + return; + } + $s = q("select * from channel where channel_id = %d limit 1", intval($target_item['uid']) diff --git a/mod/item.php b/mod/item.php index dc8ee5015..1893a6ef4 100644 --- a/mod/item.php +++ b/mod/item.php @@ -70,6 +70,7 @@ function item_post(&$a) { $categories = ((x($_REQUEST,'category')) ? escape_tags($_REQUEST['category']) : ''); $webpage = ((x($_REQUEST,'webpage')) ? intval($_REQUEST['webpage']) : 0); $pagetitle = ((x($_REQUEST,'pagetitle')) ? escape_tags($_REQUEST['pagetitle']): ''); + $buildblock = ((x($_REQUEST,'buildblock')) ? intval($_REQUEST['buildblock']) : 0); if($pagetitle) { require_once('library/urlify/URLify.php'); @@ -492,6 +493,8 @@ function item_post(&$a) { if($webpage) $item_restrict = $item_restrict | ITEM_WEBPAGE; + if($buildblock) + $item_restrict = $item_restrict | ITEM_BUILDBLOCK; if(! strlen($verb)) -- cgit v1.2.3 From 55cb32248953c6e63a2da478f0eb3895875f93d8 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 01:24:02 -0700 Subject: a bit more work on menus --- include/menu.php | 8 ++++++++ mod/menu.php | 18 ++++++++++++++++++ version.inc | 2 +- view/tpl/menulist.tpl | 16 ++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 view/tpl/menulist.tpl diff --git a/include/menu.php b/include/menu.php index ad9d3eb1c..951a2b1fe 100644 --- a/include/menu.php +++ b/include/menu.php @@ -80,6 +80,14 @@ function menu_create($arr) { } +function menu_list($channel_id) { + $r = q("select * from menu where menu_channel_id = %d order by menu_name", + intval($channel_id) + ); + return $r; +} + + function menu_edit($arr) { diff --git a/mod/menu.php b/mod/menu.php index 3198027f4..a624b4727 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -27,6 +27,24 @@ function menu_content(&$a) { if(argc() == 1) { // list menus + $x = menu_list(local_user()); + if($x) { + $o = replace_macros(get_markup_template('menulist.tpl'),array( + '$title' => t('Manage Menus'), + '$menus' => $x, + '$edit' => t('Edit'), + '$drop' => t('Drop'), + '$new' => t('New'), + '$hintnew' => t('Create a new menu'), + '$hintdrop' => t('Delete this menu'), + '$hintedit' => t('Edit this menu') + )); + } + return $o; + + + + } diff --git a/version.inc b/version.inc index d95786ab1..551ca203d 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-08-12.403 +2013-08-13.404 diff --git a/view/tpl/menulist.tpl b/view/tpl/menulist.tpl new file mode 100644 index 000000000..3ad92cb7e --- /dev/null +++ b/view/tpl/menulist.tpl @@ -0,0 +1,16 @@ +

    {{$title}}

    + +{{$hintnew}} + +
    + +{{if $menus }} + +{{/if}} + + + -- cgit v1.2.3 From b9a8b73392afc6e460073ac6305da24623de5b49 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 02:06:05 -0700 Subject: untested patch for issue #58 - will require theming if it works --- boot.php | 18 ++++++------------ include/Contact.php | 18 ++++++++++++++++++ view/tpl/profile_vcard.tpl | 4 ++++ 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/boot.php b/boot.php index 6d5ca337b..b59b7024c 100755 --- a/boot.php +++ b/boot.php @@ -1623,20 +1623,13 @@ function profile_sidebar($profile, $block = 0) { call_hooks('profile_sidebar_enter', $profile); - // don't show connect link to yourself - $connect = (($profile['uid'] != local_user()) ? t('Connect') : False); + require_once('include/Contact.php'); - // don't show connect link to authenticated visitors either - - if(remote_user() && count($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $visitor) { - if($visitor['uid'] == $profile['uid']) { - $connect = false; - break; - } - } - } + $connect_url = rconnect_url($profile['uid'],get_observer_xchan()); + $connect = (($connect_url) ? t('Connect') : ''); + if($connect_url) + $connect_url = $connect_url . '/follow?f=1&url=' . $profile['channel_address'] . '@' . $a->get_hostname(); // show edit profile to yourself if($is_owner) { @@ -1702,6 +1695,7 @@ function profile_sidebar($profile, $block = 0) { $o .= replace_macros($tpl, array( '$profile' => $profile, '$connect' => $connect, + '$connect_url' => $connect_url, '$location' => $location, '$gender' => $gender, '$pdesc' => $pdesc, diff --git a/include/Contact.php b/include/Contact.php index b9ad1e4cb..6b0ffe4f7 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -1,6 +1,24 @@
    {{$homepage}}
    {{$profile.homepage}}
    {{/if}} + +{{if $connect}} +$connect +{{/if}}
-- cgit v1.2.3 From d6c6a2b144ad1c619cef70310bad7e0cdc920e77 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 02:29:10 -0700 Subject: debugging issue #58 - seems to work but needs (more) theming --- boot.php | 2 +- include/Contact.php | 13 ++++++++++--- view/theme/redbasic/css/style.css | 12 ++++++++++++ view/tpl/profile_vcard.tpl | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index b59b7024c..d7f2b437a 100755 --- a/boot.php +++ b/boot.php @@ -1625,7 +1625,7 @@ function profile_sidebar($profile, $block = 0) { require_once('include/Contact.php'); - $connect_url = rconnect_url($profile['uid'],get_observer_xchan()); + $connect_url = rconnect_url($profile['uid'],get_observer_hash()); $connect = (($connect_url) ? t('Connect') : ''); if($connect_url) diff --git a/include/Contact.php b/include/Contact.php index 6b0ffe4f7..992ed27e2 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -3,20 +3,27 @@ function rconnect_url($channel_id,$xchan) { + if(! $xchan) return ''; - $r = q("select abook_id from abook where abook_channel_id = %d and abook_xchan = '%s' limit 1", + + $r = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s' limit 1", intval($channel_id), dbesc($xchan) ); + if($r) return ''; - $r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and (hubloc_flags & HUBLOC_FLAGS_PRIMARY) limit 1", - dbesc($xchan) + + $r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and ( hubloc_flags & %d ) limit 1", + dbesc($xchan), + intval(HUBLOC_FLAGS_PRIMARY) ); + if($r) return $r[0]['hubloc_url']; return ''; + } function abook_connections($channel_id, $sql_conditions = '') { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 9687443df..abfeb44bc 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2091,6 +2091,18 @@ aside input[type='text'] { margin-right: 50px; } +.rconnect { + display: block; + color: #FFFFFF; + margin-top: 15px; + background-color: #FF6666; + -webkit-border-radius: $radiuspx ; + -moz-border-radius: $radiuspx; + border-radius: $radiuspx; + padding: 5px; + font-weight: bold; +} + #dfrn-request-networks { margin-bottom: 30px; diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 634c48e03..5262adf61 100755 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -46,7 +46,7 @@ {{if $connect}} -$connect +{{$connect}} {{/if}} -- cgit v1.2.3 From 680baff73d70769714d806c00cc84c6e65faba0f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 18:10:03 -0700 Subject: menu management complete (as opposed to menu *content* management, which is not). As usual, this means functionally complete - as theming and presentation have been left for those more suited to the task. --- include/menu.php | 23 ++++++++++++++++++ mod/menu.php | 62 ++++++++++++++++++++++++++++++++++++++---------- view/tpl/field_input.tpl | 2 +- view/tpl/menuedit.tpl | 21 ++++++++++++++++ view/tpl/menulist.tpl | 2 +- 5 files changed, 95 insertions(+), 15 deletions(-) create mode 100644 view/tpl/menuedit.tpl diff --git a/include/menu.php b/include/menu.php index 951a2b1fe..cee17c1e9 100644 --- a/include/menu.php +++ b/include/menu.php @@ -38,6 +38,18 @@ function menu_render($menu) { } +function menu_fetch_id($menu_id,$channel_id) { + + $r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1", + intval($menu_id), + intval($channel_id) + ); + + return (($r) ? $r[0] : false); +} + + + function menu_create($arr) { @@ -103,6 +115,17 @@ function menu_edit($arr) { return false; + $r = q("select menu_id from menu where menu_name = '%s' and menu_channel_id = %d limit 1", + dbesc($menu_name), + intval($menu_channel_id) + ); + if(($r) && ($r[0]['menu_id'] != $menu_id)) { + logger('menu_edit: duplicate menu name for channel ' . $menu_channel_id); + return false; + } + + + $menu_channel_id = intval($arr['menu_channel_id']); $r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1", diff --git a/mod/menu.php b/mod/menu.php index a624b4727..f00bf7a78 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -7,12 +7,29 @@ function menu_post(&$a) { if(! local_user()) return; - $channel = $a->get_channel(); - $menu_id = ((argc() > 1) ? intval(argv(1)) : 0); + $_REQUEST['menu_channel_id'] = local_user(); - $menu_name = (($_REQUEST['menu_name']) ? $_REQUEST['menu_name'] : ''); - $menu_desc = (($_REQUEST['menu_desc']) ? $_REQUEST['menu_desc'] : ''); + $menu_id = ((argc() > 1) ? intval(argv(1)) : 0); + if($menu_id) { + $_REQUEST['menu_id'] = intval(argv(1)); + $r = menu_edit($_REQUEST); + if($r) { + info( t('Menu updated.') . EOL); + goaway(z_root() . '/mitem/' . $menu_id); + } + else + notice( t('Unable to update menu.'). EOL); + } + else { + $r = menu_create($_REQUEST); + if($r) { + info( t('Menu created.') . EOL); + goaway(z_root() . '/mitem/' . $r); + } + else + notice( t('Unable to create menu.'). EOL); + } } @@ -37,6 +54,7 @@ function menu_content(&$a) { '$new' => t('New'), '$hintnew' => t('Create a new menu'), '$hintdrop' => t('Delete this menu'), + '$hintcontent' => t('Edit menu contents'), '$hintedit' => t('Edit this menu') )); } @@ -50,14 +68,22 @@ function menu_content(&$a) { if(argc() > 1) { - if(argv(1) === 'new') { - // new menu - - - + if(argv(1) === 'new') { + $o = replace_macros(get_markup_template('menuedit.tpl'), array( + '$header' => t('New Menu'), + '$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'), ''), + '$submit' => t('Create') + )); + return $o; } elseif(intval(argv(1))) { + $m = menu_fetch_id(intval(argv(1)),local_user()); + if(! $m) { + notice( t('Menu not found.') . EOL); + return ''; + } if(argc() == 3 && argv(2) == 'drop') { $r = menu_delete_id(intval(argv(1)),local_user()); if($r) @@ -68,12 +94,22 @@ function menu_content(&$a) { goaway(z_root() . '/menu'); } else { - // edit menu - - + $o = replace_macros(get_markup_template('menuedit.tpl'), array( + '$header' => t('Edit Menu'), + '$menu_id' => intval(argv(1)), + '$hintedit' => t('Add or remove entries to this menu'), + '$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_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''), + '$submit' => t('Modify') + )); + return $o; } } - + else { + notice( t('Not found.') . EOL); + return; + } } } diff --git a/view/tpl/field_input.tpl b/view/tpl/field_input.tpl index 2cb3cb91e..d5b3d6b4e 100755 --- a/view/tpl/field_input.tpl +++ b/view/tpl/field_input.tpl @@ -1,6 +1,6 @@
- + {{if $field.4}} {{$field.4}} {{/if}} {{$field.3}}
diff --git a/view/tpl/menuedit.tpl b/view/tpl/menuedit.tpl new file mode 100644 index 000000000..a46727c55 --- /dev/null +++ b/view/tpl/menuedit.tpl @@ -0,0 +1,21 @@ + +

{{$header}}

+ +{{if $menu_id}} +{{$editcontents}} +{{/if}} + + diff --git a/view/tpl/menulist.tpl b/view/tpl/menulist.tpl index 3ad92cb7e..0761322cd 100644 --- a/view/tpl/menulist.tpl +++ b/view/tpl/menulist.tpl @@ -7,7 +7,7 @@ {{if $menus }} {{/if}} -- cgit v1.2.3 From 9508967c7350e69bf3321aaa63f5527a3e8096f4 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 20:57:03 -0700 Subject: menu management is now functional with the exception of acl's (and of course a way to display the menus you create, and probably a bit more input sanity checking) --- boot.php | 2 +- include/menu.php | 4 +- mod/menu.php | 2 +- mod/mitem.php | 145 +++++++++++++++++++++++++++++++++++++++++++------- view/tpl/menuedit.tpl | 2 +- view/tpl/menulist.tpl | 2 +- view/tpl/usermenu.tpl | 2 +- 7 files changed, 133 insertions(+), 26 deletions(-) diff --git a/boot.php b/boot.php index d7f2b437a..2b2c58488 100755 --- a/boot.php +++ b/boot.php @@ -289,7 +289,7 @@ define ( 'ATTACH_FLAG_OS', 0x0002); define ( 'MENU_ITEM_ZID', 0x0001); - +define ( 'MENU_ITEM_NEWWIN', 0x0002); /** diff --git a/include/menu.php b/include/menu.php index cee17c1e9..8d4664385 100644 --- a/include/menu.php +++ b/include/menu.php @@ -29,7 +29,9 @@ function menu_render($menu) { return ''; for($x = 0; $x < count($menu['items']); $x ++) if($menu['items']['mitem_flags'] & MENU_ITEM_ZID) - $menu['items']['link'] = zid($menu['items']['link']); + $menu['items']['mitem_link'] = zid($menu['items']['mitem_link']); + if($menu['items']['mitem_flags'] & MENU_ITEM_NEWWIN) + $menu['items']['newwin'] = '1'; return replace_macros(get_markup_template('usermenu.tpl'),array( '$menu' => $menu['menu'], diff --git a/mod/menu.php b/mod/menu.php index f00bf7a78..910fc389b 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -22,7 +22,7 @@ function menu_post(&$a) { } else { $r = menu_create($_REQUEST); - if($r) { + if($r) { info( t('Menu created.') . EOL); goaway(z_root() . '/mitem/' . $r); } diff --git a/mod/mitem.php b/mod/mitem.php index b2ccaa341..2b890d5a1 100644 --- a/mod/mitem.php +++ b/mod/mitem.php @@ -1,20 +1,40 @@ data['menu'] = $m; + +} + function mitem_post(&$a) { if(! local_user()) return; - $channel = $a->get_channel(); - $mitem_id = ((argc() > 1) ? intval(argv(1)) : 0); + if(! $a->data['menu']) + return; - $mitem_link = (($_REQUEST['mitem_link']) ? $_REQUEST['menu_link'] : ''); - $mitem_desc = (($_REQUEST['mitem_desc']) ? $_REQUEST['mitem_desc'] : ''); - $mitem_order = (($_REQUEST['mitem_order']) ? intval($_REQUEST['mitem_order']) : 0); - $mitem_id = (($_REQUEST['mitem_id']) ? intval($_REQUEST['mitem_id']) : 0); + $_REQUEST['mitem_channel_id'] = local_user(); + $_REQUEST['menu_id'] = $a->data['menu']['menu_id']; - $mitem_flags = (($_REQUEST['mitem_zid']) ? MENU_ITEM_ZID : 0); + $_REQUEST['mitem_flags'] = 0; + if($_REQUEST['usezid']) + $_REQUEST['mitem_flags'] |= MENU_ITEM_ZID; + if($_REQUEST['newwin']) + $_REQUEST['mitem_flags'] |= MENU_ITEM_NEWWIN; +// FIXME!!!! if ((! $_REQUEST['contact_allow']) && (! $_REQUEST['group_allow']) @@ -35,6 +55,34 @@ function mitem_post(&$a) { $str_contact_deny = perms2str($_REQUEST['contact_deny']); } + + + + $mitem_id = ((argc() > 2) ? intval(argv(2)) : 0); + if($mitem_id) { + $_REQUEST['mitem_id'] = $mitem_id; + $r = menu_edit_item($_REQUEST['menu_id'],local_user(),$_REQUEST); + if($r) { + info( t('Menu element updated.') . EOL); + goaway(z_root() . '/mitem/' . $_REQUEST['menu_id']); + } + else + notice( t('Unable to update menu element.') . EOL); + + } + else { + $r = menu_add_item($_REQUEST['menu_id'],local_user(),$_REQUEST); + if($r) { + info( t('Menu element added.') . EOL); + goaway(z_root() . '/mitem/' . $_REQUEST['menu_id']); + } + else + notice( t('Unable to add menu element.') . EOL); + + } + + + } @@ -45,24 +93,67 @@ function mitem_content(&$a) { return ''; } - - if(argc() == 1) { - // list menus - + if(argc() < 2 || (! $a->data['menu'])) { + notice( t('Not found.') . EOL); + return ''; } - if(argc() > 1) { - if(argv(1) === 'new') { - // new menu + $m = menu_fetch($a->data['menu']['menu_name'],local_user(), get_observer_hash()); + $a->set_widget('menu_preview',menu_render($m)); + + + if(argc() == 2) { + $r = q("select * from menu_item where mitem_menu_id = %d and mitem_channel_id = %d order by mitem_order asc, mitem_desc asc", + intval($a->data['menu']['menu_id']), + local_user() + ); + + if($r) { + $o = replace_macros(get_markup_template('mitemlist.tpl'),array( + '$title' => t('Manage Menu Elements'), + '$menuname' => $a->data['menu']['menu_name'], + '$menudesc' => $a->data['menu']['menu_desc'], + '$edmenu' => t('Edit menu'), + '$menu_id' => $a->data['menu']['menu_id'], + '$mlist' => $r, + '$edit' => t('Edit element'), + '$drop' => t('Drop element'), + '$new' => t('New element'), + '$hintmenu' => t('Edit this menu container'), + '$hintnew' => t('Add menu element'), + '$hintdrop' => t('Delete this menu item'), + '$hintedit' => t('Edit this menu item') + )); + } + + return $o; + + } + if(argc() > 2) { + if(argv(2) === 'new') { + + $o = replace_macros(get_markup_template('mitemedit.tpl'), array( + '$header' => t('New Menu Element'), + '$menu_id' => $a->data['menu']['menu_id'], + '$mitem_desc' => array('mitem_desc', t('Link text'), '', '','*'), + '$mitem_link' => array('mitem_link', t('URL of link'), '', '', '*'), + '$usezid' => array('usezid', t('Use Red magic-auth if available'), true, ''), + '$newwin' => array('newwin', t('Open link in new window'), false,''), +// permissions go here + '$mitem_order' => array('mitem_order', t('Order in list'),'0',t('Higher numbers will sink to bottom of listing')), + '$submit' => t('Create') + )); + return $o; } - elseif(intval(argv(1))) { + + elseif(intval(argv(2))) { $m = q("select * from menu_item where mitem_id = %d and mitem_channel_id = %d limit 1", - intval(argv(1)), + intval(argv(2)), intval(local_user()) ); if(! $m) { @@ -71,19 +162,33 @@ function mitem_content(&$a) { } $mitem = $m[0]; - if(argc() == 3 && argv(2) == 'drop') { - $r = menu_del_item($mitem['mitem_menu_id'], local_user(),intval(argv(1))); + + if(argc() == 4 && argv(3) == 'drop') { + $r = menu_del_item($mitem['mitem_menu_id'], local_user(),intval(argv(2))); if($r) info( t('Menu item deleted.') . EOL); else notice( t('Menu item could not be deleted.'). EOL); - goaway(z_root() . '/menu'); + goaway(z_root() . '/mitem/' . $mitem['mitem_menu_id']); } else { - // edit menu item + // edit menu item + $o = replace_macros(get_markup_template('mitemedit.tpl'), array( + '$header' => t('Edit Menu Element'), + '$menu_id' => $a->data['menu']['menu_id'], + '$mitem_id' => intval(argv(2)), + '$mitem_desc' => array('mitem_desc', t('Link text'), $mitem['mitem_desc'], '','*'), + '$mitem_link' => array('mitem_link', t('URL of link'), $mitem['mitem_link'], '', '*'), + '$usezid' => array('usezid', t('Use Red magic-auth if available'), (($mitem['mitem_flags'] & MENU_ITEM_ZID) ? 1 : 0), ''), + '$newwin' => array('newwin', t('Open link in new window'), (($mitem['mitem_flags'] & MENU_ITEM_NEWWIN) ? 1 : 0),''), +// permissions go here + '$mitem_order' => array('mitem_order', t('Order in list'),$mitem['mitem_order'],t('Higher numbers will sink to bottom of listing')), + '$submit' => t('Modify') + )); + return $o; } } diff --git a/view/tpl/menuedit.tpl b/view/tpl/menuedit.tpl index a46727c55..ea9e775e2 100644 --- a/view/tpl/menuedit.tpl +++ b/view/tpl/menuedit.tpl @@ -2,7 +2,7 @@

{{$header}}

{{if $menu_id}} -{{$editcontents}} +{{$editcontents}} {{/if}}