Créer un moteur de recherche dans Firefox

Fermé
Melpou - 4 sept. 2008 à 09:37
clintm Messages postés 689 Date d'inscription lundi 11 avril 2005 Statut Membre Dernière intervention 10 juin 2015 - 28 sept. 2008 à 22:31
Bonjour,

J'ai réalisé un moteur de recherche (solidact.com).
Je souhaite que les visiteurs puissent l'ajouter à leurs moteur dans firefox en un simple clic. J'ai donc réalisé 2 fichiers.

1) <SEARCH
version = "0.1"
name="solidact"
description="moteur de recherche solidaire"
method="GET"
action="https://www.hugedomains.com/domain_profile.cfm?d=solidact&e=com"
queryCharset="UTF-8"
>

<INPUT NAME="q" user>

</SEARCH>

<browser
update="http://fc.pascal.free.fr/pluginfirefox.src"
updateIcon="http://fc.pascal.free.fr/pluginfirefox.png"
updateCheckDays="40"
>


2) <html>
<head>
<title>Ajout Moteur de recherche</title>
<script type="text/javascript">
function addEngine()
{
if ((typeof window.sidebar == "object") &&
(typeof window.sidebar.addSearchEngine == "function")) {
window.sidebar.addSearchEngine(
"http://fc.pascal.free.fr/pluginfirefox.src",
"http://fc.pascal.free.fr/pluginfirefox.png",
"solidact",
"21" );
} else {
alert("Votre navigateur n'a pas le plugin Sherlock ! \nIl est disponible avec le navigateur libre Firefox :\n http://www.mozilla-europe.org/.");
}
}
</script>

</head>
<body>
<form action="#" method="post" onSubmit="addEngine();return false;">
<input name="delete" type="image" img src="http://fc.pascal.free.fr/bouton.jpg" />
</form>
</body>
</html>



J’ai toutefois un petit souci. En effet, une fois le moteur ajouté, lorsque je tape une recherche, les réponses n’apparaissent pas immédiatement, il faut à nouveau valider dans la page d’accueil de solidact.

Pouvez-vous me renseigner s’il vous plait.

voici le lien : http://fc.pascal.free.fr/pluginfirefox.html

Merci d'avance.
A voir également:

4 réponses

clintm Messages postés 689 Date d'inscription lundi 11 avril 2005 Statut Membre Dernière intervention 10 juin 2015 75
20 sept. 2008 à 01:17
salut

c'est parce que le moteur de recherche est génereré par google est qu'il à besoin de plus de requete que q
il faut donc passer toutes les requetes:
https://www.hugedomains.com/domain_profile.cfm?d=solidact&e=com

le &sa=Recherche+Google n'est pas important

@+
0
Bonjour et merci pour votre réponse.

Mais je dois dire que je ne comprends pas tout...
Mon problème a t-il une solution?
Si oui, que changer concrètement dans mon script.?

Merci d'avance.
0
clintm Messages postés 689 Date d'inscription lundi 11 avril 2005 Statut Membre Dernière intervention 10 juin 2015 75
28 sept. 2008 à 22:24
tu à un moteur de recherche géneré par google adsense, il faut donc un identifiant qui dis que c'est le tien :
&client=pub-4920402886106422
&cof=GALT%3A%230066CC%3BGL%3A1%3BDIV%3A%23E6E6E6%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3ACC3333%3BLC%3ACC3333%3BT%3A333333%3BGFNT%3ACC3333%3BGIMP%3ACC3333%3BFORID%3A11


@+
0
clintm Messages postés 689 Date d'inscription lundi 11 avril 2005 Statut Membre Dernière intervention 10 juin 2015 75
28 sept. 2008 à 22:31
j'arrive à modifier le fichier xml qui se trouve dans le dossier de firefox :
<SearchPlugin xmlns="https://www.mozilla.org/2006/browser/search/">
<ShortName>Solidact</ShortName>
<Description>moteur de recherche solidaire</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" src="http://fc.pascal.free.fr/pluginfirefox.png" url="http://fc.pascal.free.fr/pluginfirefox.png"></Image>
<Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&amp;client=firefox&amp;qu={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.hugedomains.com/domain_profile.cfm?d=solidact&e=com">
  <Param name="q" value="{searchTerms}"/>
  <Param name="client" value="pub-4920402886106422"/>
  <Param name="cof" value="GALT%3A%230066CC%3BGL%3A1%3BDIV%3A%23E6E6E6%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3ACC3333%3BLC%3ACC3333%3BT%3A333333%3BGFNT%3ACC3333%3BGIMP%3ACC3333%3BFORID%3A11"/>
  <!-- Dynamic parameters -->
  <Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
  <MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>
</Url>
<SearchForm>https://www.hugedomains.com/domain_profile.cfm?d=solidact&e=com
</SearchPlugin>


mais pas le src

google;)
0