]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #1358 from shaarli/doc-add-screenshots
authorArthurHoaro <arthur@hoa.ro>
Fri, 17 Jan 2020 17:27:42 +0000 (18:27 +0100)
committerGitHub <noreply@github.com>
Fri, 17 Jan 2020 17:27:42 +0000 (18:27 +0100)
Doc: add screenshots of all pages

13 files changed:
application/Thumbnailer.php
application/feed/FeedBuilder.php
doc/md/Community-&-Related-software.md
doc/md/Continuous-integration-tools.md
doc/md/Server-configuration.md
doc/md/Theming.md
doc/md/Troubleshooting.md
doc/md/docker/shaarli-images.md
doc/md/guides/various-hacks.md
plugins/demo_plugin/demo_plugin.php
tpl/default/includes.html
tpl/vintage/includes.html
yarn.lock

index d5f5ac2828b61026fb5fbc68f8db1f00cd37b182..314baf0df615c5e3edf15ec5e9b0e60eac61f792 100644 (file)
@@ -27,6 +27,7 @@ class Thumbnailer
         'instagram.com',
         'pinterest.com',
         'pinterest.fr',
+        'soundcloud.com',
         'tumblr.com',
         'deviantart.com',
     ];
index 7c859474de414773052c0c5e79dd1583dfcd046f..957c827339515af83acddcb1245d258b59dad9b0 100644 (file)
@@ -157,7 +157,7 @@ class FeedBuilder
             $permalink = '<a href="' . $link['guid'] . '" title="' . t('Permalink') . '">' . t('Permalink') . '</a>';
         }
         $link['description'] = format_description($link['description'], $pageaddr);
-        $link['description'] .= PHP_EOL . '<br>&#8212; ' . $permalink;
+        $link['description'] .= PHP_EOL . PHP_EOL . '<br>&#8212; ' . $permalink;
 
         $pubDate = $link['created'];
         $link['pub_iso_date'] = $this->getIsoDate($pubDate);
