]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #802 from tcitworld/traductionfix
authorThomas Citharel <tcit@tcit.fr>
Sun, 28 Sep 2014 15:25:40 +0000 (17:25 +0200)
committerThomas Citharel <tcit@tcit.fr>
Sun, 28 Sep 2014 15:25:40 +0000 (17:25 +0200)
Traductionfix

33 files changed:
CONTRIBUTING.md
CREDITS.md
GUIDELINES.md [new file with mode: 0644]
check_essentials.php [new file with mode: 0644]
check_setup.php [changed mode: 0644->0755]
inc/3rdparty/libraries/readability/Readability.php [changed mode: 0644->0755]
inc/3rdparty/site_config/custom/blogs.faz.net.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/.about.com.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/dn.pt.txt [new file with mode: 0755]
inc/3rdparty/site_config/standard/faz.net.txt [changed mode: 0755->0644]
inc/3rdparty/site_config/standard/habrahabr.ru.txt [new file with mode: 0755]
inc/poche/Database.class.php
inc/poche/Poche.class.php
inc/poche/Routing.class.php [changed mode: 0644->0755]
inc/poche/Tools.class.php
inc/poche/config.inc.default.php
inc/poche/pochePictures.php
index.php
locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo [changed mode: 0755->0644]
locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po
themes/baggy/_pocheit-form.twig
themes/baggy/config.twig
themes/baggy/css/main.css
themes/baggy/view.twig
themes/default/_highlight.twig [new file with mode: 0755]
themes/default/config.twig
themes/default/css/style.css
themes/default/highlightjs/highlight.pack.js [new file with mode: 0644]
themes/default/highlightjs/styles/default.css [new file with mode: 0644]
themes/default/highlightjs/styles/github.css [new file with mode: 0644]
themes/default/highlightjs/styles/googlecode.css [new file with mode: 0644]
themes/default/view.twig
wallabag_compatibility_test.php

index 9ccb0b149d791a4c9745575e88ca8df7264ba637..58bc7134545a15b10f765e033320b83216c35c7d 100644 (file)
@@ -26,3 +26,5 @@ Note : If you have large portions of text, use [Github's Gist service](https://g
 
 ## You want to fix a bug or to add a feature
 Please fork wallabag and work with **the dev branch** only. **Do not work on master branch**.
+
+[Don't forget to read our guidelines](https://github.com/wallabag/wallabag/blob/dev/GUIDELINES.md).
\ No newline at end of file
index 7ec3cbb7a120a6bd719817a894cbd1b97b2fbd73..f1e9d7af4a13c1dd8aa1671ee1931fb4a7fb6951 100644 (file)
@@ -11,4 +11,6 @@ wallabag is based on :
 
 wallabag is mainly developed by Nicolas Lœuillet under the MIT License
 
+Thank you so much to @tcitworld and @mariroz.
+
 Contributors : 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 (file)
index 0000000..51e0de9
--- /dev/null
@@ -0,0 +1,53 @@
+# Guidelines for wallabag
+
+If 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).
+
+## Basic Coding Standard (PSR-1)
+
+This 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.
+
+* Files MUST use only `<?php` and `<?=` tags.
+
+* Files MUST use only UTF-8 without BOM for PHP code.
+
+* 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.
+
+* Namespaces and classes MUST follow [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md).
+
+* Class names MUST be declared in `StudlyCaps`.
+
+* Class constants MUST be declared in all upper case with underscore separators.
+
+* Method names MUST be declared in `camelCase`.
+
+You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-1/).
+
+## Coding Style Guide (PSR-2)
+
+This guide extends and expands on PSR-1, the basic coding standard.
+
+The 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.
+
+The 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.
+
+* Code MUST follow PSR-1.
+
+* Code MUST use 4 spaces for indenting, not tabs.
+
+* There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.
+
+* There MUST be one blank line after the `namespace` declaration, and there MUST be one blank line after the block of `use` declarations.
+
+* Opening braces for classes MUST go on the next line, and closing braces MUST go on the next line after the body.
+
+* Opening braces for methods MUST go on the next line, and closing braces MUST go on the next line after the body.
+
+* 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.
+
+* Control structure keywords MUST have one space after them; method and function calls MUST NOT.
+
+* Opening braces for control structures MUST go on the same line, and closing braces MUST go on the next line after the body.
+
+* Opening parentheses for control structures MUST NOT have a space after them, and closing parentheses for control structures MUST NOT have a space before.
+
+You 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 (file)
index 0000000..a47cd5a
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+// PHP 5.3 minimum
+if (version_compare(PHP_VERSION, '5.3.3', '<')) {
+    die('This software require PHP 5.3.3 minimum');
+}
+
+// Short tags must be enabled for PHP < 5.4
+if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+
+    if (! ini_get('short_open_tag')) {
+        die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"');
+    }
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index c86b17f..cf02c34
@@ -1,22 +1,8 @@
 <?php
-// PHP 5.3 minimum
-if (version_compare(PHP_VERSION, '5.3.3', '<')) {
-    die('This software require PHP 5.3.3 minimum');
-}
-
-// Short tags must be enabled for PHP < 5.4
-if (version_compare(PHP_VERSION, '5.4.0', '<')) {
-
-    if (! ini_get('short_open_tag')) {
-        die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"');
-    }
-}
 
