From: Felix Kästner Date: Tue, 13 Oct 2015 20:31:59 +0000 (+0200) Subject: improve browserintegration and add parsing of get parameter in case X-Git-Url: https://fpunktk.de/gitweb/?p=consearch.git;a=commitdiff_plain;h=6eb45cdfe653181235b8e631a7449c5a55ea0170;hp=1f7f929392cf15e6bcb20a4d66d4b706f0a98f4e improve browserintegration and add parsing of get parameter in case fragment does not work --- diff --git a/index.php b/index.php index 847dbcc..2321c8b 100644 --- a/index.php +++ b/index.php @@ -15,6 +15,10 @@ $dse = ""; if ( isset($_GET['dse']) and preg_match('/^[0-9a-z]{1,5}$/', $_GET['dse']) === 1 ) { // TODO: prevent injection, check whether dse is a valid searchengine $dse = $_GET['dse']; } +$browserintegration = ""; +if ( isset($_GET['include']) and $_GET['include'] == "browserintegration" ) { + $browserintegration = "true"; +} if ( isset($_GET['get']) and $_GET['get'] === "opensearchdescription" ) { header('Content-Type: text/xml'); @@ -45,7 +49,7 @@ if ( isset($_GET['get']) and $_GET['get'] === "opensearchdescription" ) { consearch +' . "\n"; +} +?> +
@@ -232,9 +246,25 @@ please enable javascript

-add to browser +add to browser +

+ + + +

+Now add consearch to your browser. In firefox this is done via the searchbar. If this does not work then consearch can be added via the following form, but this would send all queries to the server :-(

+
' . "\n"; + if ( $dse ) { echo '' . "\n"; } + echo ' +
+'; +} +?> +

about