]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #679 from ArthurHoaro/plugins/header
authorArthur <arthur@hoa.ro>
Mon, 12 Dec 2016 02:07:13 +0000 (03:07 +0100)
committerGitHub <noreply@github.com>
Mon, 12 Dec 2016 02:07:13 +0000 (03:07 +0100)
Improve theme dependent plugin placeholders:

29 files changed:
CHANGELOG.md
application/.htaccess
cache/.htaccess
data/.htaccess
docker/.htaccess
docker/development/Dockerfile
docker/development/nginx.conf
docker/production/Dockerfile
docker/production/nginx.conf
docker/production/stable/Dockerfile
docker/production/stable/nginx.conf
inc/shaarli.css
index.php
pagecache/.htaccess
plugins/archiveorg/archiveorg.html
plugins/markdown/README.md
plugins/markdown/markdown.meta
plugins/markdown/markdown.php
plugins/qrcode/qrcode.html
plugins/readityourself/readityourself.html
plugins/wallabag/wallabag.html
tests/.htaccess
tests/plugins/PluginMarkdownTest.php
tmp/.htaccess
tpl/editlink.html
tpl/feed.atom.html
tpl/includes.html
tpl/pluginsadmin.html
tpl/tools.html

index d42d6a75e2fa42c02d9be9e27b763079a8795a94..ffda8a1b4e30291a29210b48b8123ca8130478a0 100644 (file)
@@ -13,20 +13,33 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 - Plugins:
     - Add an [Isso](https://posativ.org/isso/) plugin to enable user comments on permalinks
     - Allow defining init functions, e.g. for performing checks and error processing
+    - Add a Piwik plugin for analytics.
+    - Markdown: add warning notice regarding HTML rendering
+- Meta tag to *not* send the referrer to external resources.
 
 ### Changed
 - Cleanup `{loop}` declarations in templates
 - Release archives now have the same structure as GitHub-generated archives:
     - archives contain a `Shaarli` directory, itself containing sources + dependencies
     - the tarball is now gzipped
+- Plugins:
+    - Markdown: Parsedown library is now imported through Composer
 - Minor code cleanup: PHPDoc, spelling, unused variables, etc.
+- Docker: explicitly set the maximum file upload size to 10 MiB
+- Tools: hide Firefox Social button when not in HTTPS
+- Firefox Social: show Shaarli's title when shaaring using Firefox Social 
 
 ### Fixed
 - Fix the server `<self>` value in Atom/RSS feeds
 - Plugins:
     - Tools: only display parameter description when it exists
     - archive.org: do not propose archival of private notes
+    - Markdown: 
+        - render links properly in code blocks
+        - bug regarding the `nomarkdown` tag
+    - W3C compliance
 - Use absolute URL for hashtags in RSS and ATOM feeds
+- Docker: specify the location of the favicon
 
 ### Security
 - Allow whitelisting trusted IPs, else continue banning clients upon login failure
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index 0c19b0855d0b9d282e04e906cce7d254bab2af3f..d9ef8da7db2eada974c7d6ce6cd6f684583755f6 100644 (file)
@@ -15,6 +15,8 @@ RUN apt-get update \
        nano \
     && apt-get clean
 
+RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
+RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
 COPY nginx.conf /etc/nginx/nginx.conf
 COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
 
index cda09b565028b0ad39400b3d715d03789e989250..ac0c6c61ce165976b7572bb96eb8ba90b5f4d2a8 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -49,6 +51,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index d93ed262b79acd97ce114256aa940a927bf794a4..d0509115c5907e158c52292919b7a87506ae070e 100644 (file)
@@ -14,6 +14,8 @@ RUN apt-get update \
        supervisor \
     && apt-get clean
 
+RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
+RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
 COPY nginx.conf /etc/nginx/nginx.conf
 COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
 
index e23c4587da122c790f26c6893838280c39b03908..5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -41,6 +43,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index a509fda65cfc00fee884127fda3e2433f6adfe9b..fc9588b0d604dd4023a232ef17c4a8d76f26d98b 100644 (file)
@@ -14,6 +14,8 @@ RUN apt-get update \
        supervisor \
     && apt-get clean
 
+RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
+RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
 COPY nginx.conf /etc/nginx/nginx.conf
 COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
 
index e23c4587da122c790f26c6893838280c39b03908..5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -41,6 +43,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index 5808320cb485fb38b61f734157921d6d0a91f577..a24d4b7c1e384cfc72a03000e462263063c77fb0 100644 (file)
@@ -37,6 +37,10 @@ em {
     font-style: italic;
 }
 
+strong {
+    font-weight: bold;
+}
+
 /* Buttons */
 .bigbutton {
     background-color: #c0c0c0;
@@ -1168,8 +1172,13 @@ ul.errors {
 }
 
 #pluginsadmin a {
+    color: #486D08;
+}
+
+#pluginsadmin a.arrow {
     color: black;
 }
