Il est sur
http://www.cmsmadesimple.fr/forum/viewt ... 500#p11500
Le voici pour la communauté .org
Tu utilises l'api search de google. Tu as besoin d'une clé :
http://code.google.com/intl/fr-FR/apis/ ... 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/ ... ss_GSearch
Pour une recherche sur les documents pdf de zoomjeunes :
A placer dans les méta de la page
Code: Select all
{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("jeunes");
}
google.setOnLoadCallback(OnLoad);
//]]>
</__script>{/literal}
Et dans le content (ou le gabarit)
Code: Select all
<div id="searchcontrol">Loading...</div>
Voici ce que ça donne :
http://www.zoomjeune.be/recherchepdf.html
Je t'ai mis une recherche initiale : jeunes
Tu as tous les outils qu'il faut pour styliser, etc. et c'est gratos
Change ton titre en "recherche dans des fichiers PDF et autres" (oui, car ça marche pour .doc, .xls, les images, mp3, vidéos, etc.)