]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge branch 'Flattr' of git://github.com/tcitworld/poche into tcitworld-Flattr
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Tue, 10 Sep 2013 17:22:47 +0000 (19:22 +0200)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Tue, 10 Sep 2013 17:22:47 +0000 (19:22 +0200)
Conflicts:
inc/3rdparty/site_config

25 files changed:
.gitmodules [new file with mode: 0644]
inc/3rdparty/FlattrItem.class.php [new file with mode: 0644]
inc/3rdparty/site_config [new submodule]
inc/3rdparty/site_config/README.txt [deleted file]
inc/3rdparty/site_config/custom/bfmtv.com.txt [deleted file]
inc/3rdparty/site_config/custom/inthepoche.com.txt [deleted file]
inc/3rdparty/site_config/custom/tldp.org.txt [deleted file]
inc/3rdparty/site_config/index.php [deleted file]
inc/3rdparty/site_config/standard/.wikipedia.org.txt [deleted file]
inc/3rdparty/site_config/standard/index.php [deleted file]
inc/3rdparty/site_config/standard/version.php [deleted file]
inc/poche/Poche.class.php
inc/poche/config.inc.php
inc/poche/define.inc.php
index.php
poche_compatibility_test.php
tpl/_menu.twig
tpl/_top.twig
tpl/config.twig
tpl/css/style.css
tpl/error.twig
tpl/home.twig
tpl/install.twig
tpl/js/poche.js [new file with mode: 0644]
tpl/view.twig

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..fcc2e52
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "inc/3rdparty/site_config"]
+       path = inc/3rdparty/site_config
+       url = git://github.com/inthepoche/site_config.git
diff --git a/inc/3rdparty/FlattrItem.class.php b/inc/3rdparty/FlattrItem.class.php
new file mode 100644 (file)
index 0000000..c940fcd
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/* 
+* Class for Flattr querying
+*/
+class FlattrItem {
+
+    public $status;
+    public $urltoflattr;
+    public $flattrItemURL;
+    public $numflattrs;
+
+    public function checkItem($urltoflattr) {
+        $this->cacheflattrfile($urltoflattr);
+        $flattrResponse = file_get_contents(CACHE . "/flattr/".base64_encode($urltoflattr).".cache");
+        if($flattrResponse != FALSE) {
+            $result = json_decode($flattrResponse);
+            if (isset($result->message)){
+                if ($result->message == "flattrable") {
+                    $this->status = FLATTRABLE;
+                }
+            } 
+            elseif ($result->link) {
+                $this->status = FLATTRED;
+                $this->flattrItemURL = $result->link;
+                $this->numflattrs = $result->flattrs;
+            }
+            else {
+                $this->status = NOT_FLATTRABLE;
+            }
+        }
+        else {
+            $this->status = "FLATTR_ERR_CONNECTION";
+        }
+    }
+
+    private function cacheflattrfile($urltoflattr) {
+        if (!is_dir(CACHE . '/flattr')) {
+            mkdir(CACHE . '/flattr', 0777);
+        }
+
+        // if a cache flattr file for this url already exists and it's been less than one day than it have been updated, see in /cache
+        if ((!file_exists(CACHE . "/flattr/".base64_encode($urltoflattr).".cache")) || (time() - filemtime(CACHE . "/flattr/".base64_encode($urltoflattr).".cache") > 86400)) {
+            $askForFlattr = Tools::getFile(FLATTR_API . $urltoflattr);
+            $flattrCacheFile = fopen(CACHE . "/flattr/".base64_encode($urltoflattr).".cache", 'w+');
+            fwrite($flattrCacheFile, $askForFlattr);
+            fclose($flattrCacheFile);
+        }
+    }
+}
\ No newline at end of file
diff --git a/inc/3rdparty/site_config b/inc/3rdparty/site_config
new file mode 160000 (submodule)
index 0000000..fe9f0d3
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit fe9f0d3f60d44a8701f3ecab0c4077a4ed39bfe8
diff --git a/inc/3rdparty/site_config/README.txt b/inc/3rdparty/site_config/README.txt
deleted file mode 100644 (file)
index 0aff456..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Full-Text RSS Site Patterns
----------------------------
-
-Site patterns allow you to specify what should be extracted from specific sites.
-
-Please see http://help.fivefilters.org/customer/portal/articles/223153-site-patterns for more information.
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/custom/bfmtv.com.txt b/inc/3rdparty/site_config/custom/bfmtv.com.txt
deleted file mode 100644 (file)
index 0ff28d5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-title: //title
-body: //h2 | //span[@class='masque'] | //article[@class='corps_article_right']
-prune: no
-tidy: no
-
-test_url: http://www.bfmtv.com/societe/cigarette-electronique-dangers-588622.html
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/custom/inthepoche.com.txt b/inc/3rdparty/site_config/custom/inthepoche.com.txt
deleted file mode 100644 (file)
index ede74b9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-title: //title
-body: //div[@class='post-content']
-
-prune: no
-tidy: no
-
-test_url: http://www.inthepoche.com/?post/poche-hosting
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/custom/tldp.org.txt b/inc/3rdparty/site_config/custom/tldp.org.txt
deleted file mode 100644 (file)
index 7dd5cdb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-title: //title
-body: //h2 | //p | //ul
-prune: no
-tidy: no
-
-test_url: http://www.tldp.org/HOWTO/Plug-and-Play-HOWTO-7.html
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/index.php b/inc/3rdparty/site_config/index.php
deleted file mode 100644 (file)
index a3d5f73..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// this is here to prevent directory listing over the web
-?>
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/.wikipedia.org.txt b/inc/3rdparty/site_config/standard/.wikipedia.org.txt
deleted file mode 100644 (file)
index 8b98ae4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-title: //h1[@id='firstHeading']
-body: //div[@id = 'bodyContent']
-strip_id_or_class: editsection
-#strip_id_or_class: toc
-strip_id_or_class: vertical-navbox
-strip: //table[@id='toc']
-strip: //div[@id='catlinks']
-strip: //div[@id='jump-to-nav']
-strip: //div[@class='thumbcaption']//div[@class='magnify']
-strip: //table[@class='navbox']
-strip: //table[contains(@class, 'infobox')]
-strip: //div[@class='dablink']
-strip: //div[@id='contentSub']
-strip: //table[contains(@class, 'metadata')]
-strip: //*[contains(@class, 'noprint')]
-strip: //span[@title='pronunciation:']
-prune: no
-tidy: no
-test_url: http://en.wikipedia.org/wiki/Christopher_Lloyd
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/index.php b/inc/3rdparty/site_config/standard/index.php
deleted file mode 100644 (file)
index a3d5f73..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// this is here to prevent directory listing over the web
-?>
\ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/version.php b/inc/3rdparty/site_config/standard/version.php
deleted file mode 100644 (file)
index e61807e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<?php 
-return 1;
\ No newline at end of file
index b0efe69a673f9e8f4f241a7964a0bb5e78fbdb5e..9db4a0346eb539b12dc75b887e0dbdb5efb5508e 100644 (file)
@@ -182,7 +182,7 @@ class Poche
                 }
 
                 if (!$import) {
-                    Tools::redirect();
+                    Tools::redirect('?view=home');
                 }
                 break;
             case 'delete':