+
 /* 404 page */
 .error-container {
 
index 84282b8dc6c6ecc41dd67cae0eae0e9c3fdf883a..5366cb0e22fbdafe221e0b0a2c1910b67f5122f0 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1078,6 +1078,7 @@ function renderPage($conf, $pluginManager)
     {
         $data = array(
             'pageabsaddr' => index_url($_SERVER),
+            'sslenabled' => !empty($_SERVER['HTTPS'])
         );
         $pluginManager->executeHooks('render_tools', $data);
 
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index 576bd46eee866686b3ca40411c41b46a96d0196f..0781fe35d045631971f304533496f1bec82ddcc2 100644 (file)
@@ -1 +1 @@
-<span><a href="https://web.archive.org/web/%s"><img class="linklist-plugin-icon" src="plugins/archiveorg/internetarchive.png" title="View on archive.org" /></a></span>
+<span><a href="https://web.archive.org/web/%s"><img class="linklist-plugin-icon" src="plugins/archiveorg/internetarchive.png" title="View on archive.org" alt="archive.org" /></a></span>
index 4f021871e47d6827118b223cdffd2902e819f3b5..aafcf0662ecf778da3051a44f891f5add70d3479 100644 (file)
@@ -20,26 +20,52 @@ The directory structure should look like:
      |--- markdown.css
      |--- markdown.meta
      |--- markdown.php
-     |--- Parsedown.php
      |--- README.md
 ```
 
 To enable the plugin, just check it in the plugin administration page.
 
-You can also add `markdown` to your list of enabled plugins in `data/config.php`
-(`ENABLED_PLUGINS` array).
+You can also add `markdown` to your list of enabled plugins in `data/config.json.php`
+(`general.enabled_plugins` list).
 
 This should look like:
 
 ```
-$GLOBALS['config']['ENABLED_PLUGINS'] = array('qrcode', 'any_other_plugin', 'markdown')
+"general": {
+  "enabled_plugins": [
+    "markdown",
+    [...]
+  ],
+}
 ```
 
+Parsedown parsing library is imported using Composer. If you installed Shaarli using `git`,
+or the `master` branch, run
+
+    composer update --no-dev --prefer-dist
+
 ### No Markdown tag
 
-If the tag `.nomarkdown` is set for a shaare, it won't be converted to Markdown syntax.
+If the tag `nomarkdown` is set for a shaare, it won't be converted to Markdown syntax.
  
-> Note: it's a private tag (leading dot), so it won't be displayed to visitors.
+> Note: this is a special tag, so it won't be displayed in link list.
+
+### HTML rendering
+
+Markdown support HTML tags. For example:
+
+    > <strong>strong</strong><strike>strike</strike>
+   
+Will render as:
+
+> <strong>strong</strong><strike>strike</strike>
+
+If you want to shaare HTML code, it is necessary to use inline code or code blocks.
+  
+**If your shaared descriptions containing HTML tags before enabling the markdown plugin, 
+enabling it might break your page.**
+
+> Note: HTML tags such as script, iframe, etc. are disabled for security reasons.
 
 ### Known issue
 
index e3904ed83289d9dd294eb8afaa26b8447b3cbbc0..8df2ed0bc3b6af6694166c3c613db97d8fdf924a 100644 (file)
@@ -1 +1,4 @@
-description="Render shaare description with Markdown syntax."
+description="Render shaare description with Markdown syntax.<br><strong>Warning</strong>:
+If your shaared descriptions containing HTML tags before enabling the markdown plugin,
+enabling it might break your page.
+See the <a href=\"https://github.com/shaarli/Shaarli/tree/master/plugins/markdown#html-rendering\">README</a>."
index a764b6fa88520711ec6b46183894040055e6fe3a..0cf6e6e2d283e32de9ec978389cad40ad5c309c0 100644 (file)
@@ -22,7 +22,7 @@ function hook_markdown_render_linklist($data)
 {
     foreach ($data['links'] as &$value) {
         if (!empty($value['tags']) && noMarkdownTag($value['tags'])) {
-            $value['taglist'] = stripNoMarkdownTag($value['taglist']);
+            $value = stripNoMarkdownTag($value);
             continue;
         }
         $value['description'] = process_markdown($value['description']);
@@ -41,7 +41,7 @@ function hook_markdown_render_feed($data)
 {
     foreach ($data['links'] as &$value) {
         if (!empty($value['tags']) && noMarkdownTag($value['tags'])) {
-            $value['tags'] = stripNoMarkdownTag($value['tags']);
+            $value = stripNoMarkdownTag($value);
             continue;
         }
         $value['description'] = process_markdown($value['description']);
@@ -63,6 +63,7 @@ function hook_markdown_render_daily($data)
     foreach ($data['cols'] as &$value) {
         foreach ($value as &$value2) {
             if (!empty($value2['tags']) && noMarkdownTag($value2['tags'])) {
+                $value2 = stripNoMarkdownTag($value2);
                 continue;
             }
             $value2['formatedDescription'] = process_markdown($value2['formatedDescription']);
@@ -81,20 +82,30 @@ function hook_markdown_render_daily($data)
  */
 function noMarkdownTag($tags)
 {
-    return strpos($tags, NO_MD_TAG) !== false;
+    return preg_match('/(^|\s)'. NO_MD_TAG .'(\s|$)/', $tags);
 }
 
 /**
  * Remove the no-markdown meta tag so it won't be displayed.
  *
- * @param string $tags Tag list.
+ * @param array $link Link data.
  *
- * @return string tag list without no markdown tag.
+ * @return array Updated link without no markdown tag.
  */
-function stripNoMarkdownTag($tags)
+function stripNoMarkdownTag($link)
 {
-    unset($tags[array_search(NO_MD_TAG, $tags)]);
-    return array_values($tags);
+    if (! empty($link['taglist'])) {
+        $offset = array_search(NO_MD_TAG, $link['taglist']);
+        if ($offset !== false) {
+            unset($link['taglist'][$offset]);
+        }
+    }
+
+    if (!empty($link['tags'])) {
+        str_replace(NO_MD_TAG, '', $link['tags']);
+    }
+
+    return $link;
 }
 
 /**
index cebc56443b2e6b04b16bf4f48dfda49b8d44dabc..dc214ed159ad35904c4842ba52b158a61ecd6a1f 100644 (file)
@@ -1,5 +1,5 @@
 <div class="linkqrcode">
     <a href="http://qrfree.kaywa.com/?l=1&amp;s=8&amp;d=%s" onclick="showQrCode(this); return false;" class="qrcode" data-permalink="%s">
-        <img src="%s/qrcode/qrcode.png" class="linklist-plugin-icon" title="QR-Code">
+        <img src="%s/qrcode/qrcode.png" class="linklist-plugin-icon" title="QR-Code" alt="QRCode">
     </a>
 </div>
index e8c5f7844806f4dca09efec332ca7cea9512fa36..5e200715a866f21be1b62243c6e1f2fb404d0283 100644 (file)
@@ -1 +1 @@
-<span><a href="%s?url=%s"><img class="linklist-plugin-icon" src="%s/readityourself/book-open.png" title="Read with Readityourself" /></a></span>
+<span><a href="%s?url=%s"><img class="linklist-plugin-icon" src="%s/readityourself/book-open.png" title="Read with Readityourself" alt="readityourself" /></a></span>
index c7b1d044bb22201904bddc1c120d27ead1b9831e..e861536d53866fe4fe7f2a47182f3442043a5b84 100644 (file)
@@ -1 +1 @@
-<span><a href="%s%s" target="_blank"><img class="linklist-plugin-icon" src="%s/wallabag/wallabag.png" title="Save to wallabag" /></a></span>
+<span><a href="%s%s" target="_blank"><img class="linklist-plugin-icon" src="%s/wallabag/wallabag.png" title="Save to wallabag" alt="wallabag" /></a></span>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index 12bdda24231b47a9cad0454694d030d7b4884362..17ef228031331fba63fbb5ef567a3fc1fa06c04c 100644 (file)
@@ -8,8 +8,8 @@ require_once 'application/Utils.php';
 require_once 'plugins/markdown/markdown.php';
 
 /**
- * Class PlugQrcodeTest
- * Unit test for the QR-Code plugin
+ * Class PluginMarkdownTest
+ * Unit test for the Markdown plugin
  */
 class PluginMarkdownTest extends PHPUnit_Framework_TestCase
 {
@@ -130,8 +130,11 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
             ))
         );
 
-        $data = hook_markdown_render_linklist($data);
-        $this->assertEquals($str, $data['links'][0]['description']);
+        $processed = hook_markdown_render_linklist($data);
+        $this->assertEquals($str, $processed['links'][0]['description']);
+
+        $processed = hook_markdown_render_feed($data);
+        $this->assertEquals($str, $processed['links'][0]['description']);
 
         $data = array(
             // Columns data
@@ -152,6 +155,24 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($str, $data['cols'][0][0]['formatedDescription']);
     }
 
+    /**
+     * Test that a close value to nomarkdown is not understand as nomarkdown (previous value `.nomarkdown`).
+     */
+    function testNoMarkdownNotExcactlyMatching()
+    {
+        $str = 'All _work_ and `no play` makes Jack a *dull* boy.';
+        $data = array(
+            'links' => array(array(
+                'description' => $str,
+                'tags' => '.' . NO_MD_TAG,
+                'taglist' => array('.'. NO_MD_TAG),
+            ))
+        );
+
+        $data = hook_markdown_render_feed($data);
+        $this->assertContains('<em>', $data['links'][0]['description']);
+    }
+
     /**
      * Test hashtag links processed with markdown.
      */
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index 441b530271fb0e5e6dcceaa5b674a6ea47de5125..9e7621dbea26b7452a167974b25fc1ca16d48a52 100644 (file)
@@ -8,13 +8,15 @@
 {elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
 {else}onload="document.linkform.lf_tags.focus();"{/if} >
 <div id="pageheader">
-       {if="$source !== 'firefoxsocialapi'"}
-       {include="page.header"}
-       {/if}
-       <div id="editlinkform">
-           <form method="post" name="linkform">
-               <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
-               <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input"><br>
+    {if="$source !== 'firefoxsocialapi'"}
+    {include="page.header"}
+    {else}
+    <div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
+    {/if}
+    <div id="editlinkform">
+        <form method="post" name="linkform">
+            <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
+            <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input"><br>
             <label for="lf_title"><i>Title</i></label><br><input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input"><br>
             <label for="lf_description"><i>Description</i></label><br><textarea name="lf_description" id="lf_description" rows="4" cols="25">{$link.description}</textarea><br>
             <label for="lf_tags"><i>Tags</i></label><br>
                 {$value}
             {/loop}
 
-               {if="($link_is_new && $default_private_links) || $link.private == true"}
+            {if="($link_is_new && $default_private_links) || $link.private == true"}
             <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
             &nbsp;<label for="lf_private"><i>Private</i></label><br>
             {else}
             <input type="checkbox"  name="lf_private" id="lf_private">
             &nbsp;<label for="lf_private"><i>Private</i></label><br>
             {/if}
-               <input type="submit" value="Save" name="save_edit" class="bigbutton">
-               <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
-               {if="!$link_is_new"}<input type="submit" value="Delete" name="delete_link" class="bigbutton delete" onClick="return confirmDeleteLink();">{/if}
-               <input type="hidden" name="token" value="{$token}">
-               {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
-           </form>
-       </div>
+            <input type="submit" value="Save" name="save_edit" class="bigbutton">
+            <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
+            {if="!$link_is_new"}<input type="submit" value="Delete" name="delete_link" class="bigbutton delete" onClick="return confirmDeleteLink();">{/if}
+            <input type="hidden" name="token" value="{$token}">
+            {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
+        </form>
+    </div>
 </div>
 {if="$source !== 'firefoxsocialapi'"}
 {include="page.footer"}
index 40fd421a4244b93f25a4a2486cf30fbe012f3b91..aead04592af4daf988d3ef9643c0b85a3203cf74 100644 (file)
@@ -30,9 +30,7 @@
         <published>{$value.pub_iso_date}</published>
         <updated>{$value.up_iso_date}</updated>
       {/if}
-      <content type="html" xml:lang="{$language}">
-        <![CDATA[{$value.description}]]>
-      </content>
+      <content type="html" xml:lang="{$language}"><![CDATA[{$value.description}]]></content>
       {loop="$value.taglist"}
         <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" />
       {/loop}
index f94ce1be97ea55632c5df8fb79775f40f6d1f87f..7b2997ce45e73b8dd8ce7df72dd3ba93a08d3864 100644 (file)
@@ -2,6 +2,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="format-detection" content="telephone=no" />
 <meta name="viewport" content="width=device-width,initial-scale=1.0" />
+<meta name="referrer" content="same-origin">
 <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
 <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
 <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
@@ -11,4 +12,4 @@
 {loop="$plugins_includes.css_files"}
 <link type="text/css" rel="stylesheet" href="{$value}#"/>
 {/loop}
-<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}"/>
\ No newline at end of file
+<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}"/>
index 672f49938d68fae28750d9d55d88eef941192929..ead1734e850980096cfc59c5143ca1591bd4ad92 100644 (file)
               <tr data-line="{$key}" data-order="{$counter}">
                 <td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
                 <td class="center">
-                  <a href="#"
+                  <a href="#" class="arrow"
                      onclick="return orderUp(this.parentNode.parentNode.getAttribute('data-order'));">
                     ▲
                   </a>
-                  <a href="#"
+                  <a href="#" class="arrow"
                      onclick="return orderDown(this.parentNode.parentNode.getAttribute('data-order'));">
                     ▼
                   </a>
index 8e285f445733cf5c28ded6387e1bc541521243e4..e06d239d4fe07f8beb6d2e140dde7031abee2cfc 100644 (file)
                                &nbsp;&nbsp;&nbsp;&nbsp;Then click "✚Add Note" button anytime to start composing a private Note (text post) to your Shaarli.
                        </span>
                </a><br><br>
+
+               {if="$sslenabled"}
                <a class="smallbutton" onclick="activateFirefoxSocial(this)">
                        <b>✚Add to Firefox social</b>
                </a>
                <a href="#">
                        <span>&#x21D0; Click on this button to add Shaarli to the "Share this page" button in Firefox.</span>
                </a><br><br>
+               {/if}
 
                {loop="$tools_plugin"}
             {$value}
@@ -64,6 +67,7 @@
                <div class="clear"></div>
 
                <script>
+                       {if="$sslenabled"}
                        function activateFirefoxSocial(node) {
                                var loc = location.href;
                                var baseURL = loc.substring(0, loc.lastIndexOf("/"));
@@ -87,7 +91,7 @@
                                var activate = new CustomEvent("ActivateSocialFeature");
                                node.dispatchEvent(activate);
                        }
-
+                       {/if}
                        function alertBookmarklet() {
                                alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');
                                return false;