From 67e2682a705fcae8c3f96272187b22d6594027c5 Mon Sep 17 00:00:00 2001 From: Banana Date: Sun, 29 Dec 2019 10:12:22 +0100 Subject: [PATCH] improved documentation --- ChangeLog | 1 + TODO | 2 +- documentation/email-importer.txt | 5 ++- documentation/insipid-edit-me.sql | 6 ---- documentation/installation.txt | 56 ++++++++++++++++++------------- documentation/requirements.txt | 2 +- documentation/troubleshooting.txt | 9 +++++ documentation/usage.txt | 4 ++- webroot/config.default.php | 11 +++--- 9 files changed, 58 insertions(+), 38 deletions(-) create mode 100644 documentation/troubleshooting.txt diff --git a/ChangeLog b/ChangeLog index a7a1fad..fb186ca 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ version x.x - Guardian of Steel (tba) + + Improved documentation + Fixed a bug in tag selection SQL query version 2.2 - Guardian of Ice - (2019-02-27) diff --git a/TODO b/TODO index 92808ad..95ad283 100755 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ TODO / Feature list -+ improved documentation + delete single local storage of a link ++ backup. Complete and single + sorting + snapshots + bookmark js snippet diff --git a/documentation/email-importer.txt b/documentation/email-importer.txt index c13f0af..f533409 100644 --- a/documentation/email-importer.txt +++ b/documentation/email-importer.txt @@ -1,7 +1,7 @@ Insipid has a feature to fetch new links from E-Mails. Those E-Mails are read from a configured IMAP mailbox. -You need to enable the imap functions within PHP and +You need to enable the imap/ssl functions within PHP and have a IMAP mailbox on a SSL/TLS email server. Set the config variables in the config file. @@ -10,6 +10,9 @@ There is no "security" within this method. Only the special string you can defin The new links will be hidden at first. You need to verify them before they are visible in your list. +Access the moderation with this link: index.php?p=stats +After authentication there will be more info and one called Moderation + Here are the important configs: EMAIL_SERVER => Address of your E-Mail server diff --git a/documentation/insipid-edit-me.sql b/documentation/insipid-edit-me.sql index 82a0b0d..fea2e5d 100644 --- a/documentation/insipid-edit-me.sql +++ b/documentation/insipid-edit-me.sql @@ -9,12 +9,6 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; --- --- Database: `#REPLACE_ME#` --- - --- -------------------------------------------------------- - -- -- Table structure for table `#REPLACE_ME#_category` -- diff --git a/documentation/installation.txt b/documentation/installation.txt index 28cb3cb..eedc620 100644 --- a/documentation/installation.txt +++ b/documentation/installation.txt @@ -1,44 +1,54 @@ -1. -Check the requirements first. - -2. -Read this first!! - -3. -Unpack the archive - -4. +1. Requirements +Check the requirements.txt first. +An access and database on a mysql database server. Write them down. +If you share a database either use the default table prefix (inisipid) or use your own. +Absolute path on your webserver web-accessible folder where insipid will be installed to + +2. Read +Read this document before changing anything! + +3. Unpack +Unpack the archive to a temporary directory of your choice. +Final files and folder will be moved to the webroot of your +webserver later on. +You can also verify the package with the available m5/sha sum information + +4. Config Create your config file. Copy webroot/config.default.php to webroot/config.php Modify at least the following settings in this file: -- define('DB_HOST','127.0.0.1'); -- define('DB_USERNAME','user'); -- define('DB_PASSWORD','test'); -- define('FRONTEND_USERNAME','luke'); -- define('FRONTEND_PASSWORD','father'); -- define('ABSOLUTE_PATH', '/path/to/insipid/webroot'); - -5. +- define('DB_HOST','127.0.0.1'); <= The database server hostname you are using +- define('DB_USERNAME','user'); <= The database username you are using +- define('DB_PASSWORD','test'); <= The database password you are using +- define('DB_NAME','insipid'); <= Database name on your database server +- define('FRONTEND_USERNAME','luke'); <= The frontend username. Please change the default +- define('FRONTEND_PASSWORD','father'); <= The frontend password. Please change the default +- define('ABSOLUTE_PATH', '/path/to/insipid/on/your/webserver'); <= Absolute path where insipid is located in your webserver + +5. Prepare SQL file Copy and modify documentation/insipid-edit-me.sql and replace the placeholder. Open the file and make a search and replace: search for: `#REPLACE_ME# -replace with: `tableprefix +replace with: `YOUR_TABLE_PREFIX -The value tableprefix has to match with the value for DB_PREFIX in your config.php file +The value YOUR_TABLE_PREFIX has to match with the value for DB_PREFIX in your config.php file. +Default is insipid. Alter the value here and in the config file if you choose a different one -6. -Create a table if needed. +6. Database +Create a database if needed. Should match DB_NAME in your config. Remember step 1. Import the edited from step 5 sql file into your MySQL database. 7. Edit the robots.txt file to your needs. +Usually not needed 8. -Copy the content of the webroot folder into your webserver folder. +Copy the content of the unpacked webroot folder onto your webserver folder. Make the localdata folder writable to the web process to store images from link parsing. LOCAL_STORAGE is the option in the config file. +Make sure ABSOLUTE_PATH matches the location of insipid in your webserver! 9. If you want to fully restrict your contents activate the user/password restriction in the config. diff --git a/documentation/requirements.txt b/documentation/requirements.txt index 9c7541c..1f4e837 100644 --- a/documentation/requirements.txt +++ b/documentation/requirements.txt @@ -1,4 +1,4 @@ Apache (2.4 and up) with PHP extension enabled PHP (7 and up) with MySQL extension -> mysqli; curl enabled; (+imap +ssl if you us the email importer) -MySQL database 5.6.x and up +MySQL server or access to database 5.6.x and up - DB user rights has to include create, alter a view diff --git a/documentation/troubleshooting.txt b/documentation/troubleshooting.txt new file mode 100644 index 0000000..65446e0 --- /dev/null +++ b/documentation/troubleshooting.txt @@ -0,0 +1,9 @@ +To get more information if your are stuck: + +Edit index.php (or email-import.php if you have trouble with it) and change the following setting: + +FROM: define('DEBUG',false); +TO: define('DEBUG',true); + +Alter it to false after your are done. Do not use this permanently since it displays unwanted and even +sensitive information to everyone. \ No newline at end of file diff --git a/documentation/usage.txt b/documentation/usage.txt index 52e2d76..5d1ea16 100644 --- a/documentation/usage.txt +++ b/documentation/usage.txt @@ -15,4 +15,6 @@ HowToAdd a new link: There is no special "add a new link" option. Just paste the link into the search bar. If the link is already in your database the edit option will be shown. -If not the add field will be shown and the possibility to safe the new link. \ No newline at end of file +If not the add field will be shown and the possibility to safe the new link. + +Usage of the email-importer can be found in the email-importer.txt file \ No newline at end of file diff --git a/webroot/config.default.php b/webroot/config.default.php index 6092892..76d2177 100644 --- a/webroot/config.default.php +++ b/webroot/config.default.php @@ -26,11 +26,12 @@ * */ -# database config -define('DB_HOST','127.0.0.1'); -define('DB_USERNAME','user'); -define('DB_PASSWORD','test'); -define('DB_NAME','insipid'); +# +## database config +define('DB_HOST','127.0.0.1'); # Address of the database server +define('DB_USERNAME','user'); # Username to access the database server and database itself +define('DB_PASSWORD','test'); # Password for username +define('DB_NAME','insipid'); # Database name on your database server define('DB_PREFIX','insipid'); # a _ is added automatically as separation # user config -- 2.39.5