aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--CREDITS.md2
-rw-r--r--GUIDELINES.md53
-rw-r--r--check_essentials.php14
-rwxr-xr-x[-rw-r--r--]check_setup.php20
-rwxr-xr-x[-rw-r--r--]inc/3rdparty/libraries/readability/Readability.php17
-rw-r--r--inc/3rdparty/site_config/custom/blogs.faz.net.txt45
-rw-r--r--inc/3rdparty/site_config/standard/.about.com.txt14
-rwxr-xr-xinc/3rdparty/site_config/standard/dn.pt.txt9
-rw-r--r--[-rwxr-xr-x]inc/3rdparty/site_config/standard/faz.net.txt117
-rwxr-xr-xinc/3rdparty/site_config/standard/habrahabr.ru.txt21
-rwxr-xr-xinc/poche/Database.class.php4
-rwxr-xr-xinc/poche/Poche.class.php85
-rwxr-xr-x[-rw-r--r--]inc/poche/Routing.class.php79
-rwxr-xr-xinc/poche/Tools.class.php19
-rwxr-xr-xinc/poche/config.inc.default.php2
-rw-r--r--inc/poche/pochePictures.php2
-rwxr-xr-xindex.php1
-rw-r--r--[-rwxr-xr-x]locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mobin11935 -> 12632 bytes
-rwxr-xr-xlocale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po613
-rwxr-xr-xthemes/baggy/_pocheit-form.twig2
-rwxr-xr-xthemes/baggy/config.twig4
-rwxr-xr-xthemes/baggy/css/main.css10
-rwxr-xr-xthemes/baggy/view.twig1
-rwxr-xr-xthemes/default/_highlight.twig4
-rwxr-xr-xthemes/default/config.twig3
-rwxr-xr-xthemes/default/css/style.css6
-rw-r--r--themes/default/highlightjs/highlight.pack.js1
-rw-r--r--themes/default/highlightjs/styles/default.css152
-rw-r--r--themes/default/highlightjs/styles/github.css127
-rw-r--r--themes/default/highlightjs/styles/googlecode.css148
-rwxr-xr-xthemes/default/view.twig1
-rw-r--r--wallabag_compatibility_test.php14
33 files changed, 1142 insertions, 450 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9ccb0b14..58bc7134 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -26,3 +26,5 @@ Note : If you have large portions of text, use [Github's Gist service](https://g
26 26
27## You want to fix a bug or to add a feature 27## You want to fix a bug or to add a feature
28Please fork wallabag and work with **the dev branch** only. **Do not work on master branch**. 28Please fork wallabag and work with **the dev branch** only. **Do not work on master branch**.
29
30[Don't forget to read our guidelines](https://github.com/wallabag/wallabag/blob/dev/GUIDELINES.md). \ No newline at end of file
diff --git a/CREDITS.md b/CREDITS.md
index 7ec3cbb7..f1e9d7af 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -11,4 +11,6 @@ wallabag is based on :
11 11
12wallabag is mainly developed by Nicolas LÅ“uillet under the MIT License 12wallabag is mainly developed by Nicolas LÅ“uillet under the MIT License
13 13
14Thank you so much to @tcitworld and @mariroz.
15
14Contributors : https://github.com/wallabag/wallabag/graphs/contributors \ No newline at end of file 16Contributors : https://github.com/wallabag/wallabag/graphs/contributors \ No newline at end of file
diff --git a/GUIDELINES.md b/GUIDELINES.md
new file mode 100644
index 00000000..51e0de93
--- /dev/null
+++ b/GUIDELINES.md
@@ -0,0 +1,53 @@
1# Guidelines for wallabag
2
3If you want to contribute to wallabag, you have some rules to respect. These rules were defined by [PHP Framework Interop Group](http://www.php-fig.org).
4
5## Basic Coding Standard (PSR-1)
6
7This section of the standard comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code.
8
9* Files MUST use only `<?php` and `<?=` tags.
10
11* Files MUST use only UTF-8 without BOM for PHP code.
12
13* Files SHOULD either declare symbols (classes, functions, constants, etc.) or cause side-effects (e.g. generate output, change .ini settings, etc.) but SHOULD NOT do both.
14
15* Namespaces and classes MUST follow [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md).
16
17* Class names MUST be declared in `StudlyCaps`.
18
19* Class constants MUST be declared in all upper case with underscore separators.
20
21* Method names MUST be declared in `camelCase`.
22
23You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-1/).
24
25## Coding Style Guide (PSR-2)
26
27This guide extends and expands on PSR-1, the basic coding standard.
28
29The intent of this guide is to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.
30
31The style rules herein are derived from commonalities among the various member projects. When various authors collaborate across multiple projects, it helps to have one set of guidelines to be used among all those projects. Thus, the benefit of this guide is not in the rules themselves, but in the sharing of those rules.
32
33* Code MUST follow PSR-1.
34
35* Code MUST use 4 spaces for indenting, not tabs.
36
37* There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.
38
39* There MUST be one blank line after the `namespace` declaration, and there MUST be one blank line after the block of `use` declarations.
40
41* Opening braces for classes MUST go on the next line, and closing braces MUST go on the next line after the body.
42
43* Opening braces for methods MUST go on the next line, and closing braces MUST go on the next line after the body.
44
45* Visibility MUST be declared on all properties and methods; `abstract` and `final` MUST be declared before the visibility; `static` MUST be declared after the visibility.
46
47* Control structure keywords MUST have one space after them; method and function calls MUST NOT.
48
49* Opening braces for control structures MUST go on the same line, and closing braces MUST go on the next line after the body.
50
51* Opening parentheses for control structures MUST NOT have a space after them, and closing parentheses for control structures MUST NOT have a space before.
52
53You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-2/). \ No newline at end of file
diff --git a/check_essentials.php b/check_essentials.php
new file mode 100644
index 00000000..a47cd5a8
--- /dev/null
+++ b/check_essentials.php
@@ -0,0 +1,14 @@
1<?php
2
3// PHP 5.3 minimum
4if (version_compare(PHP_VERSION, '5.3.3', '<')) {
5 die('This software require PHP 5.3.3 minimum');
6}
7
8// Short tags must be enabled for PHP < 5.4
9if (version_compare(PHP_VERSION, '5.4.0', '<')) {
10
11 if (! ini_get('short_open_tag')) {
12 die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"');
13 }
14} \ No newline at end of file
diff --git a/check_setup.php b/check_setup.php
index c86b17fa..cf02c34b 100644..100755
--- a/check_setup.php
+++ b/check_setup.php
@@ -1,22 +1,8 @@
1<?php 1<?php
2// PHP 5.3 minimum
3if (version_compare(PHP_VERSION, '5.3.3', '<')) {
4 die('This software require PHP 5.3.3 minimum');
5}
6
7// Short tags must be enabled for PHP < 5.4
8if (version_compare(PHP_VERSION, '5.4.0', '<')) {
9
10 if (! ini_get('short_open_tag')) {
11 die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"');
12 }
13}
14 2
15$writableFolders = array('cache', 'db', 'inc/3rdparty/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer'); 3// Check if /cache is writeable
16foreach ($writableFolders as $folder) { 4if (! is_writable('cache')) {
17 if (! is_writable($folder)) { 5 die('The directory "cache" must be writeable by your web server user');
18 die('The directory "' . $folder . '" must be writeable by your web server user');
19 }
20} 6}
21 7
22// install folder still present, need to install wallabag 8// install folder still present, need to install wallabag
diff --git a/inc/3rdparty/libraries/readability/Readability.php b/inc/3rdparty/libraries/readability/Readability.php
index d0f09d74..4fa3ba63 100644..100755
--- a/inc/3rdparty/libraries/readability/Readability.php
+++ b/inc/3rdparty/libraries/readability/Readability.php
@@ -679,6 +679,7 @@ class Readability
679 } else { 679 } else {
680 $topCandidate->innerHTML = $page->documentElement->innerHTML; 680 $topCandidate->innerHTML = $page->documentElement->innerHTML;
681 $page->documentElement->innerHTML = ''; 681 $page->documentElement->innerHTML = '';
682 $this->reinitBody();
682 $page->documentElement->appendChild($topCandidate); 683 $page->documentElement->appendChild($topCandidate);
683 } 684 }
684 } else { 685 } else {
@@ -794,8 +795,7 @@ class Readability
794 { 795 {
795 // TODO: find out why element disappears sometimes, e.g. for this URL http://www.businessinsider.com/6-hedge-fund-etfs-for-average-investors-2011-7 796 // TODO: find out why element disappears sometimes, e.g. for this URL http://www.businessinsider.com/6-hedge-fund-etfs-for-average-investors-2011-7
796 // in the meantime, we check and create an empty element if it's not there. 797 // in the meantime, we check and create an empty element if it's not there.
797 if (!isset($this->body->childNodes)) $this->body = $this->dom->createElement('body'); 798 $this->reinitBody();
798 $this->body->innerHTML = $this->bodyCache;
799 799
800 if ($this->flagIsActive(self::FLAG_STRIP_UNLIKELYS)) { 800 if ($this->flagIsActive(self::FLAG_STRIP_UNLIKELYS)) {
801 $this->removeFlag(self::FLAG_STRIP_UNLIKELYS); 801 $this->removeFlag(self::FLAG_STRIP_UNLIKELYS);
@@ -1134,5 +1134,18 @@ class Readability
1134 public function removeFlag($flag) { 1134 public function removeFlag($flag) {
1135 $this->flags = $this->flags & ~$flag; 1135 $this->flags = $this->flags & ~$flag;
1136 } 1136 }
1137
1138 /**
1139 * Will recreate previously deleted body property
1140 *
1141 * @return void
1142 */
1143 protected function reinitBody() {
1144 if (!isset($this->body->childNodes)) {
1145 $this->body = $this->dom->createElement('body');
1146 $this->body->innerHTML = $this->bodyCache;
1147 }
1148 }
1149
1137} 1150}
1138?> \ No newline at end of file 1151?> \ No newline at end of file
diff --git a/inc/3rdparty/site_config/custom/blogs.faz.net.txt b/inc/3rdparty/site_config/custom/blogs.faz.net.txt
new file mode 100644
index 00000000..4f2626f1
--- /dev/null
+++ b/inc/3rdparty/site_config/custom/blogs.faz.net.txt
@@ -0,0 +1,45 @@
1# Author: zinnober
2
3tidy: no
4prune: no
5
6# Set author
7author: //a[@rel='author']
8
9# Set date
10date: //span[@class='Datum']
11
12# Content is here
13body: //div[@class='Artikel']
14
15# Tidy up before article
16strip: //div[@id='FAZHeaderNeu']
17strip: //h2[@itemprop='headline']
18strip: //span[@class='Datum']
19strip: //span[@class='Autor']
20strip_id_or_class: ArticlePagerTop
21strip: //div[@class='FAZArtikelEinleitung']/h2
22
23# General cleanup
24strip: //div[@class='clear']
25strip: //span[@class='Bildnachweis']
26strip: //iframe
27strip_id_or_class: Community
28strip: ' · '
29
30# Remove tracking and ads
31strip_image_src: /l.gif?
32strip: //img[@width='1']
33strip_id_or_class: invisible
34strip_id_or_class: Anzeige
35strip_id_or_class: billboard
36
37# Remove clutter after article
38strip_id_or_class: Tagline
39strip_id_or_class: ArtikelAbbinder
40strip_id_or_class: FAZArtikelKommentare
41strip_id_or_class: ArtikelKommentieren
42strip_id_or_class: FAZContentRight
43
44# Try it yourself
45test_url: http://blogs.faz.net/wost/2014/08/17/viel-fuck-und-wenig-guter-sex-1239/
diff --git a/inc/3rdparty/site_config/standard/.about.com.txt b/inc/3rdparty/site_config/standard/.about.com.txt
new file mode 100644
index 00000000..e1ebaee3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/.about.com.txt
@@ -0,0 +1,14 @@
1body: //div[@id='articlebody']
2title: //h1
3author: //p[@id='by']//a
4
5next_page_link: //span[@class='next']/a
6# Not the same as below!
7
8prune: yes
9tidy: no
10
11# Annoying 'next' links plainly inside the article body
12strip: //*[text()[contains(.,'Next: ')]]
13
14test_url: http://psychology.about.com/od/theoriesofpersonality/ss/defensemech.htm
diff --git a/inc/3rdparty/site_config/standard/dn.pt.txt b/inc/3rdparty/site_config/standard/dn.pt.txt
new file mode 100755
index 00000000..051b8cb9
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/dn.pt.txt
@@ -0,0 +1,9 @@
1single_page_link: concat('http://www.dn.pt/Common/print.aspx?content_id=', //input[@type='hidden' and @name='link-comments']/@value)
2#<input type="hidden" name="link-comments" class="link-comments" value="3972244">
3
4title: //h1
5author: //div[@class="Author"]
6
7strip: //div[@class="Patrocinio"]
8
9test_url: http://www.dn.pt/inicio/opiniao/interior.aspx?content_id=3972244&seccao=Alberto%20Gon%E7alves&tag=Opini%E3o%20-%20Em%20Foco&page=1 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/faz.net.txt b/inc/3rdparty/site_config/standard/faz.net.txt
index d087d2aa..47048a1b 100755..100644
--- a/inc/3rdparty/site_config/standard/faz.net.txt
+++ b/inc/3rdparty/site_config/standard/faz.net.txt
@@ -1,36 +1,101 @@
1# Author: zinnober
2# Complete rewrite of the faz.net template as the standard one is broken
3# I tried to consider as many page variants as possible, which was some serious work
4
5tidy: no
6prune: no
7
1# Title 8# Title
2title: //p[@class='Content HeadlineShort'] 9title: //p[@class='Content HeadlineShort']
3 10
4# Authors 11# Set author
5# some are known and have a link, others don't 12author: substring-after(//span[@class='Autor'], 'von ')
6author: substring-after(//span[@class='Autor'], 'Von') 13author: //span[@class='caps last']/span[@class='caps last']
14author: //a[@rel='author']
7 15
8# Date 16# Set date
9date: //span[@class='Datum'] 17date: //span[@class='Datum']
18date: //span[@class='Datum'],/span
19
20# Fetch full multipage articles
21next_page_link: //a[@title='Nächste Seite']
10 22
11# Body 23# Content is here
12body: //div[@class='Artikel'] 24body: //div[@class='Artikel']
13 25
14# Removements before body text 26# Tidy up before article
15strip: //div[@class='Breadcrumbs'] 27strip: //div[@id='FAZHeaderNeu']
16strip: //div[@class='QuickSearchBox'] 28strip: //h2[@itemprop='headline']
17strip: //div[@class='FAZArtikelEinleitung'] 29strip: //span[@class='Datum']
18strip: //div[@class='FAZArtikelReiter'] 30strip: //span[@class='Autor']
31strip_id_or_class: ArticlePagerTop
32
33# General cleanup
19strip: //div[@class='clear'] 34strip: //div[@class='clear']
35strip: //a[@title='Zur Homepage FAZ.NET']
36strip: //iframe
37replace_string( · ):
38
39# Remove tracking and ads
40strip_image_src: /l.gif?
41strip: //div[contains(@style, 'background-image')]
42strip: //img[@width='1']
43strip_id_or_class: invisible
44strip_id_or_class: Anzeige
45strip_id_or_class: billboard
46
47# Remove various text boxes and social media foo
48strip_id_or_class: WeitereBeitraege
49strip_id_or_class: WBListe
50strip_id_or_class: AutorenModul
51strip_id_or_class: Community
52strip_id_or_class: SocialMediaStatus
53strip_id_or_class: RelatedLinkBox
54strip_id_or_class: MultimediaNavigation
55strip_id_or_class: IndexTitel
56
57# Fix picture caps and pictures (use better resolution and remove clutter)
58strip_id_or_class: LightBoxOverlay
59strip_id_or_class: exitLarge
60strip_id_or_class: PagerBox
61strip_id_or_class: Bildnachweis
62strip_id_or_class: Bildueberschrift
63strip_id_or_class: Bildbeschreibung
64strip_id_or_class: ArtikelBild610
65strip_id_or_class: MediaLink
66strip_id_or_class: FotoBoxInnerLeft
67strip_id_or_class: BilderRelatedLinks
68
69# Remove clutter after article
70strip_id_or_class: ArticlePagerBottom
71strip_id_or_class: backToHome
72strip_id_or_class: ArtikelAbbinder
73strip_id_or_class: lesermeinungscontainer
74strip_id_or_class: ThemenLinks
75strip_id_or_class: rechtehinweis
76strip_id_or_class: FAZArtikelMap
77strip_id_or_class: FAZArtikelKommentare
78strip_id_or_class: ArtikelKommentieren
79strip_id_or_class: FAZArtikelFunktionen
80strip_id_or_class: mailLB
81strip_id_or_class: FAZContentRight
82strip_id_or_class: stageModule
83strip_id_or_class: ContentFooter
84strip_id_or_class: ServicesFooter
85strip_id_or_class: FAZFooter
86
87# Clean up stuff present just in some articles
88strip_id_or_class: Teaser620
89strip_id_or_class: TeaserMultimedia
90strip_id_or_class: VideoBox
91
92# Remove as soon as Wallabag maight be able to embed flash video
93strip_id_or_class: mmoObjectAsTeaserInArticle
94strip_id_or_class: additionalStylesAudioVideo
95strip_id_or_class: hideMMElements
96
97# Try it yourself
98test_url: http://www.faz.net/aktuell/feuilleton/zum-tod-von-margaret-thatcher-die-reizfigur-12141919.html#Drucken
99test_url: http://www.faz.net/aktuell/politik/inland/allensbach-analyse-im-namen-des-volkes-13106492.html
100test_url: http://www.faz.net/aktuell/feuilleton/kino/video-filmkritiken/video-filmkritik-when-animals-dream-zerrissene-jugend-13105772.html
20 101
21# General removements
22strip: //span[@class='Bildnachweis']
23strip: //img[@class='MediaIcon']
24strip: //div[@class='ArtikelMediaLink']
25dissolve: //a[img]
26
27# Removements after body text
28strip: //div[@class='ArtikelAbbinder']
29strip: //div[@class='ArtikelKommentieren Artikelfuss GETS;tk;boxen.top-lesermeinungen;tp;content']
30strip: //div[@class='FAZArtikelKommentare FAZArtikelContent']
31strip: //div[@class='FAZArtikelFunktionen']
32strip: //div[@id='FAZContentRight']
33
34# Fix picture captions
35wrap_in(small): //span[@class='Bildunterschrift']/text()
36test_url: http://www.faz.net/aktuell/feuilleton/zum-tod-von-margaret-thatcher-die-reizfigur-12141919.html#Drucken \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/habrahabr.ru.txt b/inc/3rdparty/site_config/standard/habrahabr.ru.txt
new file mode 100755
index 00000000..67538359
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/habrahabr.ru.txt
@@ -0,0 +1,21 @@
1title: //span[@class="post_title"]
2author: //div[@class="author"]
3date: //div[@class="published
4
5body: //div[@class='content html_format'] | //div[@id='comments']
6
7strip: //a[@class="link_to_comment"]
8strip: //div[@class="show_tree"]
9strip: //a[@class="to_parent"]
10
11
12replace_string(class="reply_comments"): style="padding-left: 20px"
13replace_string(class="voting "): style="float: right"
14replace_string(src="//habrastorage.org/getpro/habr/avatars/): style="width:24px; height:24px;" class="123" src="//habrastorage.org/getpro/habr/avatars/
15replace_string(class="info "): style="padding-top:5px;font-size:0.85em;line-height:24px;"
16
17
18prune: no
19tidy: no
20
21test_url: http://habrahabr.ru/post/229883/ \ No newline at end of file
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 2c80b64b..dfd7ae34 100755
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -23,6 +23,10 @@ class Database {
23 { 23 {
24 switch (STORAGE) { 24 switch (STORAGE) {
25 case 'sqlite': 25 case 'sqlite':
26 // Check if /db is writeable
27 if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {
28 die('An error occured: "db" directory must be writeable for your web server user!');
29 }
26 $db_path = 'sqlite:' . STORAGE_SQLITE; 30 $db_path = 'sqlite:' . STORAGE_SQLITE;
27 $this->handle = new PDO($db_path); 31 $this->handle = new PDO($db_path);
28 break; 32 break;
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index a49413f2..c80e5d2a 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -524,6 +524,14 @@ class Poche
524 $longlastingsession = isset($_POST['longlastingsession']); 524 $longlastingsession = isset($_POST['longlastingsession']);
525 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); 525 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login);
526 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); 526 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user)));
527
528 # reload l10n
529 $language = $user['config']['language'];
530 @putenv('LC_ALL=' . $language);
531 setlocale(LC_ALL, $language);
532 bindtextdomain($language, LOCALE);
533 textdomain($language);
534
527 $this->messages->add('s', _('welcome to your wallabag')); 535 $this->messages->add('s', _('welcome to your wallabag'));
528 Tools::logm('login successful'); 536 Tools::logm('login successful');
529 Tools::redirect($referer); 537 Tools::redirect($referer);
@@ -551,42 +559,39 @@ class Poche
551 * import datas into your wallabag 559 * import datas into your wallabag
552 * @return boolean 560 * @return boolean
553 */ 561 */
554 public function import()
555 {
556 if (isset($_FILES['file'])) {
557 Tools::logm('Import stated: parsing file');
558
559 // assume, that file is in json format
560
561 $str_data = file_get_contents($_FILES['file']['tmp_name']);
562 $data = json_decode($str_data, true);
563 if ($data === null) {
564
565 // not json - assume html
566
567 $html = new simple_html_dom();
568 $html->load_file($_FILES['file']['tmp_name']);
569 $data = array();
570 $read = 0;
571 foreach(array('ol','ul') as $list) {
572 foreach($html->find($list) as $ul) {
573 foreach($ul->find('li') as $li) {
574 $tmpEntry = array();
575 $a = $li->find('a');
576 $tmpEntry['url'] = $a[0]->href;
577 $tmpEntry['tags'] = $a[0]->tags;
578 $tmpEntry['is_read'] = $read;
579 if ($tmpEntry['url']) {
580 $data[] = $tmpEntry;
581 }
582 }
583
584 // the second <ol/ul> is for read links
585 562
586 $read = ((sizeof($data) && $read) ? 0 : 1); 563 public function import() {
587 } 564
588 } 565 if ( isset($_FILES['file']) && $_FILES['file']['tmp_name'] ) {
566 Tools::logm('Import stated: parsing file');
567
568 // assume, that file is in json format
569 $str_data = file_get_contents($_FILES['file']['tmp_name']);
570 $data = json_decode($str_data, true);
571
572 if ( $data === null ) {
573 //not json - assume html
574 $html = new simple_html_dom();
575 $html->load_file($_FILES['file']['tmp_name']);
576 $data = array();
577 $read = 0;
578 foreach (array('ol','ul') as $list) {
579 foreach ($html->find($list) as $ul) {
580 foreach ($ul->find('li') as $li) {
581 $tmpEntry = array();
582 $a = $li->find('a');
583 $tmpEntry['url'] = $a[0]->href;
584 $tmpEntry['tags'] = $a[0]->tags;
585 $tmpEntry['is_read'] = $read;
586 if ($tmpEntry['url']) {
587 $data[] = $tmpEntry;
588 }
589 }
590 # the second <ol/ul> is for read links
591 $read = ((sizeof($data) && $read)?0:1);
589 } 592 }
593 }
594 }
590 595
591 // for readability structure 596 // for readability structure
592 597
@@ -629,9 +634,11 @@ class Poche
629 $this->messages->add('s', _('Articles inserted: ') . $i . _('. Please note, that some may be marked as "read".')); 634 $this->messages->add('s', _('Articles inserted: ') . $i . _('. Please note, that some may be marked as "read".'));
630 } 635 }
631 636
632 Tools::logm('Import of articles finished: ' . $i . ' articles added (w/o content if not provided).'); 637 Tools::logm('Import of articles finished: '.$i.' articles added (w/o content if not provided).');
633 } 638 }
634 639 else {
640 $this->messages->add('s', _('Did you forget to select a file?'));
641 }
635 // file parsing finished here 642 // file parsing finished here
636 // now download article contents if any 643 // now download article contents if any
637 // check if we need to download any content 644 // check if we need to download any content
@@ -750,8 +757,8 @@ class Poche
750 die(sprintf(_('User with this id (%d) does not exist.'), $user_id)); 757 die(sprintf(_('User with this id (%d) does not exist.'), $user_id));
751 } 758 }
752 759
753 if (!in_array($type, $allowed_types) || $token != $config['token']) { 760 if (!in_array($type, $allowed_types) || !isset($config['token']) || $token != $config['token']) {
754 die(_('Uh, there is a problem while generating feeds.')); 761 die(_('Uh, there is a problem while generating feed. Wrong token used?'));
755 } 762 }
756 763
757 $feed = new FeedWriter(RSS2); 764 $feed = new FeedWriter(RSS2);
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php
index 2db57d12..0b373058 100644..100755
--- a/inc/poche/Routing.class.php
+++ b/inc/poche/Routing.class.php
@@ -98,49 +98,50 @@ class Routing
98 private function _launchAction() 98 private function _launchAction()
99 { 99 {
100 if (isset($_GET['login'])) { 100 if (isset($_GET['login'])) {
101 // hello you 101 // hello to you
102 $this->wallabag->login($this->referer); 102 $this->wallabag->login($this->referer);
103 } elseif (isset($_GET['logout'])) { 103 } elseif (isset($_GET['feed']) && isset($_GET['user_id'])) {
104 // see you soon ! 104 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
105 $this->wallabag->logout(); 105 $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']);
106 } elseif (isset($_GET['config'])) { 106 }
107 // update password 107
108 $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']); 108 //allowed ONLY to logged in user
109 } elseif (isset($_GET['newuser'])) { 109 if (\Session::isLogged() === true)
110 $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); 110 {
111 } elseif (isset($_GET['deluser'])) { 111 if (isset($_GET['logout'])) {
112 $this->wallabag->deleteUser($_POST['password4deletinguser']); 112 // see you soon !
113 } elseif (isset($_GET['epub'])) { 113 $this->wallabag->logout();
114 $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['value']); 114 } elseif (isset($_GET['config'])) {
115 $epub->run(); 115 // update password
116 } elseif (isset($_GET['import'])) { 116 $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']);
117 $import = $this->wallabag->import(); 117 } elseif (isset($_GET['newuser'])) {
118 $tplVars = array_merge($this->vars, $import); 118 $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']);
119 } elseif (isset($_GET['download'])) { 119 } elseif (isset($_GET['deluser'])) {
120 Tools::downloadDb(); 120 $this->wallabag->deleteUser($_POST['password4deletinguser']);
121 } elseif (isset($_GET['empty-cache'])) { 121 } elseif (isset($_GET['epub'])) {
122 Tools::emptyCache(); 122 $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['id'], $_GET['value']);
123 } elseif (isset($_GET['export'])) { 123 $epub->run();
124 $this->wallabag->export(); 124 } elseif (isset($_GET['import'])) {
125 } elseif (isset($_GET['updatetheme'])) { 125 $import = $this->wallabag->import();
126 $this->wallabag->tpl->updateTheme($_POST['theme']); 126 $tplVars = array_merge($this->vars, $import);
127 } elseif (isset($_GET['updatelanguage'])) { 127 } elseif (isset($_GET['empty-cache'])) {
128 $this->wallabag->language->updateLanguage($_POST['language']); 128 Tools::emptyCache();
129 } elseif (isset($_GET['uploadfile'])) { 129 } elseif (isset($_GET['export'])) {
130 $this->wallabag->uploadFile(); 130 $this->wallabag->export();
131 } elseif (isset($_GET['feed'])) { 131 } elseif (isset($_GET['updatetheme'])) {
132 if (isset($_GET['action']) && $_GET['action'] == 'generate') { 132 $this->wallabag->tpl->updateTheme($_POST['theme']);
133 } elseif (isset($_GET['updatelanguage'])) {
134 $this->wallabag->language->updateLanguage($_POST['language']);
135 } elseif (isset($_GET['uploadfile'])) {
136 $this->wallabag->uploadFile();
137 } elseif (isset($_GET['feed']) && isset($_GET['action']) && $_GET['action'] == 'generate') {
133 $this->wallabag->updateToken(); 138 $this->wallabag->updateToken();
134 } 139 }
135 else { 140 elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
136 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); 141 $plainUrl = new Url(base64_encode($_GET['plainurl']));
137 $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']); 142 $this->wallabag->action('add', $plainUrl);
138 } 143 }
139 } 144 }
140 elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
141 $plainUrl = new Url(base64_encode($_GET['plainurl']));
142 $this->wallabag->action('add', $plainUrl);
143 }
144 } 145 }
145 146
146 public function _render($file, $vars) 147 public function _render($file, $vars)
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 63137d76..93ec3fc6 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -54,6 +54,10 @@ final class Tools
54 || ($https && $_SERVER["SERVER_PORT"] == '443') 54 || ($https && $_SERVER["SERVER_PORT"] == '443')
55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection 55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
56 ? '' : ':' . $_SERVER["SERVER_PORT"]); 56 ? '' : ':' . $_SERVER["SERVER_PORT"]);
57
58 if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) {
59 $serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"];
60 }
57 61
58 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); 62 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
59 63
@@ -295,21 +299,6 @@ final class Tools
295 } 299 }
296 300
297 /** 301 /**
298 * Download the sqlite database
299 */
300 public static function downloadDb()
301 {
302 header('Content-Disposition: attachment; filename="poche.sqlite.gz"');
303 self::_status(200);
304
305 header('Content-Transfer-Encoding: binary');
306 header('Content-Type: application/octet-stream');
307 echo gzencode(file_get_contents(STORAGE_SQLITE));
308
309 exit;
310 }
311
312 /**
313 * Get the content for a given URL (by a call to FullTextFeed) 302 * Get the content for a given URL (by a call to FullTextFeed)
314 * 303 *
315 * @param Url $url 304 * @param Url $url
diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php
index 6f03af18..2a458544 100755
--- a/inc/poche/config.inc.default.php
+++ b/inc/poche/config.inc.default.php
@@ -59,7 +59,7 @@
59@define ('LOCALE', ROOT . '/locale'); 59@define ('LOCALE', ROOT . '/locale');
60@define ('CACHE', ROOT . '/cache'); 60@define ('CACHE', ROOT . '/cache');
61 61
62@define ('PAGINATION', '10'); 62@define ('PAGINATION', '12');
63 63
64//limit for download of articles during import 64//limit for download of articles during import
65@define ('IMPORT_LIMIT', 5); 65@define ('IMPORT_LIMIT', 5);
diff --git a/inc/poche/pochePictures.php b/inc/poche/pochePictures.php
index 7a914f90..52394c70 100644
--- a/inc/poche/pochePictures.php
+++ b/inc/poche/pochePictures.php
@@ -33,7 +33,7 @@ final class Picture
33 } 33 }
34 34
35 if (self::_downloadPictures($absolute_path, $fullpath) === true) { 35 if (self::_downloadPictures($absolute_path, $fullpath) === true) {
36 $content = str_replace($matches[$i][2], $fullpath, $content); 36 $content = str_replace($matches[$i][2], Tools::getPocheUrl() . $fullpath, $content);
37 } 37 }
38 38
39 $processing_pictures[] = $absolute_path; 39 $processing_pictures[] = $absolute_path;
diff --git a/index.php b/index.php
index a26f458a..39990d55 100755
--- a/index.php
+++ b/index.php
@@ -9,6 +9,7 @@
9 */ 9 */
10 10
11define ('POCHE', '1.8.0'); 11define ('POCHE', '1.8.0');
12require 'check_essentials.php';
12require 'check_setup.php'; 13require 'check_setup.php';
13require_once 'inc/poche/global.inc.php'; 14require_once 'inc/poche/global.inc.php';
14 15
diff --git a/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo b/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo
index b363385a..297516c0 100755..100644
--- a/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo
+++ b/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo
Binary files differ
diff --git a/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po b/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po
index 1764bd61..e39156e6 100755
--- a/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po
+++ b/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po
@@ -1,58 +1,40 @@
1msgid "" 1msgid ""
2msgstr "" 2msgstr ""
3"Project-Id-Version: wballabag\n" 3"Project-Id-Version: wallabag\n"
4"Report-Msgid-Bugs-To: \n" 4"Report-Msgid-Bugs-To: \n"
5"POT-Creation-Date: 2014-02-24 15:19+0300\n" 5"POT-Creation-Date: 2014-02-25 15:17+0300\n"
6"PO-Revision-Date: 2014-02-24 15:29+0300\n" 6"PO-Revision-Date: \n"
7"Last-Translator: Maryana <mariroz@mr.lviv.ua>\n" 7"Last-Translator: skibbipl <skibbipl@users.noreply.github.com>\n"
8"Language-Team: \n" 8"Language-Team: \n"
9"Language: \n" 9"Language: pl\n"
10"MIME-Version: 1.0\n" 10"MIME-Version: 1.0\n"
11"Content-Type: text/plain; charset=UTF-8\n" 11"Content-Type: text/plain; charset=UTF-8\n"
12"Content-Transfer-Encoding: 8bit\n" 12"Content-Transfer-Encoding: 8bit\n"
13"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" 13"X-Generator: Poedit 1.6.6\n"
14"X-Poedit-Basepath: .\n" 14"X-Poedit-Basepath: .\n"
15"X-Poedit-Language: Polish\n" 15"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
16"X-Poedit-Country: POLAND\n" 16"|| n%100>=20) ? 1 : 2);\n"
17"X-Poedit-SourceCharset: utf-8\n" 17"X-Poedit-SourceCharset: UTF-8\n"
18"X-Poedit-SearchPath-0: /home/mariroz/_DEV/web/wallabag/wallabag-master-testing\n" 18"X-Poedit-SearchPath-0: /home/mariroz/_DEV/web/wallabag/wallabag-master-"
19"testing\n"
19 20
20msgid "poche, a read it later open source system" 21msgid "wallabag, a read it later open source system"
21msgstr "poche, serwis odrocznego czytania open source" 22msgstr "wallabag, open source'owy system typu \"przeczytaj to później\""
22 23
23msgid "login failed: user doesn't exist" 24msgid "login failed: user doesn't exist"
24msgstr "logowanie nie udało się: użytkownik nie istnieje" 25msgstr "logowanie się nie powiodło: użytkownik nie istnieje"
25 26
26msgid "home" 27msgid "return home"
27msgstr "strona domowa" 28msgstr "powrót do strony domowej"
28
29msgid "favorites"
30msgstr "ulubione"
31
32msgid "archive"
33msgstr "archiwum"
34
35msgid "tags"
36msgstr "tagi"
37 29
38msgid "config" 30msgid "config"
39msgstr "ustawienia" 31msgstr "konfiguracja"
40
41msgid "logout"
42msgstr "wyloguj"
43
44msgid "back to home"
45msgstr "wróć do strony domowej"
46 32
47msgid "Tags" 33msgid "Saving articles"
48msgstr "Tagi" 34msgstr "Zapisywanie artykułów"
49
50#, fuzzy
51msgid "Poching a link"
52msgstr "Zapisywanie linków"
53 35
54msgid "You can poche a link by several methods:" 36msgid "There are several ways to save an article:"
55msgstr "Istnieje kilka sposobów aby zapisać link:" 37msgstr "Istnieje kilka sposobów aby zapisać artykuł:"
56 38
57msgid "read the documentation" 39msgid "read the documentation"
58msgstr "przeczytaj dokumentacjÄ™" 40msgstr "przeczytaj dokumentacjÄ™"
@@ -60,54 +42,98 @@ msgstr "przeczytaj dokumentacjÄ™"
60msgid "download the extension" 42msgid "download the extension"
61msgstr "pobierz rozszerzenie" 43msgstr "pobierz rozszerzenie"
62 44
45msgid "via F-Droid"
46msgstr "przez F-Droid"
47
48msgid " or "
49msgstr "albo "
50
51msgid "via Google Play"
52msgstr "przez Google Play"
53
63msgid "download the application" 54msgid "download the application"
64msgstr "pobierz aplikacjÄ™" 55msgstr "pobierz aplikacjÄ™"
65 56
66#, fuzzy 57msgid "By filling this field"
67msgid "by filling this field"
68msgstr "Poprzez wypełnienie tego pola" 58msgstr "Poprzez wypełnienie tego pola"
69 59
70msgid "poche it!" 60msgid "bag it!"
71msgstr "zapisz!" 61msgstr "zapisz!"
72 62
73#, fuzzy 63msgid "Bookmarklet: drag & drop this link to your bookmarks bar"
74msgid "bookmarklet: drag & drop this link to your bookmarks bar" 64msgstr "Skryptozakładka: przeciągnij i upuść ten link na twój pasek zakładek"
75msgstr "Bookmarklet: przeciÄ…gnij i upucs ten link na pasek zakladek"
76 65
77msgid "Updating poche" 66msgid "Upgrading wallabag"
78msgstr "Aktualizacja poche" 67msgstr "Aktualizacja wallabag"
79 68
80msgid "your version" 69msgid "Installed version"
81msgstr "twoja wersja" 70msgstr "Zainstalowana wersja"
82 71
83#, fuzzy 72msgid "Latest stable version"
84msgid "latest stable version"
85msgstr "Najnowsza stabilna wersja" 73msgstr "Najnowsza stabilna wersja"
86 74
87#, fuzzy 75msgid "A more recent stable version is available."
88msgid "a more recent stable version is available."
89msgstr "Nowsza stabilna wersja jest dostępna." 76msgstr "Nowsza stabilna wersja jest dostępna."
90 77
91msgid "you are up to date." 78msgid "You are up to date."
92msgstr "brak nowych aktualizacji." 79msgstr "Posiadasz najnowszÄ… wersjÄ™."
93 80
94msgid "latest dev version" 81msgid "Latest dev version"
95msgstr "najnowsza wersja rozwojowa" 82msgstr "Najnowsza wersja developerska"
96 83
97msgid "a more recent development version is available." 84msgid "A more recent development version is available."
98msgstr "Nowsza wersja rozwojowa jest dostępna." 85msgstr "Nowsza developerska wersja jest dostępna."
86
87msgid "Feeds"
88msgstr "Kanały"
89
90msgid ""
91"Your feed token is currently empty and must first be generated to enable "
92"feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>."
93msgstr ""
94"Twój token kanału jest aktualnie pusty i musi zostać wygenerowany, aby "
95"włączyć kanały. Kliknij <a href='?feed&amp;action=generate'>tutaj, aby go "
96"wygenerować</a>."
97
98msgid "Unread feed"
99msgstr "Nieprzeczytane kanały"
100
101msgid "Favorites feed"
102msgstr "Ulubione kanały"
103
104msgid "Archive feed"
105msgstr "Kanały archiwum"
106
107msgid "Your token:"
108msgstr "Twój token:"
109
110msgid "Your user id:"
111msgstr "Twój id użytkownika:"
112
113msgid ""
114"You can regenerate your token: <a href='?feed&amp;action=generate'>generate!"
115"</a>."
116msgstr ""
117"Możesz wygenewrować ponownie swój token: <a href='?feed&amp;"
118"action=generate'>generuj!</a>."
99 119
100msgid "Change your theme" 120msgid "Change your theme"
101msgstr "Zmień motyw" 121msgstr "Zmień swój motyw"
102 122
103msgid "Theme:" 123msgid "Theme:"
104msgstr "Motyw:" 124msgstr "Motyw:"
105 125
106msgid "Update" 126msgid "Update"
107msgstr "Aktualizacja" 127msgstr "Aktualizuj"
128
129msgid "Change your language"
130msgstr "Zmień język"
131
132msgid "Language:"
133msgstr "Język:"
108 134
109msgid "Change your password" 135msgid "Change your password"
110msgstr "Zmień hasło" 136msgstr "Zmień swoje hasło"
111 137
112msgid "New password:" 138msgid "New password:"
113msgstr "Nowe hasło:" 139msgstr "Nowe hasło:"
@@ -116,91 +142,104 @@ msgid "Password"
116msgstr "Hasło" 142msgstr "Hasło"
117 143
118msgid "Repeat your new password:" 144msgid "Repeat your new password:"
119msgstr "Powtórz hasło jeszcze raz:" 145msgstr "Powtórz twoje nowe hasło:"
120 146
121msgid "Import" 147msgid "Import"
122msgstr "Import" 148msgstr "Import"
123 149
124msgid "Please execute the import script locally, it can take a very long time." 150msgid ""
125msgstr "Proszę wykonać skrypt importu lokalnie, ponieważ moze to trwać bardzo długo." 151"Please execute the import script locally as it can take a very long time."
152msgstr ""
153"Proszę wykonaj skrypt importu lokalnie, ponieważ może to trwać bardzo długo."
126 154
127msgid "More infos in the official doc:" 155msgid "More info in the official documentation:"
128msgstr "Więcej informacji znajduje się w oficjalnej dokumentacji:" 156msgstr "Więcej informacji znajdziesz w oficjalnej dokumentacji:"
129 157
130msgid "import from Pocket" 158msgid "Import from Pocket"
131msgstr "Importuj z Pocket'a" 159msgstr "Importuj z Pocket"
132 160
133#, php-format 161#, php-format
134msgid "(you must have a %s file on your server)" 162msgid "(you must have a %s file on your server)"
135msgstr "(musisz mieć plik %s na serwerze)" 163msgstr "(musisz mieć plik %s na swoim serwerze)"
136 164
137msgid "import from Readability" 165msgid "Import from Readability"
138msgstr "Importuj z Readability" 166msgstr "Importuj z Readability"
139 167
140msgid "import from Instapaper" 168msgid "Import from Instapaper"
141msgstr "Importuj z Instapaper" 169msgstr "Importuj z Instapaper"
142 170
143#, fuzzy 171msgid "Import from wallabag"
144msgid "Export your poche datas" 172msgstr "Importuj z wallabag"
145msgstr "Exportuj dane poche" 173
174msgid "Export your wallabag data"
175msgstr "Wyeksportuj swoje dane wallabag"
146 176
147msgid "Click here" 177msgid "Click here"
148msgstr "Kliknij tu" 178msgstr "Kliknij tu"
149 179
150#, fuzzy 180msgid "to download your database."
151msgid "to export your poche datas." 181msgstr "aby pobrać twoją bazę danych."
152msgstr "aby wyeksportować dane poche."
153 182
154msgid "plop" 183msgid "to export your wallabag data."
155msgstr "plop" 184msgstr "aby wyeksportować dane wallabag."
156 185
157msgid "installation" 186msgid "Cache"
158msgstr "instalacja" 187msgstr "Cache"
159 188
160msgid "install your wallabag" 189msgid "to delete cache."
161msgstr "zainstaluj wallabag" 190msgstr "aby wyczyścić cache."
162 191
163msgid "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation on wallabag website</a>." 192msgid "You can enter multiple tags, separated by commas."
164msgstr "wallabag nie jest jeszcze zainstalowany. Proszę wypełnić poniższy formularz, aby go zainstalować. Nie wahaj się <a href='http://doc.wallabag.org/'>zapoznać się z dokumentacją na stronie wallabag</a>." 193msgstr "Możesz wprowadzić wiele tagów, oddzielonych przecinkami."
165 194
166msgid "Login" 195msgid "return to article"
167msgstr "Login" 196msgstr "powrót do artykułu"
168 197
169msgid "Repeat your password" 198msgid "plop"
170msgstr "Powtórz hasło" 199msgstr "plop"
171 200
172msgid "Install" 201msgid ""
173msgstr "Instaluj" 202"You can <a href='wallabag_compatibility_test.php'>check your configuration "
203"here</a>."
204msgstr ""
205"Możesz <a href='wallabag_compatibility_test.php'>sprawdzić swoją "
206"konfiguracjÄ™ tutaj</a>."
174 207
175msgid "favoris" 208msgid "favoris"
176msgstr "ulubione" 209msgstr "favoris"
210
211msgid "archive"
212msgstr "archiwum"
177 213
178msgid "unread" 214msgid "unread"
179msgstr "nieprzeczytane" 215msgstr "nieprzeczytane"
180 216
181msgid "by date asc" 217msgid "by date asc"
182msgstr "według daty rosnąco" 218msgstr "po dacie rosnąco"
183 219
184msgid "by date" 220msgid "by date"
185msgstr "wg daty" 221msgstr "po dacie"
186 222
187msgid "by date desc" 223msgid "by date desc"
188msgstr "według daty malejąco" 224msgstr "po dacie malejąco"
189 225
190msgid "by title asc" 226msgid "by title asc"
191msgstr "według tytułu rosnąco" 227msgstr "po tytule rosnąco"
192 228
193msgid "by title" 229msgid "by title"
194msgstr "wg tytułu" 230msgstr "po tytule"
195 231
196msgid "by title desc" 232msgid "by title desc"
197msgstr "według tytułu malejąco" 233msgstr "po tytule malejąco"
198 234
199msgid "No link available here!" 235msgid "Tag"
200msgstr "Brak dostępnych linków!" 236msgstr "Otaguj"
201 237
202msgid "toggle mark as read" 238msgid "No articles found."
203msgstr "przełącz jako przeczytane" 239msgstr "Nie znaleziono artykułów."
240
241msgid "Toggle mark as read"
242msgstr "Przełącz jako przeczytane"
204 243
205msgid "toggle favorite" 244msgid "toggle favorite"
206msgstr "przełącz ulubione" 245msgstr "przełącz ulubione"
@@ -212,139 +251,91 @@ msgid "original"
212msgstr "oryginał" 251msgstr "oryginał"
213 252
214msgid "estimated reading time:" 253msgid "estimated reading time:"
215msgstr "szacowany czas odczytu:" 254msgstr "szacowany czas czytania:"
216
217msgid "results"
218msgstr "wyniki"
219
220msgid "login to your wallabag"
221msgstr "zaloguj siÄ™ do swojego wallabag"
222
223msgid "you are in demo mode, some features may be disabled."
224msgstr "jesteś w trybie demo, niektóre funkcje mogą być wyłączone."
225
226msgid "Stay signed in"
227msgstr "Pozostań zalogowany"
228
229msgid "(Do not check on public computers)"
230msgstr "(Nie sprawdzaj na publicznych komputerach)"
231
232msgid "Saving articles"
233msgstr "Zapisywanie artykułów"
234
235msgid "There are several ways to save an article:"
236msgstr "Istnieje kilka sposobów aby zapisać artykuł:"
237
238msgid "via F-Droid"
239msgstr "przez F-Droid"
240
241msgid " or "
242msgstr "albo"
243
244msgid "via Google Play"
245msgstr "przez Google Play"
246
247msgid "By filling this field"
248msgstr "Poprzez wypełnienie tego pola"
249
250msgid "bag it!"
251msgstr "zapisz!"
252
253msgid "Bookmarklet: drag & drop this link to your bookmarks bar"
254msgstr "Bookmarklet: przeciągnij i upuść ten link na pasek zakladek"
255
256msgid "Upgrading wallabag"
257msgstr "Aktualizacja wallabag"
258
259msgid "Installed version"
260msgstr "Zainstalowana wersja "
261 255
262msgid "Latest stable version" 256msgid "mark all the entries as read"
263msgstr "Najnowsza stabilna wersja" 257msgstr "zaznacz wszystkie wpisy jako przeczytane"
264
265msgid "A more recent stable version is available."
266msgstr "Nowsza stabilna wersja jest dostępna."
267
268msgid "You are up to date."
269msgstr "Brak nowych aktualizacji."
270 258
271msgid "Latest dev version" 259msgid "results"
272msgstr "Najnowsza wersja rozwojowa" 260msgstr "rezultaty"
273 261
274#, fuzzy 262msgid "installation"
275msgid "A more recent development version is available." 263msgstr "instalacja"
276msgstr "Nowsza wersja rozwojowa jest dostępna."
277 264
278msgid "Feeds" 265msgid "install your wallabag"
279msgstr "Kanały (feeds)" 266msgstr "zainstauj wallabag"
280 267
281msgid "Your feed token is currently empty and must first be generated to enable feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>." 268msgid ""
282msgstr "Twój token kanału jest pusty i musi najpierw zostać wygenerowany. Kliknij <a href='?feed&action=generate'>tu aby go wygenerować</a>." 269"wallabag is still not installed. Please fill the below form to install it. "
270"Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation "
271"on wallabag website</a>."
272msgstr ""
273"wallabag wciąż nie jest zainstalowany. Proszę wypełnij poniższy formularz "
274"aby go zainstalować. Nie wahaj się <a href='http://doc.wallabag."
275"org/'>przeczytać dokumentacji na stronie wallabag</a>."
283 276
284msgid "Unread feed" 277msgid "Login"
285msgstr "Kanał nieprzeczytanych" 278msgstr "Login"
286 279
287msgid "Favorites feed" 280msgid "Repeat your password"
288msgstr "Kanał ulubionych" 281msgstr "Powtórz swoje hasło"
289 282
290msgid "Archive feed" 283msgid "Install"
291msgstr "Kanał archiwum" 284msgstr "Zainstauj"
292 285
293msgid "Your token:" 286msgid "login to your wallabag"
294msgstr "Twój token: " 287msgstr "zaloguj się do twojego wallabag"
295 288
296msgid "Your user id:" 289msgid "Login to wallabag"
297msgstr "Twój identyfikator użytkownika:" 290msgstr "Logowanie do wallabag"
298 291
299msgid "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>." 292msgid "you are in demo mode, some features may be disabled."
300msgstr "Możesz wygenerować token ponownie: kliknij <a href='?feed&amp;action=generate'>generuj!</a>." 293msgstr "jesteś w trybie demo, niektóre funkcjonalności mogą być wyłączone."
301 294
302msgid "Change your language" 295msgid "Username"
303msgstr "Zmień język" 296msgstr "Nazwa użytkownika"
304 297
305msgid "Language:" 298msgid "Stay signed in"
306msgstr "Język:" 299msgstr "Pozostań zalogowany"
307 300
308msgid "Please execute the import script locally as it can take a very long time." 301msgid "(Do not check on public computers)"
309msgstr "ProszÄ™ wykonać skrypt importu lokalnie, gdyż moze to trwać bardzo dÅ‚ugo." 302msgstr "(Nie zaznaczaj na komputerach z publicznym dos™pem)"
310 303
311#, fuzzy 304msgid "Sign in"
312msgid "More info in the official documentation:" 305msgstr "Zaloguj siÄ™"
313msgstr "Więcej informacji znajduje się w oficjalnej dokumentacji:"
314 306
315msgid "Import from Pocket" 307msgid "favorites"
316msgstr "Іmport z Pocket'a" 308msgstr "ulubione"
317 309
318msgid "Import from Readability" 310msgid "estimated reading time :"
319msgstr "Import z Readability" 311msgstr "szacowany czas czytania :"
320 312
321msgid "Import from Instapaper" 313msgid "Mark all the entries as read"
322msgstr "Import z Instapaper" 314msgstr "Zaznacz wszystkie wpisy jako przeczytane"
323 315
324msgid "Import from wallabag" 316msgid "Return home"
325msgstr "Import z wallabag" 317msgstr "Powrót na stronę domową"
326 318
327msgid "Export your wallabag data" 319msgid "Back to top"
328msgstr "Eksportowac dane wallabag" 320msgstr "Powrót na górę"
329 321
330msgid "to download your database." 322msgid "Mark as read"
331msgstr "aby pobrac bazÄ™ danych." 323msgstr "Oznacz jako przeczytane"
332 324
333msgid "to export your wallabag data." 325msgid "Favorite"
334msgstr "aby eksportować dane wallabag." 326msgstr "Ulubione"
335 327
336msgid "Cache" 328msgid "Toggle favorite"
337msgstr "Cache" 329msgstr "Przełącz ulubione"
338 330
339msgid "to delete cache." 331msgid "Delete"
340msgstr "aby wyczyÅ›cić cache." 332msgstr "UsuÅ"
341 333
342msgid "tweet" 334msgid "Tweet"
343msgstr "tweet" 335msgstr "Tweet"
344 336
345#, fuzzy 337msgid "Email"
346msgid "email" 338msgstr "Email"
347msgstr "Wyślij email"
348 339
349msgid "shaarli" 340msgid "shaarli"
350msgstr "shaarli" 341msgstr "shaarli"
@@ -352,163 +343,172 @@ msgstr "shaarli"
352msgid "flattr" 343msgid "flattr"
353msgstr "flattr" 344msgstr "flattr"
354 345
355msgid "this article appears wrong?" 346msgid "Does this article appear wrong?"
356msgstr "Czy ten artykuł wyświetla się nieprawidłowo?" 347msgstr "Czy ten artykuł jest wyświetlany niepoprawnie?"
357 348
358msgid "You can enter multiple tags, separated by commas." 349msgid "tags:"
359msgstr "Możesz wprowadzić wiele tagów, rozdzielając je przecinkami." 350msgstr "tagi:"
360 351
361msgid "return to article" 352msgid "Edit tags"
362msgstr "wróć do artykułu" 353msgstr "Edytuj tagi"
354
355msgid "save link!"
356msgstr "zapisz link!"
357
358msgid "home"
359msgstr "strona domowa"
360
361msgid "tags"
362msgstr "tagi"
363
364msgid "logout"
365msgstr "wyloguj"
363 366
364#, fuzzy
365msgid "powered by" 367msgid "powered by"
366msgstr "zasilany przez" 368msgstr "w oparciu o"
367 369
368msgid "debug mode is on so cache is off." 370msgid "debug mode is on so cache is off."
369msgstr "tryb debugowania jest włączony, więc cashe jest wyłączony." 371msgstr "tryb debug jest włączony zatem cache jest wyłączony."
370 372
371msgid "your wallabag version:" 373msgid "your wallabag version:"
372msgstr "twoja wersja wallabag:" 374msgstr "wersja twojego wallabag:"
373 375
374msgid "storage:" 376msgid "storage:"
375msgstr "magazyn:" 377msgstr "storage:"
376 378
377msgid "save a link" 379msgid "save a link"
378msgstr "zapisz link" 380msgstr "zapisz link"
379 381
380msgid "return home" 382msgid "back to home"
381msgstr "wróć do strony domowej" 383msgstr "powrót do strony domowej"
382
383msgid "You can <a href='wallabag_compatibility_test.php'>check your configuration here</a>."
384msgstr "Możesz <a href='wallabag_compatibility_test.php'>sprawdzić swoją konfigurację tu</a>."
385
386msgid "Tag"
387msgstr "Tag"
388 384
389msgid "No articles found." 385msgid "toggle mark as read"
390msgstr "Nie znaleziono artykułów." 386msgstr "przełącz jako przeczytane"
391 387
392msgid "Toggle mark as read" 388msgid "tweet"
393msgstr "Przełącz jako przeczytane" 389msgstr "tweet"
394 390
395msgid "mark all the entries as read" 391msgid "email"
396msgstr "zaznacz wszystko jako przeczytane" 392msgstr "email"
397 393
398msgid "Login to wallabag" 394msgid "this article appears wrong?"
399msgstr "Zaloguj się do wallabag" 395msgstr "ten artykuł wygląda niepoprawnie?"
400 396
401msgid "Username" 397msgid "No link available here!"
402msgstr "Nazwa użytkownika" 398msgstr "No link available here!"
403 399
404msgid "Sign in" 400#, fuzzy
405msgstr "Login" 401msgid "Poching a link"
402msgstr "Poching a link"
406 403
407msgid "Return home" 404msgid "by filling this field"
408msgstr "Wróć do strony domowej" 405msgstr "przez wypełnienie tego pola"
409 406
410msgid "Back to top" 407msgid "bookmarklet: drag & drop this link to your bookmarks bar"
411msgstr "Wróć na górÄ™" 408msgstr "skryptozakÅ‚adka: przeciÄ…gnij i upuÅ›Äten link na twój pasek zakÅ‚adek"
412 409
413msgid "Mark as read" 410msgid "your version"
414msgstr "Zaznacz jako przeczytane" 411msgstr "twoja wersja"
415 412
416msgid "Favorite" 413msgid "latest stable version"
417msgstr "Ulubione" 414msgstr "najnowsza stabilna wersja"
418 415
419msgid "Toggle favorite" 416msgid "a more recent stable version is available."
420msgstr "Zaznacz jako ulubione" 417msgstr "nowsza wersja stabilna jest dostępna."
421 418
422msgid "Delete" 419msgid "you are up to date."
423msgstr "Usuń" 420msgstr "posiadasz najnowszą wersję."
424 421
425msgid "Tweet" 422msgid "latest dev version"
426msgstr "Tweet" 423msgstr "najnowsza wersja developerska"
427 424
428msgid "Email" 425msgid "a more recent development version is available."
429msgstr "Wyślij email" 426msgstr "nowsza wersja developerska jest dostępna."
430 427
431msgid "Does this article appear wrong?" 428msgid "Please execute the import script locally, it can take a very long time."
432msgstr "Czy ten artykuł wyświetla się nieprawidłowo?" 429msgstr ""
430"Please execute the import script locally, it can take a very long time."
433 431
434msgid "tags:" 432msgid "More infos in the official doc:"
435msgstr "tegi:" 433msgstr "More infos in the official doc:"
436 434
437msgid "Edit tags" 435msgid "import from Pocket"
438msgstr "Edytuj tagi" 436msgstr "import from Pocket"
439 437
440msgid "save link!" 438msgid "import from Readability"
441msgstr "zapisz link!" 439msgstr "import from Readability"
442 440
443#, fuzzy 441msgid "import from Instapaper"
444msgid "estimated reading time :" 442msgstr "import from Instapaper"
445msgstr "szacowany czas odczytu:"
446 443
447msgid "Mark all the entries as read" 444msgid "Tags"
448msgstr "Oznacz wszystko jako przeczytane" 445msgstr "Tagi"
449 446
450msgid "Untitled" 447msgid "Untitled"
451msgstr "Bez nazwy" 448msgstr "Untitled"
452 449
453msgid "the link has been added successfully" 450msgid "the link has been added successfully"
454msgstr "link został pomyślnie dodany" 451msgstr "link został dodany pomyślnie"
455 452
456msgid "error during insertion : the link wasn't added" 453msgid "error during insertion : the link wasn't added"
457msgstr "błąd podczas wprowadzania: link nie został dodany" 454msgstr "błąd podczas dodawania : link nie został dodany"
458 455
459msgid "the link has been deleted successfully" 456msgid "the link has been deleted successfully"
460msgstr "link zostal pomyślnie usunięty" 457msgstr "link zostaŠusunięty pomyślnie"
461 458
462msgid "the link wasn't deleted" 459msgid "the link wasn't deleted"
463msgstr "link nie został usunięty" 460msgstr "link nie został usunięty"
464 461
465msgid "Article not found!" 462msgid "Article not found!"
466msgstr "Nie znaleziono artykułu." 463msgstr "Artykuł nie znaleziony!"
467 464
468msgid "previous" 465msgid "previous"
469msgstr "poprzednia" 466msgstr "poprzedni"
470 467
471msgid "next" 468msgid "next"
472msgstr "następna" 469msgstr "następny"
473 470
474msgid "in demo mode, you can't update your password" 471msgid "in demo mode, you can't update your password"
475msgstr "w trybie demo, nie można zmieniać hasła" 472msgstr "w trybie demo nie możesz zaktualizować swojego hasła"
476 473
477msgid "your password has been updated" 474msgid "your password has been updated"
478msgstr "twoje hasło zostało zmienione" 475msgstr "twoje hasło zostało zaktualizowane"
479 476
480msgid "the two fields have to be filled & the password must be the same in the two fields" 477msgid ""
481msgstr "oba pola muszą być wypełnione i hasła muszę być takie same w obu polach" 478"the two fields have to be filled & the password must be the same in the two "
479"fields"
480msgstr ""
481"oba pola muszą być wypełnione oraz hasło musi być takie same w obu polach"
482 482
483msgid "still using the \"" 483msgid "still using the \""
484msgstr "nadal w użyciu \"" 484msgstr "wciąż używam \""
485 485
486msgid "that theme does not seem to be installed" 486msgid "that theme does not seem to be installed"
487msgstr "wydaje się że ten motyw nie jest zainstalowany" 487msgstr "ten motyw nie wygląda na zainstalowany"
488 488
489msgid "you have changed your theme preferences" 489msgid "you have changed your theme preferences"
490msgstr "ustawienia motywu zostały zmienione" 490msgstr "zmieniłeś swoje preferencje motywu"
491 491
492msgid "that language does not seem to be installed" 492msgid "that language does not seem to be installed"
493msgstr "wydaje się że ten język nie jest zainstalowany" 493msgstr "ten język nie wygląda na zainstalowany"
494 494
495msgid "you have changed your language preferences" 495msgid "you have changed your language preferences"
496msgstr "ustawienia języka zostały zmienione" 496msgstr "zmieniłeś swoje preferencje językowe"
497 497
498msgid "login failed: you have to fill all fields" 498msgid "login failed: you have to fill all fields"
499msgstr "logowanie nie powiodlo się: musisz wypełnić wszystkie pola" 499msgstr "logowanie się nie powiodło: musisz wypełnić wszystkie pola"
500 500
501msgid "welcome to your wallabag" 501msgid "welcome to your wallabag"
502msgstr "Witamy w wallabag" 502msgstr "witaj w twoim wallabag"
503 503
504msgid "login failed: bad login or password" 504msgid "login failed: bad login or password"
505msgstr "logowanie nie powiodlo się: niepoprawny login lub hasło" 505msgstr "logowanie się nie powiodło: nieprawidłowy login lub hasło"
506 506
507msgid "import from instapaper completed" 507msgid "import from instapaper completed"
508msgstr "import z instapaper'a zakończony" 508msgstr "import z instapaper zakończony"
509 509
510msgid "import from pocket completed" 510msgid "import from pocket completed"
511msgstr "import z pocket'a zakończony" 511msgstr "import z pocket zakończony"
512 512
513msgid "import from Readability completed. " 513msgid "import from Readability completed. "
514msgstr "import z Readability zakończony. " 514msgstr "import z Readability zakończony. "
@@ -520,25 +520,34 @@ msgid "Unknown import provider."
520msgstr "Nieznany dostawca importu." 520msgstr "Nieznany dostawca importu."
521 521
522msgid "Incomplete inc/poche/define.inc.php file, please define \"" 522msgid "Incomplete inc/poche/define.inc.php file, please define \""
523msgstr "Niekompletny plik inc/poche/define.inc.php, proszę zdefiniować \"" 523msgstr "Niekompletny plik inc/poche/define.inc.php, proszę zdefiniuj \""
524 524
525msgid "Could not find required \"" 525msgid "Could not find required \""
526msgstr "Nie znaleziono potrzebnego \"" 526msgstr "Nie znaleziono wymaganego \""
527 527
528msgid "Uh, there is a problem while generating feeds." 528msgid "Uh, there is a problem while generating feeds."
529msgstr "Uh, jest problem podczas generowania kanałów." 529msgstr "Ah, wystąpił problem podczas generowania kanałów."
530 530
531msgid "Cache deleted." 531msgid "Cache deleted."
532msgstr "Cache wyczyszczony." 532msgstr "Cache usunięty."
533 533
534msgid "Oops, it seems you don't have PHP 5." 534msgid "Oops, it seems you don't have PHP 5."
535msgstr "Oops, wygląda ze nie masz PHP 5." 535msgstr "Oops, wygląda na to że nie masz PHP 5."
536
537#~ msgid "poche it!"
538#~ msgstr "poche it!"
539
540#~ msgid "Updating poche"
541#~ msgstr "Updating poche"
542
543#~ msgid "create an issue"
544#~ msgstr "create an issue"
536 545
537#~ msgid "Import from poche" 546#~ msgid "or"
538#~ msgstr "Import z poche" 547#~ msgstr "or"
539 548
540#~ msgid "welcome to your poche" 549#~ msgid "contact us by mail"
541#~ msgstr "witamy w poche" 550#~ msgstr "contact us by mail"
542 551
543#~ msgid "see you soon!" 552#~ msgid "your poche version:"
544#~ msgstr "do zobaczenia wkrótce!" 553#~ msgstr "your poche version:"
diff --git a/themes/baggy/_pocheit-form.twig b/themes/baggy/_pocheit-form.twig
index 505ec368..57a928c0 100755
--- a/themes/baggy/_pocheit-form.twig
+++ b/themes/baggy/_pocheit-form.twig
@@ -4,7 +4,7 @@
4 {% trans "Save a link" %}</h2> 4 {% trans "Save a link" %}</h2>
5 <input type="hidden" name="autoclose" value="1" /> 5 <input type="hidden" name="autoclose" value="1" />
6 <input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" /> 6 <input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
7 <span id="add-link-result"></span>
7 <input type="submit" value="{% trans "save link!" %}" /> 8 <input type="submit" value="{% trans "save link!" %}" />
8 <div id="add-link-result"></div>
9 </form> 9 </form>
10</div> 10</div>
diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig
index 46735f07..7bd229cb 100755
--- a/themes/baggy/config.twig
+++ b/themes/baggy/config.twig
@@ -111,7 +111,7 @@
111 <fieldset class="w500p"> 111 <fieldset class="w500p">
112 <div class="row"> 112 <div class="row">
113 <label class="col w150p" for="file">{% trans "File:" %}</label> 113 <label class="col w150p" for="file">{% trans "File:" %}</label>
114 <input class="col" type="file" id="file" name="file" tabindex="4"> 114 <input class="col" type="file" id="file" name="file" tabindex="4" required="required">
115 </div> 115 </div>
116 <div class="row mts txtcenter"> 116 <div class="row mts txtcenter">
117 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button> 117 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button>
@@ -121,8 +121,6 @@
121 <p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p> 121 <p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p>
122 122
123 <h2>{% trans "Export your wallabag data" %}</h2> 123 <h2>{% trans "Export your wallabag data" %}</h2>
124 {% if constant('STORAGE') == 'sqlite' %}
125 <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
126 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p> 124 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
127 125
128 <h2>{% trans "Fancy an E-Book ?" %}</h2> 126 <h2>{% trans "Fancy an E-Book ?" %}</h2>
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css
index 6d320cd2..9c50786b 100755
--- a/themes/baggy/css/main.css
+++ b/themes/baggy/css/main.css
@@ -630,7 +630,7 @@ a.add-to-wallabag-link-after:after {
630 630
631#add-link-result { 631#add-link-result {
632 font-weight: bold; 632 font-weight: bold;
633 margin-top: 10px; 633 font-size: 0.9em;
634} 634}
635 635
636/* ========================================================================== 636/* ==========================================================================
@@ -923,6 +923,13 @@ blockquote {
923 text-decoration: underline; 923 text-decoration: underline;
924} 924}
925 925
926pre code {
927 font-family: "Courier New", Courier, monospace;
928 border: 1px solid #ccc;
929 font-size: 0.96em;
930}
931
932
926/* ========================================================================== 933/* ==========================================================================
927 6 = Media Queries 934 6 = Media Queries
928 ========================================================================== */ 935 ========================================================================== */
@@ -1055,3 +1062,4 @@ blockquote {
1055 left: 0; 1062 left: 0;
1056 } 1063 }
1057} 1064}
1065
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig
index 7b65340a..53a9ee69 100755
--- a/themes/baggy/view.twig
+++ b/themes/baggy/view.twig
@@ -4,6 +4,7 @@
4{% endblock %} 4{% endblock %}
5{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} 5{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
6{% block content %} 6{% block content %}
7 {% include '_highlight.twig' %}
7 <div id="article_toolbar"> 8 <div id="article_toolbar">
8 <ul class="links"> 9 <ul class="links">
9 <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li> 10 <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li>
diff --git a/themes/default/_highlight.twig b/themes/default/_highlight.twig
new file mode 100755
index 00000000..cdb7c6bf
--- /dev/null
+++ b/themes/default/_highlight.twig
@@ -0,0 +1,4 @@
1 {# include excelent highlight.js library for code highligting, see http://highlightjs.org/ #}
2<link rel="stylesheet" href="{{ poche_url }}themes/default/highlightjs/styles/github.css">
3<script src="{{ poche_url }}themes/default/highlightjs/highlight.pack.js"></script>
4<script>hljs.initHighlightingOnLoad();</script>
diff --git a/themes/default/config.twig b/themes/default/config.twig
index 160f6046..5656fadd 100755
--- a/themes/default/config.twig
+++ b/themes/default/config.twig
@@ -110,7 +110,7 @@
110 <fieldset class="w500p"> 110 <fieldset class="w500p">
111 <div class="row"> 111 <div class="row">
112 <label class="col w150p" for="file">{% trans "File:" %}</label> 112 <label class="col w150p" for="file">{% trans "File:" %}</label>
113 <input class="col" type="file" id="file" name="file" tabindex="4"> 113 <input class="col" type="file" id="file" name="file" tabindex="4" required="required">
114 </div> 114 </div>
115 <div class="row mts txtcenter"> 115 <div class="row mts txtcenter">
116 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button> 116 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button>
@@ -121,7 +121,6 @@
121 121
122 <h2>{% trans "Export your wallabag data" %}</h2> 122 <h2>{% trans "Export your wallabag data" %}</h2>
123 {% if constant('STORAGE') == 'sqlite' %} 123 {% if constant('STORAGE') == 'sqlite' %}
124 <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
125 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p> 124 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
126 125
127 <h2>{% trans "Cache" %}</h2> 126 <h2>{% trans "Cache" %}</h2>
diff --git a/themes/default/css/style.css b/themes/default/css/style.css
index e58ef81a..e254d481 100755
--- a/themes/default/css/style.css
+++ b/themes/default/css/style.css
@@ -429,4 +429,10 @@ a.add-to-wallabag-link-after:after {
429 text-indent: 0; 429 text-indent: 0;
430 color: black; 430 color: black;
431 width: 50px; 431 width: 50px;
432}
433
434pre code {
435 font-family: "Courier New", Courier, monospace;
436 border: 1px solid #ddd;
437 font-size: 0.96em;
432} \ No newline at end of file 438} \ No newline at end of file
diff --git a/themes/default/highlightjs/highlight.pack.js b/themes/default/highlightjs/highlight.pack.js
new file mode 100644
index 00000000..10a21c34
--- /dev/null
+++ b/themes/default/highlightjs/highlight.pack.js
@@ -0,0 +1 @@
var hljs=new function(){function j(v){return v.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(v){return v.nodeName.toLowerCase()}function h(w,x){var v=w&&w.exec(x);return v&&v.index==0}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^lang(uage)?-/,"")});return v.filter(function(x){return i(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+j(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=j(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+j(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};var E=function(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})};if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b="\\b("+D.bK.split(" ").join("|")+")\\b"}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?("+F.b+")\\.?":F.b}).concat([D.tE,D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(h(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(h(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&h(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){if(!I.k){return j(C)}var T="";var W=0;I.lR.lastIndex=0;var U=I.lR.exec(C);while(U){T+=j(C.substr(W,U.index-W));var V=E(I,U);if(V){H+=V[1];T+=w(V[0],j(U[0]))}else{T+=j(U[0])}W=I.lR.lastIndex;U=I.lR.exec(C)}return T+j(C.substr(W))}function F(){if(I.sL&&!f[I.sL]){return j(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):e(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=j(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=j(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=i(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D+=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:j(L)}}else{throw O}}}function e(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:j(y)};var w=v;x.forEach(function(z){if(!i(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function g(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=b.useBR?z.innerHTML.replace(/\n/g,"").replace(/<br>|<br [^>]*>/g,"\n").replace(/<[^>]*>/g,""):z.textContent;var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):e(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=g(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function d(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function k(){return Object.keys(f)}function i(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=e;this.fixMarkup=g;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=d;this.listLanguages=k;this.getLanguage=i;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/};this.CLCM={cN:"comment",b:"//",e:"$",c:[this.PWM]};this.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[this.PWM]};this.HCM={cN:"comment",b:"#",e:"$",c:[this.PWM]};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.CSSNM={cN:"number",b:this.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0};this.RM={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("cs",function(b){var a="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{aliases:["csharp"],k:a,i:/::/,c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]},b.CLCM,b.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},b.ASM,b.QSM,b.CNM,{bK:"protected public private internal",e:/[{;=]/,k:a,c:[{bK:"class namespace interface",starts:{c:[b.TM]}},{b:b.IR+"\\s*\\(",rB:true,c:[b.TM]}]}]}});hljs.registerLanguage("ruby",function(f){var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var i="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor";var b={cN:"yardoctag",b:"@[A-Za-z]+"};var c={cN:"value",b:"#<",e:">"};var k={cN:"comment",v:[{b:"#",e:"$",c:[b]},{b:"^\\=begin",e:"^\\=end",c:[b],r:10},{b:"^__END__",e:"\\n$"}]};var d={cN:"subst",b:"#\\{",e:"}",k:i};var e={cN:"string",c:[f.BE,d],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">"},{b:"%[qw]?/",e:"/"},{b:"%[qw]?%",e:"%"},{b:"%[qw]?-",e:"-"},{b:"%[qw]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]};var a={cN:"params",b:"\\(",e:"\\)",k:i};var h=[e,c,k,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[f.inherit(f.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+f.IR+"::)?"+f.IR}]},k]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[f.inherit(f.TM,{b:j}),a,k]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[e,{b:j}],r:0},{cN:"symbol",b:f.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+f.RSR+")\\s*",c:[c,k,{cN:"regexp",c:[f.BE,d],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];d.c=h;a.c=h;var g=[{r:1,cN:"output",b:"^\\s*=> ",e:"$",rB:true,c:[{cN:"status",b:"^\\s*=>"},{b:" ",e:"$",c:h}]},{r:1,cN:"input",b:"^[^ ][^=>]*>+ ",e:"$",rB:true,c:[{cN:"prompt",b:"^[^ ][^=>]*>+"},{b:" ",e:"$",c:h}]}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:i,c:g.concat(h)}});hljs.registerLanguage("diff",function(a){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBCM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBCM,a.RM,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:true,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",rB:true,eE:true,e:"\\("};return{cI:true,i:"[=/|']",c:[a.CBCM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.CSSNM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBCM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.CSSNM,a.QSM,a.ASM,a.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("java",function(b){var a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{aliases:["jsp"],k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},b.CLCM,b.CBCM,b.ASM,b.QSM,{bK:"protected public private",e:/[{;=]/,k:a,c:[{cN:"class",bK:"class interface",eW:true,eE:true,i:/[:"\[\]]/,c:[{bK:"extends implements",r:10},b.UTM]},{b:b.UIR+"\\s*\\(",rB:true,c:[b.UTM]}]},b.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(b){var e={cN:"variable",b:"(\\$|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var a={cN:"preprocessor",b:/<\?(php)?|\?>/};var c={cN:"string",c:[b.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},b.inherit(b.ASM,{i:null}),b.inherit(b.QSM,{i:null})]};var d={v:[b.BNM,b.CNM]};return{aliases:["php3","php4","php5","php6"],cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[b.CLCM,b.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},a]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:b.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[b.BE]},a,e,{cN:"function",bK:"function",e:/[;{]/,eE:true,i:"\\$|\\[|%",c:[b.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,b.CBCM,c,d]}]},{cN:"class",bK:"class interface",e:"{",eE:true,i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},b.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[b.UTM]},{bK:"use",e:";",c:[b.UTM]},{b:"=>"},c,d]}});hljs.registerLanguage("python",function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var b={cN:"string",c:[a.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},a.ASM,a.QSM]};var d={cN:"number",r:0,v:[{b:a.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:a.CNR+"[lLjJ]?"}]};var e={cN:"params",b:/\(/,e:/\)/,c:["self",f,d,b]};var c={e:/:/,i:/[${=;\n]/,c:[a.UTM,e]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[f,d,b,a.HCM,a.inherit(c,{cN:"function",bK:"def",r:10}),a.inherit(c,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("sql",function(a){var b={cN:"comment",b:"--",e:"$"};return{cI:true,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup",e:/;/,eW:true,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM,a.CBCM,b]},a.CBCM,b]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("perl",function(c){var d="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var f={cN:"subst",b:"[$@]\\{",e:"\\}",k:d};var g={b:"->{",e:"}"};var a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@][^\s\w{]/,r:0}]};var e={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var h=[c.BE,f,a];var b=[a,c.HCM,e,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},g,{cN:"string",c:h,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[c.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[c.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+c.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[c.HCM,e,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[c.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];f.c=b;g.c=b;return{aliases:["pl"],k:d,c:b}});hljs.registerLanguage("objectivec",function(a){var d={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};var c=/[a-zA-Z@][a-zA-Z0-9_]*/;var b="@interface @class @protocol @implementation";return{aliases:["m","mm","objc","obj-c"],k:d,l:c,i:"</",c:[a.CLCM,a.CBCM,a.CNM,a.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[a.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"preprocessor",b:"#",e:"$",c:[{cN:"title",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+b.split(" ").join("|")+")\\b",e:"({|$)",eE:true,k:b,l:c,c:[a.UTM]},{cN:"variable",b:"\\."+a.UIR,r:0}]}});hljs.registerLanguage("coffeescript",function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f=c.inherit(c.TM,{b:a});var e={cN:"subst",b:/#\{/,e:/}/,k:b};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[c.BE]},{b:/'/,e:/'/,c:[c.BE]},{b:/"""/,e:/"""/,c:[c.BE,e]},{b:/"/,e:/"/,c:[c.BE,e]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[e,c.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{aliases:["coffee","cson","iced"],k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:true,i:/[:="\[\]]/,c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true,r:0}])}});hljs.registerLanguage("nginx",function(c){var b={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+c.UIR}]};var a={eW:true,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[c.HCM,{cN:"string",c:[c.BE,b],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:true,eE:true},{cN:"regexp",c:[c.BE,b],v:[{b:"\\s\\^",e:"\\s|{|;",rE:true},{b:"~\\*?\\s+",e:"\\s|{|;",rE:true},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},b]};return{aliases:["nginxconf"],c:[c.HCM,{b:c.UIR+"\\s",e:";|{",rB:true,c:[{cN:"title",b:c.UIR,starts:a}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});hljs.registerLanguage("apache",function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:true,c:[a.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}});hljs.registerLanguage("cpp",function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c","h","c++","h++"],k:b,i:"</",c:[a.CLCM,a.CBCM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line pragma",c:[{b:'include\\s*[<"]',e:'[>"]',k:"include",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,c:["self"]},{b:a.IR+"::"}]}});hljs.registerLanguage("makefile",function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:[a.BE]};return{aliases:["mk","mak"],c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}}); \ No newline at end of file
diff --git a/themes/default/highlightjs/styles/default.css b/themes/default/highlightjs/styles/default.css
new file mode 100644
index 00000000..e5bd2801
--- /dev/null
+++ b/themes/default/highlightjs/styles/default.css
@@ -0,0 +1,152 @@
1/*
2
3Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
4
5*/
6
7.hljs {
8 display: block;
9 overflow-x: auto;
10 padding: 0.5em;
11 background: #f0f0f0;
12}
13
14.hljs,
15.hljs-subst,
16.hljs-tag .hljs-title,
17.lisp .hljs-title,
18.clojure .hljs-built_in,
19.nginx .hljs-title {
20 color: black;
21}
22
23.hljs-string,
24.hljs-title,
25.hljs-constant,
26.hljs-parent,
27.hljs-tag .hljs-value,
28.hljs-rules .hljs-value,
29.hljs-preprocessor,
30.hljs-pragma,
31.haml .hljs-symbol,
32.ruby .hljs-symbol,
33.ruby .hljs-symbol .hljs-string,
34.hljs-template_tag,
35.django .hljs-variable,
36.smalltalk .hljs-class,
37.hljs-addition,
38.hljs-flow,
39.hljs-stream,
40.bash .hljs-variable,
41.apache .hljs-tag,
42.apache .hljs-cbracket,
43.tex .hljs-command,
44.tex .hljs-special,
45.erlang_repl .hljs-function_or_atom,
46.asciidoc .hljs-header,
47.markdown .hljs-header,
48.coffeescript .hljs-attribute {
49 color: #800;
50}
51
52.smartquote,
53.hljs-comment,
54.hljs-annotation,
55.hljs-template_comment,
56.diff .hljs-header,
57.hljs-chunk,
58.asciidoc .hljs-blockquote,
59.markdown .hljs-blockquote {
60 color: #888;
61}
62
63.hljs-number,
64.hljs-date,
65.hljs-regexp,
66.hljs-literal,
67.hljs-hexcolor,
68.smalltalk .hljs-symbol,
69.smalltalk .hljs-char,
70.go .hljs-constant,
71.hljs-change,
72.lasso .hljs-variable,
73.makefile .hljs-variable,
74.asciidoc .hljs-bullet,
75.markdown .hljs-bullet,
76.asciidoc .hljs-link_url,
77.markdown .hljs-link_url {
78 color: #080;
79}
80
81.hljs-label,
82.hljs-javadoc,
83.ruby .hljs-string,
84.hljs-decorator,
85.hljs-filter .hljs-argument,
86.hljs-localvars,
87.hljs-array,
88.hljs-attr_selector,
89.hljs-important,
90.hljs-pseudo,
91.hljs-pi,
92.haml .hljs-bullet,
93.hljs-doctype,
94.hljs-deletion,
95.hljs-envvar,
96.hljs-shebang,
97.apache .hljs-sqbracket,
98.nginx .hljs-built_in,
99.tex .hljs-formula,
100.erlang_repl .hljs-reserved,
101.hljs-prompt,
102.asciidoc .hljs-link_label,
103.markdown .hljs-link_label,
104.vhdl .hljs-attribute,
105.clojure .hljs-attribute,
106.asciidoc .hljs-attribute,
107.lasso .hljs-attribute,
108.coffeescript .hljs-property,
109.hljs-phony {
110 color: #88f;
111}
112
113.hljs-keyword,
114.hljs-id,
115.hljs-title,
116.hljs-built_in,
117.css .hljs-tag,
118.hljs-javadoctag,
119.hljs-phpdoc,
120.hljs-yardoctag,
121.smalltalk .hljs-class,
122.hljs-winutils,
123.bash .hljs-variable,
124.apache .hljs-tag,
125.go .hljs-typename,
126.tex .hljs-command,
127.asciidoc .hljs-strong,
128.markdown .hljs-strong,
129.hljs-request,
130.hljs-status {
131 font-weight: bold;
132}
133
134.asciidoc .hljs-emphasis,
135.markdown .hljs-emphasis {
136 font-style: italic;
137}
138
139.nginx .hljs-built_in {
140 font-weight: normal;
141}
142
143.coffeescript .javascript,
144.javascript .xml,
145.lasso .markup,
146.tex .hljs-formula,
147.xml .javascript,
148.xml .vbscript,
149.xml .css,
150.xml .hljs-cdata {
151 opacity: 0.5;
152}
diff --git a/themes/default/highlightjs/styles/github.css b/themes/default/highlightjs/styles/github.css
new file mode 100644
index 00000000..47fc2651
--- /dev/null
+++ b/themes/default/highlightjs/styles/github.css
@@ -0,0 +1,127 @@
1/*
2
3github.com style (c) Vasily Polovnyov <vast@whiteants.net>
4
5*/
6
7.hljs {
8 display: block;
9 overflow-x: auto;
10 padding: 0.5em;
11 color: #333;
12 background: #f8f8f8;
13}
14
15.hljs-comment,
16.hljs-template_comment,
17.diff .hljs-header,
18.hljs-javadoc {
19 color: #998;
20 font-style: italic;
21}
22
23.hljs-keyword,
24.css .rule .hljs-keyword,
25.hljs-winutils,
26.javascript .hljs-title,
27.nginx .hljs-title,
28.hljs-subst,
29.hljs-request,
30.hljs-status {
31 color: #333;
32 font-weight: bold;
33}
34
35.hljs-number,
36.hljs-hexcolor,
37.ruby .hljs-constant {
38 color: #099;
39}
40
41.hljs-string,
42.hljs-tag .hljs-value,
43.hljs-phpdoc,
44.tex .hljs-formula {
45 color: #d14;
46}
47
48.hljs-title,
49.hljs-id,
50.coffeescript .hljs-params,
51.scss .hljs-preprocessor {
52 color: #900;
53 font-weight: bold;
54}
55
56.javascript .hljs-title,
57.lisp .hljs-title,
58.clojure .hljs-title,
59.hljs-subst {
60 font-weight: normal;
61}
62
63.hljs-class .hljs-title,
64.haskell .hljs-type,
65.vhdl .hljs-literal,
66.tex .hljs-command {
67 color: #458;
68 font-weight: bold;
69}
70
71.hljs-tag,
72.hljs-tag .hljs-title,
73.hljs-rules .hljs-property,
74.django .hljs-tag .hljs-keyword {
75 color: #000080;
76 font-weight: normal;
77}
78
79.hljs-attribute,
80.hljs-variable,
81.lisp .hljs-body {
82 color: #008080;
83}
84
85.hljs-regexp {
86 color: #009926;
87}
88
89.hljs-symbol,
90.ruby .hljs-symbol .hljs-string,
91.lisp .hljs-keyword,
92.tex .hljs-special,
93.hljs-prompt {
94 color: #990073;
95}
96
97.hljs-built_in,
98.lisp .hljs-title,
99.clojure .hljs-built_in {
100 color: #0086b3;
101}
102
103.hljs-preprocessor,
104.hljs-pragma,
105.hljs-pi,
106.hljs-doctype,
107.hljs-shebang,
108.hljs-cdata {
109 color: #999;
110 font-weight: bold;
111}
112
113.hljs-deletion {
114 background: #fdd;
115}
116
117.hljs-addition {
118 background: #dfd;
119}
120
121.diff .hljs-change {
122 background: #0086b3;
123}
124
125.hljs-chunk {
126 color: #aaa;
127}
diff --git a/themes/default/highlightjs/styles/googlecode.css b/themes/default/highlightjs/styles/googlecode.css
new file mode 100644
index 00000000..fd237367
--- /dev/null
+++ b/themes/default/highlightjs/styles/googlecode.css
@@ -0,0 +1,148 @@
1/*
2
3Google Code style (c) Aahan Krish <geekpanth3r@gmail.com>
4
5*/
6
7.hljs {
8 display: block;
9 overflow-x: auto;
10 padding: 0.5em;
11 background: white;
12 color: black;
13}
14
15.hljs-comment,
16.hljs-template_comment,
17.hljs-javadoc {
18 color: #800;
19}
20
21.hljs-keyword,
22.method,
23.hljs-list .hljs-title,
24.clojure .hljs-built_in,
25.nginx .hljs-title,
26.hljs-tag .hljs-title,
27.setting .hljs-value,
28.hljs-winutils,
29.tex .hljs-command,
30.http .hljs-title,
31.hljs-request,
32.hljs-status {
33 color: #008;
34}
35
36.hljs-envvar,
37.tex .hljs-special {
38 color: #660;
39}
40
41.hljs-string,
42.hljs-tag .hljs-value,
43.hljs-cdata,
44.hljs-filter .hljs-argument,
45.hljs-attr_selector,
46.apache .hljs-cbracket,
47.hljs-date,
48.hljs-regexp,
49.coffeescript .hljs-attribute {
50 color: #080;
51}
52
53.hljs-sub .hljs-identifier,
54.hljs-pi,
55.hljs-tag,
56.hljs-tag .hljs-keyword,
57.hljs-decorator,
58.ini .hljs-title,
59.hljs-shebang,
60.hljs-prompt,
61.hljs-hexcolor,
62.hljs-rules .hljs-value,
63.hljs-literal,
64.hljs-symbol,
65.ruby .hljs-symbol .hljs-string,
66.hljs-number,
67.css .hljs-function,
68.clojure .hljs-attribute {
69 color: #066;
70}
71
72.hljs-class .hljs-title,
73.haskell .hljs-type,
74.smalltalk .hljs-class,
75.hljs-javadoctag,
76.hljs-yardoctag,
77.hljs-phpdoc,
78.hljs-typename,
79.hljs-tag .hljs-attribute,
80.hljs-doctype,
81.hljs-class .hljs-id,
82.hljs-built_in,
83.setting,
84.hljs-params,
85.hljs-variable,
86.clojure .hljs-title {
87 color: #606;
88}
89
90.css .hljs-tag,
91.hljs-rules .hljs-property,
92.hljs-pseudo,
93.hljs-subst {
94 color: #000;
95}
96
97.css .hljs-class,
98.css .hljs-id {
99 color: #9b703f;
100}
101
102.hljs-value .hljs-important {
103 color: #ff7700;
104 font-weight: bold;
105}
106
107.hljs-rules .hljs-keyword {
108 color: #c5af75;
109}
110
111.hljs-annotation,
112.apache .hljs-sqbracket,
113.nginx .hljs-built_in {
114 color: #9b859d;
115}
116
117.hljs-preprocessor,
118.hljs-preprocessor *,
119.hljs-pragma {
120 color: #444;
121}
122
123.tex .hljs-formula {
124 background-color: #eee;
125 font-style: italic;
126}
127
128.diff .hljs-header,
129.hljs-chunk {
130 color: #808080;
131 font-weight: bold;
132}
133
134.diff .hljs-change {
135 background-color: #bccff9;
136}
137
138.hljs-addition {
139 background-color: #baeeba;
140}
141
142.hljs-deletion {
143 background-color: #ffc8bd;
144}
145
146.hljs-comment .hljs-yardoctag {
147 font-weight: bold;
148}
diff --git a/themes/default/view.twig b/themes/default/view.twig
index 90b11839..dbbbde3c 100755
--- a/themes/default/view.twig
+++ b/themes/default/view.twig
@@ -1,6 +1,7 @@
1{% extends "layout.twig" %} 1{% extends "layout.twig" %}
2{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} 2{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
3{% block content %} 3{% block content %}
4 {% include '_highlight.twig' %}
4 {% include '_pocheit-form.twig' %} 5 {% include '_pocheit-form.twig' %}
5 <div id="article_toolbar"> 6 <div id="article_toolbar">
6 <ul> 7 <ul>
diff --git a/wallabag_compatibility_test.php b/wallabag_compatibility_test.php
index da078623..a1fcdc2a 100644
--- a/wallabag_compatibility_test.php
+++ b/wallabag_compatibility_test.php
@@ -22,6 +22,7 @@ $parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) ||
22$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); 22$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
23$filter_ok = extension_loaded('filter'); 23$filter_ok = extension_loaded('filter');
24$gettext_ok = function_exists("gettext"); 24$gettext_ok = function_exists("gettext");
25$gd_ok = extension_loaded('gd');
25 26
26if (extension_loaded('xmlreader')) { 27if (extension_loaded('xmlreader')) {
27 $xml_ok = true; 28 $xml_ok = true;
@@ -236,6 +237,11 @@ if (isset($_GET['from'])){
236 <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td> 237 <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td>
237 <td>Enabled</td> 238 <td>Enabled</td>
238 <?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td> 239 <?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
240 </tr>
241 <tr class="<?php echo ($gd_ok) ? 'enabled' : 'disabled'; ?>">
242 <td><a href="http://php.net/manual/en/book.image.php">GD</a></td>
243 <td>Enabled</td>
244 <?php echo ($gd_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
239 </tr> 245 </tr>
240 <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>"> 246 <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>">
241 <td><a href="http://php.net/tidy">Tidy</a></td> 247 <td><a href="http://php.net/tidy">Tidy</a></td>
@@ -275,7 +281,7 @@ if (isset($_GET['from'])){
275 <h3>What does this mean?</h3> 281 <h3>What does this mean?</h3>
276 <ol> 282 <ol>
277 <?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?> 283 <?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?>
278 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok && $gettext_ok && $parse_ini_ok): ?> 284 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $gd_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok && $gettext_ok && $parse_ini_ok): ?>
279 <li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li> 285 <li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li>
280 <?php else: ?> 286 <?php else: ?>
281 <?php if ($php_ok): ?> 287 <?php if ($php_ok): ?>
@@ -312,6 +318,12 @@ if (isset($_GET['from'])){
312 <li><strong>mbstring and iconv:</strong> <em>You do not have either of the extensions installed.</em> This will significantly impair your ability to read non-English feeds, as well as even some English ones.</li> 318 <li><strong>mbstring and iconv:</strong> <em>You do not have either of the extensions installed.</em> This will significantly impair your ability to read non-English feeds, as well as even some English ones.</li>
313 <?php endif; ?> 319 <?php endif; ?>
314 320
321 <?php if ($gd_ok): ?>
322 <li><strong>GD:</strong> You have <code>GD</code> support installed. <em>No problems here.</em></li>
323 <?php else: ?>
324 <li><strong>GD:</strong> The <code>GD</code> extension is not available. <?php echo $app_name; ?> will not be able to download pictures locally on your server.</li>
325 <?php endif; ?>
326
315 <?php if ($tidy_ok): ?> 327 <?php if ($tidy_ok): ?>
316 <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed. <em>No problems here.</em></li> 328 <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed. <em>No problems here.</em></li>
317 <?php else: ?> 329 <?php else: ?>