immanuelfodor / emojione

An emojione fork made compatible with latest Shaarli
https://github.com/shaarli/Shaarli
MIT License
3 stars 0 forks source link

Compatibility with subdirectory Shaarli installs #2

Open immanuelfodor opened 3 years ago

immanuelfodor commented 3 years ago

See https://github.com/immanuelfodor/emojione/releases/tag/v1.0.0

This release is not yet compatible with subdirectory Shaarli installs, as ../ is replaced by / in the JS files (see #1). Could be solved with ../../ maybe or some clever JS-fu but I had no more time to solve this. PRs are welcome to fix this.

immanuelfodor commented 3 years ago

Hint for a possible fix, just need to pass the full asseth path to the JS file: https://github.com/kalvn/shaarli2mastodon/blob/master/shaarli2mastodon.php#L75

$data['js_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/shaarli2mastodon/shaarli2mastodon.js';