From 4936caa46981abf46945d3cb278f08fda7a7c9dc Mon Sep 17 00:00:00 2001 From: Malte Bublitz Date: Fri, 2 May 2025 21:48:40 +0200 Subject: [PATCH] =?utf8?q?config.inc.php:=20=E2=9C=A8=20Search=20engine=20?= =?utf8?q?config=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The search engine can now be specified in config.inc.php, and you can now set a custom SearXNG instance. --- config.inc.php | 29 ++++++++++++++++++++++++++++- index.php | 2 +- template.inc.php | 14 +++++++------- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/config.inc.php b/config.inc.php index 014e9e5..81311b5 100644 --- a/config.inc.php +++ b/config.inc.php @@ -1,5 +1,33 @@ diff --git a/index.php b/index.php index 6df0824..d501d87 100644 --- a/index.php +++ b/index.php @@ -40,7 +40,7 @@ $Data = Array( //"js/settings.js", "js/main.js" // onLoad logic ), - "Search" => "searX", // Google/searX + "Search" => $SearchEngine, // Google/searX "Footer" => Array( "CopyrightYear" => date("Y"), "AuthorName" => "malte70", diff --git a/template.inc.php b/template.inc.php index 7e1fcdb..3258445 100644 --- a/template.inc.php +++ b/template.inc.php @@ -18,11 +18,11 @@ header("Content-Type: text/html; charset=".$Data["Meta"]["Charset"]); * this array using `array_rand()` */ $search_placeholders = Array( - "something", - "the answer", - "42", - "foo bar", - "awesome stuff" + "something", + "the answer", + "42", + "foo bar", + "awesome stuff" ); $i = array_rand($search_placeholders); $placeholder = $search_placeholders[$i]; @@ -133,7 +133,7 @@ if (in_array($_SERVER["REMOTE_ADDR"], array("::0", "127.0.0.1"))) {