From 6212acfc813781501177674baa3139ceef62f78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 15 Apr 2014 21:49:00 +0200 Subject: [fix] rss feed content type set to text/xml #636 --- inc/3rdparty/libraries/feedwriter/FeedWriter.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php index df4c8b4b..79639c0c 100755 --- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php +++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php @@ -89,18 +89,11 @@ define('JSONP', 3, true); */ public function genarateFeed() { - if ($this->version == RSS2) { -// header('Content-type: text/xml; charset=UTF-8'); - // this line prevents Chrome 20 from prompting download - // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss -// header('X-content-type-options: nosniff'); - } elseif ($this->version == JSON) { -// header('Content-type: application/json; charset=UTF-8'); - $this->json = new stdClass(); - } elseif ($this->version == JSONP) { -// header('Content-type: application/javascript; charset=UTF-8'); - $this->json = new stdClass(); - } + header('Content-type: text/xml; charset=UTF-8'); + // this line prevents Chrome 20 from prompting download + // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss + header('X-content-type-options: nosniff'); + $this->printHead(); $this->printChannels(); $this->printItems(); -- cgit v1.2.3 From c2cf7075c24c1539befd4ba09881eed761c9d769 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 10:45:09 +0300 Subject: print view fixed in baggy; print link added; read percent added in default theme; archive and favorite re-factored to be ajax action in article view --- inc/poche/Poche.class.php | 16 +++++++-- inc/poche/config.inc.php.new | 4 +++ themes/baggy/css/main.css | 3 ++ themes/baggy/css/print.css | 14 ++++++++ themes/baggy/fonts/icomoon.eot | Bin 3724 -> 3896 bytes themes/baggy/fonts/icomoon.svg | 17 +++++++++- themes/baggy/fonts/icomoon.ttf | Bin 3560 -> 3732 bytes themes/baggy/fonts/icomoon.woff | Bin 3528 -> 3664 bytes themes/baggy/view.twig | 49 +++++++++++++++++++++++++-- themes/default/css/style-default.css | 4 +++ themes/default/css/style.css | 13 ++++++- themes/default/img/default/print.png | Bin 0 -> 321 bytes themes/default/view.twig | 64 +++++++++++++++++++++++++++++++++-- 13 files changed, 176 insertions(+), 8 deletions(-) mode change 100755 => 100644 themes/baggy/fonts/icomoon.eot mode change 100755 => 100644 themes/baggy/fonts/icomoon.svg mode change 100755 => 100644 themes/baggy/fonts/icomoon.ttf mode change 100755 => 100644 themes/baggy/fonts/icomoon.woff mode change 100644 => 100755 themes/default/css/style-default.css create mode 100755 themes/default/img/default/print.png diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 811895dc..dcfdc167 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -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()); diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 83b3c4c0..3b08c212 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/themes/baggy/css/main.css b/themes/baggy/css/main.css index 0991dbed..52d8ecaa 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 9aefa779..9dd6d295 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 02f53b36..56323516 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 d9c35b98..b4586136 --- 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 3860dd04..bb1f21f8 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 c3a91ed7..bab13779 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 ffb512a3..62af2516 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,13 +8,14 @@ @@ -32,6 +33,50 @@