From b58177e3c60fd6dfbe01549bb7894d9c84d40710 Mon Sep 17 00:00:00 2001 From: ken restivo Date: Thu, 14 Jan 2016 21:05:36 -0800 Subject: Use ctrl-d for multi-line messages. --- util/hz | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util/hz b/util/hz index baa5bfb55..cb6ccf419 100755 --- a/util/hz +++ b/util/hz @@ -12,7 +12,7 @@ echo " USER=youruserame " echo " PASS=yourpass" echo " HUB=your.hub.domain.org" echo -echo "Type \"hz\" (with or without a conf file as an arg), then enter your message. Hit ENTER to send." +echo "Type \"hz\" (with or without a conf file as an arg), then enter your message. Use ctrl-D to send.." } @@ -29,8 +29,10 @@ CUR=`which curl` [ "$PASS" ] || { echo "no PASS"; usage; exit 1; } [ "$HUB" ] || { echo "no HUB"; usage; exit 1; } -echo "enter your message to be posted as $USER @ $HUB, then hit ENTER to send:" +echo "enter your message to be posted as $USER @ $HUB, then hit Ctrl-D to send." -(read MSG; curl -ssl -u${USER}:${PASS} --data-urlencode "status=${MSG}" https://${HUB}/api/statuses/update ) +MSG=$(cat) + +curl -ssl -u${USER}:${PASS} --data-urlencode "status=${MSG}" https://${HUB}/api/statuses/update -- cgit v1.2.3 From 63ee0daac51b8c04123479f2ac91e1762492896f Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 15 Jan 2016 10:42:44 +0100 Subject: provide more contact infos and update some protocol type definitions --- boot.php | 8 ++++---- include/contact_selectors.php | 2 +- mod/connections.php | 5 ++++- view/tpl/connection_template.tpl | 10 ++++++++++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/boot.php b/boot.php index fd309451f..da1ba2ac5 100755 --- a/boot.php +++ b/boot.php @@ -271,11 +271,11 @@ define ( 'MENU_BOOKMARK', 0x0002 ); * Network and protocol family types */ -define ( 'NETWORK_DFRN', 'dfrn'); // Friendica, Mistpark, other DFRN implementations -define ( 'NETWORK_ZOT', 'zot!'); // Zot! +define ( 'NETWORK_DFRN', 'friendica-over-diaspora'); // Friendica, Mistpark, other DFRN implementations +define ( 'NETWORK_ZOT', 'zot'); // Zot! define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations -define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol -define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora +define ( 'NETWORK_FEED', 'rss'); // RSS/Atom feeds with no known "post/notify" protocol +define ( 'NETWORK_DIASPORA', 'diaspora'); // Diaspora define ( 'NETWORK_MAIL', 'mail'); // IMAP/POP define ( 'NETWORK_MAIL2', 'mai2'); // extended IMAP/POP define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API diff --git a/include/contact_selectors.php b/include/contact_selectors.php index 8671f1bd1..d44bee784 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -79,7 +79,7 @@ function network_to_name($s) { NETWORK_MAIL => t('Email'), NETWORK_DIASPORA => t('Diaspora'), NETWORK_FACEBOOK => t('Facebook'), - NETWORK_ZOT => t('Zot!'), + NETWORK_ZOT => t('Zot'), NETWORK_LINKEDIN => t('LinkedIn'), NETWORK_XMPP => t('XMPP/IM'), NETWORK_MYSPACE => t('MySpace'), diff --git a/mod/connections.php b/mod/connections.php index 1635dcee0..08da4a790 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -231,7 +231,7 @@ function connections_content(&$a) { $status_str = ''; $status = array( - ((intval($rr['abook_pending'])) ? t('Pending') : ''), + ((intval($rr['abook_pending'])) ? t('Pending approval') : ''), ((intval($rr['abook_archived'])) ? t('Archived') : ''), ((intval($rr['abook_hidden'])) ? t('Hidden') : ''), ((intval($rr['abook_ignored'])) ? t('Ignored') : ''), @@ -262,6 +262,9 @@ function connections_content(&$a) { 'edit' => t('Edit'), 'delete' => t('Delete'), 'url' => chanlink_url($rr['xchan_url']), + 'webbie_label' => t('Channel address'), + 'webbie' => $rr['xchan_addr'], + 'network_label' => t('Network'), 'network' => network_to_name($rr['xchan_network']), 'public_forum' => ((intval($rr['xchan_pubforum'])) ? true : false), 'status_label' => t('Status'), diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl index 9813b83e2..a0bdf33aa 100755 --- a/view/tpl/connection_template.tpl +++ b/view/tpl/connection_template.tpl @@ -21,6 +21,16 @@ {{$contact.connected_label}}: {{/if}} + {{if $contact.webbie}} +
+ {{$contact.webbie_label}}: {{$contact.webbie}} +
+ {{/if}} + {{if $contact.network}} +
+ {{$contact.network_label}}: {{$contact.network}} +
+ {{/if}} -- cgit v1.2.3 From f4e1b2123aed39e3f863ee327b27cb0e7f17520c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 15 Jan 2016 11:28:05 +0100 Subject: add an approve button to /connections and get rid of the modal popup in /connedit. for quick approval (default collection and perms etc.) we now can use the approve button in /connections else click the edit button and make changes and approval from /connedit. hope thats any better... --- mod/connections.php | 8 +++----- mod/connedit.php | 4 ---- view/tpl/abook_edit.tpl | 19 ------------------- view/tpl/connection_template.tpl | 9 ++++++++- 4 files changed, 11 insertions(+), 29 deletions(-) diff --git a/mod/connections.php b/mod/connections.php index 08da4a790..3297ae8f8 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -251,15 +251,11 @@ function connections_content(&$a) { 'edit_hover' => t('Edit connection'), 'delete_hover' => t('Delete connection'), 'id' => $rr['abook_id'], - 'alt_text' => $alt_text, - 'dir_icon' => $dir_icon, 'thumb' => $rr['xchan_photo_m'], 'name' => $rr['xchan_name'], - 'username' => $rr['xchan_name'], 'classes' => (intval($rr['abook_archived']) ? 'archived' : ''), 'link' => z_root() . '/connedit/' . $rr['abook_id'], 'deletelink' => z_root() . '/connedit/' . $rr['abook_id'] . '/drop', - 'edit' => t('Edit'), 'delete' => t('Delete'), 'url' => chanlink_url($rr['xchan_url']), 'webbie_label' => t('Channel address'), @@ -270,7 +266,9 @@ function connections_content(&$a) { 'status_label' => t('Status'), 'status' => $status_str, 'connected_label' => t('Connected'), - 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c') + 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c'), + 'approve_hover' => t('Approve connection'), + 'approve' => (($rr['abook_pending']) ? t('Approve') : false) ); } } diff --git a/mod/connedit.php b/mod/connedit.php index bcf2d744b..cb785fc31 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -714,10 +714,6 @@ function connedit_content(&$a) { '$slide' => $slide, '$affinity' => $affinity, '$pending_label' => t('Connection Pending Approval'), - '$pending_modal_title' => t('Connection Request'), - '$pending_modal_body' => sprintf(t('(%s) would like to connect with you. Please approve this connection to allow communication.'), $contact['xchan_addr']), - '$pending_modal_approve' => t('Approve'), - '$pending_modal_dismiss' => t('Approve Later'), '$is_pending' => (intval($contact['abook_pending']) ? 1 : ''), '$unapproved' => $unapproved, '$inherited' => t('inherited'), diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 255ed9cfa..4fa810cb4 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -73,25 +73,6 @@ - - {{/if}} {{if $affinity }} diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl index a0bdf33aa..2629e5cf4 100755 --- a/view/tpl/connection_template.tpl +++ b/view/tpl/connection_template.tpl @@ -1,8 +1,15 @@
+ {{if $contact.approve}} +
+ + {{/if}} {{$contact.delete}} - {{$contact.edit}} + + {{if $contact.approve}} +
+ {{/if}}

{{if $contact.public_forum}} {{/if}}{{$contact.name}}

-- cgit v1.2.3 From d36aa4fc89f99dc408e356347e74eead746f3e53 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 15 Jan 2016 12:08:04 +0100 Subject: provide a recent activity link in /connections --- mod/connections.php | 6 ++++-- view/tpl/connection_template.tpl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mod/connections.php b/mod/connections.php index 3297ae8f8..f43dec73e 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -255,7 +255,7 @@ function connections_content(&$a) { 'name' => $rr['xchan_name'], 'classes' => (intval($rr['abook_archived']) ? 'archived' : ''), 'link' => z_root() . '/connedit/' . $rr['abook_id'], - 'deletelink' => z_root() . '/connedit/' . $rr['abook_id'] . '/drop', + 'deletelink' => z_root() . '/connedit/' . intval($rr['abook_id']) . '/drop', 'delete' => t('Delete'), 'url' => chanlink_url($rr['xchan_url']), 'webbie_label' => t('Channel address'), @@ -268,7 +268,9 @@ function connections_content(&$a) { 'connected_label' => t('Connected'), 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c'), 'approve_hover' => t('Approve connection'), - 'approve' => (($rr['abook_pending']) ? t('Approve') : false) + 'approve' => (($rr['abook_pending']) ? t('Approve') : false), + 'recent_label' => t('Recent activity'), + 'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']) ); } } diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl index 2629e5cf4..143989971 100755 --- a/view/tpl/connection_template.tpl +++ b/view/tpl/connection_template.tpl @@ -35,7 +35,7 @@ {{/if}} {{if $contact.network}}
- {{$contact.network_label}}: {{$contact.network}} + {{$contact.network_label}}: {{$contact.network}} - {{$contact.recent_label}}
{{/if}}
-- cgit v1.2.3 From 2498df68c716ec6ed80b5547c721ca9741a85572 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 15 Jan 2016 13:20:45 +0100 Subject: change button order for consistency --- view/tpl/direntry.tpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl index ecc38beb9..57e6e1555 100755 --- a/view/tpl/direntry.tpl +++ b/view/tpl/direntry.tpl @@ -1,16 +1,17 @@
- {{if $entry.viewrate}} - {{if $entry.canrate}}{{/if}} - {{if $entry.total_ratings}}{{$entry.total_ratings}}{{/if}} - {{/if}} {{if $entry.ignlink}} {{$entry.ignore_label}} {{/if}} {{if $entry.connect}} {{$entry.conn_label}} {{/if}} + {{if $entry.viewrate}} + {{if $entry.total_ratings}}{{$entry.total_ratings}}{{/if}} + {{if $entry.canrate}}{{/if}} + + {{/if}}

{{if $entry.public_forum}} {{/if}}{{$entry.name}}{{if $entry.online}} {{/if}}

-- cgit v1.2.3