From 8905191413f20e7fba1d635a06cf5ec2ff86cbb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 7 Jan 2014 20:21:43 +0100 Subject: [add] import from poche, thank you @tsadiq #388 --- inc/poche/Poche.class.php | 49 +++++++++++++++++++++++++++++++++++++++++++- inc/poche/config.inc.php.new | 2 ++ themes/default/config.twig | 5 +++-- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 76a73be2..e033ad74 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -847,6 +847,52 @@ class Poche Tools::redirect(); } + /** + * import from Poche exported file + * @param string $targetFile the file used for importing + * @return boolean + */ + private function importFromPoche($targetFile) + { + $str_data = file_get_contents($targetFile); + $data = json_decode($str_data,true); + Tools::logm('starting import from Poche'); + + + $sequence = ''; + if (STORAGE == 'postgres') { + $sequence = 'entries_id_seq'; + } + + $count = 0; + foreach ($data as $value) { + + $url = new Url(base64_encode($value['url'])); + $favorite = ($value['is_fav'] == -1); + $archive = ($value['is_read'] == -1); + + # we can add the url + if (!is_null($url) && $url->isCorrect()) { + + $this->action('add', $url, 0, TRUE); + + $count++; + if ($favorite) { + $last_id = $this->store->getLastId($sequence); + $this->action('toggle_fav', $url, $last_id, TRUE); + } + if ($archive) { + $last_id = $this->store->getLastId($sequence); + $this->action('toggle_archive', $url, $last_id, TRUE); + } + } + + } + $this->messages->add('s', _('import from Poche completed. ' . $count . ' new links.')); + Tools::logm('import from Poche completed'); + Tools::redirect(); + } + /** * import datas into your poche * @param string $from name of the service to import : pocket, instapaper or readability @@ -858,7 +904,8 @@ class Poche $providers = array( 'pocket' => 'importFromPocket', 'readability' => 'importFromReadability', - 'instapaper' => 'importFromInstapaper' + 'instapaper' => 'importFromInstapaper', + 'poche' => 'importFromPoche', ); if (! isset($providers[$from])) { diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index c60d4f80..1c93be07 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new @@ -55,7 +55,9 @@ define ('PAGINATION', '10'); define ('POCKET_FILE', '/ril_export.html'); define ('READABILITY_FILE', '/readability'); define ('INSTAPAPER_FILE', '/instapaper-export.html'); +define ('POCHE_FILE', '/poche-export'); define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE); define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE); define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE); +define ('IMPORT_POCHE_FILE', ROOT . POCHE_FILE); \ No newline at end of file diff --git a/themes/default/config.twig b/themes/default/config.twig index 10df726e..ef615d39 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -105,8 +105,9 @@

{% trans "More info in the official docs:" %} inthepoche.com

{% trans "Export your poche data" %}