-$writableFolders = array('cache', 'db', 'inc/3rdparty/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer');
-foreach ($writableFolders as $folder) {
-    if (! is_writable($folder)) {
-        die('The directory "' . $folder . '" must be writeable by your web server user');
-    }
+// Check if /cache is writeable
+if (! is_writable('cache')) {
+    die('The directory "cache" must be writeable by your web server user');
 }
 
 // install folder still present, need to install wallabag
old mode 100644 (file)
new mode 100755 (executable)
index d0f09d7..4fa3ba6
@@ -679,6 +679,7 @@ class Readability
                                } else {
                                        $topCandidate->innerHTML = $page->documentElement->innerHTML;
                                        $page->documentElement->innerHTML = '';
+                                       $this->reinitBody();
                                        $page->documentElement->appendChild($topCandidate);
                                }
                        } else {
@@ -794,8 +795,7 @@ class Readability
                {
                        // 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
                        // in the meantime, we check and create an empty element if it's not there.
-                       if (!isset($this->body->childNodes)) $this->body = $this->dom->createElement('body');
-                       $this->body->innerHTML = $this->bodyCache;
+                       $this->reinitBody();
                        
                        if ($this->flagIsActive(self::FLAG_STRIP_UNLIKELYS)) {
                                $this->removeFlag(self::FLAG_STRIP_UNLIKELYS);
@@ -1134,5 +1134,18 @@ class Readability
        public function removeFlag($flag) {
                $this->flags = $this->flags & ~$flag;
        }
+       
+       /**\r
+        * Will recreate previously deleted body property\r
+        *\r
+        * @return void\r
+        */\r
+       protected function reinitBody() {\r
+               if (!isset($this->body->childNodes)) {\r
+                       $this->body = $this->dom->createElement('body');
+                       $this->body->innerHTML = $this->bodyCache;\r
+               }\r
+       }
+               
 }
 ?>
\ 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 (file)
index 0000000..4f2626f
--- /dev/null
@@ -0,0 +1,45 @@
+# Author: zinnober
+
+tidy: no
+prune: no
+
+# Set author
+author: //a[@rel='author']
+
+# Set date
+date: //span[@class='Datum']
+
+# Content is here
+body: //div[@class='Artikel']
+
+# Tidy up before article
+strip: //div[@id='FAZHeaderNeu']
+strip: //h2[@itemprop='headline']
+strip: //span[@class='Datum']
+strip: //span[@class='Autor']
+strip_id_or_class: ArticlePagerTop
+strip: //div[@class='FAZArtikelEinleitung']/h2
+
+# General cleanup
+strip: //div[@class='clear']
+strip: //span[@class='Bildnachweis']
+strip: //iframe
+strip_id_or_class: Community
+strip: ' ·  '
+
+# Remove tracking and ads
+strip_image_src: /l.gif?
+strip: //img[@width='1']
+strip_id_or_class: invisible
+strip_id_or_class: Anzeige
+strip_id_or_class: billboard
+
+# Remove clutter after article
+strip_id_or_class: Tagline
+strip_id_or_class: ArtikelAbbinder
+strip_id_or_class: FAZArtikelKommentare
+strip_id_or_class: ArtikelKommentieren
+strip_id_or_class: FAZContentRight
+
+# Try it yourself
+test_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 (file)
index 0000000..e1ebaee
--- /dev/null
@@ -0,0 +1,14 @@
+body: //div[@id='articlebody']
+title: //h1
+author: //p[@id='by']//a
+
+next_page_link: //span[@class='next']/a
+# Not the same as below!
+
+prune: yes
+tidy: no
+
+# Annoying 'next' links plainly inside the article body
+strip: //*[text()[contains(.,'Next: ')]]
+
+test_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 (executable)
index 0000000..051b8cb
--- /dev/null
@@ -0,0 +1,9 @@
+single_page_link: concat('http://www.dn.pt/Common/print.aspx?content_id=', //input[@type='hidden' and @name='link-comments']/@value)
+#<input type="hidden" name="link-comments" class="link-comments" value="3972244">
+
+title: //h1
+author: //div[@class="Author"]
+
+strip: //div[@class="Patrocinio"]
+
+test_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
old mode 100755 (executable)
new mode 100644 (file)
index d087d2a..47048a1
+# Author: zinnober
+# Complete rewrite of the faz.net template as the standard one is broken
+# I tried to consider as many page variants as possible, which was some serious work
+
+tidy: no
+prune: no
+
 # Title
 title: //p[@class='Content HeadlineShort']
 
-# Authors
-# some are known and have a link, others don't
-author: substring-after(//span[@class='Autor'], 'Von')
+# Set author
+author: substring-after(//span[@class='Autor'], 'von ')
+author: //span[@class='caps last']/span[@class='caps last']
+author: //a[@rel='author']
 
-# Date
+# Set date
 date: //span[@class='Datum']
+date: //span[@class='Datum'],/span
+
+# Fetch full multipage articles
+next_page_link: //a[@title='Nächste Seite']
 
-# Body
+# Content is here
 body: //div[@class='Artikel']
 
-# Removements before body text
-strip: //div[@class='Breadcrumbs']
-strip: //div[@class='QuickSearchBox']
-strip: //div[@class='FAZArtikelEinleitung']
-strip: //div[@class='FAZArtikelReiter']
+# Tidy up before article
+strip: //div[@id='FAZHeaderNeu']
+strip: //h2[@itemprop='headline']
+strip: //span[@class='Datum']
+strip: //span[@class='Autor']
+strip_id_or_class: ArticlePagerTop
+
+# General cleanup
 strip: //div[@class='clear']
+strip: //a[@title='Zur Homepage FAZ.NET']
+strip: //iframe
+replace_string( ·  ):
+
+# Remove tracking and ads
+strip_image_src: /l.gif?
+strip: //div[contains(@style, 'background-image')]
+strip: //img[@width='1']
+strip_id_or_class: invisible
+strip_id_or_class: Anzeige
+strip_id_or_class: billboard
+
+# Remove various text boxes and social media foo
+strip_id_or_class: WeitereBeitraege
+strip_id_or_class: WBListe
+strip_id_or_class: AutorenModul
+strip_id_or_class: Community
+strip_id_or_class: SocialMediaStatus
+strip_id_or_class: RelatedLinkBox
+strip_id_or_class: MultimediaNavigation
+strip_id_or_class: IndexTitel
+
+# Fix picture caps and pictures (use better resolution and remove clutter)
+strip_id_or_class: LightBoxOverlay
+strip_id_or_class: exitLarge
+strip_id_or_class: PagerBox
+strip_id_or_class: Bildnachweis
+strip_id_or_class: Bildueberschrift
+strip_id_or_class: Bildbeschreibung
+strip_id_or_class: ArtikelBild610
+strip_id_or_class: MediaLink
+strip_id_or_class: FotoBoxInnerLeft
+strip_id_or_class: BilderRelatedLinks
+
+# Remove clutter after article
+strip_id_or_class: ArticlePagerBottom
+strip_id_or_class: backToHome
+strip_id_or_class: ArtikelAbbinder
+strip_id_or_class: lesermeinungscontainer
+strip_id_or_class: ThemenLinks
+strip_id_or_class: rechtehinweis
+strip_id_or_class: FAZArtikelMap
+strip_id_or_class: FAZArtikelKommentare
+strip_id_or_class: ArtikelKommentieren
+strip_id_or_class: FAZArtikelFunktionen
+strip_id_or_class: mailLB
+strip_id_or_class: FAZContentRight
+strip_id_or_class: stageModule
+strip_id_or_class: ContentFooter
+strip_id_or_class: ServicesFooter
+strip_id_or_class: FAZFooter
+
+# Clean up stuff present just in some articles
+strip_id_or_class: Teaser620
+strip_id_or_class: TeaserMultimedia
+strip_id_or_class: VideoBox
+
+# Remove as soon as Wallabag maight be able to embed flash video
+strip_id_or_class: mmoObjectAsTeaserInArticle
+strip_id_or_class: additionalStylesAudioVideo
+strip_id_or_class: hideMMElements
+
+# Try it yourself
+test_url: http://www.faz.net/aktuell/feuilleton/zum-tod-von-margaret-thatcher-die-reizfigur-12141919.html#Drucken
+test_url: http://www.faz.net/aktuell/politik/inland/allensbach-analyse-im-namen-des-volkes-13106492.html
+test_url: http://www.faz.net/aktuell/feuilleton/kino/video-filmkritiken/video-filmkritik-when-animals-dream-zerrissene-jugend-13105772.html
 
-# General removements
-strip: //span[@class='Bildnachweis']
-strip: //img[@class='MediaIcon']
-strip: //div[@class='ArtikelMediaLink']
-dissolve: //a[img]
-
-# Removements after body text
-strip: //div[@class='ArtikelAbbinder']
-strip: //div[@class='ArtikelKommentieren Artikelfuss GETS;tk;boxen.top-lesermeinungen;tp;content']
-strip: //div[@class='FAZArtikelKommentare FAZArtikelContent']
-strip: //div[@class='FAZArtikelFunktionen']
-strip: //div[@id='FAZContentRight']
-
-# Fix picture captions
-wrap_in(small): //span[@class='Bildunterschrift']/text()
-test_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 (executable)
index 0000000..6753835
--- /dev/null
@@ -0,0 +1,21 @@
+title: //span[@class="post_title"]
+author: //div[@class="author"]
+date: //div[@class="published
+
+body: //div[@class='content html_format'] | //div[@id='comments']
+
+strip: //a[@class="link_to_comment"]
+strip: //div[@class="show_tree"]
+strip: //a[@class="to_parent"]
+
+
+replace_string(class="reply_comments"): style="padding-left: 20px"
+replace_string(class="voting   "): style="float: right"
+replace_string(src="//habrastorage.org/getpro/habr/avatars/): style="width:24px; height:24px;" class="123" src="//habrastorage.org/getpro/habr/avatars/
+replace_string(class="info  "): style="padding-top:5px;font-size:0.85em;line-height:24px;"
+
+
+prune: no
+tidy: no
+
+test_url: http://habrahabr.ru/post/229883/
\ No newline at end of file
index 2c80b64b5dff24687777be87754134057be01091..dfd7ae349052964680d90a680d8e0413b893ef59 100755 (executable)
@@ -23,6 +23,10 @@ class Database {
     {
         switch (STORAGE) {
             case 'sqlite':
+                // Check if /db is writeable
+                if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {\r
+                       die('An error occured: "db" directory must be writeable for your web server user!');
+                }
                 $db_path = 'sqlite:' . STORAGE_SQLITE;
                 $this->handle = new PDO($db_path);
                 break;
index a49413f23816837688ee5b279278a2a9c5bc3d2e..c80e5d2a972e13bb6e7856fd4367395138d0a01b 100755 (executable)
@@ -524,6 +524,14 @@ class Poche
                 $longlastingsession = isset($_POST['longlastingsession']);
                 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login);
                 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user)));
+
+                # reload l10n
+                $language = $user['config']['language'];
+                @putenv('LC_ALL=' . $language);
+                setlocale(LC_ALL, $language);
+                bindtextdomain($language, LOCALE);
+                textdomain($language);
+
                 $this->messages->add('s', _('welcome to your wallabag'));
                 Tools::logm('login successful');
                 Tools::redirect($referer);
@@ -551,42 +559,39 @@ class Poche
      * import datas into your wallabag
      * @return boolean
      */
-    public function import()
-    {
-        if (isset($_FILES['file'])) {
-            Tools::logm('Import stated: parsing file');
-
-            // assume, that file is in json format
-
-            $str_data = file_get_contents($_FILES['file']['tmp_name']);
-            $data = json_decode($str_data, true);
-            if ($data === null) {
-
-                // not json - assume html
-
-                $html = new simple_html_dom();
-                $html->load_file($_FILES['file']['tmp_name']);
-                $data = array();
-                $read = 0;
-                foreach(array('ol','ul') as $list) {
-                    foreach($html->find($list) as $ul) {
-                        foreach($ul->find('li') as $li) {
-                            $tmpEntry = array();
-                            $a = $li->find('a');
-                            $tmpEntry['url'] = $a[0]->href;
-                            $tmpEntry['tags'] = $a[0]->tags;
-                            $tmpEntry['is_read'] = $read;
-                            if ($tmpEntry['url']) {
-                                $data[] = $tmpEntry;
-                            }
-                        }
-
-                        // the second <ol/ul> is for read links
 
-                        $read = ((sizeof($data) && $read) ? 0 : 1);
-                    }
-                }
+    public function import() {
+
+      if ( isset($_FILES['file']) && $_FILES['file']['tmp_name'] ) {
+        Tools::logm('Import stated: parsing file');
+
+        // assume, that file is in json format
+        $str_data = file_get_contents($_FILES['file']['tmp_name']);
+        $data = json_decode($str_data, true);
+
+        if ( $data === null ) {
+          //not json - assume html
+          $html = new simple_html_dom();
+          $html->load_file($_FILES['file']['tmp_name']);
+          $data = array();
+          $read = 0;
+          foreach (array('ol','ul') as $list) {
+            foreach ($html->find($list) as $ul) {
+              foreach ($ul->find('li') as $li) {
+                $tmpEntry = array();
+                  $a = $li->find('a');
+                  $tmpEntry['url'] = $a[0]->href;
+                  $tmpEntry['tags'] = $a[0]->tags;
+                  $tmpEntry['is_read'] = $read;
+                  if ($tmpEntry['url']) {
+                    $data[] = $tmpEntry;
+                  }
+              }
+              # the second <ol/ul> is for read links
+              $read = ((sizeof($data) && $read)?0:1);
             }
+          }
+       }
 
             // for readability structure
 
@@ -629,9 +634,11 @@ class Poche
                 $this->messages->add('s', _('Articles inserted: ') . $i . _('. Please note, that some may be marked as "read".'));
             }
 
-            Tools::logm('Import of articles finished: ' . $i . ' articles added (w/o content if not provided).');
-        }
-
+        Tools::logm('Import of articles finished: '.$i.' articles added (w/o content if not provided).');
+      }
+      else {
+        $this->messages->add('s', _('Did you forget to select a file?'));
+      }
         // file parsing finished here
         // now download article contents if any
         // check if we need to download any content
@@ -750,8 +757,8 @@ class Poche
             die(sprintf(_('User with this id (%d) does not exist.'), $user_id));
         }
 
-        if (!in_array($type, $allowed_types) || $token != $config['token']) {
-            die(_('Uh, there is a problem while generating feeds.'));
+        if (!in_array($type, $allowed_types) || !isset($config['token']) || $token != $config['token']) {
+            die(_('Uh, there is a problem while generating feed. Wrong token used?'));
         }
 
         $feed = new FeedWriter(RSS2);
old mode 100644 (file)
new mode 100755 (executable)
index 2db57d1..0b37305
@@ -98,49 +98,50 @@ class Routing
     private function _launchAction()
     {
         if (isset($_GET['login'])) {
-            // hello you
-            $this->wallabag->login($this->referer);
-        } elseif (isset($_GET['logout'])) {
-            // see you soon !
-            $this->wallabag->logout();
-        } elseif (isset($_GET['config'])) {
-            // update password
-            $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']);
-        } elseif (isset($_GET['newuser'])) {
-            $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']);
-        } elseif (isset($_GET['deluser'])) {
-            $this->wallabag->deleteUser($_POST['password4deletinguser']);
-        } elseif (isset($_GET['epub'])) {
-            $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['value']);
-            $epub->run();
-        } elseif (isset($_GET['import'])) {
-            $import = $this->wallabag->import();
-            $tplVars = array_merge($this->vars, $import);
-        } elseif (isset($_GET['download'])) {
-            Tools::downloadDb();
-        } elseif (isset($_GET['empty-cache'])) {
-            Tools::emptyCache();
-        } elseif (isset($_GET['export'])) {
-            $this->wallabag->export();
-        } elseif (isset($_GET['updatetheme'])) {
-            $this->wallabag->tpl->updateTheme($_POST['theme']);
-        } elseif (isset($_GET['updatelanguage'])) {
-            $this->wallabag->language->updateLanguage($_POST['language']);
-        } elseif (isset($_GET['uploadfile'])) {
-            $this->wallabag->uploadFile();
-        } elseif (isset($_GET['feed'])) {
-            if (isset($_GET['action']) && $_GET['action'] == 'generate') {
+               // hello to you
+               $this->wallabag->login($this->referer);
+        } elseif (isset($_GET['feed']) && isset($_GET['user_id'])) {
+            $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
+            $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']);
+        }
+        
+        //allowed ONLY to logged in user
+        if (\Session::isLogged() === true) 
+        {
+            if (isset($_GET['logout'])) {
+                // see you soon !
+                $this->wallabag->logout();
+            } elseif (isset($_GET['config'])) {
+                // update password
+                $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']);
+            } elseif (isset($_GET['newuser'])) {
+                $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']);
+            } elseif (isset($_GET['deluser'])) {
+                $this->wallabag->deleteUser($_POST['password4deletinguser']);
+            } elseif (isset($_GET['epub'])) {
+                $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['id'], $_GET['value']);
+                $epub->run();
+            } elseif (isset($_GET['import'])) {
+                $import = $this->wallabag->import();
+                $tplVars = array_merge($this->vars, $import);
+            } elseif (isset($_GET['empty-cache'])) {
+                Tools::emptyCache();
+            } elseif (isset($_GET['export'])) {
+                $this->wallabag->export();
+            } elseif (isset($_GET['updatetheme'])) {
+                $this->wallabag->tpl->updateTheme($_POST['theme']);
+            } elseif (isset($_GET['updatelanguage'])) {
+                $this->wallabag->language->updateLanguage($_POST['language']);
+            } elseif (isset($_GET['uploadfile'])) {
+                $this->wallabag->uploadFile();
+            } elseif (isset($_GET['feed']) && isset($_GET['action']) && $_GET['action'] == 'generate') {
                 $this->wallabag->updateToken();
             }
-            else {
-                $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
-                $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']);
+            elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
+                $plainUrl = new Url(base64_encode($_GET['plainurl']));
+                $this->wallabag->action('add', $plainUrl);
             }
         }
-        elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
-            $plainUrl = new Url(base64_encode($_GET['plainurl']));
-            $this->wallabag->action('add', $plainUrl);
-        }
     }
 
     public function _render($file, $vars)
index 63137d765542a8724991c68b3314ceba8f574d0b..93ec3fc6a877bf93f00e7c0dfadfd2cdf2b412d8 100755 (executable)
@@ -54,6 +54,10 @@ final class Tools
             || ($https && $_SERVER["SERVER_PORT"] == '443')
             || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
             ? '' : ':' . $_SERVER["SERVER_PORT"]);
+        
+        if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) {
+            $serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"];
+        }
 
         $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
 
@@ -294,21 +298,6 @@ final class Tools
         }
     }
 
-    /**
-     * Download the sqlite database
-     */
-    public static function downloadDb()
-    {
-        header('Content-Disposition: attachment; filename="poche.sqlite.gz"');
-        self::_status(200);
-
-        header('Content-Transfer-Encoding: binary');
-        header('Content-Type: application/octet-stream');
-        echo gzencode(file_get_contents(STORAGE_SQLITE));
-
-        exit;
-    }
-
     /**
      * Get the content for a given URL (by a call to FullTextFeed)
      *
index 6f03af188dd2ea2d4aac53296c9d77a278f10a42..2a458544f0fd49b09a4b4f4bb873486db5e3216b 100755 (executable)
@@ -59,7 +59,7 @@
 @define ('LOCALE', ROOT . '/locale');
 @define ('CACHE', ROOT . '/cache');
 
-@define ('PAGINATION', '10');
+@define ('PAGINATION', '12');
 
 //limit for download of articles during import
 @define ('IMPORT_LIMIT', 5);
index 7a914f90f8b1a28781c6e8dba84ae24a7d527571..52394c703b1130fb73bbd9aa8807f17b89a574a0 100644 (file)
@@ -33,7 +33,7 @@ final class Picture
                 }
 
                 if (self::_downloadPictures($absolute_path, $fullpath) === true) {
-                    $content = str_replace($matches[$i][2], $fullpath, $content);
+                    $content = str_replace($matches[$i][2], Tools::getPocheUrl() . $fullpath, $content);
                 }
 
                 $processing_pictures[] = $absolute_path;
index a26f458ae4a17837bd82746fe2ac85e20d53be5e..39990d55a7c59292f1a7ba78caa5dcbc146189e3 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -9,6 +9,7 @@
  */
 
 define ('POCHE', '1.8.0');
+require 'check_essentials.php';
 require 'check_setup.php';
 require_once 'inc/poche/global.inc.php';
 
old mode 100755 (executable)
new mode 100644 (file)
index b363385..297516c
Binary files a/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo and b/locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo differ
index 1764bd612e6b94add8b389fbaf9fab7b682f7689..e39156e618d05503c94f397768a953dded6e5701 100755 (executable)
@@ -1,58 +1,40 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: wballabag\n"
+"Project-Id-Version: wallabag\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-02-24 15:19+0300\n"
-"PO-Revision-Date: 2014-02-24 15:29+0300\n"
-"Last-Translator: Maryana <mariroz@mr.lviv.ua>\n"
+"POT-Creation-Date: 2014-02-25 15:17+0300\n"
+"PO-Revision-Date: \n"
+"Last-Translator: skibbipl <skibbipl@users.noreply.github.com>\n"
 "Language-Team: \n"
-"Language: \n"
+"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
+"X-Generator: Poedit 1.6.6\n"
 "X-Poedit-Basepath: .\n"
-"X-Poedit-Language: Polish\n"
-"X-Poedit-Country: POLAND\n"
-"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-SearchPath-0: /home/mariroz/_DEV/web/wallabag/wallabag-master-testing\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-SearchPath-0: /home/mariroz/_DEV/web/wallabag/wallabag-master-"
+"testing\n"
 
-msgid "poche, a read it later open source system"
-msgstr "poche, serwis odrocznego czytania open source"
+msgid "wallabag, a read it later open source system"
+msgstr "wallabag, open source'owy system typu \"przeczytaj to później\""
 
 msgid "login failed: user doesn't exist"
-msgstr "logowanie nie udało się: użytkownik nie istnieje"
+msgstr "logowanie się nie powiodło: użytkownik nie istnieje"
 
-msgid "home"
-msgstr "strona domowa"
-
-msgid "favorites"
-msgstr "ulubione"
-
-msgid "archive"
-msgstr "archiwum"
-
-msgid "tags"
-msgstr "tagi"
+msgid "return home"
+msgstr "powrót do strony domowej"
 
 msgid "config"
-msgstr "ustawienia"
-
-msgid "logout"
-msgstr "wyloguj"
-
-msgid "back to home"
-msgstr "wróć do strony domowej"
+msgstr "konfiguracja"
 
-msgid "Tags"
-msgstr "Tagi"
-
-#, fuzzy
-msgid "Poching a link"
-msgstr "Zapisywanie linków"
+msgid "Saving articles"
+msgstr "Zapisywanie artykułów"
 
-msgid "You can poche a link by several methods:"
-msgstr "Istnieje kilka sposobów aby zapisać link:"
+msgid "There are several ways to save an article:"
+msgstr "Istnieje kilka sposobów aby zapisać artykuł:"
 
 msgid "read the documentation"
 msgstr "przeczytaj dokumentację"
@@ -60,54 +42,98 @@ msgstr "przeczytaj dokumentację"
 msgid "download the extension"
 msgstr "pobierz rozszerzenie"
 
+msgid "via F-Droid"
+msgstr "przez F-Droid"
+
+msgid " or "
+msgstr "albo "
+
+msgid "via Google Play"
+msgstr "przez Google Play"
+
 msgid "download the application"
 msgstr "pobierz aplikację"
 
-#, fuzzy
-msgid "by filling this field"
+msgid "By filling this field"
 msgstr "Poprzez wypełnienie tego pola"
 
-msgid "poche it!"
+msgid "bag it!"
 msgstr "zapisz!"
 
-#, fuzzy
-msgid "bookmarklet: drag & drop this link to your bookmarks bar"
-msgstr "Bookmarklet: przeciągnij i upucs ten link na pasek zakladek"
+msgid "Bookmarklet: drag & drop this link to your bookmarks bar"
+msgstr "Skryptozakładka: przeciągnij i upuść ten link na twój pasek zakładek"
 
-msgid "Updating poche"
-msgstr "Aktualizacja poche"
+msgid "Upgrading wallabag"
+msgstr "Aktualizacja wallabag"
 
-msgid "your version"
-msgstr "twoja wersja"
+msgid "Installed version"
+msgstr "Zainstalowana wersja"
 
-#, fuzzy
-msgid "latest stable version"
+msgid "Latest stable version"
 msgstr "Najnowsza stabilna wersja"
 
-#, fuzzy
-msgid "a more recent stable version is available."
+msgid "A more recent stable version is available."
 msgstr "Nowsza stabilna wersja jest dostępna."
 
-msgid "you are up to date."
-msgstr "brak nowych aktualizacji."
+msgid "You are up to date."
+msgstr "Posiadasz najnowszą wersję."
 
-msgid "latest dev version"
-msgstr "najnowsza wersja rozwojowa"
+msgid "Latest dev version"
+msgstr "Najnowsza wersja developerska"
 
-msgid "a more recent development version is available."
-msgstr "Nowsza wersja rozwojowa jest dostępna."
+msgid "A more recent development version is available."
+msgstr "Nowsza developerska wersja jest dostępna."
+
+msgid "Feeds"
+msgstr "Kanały"
+
+msgid ""
+"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>."
+msgstr ""
+"Twój token kanału jest aktualnie pusty i musi zostać wygenerowany, aby "
+"włączyć kanały. Kliknij <a href='?feed&amp;action=generate'>tutaj, aby go "
+"wygenerować</a>."
+
+msgid "Unread feed"
+msgstr "Nieprzeczytane kanały"
+
+msgid "Favorites feed"
+msgstr "Ulubione kanały"
+
+msgid "Archive feed"
+msgstr "Kanały archiwum"
+
+msgid "Your token:"
+msgstr "Twój token:"
+
+msgid "Your user id:"
+msgstr "Twój id użytkownika:"
+
+msgid ""
+"You can regenerate your token: <a href='?feed&amp;action=generate'>generate!"
+"</a>."
+msgstr ""
+"Możesz wygenewrować ponownie swój token: <a href='?feed&amp;"
+"action=generate'>generuj!</a>."
 
 msgid "Change your theme"
-msgstr "Zmień motyw"
+msgstr "Zmień swój motyw"
 
 msgid "Theme:"
 msgstr "Motyw:"
 
 msgid "Update"
-msgstr "Aktualizacja"
+msgstr "Aktualizuj"
+
+msgid "Change your language"
+msgstr "Zmień język"
+
+msgid "Language:"
+msgstr "Język:"
 
 msgid "Change your password"
-msgstr "Zmień hasło"
+msgstr "Zmień swoje hasło"
 
 msgid "New password:"
 msgstr "Nowe hasło:"
@@ -116,91 +142,104 @@ msgid "Password"
 msgstr "Hasło"
 
 msgid "Repeat your new password:"
-msgstr "Powtórz hasło jeszcze raz:"
+msgstr "Powtórz twoje nowe hasło:"
 
 msgid "Import"
 msgstr "Import"
 
-msgid "Please execute the import script locally, it can take a very long time."
-msgstr "Proszę wykonać skrypt importu lokalnie, ponieważ moze to trwać bardzo długo."
+msgid ""
+"Please execute the import script locally as it can take a very long time."
+msgstr ""
+"Proszę wykonaj skrypt importu lokalnie, ponieważ może to trwać bardzo długo."
 
-msgid "More infos in the official doc:"
-msgstr "Więcej informacji znajduje się w oficjalnej dokumentacji:"
+msgid "More info in the official documentation:"
+msgstr "Więcej informacji znajdziesz w oficjalnej dokumentacji:"
 
-msgid "import from Pocket"
-msgstr "Importuj z Pocket'a"
+msgid "Import from Pocket"
+msgstr "Importuj z Pocket"
 
 #, php-format
 msgid "(you must have a %s file on your server)"
-msgstr "(musisz mieć plik %s na serwerze)"
+msgstr "(musisz mieć plik %s na swoim serwerze)"
 
-msgid "import from Readability"
+msgid "Import from Readability"
 msgstr "Importuj z Readability"
 
-msgid "import from Instapaper"
+msgid "Import from Instapaper"
 msgstr "Importuj z Instapaper"
 
-#, fuzzy
-msgid "Export your poche datas"
-msgstr "Exportuj dane poche"
+msgid "Import from wallabag"
+msgstr "Importuj z wallabag"
+
+msgid "Export your wallabag data"
+msgstr "Wyeksportuj swoje dane wallabag"
 
 msgid "Click here"
 msgstr "Kliknij tu"
 
-#, fuzzy
-msgid "to export your poche datas."
-msgstr "aby wyeksportować dane poche."
+msgid "to download your database."
+msgstr "aby pobrać twoją bazę danych."
 
-msgid "plop"
-msgstr "plop"
+msgid "to export your wallabag data."
+msgstr "aby wyeksportować dane wallabag."
 
-msgid "installation"
-msgstr "instalacja"
+msgid "Cache"
+msgstr "Cache"
 
-msgid "install your wallabag"
-msgstr "zainstaluj wallabag"
+msgid "to delete cache."
+msgstr "aby wyczyścić cache."
 
-msgid "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>."
-msgstr "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>."
+msgid "You can enter multiple tags, separated by commas."
+msgstr "Możesz wprowadzić wiele tagów, oddzielonych przecinkami."
 
-msgid "Login"
-msgstr "Login"
+msgid "return to article"
+msgstr "powrót do artykułu"
 
-msgid "Repeat your password"
-msgstr "Powtórz hasło"
+msgid "plop"
+msgstr "plop"
 
-msgid "Install"
-msgstr "Instaluj"
+msgid ""
+"You can <a href='wallabag_compatibility_test.php'>check your configuration "
+"here</a>."
+msgstr ""
+"Możesz <a href='wallabag_compatibility_test.php'>sprawdzić swoją "
+"konfigurację tutaj</a>."
 
 msgid "favoris"
-msgstr "ulubione"
+msgstr "favoris"
+
+msgid "archive"
+msgstr "archiwum"
 
 msgid "unread"
 msgstr "nieprzeczytane"
 
 msgid "by date asc"
-msgstr "według daty rosnąco"
+msgstr "po dacie rosnąco"
 
 msgid "by date"
-msgstr "wg daty"
+msgstr "po dacie"
 
 msgid "by date desc"
-msgstr "według daty malejąco"
+msgstr "po dacie malejąco"
 
 msgid "by title asc"
-msgstr "według tytułu rosnąco"
+msgstr "po tytule rosnąco"
 
 msgid "by title"
-msgstr "wg tytułu"
+msgstr "po tytule"
 
 msgid "by title desc"
-msgstr "według tytułu malejąco"
+msgstr "po tytule malejąco"
 
-msgid "No link available here!"
-msgstr "Brak dostępnych linków!"
+msgid "Tag"
+msgstr "Otaguj"
 
-msgid "toggle mark as read"
-msgstr "przełącz jako przeczytane"
+msgid "No articles found."
+msgstr "Nie znaleziono artykułów."
+
+msgid "Toggle mark as read"
+msgstr "Przełącz jako przeczytane"
 
 msgid "toggle favorite"
 msgstr "przełącz ulubione"
@@ -212,139 +251,91 @@ msgid "original"
 msgstr "oryginał"
 
 msgid "estimated reading time:"
-msgstr "szacowany czas odczytu:"
-
-msgid "results"
-msgstr "wyniki"
-
-msgid "login to your wallabag"
-msgstr "zaloguj się do swojego wallabag"
-
-msgid "you are in demo mode, some features may be disabled."
-msgstr "jesteś w trybie demo, niektóre funkcje mogą być wyłączone."
-
-msgid "Stay signed in"
-msgstr "Pozostań zalogowany"
-
-msgid "(Do not check on public computers)"
-msgstr "(Nie sprawdzaj na publicznych komputerach)"
-
-msgid "Saving articles"
-msgstr "Zapisywanie artykułów"
-
-msgid "There are several ways to save an article:"
-msgstr "Istnieje kilka sposobów aby zapisać artykuł:"
-
-msgid "via F-Droid"
-msgstr "przez F-Droid"
-
-msgid " or "
-msgstr "albo"
-
-msgid "via Google Play"
-msgstr "przez Google Play"
-
-msgid "By filling this field"
-msgstr "Poprzez wypełnienie tego pola"
-
-msgid "bag it!"
-msgstr "zapisz!"
-
-msgid "Bookmarklet: drag & drop this link to your bookmarks bar"
-msgstr "Bookmarklet: przeciągnij i upuść ten link na pasek zakladek"
-
-msgid "Upgrading wallabag"
-msgstr "Aktualizacja wallabag"
-
-msgid "Installed version"
-msgstr "Zainstalowana wersja "
+msgstr "szacowany czas czytania:"
 
-msgid "Latest stable version"
-msgstr "Najnowsza stabilna wersja"
-
-msgid "A more recent stable version is available."
-msgstr "Nowsza stabilna wersja jest dostępna."
-
-msgid "You are up to date."
-msgstr "Brak nowych aktualizacji."
+msgid "mark all the entries as read"
+msgstr "zaznacz wszystkie wpisy jako przeczytane"
 
-msgid "Latest dev version"
-msgstr "Najnowsza wersja rozwojowa"
+msgid "results"
+msgstr "rezultaty"
 
-#, fuzzy
-msgid "A more recent development version is available."
-msgstr "Nowsza wersja rozwojowa jest dostępna."
+msgid "installation"
+msgstr "instalacja"
 
-msgid "Feeds"
-msgstr "Kanały (feeds)"
+msgid "install your wallabag"
+msgstr "zainstauj wallabag"
 
-msgid "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>."
-msgstr "Twój token kanału jest pusty i musi najpierw zostać wygenerowany. Kliknij <a href='?feed&action=generate'>tu aby go wygenerować</a>."
+msgid ""
+"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>."
+msgstr ""
+"wallabag wciąż nie jest zainstalowany. Proszę wypełnij poniższy formularz "
+"aby go zainstalować. Nie wahaj się <a href='http://doc.wallabag."
+"org/'>przeczytać dokumentacji na stronie wallabag</a>."
 
-msgid "Unread feed"
-msgstr "Kanał nieprzeczytanych"
+msgid "Login"
+msgstr "Login"
 
-msgid "Favorites feed"
-msgstr "Kanał ulubionych"
+msgid "Repeat your password"
+msgstr "Powtórz swoje hasło"
 
-msgid "Archive feed"
-msgstr "Kanał archiwum"
+msgid "Install"
+msgstr "Zainstauj"
 
-msgid "Your token:"
-msgstr "Twój token: "
+msgid "login to your wallabag"
+msgstr "zaloguj się do twojego wallabag"
 
-msgid "Your user id:"
-msgstr "Twój identyfikator użytkownika:"
+msgid "Login to wallabag"
+msgstr "Logowanie do wallabag"
 
-msgid "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>."
-msgstr "Możesz wygenerować token ponownie: kliknij <a href='?feed&amp;action=generate'>generuj!</a>."
+msgid "you are in demo mode, some features may be disabled."
+msgstr "jesteś w trybie demo, niektóre funkcjonalności mogą być wyłączone."
 
-msgid "Change your language"
-msgstr "Zmień język"
+msgid "Username"
+msgstr "Nazwa użytkownika"
 
-msgid "Language:"
-msgstr "Język:"
+msgid "Stay signed in"
+msgstr "Pozostań zalogowany"
 
-msgid "Please execute the import script locally as it can take a very long time."
-msgstr "Proszę wykonać skrypt importu lokalnie, gdyż moze to trwać bardzo długo."
+msgid "(Do not check on public computers)"
+msgstr "(Nie zaznaczaj na komputerach z publicznym dostępem)"
 
-#, fuzzy
-msgid "More info in the official documentation:"
-msgstr "Więcej informacji znajduje się w oficjalnej dokumentacji:"
+msgid "Sign in"
+msgstr "Zaloguj się"
 
-msgid "Import from Pocket"
-msgstr "Іmport z Pocket'a"
+msgid "favorites"
+msgstr "ulubione"
 
-msgid "Import from Readability"
-msgstr "Import z Readability"
+msgid "estimated reading time :"
+msgstr "szacowany czas czytania :"
 
-msgid "Import from Instapaper"
-msgstr "Import z Instapaper"
+msgid "Mark all the entries as read"
+msgstr "Zaznacz wszystkie wpisy jako przeczytane"
 
-msgid "Import from wallabag"
-msgstr "Import z wallabag"
+msgid "Return home"
+msgstr "Powrót na stronę domową"
 
-msgid "Export your wallabag data"
-msgstr "Eksportowac dane wallabag"
+msgid "Back to top"
+msgstr "Powrót na górę"
 
-msgid "to download your database."
-msgstr "aby pobrac bazę danych."
+msgid "Mark as read"
+msgstr "Oznacz jako przeczytane"
 
-msgid "to export your wallabag data."
-msgstr "aby eksportować dane wallabag."
+msgid "Favorite"
+msgstr "Ulubione"
 
-msgid "Cache"
-msgstr "Cache"
+msgid "Toggle favorite"
+msgstr "Przełącz ulubione"
 
-msgid "to delete cache."
-msgstr "aby wyczyścić cache."
+msgid "Delete"
+msgstr "Usuń"
 
-msgid "tweet"
-msgstr "tweet"
+msgid "Tweet"
+msgstr "Tweet"
 
-#, fuzzy
-msgid "email"
-msgstr "Wyślij email"
+msgid "Email"
+msgstr "Email"
 
 msgid "shaarli"
 msgstr "shaarli"
@@ -352,163 +343,172 @@ msgstr "shaarli"
 msgid "flattr"
 msgstr "flattr"
 
-msgid "this article appears wrong?"
-msgstr "Czy ten artykuł wyświetla się nieprawidłowo?"
+msgid "Does this article appear wrong?"
+msgstr "Czy ten artykuł jest wyświetlany niepoprawnie?"
 
-msgid "You can enter multiple tags, separated by commas."
-msgstr "Możesz wprowadzić wiele tagów, rozdzielając je przecinkami."
+msgid "tags:"
+msgstr "tagi:"
 
-msgid "return to article"
-msgstr "wróć do artykułu"
+msgid "Edit tags"
+msgstr "Edytuj tagi"
+
+msgid "save link!"
+msgstr "zapisz link!"
+
+msgid "home"
+msgstr "strona domowa"
+
+msgid "tags"
+msgstr "tagi"
+
+msgid "logout"
+msgstr "wyloguj"
 
-#, fuzzy
 msgid "powered by"
-msgstr "zasilany przez"
+msgstr "w oparciu o"
 
 msgid "debug mode is on so cache is off."
-msgstr "tryb debugowania jest włączony, więc cashe jest wyłączony."
+msgstr "tryb debug jest włączony zatem cache jest wyłączony."
 
 msgid "your wallabag version:"
-msgstr "twoja wersja wallabag:"
+msgstr "wersja twojego wallabag:"
 
 msgid "storage:"
-msgstr "magazyn:"
+msgstr "storage:"
 
 msgid "save a link"
 msgstr "zapisz link"
 
-msgid "return home"
-msgstr "wróć do strony domowej"
-
-msgid "You can <a href='wallabag_compatibility_test.php'>check your configuration here</a>."
-msgstr "Możesz <a href='wallabag_compatibility_test.php'>sprawdzić swoją konfigurację tu</a>."
-
-msgid "Tag"
-msgstr "Tag"
+msgid "back to home"
+msgstr "powrót do strony domowej"
 
-msgid "No articles found."
-msgstr "Nie znaleziono artykułów."
+msgid "toggle mark as read"
+msgstr "przełącz jako przeczytane"
 
-msgid "Toggle mark as read"
-msgstr "Przełącz jako przeczytane"
+msgid "tweet"
+msgstr "tweet"
 
-msgid "mark all the entries as read"
-msgstr "zaznacz wszystko jako przeczytane"
+msgid "email"
+msgstr "email"
 
-msgid "Login to wallabag"
-msgstr "Zaloguj się do wallabag"
+msgid "this article appears wrong?"
+msgstr "ten artykuł wygląda niepoprawnie?"
 
-msgid "Username"
-msgstr "Nazwa użytkownika"
+msgid "No link available here!"
+msgstr "No link available here!"
 
-msgid "Sign in"
-msgstr "Login"
+#, fuzzy
+msgid "Poching a link"
+msgstr "Poching a link"
 
-msgid "Return home"
-msgstr "Wróć do strony domowej"
+msgid "by filling this field"
+msgstr "przez wypełnienie tego pola"
 
-msgid "Back to top"
-msgstr "Wróć na górę"
+msgid "bookmarklet: drag & drop this link to your bookmarks bar"
+msgstr "skryptozakładka: przeciągnij i upuść ten link na twój pasek zakładek"
 
-msgid "Mark as read"
-msgstr "Zaznacz jako przeczytane"
+msgid "your version"
+msgstr "twoja wersja"
 
-msgid "Favorite"
-msgstr "Ulubione"
+msgid "latest stable version"
+msgstr "najnowsza stabilna wersja"
 
-msgid "Toggle favorite"
-msgstr "Zaznacz jako ulubione"
+msgid "a more recent stable version is available."
+msgstr "nowsza wersja stabilna jest dostępna."
 
-msgid "Delete"
-msgstr "Usuń"
+msgid "you are up to date."
+msgstr "posiadasz najnowszą wersję."
 
-msgid "Tweet"
-msgstr "Tweet"
+msgid "latest dev version"
+msgstr "najnowsza wersja developerska"
 
-msgid "Email"
-msgstr "Wyślij email"
+msgid "a more recent development version is available."
+msgstr "nowsza wersja developerska jest dostępna."
 
-msgid "Does this article appear wrong?"
-msgstr "Czy ten artykuł wyświetla się nieprawidłowo?"
+msgid "Please execute the import script locally, it can take a very long time."
+msgstr ""
+"Please execute the import script locally, it can take a very long time."
 
-msgid "tags:"
-msgstr "tegi:"
+msgid "More infos in the official doc:"
+msgstr "More infos in the official doc:"
 
-msgid "Edit tags"
-msgstr "Edytuj tagi"
+msgid "import from Pocket"
+msgstr "import from Pocket"
 
-msgid "save link!"
-msgstr "zapisz link!"
+msgid "import from Readability"
+msgstr "import from Readability"
 
-#, fuzzy
-msgid "estimated reading time :"
-msgstr "szacowany czas odczytu:"
+msgid "import from Instapaper"
+msgstr "import from Instapaper"
 
-msgid "Mark all the entries as read"
-msgstr "Oznacz wszystko jako przeczytane"
+msgid "Tags"
+msgstr "Tagi"
 
 msgid "Untitled"
-msgstr "Bez nazwy"
+msgstr "Untitled"
 
 msgid "the link has been added successfully"
-msgstr "link został pomyślnie dodany"
+msgstr "link został dodany pomyślnie"
 
 msgid "error during insertion : the link wasn't added"
-msgstr "błąd podczas wprowadzania: link nie został dodany"
+msgstr "błąd podczas dodawania : link nie został dodany"
 
 msgid "the link has been deleted successfully"
-msgstr "link zostal pomyślnie usunięty"
+msgstr "link został usunięty pomyślnie"
 
 msgid "the link wasn't deleted"
 msgstr "link nie został usunięty"
 
 msgid "Article not found!"
-msgstr "Nie znaleziono artykułu."
+msgstr "Artykuł nie znaleziony!"
 
 msgid "previous"
-msgstr "poprzednia"
+msgstr "poprzedni"
 
 msgid "next"
-msgstr "następna"
+msgstr "następny"
 
 msgid "in demo mode, you can't update your password"
-msgstr "w trybie demo, nie można zmieniać hasła"
+msgstr "w trybie demo nie możesz zaktualizować swojego hasła"
 
 msgid "your password has been updated"
-msgstr "twoje hasło zostało zmienione"
+msgstr "twoje hasło zostało zaktualizowane"
 
-msgid "the two fields have to be filled & the password must be the same in the two fields"
-msgstr "oba pola muszą być wypełnione i hasła muszę być takie same w obu polach"
+msgid ""
+"the two fields have to be filled & the password must be the same in the two "
+"fields"
+msgstr ""
+"oba pola muszą być wypełnione oraz hasło musi być takie same w obu polach"
 
 msgid "still using the \""
-msgstr "nadal w użyciu  \""
+msgstr "wciąż używam \""
 
 msgid "that theme does not seem to be installed"
-msgstr "wydaje się że ten motyw nie jest zainstalowany"
+msgstr "ten motyw nie wygląda na zainstalowany"
 
 msgid "you have changed your theme preferences"
-msgstr "ustawienia motywu zostały zmienione"
+msgstr "zmieniłeś swoje preferencje motywu"
 
 msgid "that language does not seem to be installed"
-msgstr "wydaje się że ten język nie jest zainstalowany"
+msgstr "ten język nie wygląda na zainstalowany"
 
 msgid "you have changed your language preferences"
-msgstr "ustawienia języka zostały zmienione"
+msgstr "zmieniłeś swoje preferencje językowe"
 
 msgid "login failed: you have to fill all fields"
-msgstr "logowanie nie powiodlo się: musisz wypełnić wszystkie pola"
+msgstr "logowanie się nie powiodło: musisz wypełnić wszystkie pola"
 
 msgid "welcome to your wallabag"
-msgstr "Witamy w wallabag"
+msgstr "witaj w twoim wallabag"
 
 msgid "login failed: bad login or password"
-msgstr "logowanie nie powiodlo się: niepoprawny login lub hasło"
+msgstr "logowanie się nie powiodło: nieprawidłowy login lub hasło"
 
 msgid "import from instapaper completed"
-msgstr "import z instapaper'a zakończony"
+msgstr "import z instapaper zakończony"
 
 msgid "import from pocket completed"
-msgstr "import z pocket'a zakończony"
+msgstr "import z pocket zakończony"
 
 msgid "import from Readability completed. "
 msgstr "import z Readability zakończony. "
@@ -520,25 +520,34 @@ msgid "Unknown import provider."
 msgstr "Nieznany dostawca importu."
 
 msgid "Incomplete inc/poche/define.inc.php file, please define \""
-msgstr "Niekompletny plik inc/poche/define.inc.php, proszę zdefiniować \""
+msgstr "Niekompletny plik inc/poche/define.inc.php, proszę zdefiniuj \""
 
 msgid "Could not find required \""
-msgstr "Nie znaleziono potrzebnego \""
+msgstr "Nie znaleziono wymaganego \""
 
 msgid "Uh, there is a problem while generating feeds."
-msgstr "Uh, jest problem podczas generowania kanałów."
+msgstr "Ah, wystąpił problem podczas generowania kanałów."
 
 msgid "Cache deleted."
-msgstr "Cache wyczyszczony."
+msgstr "Cache usunięty."
 
 msgid "Oops, it seems you don't have PHP 5."
-msgstr "Oops, wygląda ze nie masz PHP 5."
+msgstr "Oops, wygląda na to że nie masz PHP 5."
+
+#~ msgid "poche it!"
+#~ msgstr "poche it!"
+
+#~ msgid "Updating poche"
+#~ msgstr "Updating poche"
+
+#~ msgid "create an issue"
+#~ msgstr "create an issue"
 
-#~ msgid "Import from poche"
-#~ msgstr "Import z poche"
+#~ msgid "or"
+#~ msgstr "or"
 
-#~ msgid "welcome to your poche"
-#~ msgstr "witamy w poche"
+#~ msgid "contact us by mail"
+#~ msgstr "contact us by mail"
 
-#~ msgid "see you soon!"
-#~ msgstr "do zobaczenia wkrótce!"
+#~ msgid "your poche version:"
+#~ msgstr "your poche version:"
index 505ec368e30754fe71858d8a8fdf0bb3161b56de..57a928c0b4c2a135b5bc0e716ecdc1dcb9501d89 100755 (executable)
@@ -4,7 +4,7 @@
         {% trans "Save a link" %}</h2>
         <input type="hidden" name="autoclose" value="1" />
         <input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
+        <span id="add-link-result"></span>
         <input type="submit" value="{% trans "save link!" %}" />
-        <div id="add-link-result"></div>
     </form>
 </div>
index 46735f0744d1e45816df071a4e5a92b9588eb739..7bd229cbe66c911e479fb6a8bfe52fb3d20c390b 100755 (executable)
                 <fieldset class="w500p">
                     <div class="row">
                         <label class="col w150p" for="file">{% trans "File:" %}</label>
-                        <input class="col" type="file" id="file" name="file" tabindex="4">
+                        <input class="col" type="file" id="file" name="file" tabindex="4" required="required">
                     </div>
                     <div class="row mts txtcenter">
                         <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button>
             <p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p>
             
             <h2>{% trans "Export your wallabag data" %}</h2>
-            {% if constant('STORAGE') == 'sqlite' %}
-            <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
             <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
             
             <h2>{% trans "Fancy an E-Book ?" %}</h2>
index 6d320cd2d657b6a108faa4a6213a5500fd97f37d..9c50786b7539db9ea26b06e8d5fe8a4c68515a8c 100755 (executable)
@@ -630,7 +630,7 @@ a.add-to-wallabag-link-after:after {
 
 #add-link-result {
   font-weight: bold;
-  margin-top: 10px;
+  font-size: 0.9em;
 }
 
 /* ==========================================================================
@@ -923,6 +923,13 @@ blockquote {
   text-decoration: underline;
 }
 
+pre code {
+               font-family: "Courier New", Courier, monospace;
+               border: 1px solid #ccc;
+               font-size: 0.96em;
+}
+
+
 /* ==========================================================================
    6 = Media Queries
    ========================================================================== */
@@ -1055,3 +1062,4 @@ blockquote {
     left: 0;
   }
 }
