diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 811895d..66710ec 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -101,7 +101,7 @@ class Poche public function configFileIsAvailable() { if (! self::$configFileAvailable) { - $this->notInstalledMessage[] = 'You have to rename inc/poche/config.inc.php.new to inc/poche/config.inc.php.'; + $this->notInstalledMessage[] = 'You have to copy (don\'t just rename!) inc/poche/config.inc.default.php to inc/poche/config.inc.php.'; return false; } @@ -434,12 +434,24 @@ class Poche case 'toggle_fav' : $this->store->favoriteById($id, $this->user->getId()); Tools::logm('mark as favorite link #' . $id); - Tools::redirect(); + if ( Tools::isAjaxRequest() ) { + echo 1; + exit; + } + else { + Tools::redirect(); + } break; case 'toggle_archive' : $this->store->archiveById($id, $this->user->getId()); Tools::logm('archive link #' . $id); - Tools::redirect(); + if ( Tools::isAjaxRequest() ) { + echo 1; + exit; + } + else { + Tools::redirect(); + } break; case 'archive_all' : $this->store->archiveAll($this->user->getId()); @@ -822,13 +834,6 @@ class Poche */ public function import() { - if (!defined('IMPORT_LIMIT')) { - define('IMPORT_LIMIT', 5); - } - if (!defined('IMPORT_DELAY')) { - define('IMPORT_DELAY', 5); - } - if ( isset($_FILES['file']) ) { Tools::logm('Import stated: parsing file'); diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 83b3c4c..3b08c21 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new @@ -42,6 +42,10 @@ define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); define ('NOT_FLATTRABLE', '0'); define ('FLATTRABLE', '1'); define ('FLATTRED', '2'); +// display or not print link in article view +define ('SHOW_PRINTLINK', '1'); +// display or not percent of read in article view. Affects only default theme. +define ('SHOW_READPERCENT', '1'); define ('ABS_PATH', 'assets/'); define ('DEFAULT_THEME', 'baggy'); diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php old mode 100644 new mode 100755 index 1509138..14e9dd9 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -43,6 +43,7 @@ if (! file_exists(INCLUDES . '/poche/config.inc.php')) { Poche::$configFileAvailable = false; } else { require_once INCLUDES . '/poche/config.inc.php'; + require_once INCLUDES . '/poche/config.inc.default.php'; } if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { diff --git a/install/index.php b/install/index.php old mode 100644 new mode 100755 index e02952e..b6c6abe --- a/install/index.php +++ b/install/index.php @@ -53,7 +53,7 @@ else if (isset($_POST['install'])) { else { $continue = true; // Create config.inc.php - if (!copy('inc/poche/config.inc.php.new', 'inc/poche/config.inc.php')) { + if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) { $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.'; $continue = false; } diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 0991dbe..52d8eca 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css @@ -746,6 +746,9 @@ margin-top:1em; .icon-rss:before { content: "\e808"; } +.icon-print:before { + content: "\e80d"; +} /* ========================================================================== Icon selected diff --git a/themes/baggy/css/print.css b/themes/baggy/css/print.css index 9aefa77..9dd6d29 100755 --- a/themes/baggy/css/print.css +++ b/themes/baggy/css/print.css @@ -17,6 +17,7 @@ img { /* Hide useless blocks */ body > header, +#article_toolbar, #links, #sort, body > footer, @@ -46,3 +47,16 @@ abbr[title]:after { .pagination span.current { border-style: dashed; } + +#main { + width: 100%; + padding: 0; + margin: 0; + margin-left: 0; + padding-right: 0; + padding-bottom: 0; +} + +#article { + width: 100%; +} diff --git a/themes/baggy/fonts/icomoon.eot b/themes/baggy/fonts/icomoon.eot old mode 100755 new mode 100644 index 02f53b3..5632351 Binary files a/themes/baggy/fonts/icomoon.eot and b/themes/baggy/fonts/icomoon.eot differ diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg old mode 100755 new mode 100644 index d9c35b9..b458613 --- a/themes/baggy/fonts/icomoon.svg +++ b/themes/baggy/fonts/icomoon.svg @@ -1,7 +1,21 @@ -Generated by IcoMoon + + +{ + "fontFamily": "icomoon", + "majorVersion": 1, + "minorVersion": 0, + "version": "Version 1.0", + "fontId": "icomoon", + "psName": "icomoon", + "subFamily": "Regular", + "fullName": "icomoon", + "description": "Generated by IcoMoon" +} + + @@ -23,4 +37,5 @@ + \ No newline at end of file diff --git a/themes/baggy/fonts/icomoon.ttf b/themes/baggy/fonts/icomoon.ttf old mode 100755 new mode 100644 index 3860dd0..bb1f21f Binary files a/themes/baggy/fonts/icomoon.ttf and b/themes/baggy/fonts/icomoon.ttf differ diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff old mode 100755 new mode 100644 index c3a91ed..bab1377 Binary files a/themes/baggy/fonts/icomoon.woff and b/themes/baggy/fonts/icomoon.woff differ diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ffb512a..62af251 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,13 +8,14 @@ @@ -32,6 +33,50 @@