-- cgit v1.2.3 From 9ffce01e0cc05e62336ccb69d4a6d2d2fc7b565d Mon Sep 17 00:00:00 2001 From: Pierre Date: Tue, 7 Jan 2014 22:55:48 +0100 Subject: Correction de bugs dans le schema mysql - users/name type de int a varchar - valeurs par defaut ajoutees pour entries/is_read et is_fav --- install/mysql.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/mysql.sql b/install/mysql.sql index d16381d8..de5640e4 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -9,8 +9,8 @@ CREATE TABLE IF NOT EXISTS `entries` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, - `is_read` tinyint(1) NOT NULL, - `is_fav` tinyint(1) NOT NULL, + `is_read` tinyint(1) NOT NULL DEFAULT 0, + `is_fav` tinyint(1) NOT NULL DEFAULT 0, `content` blob NOT NULL, `user_id` int(11) NOT NULL, PRIMARY KEY (`id`) @@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, - `name` int(255) NOT NULL, + `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- cgit v1.2.3 From 5ed8050791ef562ff4351ede3a077ab1e8b0d916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 8 Jan 2014 11:28:46 +0100 Subject: [add] courgette theme --- themes/courgette/README.md | 3 + themes/courgette/_bookmarklet.twig | 3 + themes/courgette/_footer.twig | 4 + themes/courgette/_head.twig | 11 + themes/courgette/_menu.twig | 9 + themes/courgette/_messages.twig | 1 + themes/courgette/_top.twig | 9 + themes/courgette/config.twig | 82 +++ themes/courgette/css/.DS_Store | Bin 0 -> 6148 bytes themes/courgette/css/font.css | 10 + themes/courgette/css/knacss.css | 0 themes/courgette/css/messages.css | 75 +++ themes/courgette/css/print.css | 48 ++ themes/courgette/css/style-default.css | 59 ++ themes/courgette/css/style.css | 620 +++++++++++++++++++++ themes/courgette/error.twig | 6 + themes/courgette/export.twig | 1 + themes/courgette/font/fontello.eot | Bin 0 -> 6428 bytes themes/courgette/font/fontello.svg | 23 + themes/courgette/font/fontello.ttf | Bin 0 -> 6260 bytes themes/courgette/font/fontello.woff | Bin 0 -> 3988 bytes themes/courgette/home.twig | 49 ++ .../img/apple-touch-icon-144x144-precomposed.png | Bin 0 -> 7349 bytes .../img/apple-touch-icon-72x72-precomposed.png | Bin 0 -> 6168 bytes themes/courgette/img/apple-touch-icon.png | Bin 0 -> 5803 bytes themes/courgette/img/bg-select.png | Bin 0 -> 1193 bytes themes/courgette/img/default/backtotop.png | Bin 0 -> 326 bytes themes/courgette/img/default/bad-display.png | Bin 0 -> 343 bytes themes/courgette/img/default/checkmark-off.png | Bin 0 -> 277 bytes themes/courgette/img/default/checkmark-on.png | Bin 0 -> 235 bytes themes/courgette/img/default/clock.png | Bin 0 -> 332 bytes themes/courgette/img/default/down.png | Bin 0 -> 216 bytes themes/courgette/img/default/envelop.png | Bin 0 -> 285 bytes themes/courgette/img/default/flattr.png | Bin 0 -> 270 bytes themes/courgette/img/default/left.png | Bin 0 -> 196 bytes themes/courgette/img/default/link.png | Bin 0 -> 341 bytes themes/courgette/img/default/remove.png | Bin 0 -> 252 bytes themes/courgette/img/default/shaarli.png | Bin 0 -> 729 bytes themes/courgette/img/default/star-off.png | Bin 0 -> 314 bytes themes/courgette/img/default/star-on.png | Bin 0 -> 281 bytes themes/courgette/img/default/top.png | Bin 0 -> 212 bytes themes/courgette/img/default/twitter.png | Bin 0 -> 297 bytes themes/courgette/img/favicon.ico | Bin 0 -> 346 bytes themes/courgette/img/logo.png | Bin 0 -> 1350 bytes themes/courgette/img/messages/close.png | Bin 0 -> 662 bytes themes/courgette/img/messages/cross.png | Bin 0 -> 655 bytes themes/courgette/img/messages/help.png | Bin 0 -> 786 bytes themes/courgette/img/messages/tick.png | Bin 0 -> 537 bytes themes/courgette/img/messages/warning.png | Bin 0 -> 666 bytes themes/courgette/install.twig | 28 + themes/courgette/js/init.js | 6 + themes/courgette/js/restoreScroll.js | 25 + themes/courgette/layout.twig | 32 ++ themes/courgette/login.twig | 32 ++ themes/courgette/screenshot.jpg | Bin 0 -> 80611 bytes themes/courgette/view.twig | 45 ++ 56 files changed, 1181 insertions(+) create mode 100755 themes/courgette/README.md create mode 100755 themes/courgette/_bookmarklet.twig create mode 100755 themes/courgette/_footer.twig create mode 100755 themes/courgette/_head.twig create mode 100755 themes/courgette/_menu.twig create mode 100755 themes/courgette/_messages.twig create mode 100755 themes/courgette/_top.twig create mode 100755 themes/courgette/config.twig create mode 100644 themes/courgette/css/.DS_Store create mode 100755 themes/courgette/css/font.css create mode 100755 themes/courgette/css/knacss.css create mode 100755 themes/courgette/css/messages.css create mode 100755 themes/courgette/css/print.css create mode 100755 themes/courgette/css/style-default.css create mode 100755 themes/courgette/css/style.css create mode 100755 themes/courgette/error.twig create mode 100755 themes/courgette/export.twig create mode 100644 themes/courgette/font/fontello.eot create mode 100644 themes/courgette/font/fontello.svg create mode 100644 themes/courgette/font/fontello.ttf create mode 100644 themes/courgette/font/fontello.woff create mode 100755 themes/courgette/home.twig create mode 100755 themes/courgette/img/apple-touch-icon-144x144-precomposed.png create mode 100755 themes/courgette/img/apple-touch-icon-72x72-precomposed.png create mode 100755 themes/courgette/img/apple-touch-icon.png create mode 100644 themes/courgette/img/bg-select.png create mode 100755 themes/courgette/img/default/backtotop.png create mode 100755 themes/courgette/img/default/bad-display.png create mode 100755 themes/courgette/img/default/checkmark-off.png create mode 100755 themes/courgette/img/default/checkmark-on.png create mode 100755 themes/courgette/img/default/clock.png create mode 100755 themes/courgette/img/default/down.png create mode 100755 themes/courgette/img/default/envelop.png create mode 100755 themes/courgette/img/default/flattr.png create mode 100755 themes/courgette/img/default/left.png create mode 100755 themes/courgette/img/default/link.png create mode 100755 themes/courgette/img/default/remove.png create mode 100755 themes/courgette/img/default/shaarli.png create mode 100755 themes/courgette/img/default/star-off.png create mode 100755 themes/courgette/img/default/star-on.png create mode 100755 themes/courgette/img/default/top.png create mode 100755 themes/courgette/img/default/twitter.png create mode 100755 themes/courgette/img/favicon.ico create mode 100755 themes/courgette/img/logo.png create mode 100755 themes/courgette/img/messages/close.png create mode 100755 themes/courgette/img/messages/cross.png create mode 100755 themes/courgette/img/messages/help.png create mode 100755 themes/courgette/img/messages/tick.png create mode 100755 themes/courgette/img/messages/warning.png create mode 100755 themes/courgette/install.twig create mode 100755 themes/courgette/js/init.js create mode 100755 themes/courgette/js/restoreScroll.js create mode 100755 themes/courgette/layout.twig create mode 100755 themes/courgette/login.twig create mode 100755 themes/courgette/screenshot.jpg create mode 100755 themes/courgette/view.twig diff --git a/themes/courgette/README.md b/themes/courgette/README.md new file mode 100755 index 00000000..e13d3900 --- /dev/null +++ b/themes/courgette/README.md @@ -0,0 +1,3 @@ +# Courgette Theme + +theme created by Thomas LEBEAU alias Courgette http://thomaslebeau.fr/ \ No newline at end of file diff --git a/themes/courgette/_bookmarklet.twig b/themes/courgette/_bookmarklet.twig new file mode 100755 index 00000000..2f3b2d16 --- /dev/null +++ b/themes/courgette/_bookmarklet.twig @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/themes/courgette/_footer.twig b/themes/courgette/_footer.twig new file mode 100755 index 00000000..2b895854 --- /dev/null +++ b/themes/courgette/_footer.twig @@ -0,0 +1,4 @@ +
+

{% trans "powered by" %} poche

+ {% if constant('DEBUG_POCHE') == 1 %}

{% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE_VERSION')}}. {% trans "storage:" %} {{constant('STORAGE')}}

{% endif %} +
\ No newline at end of file diff --git a/themes/courgette/_head.twig b/themes/courgette/_head.twig new file mode 100755 index 00000000..57b40f41 --- /dev/null +++ b/themes/courgette/_head.twig @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/themes/courgette/_menu.twig b/themes/courgette/_menu.twig new file mode 100755 index 00000000..85487f73 --- /dev/null +++ b/themes/courgette/_menu.twig @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/themes/courgette/_messages.twig b/themes/courgette/_messages.twig new file mode 100755 index 00000000..679aa098 --- /dev/null +++ b/themes/courgette/_messages.twig @@ -0,0 +1 @@ + {{ messages | raw }} \ No newline at end of file diff --git a/themes/courgette/_top.twig b/themes/courgette/_top.twig new file mode 100755 index 00000000..a2a4b28d --- /dev/null +++ b/themes/courgette/_top.twig @@ -0,0 +1,9 @@ +
+

+ {% if view == 'home' %}{% block logo %}logo poche{% endblock %} + {% elseif view == 'fav' %}{{ block('logo') }} Favoris + {% elseif view == 'archive' %}{{ block('logo') }} Archive + {% else %}{{ block('logo') }} + {% endif %} +

+
\ No newline at end of file diff --git a/themes/courgette/config.twig b/themes/courgette/config.twig new file mode 100755 index 00000000..d822a457 --- /dev/null +++ b/themes/courgette/config.twig @@ -0,0 +1,82 @@ +{% extends "layout.twig" %} + +{% block title %}{% trans "config" %}{% endblock %} +{% block menu %} +{% include '_menu.twig' %} +{% endblock %} +{% block content %} +
+

{% trans "Poching a link" %}

+

{% trans "You can poche a link by several methods:" %} (?)

+ + +

{% trans "Updating poche" %}

+ + +

{% trans "Change your theme" %}

+
+
+
+ + +
+
+ +
+
+ + +
+ +

{% trans "Change your password" %}

+
+
+
+ + +
+
+ + +
+
+ +
+
+ + +
+ +

{% trans "Import" %}

+

{% trans "Please execute the import script locally, it can take a very long time." %}

+

{% trans "More infos in the official doc:" %} inthepoche.com

+ + +

{% trans "Export your poche datas" %}

+

{% trans "Click here" %} {% trans "to export your poche datas." %}

+
+{% endblock %} \ No newline at end of file diff --git a/themes/courgette/css/.DS_Store b/themes/courgette/css/.DS_Store new file mode 100644 index 00000000..c788a093 Binary files /dev/null and b/themes/courgette/css/.DS_Store differ diff --git a/themes/courgette/css/font.css b/themes/courgette/css/font.css new file mode 100755 index 00000000..7c16cce4 --- /dev/null +++ b/themes/courgette/css/font.css @@ -0,0 +1,10 @@ +@font-face { + font-family: 'fontello'; + src: url('../font/fontello.eot?97381924'); + src: url('../font/fontello.eot?97381924#iefix') format('embedded-opentype'), + url('../font/fontello.woff?97381924') format('woff'), + url('../font/fontello.ttf?97381924') format('truetype'), + url('../font/fontello.svg?97381924#fontello') format('svg'); + font-weight: normal; + font-style: normal; +} \ No newline at end of file diff --git a/themes/courgette/css/knacss.css b/themes/courgette/css/knacss.css new file mode 100755 index 00000000..e69de29b diff --git a/themes/courgette/css/messages.css b/themes/courgette/css/messages.css new file mode 100755 index 00000000..fe6fbbe8 --- /dev/null +++ b/themes/courgette/css/messages.css @@ -0,0 +1,75 @@ +.messages { + display: block; + clear: both; + width: 400px; + margin: 10px auto 10px; + padding: 10px 0; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.messages a.closeMessage { + display: none; + float: right; + width: 16px; + height: 16px; + margin: -14px -8px 0 0; + background: url(../img/messages/close.png) no-repeat; +} + +/*.messages:hover a.closeMessage { visibility:visible; }*/ + +.messages p { + margin: 3px 0 3px 10px !important; + padding: 0 10px 0 23px !important; + font-size: 14px; + line-height: 16px; +} + +.messages.error { + border: 1px solid #c42608; + color: #c00 !important; + background: #fff0ef; +} + +.messages.error p { + color: #c00 !important; + background: url(../img/messages/cross.png) no-repeat 0 50%; +} + +.messages.success { + border: 1px solid #6dc70c; + background: #e0fbcc; +} + +.messages.success p { + color: #2b6301 !important; + background: url(../img/messages/tick.png) no-repeat 0 50%; +} + +.messages.warning { + border: 1px solid #ebcd41; + color: #000; + background: #fffcd3; +} + +.messages.warning p { + color: #5f4e01; + background: url(../img/messages/warning.png) no-repeat 0 50%; +} + +.messages.information, +.messages.info { + border: 1px solid #82aee7; + background: #dfebfb; +} + +.messages.information p, +.messages.info p { + color: #064393; + background: url(../img/messages/help.png) no-repeat 0 50%; +} + +.messages.information a { + text-decoration: underline; +} \ No newline at end of file diff --git a/themes/courgette/css/print.css b/themes/courgette/css/print.css new file mode 100755 index 00000000..9aefa779 --- /dev/null +++ b/themes/courgette/css/print.css @@ -0,0 +1,48 @@ +/* ### Layout ### */ + +body { + font-family: Serif; + background-color: #fff; +} + +@page { + margin: 1cm; +} + +img { + max-width: 100% !important; +} + +/* ### Content ### */ + +/* Hide useless blocks */ +body > header, +#links, +#sort, +body > footer, +.top_link, +div.tools, +header div, +.messages, +.entrie + .results { + display: none !important; +} + +article { + border: none !important; +} + +/* Add URL after links */ +.vieworiginal a:after { + content: " (" attr(href) ")"; +} + +/* Add explanation after abbr */ +abbr[title]:after { + content: " (" attr(title) ")"; +} + +/* Change border on current pager item */ +.pagination span.current { + border-style: dashed; +} diff --git a/themes/courgette/css/style-default.css b/themes/courgette/css/style-default.css new file mode 100755 index 00000000..3377a75b --- /dev/null +++ b/themes/courgette/css/style-default.css @@ -0,0 +1,59 @@ +a.back span { + background-image: url('../img/default/left.png'); +} + +a.top span { + background-image: url('../img/default/top.png'); +} + +a.fav span, +a.fav-off span:hover { + background-image: url('../img/default/star-on.png'); +} + +a.fav span:hover, +a.fav-off span { + background-image: url('../img/default/star-off.png'); +} + +a.archive span, +a.archive-off span:hover { + background-image: url('../img/default/checkmark-on.png'); +} + +a.archive span:hover, +a.archive-off span { + background-image: url('../img/default/checkmark-off.png'); +} + +a.twitter span { + background-image: url('../img/default/twitter.png'); +} + +a.shaarli span { + background-image: url('../img/default/shaarli.png'); +} + +a.flattr span { + background-image: url('../img/default/flattr.png'); +} + +a.email span { + background-image: url('../img/default/envelop.png'); +} + +a.delete span { + background-image: url('../img/default/remove.png'); +} + +a.link span { + background-image: url('../img/default/link.png'); +} + +a.bad-display span { + background-image: url('../img/default/bad-display.png'); +} + +a.reading-time span { + background-image: url('../img/default/clock.png'); +} diff --git a/themes/courgette/css/style.css b/themes/courgette/css/style.css new file mode 100755 index 00000000..2ba16b71 --- /dev/null +++ b/themes/courgette/css/style.css @@ -0,0 +1,620 @@ +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +body { + margin: 10px; + font-family: 'Roboto',Verdana,Geneva,sans-serif; + font-size: 16px; + color: #000; +} + +h1 span { + color #FFF; + background: #000; + display: inline-block; + padding: 0.2em 1em 0.2em 1.2em; + font-size: 0.7em; + position: relative; + top: -1em; + left: -1em; +} + +h1 a { + color: #FFF; + text-decoration: none; +} + +#menu { + font-family: 'fontello'; + position:fixed; + z-index: 11; + top: 0.7em; + right: 0.5em; + border:0; + font-size: 2em; + background: #000; + color:#FFF; + height: 58px; + width: 58px; + line-height:58px; + border-radius:120px; +} + +#menu:hover, #menu:focus { + background: #FFF; + color:#000; + cursor: pointer; +} + +#menu span { + position: absolute; + top: -99999px; +} + +#menuContainer ul, #article_toolbar ul { + position:fixed; + top: 0; + left:0; + width: 100%; + padding: 0; + margin: 0; + text-align:center; + height:80px; +} + +/*Inspired by http://tympanus.net/Tutorials/AnimatedBorderMenus/index.html */ + +#menuContainer, #article_toolbar { + position: fixed; + top: 0; + left:0; + width: 100%; + height: 0; + overflow: hidden; + border-width:0; + border-style: solid; + border-color:#000; + background-color: transparent; + -webkit-transition: border-width 0.3s, background-color 0.3s, height 0s 0.3s; + -moz-transition: border-width 0.3s, background-color 0.3s, height 0s 0.3s; + transition: border-width 0.3s, background-color 0.3s, height 0s 0.3s; +} + +#article_toolbar ul { + padding: 1.7em; +} + +#menuContainer.open, #article_toolbar.open { + border-width:80px; + height: 100%; + background: rgba(0,0,0,0.5); + -webkit-transition: border-width 0.3s, background-color 0.3s; + -moz-transition: border-width 0.3s, background-color 0.3s; + transition: border-width 0.3s, background-color 0.3s; + z-index: 1; +} + +#links li, #article_toolbar li { + list-style: none; + display: inline-block; +} + +#links li a, #article_toolbar a { + color:#FFF; + display: block; + position:relative; + top: -200px; + -webkit-transition: top 0.3s ease; + -moz-transition: top 0.3s ease; + transition: top 0.3s ease; + padding:1.85em 1em; +} + +#links li a { + text-decoration:none; + text-transform:uppercase; +} + +#links li a:hover, #links li a:focus { + background: #FFF; + color:#000; +} + +#menuContainer.open li a, #article_toolbar.open a { + top: 0; + -webkit-transition: top 0.3s ease; + -moz-transition: top 0.3s ease; + transition: top 0.3s ease; + -webkit-transition-delay:0.25ms; + -moz-transition-delay:0.25ms; + transition-delay:0.25ms; +} + +#menuContainer.open li:nth-child(2) a { + -webkit-transition-delay:0.50ms; + -moz-transition-delay:0.50ms; + transition-delay:0.50ms; +} + +#menuContainer.open li:nth-child(3) a { + -webkit-transition-delay:1ms; + -moz-transition-delay:1ms; + transition-delay:1ms; +} + +#menuContainer.open li:nth-child(4) a { + -webkit-transition-delay:1.25ms; + -moz-transition-delay:1.25ms; + transition-delay:1.25ms; +} + +#menuContainer.open li:nth-child(5) a { + -webkit-transition-delay:1.55ms; + -moz-transition-delay:1.55ms; + transition-delay:1.55ms; +} + +#menu:before { + content: "\e801"; + display: block; + text-indent: 0; +} + +body > header { + position: fixed; + top: 0; + left: 1em; + z-index: 10; +} + +#main { + padding:6em; +} + +/* ========================================================================== + entrie + ========================================================================== */ + +.entrie, #article { + width: 45em; + margin: auto; + position:relative; + padding: 0 0 1em 0; + margin-bottom: 1.5em; +} + +#article a { + text-decoration: underline; + color:#000; +} + +#article a:hover, #article a:focus { + text-decoration: none; +} + +.entrie:after { + content:""; + position: absolute; + width: 100%; + height: 4px; + background: #000; + bottom:0; + left: -1em; +} + +.entrie p { + padding:0 0 0 1.5em; +} + +.entrie:before { + content:''; + position: absolute; + top: 0; + left: -1em; + width: 4px; + height: 100%; + background: #000; +} + +.entrie h2:after { + content:""; + display: block; + width: 0; + height: 0; + border-color: #000; + border-width:7px; + border-color:transparent transparent transparent #000; + border-style: solid; + position: absolute; + top: 0.8em; + right: -0.58em; +} + +.entrie h2 { + margin:0; + display: inline-block; + position: relative; + max-width: 78%; +} + +.entrie h2 a { + color:#000; + text-decoration:none; + display: block; + background: #000; + padding: 0.4em 1em; + color:#FFF; + margin-left: -0.5em; + -webkit-transition: all 0.3s ease-out; + -moz-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.entrie h2 a:hover, .entrie h2 a:focus { + padding:0.4em 1em 0.4em 2em; +} + +ul { + padding:0; + margin:0; +} + +ul li { + list-style: none; +} + +.tools { + display: inline-block; + margin-left: 1em; + vertical-align: top; + padding-top: 1em; +} + +.tools a span { + position:absolute; + top: -99999px; +} + +.tools li { + display: inline-block; +} + +.tools a { + display: block; + color:#FFF; + background: #000; + text-decoration:none; + height: 1.5em; + width: 1.5em; + text-align: center; + line-height:1.5em; + border-radius: 90px; +} + +.tools a:hover, .tools a:focus { + background: #FFF; + color:#000; +} + +.tools a:before { display: block; font-family: 'fontello'; } + + +.fav-off:before, .fav:before { content: '\e805'; } /* '' */ +.archive-off:before, .archive:before { content: '\e804'; } /* '' */ +.tools .archive, .tools .fav { + background: #FFF; + color:#000; +} +.link:before { content: '\e800'; } /* '' */ +.delete:before { content: '\e803'; } /* '' */ +.reading-time:before { content: '\e802'; } /* '' */ + +#article_toolbar a:before { + display: block; + font-family: 'fontello'; +} + +#article_toolbar a { + display: block; + color:#000; + background: #FFF; + text-decoration:none; + height: 1.5em; + width: 1.5em; + text-align: center; + line-height:1.5em; + border-radius: 90px; + padding: 0; +} + +#article_toolbar a:hover, #article_toolbar a:focus { + background: #000; + color:#FFF; +} + +#article_toolbar span { + position: absolute; + top: -99999px; +} + +.email:before { content: '\e80a'; } /* '' */ +.icon-check:before { content: '\e804'; } /* '' */ +.back:before { content: '\e806'; } /* '' */ +.bad-display:before { content: '\e808'; } /* '' */ +.twitter:before { content: '\e807'; } /* '' */ + +#article_toolbar .flattrli { + display: none; +} + +#article_toolbar li { + margin: 0 0 0 1em; +} + + +footer { + position: fixed; + bottom: 0; + width: 100%; + padding: 0 2%; + left: 0; + text-align:right; + font-size: 0.8em; + font-style: italic; + background: rgba(255,255,255,0.5); +} + +footer a { + color:#000; +} + +footer a:hover,footer a:focus { + text-decoration: none; +} + +footer p:first-child { + float:left; +} + +#loginForm fieldset { + border:5px solid #000; + padding: 1.5em; +} + +fieldset { + border:0; + padding: 0; +} + +#loginForm { + max-width: 25em; + margin: auto; +} + +#loginForm .row { + margin-bottom: 0.5em; +} + +form h2 { + margin-top: 0; +} + +form label { + width: 40%; + display: inline-block; +} + +form input[type="text"], form input[type="password"], form input[type='url'], form select { + border:1px solid #000; + padding:0.5em 1em; +} + +@media screen and (-webkit-min-device-pixel-ratio:0){ + form select{ + -webkit-appearance: none; + background: url(../img/bg-select.png) no-repeat right center; + padding-right: 2.2em; + border-radius: 0; + } +} + +form button, form input[type="submit"] { + background: #000; + color:#FFF; + border:0; + font-size:1em; + padding:0.5em 1em; + margin-top: 1em; + cursor: pointer; +} + +form button:hover, form button:focus, form input[type="submit"]:hover, form input[type="submit"]:focus { + background: #FFF; + color: #000; +} + +/* ========================================================================== + Config + ========================================================================== */ + +#config { + max-width: 60%; + margin: auto; +} + +#config a { + background: #000; + text-decoration: none; + color:#FFF; + padding: 0.2em 1em; +} + +#config .special { + background: none; + padding:0; + color: #000; +} + +#config a:hover, #config a:focus { + background: #FFF; + color:#000; +} + +#config li { + margin-bottom: 1em; +} + +#plainurl { + font-size: 1em; +} + +#config label { + width: 20%; +} + +.results { + max-width: 62.5%; + font-style:italic; + margin: 1em auto 2.5em; +} + +#sort { + max-width: 62.5%; + margin: 0 auto -2.5em; + text-align: right; + border-bottom:1px dotted #000; +} + +#sort li { + display: inline-block; + vertical-align: top; + position: relative; + top: -0.1em; + margin-left: 1em; +} + +#sort li img { + display: none; +} + +#sort a { + display: inline-block; + font-family: 'fontello'; + color:#000; + text-decoration: none; +} + +#sort a:hover, #sort a:focus { + text-decoration: underline; +} + +#sort a:before { + display: block; +} + +#sort li a:first-child:before { + content: '\e809'; +} + +#sort li a:first-child + a:before { + content: '\e80b'; +} + +@media screen and (max-width: 860px) { + .entrie, #article { + width: 30em; + } +} + +@media screen and (max-width: 650px) { + #menuContainer ul, #article_toolbar ul { + width: 120px; + height: 100%; + } + + body > header { + position: static; + } + + #main { + padding: 0 0.5em 6em; + } + + #menu { + display: none; + } + + #main:before { + content:none; + } + + #menuContainer, #article_toolbar, #menuContainer ul, #article_toolbar ul { + position: static; + width: 100%; + height: auto; + } + + #links li a, #article_toolbar a { + position: static; + color: #000; + } + + #links li a { + padding: 1em; + min-width: 120px; + text-align: left; + } + + #article_toolbar li { + margin-bottom: 1em; + margin-left: 0.5em; + } + +} + +@media screen and (max-width: 500px) { + .entrie, #article { + width: 17em; + } + .entrie h2 { + width: 100%; + max-width: none; + } + .entrie h2 a:hover, .entrie h2 a:focus { + padding-left: 1em; + background: #FFF; + color: #000; + } + .entrie h2:after { + content:none; + } + + .messages { + width: 100%!important; + } + + #sort { + margin: 3em auto 0; + max-width: none; + text-align: center; + } + #config { + margin: 7em auto 0; + max-width: none; + } + #config label { width: 100%; } + .results { + max-width: none; + margin-bottom: 1em; + } + + footer p:first-child { + float: none; + } + footer { + position:static; + } +} diff --git a/themes/courgette/error.twig b/themes/courgette/error.twig new file mode 100755 index 00000000..c829d12b --- /dev/null +++ b/themes/courgette/error.twig @@ -0,0 +1,6 @@ +{% extends "layout.twig" %} +{% block title %}{% trans "plop" %}{% endblock %} +{% block content %} + {{ msg|raw }} +

Don't forget the documentation.

+{% endblock %} \ No newline at end of file diff --git a/themes/courgette/export.twig b/themes/courgette/export.twig new file mode 100755 index 00000000..4adb9540 --- /dev/null +++ b/themes/courgette/export.twig @@ -0,0 +1 @@ +{{ export }} \ No newline at end of file diff --git a/themes/courgette/font/fontello.eot b/themes/courgette/font/fontello.eot new file mode 100644 index 00000000..3c5603dd Binary files /dev/null and b/themes/courgette/font/fontello.eot differ diff --git a/themes/courgette/font/fontello.svg b/themes/courgette/font/fontello.svg new file mode 100644 index 00000000..0e0118ed --- /dev/null +++ b/themes/courgette/font/fontello.svg @@ -0,0 +1,23 @@ + + + +Copyright (C) 2013 by original authors @ fontello.com + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/courgette/font/fontello.ttf b/themes/courgette/font/fontello.ttf new file mode 100644 index 00000000..1967dfaa Binary files /dev/null and b/themes/courgette/font/fontello.ttf differ diff --git a/themes/courgette/font/fontello.woff b/themes/courgette/font/fontello.woff new file mode 100644 index 00000000..c62afa54 Binary files /dev/null and b/themes/courgette/font/fontello.woff differ diff --git a/themes/courgette/home.twig b/themes/courgette/home.twig new file mode 100755 index 00000000..1367ebe8 --- /dev/null +++ b/themes/courgette/home.twig @@ -0,0 +1,49 @@ +{% extends "layout.twig" %} +{% block title %} +{% if view == 'fav' %} +{% trans "favoris" %} +{% elseif view == 'archive' %} +{% trans "archive" %} +{% else %} +{% trans "unread" %} +{% endif %} +{% endblock %} +{% block menu %} +{% include '_menu.twig' %} +{% endblock %} +{% block precontent %} + {% if entries|length > 1 %} +
    +
  • {% trans {% trans "by date" %} {% trans
  • +
  • {% trans {% trans "by title" %} {% trans
  • +
+ {% endif %} +{% endblock %} +{% block content %} + {% if entries is empty %} +

{% trans "No link available here!" %}

+ {% else %} + {% block pager %} + {% if nb_results > 1 %} +
+
{{ nb_results }} {% trans "results" %}
+ {{ page_links | raw }} +
+ {% endif %} + {% endblock %} + {% for entry in entries %} +
+

{{ entry.title|raw }}

+ +

{{ entry.content|striptags|slice(0, 300) }}...

+
+ {% endfor %} + {% endif %} + {{ block('pager') }} +{% endblock %} \ No newline at end of file diff --git a/themes/courgette/img/apple-touch-icon-144x144-precomposed.png b/themes/courgette/img/apple-touch-icon-144x144-precomposed.png new file mode 100755 index 00000000..557b479c Binary files /dev/null and b/themes/courgette/img/apple-touch-icon-144x144-precomposed.png differ diff --git a/themes/courgette/img/apple-touch-icon-72x72-precomposed.png b/themes/courgette/img/apple-touch-icon-72x72-precomposed.png new file mode 100755 index 00000000..e167d3a4 Binary files /dev/null and b/themes/courgette/img/apple-touch-icon-72x72-precomposed.png differ diff --git a/themes/courgette/img/apple-touch-icon.png b/themes/courgette/img/apple-touch-icon.png new file mode 100755 index 00000000..4d222fba Binary files /dev/null and b/themes/courgette/img/apple-touch-icon.png differ diff --git a/themes/courgette/img/bg-select.png b/themes/courgette/img/bg-select.png new file mode 100644 index 00000000..3a77d0eb Binary files /dev/null and b/themes/courgette/img/bg-select.png differ diff --git a/themes/courgette/img/default/backtotop.png b/themes/courgette/img/default/backtotop.png new file mode 100755 index 00000000..051238ef Binary files /dev/null and b/themes/courgette/img/default/backtotop.png differ diff --git a/themes/courgette/img/default/bad-display.png b/themes/courgette/img/default/bad-display.png new file mode 100755 index 00000000..6866799f Binary files /dev/null and b/themes/courgette/img/default/bad-display.png differ diff --git a/themes/courgette/img/default/checkmark-off.png b/themes/courgette/img/default/checkmark-off.png new file mode 100755 index 00000000..3db5a06d Binary files /dev/null and b/themes/courgette/img/default/checkmark-off.png differ diff --git a/themes/courgette/img/default/checkmark-on.png b/themes/courgette/img/default/checkmark-on.png new file mode 100755 index 00000000..cd3abb2c Binary files /dev/null and b/themes/courgette/img/default/checkmark-on.png differ diff --git a/themes/courgette/img/default/clock.png b/themes/courgette/img/default/clock.png new file mode 100755 index 00000000..6164e92b Binary files /dev/null and b/themes/courgette/img/default/clock.png differ diff --git a/themes/courgette/img/default/down.png b/themes/courgette/img/default/down.png new file mode 100755 index 00000000..b9d536a7 Binary files /dev/null and b/themes/courgette/img/default/down.png differ diff --git a/themes/courgette/img/default/envelop.png b/themes/courgette/img/default/envelop.png new file mode 100755 index 00000000..6be1c886 Binary files /dev/null and b/themes/courgette/img/default/envelop.png differ diff --git a/themes/courgette/img/default/flattr.png b/themes/courgette/img/default/flattr.png new file mode 100755 index 00000000..0404aaea Binary files /dev/null and b/themes/courgette/img/default/flattr.png differ diff --git a/themes/courgette/img/default/left.png b/themes/courgette/img/default/left.png new file mode 100755 index 00000000..a0a53631 Binary files /dev/null and b/themes/courgette/img/default/left.png differ diff --git a/themes/courgette/img/default/link.png b/themes/courgette/img/default/link.png new file mode 100755 index 00000000..db62819d Binary files /dev/null and b/themes/courgette/img/default/link.png differ diff --git a/themes/courgette/img/default/remove.png b/themes/courgette/img/default/remove.png new file mode 100755 index 00000000..f8ad56a3 Binary files /dev/null and b/themes/courgette/img/default/remove.png differ diff --git a/themes/courgette/img/default/shaarli.png b/themes/courgette/img/default/shaarli.png new file mode 100755 index 00000000..1eb30f60 Binary files /dev/null and b/themes/courgette/img/default/shaarli.png differ diff --git a/themes/courgette/img/default/star-off.png b/themes/courgette/img/default/star-off.png new file mode 100755 index 00000000..6a0133a7 Binary files /dev/null and b/themes/courgette/img/default/star-off.png differ diff --git a/themes/courgette/img/default/star-on.png b/themes/courgette/img/default/star-on.png new file mode 100755 index 00000000..a9f96eaa Binary files /dev/null and b/themes/courgette/img/default/star-on.png differ diff --git a/themes/courgette/img/default/top.png b/themes/courgette/img/default/top.png new file mode 100755 index 00000000..954a8c0a Binary files /dev/null and b/themes/courgette/img/default/top.png differ diff --git a/themes/courgette/img/default/twitter.png b/themes/courgette/img/default/twitter.png new file mode 100755 index 00000000..cfcfe419 Binary files /dev/null and b/themes/courgette/img/default/twitter.png differ diff --git a/themes/courgette/img/favicon.ico b/themes/courgette/img/favicon.ico new file mode 100755 index 00000000..0e9ff779 Binary files /dev/null and b/themes/courgette/img/favicon.ico differ diff --git a/themes/courgette/img/logo.png b/themes/courgette/img/logo.png new file mode 100755 index 00000000..5305c77d Binary files /dev/null and b/themes/courgette/img/logo.png differ diff --git a/themes/courgette/img/messages/close.png b/themes/courgette/img/messages/close.png new file mode 100755 index 00000000..731aa018 Binary files /dev/null and b/themes/courgette/img/messages/close.png differ diff --git a/themes/courgette/img/messages/cross.png b/themes/courgette/img/messages/cross.png new file mode 100755 index 00000000..1514d51a Binary files /dev/null and b/themes/courgette/img/messages/cross.png differ diff --git a/themes/courgette/img/messages/help.png b/themes/courgette/img/messages/help.png new file mode 100755 index 00000000..5c870176 Binary files /dev/null and b/themes/courgette/img/messages/help.png differ diff --git a/themes/courgette/img/messages/tick.png b/themes/courgette/img/messages/tick.png new file mode 100755 index 00000000..a9925a06 Binary files /dev/null and b/themes/courgette/img/messages/tick.png differ diff --git a/themes/courgette/img/messages/warning.png b/themes/courgette/img/messages/warning.png new file mode 100755 index 00000000..628cf2da Binary files /dev/null and b/themes/courgette/img/messages/warning.png differ diff --git a/themes/courgette/install.twig b/themes/courgette/install.twig new file mode 100755 index 00000000..6e85e5cb --- /dev/null +++ b/themes/courgette/install.twig @@ -0,0 +1,28 @@ +{% extends "layout.twig" %} +{% block title %}{% trans "installation" %}{% endblock %} +{% block content %} +
+
+

{% trans "install your poche" %}

+

+ {% trans "poche is still not installed. Please fill the below form to install it. Don't hesitate to read the documentation on poche website." %} +

+

+ + +

+

+ + +

+

+ + +

+

+ +

+
+ +
+{% endblock %} \ No newline at end of file diff --git a/themes/courgette/js/init.js b/themes/courgette/js/init.js new file mode 100755 index 00000000..dca83906 --- /dev/null +++ b/themes/courgette/js/init.js @@ -0,0 +1,6 @@ +$.fn.ready(function () { + $('#menu').on('click', function(){ + $('body').toggleClass('menuOpen'); + $('#menuContainer, #article_toolbar').toggleClass('open'); + }); +}) \ No newline at end of file diff --git a/themes/courgette/js/restoreScroll.js b/themes/courgette/js/restoreScroll.js new file mode 100755 index 00000000..331c9e19 --- /dev/null +++ b/themes/courgette/js/restoreScroll.js @@ -0,0 +1,25 @@ +function supportsLocalStorage() { + try { + return 'localStorage' in window && window['localStorage'] !== null; + } catch (e) { + return false; + } +} + +function savePercent(id, percent) { + if (!supportsLocalStorage()) { return false; } + localStorage["poche.article." + id + ".percent"] = percent; + return true; +} + +function retrievePercent(id) { + if (!supportsLocalStorage()) { return false; } + + var bheight = $(document).height(); + var percent = localStorage["poche.article." + id + ".percent"]; + var scroll = bheight * percent; + + $('html,body').animate({scrollTop: scroll}, 'fast'); + + return true; +} \ No newline at end of file diff --git a/themes/courgette/layout.twig b/themes/courgette/layout.twig new file mode 100755 index 00000000..9a420ac4 --- /dev/null +++ b/themes/courgette/layout.twig @@ -0,0 +1,32 @@ + + + + + + + + + + + {% block title %}{% endblock %} - poche +{% include '_head.twig' %} +{% include '_bookmarklet.twig' %} + + + {% include '_top.twig' %} +
+ + {% block menu %}{% endblock %} + {% block precontent %}{% endblock %} + {% block messages %} + {% include '_messages.twig' %} + {% endblock %} +
+ {% block content %}{% endblock %} +
+
+{% include '_footer.twig' %} + + \ No newline at end of file diff --git a/themes/courgette/login.twig b/themes/courgette/login.twig new file mode 100755 index 00000000..3e17982f --- /dev/null +++ b/themes/courgette/login.twig @@ -0,0 +1,32 @@ +{% extends "layout.twig" %} + +{% block title %}{% trans "login to your poche" %}{% endblock %} +{% block content %} +
+
+

{% trans "login to your poche" %}

+ {% if constant('MODE_DEMO') == 1 %}

{% trans "you are in demo mode, some features may be disabled." %}

{% endif %} +
+ + +
+ +
+ + +
+
+ +
+ + {% trans "(Do not check on public computers)" %} +
+
+
+ +
+
+ + +
+{% endblock %} \ No newline at end of file diff --git a/themes/courgette/screenshot.jpg b/themes/courgette/screenshot.jpg new file mode 100755 index 00000000..44ee4b63 Binary files /dev/null and b/themes/courgette/screenshot.jpg differ diff --git a/themes/courgette/view.twig b/themes/courgette/view.twig new file mode 100755 index 00000000..e8d32442 --- /dev/null +++ b/themes/courgette/view.twig @@ -0,0 +1,45 @@ +{% extends "layout.twig" %} +{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} +{% block content %} +
+ +
+
+
+

{{ entry.title|raw }}

+
+
+ {{ content | raw }} +
+
+ + +{% endblock %} \ No newline at end of file -- cgit v1.2.3 From 1cecaa7926cee3d8e1ce4c6e369c52ad98d49e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 10 Jan 2014 16:33:10 +0100 Subject: [add] display token and user id --- themes/default/config.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/themes/default/config.twig b/themes/default/config.twig index ef615d39..e22ea1da 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -38,6 +38,8 @@
  • {% trans "Favorites feed" %}
  • {% trans "Archive feed" %}
  • +

    {% trans "Your token:" %} {{token}}

    +

    {% trans "Your user id:" %} {{user_id}}

    {% trans "You can regenerate your token: generate!." %}

    {% endif %} -- cgit v1.2.3 From 9ba98a0abe4ac5efed5213812f0f26821417b47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 10 Jan 2014 16:33:10 +0100 Subject: [add] display token and user id --- themes/default/config.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/themes/default/config.twig b/themes/default/config.twig index ef615d39..e22ea1da 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -38,6 +38,8 @@
  • {% trans "Favorites feed" %}
  • {% trans "Archive feed" %}
  • +

    {% trans "Your token:" %} {{token}}

    +

    {% trans "Your user id:" %} {{user_id}}

    {% trans "You can regenerate your token: generate!." %}

    {% endif %} -- cgit v1.2.3 From f878daeb8bc9245a294677e4ac141f8bd37c2b4f Mon Sep 17 00:00:00 2001 From: adev Date: Sun, 12 Jan 2014 17:08:52 +0100 Subject: add basic auth in file_get_contents for content extraction when user use basic auth --- inc/poche/Poche.class.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index e033ad74..004cca8e 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -325,6 +325,22 @@ class Poche ); } + protected function getPageContent(Url $url) + { + $options = array('http' => array('user_agent' => 'poche')); + if (isset($_SERVER['AUTH_TYPE']) && "basic" === strtolower($_SERVER['AUTH_TYPE'])) { + $options['http']['header'] = sprintf( + "Authorization: Basic %s", + base64_encode( + sprintf('%s:%s', $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) + ) + ); + } + $context = stream_context_create($options); + $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed', false, $context); + return json_decode($json, true); + } + /** * Call action (mark as fav, archive, delete, etc.) */ @@ -333,10 +349,7 @@ class Poche switch ($action) { case 'add': - $options = array('http' => array('user_agent' => 'poche')); - $context = stream_context_create($options); - $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed', false, $context); - $content = json_decode($json, true); + $content = $this->getPageContent($url); $title = $content['rss']['channel']['item']['title']; $body = $content['rss']['channel']['item']['description']; -- cgit v1.2.3 From d1d3498b62d00a88968378a3244ffd479a852b2e Mon Sep 17 00:00:00 2001 From: Lonnytunes Date: Mon, 20 Jan 2014 00:44:51 +0100 Subject: [fix] Stops multiplication, in database, of a same user config item (error of variable name). --- inc/poche/Database.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 04731821..48ec5abf 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -193,7 +193,7 @@ class Database { public function updateUserConfig($userId, $key, $value) { $config = $this->getConfigUser($userId); - if (!isset ($user_config[$key])) { + if (! isset($config[$key])) { $sql = "INSERT INTO users_config (value, user_id, name) VALUES (?, ?, ?)"; } else { -- cgit v1.2.3 From c95b78a8ceb918f033f3dd6c26aa7da4a8a527dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 28 Jan 2014 10:36:04 +0100 Subject: poche is dead, welcome wallabag --- CONTRIBUTING.md | 8 +- CREDITS.md | 6 +- INSTALL.md | 3 - README.md | 29 +--- TODO.md | 9 -- inc/poche/Database.class.php | 6 +- inc/poche/Poche.class.php | 9 +- inc/poche/Tools.class.php | 6 +- inc/poche/Url.class.php | 6 +- inc/poche/User.class.php | 6 +- inc/poche/config.inc.php.new | 6 +- inc/poche/global.inc.php | 6 +- inc/poche/pochePictures.php | 6 +- index.php | 8 +- poche_compatibility_test.php | 339 ---------------------------------------- themes/README.md | 31 ---- wallabag_compatibility_test.php | 339 ++++++++++++++++++++++++++++++++++++++++ 17 files changed, 381 insertions(+), 442 deletions(-) delete mode 100644 INSTALL.md delete mode 100644 TODO.md delete mode 100644 poche_compatibility_test.php delete mode 100644 themes/README.md create mode 100644 wallabag_compatibility_test.php diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c89411f3..7fdca652 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,11 @@ # How contributing ## You found a bug -Please [open a new issue](https://github.com/inthepoche/poche/issues/new). +Please [open a new issue](https://github.com/wallabag/demo.wallabag.org/issues/new). To fix the bug quickly, we need some infos: -* your poche version (in ./inc/poche/myconfig.inc.php) -* the link you want to poche and which causes problem +* your demo.wallabag.org version (in ./index.php) +* the link you want to save and which causes problem ## You want to fix a bug or to add a feature -Please fork poche and work with **the dev branch** only. Do not work on master branch. +Please fork wallabag and work with **the dev branch** only. **Do not work on master branch**. \ No newline at end of file diff --git a/CREDITS.md b/CREDITS.md index 6046a6aa..391f53c5 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1,4 +1,4 @@ -poche is based on : +wallabag is based on : * PHP Readability https://bitbucket.org/fivefilters/php-readability * Full Text RSS http://code.fivefilters.org/full-text-rss/src * Encoding https://github.com/neitanod/forceutf8 @@ -10,6 +10,6 @@ poche is based on : * Flash messages https://github.com/plasticbrain/PHP-Flash-Messages * Pagination https://github.com/daveismyname/pagination -poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License +wallabag is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License -Contributors : https://github.com/inthepoche/poche/graphs/contributors \ No newline at end of file +Contributors : https://github.com/wallabag/wallabag/graphs/contributors \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index df245ff0..00000000 --- a/INSTALL.md +++ /dev/null @@ -1,3 +0,0 @@ -# Installing poche - -Read the full documentation here: http://doc.inthepoche.com/doku.php?id=users:begin:install diff --git a/README.md b/README.md index d1ed79ee..30fc9657 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,10 @@ -# what is poche ? -Abandon Pocket, Instapaper and other Readability service : adopt poche. It is the same, but it is free (like in freedom) and open source. +# what is wallabag ? +wallabag is a self hostable application allowing you to not miss any content anymore. Click, save, read it when you can. It extracts content so that you can read it when you have time. -## Some features -* adding, deleting, archiving and setting as favorite a link -* import from pocket / readability / instapaper -* share links by email and on twitter -* a design adapted to tablets and smartphones -* extensions for Chrome and Firefox -* Android application -* multi languages: french, english, spanish, german. -* multi users (very soon!) -* update notification in configuration screen -* many storage modes (sqlite, mysql, postgresql) -* many templates: [have a look here](https://github.com/inthepoche/poche/tree/master/themes). -* ... - -To test poche, a demo website is online : [demo.inthepoche.com](http://demo.inthepoche.com) (login poche, password poche). - -To use poche hosting, [you can create an account here](http://app.inthepoche.com/). - -## Installation -Read the [INSTALL.md file](https://github.com/inthepoche/poche/blob/master/INSTALL.md). +To test wallabag, a demo website is online : [demo.wallabag.org](http://demo.wallabag.org) (login poche, password poche). ## License -Copyright © 2010-2013 Nicolas Lœuillet +Copyright © 2010-2013 Nicolas Lœuillet This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, -as published by Sam Hocevar. See the COPYING file for more details. +as published by Sam Hocevar. See the COPYING file for more details. \ No newline at end of file diff --git a/TODO.md b/TODO.md deleted file mode 100644 index fdba2a51..00000000 --- a/TODO.md +++ /dev/null @@ -1,9 +0,0 @@ -# TODO - -* pouvoir annuler la suppression -* conventions codage ? phing ? vérifier error_log qui trainent -* phpDocumentor -* minifier css -* barre fixe d'admin sur la page d'un billet ? -* revoir export (export vers pocket &cie ? ) -* raccourcis clavier \ No newline at end of file diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 48ec5abf..3b0f455e 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index e033ad74..4a5a954b 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ @@ -29,7 +29,8 @@ class Poche 'dark' => array('requires' => array('default')), 'dmagenta' => array('requires' => array('default')), 'solarized' => array('requires' => array('default')), - 'solarized-dark' => array('requires' => array('default')) + 'solarized-dark' => array('requires' => array('default')), + 'courgette' => array('requires' => array()) ); public function __construct() diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 63916582..248a44d7 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php index 8b3468c3..aba236fa 100644 --- a/inc/poche/Url.class.php +++ b/inc/poche/Url.class.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/inc/poche/User.class.php b/inc/poche/User.class.php index 6dac7839..cc8bec65 100644 --- a/inc/poche/User.class.php +++ b/inc/poche/User.class.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 1c93be07..39cb2f2f 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 846699d3..e2beade1 100644 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/inc/poche/pochePictures.php b/inc/poche/pochePictures.php index b0cfb9df..e4b0b160 100644 --- a/inc/poche/pochePictures.php +++ b/inc/poche/pochePictures.php @@ -1,9 +1,9 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ diff --git a/index.php b/index.php index 4e86fe11..9113f193 100644 --- a/index.php +++ b/index.php @@ -1,14 +1,14 @@ + * @category wallabag + * @author Nicolas Lœuillet * @copyright 2013 * @license http://www.wtfpl.net/ see COPYING file */ -define ('POCHE', '1.3.0'); +define ('POCHE', '1.4.0'); require_once 'inc/poche/global.inc.php'; session_start(); diff --git a/poche_compatibility_test.php b/poche_compatibility_test.php deleted file mode 100644 index 42faaa2c..00000000 --- a/poche_compatibility_test.php +++ /dev/null @@ -1,339 +0,0 @@ -=')); -$pcre_ok = extension_loaded('pcre'); -$zlib_ok = extension_loaded('zlib'); -$mbstring_ok = extension_loaded('mbstring'); -$iconv_ok = extension_loaded('iconv'); -$tidy_ok = function_exists('tidy_parse_string'); -$curl_ok = function_exists('curl_exec'); -$parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) || ($curl_ok && function_exists('curl_multi_init'))); -$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); -$filter_ok = extension_loaded('filter'); - -if (extension_loaded('xmlreader')) { - $xml_ok = true; -} elseif (extension_loaded('xml')) { - $parser_check = xml_parser_create(); - xml_parse_into_struct($parser_check, '&', $values); - xml_parser_free($parser_check); - $xml_ok = isset($values[0]['value']); -} else { - $xml_ok = false; -} - -header('Content-type: text/html; charset=UTF-8'); - -?> - - - -<?php echo $app_name; ?>: Server Compatibility Test - - - - - - - -
    -
    - -
    -

    : Compatibility Test

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestShould BeWhat You Have
    PHP5.2.0 or higher
    XMLEnabled
    PCREEnabled
    Data filteringEnabled
    TidyEnabled
    cURLEnabled
    Parallel URL fetchingEnabled
    allow_url_fopenEnabled
    -
    - -
    -

    What does this mean?

    -
      - - -
    1. You have everything you need to run properly! Congratulations!
    2. - - -
    3. PHP: You are running a supported version of PHP. No problems here.
    4. - -
    5. XML: You have XMLReader support or a version of XML support that isn't broken installed. No problems here.
    6. - -
    7. PCRE: You have PCRE support installed. No problems here.
    8. - - -
    9. allow_url_fopen: You have allow_url_fopen enabled. No problems here.
    10. - - -
    11. Data filtering: You have the PHP filter extension enabled. No problems here.
    12. - - -
    13. Zlib: You have Zlib enabled. This allows SimplePie to support GZIP-encoded feeds. No problems here.
    14. - -
    15. Zlib: The Zlib extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.
    16. - - - -
    17. mbstring and iconv: You have both mbstring and iconv installed! This will allow to handle the greatest number of languages. No problems here.
    18. - -
    19. mbstring: mbstring is installed, but iconv is not.
    20. - -
    21. iconv: iconv is installed, but mbstring is not.
    22. - -
    23. mbstring and iconv: You do not have either of the extensions installed. This will significantly impair your ability to read non-English feeds, as well as even some English ones.
    24. - - - -
    25. Tidy: You have Tidy support installed. No problems here.
    26. - -
    27. Tidy: The Tidy extension is not available. should still work with most feeds, but you may experience problems with some.
    28. - - - -
    29. cURL: You have cURL support installed. No problems here.
    30. - -
    31. cURL: The cURL extension is not available. SimplePie will use fsockopen() instead.
    32. - - - -
    33. Parallel URL fetching: You have HttpRequestPool or curl_multi support installed. No problems here.
    34. - -
    35. Parallel URL fetching: HttpRequestPool or curl_multi support is not available. will use file_get_contents() instead to fetch URLs sequentially rather than in parallel.
    36. - - - -
    37. Data filtering: Your PHP configuration has the filter extension disabled. will not work here.
    38. - - - -
    39. allow_url_fopen: Your PHP configuration has allow_url_fopen disabled. will not work here.
    40. - - - -
    41. PCRE: Your PHP installation doesn't support Perl-Compatible Regular Expressions. will not work here.
    42. - - -
    43. XML: Your PHP installation doesn't support XML parsing. will not work here.
    44. - - -
    45. PHP: You are running an unsupported version of PHP. will not work here.
    46. - - -
    -
    - -
    - - -

    Bottom Line: Yes, you can!

    -

    Your webhost has its act together!

    -

    You can download the latest version of from inthepoche.com.

    -

    Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

    - - -

    Bottom Line: Yes, you can!

    -

    For most feeds, it'll run with no problems. There are certain languages that you might have a hard time with though.

    -

    You can download the latest version of from inthepoche.com.

    -

    Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

    - -

    Bottom Line: We're sorry…

    -

    Your webhost does not support the minimum requirements for . It may be a good idea to contact your webhost and point them to the results of this test. They may be able to enable/install the required components.

    - -
    - -
    -

    This compatibility test has been borrowed (and slightly adapted by fivefilters.org) from the one supplied by SimplePie.org.

    -
    - -
    - -
    - - - \ No newline at end of file diff --git a/themes/README.md b/themes/README.md deleted file mode 100644 index b5d925b4..00000000 --- a/themes/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# poche-themes - -themes created by poche users - -## list of themes - -* dark ([preview](https://raw.github.com/inthepoche/poche/master/themes/dark/screenshot.jpg)) -* dmagenta ([preview](https://raw.github.com/inthepoche/poche/master/themes/dmagenta/screenshot.jpg)) -* solarized ([preview](https://raw.github.com/inthepoche/poche/master/themes/solarized/screenshot.jpg)) -* solarized-dark ([preview](https://raw.github.com/inthepoche/poche/master/themes/solarized-dark/screenshot.jpg)) - -## installation - -In your poche folder: - -``` -git submodule init -git submodule update -``` - -Then, in your config screen, select your favorite theme. - -That's all ! - -## create a theme - -Just have a look to this short documentation : http://doc.inthepoche.com/doku.php?id=designers:creating_theme - -## send a theme - -Send your theme by email at support@inthepoche.com. diff --git a/wallabag_compatibility_test.php b/wallabag_compatibility_test.php new file mode 100644 index 00000000..49c4e3b8 --- /dev/null +++ b/wallabag_compatibility_test.php @@ -0,0 +1,339 @@ +=')); +$pcre_ok = extension_loaded('pcre'); +$zlib_ok = extension_loaded('zlib'); +$mbstring_ok = extension_loaded('mbstring'); +$iconv_ok = extension_loaded('iconv'); +$tidy_ok = function_exists('tidy_parse_string'); +$curl_ok = function_exists('curl_exec'); +$parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) || ($curl_ok && function_exists('curl_multi_init'))); +$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); +$filter_ok = extension_loaded('filter'); + +if (extension_loaded('xmlreader')) { + $xml_ok = true; +} elseif (extension_loaded('xml')) { + $parser_check = xml_parser_create(); + xml_parse_into_struct($parser_check, '&', $values); + xml_parser_free($parser_check); + $xml_ok = isset($values[0]['value']); +} else { + $xml_ok = false; +} + +header('Content-type: text/html; charset=UTF-8'); + +?> + + + +<?php echo $app_name; ?>: Server Compatibility Test + + + + + + + +
    +
    + +
    +

    : Compatibility Test

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TestShould BeWhat You Have
    PHP5.2.0 or higher
    XMLEnabled
    PCREEnabled
    Data filteringEnabled
    TidyEnabled
    cURLEnabled
    Parallel URL fetchingEnabled
    allow_url_fopenEnabled
    +
    + +
    +

    What does this mean?

    +
      + + +
    1. You have everything you need to run properly! Congratulations!
    2. + + +
    3. PHP: You are running a supported version of PHP. No problems here.
    4. + +
    5. XML: You have XMLReader support or a version of XML support that isn't broken installed. No problems here.
    6. + +
    7. PCRE: You have PCRE support installed. No problems here.
    8. + + +
    9. allow_url_fopen: You have allow_url_fopen enabled. No problems here.
    10. + + +
    11. Data filtering: You have the PHP filter extension enabled. No problems here.
    12. + + +
    13. Zlib: You have Zlib enabled. This allows SimplePie to support GZIP-encoded feeds. No problems here.
    14. + +
    15. Zlib: The Zlib extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.
    16. + + + +
    17. mbstring and iconv: You have both mbstring and iconv installed! This will allow to handle the greatest number of languages. No problems here.
    18. + +
    19. mbstring: mbstring is installed, but iconv is not.
    20. + +
    21. iconv: iconv is installed, but mbstring is not.
    22. + +
    23. mbstring and iconv: You do not have either of the extensions installed. This will significantly impair your ability to read non-English feeds, as well as even some English ones.
    24. + + + +
    25. Tidy: You have Tidy support installed. No problems here.
    26. + +
    27. Tidy: The Tidy extension is not available. should still work with most feeds, but you may experience problems with some.
    28. + + + +
    29. cURL: You have cURL support installed. No problems here.
    30. + +
    31. cURL: The cURL extension is not available. SimplePie will use fsockopen() instead.
    32. + + + +
    33. Parallel URL fetching: You have HttpRequestPool or curl_multi support installed. No problems here.
    34. + +
    35. Parallel URL fetching: HttpRequestPool or curl_multi support is not available. will use file_get_contents() instead to fetch URLs sequentially rather than in parallel.
    36. + + + +
    37. Data filtering: Your PHP configuration has the filter extension disabled. will not work here.
    38. + + + +
    39. allow_url_fopen: Your PHP configuration has allow_url_fopen disabled. will not work here.
    40. + + + +
    41. PCRE: Your PHP installation doesn't support Perl-Compatible Regular Expressions. will not work here.
    42. + + +
    43. XML: Your PHP installation doesn't support XML parsing. will not work here.
    44. + + +
    45. PHP: You are running an unsupported version of PHP. will not work here.
    46. + + +
    +
    + +
    + + +

    Bottom Line: Yes, you can!

    +

    Your webhost has its act together!

    +

    You can download the latest version of from wallabag.org.

    +

    Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

    + + +

    Bottom Line: Yes, you can!

    +

    For most feeds, it'll run with no problems. There are certain languages that you might have a hard time with though.

    +

    You can download the latest version of from wallabag.org.

    +

    Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

    + +

    Bottom Line: We're sorry…

    +

    Your webhost does not support the minimum requirements for . It may be a good idea to contact your webhost and point them to the results of this test. They may be able to enable/install the required components.

    + +
    + +
    +

    This compatibility test has been borrowed (and slightly adapted by fivefilters.org) from the one supplied by SimplePie.org.

    +
    + +
    + +
    + + + \ No newline at end of file -- cgit v1.2.3 From b8fdd2d85f76bb2dbf50bacec86e3be806bb2bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 28 Jan 2014 10:37:37 +0100 Subject: [fix] change twitter account for sharing entry --- themes/courgette/view.twig | 4 ++-- themes/default/view.twig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/courgette/view.twig b/themes/courgette/view.twig index e8d32442..7e81ef91 100755 --- a/themes/courgette/view.twig +++ b/themes/courgette/view.twig @@ -8,8 +8,8 @@
  • {% trans "toggle mark as read" %}
  • {% trans "toggle favorite" %}
  • {% trans "delete" %}
  • - {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} - {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} + {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} + {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} {% if constant('SHARE_SHAARLI') == 1 %}
  • {% trans "shaarli" %}
  • {% endif %} {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}
  • {% trans "flattr" %}
  • {% elseif flattr.status == constant('FLATTRED') %}
  • {% trans "flattr" %}{{ flattr.numflattrs }}
  • {% endif %}{% endif %}
  • {% trans "this article appears wrong?" %}
  • diff --git a/themes/default/view.twig b/themes/default/view.twig index e4a2fe74..e7d33ff6 100644 --- a/themes/default/view.twig +++ b/themes/default/view.twig @@ -9,8 +9,8 @@
  • {% trans "Toggle mark as read" %}
  • {% trans "Toggle favorite" %}
  • {% trans "Delete" %}
  • - {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} - {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} + {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} + {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} {% if constant('SHARE_SHAARLI') == 1 %}
  • {% trans "shaarli" %}
  • {% endif %} {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}
  • {% trans "flattr" %}
  • {% elseif flattr.status == constant('FLATTRED') %}
  • {% trans "flattr" %}{{ flattr.numflattrs }}
  • {% endif %}{% endif %}
  • {% trans "Does this article appear wrong?" %}
  • -- cgit v1.2.3 From 3e0e7e1208e8d3ee3b23df42ea119d7c50b0db5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 28 Jan 2014 10:49:57 +0100 Subject: [fix] inthepoche.com => wallabag.org --- inc/poche/Poche.class.php | 4 ++-- themes/courgette/_bookmarklet.twig | 2 +- themes/courgette/_footer.twig | 2 +- themes/courgette/config.twig | 10 +++++----- themes/courgette/error.twig | 2 +- themes/courgette/install.twig | 2 +- themes/courgette/view.twig | 2 +- themes/default/_bookmarklet.twig | 2 +- themes/default/_footer.twig | 2 +- themes/default/config.twig | 12 ++++++------ themes/default/error.twig | 2 +- themes/default/install.twig | 2 +- themes/default/view.twig | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 4a5a954b..d4733218 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -111,7 +111,7 @@ class Poche $passTheme = TRUE; # Twig is an absolute requirement for Poche to function. Abort immediately if the Composer installer hasn't been run yet if (! self::$canRenderTemplates) { - $this->notInstalledMessage[] = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at the documentation.'; + $this->notInstalledMessage[] = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at the documentation.'; $passTheme = FALSE; } @@ -956,7 +956,7 @@ class Poche if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) { $version = file_get_contents($cache_file); } else { - $version = file_get_contents('http://static.inthepoche.com/versions/' . $which); + $version = file_get_contents('http://static.wallabag.org/versions/' . $which); file_put_contents($cache_file, $version, LOCK_EX); } return $version; diff --git a/themes/courgette/_bookmarklet.twig b/themes/courgette/_bookmarklet.twig index 2f3b2d16..2e3071ad 100755 --- a/themes/courgette/_bookmarklet.twig +++ b/themes/courgette/_bookmarklet.twig @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/themes/courgette/_footer.twig b/themes/courgette/_footer.twig index 2b895854..cce31f35 100755 --- a/themes/courgette/_footer.twig +++ b/themes/courgette/_footer.twig @@ -1,4 +1,4 @@
    -

    {% trans "powered by" %} poche

    +

    {% trans "powered by" %} wallabag

    {% if constant('DEBUG_POCHE') == 1 %}

    {% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE_VERSION')}}. {% trans "storage:" %} {{constant('STORAGE')}}

    {% endif %}
    \ No newline at end of file diff --git a/themes/courgette/config.twig b/themes/courgette/config.twig index d822a457..fdeb464b 100755 --- a/themes/courgette/config.twig +++ b/themes/courgette/config.twig @@ -7,7 +7,7 @@ {% block content %}

    {% trans "Poching a link" %}

    -

    {% trans "You can poche a link by several methods:" %} (?)

    +

    {% trans "You can poche a link by several methods:" %} (?)

    {% trans "Updating poche" %}

    {% trans "Change your theme" %}

    @@ -69,7 +69,7 @@

    {% trans "Import" %}

    {% trans "Please execute the import script locally, it can take a very long time." %}

    -

    {% trans "More infos in the official doc:" %} inthepoche.com

    +

    {% trans "More infos in the official doc:" %} wallabag.org

    diff --git a/themes/default/_bookmarklet.twig b/themes/default/_bookmarklet.twig index 2f3b2d16..2e3071ad 100644 --- a/themes/default/_bookmarklet.twig +++ b/themes/default/_bookmarklet.twig @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/themes/default/_footer.twig b/themes/default/_footer.twig index 06148a57..f837ae38 100644 --- a/themes/default/_footer.twig +++ b/themes/default/_footer.twig @@ -1,4 +1,4 @@
    -

    {% trans "powered by" %} poche

    +

    {% trans "powered by" %} wallabag

    {% if constant('DEBUG_POCHE') == 1 %}

    {% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE')}}. {% trans "storage:" %} {{constant('STORAGE')}}

    {% endif %}
    \ No newline at end of file diff --git a/themes/default/config.twig b/themes/default/config.twig index e22ea1da..ada238d6 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -6,10 +6,10 @@ {% endblock %} {% block content %}

    {% trans "Poching links" %}

    -

    {% trans "There are several ways to poche a link:" %} (?)

    +

    {% trans "There are several ways to poche a link:" %} (?)

    {% trans "Updating poche" %}

    {% trans "Feeds" %}

    @@ -104,7 +104,7 @@

    {% trans "Import" %}

    {% trans "Please execute the import script locally as it can take a very long time." %}

    -

    {% trans "More info in the official docs:" %} inthepoche.com

    +

    {% trans "More info in the official docs:" %} wallabag.org

    -- cgit v1.2.3 From 21f50d5a08381d0d2f27d36b0d97a4f518eeefcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 28 Jan 2014 11:08:21 +0100 Subject: changed some poche with wallabag --- themes/courgette/install.twig | 4 ++-- themes/courgette/layout.twig | 2 +- themes/courgette/login.twig | 4 ++-- themes/default/install.twig | 4 ++-- themes/default/layout.twig | 2 +- themes/default/login.twig | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/themes/courgette/install.twig b/themes/courgette/install.twig index 9b4a769c..20d15f18 100755 --- a/themes/courgette/install.twig +++ b/themes/courgette/install.twig @@ -3,9 +3,9 @@ {% block content %}
    -

    {% trans "install your poche" %}

    +

    {% trans "install your wallabag" %}

    - {% trans "poche is still not installed. Please fill the below form to install it. Don't hesitate to read the documentation on poche website." %} + {% trans "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to read the documentation on wallabag website." %}

    diff --git a/themes/courgette/layout.twig b/themes/courgette/layout.twig index 9a420ac4..57c2cc98 100755 --- a/themes/courgette/layout.twig +++ b/themes/courgette/layout.twig @@ -10,7 +10,7 @@ - {% block title %}{% endblock %} - poche + {% block title %}{% endblock %} - wallabag {% include '_head.twig' %} {% include '_bookmarklet.twig' %} diff --git a/themes/courgette/login.twig b/themes/courgette/login.twig index 3e17982f..1fec0fc9 100755 --- a/themes/courgette/login.twig +++ b/themes/courgette/login.twig @@ -1,10 +1,10 @@ {% extends "layout.twig" %} -{% block title %}{% trans "login to your poche" %}{% endblock %} +{% block title %}{% trans "login to your wallabag" %}{% endblock %} {% block content %}

    -

    {% trans "login to your poche" %}

    +

    {% trans "login to your wallabag" %}

    {% if constant('MODE_DEMO') == 1 %}

    {% trans "you are in demo mode, some features may be disabled." %}

    {% endif %}
    diff --git a/themes/default/install.twig b/themes/default/install.twig index 0dec2c48..c89c7e47 100644 --- a/themes/default/install.twig +++ b/themes/default/install.twig @@ -3,9 +3,9 @@ {% block content %}
    -

    {% trans "install your poche" %}

    +

    {% trans "install your wallabag" %}

    - {% trans "Poche is still not installed. Please fill the below form to install it. Don't hesitate to read the documentation on poche website." %} + {% trans "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to read the documentation on wallabag website." %}

    diff --git a/themes/default/layout.twig b/themes/default/layout.twig index fec7054a..dfebc3ea 100644 --- a/themes/default/layout.twig +++ b/themes/default/layout.twig @@ -10,7 +10,7 @@ - {% block title %}{% endblock %} - poche + {% block title %}{% endblock %} - wallabag {% include '_head.twig' %} {% include '_bookmarklet.twig' %} diff --git a/themes/default/login.twig b/themes/default/login.twig index e2a9a9f5..bf685240 100644 --- a/themes/default/login.twig +++ b/themes/default/login.twig @@ -1,11 +1,11 @@ {% extends "layout.twig" %} -{% block title %}{% trans "login to your poche" %}{% endblock %} +{% block title %}{% trans "login to your wallabag" %}{% endblock %} {% block content %} {% if http_auth == 0 %}

    -

    {% trans "Login to poche" %}

    +

    {% trans "Login to wallabag" %}

    {% if constant('MODE_DEMO') == 1 %}

    {% trans "you are in demo mode, some features may be disabled." %}

    {% endif %}
    -- cgit v1.2.3 From f4fbfaa7cbaaf07aae7d8f0533d293fa4dc605cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 28 Jan 2014 11:19:06 +0100 Subject: some fix to courgette theme --- inc/poche/Poche.class.php | 114 ++++++++++++++++++++++++---------------- themes/courgette/_top.twig | 2 +- themes/courgette/config.twig | 4 +- themes/courgette/img/logo.svg | 8 +++ themes/courgette/theme.ini | 3 ++ themes/dark/theme.ini | 2 + themes/default/config.twig | 4 +- themes/default/theme.ini | 1 + themes/dmagenta/theme.ini | 2 + themes/solarized-dark/theme.ini | 2 + themes/solarized/theme.ini | 2 + 11 files changed, 94 insertions(+), 50 deletions(-) create mode 100644 themes/courgette/img/logo.svg create mode 100644 themes/courgette/theme.ini create mode 100644 themes/dark/theme.ini create mode 100644 themes/default/theme.ini create mode 100644 themes/dmagenta/theme.ini create mode 100644 themes/solarized-dark/theme.ini create mode 100644 themes/solarized/theme.ini diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 0be1668d..e9b14121 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -22,16 +22,6 @@ class Poche private $currentTheme = ''; private $currentLanguage = ''; private $notInstalledMessage = array(); - - # @todo make this dynamic (actually install themes and save them in the database including author information et cetera) - private $installedThemes = array( - 'default' => array('requires' => array()), - 'dark' => array('requires' => array('default')), - 'dmagenta' => array('requires' => array('default')), - 'solarized' => array('requires' => array('default')), - 'solarized-dark' => array('requires' => array('default')), - 'courgette' => array('requires' => array()) - ); public function __construct() { @@ -124,21 +114,26 @@ class Poche } # Check if the selected theme and its requirements are present - if ($this->getTheme() != '' && ! is_dir(THEME . '/' . $this->getTheme())) { - $this->notInstalledMessage[] = 'The currently selected theme (' . $this->getTheme() . ') does not seem to be properly installed (Missing directory: ' . THEME . '/' . $this->getTheme() . ')'; + $theme = $this->getTheme(); + + if ($theme != '' && ! is_dir(THEME . '/' . $theme)) { + $this->notInstalledMessage[] = 'The currently selected theme (' . $theme . ') does not seem to be properly installed (Missing directory: ' . THEME . '/' . $theme . ')'; self::$canRenderTemplates = false; $passTheme = FALSE; } - foreach ($this->installedThemes[$this->getTheme()]['requires'] as $requiredTheme) { - if (! is_dir(THEME . '/' . $requiredTheme)) { - $this->notInstalledMessage[] = 'The required "' . $requiredTheme . '" theme is missing for the current theme (' . $this->getTheme() . ')'; + $themeInfo = $this->getThemeInfo($theme); + if (isset($themeInfo['requirements']) && is_array($themeInfo['requirements'])) { + foreach ($themeInfo['requirements'] as $requiredTheme) { + if (! is_dir(THEME . '/' . $requiredTheme)) { + $this->notInstalledMessage[] = 'The required "' . $requiredTheme . '" theme is missing for the current theme (' . $theme . ')'; - self::$canRenderTemplates = false; + self::$canRenderTemplates = false; - $passTheme = FALSE; + $passTheme = FALSE; + } } } @@ -194,32 +189,36 @@ class Poche private function initTpl() { $loaderChain = new Twig_Loader_Chain(); + $theme = $this->getTheme(); # add the current theme as first to the loader chain so Twig will look there first for overridden template files try { - $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . $this->getTheme())); + $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . $theme)); } catch (Twig_Error_Loader $e) { # @todo isInstalled() should catch this, inject Twig later - die('The currently selected theme (' . $this->getTheme() . ') does not seem to be properly installed (' . THEME . '/' . $this->getTheme() .' is missing)'); + die('The currently selected theme (' . $theme . ') does not seem to be properly installed (' . THEME . '/' . $theme .' is missing)'); } # add all required themes to the loader chain - foreach ($this->installedThemes[$this->getTheme()]['requires'] as $requiredTheme) { - try { - $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . DEFAULT_THEME)); - } catch (Twig_Error_Loader $e) { - # @todo isInstalled() should catch this, inject Twig later - die('The required "' . $requiredTheme . '" theme is missing for the current theme (' . $this->getTheme() . ')'); + $themeInfo = $this->getThemeInfo($theme); + if (isset($themeInfo['requirements']) && is_array($themeInfo['requirements'])) { + foreach ($themeInfo['requirements'] as $requiredTheme) { + try { + $loaderChain->addLoader(new Twig_Loader_Filesystem(THEME . '/' . $requiredTheme)); + } catch (Twig_Error_Loader $e) { + # @todo isInstalled() should catch this, inject Twig later + die('The required "' . $requiredTheme . '" theme is missing for the current theme (' . $theme . ')'); + } } } if (DEBUG_POCHE) { - $twig_params = array(); + $twigParams = array(); } else { - $twig_params = array('cache' => CACHE); + $twigParams = array('cache' => CACHE); } - $this->tpl = new Twig_Environment($loaderChain, $twig_params); + $this->tpl = new Twig_Environment($loaderChain, $twigParams); $this->tpl->addExtension(new Twig_Extensions_Extension_I18n()); # filter to display domain name of an url @@ -235,7 +234,7 @@ class Poche $this->tpl->addFilter($filter); } - private function install() + private function install() { Tools::logm('poche still not installed'); echo $this->tpl->render('install.twig', array( @@ -266,34 +265,59 @@ class Poche return $this->currentTheme; } - public function getLanguage() { - return $this->currentLanguage; + /** + * Provides theme information by parsing theme.ini file if present in the theme's root directory. + * In all cases, the following data will be returned: + * - name: theme's name, or key if the theme is unnamed, + * - current: boolean informing if the theme is the current user theme. + * + * @param string $theme Theme key (directory name) + * @return array|boolean Theme information, or false if the theme doesn't exist. + */ + public function getThemeInfo($theme) { + if (!is_dir(THEME . '/' . $theme)) { + return false; + } + + $themeIniFile = THEME . '/' . $theme . '/theme.ini'; + $themeInfo = array(); + + if (is_file($themeIniFile) && is_readable($themeIniFile)) { + $themeInfo = parse_ini_file($themeIniFile); + } + + if ($themeInfo === false) { + $themeInfo = array(); + } + if (!isset($themeInfo['name'])) { + $themeInfo['name'] = $theme; + } + $themeInfo['current'] = ($theme === $this->getTheme()); + + return $themeInfo; } public function getInstalledThemes() { $handle = opendir(THEME); $themes = array(); - + while (($theme = readdir($handle)) !== false) { # Themes are stored in a directory, so all directory names are themes # @todo move theme installation data to database - if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.'))) { + if (!is_dir(THEME . '/' . $theme) || in_array($theme, array('.', '..'))) { continue; } - - $current = false; - - if ($theme === $this->getTheme()) { - $current = true; - } - - $themes[] = array('name' => $theme, 'current' => $current); + + $themes[$theme] = $this->getThemeInfo($theme); } - - sort($themes); + return $themes; } + public function getLanguage() { + return $this->currentLanguage; + } + public function getInstalledLanguages() { $handle = opendir(LOCALE); $languages = array(); @@ -600,8 +624,8 @@ class Poche $themes = $this->getInstalledThemes(); $actualTheme = false; - foreach ($themes as $theme) { - if ($theme['name'] == $_POST['theme']) { + foreach (array_keys($themes) as $theme) { + if ($theme == $_POST['theme']) { $actualTheme = true; break; } diff --git a/themes/courgette/_top.twig b/themes/courgette/_top.twig index a2a4b28d..792687c0 100755 --- a/themes/courgette/_top.twig +++ b/themes/courgette/_top.twig @@ -1,6 +1,6 @@

    - {% if view == 'home' %}{% block logo %}logo poche{% endblock %} + {% if view == 'home' %}{% block logo %}logo poche{% endblock %} {% elseif view == 'fav' %}{{ block('logo') }} Favoris {% elseif view == 'archive' %}{{ block('logo') }} Archive {% else %}{{ block('logo') }} diff --git a/themes/courgette/config.twig b/themes/courgette/config.twig index fdeb464b..3ab1d92f 100755 --- a/themes/courgette/config.twig +++ b/themes/courgette/config.twig @@ -35,8 +35,8 @@
    diff --git a/themes/courgette/img/logo.svg b/themes/courgette/img/logo.svg new file mode 100644 index 00000000..865da440 --- /dev/null +++ b/themes/courgette/img/logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/themes/courgette/theme.ini b/themes/courgette/theme.ini new file mode 100644 index 00000000..996d171f --- /dev/null +++ b/themes/courgette/theme.ini @@ -0,0 +1,3 @@ +name = Courgette +description = Responsive black and white theme especially adapted to smartphones. +requirements[] = default diff --git a/themes/dark/theme.ini b/themes/dark/theme.ini new file mode 100644 index 00000000..4b020d36 --- /dev/null +++ b/themes/dark/theme.ini @@ -0,0 +1,2 @@ +name = Dark +requirements[] = default diff --git a/themes/default/config.twig b/themes/default/config.twig index ada238d6..df62520a 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -49,8 +49,8 @@
    diff --git a/themes/default/theme.ini b/themes/default/theme.ini new file mode 100644 index 00000000..9f3cfb6a --- /dev/null +++ b/themes/default/theme.ini @@ -0,0 +1 @@ +name = Default \ No newline at end of file diff --git a/themes/dmagenta/theme.ini b/themes/dmagenta/theme.ini new file mode 100644 index 00000000..24ff3c4a --- /dev/null +++ b/themes/dmagenta/theme.ini @@ -0,0 +1,2 @@ +name = Dark Magenta +requirements[] = default diff --git a/themes/solarized-dark/theme.ini b/themes/solarized-dark/theme.ini new file mode 100644 index 00000000..7b6b341e --- /dev/null +++ b/themes/solarized-dark/theme.ini @@ -0,0 +1,2 @@ +name = Dark Solarized +requirements[] = default diff --git a/themes/solarized/theme.ini b/themes/solarized/theme.ini new file mode 100644 index 00000000..703997b9 --- /dev/null +++ b/themes/solarized/theme.ini @@ -0,0 +1,2 @@ +name = Solarized +requirements[] = default -- cgit v1.2.3 From 6af66b1106e67a8dc467a70e8e57d7963b09936b Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Thu, 30 Jan 2014 16:35:31 +0200 Subject: fix of bug #368 Endless redirects or user doesn't exist with basic authentication --- inc/poche/Database.class.php | 11 ++++++++--- inc/poche/Poche.class.php | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 3b0f455e..0457af69 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -165,9 +165,14 @@ class Database { } } - public function login($username, $password) { - $sql = "SELECT * FROM users WHERE username=? AND password=?"; - $query = $this->executeQuery($sql, array($username, $password)); + public function login($username, $password, $isauthenticated=false) { + if ($isauthenticated) { + $sql = "SELECT * FROM users WHERE username=?"; + $query = $this->executeQuery($sql, array($username)); + } else { + $sql = "SELECT * FROM users WHERE username=? AND password=?"; + $query = $this->executeQuery($sql, array($username, $password)); + } $login = $query->fetchAll(); $user = array(); diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index e9b14121..77361ef7 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -692,17 +692,17 @@ class Poche */ private function credentials() { if(isset($_SERVER['PHP_AUTH_USER'])) { - return array($_SERVER['PHP_AUTH_USER'],'php_auth'); + return array($_SERVER['PHP_AUTH_USER'],'php_auth',true); } if(!empty($_POST['login']) && !empty($_POST['password'])) { - return array($_POST['login'],$_POST['password']); + return array($_POST['login'],$_POST['password'],false); } if(isset($_SERVER['REMOTE_USER'])) { - return array($_SERVER['REMOTE_USER'],'http_auth'); + return array($_SERVER['REMOTE_USER'],'http_auth',true); } - return array(false,false); - } + return array(false,false,false); + } /** * checks if login & password are correct and save the user in session. @@ -713,18 +713,19 @@ class Poche */ public function login($referer) { - list($login,$password)=$this->credentials(); + list($login,$password,$isauthenticated)=$this->credentials(); if($login === false || $password === false) { $this->messages->add('e', _('login failed: you have to fill all fields')); Tools::logm('login failed'); Tools::redirect(); } if (!empty($login) && !empty($password)) { - $user = $this->store->login($login, Tools::encodeString($password . $login)); + $user = $this->store->login($login, Tools::encodeString($password . $login), $isauthenticated); if ($user != array()) { # Save login into Session - $longlastingsession = isset($_POST['longlastingsession']); - Session::login($user['username'], $user['password'], $login, Tools::encodeString($password . $login), $longlastingsession, array('poche_user' => new User($user))); + $longlastingsession = isset($_POST['longlastingsession']); + $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); + Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); $this->messages->add('s', _('welcome to your poche')); Tools::logm('login successful'); Tools::redirect($referer); -- cgit v1.2.3 From ebae8c83154efc98518feee099d44f3feb69dd2d Mon Sep 17 00:00:00 2001 From: Lonnytunes Date: Sun, 2 Feb 2014 19:10:35 +0100 Subject: [del] courgette theme: Useless templates because they are identical to those of default theme and so inherited from it. --- themes/courgette/_bookmarklet.twig | 3 --- themes/courgette/_footer.twig | 4 ---- themes/courgette/_messages.twig | 1 - themes/courgette/export.twig | 1 - themes/courgette/install.twig | 28 ---------------------------- 5 files changed, 37 deletions(-) delete mode 100755 themes/courgette/_bookmarklet.twig delete mode 100755 themes/courgette/_footer.twig delete mode 100755 themes/courgette/_messages.twig delete mode 100755 themes/courgette/export.twig delete mode 100755 themes/courgette/install.twig diff --git a/themes/courgette/_bookmarklet.twig b/themes/courgette/_bookmarklet.twig deleted file mode 100755 index 2e3071ad..00000000 --- a/themes/courgette/_bookmarklet.twig +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/themes/courgette/_footer.twig b/themes/courgette/_footer.twig deleted file mode 100755 index cce31f35..00000000 --- a/themes/courgette/_footer.twig +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    {% trans "powered by" %} wallabag

    - {% if constant('DEBUG_POCHE') == 1 %}

    {% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE_VERSION')}}. {% trans "storage:" %} {{constant('STORAGE')}}

    {% endif %} -
    \ No newline at end of file diff --git a/themes/courgette/_messages.twig b/themes/courgette/_messages.twig deleted file mode 100755 index 679aa098..00000000 --- a/themes/courgette/_messages.twig +++ /dev/null @@ -1 +0,0 @@ - {{ messages | raw }} \ No newline at end of file diff --git a/themes/courgette/export.twig b/themes/courgette/export.twig deleted file mode 100755 index 4adb9540..00000000 --- a/themes/courgette/export.twig +++ /dev/null @@ -1 +0,0 @@ -{{ export }} \ No newline at end of file diff --git a/themes/courgette/install.twig b/themes/courgette/install.twig deleted file mode 100755 index 20d15f18..00000000 --- a/themes/courgette/install.twig +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "layout.twig" %} -{% block title %}{% trans "installation" %}{% endblock %} -{% block content %} - -
    -

    {% trans "install your wallabag" %}

    -

    - {% trans "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to read the documentation on wallabag website." %} -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - -

    -
    - - -{% endblock %} \ No newline at end of file -- cgit v1.2.3 From cae70cdbdb518b6effe212528c894a390256cf2d Mon Sep 17 00:00:00 2001 From: Lonnytunes Date: Sun, 2 Feb 2014 19:13:05 +0100 Subject: [fix] courgette theme: Old constant call, replaced by the new one. --- themes/courgette/config.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/courgette/config.twig b/themes/courgette/config.twig index 3ab1d92f..26da7289 100755 --- a/themes/courgette/config.twig +++ b/themes/courgette/config.twig @@ -24,7 +24,7 @@

    {% trans "Updating poche" %}

    -- cgit v1.2.3 From a678f9df3893c200f7555791f6c82730c3b3dd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 3 Feb 2014 12:34:28 +0100 Subject: [fix] #421 Tables content in solarized themes unreadable --- themes/solarized-dark/css/style-solarized-dark.css | 3 ++- themes/solarized/css/style-solarized.css | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/solarized-dark/css/style-solarized-dark.css b/themes/solarized-dark/css/style-solarized-dark.css index 7ce8a563..3b0feb2a 100644 --- a/themes/solarized-dark/css/style-solarized-dark.css +++ b/themes/solarized-dark/css/style-solarized-dark.css @@ -42,7 +42,8 @@ body, body, a, a:hover, -a:visited { +a:visited, +td { color: #839496; } diff --git a/themes/solarized/css/style-solarized.css b/themes/solarized/css/style-solarized.css index 9286c750..6058d056 100644 --- a/themes/solarized/css/style-solarized.css +++ b/themes/solarized/css/style-solarized.css @@ -42,7 +42,8 @@ body, body, a, a:hover, -a:visited { +a:visited, +td { color: #657b83; } -- cgit v1.2.3 From 1e1fd6f24da7b7bf08f7b26956a9467477265fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 3 Feb 2014 12:43:34 +0100 Subject: [add] link to test file when we install wallabag #392 --- themes/default/error.twig | 3 +++ wallabag_compatibility_test.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/themes/default/error.twig b/themes/default/error.twig index 8a6a4d6c..528a0985 100644 --- a/themes/default/error.twig +++ b/themes/default/error.twig @@ -8,4 +8,7 @@ {% endfor %}

    Don't forget the documentation.

    +

    + {% trans "You can check your configuration here." %} +

    {% endblock %} diff --git a/wallabag_compatibility_test.php b/wallabag_compatibility_test.php index 49c4e3b8..fd285042 100644 --- a/wallabag_compatibility_test.php +++ b/wallabag_compatibility_test.php @@ -1,5 +1,5 @@ =')); $pcre_ok = extension_loaded('pcre'); -- cgit v1.2.3 From 445a1a1c8de78bf7bba3404aa675e6a57ceefbfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 3 Feb 2014 12:46:09 +0100 Subject: [fix] Add support for X-Forwarded-Proto header field #413 --- inc/poche/Tools.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 248a44d7..515a08aa 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -43,7 +43,9 @@ class Tools || (isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection - && $_SERVER["SERVER_PORT"] == SSL_PORT); + && $_SERVER["SERVER_PORT"] == SSL_PORT) + || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) + && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'); $serverport = (!isset($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == '80' -- cgit v1.2.3 From fa0bfb775a53a074e0a9d642298685b5ed1af83f Mon Sep 17 00:00:00 2001 From: nicosomb Date: Mon, 3 Feb 2014 17:11:00 +0100 Subject: [fix] #389 Empty article title (blank title tag) --- inc/poche/Poche.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 77361ef7..4df90067 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -375,7 +375,7 @@ class Poche { case 'add': $content = $this->getPageContent($url); - $title = $content['rss']['channel']['item']['title']; + $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled'); $body = $content['rss']['channel']['item']['description']; if ($this->store->add($url->getUrl(), $title, $body, $this->user->getId())) { -- cgit v1.2.3