+
index 7b65340a9a36ac4645634be8d7a82f53fc67ee17..53a9ee69223cbf5fcd6602443b27b13276f26b48 100755 (executable)
@@ -4,6 +4,7 @@
 {% endblock %}
 {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
 {% block content %}
+                               {% include '_highlight.twig' %}
         <div id="article_toolbar">
             <ul class="links">
                 <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 (executable)
index 0000000..cdb7c6b
--- /dev/null
@@ -0,0 +1,4 @@
+ {# include excelent highlight.js library for code highligting, see http://highlightjs.org/ #}
+<link rel="stylesheet" href="{{ poche_url }}themes/default/highlightjs/styles/github.css">
+<script src="{{ poche_url }}themes/default/highlightjs/highlight.pack.js"></script>
+<script>hljs.initHighlightingOnLoad();</script>
index 160f6046a46426f5590603bfd2ddb0d5de1f42d3..5656fadd76ed7a96c4ed9770dcc992180cb3195a 100755 (executable)
                 <fieldset class="w500p">
                     <div class="row">
                         <label class="col w150p" for="file">{% trans "File:" %}</label>
-                        <input class="col" type="file" id="file" name="file" tabindex="4">
+                        <input class="col" type="file" id="file" name="file" tabindex="4" required="required">
                     </div>
                     <div class="row mts txtcenter">
                         <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button>
 
             <h2>{% trans "Export your wallabag data" %}</h2>
             {% if constant('STORAGE') == 'sqlite' %}
-            <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
             <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
 
             <h2>{% trans "Cache" %}</h2>
index e58ef81a1404ea4f6eaaad56b00f9ada036c89f3..e254d481b51b804340d32238be6266762e34ddb4 100755 (executable)
@@ -429,4 +429,10 @@ a.add-to-wallabag-link-after:after {
     text-indent: 0;
                color: black;
                width: 50px;
+}
+
+pre code {
+               font-family: "Courier New", Courier, monospace;
+               border: 1px solid #ddd;
+               font-size: 0.96em;
 }
\ 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 (file)
index 0000000..10a21c3
--- /dev/null
@@ -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 (file)
index 0000000..e5bd280
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+
+Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
+
+*/
+
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #f0f0f0;
+}
+
+.hljs,
+.hljs-subst,
+.hljs-tag .hljs-title,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title {
+  color: black;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-constant,
+.hljs-parent,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-preprocessor,
+.hljs-pragma,
+.haml .hljs-symbol,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-addition,
+.hljs-flow,
+.hljs-stream,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.tex .hljs-special,
+.erlang_repl .hljs-function_or_atom,
+.asciidoc .hljs-header,
+.markdown .hljs-header,
+.coffeescript .hljs-attribute {
+  color: #800;
+}
+
+.smartquote,
+.hljs-comment,
+.hljs-annotation,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-chunk,
+.asciidoc .hljs-blockquote,
+.markdown .hljs-blockquote {
+  color: #888;
+}
+
+.hljs-number,
+.hljs-date,
+.hljs-regexp,
+.hljs-literal,
+.hljs-hexcolor,
+.smalltalk .hljs-symbol,
+.smalltalk .hljs-char,
+.go .hljs-constant,
+.hljs-change,
+.lasso .hljs-variable,
+.makefile .hljs-variable,
+.asciidoc .hljs-bullet,
+.markdown .hljs-bullet,
+.asciidoc .hljs-link_url,
+.markdown .hljs-link_url {
+  color: #080;
+}
+
+.hljs-label,
+.hljs-javadoc,
+.ruby .hljs-string,
+.hljs-decorator,
+.hljs-filter .hljs-argument,
+.hljs-localvars,
+.hljs-array,
+.hljs-attr_selector,
+.hljs-important,
+.hljs-pseudo,
+.hljs-pi,
+.haml .hljs-bullet,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-envvar,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in,
+.tex .hljs-formula,
+.erlang_repl .hljs-reserved,
+.hljs-prompt,
+.asciidoc .hljs-link_label,
+.markdown .hljs-link_label,
+.vhdl .hljs-attribute,
+.clojure .hljs-attribute,
+.asciidoc .hljs-attribute,
+.lasso .hljs-attribute,
+.coffeescript .hljs-property,
+.hljs-phony {
+  color: #88f;
+}
+
+.hljs-keyword,
+.hljs-id,
+.hljs-title,
+.hljs-built_in,
+.css .hljs-tag,
+.hljs-javadoctag,
+.hljs-phpdoc,
+.hljs-yardoctag,
+.smalltalk .hljs-class,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.go .hljs-typename,
+.tex .hljs-command,
+.asciidoc .hljs-strong,
+.markdown .hljs-strong,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
+
+.asciidoc .hljs-emphasis,
+.markdown .hljs-emphasis {
+  font-style: italic;
+}
+
+.nginx .hljs-built_in {
+  font-weight: normal;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.lasso .markup,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/themes/default/highlightjs/styles/github.css b/themes/default/highlightjs/styles/github.css
new file mode 100644 (file)
index 0000000..47fc265
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+
+github.com style (c) Vasily Polovnyov <vast@whiteants.net>
+
+*/
+
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  color: #333;
+  background: #f8f8f8;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-javadoc {
+  color: #998;
+  font-style: italic;
+}
+
+.hljs-keyword,
+.css .rule .hljs-keyword,
+.hljs-winutils,
+.javascript .hljs-title,
+.nginx .hljs-title,
+.hljs-subst,
+.hljs-request,
+.hljs-status {
+  color: #333;
+  font-weight: bold;
+}
+
+.hljs-number,
+.hljs-hexcolor,
+.ruby .hljs-constant {
+  color: #099;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula {
+  color: #d14;
+}
+
+.hljs-title,
+.hljs-id,
+.coffeescript .hljs-params,
+.scss .hljs-preprocessor {
+  color: #900;
+  font-weight: bold;
+}
+
+.javascript .hljs-title,
+.lisp .hljs-title,
+.clojure .hljs-title,
+.hljs-subst {
+  font-weight: normal;
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.vhdl .hljs-literal,
+.tex .hljs-command {
+  color: #458;
+  font-weight: bold;
+}
+
+.hljs-tag,
+.hljs-tag .hljs-title,
+.hljs-rules .hljs-property,
+.django .hljs-tag .hljs-keyword {
+  color: #000080;
+  font-weight: normal;
+}
+
+.hljs-attribute,
+.hljs-variable,
+.lisp .hljs-body {
+  color: #008080;
+}
+
+.hljs-regexp {
+  color: #009926;
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.lisp .hljs-keyword,
+.tex .hljs-special,
+.hljs-prompt {
+  color: #990073;
+}
+
+.hljs-built_in,
+.lisp .hljs-title,
+.clojure .hljs-built_in {
+  color: #0086b3;
+}
+
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-doctype,
+.hljs-shebang,
+.hljs-cdata {
+  color: #999;
+  font-weight: bold;
+}
+
+.hljs-deletion {
+  background: #fdd;
+}
+
+.hljs-addition {
+  background: #dfd;
+}
+
+.diff .hljs-change {
+  background: #0086b3;
+}
+
+.hljs-chunk {
+  color: #aaa;
+}
diff --git a/themes/default/highlightjs/styles/googlecode.css b/themes/default/highlightjs/styles/googlecode.css
new file mode 100644 (file)
index 0000000..fd23736
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+
+Google Code style (c) Aahan Krish <geekpanth3r@gmail.com>
+
+*/
+
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: white;
+  color: black;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc {
+  color: #800;
+}
+
+.hljs-keyword,
+.method,
+.hljs-list .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.hljs-tag .hljs-title,
+.setting .hljs-value,
+.hljs-winutils,
+.tex .hljs-command,
+.http .hljs-title,
+.hljs-request,
+.hljs-status {
+  color: #008;
+}
+
+.hljs-envvar,
+.tex .hljs-special {
+  color: #660;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-cdata,
+.hljs-filter .hljs-argument,
+.hljs-attr_selector,
+.apache .hljs-cbracket,
+.hljs-date,
+.hljs-regexp,
+.coffeescript .hljs-attribute {
+  color: #080;
+}
+
+.hljs-sub .hljs-identifier,
+.hljs-pi,
+.hljs-tag,
+.hljs-tag .hljs-keyword,
+.hljs-decorator,
+.ini .hljs-title,
+.hljs-shebang,
+.hljs-prompt,
+.hljs-hexcolor,
+.hljs-rules .hljs-value,
+.hljs-literal,
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-number,
+.css .hljs-function,
+.clojure .hljs-attribute {
+  color: #066;
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.smalltalk .hljs-class,
+.hljs-javadoctag,
+.hljs-yardoctag,
+.hljs-phpdoc,
+.hljs-typename,
+.hljs-tag .hljs-attribute,
+.hljs-doctype,
+.hljs-class .hljs-id,
+.hljs-built_in,
+.setting,
+.hljs-params,
+.hljs-variable,
+.clojure .hljs-title {
+  color: #606;
+}
+
+.css .hljs-tag,
+.hljs-rules .hljs-property,
+.hljs-pseudo,
+.hljs-subst {
+  color: #000;
+}
+
+.css .hljs-class,
+.css .hljs-id {
+  color: #9b703f;
+}
+
+.hljs-value .hljs-important {
+  color: #ff7700;
+  font-weight: bold;
+}
+
+.hljs-rules .hljs-keyword {
+  color: #c5af75;
+}
+
+.hljs-annotation,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in {
+  color: #9b859d;
+}
+
+.hljs-preprocessor,
+.hljs-preprocessor *,
+.hljs-pragma {
+  color: #444;
+}
+
+.tex .hljs-formula {
+  background-color: #eee;
+  font-style: italic;
+}
+
+.diff .hljs-header,
+.hljs-chunk {
+  color: #808080;
+  font-weight: bold;
+}
+
+.diff .hljs-change {
+  background-color: #bccff9;
+}
+
+.hljs-addition {
+  background-color: #baeeba;
+}
+
+.hljs-deletion {
+  background-color: #ffc8bd;
+}
+
+.hljs-comment .hljs-yardoctag {
+  font-weight: bold;
+}
index 90b118394383d05a468d885e5a322a1609258e03..dbbbde3c05a22da4d57f20d9b2d4c2c59e3e2336 100755 (executable)
@@ -1,6 +1,7 @@
 {% extends "layout.twig" %}
 {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
 {% block content %}
+                               {% include '_highlight.twig' %}
         {% include '_pocheit-form.twig' %}
         <div id="article_toolbar">
             <ul>
index da0786234291c8ba789609c3a53e0937fa0a547d..a1fcdc2afd876452531c132745d710e1c27be66e 100644 (file)
@@ -22,6 +22,7 @@ $parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) ||
 $allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
 $filter_ok = extension_loaded('filter');
 $gettext_ok = function_exists("gettext");
+$gd_ok = extension_loaded('gd');
 
 if (extension_loaded('xmlreader')) {
        $xml_ok = true;
@@ -236,6 +237,11 @@ if (isset($_GET['from'])){
                                                <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td>
                                                <td>Enabled</td>
                                                <?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
+                                       </tr>
+                                       <tr class="<?php echo ($gd_ok) ? 'enabled' : 'disabled'; ?>">
+                                               <td><a href="http://php.net/manual/en/book.image.php">GD</a></td>
+                                               <td>Enabled</td>
+                                               <?php echo ($gd_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
                                        </tr>                                   
                                        <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>">
                                                <td><a href="http://php.net/tidy">Tidy</a></td>
@@ -275,7 +281,7 @@ if (isset($_GET['from'])){
                        <h3>What does this mean?</h3>
                        <ol>
                                <?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): ?>
-                               <?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): ?>
+                               <?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): ?>
                                <li><em>You have everything you need to run <?php echo $app_name; ?> properly!  Congratulations!</em></li>
                                <?php else: ?>
                                        <?php if ($php_ok): ?>
@@ -312,6 +318,12 @@ if (isset($_GET['from'])){
                                                     <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>
                                                 <?php endif; ?>
 
+                                                <?php if ($gd_ok): ?>
+                                                    <li><strong>GD:</strong> You have <code>GD</code> support installed.  <em>No problems here.</em></li>
+                                                <?php else: ?>
+                                                    <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>
+                                                <?php endif; ?>
+
                                                 <?php if ($tidy_ok): ?>
                                                     <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed.  <em>No problems here.</em></li>
                                                 <?php else: ?>