Les avertissements suivants se sont produits :
Warning [2] Undefined array key 0 - Line: 1640 - File: showthread.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 1640 errorHandler->error_callback
/showthread.php 915 buildtree




Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
recherche dans des fichiers PDF et autres
#7
1° Tu demandes à ton support de modifier le script pour qu'il fonctionne correctement
2° Tu utilises l'api search de google. Tu as besoin d'une clé : http://code.google.com/intl/fr-FR/apis/a...h/key.html
Tu as un bac à sable ici : http://code.google.com/apis/ajax/playground/
La doc ici : http://code.google.com/intl/fr-FR/apis/a...ss_GSearch

Pour une recherche sur les documents pdf de zoomjeunes :
A placer dans les méta de la page
Code :
{literal}<script src="http://www.google.com/jsapi?key=taCle" type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
    //<![CDATA[

    google.load("search", "1");

    function OnLoad() {
      // Create a search control
      var searchControl = new google.search.SearchControl();

      // Add in a full set of searchers
      var siteSearch = new google.search.WebSearch();
      siteSearch.setSiteRestriction("www.zoomjeune.be");
      siteSearch.setQueryAddition("filetype:pdf");
      searchControl.addSearcher(siteSearch);
    
      // Tell the searcher to draw itself and tell it where to attach
      searchControl.draw(document.getElementById("searchcontrol"));

      // Execute an inital search
      searchControl.execute("concours");
    }
    google.setOnLoadCallback(OnLoad);

    //]]>
    </script>{/literal}
Et dans le content (ou le gabarit)
Code :
<div id="searchcontrol">Loading...</div>


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 2 visiteur(s)