Merge pull request #1084 from virtualtam/doc/updates

Documentation: cleanup, update references to config(.json)?.php
This commit is contained in:
VirtualTam 2018-02-16 01:52:38 +01:00 committed by GitHub
commit 2e6b9ed3b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 25 deletions

View file

@ -1,4 +1,4 @@
TODO: This page is out of date ## Directory structure
Here is the directory structure of Shaarli and the purpose of the different files: Here is the directory structure of Shaarli and the purpose of the different files:
@ -6,10 +6,16 @@ Here is the directory structure of Shaarli and the purpose of the different file
index.php # Main program index.php # Main program
application/ # Shaarli classes application/ # Shaarli classes
├── LinkDB.php ├── LinkDB.php
...
└── Utils.php └── Utils.php
tests/ # Shaarli unitary & functional tests tests/ # Shaarli unitary & functional tests
├── LinkDBTest.php ├── LinkDBTest.php
├── utils # utilities to ease testing
...
├── utils # utilities to ease testing
│ └── ReferenceLinkDB.php │ └── ReferenceLinkDB.php
└── UtilsTest.php └── UtilsTest.php
COPYING # Shaarli license COPYING # Shaarli license
@ -18,17 +24,18 @@ Here is the directory structure of Shaarli and the purpose of the different file
├── blazy.* # picture wall lazy image loading library ├── blazy.* # picture wall lazy image loading library
├── shaarli.css, reset.css # Shaarli stylesheet. ├── shaarli.css, reset.css # Shaarli stylesheet.
├── qr.* # qr code generation library ├── qr.* # qr code generation library
└──rain.tpl.class.php # RainTPL templating library └── rain.tpl.class.php # RainTPL templating library
tpl/ # RainTPL templates for Shaarli. They are used to build the pages.
images/ # Images and icons used in Shaarli images/ # Images and icons used in Shaarli
data/ # data storage: bookmark database, configuration, logs, banlist data/ # data storage: bookmark database, configuration, logs, banlist...
├── config.php # Shaarli configuration (login, password, timezone, title…) ├── config.json.php # Shaarli configuration (login, password, timezone, title...)
├── datastore.php # Your link database (compressed). ├── datastore.php # Your link database (compressed).
├── ipban.php # IP address ban system data ├── ipban.php # IP address ban system data
├── lastupdatecheck.txt # Update check timestamp file ├── lastupdatecheck.txt # Update check timestamp file
└──log.txt # login/IPban log. └── log.txt # login/IPban log.
tpl/ # RainTPL templates for Shaarli. They are used to build the pages.
cache/ # thumbnails cache cache/ # thumbnails cache
# This directory is automatically created. You can erase it anytime you want. # This directory is automatically created. You can erase it anytime you want.
tmp/ # Temporary directory for compiled RainTPL templates. tmp/ # Temporary directory for compiled RainTPL templates.
# This directory is automatically created. You can erase it anytime you want. # This directory is automatically created. You can erase it anytime you want.
vendor/ # Third-party dependencies. This directory is created by Composer
``` ```

View file

@ -37,7 +37,7 @@ This is important in case plugins are depending on each other. Read plugins READ
## File mode ## File mode
Enabled plugin are stored in your `config.php` parameters file, under the `array`: Enabled plugin are stored in your `config.json.php` parameters file, under the `array`:
```php ```php
$GLOBALS['config']['ENABLED_PLUGINS'] $GLOBALS['config']['ENABLED_PLUGINS']
@ -48,7 +48,7 @@ Example:
```php ```php
$GLOBALS['config']['ENABLED_PLUGINS'] = array( $GLOBALS['config']['ENABLED_PLUGINS'] = array(
'qrcode', 'qrcode',
'archiveorg', 'archiveorg',
'wallabag', 'wallabag',
'markdown', 'markdown',

View file

@ -63,7 +63,7 @@ Related threads:
### I forgot my password! ### I forgot my password!
Delete the file `data/config.php` and display the page again. You will be asked for a new login/password. Delete the file `data/config.json.php` and display the page again. You will be asked for a new login/password.
### I'm locked out - Login bruteforce protection ### I'm locked out - Login bruteforce protection
@ -97,7 +97,7 @@ php56 1
```php ```php
//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. //list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html // FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html
//if (strpos($status,'200 OK')) $title=html_extract_title($data); //if (strpos($status,'200 OK')) $title=html_extract_title($data);
``` ```
@ -106,11 +106,11 @@ php56 1
### Dates are not properly formatted ### Dates are not properly formatted
Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( ) Shaarli tries to sniff the language of the browser (using `HTTP_ACCEPT_LANGUAGE` headers)
and choose a date format accordingly. But Shaarli can only use the date formats
### Problems on CentOS servers (and more generally speaking, the locales) provided by the webserver.
So even if you have a browser in French, you may end up with dates in US format
On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package. (it's the case on sebsauvage.net :-( )
### My session expires! I can't stay logged in ### My session expires! I can't stay logged in
@ -126,7 +126,3 @@ This can be caused by several things:
## Sessions do not seem to work correctly on your server ## 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)). 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)).
### pubsubhubbub support
Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config']['PUBSUBHUB_URL']` in your `config.php`

View file

@ -2,14 +2,14 @@
### Note your current version ### Note your current version
If anything goes wrong, it's important for us to know which version you're upgrading from. If anything goes wrong, it's important for us to know which version you're upgrading from.
The current version is present in the `version.php` file. The current version is present in the `version.php` file.
### Backup your data ### Backup your data
Shaarli stores all user data under the `data` directory: Shaarli stores all user data under the `data` directory:
- `data/config.php` - main configuration file - `data/config.json.php` (or `data/config.php` for older Shaarli versions) - main configuration file
- `data/datastore.php` - bookmarked links - `data/datastore.php` - bookmarked links
- `data/ipbans.php` - banned IP addresses - `data/ipbans.php` - banned IP addresses
- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run - `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
@ -39,7 +39,7 @@ We recommend that you use the latest release tarball with the `-full` suffix. It
Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory! Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
If you use translations in gettext mode - meaning you manually changed the default mode -, If you use translations in gettext mode - meaning you manually changed the default mode -,
reload your web server. reload your web server.
After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [Shaarli configuration](Shaarli configuration) for more details). After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [Shaarli configuration](Shaarli configuration) for more details).
@ -192,7 +192,10 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to
#### Step 3: configuration #### Step 3: configuration
After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration) for more details). After migrating, access your fresh Shaarli installation from a web browser; the
configuration will then be automatically updated, and new settings added to
`data/config.json.php` (see [Shaarli configuration](Shaarli-configuration) for more
details).
## Troubleshooting ## Troubleshooting