barre de recherche rapide pour firefox
authorPascal Corpet <pascal.corpet@m4x.org>
Sat, 18 Jun 2005 12:09:38 +0000 (12:09 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:18 +0000 (23:29 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-720

htdocs/images/xorg.png [new file with mode: 0644]
htdocs/search.php
htdocs/xorg.src [new file with mode: 0644]
templates/search.quick.tpl

diff --git a/htdocs/images/xorg.png b/htdocs/images/xorg.png
new file mode 100644 (file)
index 0000000..0e4b1d1
Binary files /dev/null and b/htdocs/images/xorg.png differ
index 266fce5..9426800 100644 (file)
@@ -30,6 +30,8 @@ if (logged()) {
 require_once("applis.func.inc.php");
 require_once("geoloc.inc.php");
 
+$page->assign('baseurl', $globals->baseurl);
+
 if (Env::has('quick')) {
     $page->assign('formulaire', 0);
 
diff --git a/htdocs/xorg.src b/htdocs/xorg.src
new file mode 100644 (file)
index 0000000..6596f21
--- /dev/null
@@ -0,0 +1,14 @@
+# Mozilla/Polytechnique.org plug-in by contact@polytechnique.org
+
+<search
+       name="Polytechnique.org"
+       description="Recherche rapide X.org"
+       method="GET"
+       action="http://www.polytechnique.org/search.php"
+       update="http://www.polytechnique.org/xorg.src"
+       updateCheckDays=30
+       queryEncoding="ISO-8859-15"
+       queryCharset="ISO-8859-15">
+
+<input name="quick" user>
+</search>
index aa36af4..99b5769 100644 (file)
@@ -50,4 +50,24 @@ En effet, le moteur de recherche va alors chercher tous les utilisateurs dont le
 sans distinction de casse et sans tenir compte des accents.
 </p>
 
+{min_auth level="cookie"}
+<h2>Barre de recherche pour Firefox</h2>
+<script type="text/javascript">
+{literal}
+function addEngine() {
+  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
+   {/literal}
+    window.sidebar.addSearchEngine(
+      "{$baseurl}/xorg.src",
+      "{$baseurl}/images/xorg.png",
+      "Recherche rapide X.org",
+      "Academic");
+  {literal}
+  } else { alert("Impossible d'installer la barre de recherche Firefox"); }
+}
+{/literal}
+</script>
+<p>Tu peux <a href="javascript:addEngine()">installer</a> la barre de recherche rapide directement dans ton navigateur.
+</p>
+{/min_auth}
 {* vim:set et sw=2 sts=2 sws=2: *}