From: Banana Date: Tue, 27 Dec 2022 22:55:47 +0000 (+0100) Subject: removed wkhtml implementation since the project is kinda dead X-Git-Tag: 2.8.1_20221231~2 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=4ffcc0fe2c41626d89f0385d3a40be9c6884d77a;p=insipid.git removed wkhtml implementation since the project is kinda dead --- diff --git a/ChangeLog b/ChangeLog index 105bac6..2406dc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ -version 2.x - Deathwind Chapel () +version 2.8.1 - Deathwind Chapel () + + Bugfix release + Moved debug setting into config + Updated shellcommand class and added the link to the github repo + Fixed/Updated the creation of the webpage thumbnail using google pagespeed insights api @@ -8,7 +9,8 @@ version 2.x - Deathwind Chapel () + Fixed xml ex- and import + Fixed pagination and sort options in all links view + Mysql dump replaced with https://github.com/druidfi/mysqldump-php - * Updated PHPMailer + + Updated PHPMailer + + Removed WKHTMLTOPDF_USE and WKHTMLTOPDF_COMMAND from config. No support for a whole page screenshot yet. version 2.8 - Wastelands (2022-12-10) diff --git a/TODO b/TODO index e242914..089b2d7 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,4 @@ TODO / Feature list + view table really still needed? -+ stats cleanup. Management functions should be standalone + theme support -+ more "secure" user authentication -++ multiple user accounts and stuff + combine category and tag class into one. diff --git a/documentation/snapshots-of-linked-webpage.txt b/documentation/snapshots-of-linked-webpage.txt index 7dabb11..2ab930a 100644 --- a/documentation/snapshots-of-linked-webpage.txt +++ b/documentation/snapshots-of-linked-webpage.txt @@ -1,22 +1,3 @@ Whole page screenshot of a website -# Requirements -wkhtmlimage from https://wkhtmltopdf.org (tested with wkhtmltoimage 0.12.5) - -# Setup -Change WKHTMLTOPDF_USE to true and alter the path WKHTMLTOPDF_COMMAND to your wkhtmltoimage install - -# Why wkhtmltoimage and not something newer or better? -puppeteer is kinda overkill and the whole npm is, well, moren then that... -https://developers.google.com/web/tools/puppeteer - -chromdriver and chrome was also some overkill and there was no simple -php implementation. - -It will be created if the option is actived. To remove uncheck the option. -To refresh uncheck the option. Save. This will delete the data. -Check the option again and the page screnshot will be created again. - -Any error in this process will be visible in the error log file -and not visible in the client. This way the link will be saved -and no data will be lost. \ No newline at end of file +TBD diff --git a/documentation/thumbnail-of-link.txt b/documentation/thumbnail-of-link.txt index 75ad7d0..55f90be 100644 --- a/documentation/thumbnail-of-link.txt +++ b/documentation/thumbnail-of-link.txt @@ -1,10 +1,10 @@ While editing a link you can request thumbnail of the given link at the time. It uses the Google page insights API to get a thumbnail. -It will be created if the option is actived. To remove uncheck the option. +It will be created if the option is activated. To remove uncheck the option. To refresh uncheck the option. Save. This will delete the data. Check the option again and the thumbnail will be created again. Any error in this process will be visible in the error log file and not visible in the client. This way the link will be saved -and no data will be lost. \ No newline at end of file +and no data will be lost. diff --git a/documentation/troubleshooting.txt b/documentation/troubleshooting.txt index 65446e0..bf4278d 100644 --- a/documentation/troubleshooting.txt +++ b/documentation/troubleshooting.txt @@ -1,9 +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: +Edit config.php and change the following setting: -FROM: define('DEBUG',false); -TO: define('DEBUG',true); +FROM: const DEBUG = false; +TO: const 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 +sensitive information to everyone. diff --git a/documentation/update.txt b/documentation/update.txt index d2d3820..0315675 100644 --- a/documentation/update.txt +++ b/documentation/update.txt @@ -1,9 +1,11 @@ If you are updating from a previous version make sure every update info from the version your are updating from is done. -## version 2.9 +## version 2.8.1 + Added debug setting into config. See config.default.php for DEBUG constant. Add it to your local config.php ++ Removed WKHTMLTOPDF_USE and WKHTMLTOPDF_COMMAND from config file. + and replaced with COMPLETE_PAGE_SCREENSHOT and COMPLETE_PAGE_SCREENSHOT_COMMAND ## version 2.8 Wastelands + Nothing. diff --git a/webroot/config.default.php b/webroot/config.default.php index 2dcd55f..80d2287 100644 --- a/webroot/config.default.php +++ b/webroot/config.default.php @@ -76,9 +76,9 @@ const EMAIL_REPLY_BACK_VALID = ''; const EMAIL_REPLY_BACK_ADDRESS = ''; const EMAIL_REPLY_BACK_SUBJECT = 'Insipid email import response'; -# Use wkhtmltopdf to create a whole page screenshot of a given link -const WKHTMLTOPDF_USE = false; -const WKHTMLTOPDF_COMMAND = '/absolute/path/to/wkhtmltoimage'; +# Use ... to create a whole page screenshot of a given link +const COMPLETE_PAGE_SCREENSHOT = false; +const COMPLETE_PAGE_SCREENSHOT_COMMAND = '/absolute/path/to/command'; # debug -const DEBUG = true; +const DEBUG = false; diff --git a/webroot/job/email-import.php b/webroot/job/email-import.php index 7b86483..8819577 100644 --- a/webroot/job/email-import.php +++ b/webroot/job/email-import.php @@ -32,7 +32,7 @@ ini_set('error_reporting',-1); // E_ALL & E_STRICT # time settings date_default_timezone_set('Europe/Berlin'); -const DEBUG = false; +require('../config.php'); ## set the error reporting ini_set('log_errors',true); @@ -44,8 +44,6 @@ else { ini_set('display_errors',false); } -require('../config.php'); - // if the file needs to be in a web accessible folder // you can either use the provided htaccess file // or active the "protection" with a secret given by URL / cli param diff --git a/webroot/lib/snapshot.class.php b/webroot/lib/snapshot.class.php index 19cc5a2..535c012 100644 --- a/webroot/lib/snapshot.class.php +++ b/webroot/lib/snapshot.class.php @@ -90,9 +90,11 @@ class Snapshot { } /** - * use configured WKHTMLTOPDF_COMMAND to create a whole page screenshot + * use configured COMPLETE_PAGE_SCREENSHOT_COMMAND to create a whole page screenshot * of the given link and store it locally * + * @TODO: TBD + * * @param String $url URL to take the screenshot from * @param string $filename * @return boolean @@ -103,7 +105,7 @@ class Snapshot { require_once 'lib/shellcommand.class.php'; if(!empty($url) && is_writable(dirname($filename))) { - $cmd = WKHTMLTOPDF_COMMAND; + $cmd = COMPLETE_PAGE_SCREENSHOT_COMMAND; $params = $this->_wkhtmltoimageOptions." ".$url." ".$filename; $command = new ShellCommand($cmd." ".$params); if ($command->execute()) { diff --git a/webroot/view/editlink.php b/webroot/view/editlink.php index ee6539a..5523a1f 100644 --- a/webroot/view/editlink.php +++ b/webroot/view/editlink.php @@ -114,7 +114,7 @@ - +