diff --git a/doc/Accesskeys.md b/doc/Accesskeys.md new file mode 100644 index 0000000000..0c00c25476 --- /dev/null +++ b/doc/Accesskeys.md @@ -0,0 +1,70 @@ +Accesskeys in Friendica +======================= + +General +------- +* p: profile +* n: network +* c: community +* s: search +* a: admin +* f: notifications +* u: user menu (in themes "vier" and "quattro") + +/profile +-------- +* m: Status Messages and Posts +* r: Profile Details +* h: Photo Albums +* v: Videos +* e: Events and Calendar +* t: Personal Notes + +/contacts (contact list) +--------- +* g: Suggestions +* l: Show all Contacts +* o: Only show unblocked contacts +* b: Only show blocked contacts +* i: Only show ignored contacts +* y: Only show archived contacts +* h: Only show hidden contacts + +/contacts (single contact view) +------------------------------- +* b: Toggle Blocked status +* i: Toggle Ignored status +* v: Toggle Archive status +* r: Repair + +/message +-------- +* m: New message + +/network +-------- +* e: Sort by Comment Date +* t: Sort by Post Date +* r: Conversation (Posts that mention or involve you) +* w: New posts +* b: Bookmarks +* m: Favourite Posts + +/notifications +-------------- +* y: System +* w: Network +* r: Personal +* h: Home +* i: Introductions + +/settings +--------- +* o: Account +* t: Additional features +* w: Social Networks +* l: Plugins +* d: Delegations +* b: Connected apps +* e: Export personal data +* r: Remove account diff --git a/doc/Home.md b/doc/Home.md index 0685236286..1c293e4a51 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -10,6 +10,7 @@ Friendica Documentation and Resources * [BBCode tag reference](help/BBCode) * [Comment, sort and delete posts](help/Text_comment) * [Profiles](help/Profiles) + * [Accesskey reference](help/Accesskeys * You and other users * [Connectors](help/Connectors) * [Making Friends](help/Making-Friends) diff --git a/doc/de/Home.md b/doc/de/Home.md index 0fd5634cc3..bc022a1a27 100644 --- a/doc/de/Home.md +++ b/doc/de/Home.md @@ -10,6 +10,7 @@ Friendica - Dokumentation und Ressourcen * [Referenz der BBCode Elemente](help/BBCode) * [Beiträge kommentieren, einordnen und löschen](help/Text_comment) * [Profile](help/Profiles) + * [Referenz der Accesskeys](help/Accesskeys) * Du und andere Nutzer * [Konnektoren (Connectors)](help/Connectors) * [Freunde finden](help/Making-Friends) diff --git a/include/bbcode.php b/include/bbcode.php index e872d859c5..8102fc3f71 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1207,7 +1207,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal // fix any escaped ampersands that may have been converted into links $Text = preg_replace("/\<([^>]*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); - $Text = preg_replace("/\<([^>]*?)(src|href)=\"(?!http|ftp|mailto|cid)(.*?)\>/ism",'<$1$2="">',$Text); + $Text = preg_replace("/\<([^>]*?)(src|href)=\"(?!http|ftp|mailto|gopher|cid)(.*?)\>/ism",'<$1$2="">',$Text); if($saved_image) $Text = bb_replace_images($Text, $saved_image); diff --git a/include/conversation.php b/include/conversation.php index 4aae611804..5a84ca42a6 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -892,9 +892,9 @@ function item_photo_menu($item){ foreach($menu as $k=>$v){ if(strpos($v,'javascript:') === 0) { $v = substr($v,11); - $o .= "
  • $k
  • \n"; + $o .= "
  • $k
  • \n"; } - elseif ($v!="") $o .= "
  • $k
  • \n"; + elseif ($v!="") $o .= "
  • $k
  • \n"; } return $o; }} diff --git a/include/group.php b/include/group.php index bbfac7ac1d..b7e1963bf3 100644 --- a/include/group.php +++ b/include/group.php @@ -263,8 +263,8 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 ); } } - - + + $tpl = get_markup_template("group_side.tpl"); $o = replace_macros($tpl, array( '$title' => t('Groups'), @@ -276,8 +276,8 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 '$groups' => $groups, '$add' => t('add'), )); - - + + return $o; } diff --git a/include/identity.php b/include/identity.php index b584896d36..9f3e1dda06 100644 --- a/include/identity.php +++ b/include/identity.php @@ -634,6 +634,7 @@ if(! function_exists('profile_tabs')){ 'sel' => ((!isset($tab)&&$a->argv[0]=='profile')?'active':''), 'title' => t('Status Messages and Posts'), 'id' => 'status-tab', + 'accesskey' => 'm', ), array( 'label' => t('Profile'), @@ -641,6 +642,7 @@ if(! function_exists('profile_tabs')){ 'sel' => ((isset($tab) && $tab=='profile')?'active':''), 'title' => t('Profile Details'), 'id' => 'profile-tab', + 'accesskey' => 'r', ), array( 'label' => t('Photos'), @@ -648,6 +650,7 @@ if(! function_exists('profile_tabs')){ 'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''), 'title' => t('Photo Albums'), 'id' => 'photo-tab', + 'accesskey' => 'h', ), array( 'label' => t('Videos'), @@ -655,6 +658,7 @@ if(! function_exists('profile_tabs')){ 'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''), 'title' => t('Videos'), 'id' => 'video-tab', + 'accesskey' => 'v', ), ); @@ -665,6 +669,7 @@ if(! function_exists('profile_tabs')){ 'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''), 'title' => t('Events and Calendar'), 'id' => 'events-tab', + 'accesskey' => 'e', ); $tabs[] = array( 'label' => t('Personal Notes'), @@ -672,6 +677,7 @@ if(! function_exists('profile_tabs')){ 'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''), 'title' => t('Only You Can See This'), 'id' => 'notes-tab', + 'accesskey' => 't', ); } diff --git a/include/text.php b/include/text.php index 829e37c2ce..510db01bf1 100644 --- a/include/text.php +++ b/include/text.php @@ -1676,11 +1676,14 @@ function get_plink($item) { //'href' => $a->get_baseurl()."/display/".$a->user['nickname']."/".$item['id'], 'href' => $a->get_baseurl()."/display/".$item['guid'], 'orig' => $a->get_baseurl()."/display/".$item['guid'], - 'title' => t('link to source'), + 'title' => t('local thread'), + 'orig_title' => t('local thread'), ); - if (x($item,'plink')) + if (x($item,'plink')) { $ret["href"] = $item['plink']; + $ret["title"] = t('link to source'); + } } elseif (x($item,'plink') && ($item['private'] != 1)) $ret = array( diff --git a/mod/contacts.php b/mod/contacts.php index 63dffab67f..826630d305 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -522,12 +522,14 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/block', 'sel' => '', 'title' => t('Toggle Blocked status'), + 'accesskey' => 'b', ), array( 'label' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ), 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/ignore', 'sel' => '', 'title' => t('Toggle Ignored status'), + 'accesskey' => 'i', ), array( @@ -535,12 +537,14 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/archive', 'sel' => '', 'title' => t('Toggle Archive status'), + 'accesskey' => 'v', ), array( 'label' => t('Repair'), 'url' => $a->get_baseurl(true) . '/crepair/' . $contact_id, 'sel' => '', 'title' => t('Advanced Contact Settings'), + 'accesskey' => 'r', ) ); $tab_tpl = get_markup_template('common_tabs.tpl'); @@ -652,21 +656,24 @@ function contacts_content(&$a) { $tabs = array( array( 'label' => t('Suggestions'), - 'url' => $a->get_baseurl(true) . '/suggest', + 'url' => $a->get_baseurl(true) . '/suggest', 'sel' => '', 'title' => t('Suggest potential friends'), + 'accesskey' => 'g', ), array( 'label' => t('All Contacts'), - 'url' => $a->get_baseurl(true) . '/contacts/all', + 'url' => $a->get_baseurl(true) . '/contacts/all', 'sel' => ($all) ? 'active' : '', 'title' => t('Show all contacts'), + 'accesskey' => 'l', ), array( 'label' => t('Unblocked'), 'url' => $a->get_baseurl(true) . '/contacts', 'sel' => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets) && (! $ignored) && (! $archived)) ? 'active' : '', 'title' => t('Only show unblocked contacts'), + 'accesskey' => 'o', ), array( @@ -674,6 +681,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/blocked', 'sel' => ($blocked) ? 'active' : '', 'title' => t('Only show blocked contacts'), + 'accesskey' => 'b', ), array( @@ -681,6 +689,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/ignored', 'sel' => ($ignored) ? 'active' : '', 'title' => t('Only show ignored contacts'), + 'accesskey' => 'i', ), array( @@ -688,6 +697,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/archived', 'sel' => ($archived) ? 'active' : '', 'title' => t('Only show archived contacts'), + 'accesskey' => 'y', ), array( @@ -695,6 +705,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/hidden', 'sel' => ($hidden) ? 'active' : '', 'title' => t('Only show hidden contacts'), + 'accesskey' => 'h', ), ); diff --git a/mod/message.php b/mod/message.php index 178d99bba5..1331ce7fb5 100644 --- a/mod/message.php +++ b/mod/message.php @@ -9,8 +9,9 @@ function message_init(&$a) { 'label' => t('New Message'), 'url' => $a->get_baseurl(true) . '/message/new', 'sel'=> ($a->argv[1] == 'new'), + 'accesskey' => 'm', ); - + $tpl = get_markup_template('message_side.tpl'); $a->page['aside'] = replace_macros($tpl, array( '$tabs'=>$tabs, @@ -29,7 +30,7 @@ function message_init(&$a) { '$baseurl' => $a->get_baseurl(true), '$base' => $base )); - + } function message_post(&$a) { diff --git a/mod/network.php b/mod/network.php index 5562218701..56c0eeb953 100644 --- a/mod/network.php +++ b/mod/network.php @@ -359,12 +359,14 @@ function network_content(&$a, $update = 0) { 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 'sel'=>$all_active, 'title'=> t('Sort by Comment Date'), + 'accesskey' => "e", ), array( 'label' => t('Posted Order'), 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 'sel'=>$postord_active, 'title' => t('Sort by Post Date'), + 'accesskey' => "t", ), ); @@ -374,6 +376,7 @@ function network_content(&$a, $update = 0) { 'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1', 'sel' => $conv_active, 'title' => t('Posts that mention or involve you'), + 'accesskey' => "r", ); } @@ -383,6 +386,7 @@ function network_content(&$a, $update = 0) { 'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ($len_naked_cmd ? '/' : '') . 'new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''), 'sel' => $new_active, 'title' => t('Activity Stream - by date'), + 'accesskey' => "w", ); } @@ -392,6 +396,7 @@ function network_content(&$a, $update = 0) { 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&bmark=1', 'sel'=>$bookmarked_active, 'title'=> t('Interesting Links'), + 'accesskey' => "b", ); } @@ -401,6 +406,7 @@ function network_content(&$a, $update = 0) { 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1', 'sel'=>$starred_active, 'title' => t('Favourite Posts'), + 'accesskey' => "m", ); } diff --git a/mod/notifications.php b/mod/notifications.php index 2ecc2621eb..09666d08c2 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -78,26 +78,31 @@ function notifications_content(&$a) { 'label' => t('System'), 'url'=>$a->get_baseurl(true) . '/notifications/system', 'sel'=> (($a->argv[1] == 'system') ? 'active' : ''), + 'accesskey' => 'y', ), array( 'label' => t('Network'), 'url'=>$a->get_baseurl(true) . '/notifications/network', 'sel'=> (($a->argv[1] == 'network') ? 'active' : ''), + 'accesskey' => 'w', ), array( 'label' => t('Personal'), 'url'=>$a->get_baseurl(true) . '/notifications/personal', 'sel'=> (($a->argv[1] == 'personal') ? 'active' : ''), + 'accesskey' => 'r', ), array( 'label' => t('Home'), 'url' => $a->get_baseurl(true) . '/notifications/home', 'sel'=> (($a->argv[1] == 'home') ? 'active' : ''), + 'accesskey' => 'h', ), array( 'label' => t('Introductions'), 'url' => $a->get_baseurl(true) . '/notifications/intros', 'sel'=> (($a->argv[1] == 'intros') ? 'active' : ''), + 'accesskey' => 'i', ), /*array( 'label' => t('Messages'), diff --git a/mod/profile.php b/mod/profile.php index 94e3c0a37f..608971d08d 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -181,7 +181,7 @@ function profile_content(&$a, $update = 0) { $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false); $commvisitor = (($commpage && $remote_contact == true) ? true : false); - $a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); + $a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); if(can_write_wall($a,$a->profile['profile_uid'])) { @@ -191,8 +191,8 @@ function profile_content(&$a, $update = 0) { 'allow_location' => ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? true : false), 'default_location' => (($is_owner) ? $a->user['default-location'] : ''), 'nickname' => $a->profile['nickname'], - 'lockstate' => (((is_array($a->user) && ((strlen($a->user['allow_cid'])) || - (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || + 'lockstate' => (((is_array($a->user) && ((strlen($a->user['allow_cid'])) || + (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'), 'acl' => (($is_owner) ? populate_acl($a->user, true) : ''), 'bang' => '', @@ -302,9 +302,9 @@ function profile_content(&$a, $update = 0) { foreach($r as $rr) $parents_arr[] = $rr['item_id']; $parents_str = implode(', ', $parents_arr); - + $items = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`, - `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`, + `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` FROM `item`, `contact` diff --git a/mod/settings.php b/mod/settings.php index e4ef30a613..dba12fa879 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -41,47 +41,56 @@ function settings_init(&$a) { 'label' => t('Account'), 'url' => $a->get_baseurl(true).'/settings', 'selected' => (($a->argc == 1) && ($a->argv[0] === 'settings')?'active':''), + 'accesskey' => 'o', ), array( 'label' => t('Additional features'), 'url' => $a->get_baseurl(true).'/settings/features', 'selected' => (($a->argc > 1) && ($a->argv[1] === 'features') ? 'active' : ''), + 'accesskey' => 't', ), array( 'label' => t('Display'), 'url' => $a->get_baseurl(true).'/settings/display', 'selected' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''), + 'accesskey' => 'i', ), array( 'label' => t('Social Networks'), 'url' => $a->get_baseurl(true).'/settings/connectors', 'selected' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''), + 'accesskey' => 'w', ), array( 'label' => t('Plugins'), 'url' => $a->get_baseurl(true).'/settings/addon', 'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''), + 'accesskey' => 'l', ), array( 'label' => t('Delegations'), 'url' => $a->get_baseurl(true).'/delegate', 'selected' => (($a->argc == 1) && ($a->argv[0] === 'delegate')?'active':''), + 'accesskey' => 'd', ), array( 'label' => t('Connected apps'), 'url' => $a->get_baseurl(true) . '/settings/oauth', 'selected' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''), + 'accesskey' => 'b', ), array( 'label' => t('Export personal data'), 'url' => $a->get_baseurl(true) . '/uexport', 'selected' => (($a->argc == 1) && ($a->argv[0] === 'uexport')?'active':''), + 'accesskey' => 'e', ), array( 'label' => t('Remove account'), 'url' => $a->get_baseurl(true) . '/removeme', 'selected' => (($a->argc == 1) && ($a->argv[0] === 'removeme')?'active':''), + 'accesskey' => 'r', ) ); diff --git a/view/global.css b/view/global.css index 0033418b86..94896ea232 100644 --- a/view/global.css +++ b/view/global.css @@ -180,15 +180,30 @@ span.oembed, h4 { /* plain text editor upload/select popup */ - -.fbrowser .path a { padding: 5px; } + +.fbrowser .path a { padding: 5px; } .fbrowser .path a:before { content: "/"; padding-right: 5px;} .fbrowser .folders ul { list-style-type: none; padding-left: 10px;} -.fbrowser .list { height: auto; overflow-y: hidden; margin: 10px 0px; } -.fbrowser.image .photo-album-image-wrapper { float: left; } +.fbrowser .list { height: auto; overflow-y: hidden; margin: 10px 0px; } +.fbrowser.image .photo-album-image-wrapper { float: left; } .fbrowser.image a img { height: 48px; } -.fbrowser.image a p { display: none;} -.fbrowser.file .photo-album-image-wrapper { float:none; white-space: nowrap; } -.fbrowser.file img { display: inline; } +.fbrowser.image a p { display: none;} +.fbrowser.file .photo-album-image-wrapper { float:none; white-space: nowrap; } +.fbrowser.file img { display: inline; } .fbrowser.file p { display: inline; white-space: nowrap; } -.fbrowser .upload { clear: both; padding-top: 1em;} +.fbrowser .upload { clear: both; padding-top: 1em;} + +a { + cursor: pointer; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0,0,0,0); + border: 0; +} diff --git a/view/templates/acl_selector.tpl b/view/templates/acl_selector.tpl index c1220bc1e3..bf9470b64e 100644 --- a/view/templates/acl_selector.tpl +++ b/view/templates/acl_selector.tpl @@ -1,7 +1,7 @@
    - {{$showall}} + {{$showall}}
    @@ -11,8 +11,8 @@ {{if $networks}} diff --git a/view/templates/common_tabs.tpl b/view/templates/common_tabs.tpl index 9f12709042..988c1acefc 100644 --- a/view/templates/common_tabs.tpl +++ b/view/templates/common_tabs.tpl @@ -1,6 +1,6 @@ -