@@ -248,9 +248,9 @@ class Poche
                         $tidy->cleanRepair();
                         $content = $tidy->value;
 
-                        // flattr checking
+                        # flattr checking
                         $flattr = new FlattrItem();
-                        $flattr->checkitem($entry['url']);
+                        $flattr->checkItem($entry['url']);
 
                         $tpl_vars = array(
                         'entry' => $entry,
@@ -263,11 +263,12 @@ class Poche
                     Tools::logm('error in view call : entry is null');
                 }
                 break;
-            default : // home, favorites and archive views
+            default: # home, favorites and archive views 
                 $entries = $this->store->getEntriesByView($view, $this->user->getId());
                 $tpl_vars = array(
                     'entries' => '',
                     'page_links' => '',
+                    'nb_results' => '',
                 );
                 if (count($entries) > 0) {
                     $this->pagination->set_total(count($entries));
@@ -275,6 +276,7 @@ class Poche
                     $datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit());
                     $tpl_vars['entries'] = $datas;
                     $tpl_vars['page_links'] = $page_links;
+                    $tpl_vars['nb_results'] = count($entries);
                 }
                 Tools::logm('display ' . $view . ' view');
                 break;
@@ -564,53 +566,4 @@ class Poche
         }
         return $version;
     }
-}
-
-/* class for Flattr querying. Should be put in a separate file
-*   Or maybe just create an array instead of a complete class... My mistake. :-°
-*/
-class FlattrItem{
-    public $status;
-    public $urltoflattr;
-    public $flattrItemURL;
-    public $numflattrs;
-
-    public function checkitem($urltoflattr){
-        $this->cacheflattrfile($urltoflattr);
-        $flattrResponse = file_get_contents("cache/flattr/".base64_encode($urltoflattr).".cache");
-        if($flattrResponse != FALSE){
-            $result = json_decode($flattrResponse);
-            if (isset($result->message)){
-                if ($result->message == "flattrable"){
-                $this->status = "flattrable";
-                        }
-                    } 
-            elseif ($result->link) {
-                            $this->status = "flattred";
-                            $this->flattrItemURL = $result->link;
-                            $this->numflattrs = $result->flattrs;
-                        }
-            else{
-                $this->status = "not flattrable";
-            }
-        }
-        else
-        {
-            $this->status = "FLATTR_ERR_CONNECTION";
-        }
-    }
-
-    private function cacheflattrfile($urltoflattr){
-        if (!is_dir('cache/flattr')){
-            mkdir('./cache/flattr', 0777);
-        }
-        // if a cache flattr file for this url already exists and it's been less than one day than it have been updated, see in /cache
-        if ((!file_exists("cache/flattr/".base64_encode($urltoflattr).".cache")) || (time() - filemtime("cache/flattr/".base64_encode($urltoflattr).".cache") > 86400))
-        {
-            $askForFlattr = Tools::getFile("https://api.flattr.com/rest/v2/things/lookup/?url=".$urltoflattr);
-             $flattrCacheFile = fopen("cache/flattr/".base64_encode($urltoflattr).".cache", 'w+');
-             fwrite($flattrCacheFile, $askForFlattr);
-             fclose($flattrCacheFile);
-        }
-    }
-}
+}
\ No newline at end of file
index a1917295fbb292c205bc4efb9c259d1fc8bbd06f..45526695acc28adf3db3a112d939ca8858223395 100755 (executable)
@@ -3,7 +3,7 @@
  * poche, a read it later open source system
  *
  * @category   poche
