Merge branch 'dev' into contextual_help

This commit is contained in:
socialatm 2023-02-02 00:02:36 +00:00
commit 5e58f048c8
18 changed files with 80 additions and 13 deletions

View file

@ -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 .= '<div class="nav-pills"><a href="' . $link . '">' . ucfirst(basename($link)) . '</a></div>' . (($language) ? " [$language]" : '') . EOL;
$content .= '<div class="nav-pills"><a href="' . $link . '">' . ucfirst(basename($displayName)) . '</a>' . (($language) ? " [$language]" : '') . '</div>' . 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 = [];

View file

@ -59,7 +59,7 @@ class Activity implements WidgetInterface
$o .= '<h3>' . t('Activity', 'widget') . '</h3><ul class="nav nav-pills flex-column">';
foreach ($tmpArray as $value) {
$o .= '<li class="nav-item"><a class="nav-link" href="stream?f=&xchan=' . urlencode($value['author_xchan']) . '" ><span class="badge badge-secondary float-end">' . ((intval($value['total'])) ? intval($value['total']) : '') . '</span><img src="' . $value['author']['xchan_photo_s'] . '" class="menu-img-1" /> ' . $value['author']['xchan_name'] . '</a></li>';
$o .= '<li class="nav-item"><a class="nav-link" href="stream?f=&xchan=' . urlencode($value['author_xchan']) . '" ><span class="badge bg-secondary float-end">' . ((intval($value['total'])) ? intval($value['total']) : '') . '</span><img src="' . $value['author']['xchan_photo_s'] . '" class="menu-img-1" /> ' . $value['author']['xchan_name'] . '</a></li>';
}
$o .= '</ul></div>';
}

View file

@ -128,7 +128,7 @@ class Groups implements WidgetInterface
}
$output .= '<li class="nav-item"><a class="nav-link" href="' . $link . '" ><span class="badge badge-secondary float-end">' . ((intval($rr['unseen'])) ? intval($rr['unseen']) : '') . '</span><img class ="menu-img-1" src="' . $rr['xchan_photo_s'] . '" /> ' . $rr['xchan_name'] . '</a></li>';
$output .= '<li class="nav-item"><a class="nav-link" href="' . $link . '" ><span class="badge bg-secondary float-end">' . ((intval($rr['unseen'])) ? intval($rr['unseen']) : '') . '</span><img class ="menu-img-1" src="' . $rr['xchan_photo_s'] . '" /> ' . $rr['xchan_name'] . '</a></li>';
}
$output .= '</ul></div>';
}

View file

@ -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)

BIN
doc/en/checkin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
doc/en/locationsettings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
doc/en/nearby.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

View file

@ -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();

View file

@ -1,2 +1,2 @@
<?php
define ('STD_VERSION', '23.01.31');
define ('STD_VERSION', '23.02.01');

View file

@ -644,12 +644,12 @@ function handleNotifications(data) {
$('.notifications-btn-icon').addClass('fa-exclamation-circle');
}
if(data.all_events_today) {
$('.all_events-update').removeClass('badge-secondary');
$('.all_events-update').removeClass('badge').removeClass('bg-secondary');
$('.all_events-update').addClass('badge').addClass('bg-danger');;
}
else {
$('.all_events-update').removeClass('badge').removeClass('bg-danger');
$('.all_events-update').addClass('badge-secondary');
$('.all_events-update').addClass('badge').addClass('bg-secondary');
}

View file

@ -1569,6 +1569,7 @@ main.fullscreen .section-content-wrapper-np {
border-radius: $radius;
}
.rounded-top {
border-top-left-radius: $radius !important;
border-top-right-radius: $radius !important;
@ -1736,6 +1737,9 @@ dl.bb-dl > dd > li {
background-image: none !important;
}
.form-group {
margin: 10px;
}
/* Turn checkboxes into switches */
.form-group.checkbox > div {

View file

@ -27,7 +27,7 @@
<ul id="panel-{{$room.cr_id}}" class="lockview-panel dropdown-menu"></ul>
{{/if}}
</td>
<td><span class="badge badge-secondary">{{$room.cr_inroom}}</span></td>
<td><span class="badge bg-secondary">{{$room.cr_inroom}}</span></td>
</tr>
{{/foreach}}
</table>

View file

@ -1,7 +1,7 @@
<div class="section-title-wrapper">
<div class="float-end">
{{if $photo_view}}
<a href="{{$photos_path}}" title="{{$photo_view}}"><i class="fa fa-image btn btn-outline-secondary btn-sm" title="{{$photo_view}}"></i></a>
<a href="{{$photos_path}}" title="{{$photo_view}}" class="btn btn-sm btn-outline-secondary"><i class="fa fa-fw fa-image" title="{{$photo_view}}"></i></a>
{{/if}}
<a href="cloud_tiles/{{$cpath}}" class="btn btn-sm btn-outline-secondary"><i class="fa fa-fw {{if $tiles}}fa-list-ul{{else}}fa-table{{/if}}"></i></a>
{{if $actionspanel}}

View file

@ -1,7 +1,7 @@
<div class="{{if !$no_fullscreen_btn}}generic-content-wrapper{{/if}}">
<div class="section-title-wrapper">
<div class="float-end">
<a href="{{$files_path}}" title="{{$file_view}}"><i class="fa fa-folder btn btn-outline-secondary btn-sm" title="{{$file_view}}"></i></a>
<a href="{{$files_path}}" title="{{$file_view}}" class="btn btn-outline-secondary btn-sm"><i class="fa fa-folder fa-fw" title="{{$file_view}}"></i></a>
{{if $order}}
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$sort}}">
<i class="fa fa-sort-amount-up"></i>

View file

@ -5,7 +5,7 @@
{{if $albums}}
{{foreach $albums as $al}}
{{if $al.shorttext}}
<li class="nav-item"><a class="nav-link" href="{{$baseurl}}/photos/{{$nick}}/album/{{$al.bin2hex}}"><span class="badge badge-secondary float-end">{{$al.total}}</span>{{$al.shorttext}}</a></li>
<li class="nav-item"><a class="nav-link" href="{{$baseurl}}/photos/{{$nick}}/album/{{$al.bin2hex}}"><span class="badge bg-secondary float-end">{{$al.total}}</span>{{$al.shorttext}}</a></li>
{{/if}}
{{/foreach}}
{{/if}}

View file

@ -1,7 +1,7 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<div class="float-end">
<a href="{{$files_path}}" title="{{$file_view}}"><i class="fa fa-folder btn btn-outline-secondary btn-sm" title="{{$file_view}}"></i></a>
<a href="{{$files_path}}" title="{{$file_view}}" class="btn btn-outline-secondary btn-sm"><i class="fa fa-folder fa-fw" title="{{$file_view}}"></i></a>
{{if $can_post}}
<button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-plus-circle"></i>&nbsp;{{$upload}}</button>
{{/if}}

View file

@ -4,7 +4,7 @@
<img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.profile}}]" />
</a>
</div>
<!--a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="profile-match-ignore" onclick="return confirmDelete();" ><i class="fa fa-close drop-icons btn btn-outline-secondary"></i></a-->
<a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="profile-match-ignore drop-icons btn btn-outline-secondary btn-sm" onclick="return confirmDelete();" ><i class="fa fa-close "></i></a>
<div class="profile-match-break"></div>
<div class="profile-match-name">
<a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>