diff --git a/Code/Module/Help.php b/Code/Module/Help.php index a2e6edc49..d05c526d1 100644 --- a/Code/Module/Help.php +++ b/Code/Module/Help.php @@ -86,7 +86,12 @@ class Help extends Controller $files = self::listdir('doc'); if ($files) { + usort($files, [ 'self','usort_basename']); foreach ($files as $file) { + + if (! str_contains(z_mime_content_type($file), 'text')) { + continue; + } if ((!strpos($file, '/site/')) && file_exists(str_replace('doc/', 'doc/site/', $file))) { continue; } @@ -102,11 +107,12 @@ class Help extends Controller $language = ''; } - $link = str_replace(['doc/', '.mc'], ['help/', ''], $file); + $link = str_replace(['doc/', '.mc', '.txt'], ['help/', '', ''], $file); + $displayName = str_replace('_',' ', $link); if (str_contains($link, '/global/') || str_contains($link, '/media/')) { continue; } - $content .= '' . (($language) ? " [$language]" : '') . EOL; + $content .= '' . EOL; } } } else { @@ -123,6 +129,10 @@ class Help extends Controller ]); } + public static function usort_basename($a,$b) { + return strcasecmp(basename($a), basename($b)); + } + public static function listdir($path) { $results = []; diff --git a/Code/Widget/Activity.php b/Code/Widget/Activity.php index 2a6b6517c..4eafba137 100644 --- a/Code/Widget/Activity.php +++ b/Code/Widget/Activity.php @@ -59,7 +59,7 @@ class Activity implements WidgetInterface $o .= '

' . t('Activity', 'widget') . '

'; } diff --git a/Code/Widget/Groups.php b/Code/Widget/Groups.php index 06ad6f84e..82a0c94ac 100644 --- a/Code/Widget/Groups.php +++ b/Code/Widget/Groups.php @@ -128,7 +128,7 @@ class Groups implements WidgetInterface } - $output .= ''; + $output .= ''; } $output .= ''; } diff --git a/doc/en/Location_Services.mc b/doc/en/Location_Services.mc new file mode 100644 index 000000000..0fe26192a --- /dev/null +++ b/doc/en/Location_Services.mc @@ -0,0 +1,46 @@ +Location Services +================= + +Location services are tools to use location information in fediverse posts. There are a number of different tools. + +An important location tool is a *Map Provider addon*, which displays embedded maps for location targets. Currently one Map Provider addon is provided - "openstreetmap". Only one Map Provider addon can be installed/active on the system at any time, so if somebody creates a Google Map Provider addon and you wish to use that on your site, the openstreetmap addon must be disabled. + +Location data may be represented by a text string "49 Main street, Oakvale" or geographic coordinates such as "-32.683,147.78". It is important to know that text locations may be ambiguous, as there is a "Santa Cruz" in California, USA and also Bolivia. As a result, many of this software's location services require the use of geographic coordinates - due to their precision. Maps can be displayed for text locations, but please use coordinates to obtain full access to the available location tools. + +## Setting location + +Location settings are on the main Settings page. First select Settings from the main menu ("hamburger menu" at the top right of the page). + +![screenshot showing location settings]([baseurl]/doc/en/locationsettings.png) + +The available settings are as follows: + +### Default post location +Set this to a text based location if you wish. This will be attached to all your posts and comments. Some fediverse software may attempt to display this location if it is relatively unambiguous. Often used to indicate the region or country you are posting from. + +### Obtain post location from your web browser or device +If this option is enabled, your web browser will ask your permission to obtain your device geographic coordinates every time you post something. You may also approve this to happen automatically. This uses your browser location, which is generally quite accurate on mobile and handheld devices, and is often wildly incorrect (in many countries) if you are using a desktop computer. + +### Over-ride your web browser or device and use these coordinates (latitude,longitude) +This setting is often used on desktop computers, allowing you to over-ride the browser location if it is incorrect. The input should in the format "latitude,longitude" and should consist of two floating point numbers representing your geographic coordinates. If both numbers evaluate to 0, location services will not be enabled, despite the fact that this is a valid location off the coast of Africa. + + +## Using location in posts +Location services make use of several buttons in the post editor. These are show in the following diagram: + +![diagram showing location service buttons in post editor]([baseurl]/doc/en/locationwitheditor.png) + +Some or all of these buttons may be missing and will only be available if a coordinate-based location has already been provided. + +1. The first button (represented as a globe) will always be shown. This allows you to set or change your current location. A text input field is provided. You may provide geographic coordinates in the "latitude,longitude" format **or** you can enter a period '.' which instructs your browser to ask you just this once to insert your current device location into the current post. + +2. The next button (represented by an empty circle) is offered any time location data has been inserted into the current post. Clicking this button removes your location information from the post. + +3. The next two buttons display any time geographic location is available in the post. They are "enter" and "leave" icons and are used here to to turn the current post into a "checkin" (Arrive) network activity or a "checkout" (Leave) activity. When either of these options are selected, the icon will change colour to indicate that the post is now a checkin/checkout activity and a map will be inserted into the post. You may add additional text or basically any content. Use the preview ("eye" icon) button to view the results without publishing or click 'Share' to share the post. Clicking one of these buttons a second time undoes the action and turns it back into a normal post. + +![example post preview of a checkin activity]([baseurl]/doc/en/checkin.png) + +## Distance search +Any post which contains geographic coordinates can be used to search by distance. This allows you to quickly see (for instance) restaurant reviews by performing a distance search on any post near that restaurant. To perform a distance search, click on the avatar or photo of the post author. This opens a popup mini-panel with a number of options. If the post contains coordinates, one of these options will be "Nearby", which performs a distance search based on that post. + +![screenshot showing how to navigate to distance search]([baseurl]/doc/en/nearby.png) diff --git a/doc/en/checkin.png b/doc/en/checkin.png new file mode 100644 index 000000000..75d902452 Binary files /dev/null and b/doc/en/checkin.png differ diff --git a/doc/en/locationsettings.png b/doc/en/locationsettings.png new file mode 100644 index 000000000..11e73c78c Binary files /dev/null and b/doc/en/locationsettings.png differ diff --git a/doc/en/locationwitheditor.png b/doc/en/locationwitheditor.png new file mode 100644 index 000000000..f134bc6fd Binary files /dev/null and b/doc/en/locationwitheditor.png differ diff --git a/doc/en/nearby.png b/doc/en/nearby.png new file mode 100644 index 000000000..5d40977bf Binary files /dev/null and b/doc/en/nearby.png differ diff --git a/include/help.php b/include/help.php index f9612c250..fdf091946 100644 --- a/include/help.php +++ b/include/help.php @@ -225,6 +225,13 @@ function store_doc_file($s) return; } + if (! str_contains($s,'.mc')) { + // Bugfix to remove bad records for photos. + + + return; + } + $item = []; $sys = Channel::get_system(); diff --git a/version.php b/version.php index a32862a63..b3d6df550 100644 --- a/version.php +++ b/version.php @@ -1,2 +1,2 @@ dd > li { background-image: none !important; } +.form-group { + margin: 10px; +} /* Turn checkboxes into switches */ .form-group.checkbox > div { diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl index d1151fffe..88c42882c 100644 --- a/view/tpl/chatrooms.tpl +++ b/view/tpl/chatrooms.tpl @@ -27,7 +27,7 @@ {{/if}} - {{$room.cr_inroom}} + {{$room.cr_inroom}} {{/foreach}} diff --git a/view/tpl/cloud_header.tpl b/view/tpl/cloud_header.tpl index 705a5ebdf..72a9c648c 100644 --- a/view/tpl/cloud_header.tpl +++ b/view/tpl/cloud_header.tpl @@ -1,7 +1,7 @@
{{if $photo_view}} - + {{/if}} {{if $actionspanel}} diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl index db0d2fcf9..68f0154d5 100755 --- a/view/tpl/photo_album.tpl +++ b/view/tpl/photo_album.tpl @@ -1,7 +1,7 @@
- + {{if $order}} {{/if}} diff --git a/view/tpl/suggest_friends.tpl b/view/tpl/suggest_friends.tpl index 6916439cf..4f4aa19bc 100755 --- a/view/tpl/suggest_friends.tpl +++ b/view/tpl/suggest_friends.tpl @@ -4,7 +4,7 @@ {{$entry.name}}
- +