- * @author     Nicolas Lœuillet <nicolas@loeuillet.org>
+ * @author     Nicolas Lœuillet <support@inthepoche.com>
  * @copyright  2013
  * @license    http://www.wtfpl.net/ see COPYING file
  */
@@ -12,12 +12,9 @@ require_once __DIR__ . '/../../inc/poche/define.inc.php';
 
 # /!\ Be careful if you change the lines below /!\
 if (!file_exists(__DIR__ . '/../../vendor/autoload.php')) {
-    die('Twig does not seem installed. Have a look at <a href="http://inthepoche.com/?pages/Documentation">the documentation.</a>');
+    die('Twig does not seem installed. Have a look at <a href="inthepoche.com/doc">the documentation.</a>');
 }
 
-// if (file_exists(__DIR__ . '/../../inc/poche/myconfig.inc.php')) {
-    // require_once __DIR__ . '/../../inc/poche/myconfig.inc.php';
-// }
 require_once __DIR__ . '/../../inc/poche/User.class.php';
 require_once __DIR__ . '/../../inc/poche/Url.class.php';
 require_once __DIR__ . '/../../inc/3rdparty/class.messages.php';
@@ -40,6 +37,7 @@ require_once __DIR__ . '/../../inc/3rdparty/humble-http-agent/CookieJar.php';
 require_once __DIR__ . '/../../inc/3rdparty/feedwriter/FeedItem.php';
 require_once __DIR__ . '/../../inc/3rdparty/feedwriter/FeedWriter.php';
 require_once __DIR__ . '/../../inc/3rdparty/feedwriter/DummySingleItemFeed.php';
