Skip to content

Commit

Permalink
Merge pull request #586 from tobiasmboelz/opensearch
Browse files Browse the repository at this point in the history
OpenSearch support
  • Loading branch information
dlangille authored Aug 9, 2024
2 parents 8b823c2 + d6ab4d7 commit 5859bda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/freshports.php
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,8 @@ function freshports_HEAD_main_items() {
<link rel="alternate" type="application/rss+xml" title="FreshPorts - The Place For Ports" href="https://' . $_SERVER['HTTP_HOST'] . '/backend/rss2.0.php">
<link rel="search" type="application/opensearchdescription+xml" href="https://' . $_SERVER['HTTP_HOST'] . '/opensearch.php" title="FreshPorts">
<link rel="apple-touch-icon" sizes="57x57" href="/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/apple-icon-72x72.png">
Expand Down
7 changes: 7 additions & 0 deletions www/opensearch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php header('Content-Type: application/opensearchdescription+xml; charset=utf-8'); ?>
<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>FreshPorts</ShortName>
<Image width="16" height="16" type="image/x-icon"><?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/favicon.ico' ?></Image>
<Url type="text/html" template="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . '/search.php?query={searchTerms}' ?>" />
</OpenSearchDescription>

0 comments on commit 5859bda

Please sign in to comment.