index c66d1c7039d1f67d2629f01953e2875acd23dcd0..4193c0453ac6dec2bcc91101b2da6fdd44e82e17 100644 (file)
@@ -12,8 +12,6 @@ See [REST API](REST-API) for a list of official and community clients.
 - [autosave](https://github.com/kalvn/shaarli-plugin-autosave) by [@kalvn](https://github.com/kalvn): Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.
 - [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
 - [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
-- [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
-- [twemoji](https://github.com/NerosTie/twemoji) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli (Twemoji version) 
 - [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
 - [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
 - [markdown-toolbar](https://github.com/immanuelfodor/shaarli-markdown-toolbar) by [@immanuelfodor](https://github.com/immanuelfodor) - Easily insert markdown syntax into the Description field when editing a link.
@@ -35,6 +33,7 @@ See [Theming](Theming) for a list of community-contributed themes, and an instal
 - [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
 - [Shaarli app for Cloudron](https://git.cloudron.io/cloudron/shaarli-app) - Effortlessly run Shaarli with the help of [Cloudron](https://cloudron.io/) [![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=com.github.shaarli)
 - [Shaarli_ynh](https://github.com/YunoHost-Apps/shaarli_ynh) - Shaarli is available as a [Yunohost](https://yunohost.org) app [![Install Shaarli with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=shaarli)
+- [pelican](https://blog.getpelican.com) static blog generator plugin to auto-post articles on a Shaarli instance: [shaarli_poster](https://github.com/getpelican/pelican-plugins/tree/master/shaarli_poster)
 
 ### Mobile Apps
 - [ShaarliOS](https://github.com/mro/ShaarliOS) - Apple iOS share extension.
index 4ca6bdc7aab9cf503b2de1ee90f1636e12ec1e8d..f7819d5adc4f669f55ac98b295bfcbc91172e212 100644 (file)
@@ -27,3 +27,6 @@ After all jobs have finished, Travis returns the results to GitHub:
     - Green: all tests have passed
     - Red: some tests failed
     - Orange: tests are pending
+
+## Documentation
+[mkdocs](https://www.mkdocs.org/) is used to convert markdown documentation to HTML pages. The [public documentation](https://shaarli.readthedocs.io/en/master/) website is rendered and hosted by [readthedocs.org](https://readthedocs.org/). A copy of the documentation is also included in prebuilt [release archives](https://github.com/shaarli/Shaarli/releases) (`doc/html/` path in your Shaarli installation). To generate the HTML documentation locally, install a recent version of Python `setuptools` and run    `make doc`.
index 88eed8e6eb566074498b4fef418c306bd030e3c2..bd293c37919e47a24dbec6a3bf1c92db595fdff7 100644 (file)
@@ -28,12 +28,12 @@ Version | Status | Shaarli compatibility
 Extension | Required? | Usage
 ---|:---:|---
 [`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS
+[`php-json`](http://php.net/manual/en/book.json.php) | required | configuration parsing
 [`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support
 [`php-gd`](http://php.net/manual/en/book.image.php) | optional | required to use thumbnails
 [`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->รจ->f`)
 [`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way
 [`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster)
-
 --------------------------------------------------------------------------------
 
 ### SSL/TLS configuration 
index bd400776f42acd04699e4c3b1a9730e53186a27c..eb84e11c7ecf40056373fdd2bec539690c654a59 100644 (file)
@@ -16,8 +16,6 @@ This file allows overriding rules defined in the template CSS files (only add ch
 
 **Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
 
-See also [Download CSS styles from an OPML list](Download CSS styles from an OPML list)
-
 ## Themes
 
 Installation:
index 570f6956c6a79e48d7b731936212798fc67b15bf..01fd9840dd5d18a3543c2b2284b102c92c4f7797 100644 (file)
@@ -1,64 +1,5 @@
 # Troubleshooting
 
-## Browser
-
-### Redirection issues (HTTP Referer)
-
-Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
-
-See:
-
-- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)
-- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)
-- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)
-
-### Firefox HTTP Referer options
-
-HTTP settings are available by browsing `about:config`, here are the available settings and their values.
-
-`network.http.sendRefererHeader` - determines when to send the Referer HTTP header
-
-- `0`: Never send the referring URL
-    - not recommended, may break some sites
-- `1`: Send only on clicked links
-- `2` (default): Send for links and images
-
-`network.http.referer.XOriginPolicy` - Cross-domain origin policy
-
-- `0` (default): Always send
-- `1`: Send if base domains match
-- `2`: Send if hosts match
-
-`network.http.referer.spoofSource` - Referer spoofing (~faking)
-
-- `false` (default): real referer
-- `true`: spoof referer (use target URI as referer)
-    - known to break some functionality in Shaarli
-
-`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer
-
-- `0`: (default): send full URI
-- `1`: scheme+host+port+path
-- `2`: scheme+host+port
-
-### Firefox, localhost and redirections
-
-`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has
-been set up to spoof referers, or only accept requests from the same base domain/host,
-Shaarli redirections will not work properly.
-
-To solve this, assign a local domain to your host, e.g.
-```
-127.0.0.1 localhost desktop localhost.lan
-::1       localhost desktop localhost.lan
-```
-
-and browse Shaarli at http://localhost.lan/.
-
-Related threads:
-- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)
-- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)
-
 ## Login
 
 ### I forgot my password!
@@ -69,12 +10,19 @@ Delete the file `data/config.json.php` and display the page again. You will be a
 
 Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links.
 
-To remove the current IP bans, delete the file `data/ipbans.php`
+- To remove the current IP bans, delete the file `data/ipbans.php`
+- To list all login attempts, see `data/log.txt` (succesful/failed logins, bans/lifted bans)
 
-### List of all login attempts
+## Browser issues
 
-The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans.
-Search for `failed` in this file to look for unauthorized login attempts.
+### Redirection issues (HTTP Referer)
+
+Depending on its configuration and installed plugins, the browser may remove or alter (spoof) [HTTP referers](https://en.wikipedia.org/wiki/HTTP_referer), thus preventing Shaarli from properly redirecting between pages. Referer settings are available by browsing `about:config` and are documented [here](https://wiki.mozilla.org/Security/Referrer). `network.http.referer.spoofSource = true` in particular is known to break some functionality in Shaarli.
+
+### Firefox, localhost and redirections
+
+`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host,
+Shaarli redirections will not work properly. To solve this, assign a local domain to your host, e.g. `localhost.lan` in your [hosts file](https://en.wikipedia.org/wiki/Hosts_(file)) and browse Shaarli at http://localhost.lan/.
 
 ## Hosting problems
 
@@ -123,6 +71,11 @@ This can be caused by several things:
 - You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
 - If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
 
+### Old apache versions, Internal Server Error
+
+If you hosting provider only provides apache 2.2 and no support for `mod_version`, `.htaccess` files may cause 500 errors (Internal Server Error). See [this workaround](https://github.com/shaarli/Shaarli/issues/1196#issuecomment-412271085).
+
 ## Sessions do not seem to work correctly on your server
 
 Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have **no dots** in the hostname (e.g. `localhost` or `http://my-webserver/shaarli/`), some browsers will not store cookies at all (this respects the [HTTP cookie specification](http://curl.haxx.se/rfc/cookie_spec.html)).
+
index 5948949ae6bda0308dfe58efbf3e7ae2ecb868c6..14971d544f2fcd84b9a431d306e72aabfbc4b196 100644 (file)
@@ -12,18 +12,12 @@ repository.
 - `master`: master branch
 - `stable`: stable branch
 
-The `latest` and `master` images rely on:
+The `latest`, `master` and `stable` images rely on:
 
 - [Alpine Linux](https://www.alpinelinux.org/)
 - [PHP7-FPM](http://php-fpm.org/)
 - [Nginx](http://nginx.org/)
 
-The `stable` image relies on:
-
-- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
-- [PHP5-FPM](http://php-fpm.org/)
-- [Nginx](http://nginx.org/)
-
 Additional Dockerfiles are provided for the `arm32v7` platform, relying on
 [Linuxserver.io Alpine armhf
 images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be
index 0074ae9f548542b7ad8df920266614a236c831f3..b3aa869d2c43fbcca02db61a25414e19ac942406 100644 (file)
@@ -28,6 +28,5 @@ php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/
 ### See also
 
 - [Add a new custom field to shaares (example patch)](https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c)
-- [Download CSS styles for shaarlis listed in an opml file](https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012)
 - [Copy an existing Shaarli installation over SSH, and serve it locally](https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77)
 - [Create multiple Shaarli instances, generate an HTML index of them](https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20)
index 71ba7495ce9695bd948b52f741dfe2bb5f53da18..8ae1b47969e15dafa1b142c68e98aaf19d8813b4 100644 (file)
@@ -2,8 +2,8 @@
 /**
  * Demo Plugin.
  *
- * This plugin try to cover Shaarli's plugin API entirely.
- * Can be used by plugin developper to make their own.
+ * This plugin tries to completely cover Shaarli's plugin API.
+ * Can be used by plugin developers to make their own plugin.
  */
 
 /*
@@ -61,7 +61,7 @@ function demo_plugin_init($conf)
 
 /**
  * Hook render_header.
- * Executed on every page redering.
+ * Executed on every page render.
  *
  * Template placeholders:
  *   - buttons_toolbar
@@ -145,7 +145,7 @@ function hook_demo_plugin_render_header($data)
 
 /**
  * Hook render_includes.
- * Executed on every page redering.
+ * Executed on every page render.
  *
  * Template placeholders:
  *   - css_files
@@ -169,7 +169,7 @@ function hook_demo_plugin_render_includes($data)
 
 /**
  * Hook render_footer.
- * Executed on every page redering.
+ * Executed on every page render.
  *
  * Template placeholders:
  *   - text
@@ -186,7 +186,7 @@ function hook_demo_plugin_render_includes($data)
  */
 function hook_demo_plugin_render_footer($data)
 {
-    // footer text
+    // Footer text
     $data['text'][] = '<br>'. demo_plugin_t('Shaarli is now enhanced by the awesome demo_plugin.');
 
     // Free elements at the end of the page.
@@ -277,7 +277,7 @@ function hook_demo_plugin_render_editlink($data)
     // Load HTML into a string
     $html = file_get_contents(PluginManager::$PLUGINS_PATH .'/demo_plugin/field.html');
 
-    // replace value in HTML if it exists in $data
+    // Replace value in HTML if it exists in $data
     if (!empty($data['link']['stuff'])) {
         $html = sprintf($html, $data['link']['stuff']);
     } else {
@@ -324,9 +324,7 @@ function hook_demo_plugin_render_tools($data)
  */
 function hook_demo_plugin_render_picwall($data)
 {
-    // plugin_start_zone
     $data['plugin_start_zone'][] = '<center>BEFORE</center>';
-    // plugin_end_zone
     $data['plugin_end_zone'][] = '<center>AFTER</center>';
 
     return $data;
@@ -348,9 +346,7 @@ function hook_demo_plugin_render_picwall($data)
  */
 function hook_demo_plugin_render_tagcloud($data)
 {
-    // plugin_start_zone
     $data['plugin_start_zone'][] = '<center>BEFORE</center>';
-    // plugin_end_zone
     $data['plugin_end_zone'][] = '<center>AFTER</center>';
 
     return $data;
@@ -372,9 +368,7 @@ function hook_demo_plugin_render_tagcloud($data)
  */
 function hook_demo_plugin_render_daily($data)
 {
-    // plugin_start_zone
     $data['plugin_start_zone'][] = '<center>BEFORE</center>';
-    // plugin_end_zone
     $data['plugin_end_zone'][] = '<center>AFTER</center>';
 
 
@@ -465,7 +459,8 @@ function hook_demo_plugin_render_feed($data)
  */
 function hook_demo_plugin_save_plugin_parameters($data)
 {
-    // Here we edit the provided value, but we can use this to generate config files, etc.
+    // Here we edit the provided value.
+    // This hook can also be used to generate config files, etc.
     if (! empty($data['DEMO_PLUGIN_PARAMETER']) && ! endsWith($data['DEMO_PLUGIN_PARAMETER'], '_SUFFIX')) {
         $data['DEMO_PLUGIN_PARAMETER'] .= '_SUFFIX';
     }
index 6c30d1bf8a432052df87b14709249e62e786ef51..428b8ee292ef8feddb9f426271b6d9942f500bb7 100644 (file)
   <meta property="og:url" content="{$index_url}?{$link.shorturl}" />
   {$ogDescription=isset($link.description_src) ? $link.description_src : $link.description}
   <meta property="og:description" content="{function="substr(strip_tags($ogDescription), 0, 300)"}" />
-  {if="$link.thumbnail"}
+  {if="!empty($link.thumbnail)"}
     <meta property="og:image" content="{$index_url}{$link.thumbnail}" />
   {/if}
   {if="!$hide_timestamps || $is_logged_in"}
     <meta property="article:published_time" content="{$link.created->format(DateTime::ATOM)}" />
-    {if="$link.updated"}
+    {if="!empty($link.updated)"}
       <meta property="article:modified_time" content="{$link.updated->format(DateTime::ATOM)}" />
     {/if}
   {/if}
index 2efb6b1063b632a23aef1cf383d941b57916b550..1c4ff79c74adcf2ee37ec0522c0c8f2820b4f348 100644 (file)
   <meta property="og:url" content="{$index_url}?{$link.shorturl}" />
   {$ogDescription=isset($link.description_src) ? $link.description_src : $link.description}
   <meta property="og:description" content="{function="mb_substr(strip_tags($ogDescription), 0, 300)"}" />
-  {if="$link.thumbnail"}
+  {if="!empty($link.thumbnail)"}
     <meta property="og:image" content="{$index_url}{$link.thumbnail}" />
   {/if}
   {if="!$hide_timestamps || $is_logged_in"}
     <meta property="article:published_time" content="{$link.created->format(DateTime::ATOM)}" />
-    {if="$link.updated"}
+    {if="!empty($link.updated)"}
       <meta property="article:modified_time" content="{$link.updated->format(DateTime::ATOM)}" />
     {/if}
   {/if}
index 1aa94f4230f702d08da2dc9b6d520f0b8b2b6945..96f854c19da45502496763dfae89722ac9ee86d7 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -3428,9 +3428,9 @@ lodash.uniq@^4.5.0:
   integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
 
 lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.10:
-  version "4.17.11"
-  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
-  integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
+  version "4.17.15"
+  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
+  integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
 
 longest@^1.0.1:
   version "1.0.1"
@@ -3631,9 +3631,9 @@ minizlib@^1.1.1:
     minipass "^2.2.1"
 
 mixin-deep@^1.2.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
-  integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==
+  version "1.3.2"
+  resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+  integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
   dependencies:
     for-in "^1.0.2"
     is-extendable "^1.0.1"