[add] implemented opensearch plugins

This commit is contained in:
Knah Tsaeb 2016-06-08 11:01:13 +02:00
parent 042095ae7a
commit f981ab8a17
8 changed files with 65 additions and 6 deletions

View file

@ -55,6 +55,7 @@ myShaarli Features :
* Add link to archive.org (qwertygc https://github.com/nodiscc/Shaarli/commit/b113dc8e6bba052883297ab575dd36fd3073805e) * 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 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 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 * Few small fix
* You can upgrade original Shaarli to myShaarli without lost your data * You can upgrade original Shaarli to myShaarli without lost your data
* You can define url origin of update * You can define url origin of update

View file

@ -1350,6 +1350,16 @@ function renderPage()
exit; 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=...) // -------- User clicks on a tag in a link: The tag is added to the list of searched tags (searchtags=...)
if (isset($_GET['addtag'])) if (isset($_GET['addtag']))
{ {

View file

@ -5,8 +5,9 @@
<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
<!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />--> <!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />-->
<link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" /> <link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" />
<link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" /> <link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" />
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" /> <link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" /> <link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" />
<link type="text/css" rel="stylesheet" href="myShaarli.css?version={$version|urlencode}" /> <link type="text/css" rel="stylesheet" href="myShaarli.css?version={$version|urlencode}" />
<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}" />

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>myShaarli search - {$pagetitle}</ShortName>
<Description>myShaarli search - {$pagetitle}</Description>
<Url type="text/html" template="{$serverurl}?searchterm={searchTerms}" />
<Url type="application/atom+xml" template="{$serverurl}?do=atom&amp;searchterm={searchTerms}" />
<Url type="application/rss+xml" template="{$serverurl}?do=rss&amp;searchterm={searchTerms}" />
<InputEncoding>UTF-8</InputEncoding>
<Developer>Knah Tsaeb myShaarly - https://github.com/Knah-Tsaeb/myShaarli</Developer>
<Image width="16" height="16">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
</Image>
</OpenSearchDescription>

View file

@ -5,8 +5,9 @@
<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
<!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />--> <!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />-->
<link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" /> <link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" />
<link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" /> <link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" />
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" /> <link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" /> <link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" />
<link type="text/css" rel="stylesheet" href="columns.css?version={$version|urlencode}" /> <link type="text/css" rel="stylesheet" href="columns.css?version={$version|urlencode}" />
<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}" />

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>myShaarli search - {$pagetitle}</ShortName>
<Description>myShaarli search - {$pagetitle}</Description>
<Url type="text/html" template="{$serverurl}?searchterm={searchTerms}" />
<Url type="application/atom+xml" template="{$serverurl}?do=atom&amp;searchterm={searchTerms}" />
<Url type="application/rss+xml" template="{$serverurl}?do=rss&amp;searchterm={searchTerms}" />
<InputEncoding>UTF-8</InputEncoding>
<Developer>Knah Tsaeb myShaarly - https://github.com/Knah-Tsaeb/myShaarli</Developer>
<Image width="16" height="16">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
</Image>
</OpenSearchDescription>

View file

@ -5,8 +5,9 @@
<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
<!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />--> <!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />-->
<link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" /> <link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" />
<link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" /> <link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" />
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" /> <link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" /> <link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" />
<link type="text/css" rel="stylesheet" href="shaarli.css?version={$version|urlencode}" /> <link type="text/css" rel="stylesheet" href="shaarli.css?version={$version|urlencode}" />
<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}" />

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>myShaarli search - {$pagetitle}</ShortName>
<Description>myShaarli search - {$pagetitle}</Description>
<Url type="text/html" template="{$serverurl}?searchterm={searchTerms}" />
<Url type="application/atom+xml" template="{$serverurl}?do=atom&amp;searchterm={searchTerms}" />
<Url type="application/rss+xml" template="{$serverurl}?do=rss&amp;searchterm={searchTerms}" />
<InputEncoding>UTF-8</InputEncoding>
<Developer>Knah Tsaeb myShaarly - https://github.com/Knah-Tsaeb/myShaarli</Developer>
<Image width="16" height="16">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
</Image>
</OpenSearchDescription>