Créer un moteur de recherche dans Firefox

Melpou -  
clintm Messages postés 718 Statut Membre -
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.
Configuration: Windows XP
Firefox 3.0.1

4 réponses

  1. Melpou
     
    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
  2. clintm Messages postés 718 Statut Membre 75
     
    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
  3. clintm Messages postés 718 Statut Membre 75
     
    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