From f981ab8a17e873842499bdd9d6b55932a321da91 Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Wed, 8 Jun 2016 11:01:13 +0200 Subject: [PATCH] [add] implemented opensearch plugins --- README.md | 1 + index.php | 10 ++++++++++ tpl/myShaarli/includes.html | 5 +++-- tpl/myShaarli/opensearch.html | 15 +++++++++++++++ tpl/myShaarli_Columns/includes.html | 5 +++-- tpl/myShaarli_Columns/opensearch.html | 15 +++++++++++++++ tpl/original/includes.html | 5 +++-- tpl/original/opensearch.html | 15 +++++++++++++++ 8 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 tpl/myShaarli/opensearch.html create mode 100644 tpl/myShaarli_Columns/opensearch.html create mode 100644 tpl/original/opensearch.html diff --git a/README.md b/README.md index 1a54e9e0..4550b9ae 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ myShaarli Features : * Add link to archive.org (qwertygc https://github.com/nodiscc/Shaarli/commit/b113dc8e6bba052883297ab575dd36fd3073805e) * myShaali can use Firefox social API (Marsup https://github.com/shaarli/Shaarli/commit/d33c5d4c3b9c70441391a08e8bcb2a8c639a4635) * myShaali can post original article to wallabag (nodiscc https://github.com/nodiscc/Shaarli/tree/new-plugin-system/tpl/plugins/wallabag) + * myShaali implement OpenSearch (ArthurHoaro https://github.com/shaarli/Shaarli/issues/176) * Few small fix * You can upgrade original Shaarli to myShaarli without lost your data * You can define url origin of update diff --git a/index.php b/index.php index 563c49a5..890c9f9f 100644 --- a/index.php +++ b/index.php @@ -1350,6 +1350,16 @@ function renderPage() exit; } + // Display openseach plugin (XML) + if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=opensearch')) { + header('Content-Type: application/xml; charset=utf-8'); + $PAGE = new pageBuilder; + $PAGE->assign('serverurl', $GLOBALS['title']); + $PAGE->assign('pagetitle',$GLOBALS['title']); + $PAGE->renderPage('opensearch'); + exit; + } + // -------- User clicks on a tag in a link: The tag is added to the list of searched tags (searchtags=...) if (isset($_GET['addtag'])) { diff --git a/tpl/myShaarli/includes.html b/tpl/myShaarli/includes.html index df05815d..f5381850 100644 --- a/tpl/myShaarli/includes.html +++ b/tpl/myShaarli/includes.html @@ -5,8 +5,9 @@ - + - \ No newline at end of file + + diff --git a/tpl/myShaarli/opensearch.html b/tpl/myShaarli/opensearch.html new file mode 100644 index 00000000..2eb9851b --- /dev/null +++ b/tpl/myShaarli/opensearch.html @@ -0,0 +1,15 @@ + + + myShaarli search - {$pagetitle} + myShaarli search - {$pagetitle} + + + + UTF-8 + Knah Tsaeb myShaarly - https://github.com/Knah-Tsaeb/myShaarli + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlz AAALEwAACxMBAJqcGAAAAAd0SU1FB98HEA4tDZmAhI0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0 ZWQgd2l0aCBHSU1QZC5lBwAAAhJJREFUOMuVUz1oU1EYPcm90iTNnxCTtImtD6VdoghShzq0xPLy + DEpEcdAuoUgVC4JDHERx6ioU0UVQC3VyU4dAMKb+pNI6qBTaQqnSxpBgan6qTZq89z6HWIkhofEs l3s45/B99/suQxPcuOdnWeOXEedBPnjsRNfcQjxH+B8cuqC7c3OG0+05ToeH+d1mOlZPDF62tZv3 KwMOQb7e0c2t7QaOHylFMLh2RdLzSqper6m9HBk2C66e0kL/kK7NuZfh8+wW7J0cboFj6VMZ0Wel 6Lv78vGmFVh6lNMXr1rPfk8QZqIlzL4uIrEiY3VJRt9RI8xWJih606O1j5v5bY+2NsBmND1/+vBn + 4cA+Pc6f2wOPx4BOZxsujXZgIwPEX21Oxx9nVms9/wS8ncyu5xaFqXJei5eRAkJj3RgbcSPyYgOn BhxYz6hf69+A1xMqK71ZXt66EjzjxuSTFIp5DySfgm9rMlTSZHacQmIxO6/+6r3W5RrV6fP92K32 Qi73YXz8fcLuEE6ufEjuvA+iKBIRkd/vp2AwSEREXq+3oVHbkNRW6UKhoBaLRQCA3W6HJEmmlgL+ LolGo2Ws2uWfk7UUUKlUqmO12WCxWAAARI1b541IWZYT6XTaHQgEwDkHESGZTCIWi+Va+kiSJN0K + hUK0jYmJCRJFcaphm81CfD7fg0qlEmSMcQDTjLGhcDgs1+t+Ay6pzgTLZnNuAAAAAElFTkSuQmCC + + diff --git a/tpl/myShaarli_Columns/includes.html b/tpl/myShaarli_Columns/includes.html index 6686e9be..4186b980 100644 --- a/tpl/myShaarli_Columns/includes.html +++ b/tpl/myShaarli_Columns/includes.html @@ -5,8 +5,9 @@ - + - \ No newline at end of file + + diff --git a/tpl/myShaarli_Columns/opensearch.html b/tpl/myShaarli_Columns/opensearch.html new file mode 100644 index 00000000..2eb9851b --- /dev/null +++ b/tpl/myShaarli_Columns/opensearch.html @@ -0,0 +1,15 @@ + + + myShaarli search - {$pagetitle} + myShaarli search - {$pagetitle} + + + + UTF-8 + Knah Tsaeb myShaarly - https://github.com/Knah-Tsaeb/myShaarli + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlz AAALEwAACxMBAJqcGAAAAAd0SU1FB98HEA4tDZmAhI0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0 ZWQgd2l0aCBHSU1QZC5lBwAAAhJJREFUOMuVUz1oU1EYPcm90iTNnxCTtImtD6VdoghShzq0xPLy + DEpEcdAuoUgVC4JDHERx6ioU0UVQC3VyU4dAMKb+pNI6qBTaQqnSxpBgan6qTZq89z6HWIkhofEs l3s45/B99/suQxPcuOdnWeOXEedBPnjsRNfcQjxH+B8cuqC7c3OG0+05ToeH+d1mOlZPDF62tZv3 KwMOQb7e0c2t7QaOHylFMLh2RdLzSqper6m9HBk2C66e0kL/kK7NuZfh8+wW7J0cboFj6VMZ0Wel 6Lv78vGmFVh6lNMXr1rPfk8QZqIlzL4uIrEiY3VJRt9RI8xWJih606O1j5v5bY+2NsBmND1/+vBn + 4cA+Pc6f2wOPx4BOZxsujXZgIwPEX21Oxx9nVms9/wS8ncyu5xaFqXJei5eRAkJj3RgbcSPyYgOn BhxYz6hf69+A1xMqK71ZXt66EjzjxuSTFIp5DySfgm9rMlTSZHacQmIxO6/+6r3W5RrV6fP92K32 Qi73YXz8fcLuEE6ufEjuvA+iKBIRkd/vp2AwSEREXq+3oVHbkNRW6UKhoBaLRQCA3W6HJEmmlgL+ LolGo2Ws2uWfk7UUUKlUqmO12WCxWAAARI1b541IWZYT6XTaHQgEwDkHESGZTCIWi+Va+kiSJN0K + hUK0jYmJCRJFcaphm81CfD7fg0qlEmSMcQDTjLGhcDgs1+t+Ay6pzgTLZnNuAAAAAElFTkSuQmCC + + diff --git a/tpl/original/includes.html b/tpl/original/includes.html index c0fe905d..2fec02c8 100644 --- a/tpl/original/includes.html +++ b/tpl/original/includes.html @@ -5,8 +5,9 @@ - + - \ No newline at end of file + + diff --git a/tpl/original/opensearch.html b/tpl/original/opensearch.html new file mode 100644 index 00000000..2eb9851b --- /dev/null +++ b/tpl/original/opensearch.html @@ -0,0 +1,15 @@ + + + myShaarli search - {$pagetitle} + myShaarli search - {$pagetitle} + + + + UTF-8 + Knah Tsaeb myShaarly - https://github.com/Knah-Tsaeb/myShaarli + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlz AAALEwAACxMBAJqcGAAAAAd0SU1FB98HEA4tDZmAhI0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0 ZWQgd2l0aCBHSU1QZC5lBwAAAhJJREFUOMuVUz1oU1EYPcm90iTNnxCTtImtD6VdoghShzq0xPLy + DEpEcdAuoUgVC4JDHERx6ioU0UVQC3VyU4dAMKb+pNI6qBTaQqnSxpBgan6qTZq89z6HWIkhofEs l3s45/B99/suQxPcuOdnWeOXEedBPnjsRNfcQjxH+B8cuqC7c3OG0+05ToeH+d1mOlZPDF62tZv3 KwMOQb7e0c2t7QaOHylFMLh2RdLzSqper6m9HBk2C66e0kL/kK7NuZfh8+wW7J0cboFj6VMZ0Wel 6Lv78vGmFVh6lNMXr1rPfk8QZqIlzL4uIrEiY3VJRt9RI8xWJih606O1j5v5bY+2NsBmND1/+vBn + 4cA+Pc6f2wOPx4BOZxsujXZgIwPEX21Oxx9nVms9/wS8ncyu5xaFqXJei5eRAkJj3RgbcSPyYgOn BhxYz6hf69+A1xMqK71ZXt66EjzjxuSTFIp5DySfgm9rMlTSZHacQmIxO6/+6r3W5RrV6fP92K32 Qi73YXz8fcLuEE6ufEjuvA+iKBIRkd/vp2AwSEREXq+3oVHbkNRW6UKhoBaLRQCA3W6HJEmmlgL+ LolGo2Ws2uWfk7UUUKlUqmO12WCxWAAARI1b541IWZYT6XTaHQgEwDkHESGZTCIWi+Va+kiSJN0K + hUK0jYmJCRJFcaphm81CfD7fg0qlEmSMcQDTjLGhcDgs1+t+Ay6pzgTLZnNuAAAAAElFTkSuQmCC + +