From 7f5250421be4832b9679d8140bc4a71c8005dfa3 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 16 Oct 2020 12:47:11 +0200 Subject: Support using Shaarli without URL rewriting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Shaarli can be fully used by prefixing any URL with /index.php/ - {$base_path} used in templates already works with this configuration - Assets path (outside of theme's assets) must be prefixed with {$root_url}/ - Documentation section in « Server configuration » Fixes #1590 --- plugins/archiveorg/archiveorg.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/archiveorg') diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php index 922b5966..a7b595e1 100644 --- a/plugins/archiveorg/archiveorg.php +++ b/plugins/archiveorg/archiveorg.php @@ -17,7 +17,8 @@ use Shaarli\Plugin\PluginManager; function hook_archiveorg_render_linklist($data) { $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html'); - $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH; + $rootPath = preg_replace('#/index\.php$#', '', $data['_BASE_PATH_'] ?? ''); + $path = $rootPath . '/' . PluginManager::$PLUGINS_PATH; foreach ($data['links'] as &$value) { $isNote = startsWith($value['real_url'], '/shaare/'); -- cgit v1.2.3