+require_once __DIR__ . '/../../inc/3rdparty/FlattrItem.class.php';
 
 if (DOWNLOAD_PICTURES) {
     require_once __DIR__ . '/../../inc/poche/pochePictures.php';
index 62777282a34687d9c193e23c71e4c14d66af9cd3..40f77b5c29ed3cb70519d7d39e831697481e59a2 100644 (file)
@@ -3,7 +3,7 @@
  * poche, a read it later open source system
  *
  * @category   poche
- * @author     Nicolas Lœuillet <nicolas@loeuillet.org>
+ * @author     Nicolas Lœuillet <support@inthepoche.com>
  * @copyright  2013
  * @license    http://www.wtfpl.net/ see COPYING file
  */
@@ -20,9 +20,13 @@ define ('DEBUG_POCHE', FALSE);
 define ('DOWNLOAD_PICTURES', FALSE);
 define ('SHARE_TWITTER', TRUE);
 define ('SHARE_MAIL', TRUE);
-define ('SHARE_SHAARLI', TRUE);
+define ('SHARE_SHAARLI', FALSE);
 define ('SHAARLI_URL', 'http://myshaarliurl.com');
 define ('FLATTR', TRUE);
+define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url=');
+define ('NOT_FLATTRABLE', '0');
+define ('FLATTRABLE', '1');
+define ('FLATTRED', '2');
 define ('ABS_PATH', 'assets/');
 define ('TPL', __DIR__ . '/../../tpl');
 define ('LOCALE', __DIR__  . '/../../locale');
index 5f43b7400c007887e94fe364bb66aabb78635499..7b775c41609868000250babef09c7e1cd77006ca 100644 (file)
--- a/index.php
+++ b/index.php
@@ -43,6 +43,10 @@ elseif (isset($_GET['import'])) {
 elseif (isset($_GET['export'])) {
     $poche->export();
 }
+elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
+    $plain_url = new Url(base64_encode($_GET['plainurl']));
+    $poche->action('add', $plain_url);
+}
 
 # vars to send to templates
 $tpl_vars = array(
index 7c85a5834e260f7fed3289bd46c7cc33fcd302e2..be4fd6f82696fdf57888d9d6d7da74f80ca0c4f7 100644 (file)
@@ -1,18 +1,4 @@
 <?php
-/*
-FULL-TEXT-RSS V2 COMPATIBILITY TEST
-
-1) Upload ftr_compatibility_test.php to the web-accessible root of your website.
-For example, if your website is www.example.com, upload it so that you can get
-to it at www.example.com/ftr_compatibility_test.php
-
-2) Open your web browser and go to the page you just uploaded.
-
-Note: This compatibility test has been borrowed (and slightly adapted) from the one supplied by 
-SimplePie.org. We have kept most of their checks intact as we use SimplePie in our application.
-http://github.com/simplepie/simplepie/tree/master/compatibility_test/
-*/
-
 $app_name = 'poche 1.0';
 
 $php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.2.0', '>='));
index 699d6a0c93411d46d9b04b8fbfe6c1dc18ca7370..523d63cc6e29e9457d058157650bd385e77c60eb 100644 (file)
@@ -4,4 +4,4 @@
                 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
                 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
                 <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
-            </ul>
\ No newline at end of file
+                 </ul>
\ No newline at end of file
index ae01cc3ffb24f98b96ac86336d6043e2e72e0809..dc20081e9151cc340512e63aa7e4df75b373338e 100644 (file)
@@ -1,3 +1,7 @@
         <header class="w600p center mbm">
-            <h1><a href="./" title="{% trans "back to home" %}" ><img src="./tpl/img/logo.png" alt="logo poche" /></a></h1>
+            <h1>
+                {% if view == 'home' %}{% block logo %}<img src="./tpl/img/logo.png" alt="logo poche" />{% endblock %}
+                {% else %}<a href="./" title="{% trans "back to home" %}" >{{ block('logo') }}</a>
+                {% endif %}
+            </h1>
         </header>
\ No newline at end of file
index c838c319bcb4e58b2d4bddaedd223b0054161f8f..7078887677ec6f7553689fc2a0bbb7d7d8188b3e 100644 (file)
@@ -2,29 +2,30 @@
 
 {% block title %}{% trans "config" %}{% endblock %}
 {% block menu %}
-            <ul id="links">
-                <li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li>
-                <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
-                <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
-                <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
-                <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
-            </ul>
+{% include '_menu.twig' %}
 {% endblock %}
 {% block content %}
             <h2>{% trans "Poching a link" %}</h2>
-            <p>You can poche a link by several methods: (<a href="http://www.inthepoche.com/?pages/Documentation" title="{% trans "read the documentation" %}">?</a>)</p>
+            <p>You can poche a link by several methods: (<a href="http://inthepoche.com/doc" title="{% trans "read the documentation" %}">?</a>)</p>
             <ul>
                 <li>firefox: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.xpi" title="download the firefox extension">download the extension</a></li>
                 <li>chrome: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/poche.crx" title="download the chrome extension">download the extension</a></li>
                 <li>android: <a href="https://bitbucket.org/jogaulupeau/poche/downloads/Poche.apk" title="download the application">download the application</a></li>
+                <li>
+                    <form method="get" action="index.php">
+                        <label class="addurl" for="plainurl">{% trans "by filling this field" %}:</label>
+                        <input autofocus required placeholder="Ex:mywebsite.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
+                        <input type="submit" value="{% trans "poche it!" %}" />
+                    </form>
+                </li>
                 <li>bookmarklet: drag & drop this link to your bookmarks bar <a id="bookmarklet" ondragend="this.click();" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{{ poche_url }}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">{% trans "poche it!" %}</a></li>
             </ul>
 
             <h2>{% trans "Updating poche" %}</h2>
             <ul>
                 <li>{% trans "your version" %} : <strong>{{ constant('POCHE_VERSION') }}</strong></li>
-                <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>
-                {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/?pages/T%C3%A9l%C3%A9charger-poche">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %}
+                <li>{% trans "latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://inthepoche.com/">{% trans "a more recent stable version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>
+                {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://inthepoche.com/">{% trans "a more recent development version is available." %}</a></strong>{% else %}{% trans "you are up to date." %}{% endif %}</li>{% endif %}
             </ul>
 
             <h2>{% trans "Change your password" %}</h2>
@@ -48,7 +49,7 @@
 
             <h2>{% trans "Import" %}</h2>
             <p>{% trans "Please execute the import script locally, it can take a very long time." %}</p>
-            <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/?pages/Documentation">inthepoche.com</a></p>
+            <p>{% trans "More infos in the official doc:" %} <a href="http://inthepoche.com/doc">inthepoche.com</a></p>
             <ul>
                 <li><a href="./?import&from=pocket">{% trans "import from Pocket" %}</a> (you must have a "{{ constant('IMPORT_POCKET_FILE')}}" file on your server)</li>
             <li><a href="./?import&from=readability">{% trans "import from Readability" %}</a> (you must have a "{{constant('IMPORT_READABILITY_FILE')}}" file on your server)</li>
index 7633534c3a428b307bae56880cdafa45164c8dbc..c056429defbf7fe7f9b15ea6ffb1df51ed76ff33 100644 (file)
@@ -98,6 +98,10 @@ a, a:hover, a:visited {
 #main #content .entrie {
     border-bottom: 1px dashed #222;
 }
+/* First entry */
+#main #content .results + .entrie {
+    clear: both;
+}
 
 #main .entrie .tools {
     list-style-type: none;
@@ -189,11 +193,22 @@ a, a:hover, a:visited {
 }
 
 
-/* Pagination */
-.pagination {
-    clear: both;
+.results {
+    overflow: hidden;
     padding-bottom: 20px;
     padding-top: 10px;
+}
+
+.nb-results {
+    float: left;
+    font-size: 0.9em;
+    line-height: 24px;
+    vertical-align: middle;
+}
+
+/* Pagination */
+.pagination {
+    float: right;
     text-align: right;
 }
 .pagination a {
@@ -221,12 +236,7 @@ a, a:hover, a:visited {
     margin: 2px;
 }
 .pagination .disabled {
-    border: 1px solid #eee;
-    color: #ddd;
-    margin: 2px;
-    padding: 4px 8px;
-    font-size: 11px;
-    font-weight: bold;
+    display: none;
 }
 
 #bookmarklet {
@@ -257,3 +267,17 @@ footer {
 .reading-time {
     font-size: 0.8em;
 }
+
+#inputform {
+    display: none;
+    text-align:center;
+    max-width:300px;
+    margin-left:auto;
+    margin-right:auto;
+    margin-top:5px;
+    padding-bottom: 5px;
+    background-color: rgba(0, 0, 0, 0.9);
+    opacity:0.8;
+    color:white;
+    border-radius: 3px;
+}
index 14c499254419a5a230a495a314a74ac501dcdebd..c829d12bba595b6d519be1cf461ff98d467b3fe8 100644 (file)
@@ -2,5 +2,5 @@
 {% block title %}{% trans "plop" %}{% endblock %}
 {% block content %}
         {{ msg|raw }}
-        <p>Don't forget <a href="http://inthepoche.com/?pages/Documentation">the documentation</a>.</p>
+        <p>Don't forget <a href="http://inthepoche.com/doc">the documentation</a>.</p>
 {% endblock %}
\ No newline at end of file
index f51c34f235d5ab91e80f250d2b44fc899e8fe3d1..771c36c5b36a144f90ed4a2557ccf848872998d3 100644 (file)
 {% include '_menu.twig' %}
 {% endblock %}
 {% block precontent %}
+           {% if entries|length > 1 %}
             <ul id="sort">
                 <li><a href="./?sort=ia&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by date asc" %}" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li>
                 <li><a href="./?sort=ta&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by title asc" %}" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li>
             </ul>
+            {% endif %}
 {% endblock %}
 {% block content %}
-            {{ page_links | raw }}
             {% if entries is empty %}
             <div class="messages warning"><p>{% trans "No link available here!" %}</p></div>
             {% else %}
+                {% block pager %}
+                    {% if nb_results > 1 %}
+                <div class="results">
+                    <div class="nb-results">{{ nb_results }} {% trans "results" %}</div>
+                        {{ page_links | raw }}
+                </div>
+                    {% endif %}
+                {% endblock %}
                 {% for entry in entries %}
             <div id="entry-{{ entry.id|e }}" class="entrie">
                 <h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
@@ -36,5 +45,5 @@
             </div>
                 {% endfor %}
             {% endif %}
-            {{ page_links | raw }}
+            {{ block('pager') }}
 {% endblock %}
\ No newline at end of file
index afb5b0f6bb1acd4f687ad7022e99509cc0ec2aec..6e85e5cbbc9d856384b8f6a820a2133e75f7f664 100644 (file)
@@ -5,7 +5,7 @@
             <fieldset class="w500p center">
                 <h2 class="mbs txtcenter">{% trans "install your poche" %}</h2>
                 <p>
-                    {% trans "poche is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://inthepoche.com/?pages/Documentation'>read the documentation on poche website</a>." %}
+                    {% trans "poche is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://inthepoche.com/doc'>read the documentation on poche website</a>." %}
                 </p>
                 <p class="row">
                     <label class="col w150p" for="login">{% trans "Login" %}</label>
diff --git a/tpl/js/poche.js b/tpl/js/poche.js
new file mode 100644 (file)
index 0000000..c2e02f9
--- /dev/null
@@ -0,0 +1,2 @@
+function showinput(){
+$('#inputform').fadeIn('fast');}
\ No newline at end of file
index 283cfb5b5fdd19c2f06c01c91d57acfb110e7e6e..ee16afa6164665daf55292cccb5c0f4e9a4f1a32 100644 (file)
@@ -11,7 +11,7 @@
                     {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %}
                     {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %}
                     {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
-                    {% if constant('FLATTR') == 1 %}{% if flattr.status == "flattrable" %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" title="flattr"><span>flattr</span></a></li>{% elseif flattr.status == "flattred" %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr"><span>flattr</span>{{ flattr.numflattrs }}</a></li>{% else %}{% endif %}{% endif %}
+                    {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>flattr</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>flattr</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %}
                 </ul>
             </div>
             <header class="mbm">
@@ -32,7 +32,7 @@
                     {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %}
                     {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %}
                     {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
-                    {% if constant('FLATTR') == 1 %}{% if flattr.status == "flattrable" %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" title="flattr"><span>flattr</span></a></li>{% elseif flattr.status == "flattred" %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr"><span>flattr</span>{{ flattr.numflattrs }}</a></li>{% else %}{% endif %}{% endif %}
+                    {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>flattr</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>flattr</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %}
                 </ul>
                 <p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&amp;body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p>
             </div>