aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/container/ShaarliContainer.php1
-rw-r--r--application/front/ShaarliMiddleware.php2
-rw-r--r--application/front/controller/visitor/ShaarliVisitorController.php15
-rw-r--r--application/render/PageBuilder.php4
-rw-r--r--assets/common/js/thumbnails-update.js8
-rw-r--r--assets/default/js/base.js27
-rw-r--r--tests/front/ShaarliMiddlewareTest.php15
-rw-r--r--tests/front/controller/admin/PostBookmarkControllerTest.php19
-rw-r--r--tests/front/controller/admin/SessionFilterControllerTest.php60
-rw-r--r--tests/front/controller/visitor/FrontControllerMockHelper.php2
-rw-r--r--tests/front/controller/visitor/ShaarliVisitorControllerTest.php (renamed from tests/front/controller/visitor/ShaarliPublicControllerTest.php)22
-rw-r--r--tpl/default/404.html2
-rw-r--r--tpl/default/addlink.html2
-rw-r--r--tpl/default/changepassword.html2
-rw-r--r--tpl/default/changetag.html4
-rw-r--r--tpl/default/configure.html6
-rw-r--r--tpl/default/daily.html10
-rw-r--r--tpl/default/editlink.html4
-rw-r--r--tpl/default/error.html2
-rw-r--r--tpl/default/export.html2
-rw-r--r--tpl/default/import.html2
-rw-r--r--tpl/default/includes.html10
-rw-r--r--tpl/default/install.html2
-rw-r--r--tpl/default/linklist.html18
-rw-r--r--tpl/default/linklist.paging.html14
-rw-r--r--tpl/default/page.footer.html5
-rw-r--r--tpl/default/page.header.html22
-rw-r--r--tpl/default/picwall.html4
-rw-r--r--tpl/default/pluginsadmin.html6
-rw-r--r--tpl/default/tag.cloud.html6
-rw-r--r--tpl/default/tag.list.html8
-rw-r--r--tpl/default/tag.sort.html6
-rw-r--r--tpl/default/thumbnails.html2
-rw-r--r--tpl/default/tools.html14
-rw-r--r--tpl/vintage/404.html2
-rw-r--r--tpl/vintage/addlink.html2
-rw-r--r--tpl/vintage/configure.html4
-rw-r--r--tpl/vintage/daily.html20
-rw-r--r--tpl/vintage/editlink.html2
-rw-r--r--tpl/vintage/error.html2
-rw-r--r--tpl/vintage/import.html2
-rw-r--r--tpl/vintage/includes.html4
-rw-r--r--tpl/vintage/linklist.html16
-rw-r--r--tpl/vintage/linklist.paging.html14
-rw-r--r--tpl/vintage/page.footer.html2
-rw-r--r--tpl/vintage/page.header.html18
-rw-r--r--tpl/vintage/picwall.html2
-rw-r--r--tpl/vintage/pluginsadmin.html4
-rw-r--r--tpl/vintage/tag.cloud.html4
-rw-r--r--tpl/vintage/thumbnails.html3
-rw-r--r--tpl/vintage/tools.html12
51 files changed, 205 insertions, 236 deletions
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php
index fec398d0..a95393cd 100644
--- a/application/container/ShaarliContainer.php
+++ b/application/container/ShaarliContainer.php
@@ -22,6 +22,7 @@ use Slim\Container;
22 * Extension of Slim container to document the injected objects. 22 * Extension of Slim container to document the injected objects.
23 * 23 *
24 * @property mixed[] $environment $_SERVER automatically injected by Slim 24 * @property mixed[] $environment $_SERVER automatically injected by Slim
25 * @property string $basePath Shaarli's instance base path (e.g. `/shaarli/`)
25 * @property ConfigManager $conf 26 * @property ConfigManager $conf
26 * @property SessionManager $sessionManager 27 * @property SessionManager $sessionManager
27 * @property LoginManager $loginManager 28 * @property LoginManager $loginManager
diff --git a/application/front/ShaarliMiddleware.php b/application/front/ShaarliMiddleware.php
index f8992e0b..47aa61bb 100644
--- a/application/front/ShaarliMiddleware.php
+++ b/application/front/ShaarliMiddleware.php
@@ -39,6 +39,8 @@ class ShaarliMiddleware
39 public function __invoke(Request $request, Response $response, callable $next) 39 public function __invoke(Request $request, Response $response, callable $next)
40 { 40 {
41 try { 41 try {
42 $this->container->basePath = rtrim($request->getUri()->getBasePath(), '/');
43
42 $response = $next($request, $response); 44 $response = $next($request, $response);
43 } catch (ShaarliFrontException $e) { 45 } catch (ShaarliFrontException $e) {
44 $this->container->pageBuilder->assign('message', $e->getMessage()); 46 $this->container->pageBuilder->assign('message', $e->getMessage());
diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php
index 98423d90..b90b1e8f 100644
--- a/application/front/controller/visitor/ShaarliVisitorController.php
+++ b/application/front/controller/visitor/ShaarliVisitorController.php
@@ -60,6 +60,19 @@ abstract class ShaarliVisitorController
60 $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); 60 $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
61 $this->assignView('plugin_errors', $this->container->pluginManager->getErrors()); 61 $this->assignView('plugin_errors', $this->container->pluginManager->getErrors());
62 62
63 /*
64 * Define base path (if Shaarli is installed in a domain's subfolder, e.g. `/shaarli`)
65 * and the asset path (subfolder/tpl/default for default theme).
66 * These MUST be used to create an internal link or to include an asset in templates.
67 */
68 $this->assignView('base_path', $this->container->basePath);
69 $this->assignView(
70 'asset_path',
71 $this->container->basePath . '/' .
72 rtrim($this->container->conf->get('resource.raintpl_tpl', 'tpl'), '/') . '/' .
73 $this->container->conf->get('resource.theme', 'default')
74 );
75
63 $this->executeDefaultHooks($template); 76 $this->executeDefaultHooks($template);
64 77
65 return $this->container->pageBuilder->render($template); 78 return $this->container->pageBuilder->render($template);
@@ -105,7 +118,7 @@ abstract class ShaarliVisitorController
105 array $clearParams = [], 118 array $clearParams = [],
106 string $anchor = null 119 string $anchor = null
107 ): Response { 120 ): Response {
108 $defaultPath = rtrim($request->getUri()->getBasePath(), '/') . '/'; 121 $defaultPath = $this->container->basePath . '/';
109 $referer = $this->container->environment['HTTP_REFERER'] ?? null; 122 $referer = $this->container->environment['HTTP_REFERER'] ?? null;
110 123
111 if (null !== $referer) { 124 if (null !== $referer) {
diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php
index d90ed58b..2779eb90 100644
--- a/application/render/PageBuilder.php
+++ b/application/render/PageBuilder.php
@@ -149,6 +149,10 @@ class PageBuilder
149 */ 149 */
150 protected function finalize(): void 150 protected function finalize(): void
151 { 151 {
152 //FIXME - DEV _ REMOVE ME
153 $this->assign('base_path', '/Shaarli');
154 $this->assign('asset_path', '/Shaarli/tpl/default');
155
152 // TODO: use the SessionManager 156 // TODO: use the SessionManager
153 $messageKeys = [ 157 $messageKeys = [
154 SessionManager::KEY_SUCCESS_MESSAGES, 158 SessionManager::KEY_SUCCESS_MESSAGES,
diff --git a/assets/common/js/thumbnails-update.js b/assets/common/js/thumbnails-update.js
index 060a730e..35608169 100644
--- a/assets/common/js/thumbnails-update.js
+++ b/assets/common/js/thumbnails-update.js
@@ -10,13 +10,14 @@
10 * It contains a recursive call to retrieve the thumb of the next link when it succeed. 10 * It contains a recursive call to retrieve the thumb of the next link when it succeed.
11 * It also update the progress bar and other visual feedback elements. 11 * It also update the progress bar and other visual feedback elements.
12 * 12 *
13 * @param {string} basePath Shaarli subfolder for XHR requests
13 * @param {array} ids List of LinkID to update 14 * @param {array} ids List of LinkID to update
14 * @param {int} i Current index in ids 15 * @param {int} i Current index in ids
15 * @param {object} elements List of DOM element to avoid retrieving them at each iteration 16 * @param {object} elements List of DOM element to avoid retrieving them at each iteration
16 */ 17 */
17function updateThumb(ids, i, elements) { 18function updateThumb(basePath, ids, i, elements) {
18 const xhr = new XMLHttpRequest(); 19 const xhr = new XMLHttpRequest();
19 xhr.open('POST', './?do=ajax_thumb_update'); 20 xhr.open('POST', `${basePath}/?do=ajax_thumb_update`);
20 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 21 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
21 xhr.responseType = 'json'; 22 xhr.responseType = 'json';
22 xhr.onload = () => { 23 xhr.onload = () => {
@@ -40,6 +41,7 @@ function updateThumb(ids, i, elements) {
40} 41}
41 42
42(() => { 43(() => {
44 const basePath = document.querySelector('input[name="js_base_path"]').value;
43 const ids = document.getElementsByName('ids')[0].value.split(','); 45 const ids = document.getElementsByName('ids')[0].value.split(',');
44 const elements = { 46 const elements = {
45 progressBar: document.querySelector('.progressbar > div'), 47 progressBar: document.querySelector('.progressbar > div'),
@@ -47,5 +49,5 @@ function updateThumb(ids, i, elements) {
47 thumbnail: document.querySelector('.thumbnail-placeholder'), 49 thumbnail: document.querySelector('.thumbnail-placeholder'),
48 title: document.querySelector('.thumbnail-link-title'), 50 title: document.querySelector('.thumbnail-link-title'),
49 }; 51 };
50 updateThumb(ids, 0, elements); 52 updateThumb(basePath, ids, 0, elements);
51})(); 53})();
diff --git a/assets/default/js/base.js b/assets/default/js/base.js
index 8cc7eed5..b428a420 100644
--- a/assets/default/js/base.js
+++ b/assets/default/js/base.js
@@ -25,9 +25,9 @@ function findParent(element, tagName, attributes) {
25/** 25/**
26 * Ajax request to refresh the CSRF token. 26 * Ajax request to refresh the CSRF token.
27 */ 27 */
28function refreshToken() { 28function refreshToken(basePath) {
29 const xhr = new XMLHttpRequest(); 29 const xhr = new XMLHttpRequest();
30 xhr.open('GET', './?do=token'); 30 xhr.open('GET', `${basePath}/?do=token`);
31 xhr.onload = () => { 31 xhr.onload = () => {
32 const token = document.getElementById('token'); 32 const token = document.getElementById('token');
33 token.setAttribute('value', xhr.responseText); 33 token.setAttribute('value', xhr.responseText);
@@ -215,6 +215,8 @@ function init(description) {
215} 215}
216 216
217(() => { 217(() => {
218 const basePath = document.querySelector('input[name="js_base_path"]').value;
219
218 /** 220 /**
219 * Handle responsive menu. 221 * Handle responsive menu.
220 * Source: http://purecss.io/layouts/tucked-menu-vertical/ 222 * Source: http://purecss.io/layouts/tucked-menu-vertical/
@@ -461,7 +463,7 @@ function init(description) {
461 }); 463 });
462 464
463 if (window.confirm(message)) { 465 if (window.confirm(message)) {
464 window.location = `?delete_link&lf_linkdate=${ids.join('+')}&token=${token.value}`; 466 window.location = `${basePath}/?delete_link&lf_linkdate=${ids.join('+')}&token=${token.value}`;
465 } 467 }
466 }); 468 });
467 } 469 }
@@ -483,7 +485,8 @@ function init(description) {
483 }); 485 });
484 486
485 const ids = links.map(item => item.id); 487 const ids = links.map(item => item.id);
486 window.location = `?change_visibility&token=${token.value}&newVisibility=${visibility}&ids=${ids.join('+')}`; 488 window.location =
489 `${basePath}/?change_visibility&token=${token.value}&newVisibility=${visibility}&ids=${ids.join('+')}`;
487 }); 490 });
488 }); 491 });
489 } 492 }
@@ -546,7 +549,7 @@ function init(description) {
546 const refreshedToken = document.getElementById('token').value; 549 const refreshedToken = document.getElementById('token').value;
547 const fromtag = block.getAttribute('data-tag'); 550 const fromtag = block.getAttribute('data-tag');
548 const xhr = new XMLHttpRequest(); 551 const xhr = new XMLHttpRequest();
549 xhr.open('POST', './manage-tags'); 552 xhr.open('POST', `${basePath}/manage-tags`);
550 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 553 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
551 xhr.onload = () => { 554 xhr.onload = () => {
552 if (xhr.status !== 200) { 555 if (xhr.status !== 200) {
@@ -558,8 +561,12 @@ function init(description) {
558 input.setAttribute('value', totag); 561 input.setAttribute('value', totag);
559 findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none'; 562 findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none';
560 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag); 563 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag);
561 block.querySelector('a.tag-link').setAttribute('href', `./?searchtags=${encodeURIComponent(totag)}`); 564 block
562 block.querySelector('a.rename-tag').setAttribute('href', `./manage-tags?fromtag=${encodeURIComponent(totag)}`); 565 .querySelector('a.tag-link')
566 .setAttribute('href', `${basePath}/?searchtags=${encodeURIComponent(totag)}`);
567 block
568 .querySelector('a.rename-tag')
569 .setAttribute('href', `${basePath}/manage-tags?fromtag=${encodeURIComponent(totag)}`);
563 570
564 // Refresh awesomplete values 571 // Refresh awesomplete values
565 existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag)); 572 existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag));
@@ -567,7 +574,7 @@ function init(description) {
567 } 574 }
568 }; 575 };
569 xhr.send(`renametag=1&fromtag=${encodeURIComponent(fromtag)}&totag=${encodeURIComponent(totag)}&token=${refreshedToken}`); 576 xhr.send(`renametag=1&fromtag=${encodeURIComponent(fromtag)}&totag=${encodeURIComponent(totag)}&token=${refreshedToken}`);
570 refreshToken(); 577 refreshToken(basePath);
571 }); 578 });
572 }); 579 });
573 580
@@ -593,13 +600,13 @@ function init(description) {
593 600
594 if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) { 601 if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) {
595 const xhr = new XMLHttpRequest(); 602 const xhr = new XMLHttpRequest();
596 xhr.open('POST', './manage-tags'); 603 xhr.open('POST', `${basePath}/manage-tags`);
597 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 604 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
598 xhr.onload = () => { 605 xhr.onload = () => {
599 block.remove(); 606 block.remove();
600 }; 607 };
601 xhr.send(encodeURI(`deletetag=1&fromtag=${tag}&token=${refreshedToken}`)); 608 xhr.send(encodeURI(`deletetag=1&fromtag=${tag}&token=${refreshedToken}`));
602 refreshToken(); 609 refreshToken(basePath);
603 610
604 existingTags = existingTags.filter(tagItem => tagItem !== tag); 611 existingTags = existingTags.filter(tagItem => tagItem !== tag);
605 awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes); 612 awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes);
diff --git a/tests/front/ShaarliMiddlewareTest.php b/tests/front/ShaarliMiddlewareTest.php
index 80974f37..57be1002 100644
--- a/tests/front/ShaarliMiddlewareTest.php
+++ b/tests/front/ShaarliMiddlewareTest.php
@@ -11,6 +11,7 @@ use Shaarli\Front\Exception\LoginBannedException;
11use Shaarli\Render\PageBuilder; 11use Shaarli\Render\PageBuilder;
12use Slim\Http\Request; 12use Slim\Http\Request;
13use Slim\Http\Response; 13use Slim\Http\Response;
14use Slim\Http\Uri;
14 15
15class ShaarliMiddlewareTest extends TestCase 16class ShaarliMiddlewareTest extends TestCase
16{ 17{
@@ -29,6 +30,13 @@ class ShaarliMiddlewareTest extends TestCase
29 public function testMiddlewareExecution(): void 30 public function testMiddlewareExecution(): void
30 { 31 {
31 $request = $this->createMock(Request::class); 32 $request = $this->createMock(Request::class);
33 $request->method('getUri')->willReturnCallback(function (): Uri {
34 $uri = $this->createMock(Uri::class);
35 $uri->method('getBasePath')->willReturn('/subfolder');
36
37 return $uri;
38 });
39
32 $response = new Response(); 40 $response = new Response();
33 $controller = function (Request $request, Response $response): Response { 41 $controller = function (Request $request, Response $response): Response {
34 return $response->withStatus(418); // I'm a tea pot 42 return $response->withStatus(418); // I'm a tea pot
@@ -44,6 +52,13 @@ class ShaarliMiddlewareTest extends TestCase
44 public function testMiddlewareExecutionWithException(): void 52 public function testMiddlewareExecutionWithException(): void
45 { 53 {
46 $request = $this->createMock(Request::class); 54 $request = $this->createMock(Request::class);
55 $request->method('getUri')->willReturnCallback(function (): Uri {
56 $uri = $this->createMock(Uri::class);
57 $uri->method('getBasePath')->willReturn('/subfolder');
58
59 return $uri;
60 });
61
47 $response = new Response(); 62 $response = new Response();
48 $controller = function (): void { 63 $controller = function (): void {
49 $exception = new LoginBannedException(); 64 $exception = new LoginBannedException();
diff --git a/tests/front/controller/admin/PostBookmarkControllerTest.php b/tests/front/controller/admin/PostBookmarkControllerTest.php
index f00a15c9..69673bd2 100644
--- a/tests/front/controller/admin/PostBookmarkControllerTest.php
+++ b/tests/front/controller/admin/PostBookmarkControllerTest.php
@@ -13,7 +13,6 @@ use Shaarli\Security\SessionManager;
13use Shaarli\Thumbnailer; 13use Shaarli\Thumbnailer;
14use Slim\Http\Request; 14use Slim\Http\Request;
15use Slim\Http\Response; 15use Slim\Http\Response;
16use Slim\Http\Uri;
17 16
18class PostBookmarkControllerTest extends TestCase 17class PostBookmarkControllerTest extends TestCase
19{ 18{
@@ -406,12 +405,6 @@ class PostBookmarkControllerTest extends TestCase
406 return $parameters[$key] ?? null; 405 return $parameters[$key] ?? null;
407 }) 406 })
408 ; 407 ;
409 $request->method('getUri')->willReturnCallback(function (): Uri {
410 $uri = $this->createMock(Uri::class);
411 $uri->method('getBasePath')->willReturn('/subfolder');
412
413 return $uri;
414 });
415 $response = new Response(); 408 $response = new Response();
416 409
417 $checkBookmark = function (Bookmark $bookmark) use ($parameters) { 410 $checkBookmark = function (Bookmark $bookmark) use ($parameters) {
@@ -493,12 +486,6 @@ class PostBookmarkControllerTest extends TestCase
493 return $parameters[$key] ?? null; 486 return $parameters[$key] ?? null;
494 }) 487 })
495 ; 488 ;
496 $request->method('getUri')->willReturnCallback(function (): Uri {
497 $uri = $this->createMock(Uri::class);
498 $uri->method('getBasePath')->willReturn('/subfolder');
499
500 return $uri;
501 });
502 $response = new Response(); 489 $response = new Response();
503 490
504 $checkBookmark = function (Bookmark $bookmark) use ($parameters, $id) { 491 $checkBookmark = function (Bookmark $bookmark) use ($parameters, $id) {
@@ -575,12 +562,6 @@ class PostBookmarkControllerTest extends TestCase
575 return $parameters[$key] ?? null; 562 return $parameters[$key] ?? null;
576 }) 563 })
577 ; 564 ;
578 $request->method('getUri')->willReturnCallback(function (): Uri {
579 $uri = $this->createMock(Uri::class);
580 $uri->method('getBasePath')->willReturn('/subfolder');
581
582 return $uri;
583 });
584 $response = new Response(); 565 $response = new Response();
585 566
586 $this->container->conf = $this->createMock(ConfigManager::class); 567 $this->container->conf = $this->createMock(ConfigManager::class);
diff --git a/tests/front/controller/admin/SessionFilterControllerTest.php b/tests/front/controller/admin/SessionFilterControllerTest.php
index 096963cf..ea07edee 100644
--- a/tests/front/controller/admin/SessionFilterControllerTest.php
+++ b/tests/front/controller/admin/SessionFilterControllerTest.php
@@ -9,7 +9,6 @@ use Shaarli\Security\LoginManager;
9use Shaarli\Security\SessionManager; 9use Shaarli\Security\SessionManager;
10use Slim\Http\Request; 10use Slim\Http\Request;
11use Slim\Http\Response; 11use Slim\Http\Response;
12use Slim\Http\Uri;
13 12
14class SessionFilterControllerTest extends TestCase 13class SessionFilterControllerTest extends TestCase
15{ 14{
@@ -33,12 +32,6 @@ class SessionFilterControllerTest extends TestCase
33 $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; 32 $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
34 33
35 $request = $this->createMock(Request::class); 34 $request = $this->createMock(Request::class);
36 $request->method('getUri')->willReturnCallback(function (): Uri {
37 $uri = $this->createMock(Uri::class);
38 $uri->method('getBasePath')->willReturn('/subfolder');
39
40 return $uri;
41 });
42 $request->method('getParam')->with('nb')->willReturn('8'); 35 $request->method('getParam')->with('nb')->willReturn('8');
43 $response = new Response(); 36 $response = new Response();
44 37
@@ -61,12 +54,6 @@ class SessionFilterControllerTest extends TestCase
61 public function testLinksPerPageNotValid(): void 54 public function testLinksPerPageNotValid(): void
62 { 55 {
63 $request = $this->createMock(Request::class); 56 $request = $this->createMock(Request::class);
64 $request->method('getUri')->willReturnCallback(function (): Uri {
65 $uri = $this->createMock(Uri::class);
66 $uri->method('getBasePath')->willReturn('/subfolder');
67
68 return $uri;
69 });
70 $request->method('getParam')->with('nb')->willReturn('test'); 57 $request->method('getParam')->with('nb')->willReturn('test');
71 $response = new Response(); 58 $response = new Response();
72 59
@@ -80,7 +67,7 @@ class SessionFilterControllerTest extends TestCase
80 67
81 static::assertInstanceOf(Response::class, $result); 68 static::assertInstanceOf(Response::class, $result);
82 static::assertSame(302, $result->getStatusCode()); 69 static::assertSame(302, $result->getStatusCode());
83 static::assertSame(['/subfolder'], $result->getHeader('location')); 70 static::assertSame(['/subfolder/'], $result->getHeader('location'));
84 } 71 }
85 72
86 /** 73 /**
@@ -100,12 +87,6 @@ class SessionFilterControllerTest extends TestCase
100 ; 87 ;
101 88
102 $request = $this->createMock(Request::class); 89 $request = $this->createMock(Request::class);
103 $request->method('getUri')->willReturnCallback(function (): Uri {
104 $uri = $this->createMock(Uri::class);
105 $uri->method('getBasePath')->willReturn('/subfolder');
106
107 return $uri;
108 });
109 $response = new Response(); 90 $response = new Response();
110 91
111 $result = $this->controller->visibility($request, $response, $arg); 92 $result = $this->controller->visibility($request, $response, $arg);
@@ -141,12 +122,6 @@ class SessionFilterControllerTest extends TestCase
141 ; 122 ;
142 123
143 $request = $this->createMock(Request::class); 124 $request = $this->createMock(Request::class);
144 $request->method('getUri')->willReturnCallback(function (): Uri {
145 $uri = $this->createMock(Uri::class);
146 $uri->method('getBasePath')->willReturn('/subfolder');
147
148 return $uri;
149 });
150 $response = new Response(); 125 $response = new Response();
151 126
152 $result = $this->controller->visibility($request, $response, $arg); 127 $result = $this->controller->visibility($request, $response, $arg);
@@ -176,19 +151,13 @@ class SessionFilterControllerTest extends TestCase
176 ; 151 ;
177 152
178 $request = $this->createMock(Request::class); 153 $request = $this->createMock(Request::class);
179 $request->method('getUri')->willReturnCallback(function (): Uri {
180 $uri = $this->createMock(Uri::class);
181 $uri->method('getBasePath')->willReturn('/subfolder');
182
183 return $uri;
184 });
185 $response = new Response(); 154 $response = new Response();
186 155
187 $result = $this->controller->visibility($request, $response, $arg); 156 $result = $this->controller->visibility($request, $response, $arg);
188 157
189 static::assertInstanceOf(Response::class, $result); 158 static::assertInstanceOf(Response::class, $result);
190 static::assertSame(302, $result->getStatusCode()); 159 static::assertSame(302, $result->getStatusCode());
191 static::assertSame(['/subfolder'], $result->getHeader('location')); 160 static::assertSame(['/subfolder/'], $result->getHeader('location'));
192 } 161 }
193 162
194 /** 163 /**
@@ -212,12 +181,6 @@ class SessionFilterControllerTest extends TestCase
212 ; 181 ;
213 182
214 $request = $this->createMock(Request::class); 183 $request = $this->createMock(Request::class);
215 $request->method('getUri')->willReturnCallback(function (): Uri {
216 $uri = $this->createMock(Uri::class);
217 $uri->method('getBasePath')->willReturn('/subfolder');
218
219 return $uri;
220 });
221 $response = new Response(); 184 $response = new Response();
222 185
223 $result = $this->controller->visibility($request, $response, $arg); 186 $result = $this->controller->visibility($request, $response, $arg);
@@ -249,12 +212,6 @@ class SessionFilterControllerTest extends TestCase
249 ; 212 ;
250 213
251 $request = $this->createMock(Request::class); 214 $request = $this->createMock(Request::class);
252 $request->method('getUri')->willReturnCallback(function (): Uri {
253 $uri = $this->createMock(Uri::class);
254 $uri->method('getBasePath')->willReturn('/subfolder');
255
256 return $uri;
257 });
258 $response = new Response(); 215 $response = new Response();
259 216
260 $result = $this->controller->visibility($request, $response, $arg); 217 $result = $this->controller->visibility($request, $response, $arg);
@@ -272,12 +229,6 @@ class SessionFilterControllerTest extends TestCase
272 $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; 229 $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
273 230
274 $request = $this->createMock(Request::class); 231 $request = $this->createMock(Request::class);
275 $request->method('getUri')->willReturnCallback(function (): Uri {
276 $uri = $this->createMock(Uri::class);
277 $uri->method('getBasePath')->willReturn('/subfolder');
278
279 return $uri;
280 });
281 $response = new Response(); 232 $response = new Response();
282 233
283 $this->container->sessionManager 234 $this->container->sessionManager
@@ -301,13 +252,6 @@ class SessionFilterControllerTest extends TestCase
301 $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; 252 $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
302 253
303 $request = $this->createMock(Request::class); 254 $request = $this->createMock(Request::class);
304 $request->method('getUri')->willReturnCallback(function (): Uri {
305 $uri = $this->createMock(Uri::class);
306 $uri->method('getBasePath')->willReturn('/subfolder');
307
308 return $uri;
309 });
310
311 $response = new Response(); 255 $response = new Response();
312 256
313 $this->container->sessionManager 257 $this->container->sessionManager
diff --git a/tests/front/controller/visitor/FrontControllerMockHelper.php b/tests/front/controller/visitor/FrontControllerMockHelper.php
index fecd0c82..7f560662 100644
--- a/tests/front/controller/visitor/FrontControllerMockHelper.php
+++ b/tests/front/controller/visitor/FrontControllerMockHelper.php
@@ -81,6 +81,8 @@ trait FrontControllerMockHelper
81 'SERVER_PORT' => '80', 81 'SERVER_PORT' => '80',
82 'REQUEST_URI' => '/daily-rss', 82 'REQUEST_URI' => '/daily-rss',
83 ]; 83 ];
84
85 $this->container->basePath = '/subfolder';
84 } 86 }
85 87
86 /** 88 /**
diff --git a/tests/front/controller/visitor/ShaarliPublicControllerTest.php b/tests/front/controller/visitor/ShaarliVisitorControllerTest.php
index 899b280b..83d08358 100644
--- a/tests/front/controller/visitor/ShaarliPublicControllerTest.php
+++ b/tests/front/controller/visitor/ShaarliVisitorControllerTest.php
@@ -8,15 +8,14 @@ use PHPUnit\Framework\TestCase;
8use Shaarli\Bookmark\BookmarkFilter; 8use Shaarli\Bookmark\BookmarkFilter;
9use Slim\Http\Request; 9use Slim\Http\Request;
10use Slim\Http\Response; 10use Slim\Http\Response;
11use Slim\Http\Uri;
12 11
13/** 12/**
14 * Class ShaarliControllerTest 13 * Class ShaarliControllerTest
15 * 14 *
16 * This class is used to test default behavior of ShaarliController abstract class. 15 * This class is used to test default behavior of ShaarliVisitorController abstract class.
17 * It uses a dummy non abstract controller. 16 * It uses a dummy non abstract controller.
18 */ 17 */
19class ShaarliPublicControllerTest extends TestCase 18class ShaarliVisitorControllerTest extends TestCase
20{ 19{
21 use FrontControllerMockHelper; 20 use FrontControllerMockHelper;
22 21
@@ -49,20 +48,15 @@ class ShaarliPublicControllerTest extends TestCase
49 Request $request, 48 Request $request,
50 Response $response, 49 Response $response,
51 array $loopTerms = [], 50 array $loopTerms = [],
52 array $clearParams = [] 51 array $clearParams = [],
52 string $anchor = null
53 ): Response { 53 ): Response {
54 return parent::redirectFromReferer($request, $response, $loopTerms, $clearParams); 54 return parent::redirectFromReferer($request, $response, $loopTerms, $clearParams, $anchor);
55 } 55 }
56 }; 56 };
57 $this->assignedValues = []; 57 $this->assignedValues = [];
58 58
59 $this->request = $this->createMock(Request::class); 59 $this->request = $this->createMock(Request::class);
60 $this->request->method('getUri')->willReturnCallback(function (): Uri {
61 $uri = $this->createMock(Uri::class);
62 $uri->method('getBasePath')->willReturn('/subfolder');
63
64 return $uri;
65 });
66 } 60 }
67 61
68 public function testAssignView(): void 62 public function testAssignView(): void
@@ -102,6 +96,8 @@ class ShaarliPublicControllerTest extends TestCase
102 static::assertSame(10, $this->assignedValues['linkcount']); 96 static::assertSame(10, $this->assignedValues['linkcount']);
103 static::assertSame(5, $this->assignedValues['privateLinkcount']); 97 static::assertSame(5, $this->assignedValues['privateLinkcount']);
104 static::assertSame(['error'], $this->assignedValues['plugin_errors']); 98 static::assertSame(['error'], $this->assignedValues['plugin_errors']);
99 static::assertSame('/subfolder', $this->assignedValues['base_path']);
100 static::assertSame('/subfolder/tpl/default', $this->assignedValues['asset_path']);
105 101
106 static::assertSame('templateName', $this->assignedValues['plugins_includes']['render_includes']['target']); 102 static::assertSame('templateName', $this->assignedValues['plugins_includes']['render_includes']['target']);
107 static::assertTrue($this->assignedValues['plugins_includes']['render_includes']['loggedin']); 103 static::assertTrue($this->assignedValues['plugins_includes']['render_includes']['loggedin']);
@@ -153,7 +149,7 @@ class ShaarliPublicControllerTest extends TestCase
153 $result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'controller']); 149 $result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'controller']);
154 150
155 static::assertSame(302, $result->getStatusCode()); 151 static::assertSame(302, $result->getStatusCode());
156 static::assertSame(['/subfolder'], $result->getHeader('location')); 152 static::assertSame(['/subfolder/'], $result->getHeader('location'));
157 } 153 }
158 154
159 /** 155 /**
@@ -168,7 +164,7 @@ class ShaarliPublicControllerTest extends TestCase
168 $result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'other']); 164 $result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'other']);
169 165
170 static::assertSame(302, $result->getStatusCode()); 166 static::assertSame(302, $result->getStatusCode());
171 static::assertSame(['/subfolder'], $result->getHeader('location')); 167 static::assertSame(['/subfolder/'], $result->getHeader('location'));
172 } 168 }
173 169
174 /** 170 /**
diff --git a/tpl/default/404.html b/tpl/default/404.html
index 09737b4b..7b696e4c 100644
--- a/tpl/default/404.html
+++ b/tpl/default/404.html
@@ -8,7 +8,7 @@
8 {include="page.header"} 8 {include="page.header"}
9<div id="pageError" class="page-error-container center"> 9<div id="pageError" class="page-error-container center">
10 <h2>{'Sorry, nothing to see here.'|t}</h2> 10 <h2>{'Sorry, nothing to see here.'|t}</h2>
11 <img src="img/sad_star.png" alt=""> 11 <img src="{$asset_path}/img/sad_star.png#" alt="">
12 <p>{$error_message}</p> 12 <p>{$error_message}</p>
13</div> 13</div>
14{include="page.footer"} 14{include="page.footer"}
diff --git a/tpl/default/addlink.html b/tpl/default/addlink.html
index 999d2f4d..c37827f4 100644
--- a/tpl/default/addlink.html
+++ b/tpl/default/addlink.html
@@ -9,7 +9,7 @@
9 <div class="pure-u-lg-1-3 pure-u-1-24"></div> 9 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24"> 10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
11 <h2 class="window-title">{"Shaare a new link"|t}</h2> 11 <h2 class="window-title">{"Shaare a new link"|t}</h2>
12 <form method="GET" action="./shaare" name="addform" class="addform"> 12 <form method="GET" action="{$base_path}/shaare" name="addform" class="addform">
13 <div> 13 <div>
14 <label for="shaare">{'URL or leave empty to post a note'|t}</label> 14 <label for="shaare">{'URL or leave empty to post a note'|t}</label>
15 <input type="text" name="post" id="shaare" class="autofocus"> 15 <input type="text" name="post" id="shaare" class="autofocus">
diff --git a/tpl/default/changepassword.html b/tpl/default/changepassword.html
index ab579433..80d2f2e1 100644
--- a/tpl/default/changepassword.html
+++ b/tpl/default/changepassword.html
@@ -9,7 +9,7 @@
9 <div class="pure-u-lg-1-3 pure-u-1-24"></div> 9 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24"> 10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
11 <h2 class="window-title">{"Change password"|t}</h2> 11 <h2 class="window-title">{"Change password"|t}</h2>
12 <form method="POST" action="#" name="changepasswordform" id="changepasswordform"> 12 <form method="POST" action="{$base_path}/password" name="changepasswordform" id="changepasswordform">
13 <div> 13 <div>
14 <input type="password" name="oldpassword" aria-label="{'Current password'|t}" placeholder="{'Current password'|t}" class="autofocus"> 14 <input type="password" name="oldpassword" aria-label="{'Current password'|t}" placeholder="{'Current password'|t}" class="autofocus">
15 </div> 15 </div>
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html
index a1a572ca..4e3059d3 100644
--- a/tpl/default/changetag.html
+++ b/tpl/default/changetag.html
@@ -9,7 +9,7 @@
9 <div class="pure-u-lg-1-3 pure-u-1-24"></div> 9 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24"> 10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
11 <h2 class="window-title">{"Manage tags"|t}</h2> 11 <h2 class="window-title">{"Manage tags"|t}</h2>
12 <form method="POST" action="#" name="changetag" id="changetag"> 12 <form method="POST" action="{$base_path}/manage-tags" name="changetag" id="changetag">
13 <div> 13 <div>
14 <input type="text" name="fromtag" aria-label="{'Tag'|t}" placeholder="{'Tag'|t}" value="{$fromtag}" 14 <input type="text" name="fromtag" aria-label="{'Tag'|t}" placeholder="{'Tag'|t}" value="{$fromtag}"
15 list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1"> 15 list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1">
@@ -32,7 +32,7 @@
32 </div> 32 </div>
33 </form> 33 </form>
34 34
35 <p>{'You can also edit tags in the'|t} <a href="./tag-list?sort=usage">{'tag list'|t}</a>.</p> 35 <p>{'You can also edit tags in the'|t} <a href="{$base_path}/tag-list?sort=usage">{'tag list'|t}</a>.</p>
36 </div> 36 </div>
37</div> 37</div>
38{include="page.footer"} 38{include="page.footer"}
diff --git a/tpl/default/configure.html b/tpl/default/configure.html
index 46bef052..9b4401a4 100644
--- a/tpl/default/configure.html
+++ b/tpl/default/configure.html
@@ -11,7 +11,7 @@
11{$ratioInput='7-12'} 11{$ratioInput='7-12'}
12{$ratioInputMobile='1-8'} 12{$ratioInputMobile='1-8'}
13 13
14<form method="POST" action="#" name="configform" id="configform"> 14<form method="POST" action="{$base_path}/configure" name="configform" id="configform">
15 <div class="pure-g"> 15 <div class="pure-g">
16 <div class="pure-u-lg-1-8 pure-u-1-24"></div> 16 <div class="pure-u-lg-1-8 pure-u-1-24"></div>
17 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete"> 17 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
@@ -35,7 +35,7 @@
35 <div class="form-label"> 35 <div class="form-label">
36 <label for="titleLink"> 36 <label for="titleLink">
37 <span class="label-name">{'Home link'|t}</span><br> 37 <span class="label-name">{'Home link'|t}</span><br>
38 <span class="label-desc">{'Default value'|t}: ./</span> 38 <span class="label-desc">{'Default value'|t}: {$base_path}</span>
39 </label> 39 </label>
40 </div> 40 </div>
41 </div> 41 </div>
@@ -289,7 +289,7 @@
289 {if="! $gd_enabled"} 289 {if="! $gd_enabled"}
290 {'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t} 290 {'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
291 {elseif="$thumbnails_enabled"} 291 {elseif="$thumbnails_enabled"}
292 <a href="./?do=thumbs_update">{'Synchronize thumbnails'|t}</a> 292 <a href="{$base_path}/?do=thumbs_update">{'Synchronize thumbnails'|t}</a>
293 {/if} 293 {/if}
294 </span> 294 </span>
295 </label> 295 </label>
diff --git a/tpl/default/daily.html b/tpl/default/daily.html
index 9ccd1e61..aa34bd1c 100644
--- a/tpl/default/daily.html
+++ b/tpl/default/daily.html
@@ -11,7 +11,7 @@
11 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily"> 11 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily">
12 <h2 class="window-title"> 12 <h2 class="window-title">
13 {'The Daily Shaarli'|t} 13 {'The Daily Shaarli'|t}
14 <a href="./daily-rss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a> 14 <a href="{$base_path}/daily-rss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a>
15 </h2> 15 </h2>
16 16
17 <div id="plugin_zone_start_daily" class="plugin_zone"> 17 <div id="plugin_zone_start_daily" class="plugin_zone">
@@ -25,7 +25,7 @@
25 <div class="pure-g"> 25 <div class="pure-g">
26 <div class="pure-u-lg-1-3 pure-u-1 center"> 26 <div class="pure-u-lg-1-3 pure-u-1 center">
27 {if="$previousday"} 27 {if="$previousday"}
28 <a href="./daily?day={$previousday}"> 28 <a href="{$base_path}/daily?day={$previousday}">
29 <i class="fa fa-arrow-left"></i> 29 <i class="fa fa-arrow-left"></i>
30 {'Previous day'|t} 30 {'Previous day'|t}
31 </a> 31 </a>
@@ -36,7 +36,7 @@
36 </div> 36 </div>
37 <div class="pure-u-lg-1-3 pure-u-1 center"> 37 <div class="pure-u-lg-1-3 pure-u-1 center">
38 {if="$nextday"} 38 {if="$nextday"}
39 <a href="./daily?day={$nextday}"> 39 <a href="{$base_path}/daily?day={$nextday}">
40 {'Next day'|t} 40 {'Next day'|t}
41 <i class="fa fa-arrow-right"></i> 41 <i class="fa fa-arrow-right"></i>
42 </a> 42 </a>
@@ -69,7 +69,7 @@
69 {$link=$value} 69 {$link=$value}
70 <div class="daily-entry"> 70 <div class="daily-entry">
71 <div class="daily-entry-title center"> 71 <div class="daily-entry-title center">
72 <a href="./?{$link.shorturl}" title="{'Permalink'|t}"> 72 <a href="{$base_path}/?{$link.shorturl}" title="{'Permalink'|t}">
73 <i class="fa fa-link"></i> 73 <i class="fa fa-link"></i>
74 </a> 74 </a>
75 <a href="{$link.real_url}">{$link.title}</a> 75 <a href="{$link.real_url}">{$link.title}</a>
@@ -116,7 +116,7 @@
116 </div> 116 </div>
117</div> 117</div>
118{include="page.footer"} 118{include="page.footer"}
119<script src="js/thumbnails.min.js?v={$version_hash}"></script> 119<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
120</body> 120</body>
121</html> 121</html>
122 122
diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html
index 9f6d6b74..f3adcbb0 100644
--- a/tpl/default/editlink.html
+++ b/tpl/default/editlink.html
@@ -9,7 +9,7 @@
9 <div class="pure-u-lg-1-5 pure-u-1-24"></div> 9 <div class="pure-u-lg-1-5 pure-u-1-24"></div>
10 <form method="post" 10 <form method="post"
11 name="linkform" 11 name="linkform"
12 action="./shaare" 12 action="{$base_path}/shaare"
13 class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light" 13 class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light"
14 > 14 >
15 <h2 class="window-title"> 15 <h2 class="window-title">
@@ -73,7 +73,7 @@
73 <input type="submit" name="save_edit" class="" id="button-save-edit" 73 <input type="submit" name="save_edit" class="" id="button-save-edit"
74 value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}"> 74 value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}">
75 {if="!$link_is_new"} 75 {if="!$link_is_new"}
76 <a href="?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}" 76 <a href="{$base_path}/?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}"
77 title="" name="delete_link" class="button button-red confirm-delete"> 77 title="" name="delete_link" class="button button-red confirm-delete">
78 {'Delete'|t} 78 {'Delete'|t}
79 </a> 79 </a>
diff --git a/tpl/default/error.html b/tpl/default/error.html
index ef1dfd73..4abac9ca 100644
--- a/tpl/default/error.html
+++ b/tpl/default/error.html
@@ -15,7 +15,7 @@
15 </pre> 15 </pre>
16 {/if} 16 {/if}
17 17
18 <img src="img/sad_star.png" alt=""> 18 <img src="{asset_path}/img/sad_star.png#" alt="">
19</div> 19</div>
20{include="page.footer"} 20{include="page.footer"}
21</body> 21</body>
diff --git a/tpl/default/export.html b/tpl/default/export.html
index 99c01b11..91cf78b6 100644
--- a/tpl/default/export.html
+++ b/tpl/default/export.html
@@ -6,7 +6,7 @@
6<body> 6<body>
7{include="page.header"} 7{include="page.header"}
8 8
9<form method="GET" action="#" name="exportform" id="exportform"> 9<form method="GET" action="{$base_path}/?do=export" name="exportform" id="exportform">
10 <div class="pure-g"> 10 <div class="pure-g">
11 <div class="pure-u-lg-1-4 pure-u-1-24"></div> 11 <div class="pure-u-lg-1-4 pure-u-1-24"></div>
12 <div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete"> 12 <div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
diff --git a/tpl/default/import.html b/tpl/default/import.html
index 3d8610f0..97203d93 100644
--- a/tpl/default/import.html
+++ b/tpl/default/import.html
@@ -6,7 +6,7 @@
6<body> 6<body>
7{include="page.header"} 7{include="page.header"}
8 8
9<form method="POST" action="./?do=import" enctype="multipart/form-data" name="uploadform" id="uploadform"> 9<form method="POST" action="{$base_path}/?do=import" enctype="multipart/form-data" name="uploadform" id="uploadform">
10 <div class="pure-g"> 10 <div class="pure-g">
11 <div class="pure-u-lg-1-4 pure-u-1-24"></div> 11 <div class="pure-u-lg-1-4 pure-u-1-24"></div>
12 <div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete"> 12 <div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
diff --git a/tpl/default/includes.html b/tpl/default/includes.html
index 07a487bb..0f6a6628 100644
--- a/tpl/default/includes.html
+++ b/tpl/default/includes.html
@@ -5,11 +5,11 @@
5<meta name="referrer" content="same-origin"> 5<meta name="referrer" content="same-origin">
6<link rel="alternate" type="application/atom+xml" href="{$feedurl}feed-atom?{$searchcrits}#" title="ATOM Feed" /> 6<link rel="alternate" type="application/atom+xml" href="{$feedurl}feed-atom?{$searchcrits}#" title="ATOM Feed" />
7<link rel="alternate" type="application/rss+xml" href="{$feedurl}feed-rss?{$searchcrits}#" title="RSS Feed" /> 7<link rel="alternate" type="application/rss+xml" href="{$feedurl}feed-rss?{$searchcrits}#" title="RSS Feed" />
8<link href="img/favicon.png" rel="shortcut icon" type="image/png" /> 8<link href="{$asset_path}/img/favicon.png#" rel="shortcut icon" type="image/png" />
9<link href="img/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" /> 9<link href="{$asset_path}/img/apple-touch-icon.png#" rel="apple-touch-icon" sizes="180x180" />
10<link type="text/css" rel="stylesheet" href="css/shaarli.min.css?v={$version_hash}" /> 10<link type="text/css" rel="stylesheet" href="{$asset_path}/css/shaarli.min.css?v={$version_hash}#" />
11{if="$formatter==='markdown'"} 11{if="$formatter==='markdown'"}
12 <link type="text/css" rel="stylesheet" href="css/markdown.min.css?v={$version_hash}" /> 12 <link type="text/css" rel="stylesheet" href="{$asset_path}/css/markdown.min.css?v={$version_hash}#" />
13{/if} 13{/if}
14{loop="$plugins_includes.css_files"} 14{loop="$plugins_includes.css_files"}
15 <link type="text/css" rel="stylesheet" href="{$value}?v={$version_hash}#"/> 15 <link type="text/css" rel="stylesheet" href="{$value}?v={$version_hash}#"/>
@@ -17,7 +17,7 @@
17{if="is_file('data/user.css')"} 17{if="is_file('data/user.css')"}
18 <link type="text/css" rel="stylesheet" href="data/user.css#" /> 18 <link type="text/css" rel="stylesheet" href="data/user.css#" />
19{/if} 19{/if}
20<link rel="search" type="application/opensearchdescription+xml" href="./open-search#" 20<link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#"
21 title="Shaarli search - {$shaarlititle}" /> 21 title="Shaarli search - {$shaarlititle}" />
22{if="! empty($links) && count($links) === 1"} 22{if="! empty($links) && count($links) === 1"}
23 {$link=reset($links)} 23 {$link=reset($links)}
diff --git a/tpl/default/install.html b/tpl/default/install.html
index c6f501f0..6f96c019 100644
--- a/tpl/default/install.html
+++ b/tpl/default/install.html
@@ -10,7 +10,7 @@
10{$ratioLabelMobile='7-8'} 10{$ratioLabelMobile='7-8'}
11{$ratioInputMobile='1-8'} 11{$ratioInputMobile='1-8'}
12 12
13<form method="POST" action="#" name="installform" id="installform"> 13<form method="POST" action="{$base_path}/?do=install" name="installform" id="installform">
14<div class="pure-g"> 14<div class="pure-g">
15 <div class="pure-u-lg-1-6 pure-u-1-24"></div> 15 <div class="pure-u-lg-1-6 pure-u-1-24"></div>
16 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-form-complete"> 16 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-form-complete">
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html
index e574a109..89513595 100644
--- a/tpl/default/linklist.html
+++ b/tpl/default/linklist.html
@@ -94,7 +94,7 @@
94 {'tagged'|t} 94 {'tagged'|t}
95 {loop="$exploded_tags"} 95 {loop="$exploded_tags"}
96 <span class="label label-tag" title="{'Remove tag'|t}"> 96 <span class="label label-tag" title="{'Remove tag'|t}">
97 <a href="./remove-tag/{function="urlencode($value)"}" aria-label="{'Remove tag'|t}"> 97 <a href="{$base_path}/remove-tag/{function="urlencode($value)"}" aria-label="{'Remove tag'|t}">
98 {$value}<span class="remove"><i class="fa fa-times" aria-hidden="true"></i></span> 98 {$value}<span class="remove"><i class="fa fa-times" aria-hidden="true"></i></span>
99 </a> 99 </a>
100 </span> 100 </span>
@@ -183,7 +183,7 @@
183 {$tag_counter=count($value.taglist)} 183 {$tag_counter=count($value.taglist)}
184 {loop="value.taglist"} 184 {loop="value.taglist"}
185 <span class="label label-tag" title="{$strAddTag}"> 185 <span class="label label-tag" title="{$strAddTag}">
186 <a href="./add-tag/{$value|urlencode}">{$value}</a> 186 <a href="{$base_path}/add-tag/{$value|urlencode}">{$value}</a>
187 </span> 187 </span>
188 {if="$tag_counter - 1 != $counter"}&middot;{/if} 188 {if="$tag_counter - 1 != $counter"}&middot;{/if}
189 {/loop} 189 {/loop}
@@ -198,16 +198,16 @@
198 <input type="checkbox" class="link-checkbox" value="{$value.id}"> 198 <input type="checkbox" class="link-checkbox" value="{$value.id}">
199 </span> 199 </span>
200 <span class="linklist-item-infos-controls-item ctrl-edit"> 200 <span class="linklist-item-infos-controls-item ctrl-edit">
201 <a href="?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a> 201 <a href="{$base_path}/?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a>
202 </span> 202 </span>
203 <span class="linklist-item-infos-controls-item ctrl-delete"> 203 <span class="linklist-item-infos-controls-item ctrl-delete">
204 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}" aria-label="{$strDelete}" 204 <a href="{$base_path}/?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}" aria-label="{$strDelete}"
205 title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete"> 205 title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete">
206 <i class="fa fa-trash" aria-hidden="true"></i> 206 <i class="fa fa-trash" aria-hidden="true"></i>
207 </a> 207 </a>
208 </span> 208 </span>
209 <span class="linklist-item-infos-controls-item ctrl-pin"> 209 <span class="linklist-item-infos-controls-item ctrl-pin">
210 <a href="./?do=pin&amp;id={$value.id}&amp;token={$token}" 210 <a href="{$base_path}/?do=pin&amp;id={$value.id}&amp;token={$token}"
211 title="{$strToggleSticky}" aria-label="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible"> 211 title="{$strToggleSticky}" aria-label="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible">
212 <i class="fa fa-thumb-tack" aria-hidden="true"></i> 212 <i class="fa fa-thumb-tack" aria-hidden="true"></i>
213 </a> 213 </a>
@@ -224,7 +224,7 @@
224 </div> 224 </div>
225 {/if} 225 {/if}
226 {/if} 226 {/if}
227 <a href="?{$value.shorturl}" title="{$strPermalink}"> 227 <a href="{$base_path}/?{$value.shorturl}" title="{$strPermalink}">
228 {if="!$hide_timestamps || $is_logged_in"} 228 {if="!$hide_timestamps || $is_logged_in"}
229 {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink} 229 {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink}
230 <span class="linkdate" title="{$updated}"> 230 <span class="linkdate" title="{$updated}">
@@ -267,12 +267,12 @@
267 {/if} 267 {/if}
268 {if="$is_logged_in"} 268 {if="$is_logged_in"}
269 &middot; 269 &middot;
270 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}" aria-label="{$strDelete}" 270 <a href="{$base_path}/?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}" aria-label="{$strDelete}"
271 title="{$strDelete}" class="delete-link confirm-delete"> 271 title="{$strDelete}" class="delete-link confirm-delete">
272 <i class="fa fa-trash" aria-hidden="true"></i> 272 <i class="fa fa-trash" aria-hidden="true"></i>
273 </a> 273 </a>
274 &middot; 274 &middot;
275 <a href="?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a> 275 <a href="{$base_path}/?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a>
276 {/if} 276 {/if}
277 </div> 277 </div>
278 </div> 278 </div>
@@ -297,6 +297,6 @@
297</div> 297</div>
298 298
299{include="page.footer"} 299{include="page.footer"}
300<script src="js/thumbnails.min.js?v={$version_hash}"></script> 300<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
301</body> 301</body>
302</html> 302</html>
diff --git a/tpl/default/linklist.paging.html b/tpl/default/linklist.paging.html
index 2b601725..e1952b79 100644
--- a/tpl/default/linklist.paging.html
+++ b/tpl/default/linklist.paging.html
@@ -6,14 +6,14 @@
6 {'Filters'|t} 6 {'Filters'|t}
7 </span> 7 </span>
8 {if="$is_logged_in"} 8 {if="$is_logged_in"}
9 <a href="./visibility/private" aria-label="{'Only display private links'|t}" title="{'Only display private links'|t}" 9 <a href="{$base_path}/visibility/private" aria-label="{'Only display private links'|t}" title="{'Only display private links'|t}"
10 class="{if="$visibility==='private'"}filter-on{else}filter-off{/if}" 10 class="{if="$visibility==='private'"}filter-on{else}filter-off{/if}"
11 ><i class="fa fa-user-secret" aria-hidden="true"></i></a> 11 ><i class="fa fa-user-secret" aria-hidden="true"></i></a>
12 <a href="./visibility/public" aria-label="{'Only display public links'|t}" title="{'Only display public links'|t}" 12 <a href="{$base_path}/visibility/public" aria-label="{'Only display public links'|t}" title="{'Only display public links'|t}"
13 class="{if="$visibility==='public'"}filter-on{else}filter-off{/if}" 13 class="{if="$visibility==='public'"}filter-on{else}filter-off{/if}"
14 ><i class="fa fa-globe" aria-hidden="true"></i></a> 14 ><i class="fa fa-globe" aria-hidden="true"></i></a>
15 {/if} 15 {/if}
16 <a href="./untagged-only" aria-label="{'Filter untagged links'|t}" title="{'Filter untagged links'|t}" 16 <a href="{$base_path}/untagged-only" aria-label="{'Filter untagged links'|t}" title="{'Filter untagged links'|t}"
17 class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if} 17 class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if}
18 ><i class="fa fa-tag" aria-hidden="true"></i></a> 18 ><i class="fa fa-tag" aria-hidden="true"></i></a>
19 <a href="#" aria-label="{'Select all'|t}" title="{'Select all'|t}" 19 <a href="#" aria-label="{'Select all'|t}" title="{'Select all'|t}"
@@ -53,10 +53,10 @@
53 53
54 <div class="linksperpage pure-u-1-3"> 54 <div class="linksperpage pure-u-1-3">
55 <div class="pure-u-0 pure-u-lg-visible">{'Links per page'|t}</div> 55 <div class="pure-u-0 pure-u-lg-visible">{'Links per page'|t}</div>
56 <a href="./links-per-page?nb=20">20</a> 56 <a href="{$base_path}/links-per-page?nb=20">20</a>
57 <a href="./links-per-page?nb=50">50</a> 57 <a href="{$base_path}/links-per-page?nb=50">50</a>
58 <a href="./links-per-page?nb=100">100</a> 58 <a href="{$base_path}/links-per-page?nb=100">100</a>
59 <form method="GET" class="pure-u-0 pure-u-lg-visible" action="./links-per-page"> 59 <form method="GET" class="pure-u-0 pure-u-lg-visible" action="{$base_path}/links-per-page">
60 <input type="text" name="nb" placeholder="133"> 60 <input type="text" name="nb" placeholder="133">
61 </form> 61 </form>
62 <a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" aria-label="{'Fold all'|t}" title="{'Fold all'|t}"> 62 <a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" aria-label="{'Fold all'|t}" title="{'Fold all'|t}">
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html
index 0899826b..d72917de 100644
--- a/tpl/default/page.footer.html
+++ b/tpl/default/page.footer.html
@@ -10,7 +10,7 @@
10 {/if} 10 {/if}
11 &middot; 11 &middot;
12 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} &middot; 12 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} &middot;
13 <a href="doc/html/index.html" rel="nofollow">{'Documentation'|t}</a> 13 <a href="{$base_path}/doc/html/index.html" rel="nofollow">{'Documentation'|t}</a>
14 {loop="$plugins_footer.text"} 14 {loop="$plugins_footer.text"}
15 {$value} 15 {$value}
16 {/loop} 16 {/loop}
@@ -39,4 +39,5 @@
39 </span> 39 </span>
40</div> 40</div>
41 41
42<script src="js/shaarli.min.js?v={$version_hash}"></script> 42<input type="hidden" name="js_base_path" value="{$base_path}" />
43<script src="{$asset_path}/js/shaarli.min.js?v={$version_hash}#"></script>
diff --git a/tpl/default/page.header.html b/tpl/default/page.header.html
index cf59e89d..7117e3ca 100644
--- a/tpl/default/page.header.html
+++ b/tpl/default/page.header.html
@@ -21,24 +21,24 @@
21 </li> 21 </li>
22 {if="$is_logged_in || $openshaarli"} 22 {if="$is_logged_in || $openshaarli"}
23 <li class="pure-menu-item"> 23 <li class="pure-menu-item">
24 <a href="./add-shaare" class="pure-menu-link" id="shaarli-menu-shaare"> 24 <a href="{$base_path}/add-shaare" class="pure-menu-link" id="shaarli-menu-shaare">
25 <i class="fa fa-plus" aria-hidden="true"></i> {'Shaare'|t} 25 <i class="fa fa-plus" aria-hidden="true"></i> {'Shaare'|t}
26 </a> 26 </a>
27 </li> 27 </li>
28 <li class="pure-menu-item" id="shaarli-menu-tools"> 28 <li class="pure-menu-item" id="shaarli-menu-tools">
29 <a href="./tools" class="pure-menu-link">{'Tools'|t}</a> 29 <a href="{$base_path}/tools" class="pure-menu-link">{'Tools'|t}</a>
30 </li> 30 </li>
31 {/if} 31 {/if}
32 <li class="pure-menu-item" id="shaarli-menu-tags"> 32 <li class="pure-menu-item" id="shaarli-menu-tags">
33 <a href="./tag-cloud" class="pure-menu-link">{'Tag cloud'|t}</a> 33 <a href="{$base_path}/tag-cloud" class="pure-menu-link">{'Tag cloud'|t}</a>
34 </li> 34 </li>
35 {if="$thumbnails_enabled"} 35 {if="$thumbnails_enabled"}
36 <li class="pure-menu-item" id="shaarli-menu-picwall"> 36 <li class="pure-menu-item" id="shaarli-menu-picwall">
37 <a href="./picture-wall?{function="ltrim($searchcrits, '&')"}" class="pure-menu-link">{'Picture wall'|t}</a> 37 <a href="{$base_path}/picture-wall?{function="ltrim($searchcrits, '&')"}" class="pure-menu-link">{'Picture wall'|t}</a>
38 </li> 38 </li>
39 {/if} 39 {/if}
40 <li class="pure-menu-item" id="shaarli-menu-daily"> 40 <li class="pure-menu-item" id="shaarli-menu-daily">
41 <a href="./daily" class="pure-menu-link">{'Daily'|t}</a> 41 <a href="{$base_path}/daily" class="pure-menu-link">{'Daily'|t}</a>
42 </li> 42 </li>
43 {loop="$plugins_header.buttons_toolbar"} 43 {loop="$plugins_header.buttons_toolbar"}
44 <li class="pure-menu-item shaarli-menu-plugin"> 44 <li class="pure-menu-item shaarli-menu-plugin">
@@ -52,15 +52,15 @@
52 </li> 52 </li>
53 {/loop} 53 {/loop}
54 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss"> 54 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss">
55 <a href="./feed-{$feed_type}?{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a> 55 <a href="{$base_path}/feed-{$feed_type}?{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a>
56 </li> 56 </li>
57 {if="$is_logged_in"} 57 {if="$is_logged_in"}
58 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout"> 58 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout">
59 <a href="./logout" class="pure-menu-link">{'Logout'|t}</a> 59 <a href="{$base_path}/logout" class="pure-menu-link">{'Logout'|t}</a>
60 </li> 60 </li>
61 {else} 61 {else}
62 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login"> 62 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login">
63 <a href="./login" class="pure-menu-link">{'Login'|t}</a> 63 <a href="{$base_path}/login" class="pure-menu-link">{'Login'|t}</a>
64 </li> 64 </li>
65 {/if} 65 {/if}
66 </ul> 66 </ul>
@@ -74,13 +74,13 @@
74 </a> 74 </a>
75 </li> 75 </li>
76 <li class="pure-menu-item" id="shaarli-menu-desktop-rss"> 76 <li class="pure-menu-item" id="shaarli-menu-desktop-rss">
77 <a href="./feed-{$feed_type}?{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}" aria-label="{'RSS Feed'|t}"> 77 <a href="{$base_path}/feed-{$feed_type}?{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}" aria-label="{'RSS Feed'|t}">
78 <i class="fa fa-rss" aria-hidden="true"></i> 78 <i class="fa fa-rss" aria-hidden="true"></i>
79 </a> 79 </a>
80 </li> 80 </li>
81 {if="!$is_logged_in"} 81 {if="!$is_logged_in"}
82 <li class="pure-menu-item" id="shaarli-menu-desktop-login"> 82 <li class="pure-menu-item" id="shaarli-menu-desktop-login">
83 <a href="./login" class="pure-menu-link" 83 <a href="{$base_path}/login" class="pure-menu-link"
84 data-open-id="header-login-form" 84 data-open-id="header-login-form"
85 id="login-button" aria-label="{'Login'|t}" title="{'Login'|t}"> 85 id="login-button" aria-label="{'Login'|t}" title="{'Login'|t}">
86 <i class="fa fa-user" aria-hidden="true"></i> 86 <i class="fa fa-user" aria-hidden="true"></i>
@@ -88,7 +88,7 @@
88 </li> 88 </li>
89 {else} 89 {else}
90 <li class="pure-menu-item" id="shaarli-menu-desktop-logout"> 90 <li class="pure-menu-item" id="shaarli-menu-desktop-logout">
91 <a href="./logout" class="pure-menu-link" aria-label="{'Logout'|t}" title="{'Logout'|t}"> 91 <a href="{$base_path}/logout" class="pure-menu-link" aria-label="{'Logout'|t}" title="{'Logout'|t}">
92 <i class="fa fa-sign-out" aria-hidden="true"></i> 92 <i class="fa fa-sign-out" aria-hidden="true"></i>
93 </a> 93 </a>
94 </li> 94 </li>
diff --git a/tpl/default/picwall.html b/tpl/default/picwall.html
index 5343abd6..1e97b366 100644
--- a/tpl/default/picwall.html
+++ b/tpl/default/picwall.html
@@ -9,7 +9,7 @@
9{if="count($linksToDisplay)===0 && $is_logged_in"} 9{if="count($linksToDisplay)===0 && $is_logged_in"}
10 <div class="pure-g pure-alert pure-alert-warning page-single-alert"> 10 <div class="pure-g pure-alert pure-alert-warning page-single-alert">
11 <div class="pure-u-1 center"> 11 <div class="pure-u-1 center">
12 {'There is no cached thumbnail. Try to <a href="./?do=thumbs_update">synchronize them</a>.'|t} 12 {'There is no cached thumbnail. Try to <a href="{$base_path}/do=thumbs_update">synchronize them</a>.'|t}
13 </div> 13 </div>
14 </div> 14 </div>
15{/if} 15{/if}
@@ -52,7 +52,7 @@
52</div> 52</div>
53 53
54{include="page.footer"} 54{include="page.footer"}
55<script src="js/thumbnails.min.js?v={$version_hash}"></script> 55<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
56</body> 56</body>
57</html> 57</html>
58 58
diff --git a/tpl/default/pluginsadmin.html b/tpl/default/pluginsadmin.html
index a017a2ce..1536c311 100644
--- a/tpl/default/pluginsadmin.html
+++ b/tpl/default/pluginsadmin.html
@@ -16,7 +16,7 @@
16 <div class="clear"></div> 16 <div class="clear"></div>
17</noscript> 17</noscript>
18 18
19<form method="POST" action="./?do=save_pluginadmin" name="pluginform" id="pluginform" class="pluginform-container"> 19<form method="POST" action="{$base_path}/?do=save_pluginadmin" name="pluginform" id="pluginform" class="pluginform-container">
20 <div class="pure-g"> 20 <div class="pure-g">
21 <div class="pure-u-lg-1-8 pure-u-1-24"></div> 21 <div class="pure-u-lg-1-8 pure-u-1-24"></div>
22 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete"> 22 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
@@ -127,7 +127,7 @@
127 <input type="hidden" name="token" value="{$token}"> 127 <input type="hidden" name="token" value="{$token}">
128</form> 128</form>
129 129
130<form action="./?do=save_pluginadmin" method="POST"> 130<form action="{$base_path}/?do=save_pluginadmin" method="POST">
131 <div class="pure-g"> 131 <div class="pure-g">
132 <div class="pure-u-lg-1-8 pure-u-1-24"></div> 132 <div class="pure-u-lg-1-8 pure-u-1-24"></div>
133 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-light"> 133 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-light">
@@ -176,7 +176,7 @@
176</form> 176</form>
177 177
178{include="page.footer"} 178{include="page.footer"}
179<script src="js/pluginsadmin.min.js?v={$version_hash}"></script> 179<script src="{$asset_path}/js/pluginsadmin.min.js?v={$version_hash}#"></script>
180 180
181</body> 181</body>
182</html> 182</html>
diff --git a/tpl/default/tag.cloud.html b/tpl/default/tag.cloud.html
index bf543357..024882ec 100644
--- a/tpl/default/tag.cloud.html
+++ b/tpl/default/tag.cloud.html
@@ -15,7 +15,7 @@
15 <h2 class="window-title">{'Tag cloud'|t} - {$countTags} {'tags'|t}</h2> 15 <h2 class="window-title">{'Tag cloud'|t} - {$countTags} {'tags'|t}</h2>
16 {if="!empty($search_tags)"} 16 {if="!empty($search_tags)"}
17 <p class="center"> 17 <p class="center">
18 <a href="./?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli"> 18 <a href="{$base_path}/?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
19 {'List all links with those tags'|t} 19 {'List all links with those tags'|t}
20 </a> 20 </a>
21 </p> 21 </p>
@@ -48,8 +48,8 @@
48 48
49 <div id="cloudtag" class="cloudtag-container"> 49 <div id="cloudtag" class="cloudtag-container">
50 {loop="tags"} 50 {loop="tags"}
51 <a href="./?searchtags={$key|urlencode} {$search_tags|urlencode}" style="font-size:{$value.size}em;">{$key}</a 51 <a href="{$base_path}/?searchtags={$key|urlencode} {$search_tags|urlencode}" style="font-size:{$value.size}em;">{$key}</a
52 ><a href="./add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value.count}</a> 52 ><a href="{$base_path}/add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value.count}</a>
53 {loop="$value.tag_plugin"} 53 {loop="$value.tag_plugin"}
54 {$value} 54 {$value}
55 {/loop} 55 {/loop}
diff --git a/tpl/default/tag.list.html b/tpl/default/tag.list.html
index 3adcfd1f..51f42333 100644
--- a/tpl/default/tag.list.html
+++ b/tpl/default/tag.list.html
@@ -15,7 +15,7 @@
15 <h2 class="window-title">{'Tag list'|t} - {$countTags} {'tags'|t}</h2> 15 <h2 class="window-title">{'Tag list'|t} - {$countTags} {'tags'|t}</h2>
16 {if="!empty($search_tags)"} 16 {if="!empty($search_tags)"}
17 <p class="center"> 17 <p class="center">
18 <a href="./?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli"> 18 <a href="{$base_path}/?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
19 {'List all links with those tags'|t} 19 {'List all links with those tags'|t}
20 </a> 20 </a>
21 </p> 21 </p>
@@ -51,13 +51,13 @@
51 <div class="pure-u-1"> 51 <div class="pure-u-1">
52 {if="$is_logged_in===true"} 52 {if="$is_logged_in===true"}
53 <a href="#" class="delete-tag" aria-label="{'Delete'|t}"><i class="fa fa-trash" aria-hidden="true"></i></a>&nbsp;&nbsp; 53 <a href="#" class="delete-tag" aria-label="{'Delete'|t}"><i class="fa fa-trash" aria-hidden="true"></i></a>&nbsp;&nbsp;
54 <a href="./manage-tags?fromtag={$key|urlencode}" class="rename-tag" aria-label="{'Rename tag'|t}"> 54 <a href="{$base_path}/manage-tags?fromtag={$key|urlencode}" class="rename-tag" aria-label="{'Rename tag'|t}">
55 <i class="fa fa-pencil-square-o {$key}" aria-hidden="true"></i> 55 <i class="fa fa-pencil-square-o {$key}" aria-hidden="true"></i>
56 </a> 56 </a>
57 {/if} 57 {/if}
58 58
59 <a href="./add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value}</a> 59 <a href="{$base_path}/add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value}</a>
60 <a href="./?searchtags={$key|urlencode} {$search_tags|urlencode}" class="tag-link">{$key}</a> 60 <a href="{$base_path}/?searchtags={$key|urlencode} {$search_tags|urlencode}" class="tag-link">{$key}</a>
61 61
62 {loop="$value.tag_plugin"} 62 {loop="$value.tag_plugin"}
63 {$value} 63 {$value}
diff --git a/tpl/default/tag.sort.html b/tpl/default/tag.sort.html
index f467e34a..6cb1a114 100644
--- a/tpl/default/tag.sort.html
+++ b/tpl/default/tag.sort.html
@@ -1,8 +1,8 @@
1<div class="pure-g"> 1<div class="pure-g">
2 <div class="pure-u-1 pure-alert pure-alert-success tag-sort"> 2 <div class="pure-u-1 pure-alert pure-alert-success tag-sort">
3 {'Sort by:'|t} 3 {'Sort by:'|t}
4 <a href="./tag-cloud">{'Cloud'|t}</a> &middot; 4 <a href="{$base_path}/tag-cloud">{'Cloud'|t}</a> &middot;
5 <a href="./tag-list?sort=usage">{'Most used'|t}</a> &middot; 5 <a href="{$base_path}/tag-list?sort=usage">{'Most used'|t}</a> &middot;
6 <a href="./tag-list?sort=alpha">{'Alphabetical'|t}</a> 6 <a href="{$base_path}/tag-list?sort=alpha">{'Alphabetical'|t}</a>
7 </div> 7 </div>
8</div> 8</div>
diff --git a/tpl/default/thumbnails.html b/tpl/default/thumbnails.html
index 5f9bef08..504644ca 100644
--- a/tpl/default/thumbnails.html
+++ b/tpl/default/thumbnails.html
@@ -43,6 +43,6 @@
43</div> 43</div>
44 44
45{include="page.footer"} 45{include="page.footer"}
46<script src="js/thumbnails_update.min.js?v={$version_hash}"></script> 46<script src="{$asset_path}/js/thumbnails_update.min.js?v={$version_hash}#"></script>
47</body> 47</body>
48</html> 48</html>
diff --git a/tpl/default/tools.html b/tpl/default/tools.html
index 6e432e00..296abed1 100644
--- a/tpl/default/tools.html
+++ b/tpl/default/tools.html
@@ -11,35 +11,35 @@
11 <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light"> 11 <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
12 <h2 class="window-title">{'Settings'|t}</h2> 12 <h2 class="window-title">{'Settings'|t}</h2>
13 <div class="tools-item"> 13 <div class="tools-item">
14 <a href="./configure" title="{'Change Shaarli settings: title, timezone, etc.'|t}"> 14 <a href="{$base_path}/configure" title="{'Change Shaarli settings: title, timezone, etc.'|t}">
15 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Configure your Shaarli'|t}</span> 15 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Configure your Shaarli'|t}</span>
16 </a> 16 </a>
17 </div> 17 </div>
18 <div class="tools-item"> 18 <div class="tools-item">
19 <a href="./?do=pluginadmin" title="{'Enable, disable and configure plugins'|t}"> 19 <a href="{$base_path}/?do=pluginadmin" title="{'Enable, disable and configure plugins'|t}">
20 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Plugin administration'|t}</span> 20 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Plugin administration'|t}</span>
21 </a> 21 </a>
22 </div> 22 </div>
23 {if="!$openshaarli"} 23 {if="!$openshaarli"}
24 <div class="tools-item"> 24 <div class="tools-item">
25 <a href="./?do=changepasswd" title="{'Change your password'|t}"> 25 <a href="{$base_path}/?do=changepasswd" title="{'Change your password'|t}">
26 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Change password'|t}</span> 26 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Change password'|t}</span>
27 </a> 27 </a>
28 </div> 28 </div>
29 {/if} 29 {/if}
30 <div class="tools-item"> 30 <div class="tools-item">
31 <a href="./manage-tags" title="{'Rename or delete a tag in all links'|t}"> 31 <a href="{$base_path}/manage-tags" title="{'Rename or delete a tag in all links'|t}">
32 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Manage tags'|t}</span> 32 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Manage tags'|t}</span>
33 </a> 33 </a>
34 </div> 34 </div>
35 <div class="tools-item"> 35 <div class="tools-item">
36 <a href="./?do=import" 36 <a href="{$base_path}/?do=import"
37 title="{'Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)'|t}"> 37 title="{'Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)'|t}">
38 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Import links'|t}</span> 38 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Import links'|t}</span>
39 </a> 39 </a>
40 </div> 40 </div>
41 <div class="tools-item"> 41 <div class="tools-item">
42 <a href="./?do=export" 42 <a href="{$base_path}/?do=export"
43 title="{'Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)'|t}"> 43 title="{'Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)'|t}">
44 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Export database'|t}</span> 44 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Export database'|t}</span>
45 </a> 45 </a>
@@ -47,7 +47,7 @@
47 47
48 {if="$thumbnails_enabled"} 48 {if="$thumbnails_enabled"}
49 <div class="tools-item"> 49 <div class="tools-item">
50 <a href="./?do=thumbs_update" title="{'Synchronize all link thumbnails'|t}"> 50 <a href="{$base_path}/?do=thumbs_update" title="{'Synchronize all link thumbnails'|t}">
51 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Synchronize thumbnails'|t}</span> 51 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Synchronize thumbnails'|t}</span>
52 </a> 52 </a>
53 </div> 53 </div>
diff --git a/tpl/vintage/404.html b/tpl/vintage/404.html
index 53e98e2e..0fef0f08 100644
--- a/tpl/vintage/404.html
+++ b/tpl/vintage/404.html
@@ -10,7 +10,7 @@
10<div class="error-container"> 10<div class="error-container">
11 <h1>404 Not found <small>Oh crap!</small></h1> 11 <h1>404 Not found <small>Oh crap!</small></h1>
12 <p>{$error_message}</p> 12 <p>{$error_message}</p>
13 <p>Would you mind <a href="?">clicking here</a>?</p> 13 <p>Would you mind <a href="{$base_path}/">clicking here</a>?</p>
14</div> 14</div>
15{include="page.footer"} 15{include="page.footer"}
16</body> 16</body>
diff --git a/tpl/vintage/addlink.html b/tpl/vintage/addlink.html
index 13dbb36e..e1d65225 100644
--- a/tpl/vintage/addlink.html
+++ b/tpl/vintage/addlink.html
@@ -5,7 +5,7 @@
5<div id="pageheader"> 5<div id="pageheader">
6 {include="page.header"} 6 {include="page.header"}
7 <div id="headerform"> 7 <div id="headerform">
8 <form method="GET" action="./shaare" name="addform" class="addform"> 8 <form method="GET" action="{$base_path}/shaare" name="addform" class="addform">
9 <input type="text" name="post" class="linkurl"> 9 <input type="text" name="post" class="linkurl">
10 <input type="submit" value="Add link" class="bigbutton"> 10 <input type="submit" value="Add link" class="bigbutton">
11 </form> 11 </form>
diff --git a/tpl/vintage/configure.html b/tpl/vintage/configure.html
index a87fdce7..d04c69a9 100644
--- a/tpl/vintage/configure.html
+++ b/tpl/vintage/configure.html
@@ -16,7 +16,7 @@
16 <tr> 16 <tr>
17 <td><b>Home link:</b></td> 17 <td><b>Home link:</b></td>
18 <td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label 18 <td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label
19 for="titleLink">(default value is: ./)</label></td> 19 for="titleLink">(default value is: {$base_path}/)</label></td>
20 </tr> 20 </tr>
21 21
22 <tr> 22 <tr>
@@ -159,7 +159,7 @@
159 {if="! $gd_enabled"} 159 {if="! $gd_enabled"}
160 {'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t} 160 {'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
161 {elseif="$thumbnails_enabled"} 161 {elseif="$thumbnails_enabled"}
162 <a href="./?do=thumbs_update">{'Synchonize thumbnails'|t}</a> 162 <a href="{$base_path}/?do=thumbs_update">{'Synchonize thumbnails'|t}</a>
163 {/if} 163 {/if}
164 </label> 164 </label>
165 </td> 165 </td>
diff --git a/tpl/vintage/daily.html b/tpl/vintage/daily.html
index a459e21a..74f6cdc7 100644
--- a/tpl/vintage/daily.html
+++ b/tpl/vintage/daily.html
@@ -14,9 +14,9 @@
14 14
15 <div class="dailyAbout"> 15 <div class="dailyAbout">
16 All links of one day<br>in a single page.<br> 16 All links of one day<br>in a single page.<br>
17 {if="$previousday"} <a href="./daily&amp;day={$previousday}"><b>&lt;</b>Previous day</a>{else}<b>&lt;</b>Previous day{/if} 17 {if="$previousday"} <a href="{$base_path}/daily&amp;day={$previousday}"><b>&lt;</b>Previous day</a>{else}<b>&lt;</b>Previous day{/if}
18 - 18 -
19 {if="$nextday"}<a href="./daily&amp;day={$nextday}">Next day<b>&gt;</b></a>{else}Next day<b>&gt;</b>{/if} 19 {if="$nextday"}<a href="{$base_path}/daily&amp;day={$nextday}">Next day<b>&gt;</b></a>{else}Next day<b>&gt;</b>{/if}
20 <br> 20 <br>
21 21
22 {loop="$daily_about_plugin"} 22 {loop="$daily_about_plugin"}
@@ -24,13 +24,13 @@
24 {/loop} 24 {/loop}
25 25
26 <br> 26 <br>
27 <a href="./daily-rss" title="1 RSS entry per day"><img src="img/feed-icon-14x14.png" alt="rss_feed">Daily RSS Feed</a> 27 <a href="{$base_path}/daily-rss" title="1 RSS entry per day"><img src="{$asset_path}/img/feed-icon-14x14.png#" alt="rss_feed">Daily RSS Feed</a>
28 </div> 28 </div>
29 29
30 <div class="dailyTitle"> 30 <div class="dailyTitle">
31 <img src="img/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left"> 31 <img src="{$asset_path}/img/floral_left.png#" width="51" height="50" class="nomobile" alt="floral_left">
32 The Daily Shaarli 32 The Daily Shaarli
33 <img src="img/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right"> 33 <img src="{$asset_path}/img/floral_right.png#" width="51" height="50" class="nomobile" alt="floral_right">
34 </div> 34 </div>
35 35
36 <div class="dailyDate"> 36 <div class="dailyDate">
@@ -52,13 +52,13 @@
52 {$link=$value} 52 {$link=$value}
53 <div class="dailyEntry"> 53 <div class="dailyEntry">
54 <div class="dailyEntryPermalink"> 54 <div class="dailyEntryPermalink">
55 <a href="?{$value.shorturl}"> 55 <a href="{$base_path}/?{$value.shorturl}">
56 <img src="img/squiggle.png" width="25" height="26" title="permalink" alt="permalink"> 56 <img src="{$asset_path}/img/squiggle.png#" width="25" height="26" title="permalink" alt="permalink">
57 </a> 57 </a>
58 </div> 58 </div>
59 {if="!$hide_timestamps || $is_logged_in"} 59 {if="!$hide_timestamps || $is_logged_in"}
60 <div class="dailyEntryLinkdate"> 60 <div class="dailyEntryLinkdate">
61 <a href="?{$value.shorturl}">{function="strftime('%c', $link.timestamp)"}</a> 61 <a href="{$base_path}/?{$value.shorturl}">{function="strftime('%c', $link.timestamp)"}</a>
62 </div> 62 </div>
63 {/if} 63 {/if}
64 {if="$link.tags"} 64 {if="$link.tags"}
@@ -101,9 +101,9 @@
101 {$value} 101 {$value}
102 {/loop} 102 {/loop}
103 </div> 103 </div>
104 <div id="closing"><img src="img/squiggle_closing.png" width="66" height="61" alt="-"></div> 104 <div id="closing"><img src="{$asset_path}/img/squiggle_closing.png#" width="66" height="61" alt="-"></div>
105</div> 105</div>
106{include="page.footer"} 106{include="page.footer"}
107<script src="js/thumbnails.min.js?v={$version_hash}"></script> 107<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
108</body> 108</body>
109</html> 109</html>
diff --git a/tpl/vintage/editlink.html b/tpl/vintage/editlink.html
index 6f7a330f..593fe71a 100644
--- a/tpl/vintage/editlink.html
+++ b/tpl/vintage/editlink.html
@@ -48,7 +48,7 @@
48 {/if} 48 {/if}
49 <input type="submit" value="Save" name="save_edit" class="bigbutton"> 49 <input type="submit" value="Save" name="save_edit" class="bigbutton">
50 {if="!$link_is_new && isset($link.id)"} 50 {if="!$link_is_new && isset($link.id)"}
51 <a href="?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}" 51 <a href="{$base_path}/?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}"
52 name="delete_link" class="bigbutton" 52 name="delete_link" class="bigbutton"
53 onClick="return confirmDeleteLink();"> 53 onClick="return confirmDeleteLink();">
54 {'Delete'|t} 54 {'Delete'|t}
diff --git a/tpl/vintage/error.html b/tpl/vintage/error.html
index b6e62be0..64f54cd2 100644
--- a/tpl/vintage/error.html
+++ b/tpl/vintage/error.html
@@ -18,7 +18,7 @@
18 </pre> 18 </pre>
19 {/if} 19 {/if}
20 20
21 <p>Would you mind <a href="?">clicking here</a>?</p> 21 <p>Would you mind <a href="{$base_path}/">clicking here</a>?</p>
22</div> 22</div>
23{include="page.footer"} 23{include="page.footer"}
24</body> 24</body>
diff --git a/tpl/vintage/import.html b/tpl/vintage/import.html
index 2ab2cc0a..a2e37751 100644
--- a/tpl/vintage/import.html
+++ b/tpl/vintage/import.html
@@ -6,7 +6,7 @@
6 {include="page.header"} 6 {include="page.header"}
7 <div id="uploaddiv"> 7 <div id="uploaddiv">
8 Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize}). 8 Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize}).
9 <form method="POST" action="./?do=import" enctype="multipart/form-data" 9 <form method="POST" action="{$base_path}/?do=import" enctype="multipart/form-data"
10 name="uploadform" id="uploadform"> 10 name="uploadform" id="uploadform">
11 <input type="hidden" name="token" value="{$token}"> 11 <input type="hidden" name="token" value="{$token}">
12 <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}"> 12 <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}">
diff --git a/tpl/vintage/includes.html b/tpl/vintage/includes.html
index 61448eaf..7c4d9311 100644
--- a/tpl/vintage/includes.html
+++ b/tpl/vintage/includes.html
@@ -8,13 +8,13 @@
8<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" /> 8<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
9<link type="text/css" rel="stylesheet" href="css/shaarli.min.css" /> 9<link type="text/css" rel="stylesheet" href="css/shaarli.min.css" />
10{if="$formatter==='markdown'"} 10{if="$formatter==='markdown'"}
11 <link type="text/css" rel="stylesheet" href="css/markdown.min.css?v={$version_hash}" /> 11 <link type="text/css" rel="stylesheet" href="{$asset_path}/css/markdown.min.css?v={$version_hash}#" />
12{/if} 12{/if}
13{loop="$plugins_includes.css_files"} 13{loop="$plugins_includes.css_files"}
14<link type="text/css" rel="stylesheet" href="{$value}#"/> 14<link type="text/css" rel="stylesheet" href="{$value}#"/>
15{/loop} 15{/loop}
16{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if} 16{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if}
17<link rel="search" type="application/opensearchdescription+xml" href="./open-search#" 17<link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#"
18 title="Shaarli search - {$shaarlititle|htmlspecialchars}" /> 18 title="Shaarli search - {$shaarlititle|htmlspecialchars}" />
19{if="! empty($links) && count($links) === 1"} 19{if="! empty($links) && count($links) === 1"}
20 {$link=reset($links)} 20 {$link=reset($links)}
diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html
index 502abcf9..8db8f70b 100644
--- a/tpl/vintage/linklist.html
+++ b/tpl/vintage/linklist.html
@@ -66,12 +66,12 @@
66 tagged 66 tagged
67 {loop="$exploded_tags"} 67 {loop="$exploded_tags"}
68 <span class="linktag" title="Remove tag"> 68 <span class="linktag" title="Remove tag">
69 <a href="./remove-tag/{function="urlencode($value)"}">{$value} <span class="remove">x</span></a> 69 <a href="{$base_path}/remove-tag/{function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
70 </span> 70 </span>
71 {/loop} 71 {/loop}
72 {elseif="$search_tags === false"} 72 {elseif="$search_tags === false"}
73 <span class="linktag" title="Remove tag"> 73 <span class="linktag" title="Remove tag">
74 <a href="?">untagged <span class="remove">x</span></a> 74 <a href="{$base_path}/">untagged <span class="remove">x</span></a>
75 </span> 75 </span>
76 {/if} 76 {/if}
77 </div> 77 </div>
@@ -95,13 +95,13 @@
95 <div class="linkeditbuttons"> 95 <div class="linkeditbuttons">
96 <form method="GET" class="buttoneditform"> 96 <form method="GET" class="buttoneditform">
97 <input type="hidden" name="edit_link" value="{$value.id}"> 97 <input type="hidden" name="edit_link" value="{$value.id}">
98 <input type="image" alt="Edit" src="img/edit_icon.png" title="Edit" class="button_edit"> 98 <input type="image" alt="Edit" src="{$asset_path}/img/edit_icon.png#" title="Edit" class="button_edit">
99 </form><br> 99 </form><br>
100 <form method="GET" class="buttoneditform"> 100 <form method="GET" class="buttoneditform">
101 <input type="hidden" name="lf_linkdate" value="{$value.id}"> 101 <input type="hidden" name="lf_linkdate" value="{$value.id}">
102 <input type="hidden" name="token" value="{$token}"> 102 <input type="hidden" name="token" value="{$token}">
103 <input type="hidden" name="delete_link"> 103 <input type="hidden" name="delete_link">
104 <input type="image" alt="Delete" src="img/delete_icon.png" title="Delete" 104 <input type="image" alt="Delete" src="{$asset_path}/img/delete_icon.png#" title="Delete"
105 class="button_delete" onClick="return confirmDeleteLink();"> 105 class="button_delete" onClick="return confirmDeleteLink();">
106 </form> 106 </form>
107 </div> 107 </div>
@@ -114,7 +114,7 @@
114 {if="!$hide_timestamps || $is_logged_in"} 114 {if="!$hide_timestamps || $is_logged_in"}
115 {$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'} 115 {$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'}
116 <span class="linkdate" title="Permalink"> 116 <span class="linkdate" title="Permalink">
117 <a href="?{$value.shorturl}"> 117 <a href="{$base_path}/?{$value.shorturl}">
118 <span title="{$updated}"> 118 <span title="{$updated}">
119 {$value.created|format_date} 119 {$value.created|format_date}
120 {if="$value.updated_timestamp"}*{/if} 120 {if="$value.updated_timestamp"}*{/if}
@@ -123,7 +123,7 @@
123 </a> - 123 </a> -
124 </span> 124 </span>
125 {else} 125 {else}
126 <span class="linkdate" title="Short link here"><a href="?{$value.shorturl}">permalink</a> - </span> 126 <span class="linkdate" title="Short link here"><a href="{$base_path}/?{$value.shorturl}">permalink</a> - </span>
127 {/if} 127 {/if}
128 128
129 {loop="$value.link_plugin"} 129 {loop="$value.link_plugin"}
@@ -133,7 +133,7 @@
133 <a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br> 133 <a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
134 {if="$value.tags"} 134 {if="$value.tags"}
135 <div class="linktaglist"> 135 <div class="linktaglist">
136 {loop="$value.taglist"}<span class="linktag" title="Add tag"><a href="./add-tag/{$value|urlencode}">{$value}</a></span> {/loop} 136 {loop="$value.taglist"}<span class="linktag" title="Add tag"><a href="{$base_path}/add-tag/{$value|urlencode}">{$value}</a></span> {/loop}
137 </div> 137 </div>
138 {/if} 138 {/if}
139 139
@@ -154,7 +154,7 @@
154</div> 154</div>
155 155
156 {include="page.footer"} 156 {include="page.footer"}
157<script src="js/thumbnails.min.js"></script> 157<script src="{$asset_path}/js/thumbnails.min.js#"></script>
158 158
159</body> 159</body>
160</html> 160</html>
diff --git a/tpl/vintage/linklist.paging.html b/tpl/vintage/linklist.paging.html
index 797104dc..ea6a5ea2 100644
--- a/tpl/vintage/linklist.paging.html
+++ b/tpl/vintage/linklist.paging.html
@@ -1,11 +1,11 @@
1<div class="paging"> 1<div class="paging">
2{if="$is_logged_in"} 2{if="$is_logged_in"}
3 <div class="paging_privatelinks"> 3 <div class="paging_privatelinks">
4 <a href="./visibility/private"> 4 <a href="{$base_path}/visibility/private">
5 {if="$visibility=='private'"} 5 {if="$visibility=='private'"}
6 <img src="img/private_16x16_active.png" width="16" height="16" title="Click to see all links" alt="Click to see all links"> 6 <img src="{$asset_path}/img/private_16x16_active.png#" width="16" height="16" title="Click to see all links" alt="Click to see all links">
7 {else} 7 {else}
8 <img src="img/private_16x16.png" width="16" height="16" title="Click to see only private links" alt="Click to see only private links"> 8 <img src="{$asset_path}/img/private_16x16.png#" width="16" height="16" title="Click to see only private links" alt="Click to see only private links">
9 {/if} 9 {/if}
10 </a> 10 </a>
11 11
@@ -24,10 +24,10 @@
24 {/loop} 24 {/loop}
25 <div class="paging_linksperpage"> 25 <div class="paging_linksperpage">
26 Links per page: 26 Links per page:
27 <a href="./links-per-page?nb=20">20</a> 27 <a href="{$base_path}/links-per-page?nb=20">20</a>
28 <a href="./links-per-page?nb=50">50</a> 28 <a href="{$base_path}/links-per-page?nb=50">50</a>
29 <a href="./links-per-page?nb=100">100</a> 29 <a href="{$base_path}/links-per-page?nb=100">100</a>
30 <form method="GET" class="linksperpage" action="./links-per-page"> 30 <form method="GET" class="linksperpage" action="{$base_path}/links-per-page">
31 <input type="text" name="nb" size="2"> 31 <input type="text" name="nb" size="2">
32 </form> 32 </form>
33 </div> 33 </div>
diff --git a/tpl/vintage/page.footer.html b/tpl/vintage/page.footer.html
index a3380841..6d9021e3 100644
--- a/tpl/vintage/page.footer.html
+++ b/tpl/vintage/page.footer.html
@@ -23,7 +23,7 @@
23</div> 23</div>
24{/if} 24{/if}
25 25
26<script src="js/shaarli.min.js"></script> 26<script src="{$asset_path}/js/shaarli.min.js#"></script>
27 27
28{if="$is_logged_in"} 28{if="$is_logged_in"}
29<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script> 29<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script>
diff --git a/tpl/vintage/page.header.html b/tpl/vintage/page.header.html
index 8f9b6cc5..0f79d321 100644
--- a/tpl/vintage/page.header.html
+++ b/tpl/vintage/page.header.html
@@ -18,22 +18,22 @@
18{else} 18{else}
19<li><a href="{$titleLink}" class="nomobile">Home</a></li> 19<li><a href="{$titleLink}" class="nomobile">Home</a></li>
20 {if="$is_logged_in"} 20 {if="$is_logged_in"}
21 <li><a href="./logout">Logout</a></li> 21 <li><a href="{$base_path}/logout">Logout</a></li>
22 <li><a href="./tools">Tools</a></li> 22 <li><a href="{$base_path}/tools">Tools</a></li>
23 <li><a href="./add-shaare">Add link</a></li> 23 <li><a href="{$base_path}/add-shaare">Add link</a></li>
24 {elseif="$openshaarli"} 24 {elseif="$openshaarli"}
25 <li><a href="./tools">Tools</a></li> 25 <li><a href="{$base_path}/tools">Tools</a></li>
26 <li><a href="./add-shaare">Add link</a></li> 26 <li><a href="{$base_path}/add-shaare">Add link</a></li>
27 {else} 27 {else}
28 <li><a href="./login">Login</a></li> 28 <li><a href="{$base_path}/login">Login</a></li>
29 {/if} 29 {/if}
30 <li><a href="{$feedurl}/feed-rss?{$searchcrits}" class="nomobile">RSS Feed</a></li> 30 <li><a href="{$feedurl}/feed-rss?{$searchcrits}" class="nomobile">RSS Feed</a></li>
31 {if="$showatom"} 31 {if="$showatom"}
32 <li><a href="{$feedurl}/feed-atom?{$searchcrits}" class="nomobile">ATOM Feed</a></li> 32 <li><a href="{$feedurl}/feed-atom?{$searchcrits}" class="nomobile">ATOM Feed</a></li>
33 {/if} 33 {/if}
34 <li><a href="./tag-cloud">Tag cloud</a></li> 34 <li><a href="{$base_path}/tag-cloud">Tag cloud</a></li>
35 <li><a href="./picture-wall{function="ltrim($searchcrits, '&')"}">Picture wall</a></li> 35 <li><a href="{$base_path}/picture-wall{function="ltrim($searchcrits, '&')"}">Picture wall</a></li>
36 <li><a href="./daily">Daily</a></li> 36 <li><a href="{$base_path}/daily">Daily</a></li>
37 {loop="$plugins_header.buttons_toolbar"} 37 {loop="$plugins_header.buttons_toolbar"}
38 <li><a 38 <li><a
39 {loop="$value.attr"} 39 {loop="$value.attr"}
diff --git a/tpl/vintage/picwall.html b/tpl/vintage/picwall.html
index b3a16791..da3aa36c 100644
--- a/tpl/vintage/picwall.html
+++ b/tpl/vintage/picwall.html
@@ -38,6 +38,6 @@
38 38
39{include="page.footer"} 39{include="page.footer"}
40 40
41<script src="js/thumbnails.min.js"></script> 41<script src="{$asset_path}/js/thumbnails.min.js#"></script>
42</body> 42</body>
43</html> 43</html>
diff --git a/tpl/vintage/pluginsadmin.html b/tpl/vintage/pluginsadmin.html
index fdc7d95e..c94dc211 100644
--- a/tpl/vintage/pluginsadmin.html
+++ b/tpl/vintage/pluginsadmin.html
@@ -16,7 +16,7 @@
16</noscript> 16</noscript>
17 17
18<div id="pluginsadmin"> 18<div id="pluginsadmin">
19 <form action="./?do=save_pluginadmin" method="POST"> 19 <form action="{$base_path}/?do=save_pluginadmin" method="POST">
20 <section id="enabled_plugins"> 20 <section id="enabled_plugins">
21 <h1>Enabled Plugins</h1> 21 <h1>Enabled Plugins</h1>
22 22
@@ -88,7 +88,7 @@
88 </section> 88 </section>
89 </form> 89 </form>
90 90
91 <form action="./?do=save_pluginadmin" method="POST"> 91 <form action="{$base_path}/?do=save_pluginadmin" method="POST">
92 <section id="plugin_parameters"> 92 <section id="plugin_parameters">
93 <h1>Enabled Plugin Parameters</h1> 93 <h1>Enabled Plugin Parameters</h1>
94 94
diff --git a/tpl/vintage/tag.cloud.html b/tpl/vintage/tag.cloud.html
index 4bc4bf88..5d21f239 100644
--- a/tpl/vintage/tag.cloud.html
+++ b/tpl/vintage/tag.cloud.html
@@ -12,8 +12,8 @@
12 12
13 <div id="cloudtag"> 13 <div id="cloudtag">
14 {loop="$tags"} 14 {loop="$tags"}
15 <a href="./add-tag/{$key|urlencode}" class="count">{$value.count}</a><a 15 <a href="{$base_path}/add-tag/{$key|urlencode}" class="count">{$value.count}</a><a
16 href="./?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a> 16 href="{$base_path}/?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a>
17 {loop="$value.tag_plugin"} 17 {loop="$value.tag_plugin"}
18 {$value} 18 {$value}
19 {/loop} 19 {/loop}
diff --git a/tpl/vintage/thumbnails.html b/tpl/vintage/thumbnails.html
index 5cad845b..a1537f9c 100644
--- a/tpl/vintage/thumbnails.html
+++ b/tpl/vintage/thumbnails.html
@@ -23,6 +23,7 @@
23<input type="hidden" name="ids" value="{function="implode(',', $ids)"}" /> 23<input type="hidden" name="ids" value="{function="implode(',', $ids)"}" />
24 24
25{include="page.footer"} 25{include="page.footer"}
26<script src="js/thumbnails_update.min.js?v={$version_hash}"></script> 26<input type="hidden" name="js_base_path" value="{$base_path}" />
27<script src="{$asset_path}/js/thumbnails_update.min.js?v={$version_hash}#"></script>
27</body> 28</body>
28</html> 29</html>
diff --git a/tpl/vintage/tools.html b/tpl/vintage/tools.html
index 8f606efb..9caea9cf 100644
--- a/tpl/vintage/tools.html
+++ b/tpl/vintage/tools.html
@@ -5,17 +5,17 @@
5<div id="pageheader"> 5<div id="pageheader">
6 {include="page.header"} 6 {include="page.header"}
7 <div id="toolsdiv"> 7 <div id="toolsdiv">
8 <a href="./configure"><b>Configure your Shaarli</b><span>: Change Title, timezone...</span></a> 8 <a href="{$base_path}/configure"><b>Configure your Shaarli</b><span>: Change Title, timezone...</span></a>
9 <br><br> 9 <br><br>
10 <a href="./?do=pluginadmin"><b>Plugin administration</b><span>: Enable, disable and configure plugins.</span></a> 10 <a href="{$base_path}/?do=pluginadmin"><b>Plugin administration</b><span>: Enable, disable and configure plugins.</span></a>
11 <br><br> 11 <br><br>
12 {if="!$openshaarli"}<a href="?do=changepasswd"><b>Change password</b><span>: Change your password.</span></a> 12 {if="!$openshaarli"}<a href="{$base_path}/?do=changepasswd"><b>Change password</b><span>: Change your password.</span></a>
13 <br><br>{/if} 13 <br><br>{/if}
14 <a href="./manage-tags"><b>Rename/delete tags</b><span>: Rename or delete a tag in all links</span></a> 14 <a href="{$base_path}/manage-tags"><b>Rename/delete tags</b><span>: Rename or delete a tag in all links</span></a>
15 <br><br> 15 <br><br>
16 <a href="./?do=import"><b>Import</b><span>: Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a> 16 <a href="{$base_path}/?do=import"><b>Import</b><span>: Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a>
17 <br><br> 17 <br><br>
18 <a href="./?do=export"><b>Export</b><span>: Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a> 18 <a href="{$base_path}/?do=export"><b>Export</b><span>: Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a>
19 <br><br> 19 <br><br>
20 <a class="smallbutton" 20 <a class="smallbutton"
21 onclick="return alertBookmarklet();" 21 onclick="return alertBookmarklet();"