Changeset 10573 in spip-zone
- Timestamp:
- Mar 21, 2007, 1:34:51 PM (14 years ago)
- Location:
- _plugins_/_dev_/google_ajax_search
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/_dev_/google_ajax_search/balise/formulaire_recherche_google.php
r10572 r10573 5 5 // il y a surement plus simple ... 6 6 function balise_FORMULAIRE_RECHERCHE_GOOGLE($p) { 7 return calculer_balise_dynamique($p,'FORMULAIRE_RECHERCHE_GOOGLE', array( ));7 return calculer_balise_dynamique($p,'FORMULAIRE_RECHERCHE_GOOGLE', array('recherche')); 8 8 } 9 9 … … 12 12 } 13 13 14 function balise_FORMULAIRE_RECHERCHE_GOOGLE_dyn() { 15 return array('formulaires/formulaire_recherche_google', $GLOBALS['delais'],array()); 14 function balise_FORMULAIRE_RECHERCHE_GOOGLE_dyn($recherche='') { 15 return array('formulaires/formulaire_recherche_google', $GLOBALS['delais'], 16 array('recherche' => $recherche 17 )); 16 18 } 17 19 -
_plugins_/_dev_/google_ajax_search/formulaires/formulaire_recherche_google.html
r10572 r10573 1 <div id='searchcontrol' /> 1 <div id='searchcontrol'></div> 2 <script type="text/javascript"> 3 var searchControl = new GSearchControl(); 4 var siteSearch = new GwebSearch(); 5 siteSearch.setSiteRestriction("'.#URL_SITE_SPIP.'"); 6 var options = new GsearcherOptions(); 7 options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN); 8 searchControl.addSearcher(siteSearch, options); 9 searchControl.draw(document.getElementById("searchcontrol")); 10 [searchControl.execute("(#ENV{recherche})");] 11 </script> -
_plugins_/_dev_/google_ajax_search/googleajaxsearch_pipeline.php
r10569 r10573 26 26 <!-- google ajax api search --> 27 27 <link href="http://www.google.com/uds/css/gsearch.css" type="text/css" rel="stylesheet"/> 28 <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key='.$google_key.'" type="text/javascript"></script> 29 <script language="Javascript" type="text/javascript"> 30 //<![CDATA[ 31 32 function OnLoad() { 33 // Create a search control 34 var searchControl = new GSearchControl(); 35 36 // web search with options 37 var siteSearch = new GwebSearch(); 38 siteSearch.setSiteRestriction("'.$adresse_site.'"); 39 var options = new GsearcherOptions(); 40 options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN); 41 42 // add websearch 43 searchControl.addSearcher(siteSearch, options); 44 45 // tell the searcher to draw itself and tell it where to attach 46 searchControl.draw(document.getElementById("searchcontrol")); 47 48 } 49 GSearch.setOnLoadCallback(OnLoad); 50 51 //]]> 52 </script>'; 53 28 <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key='.$google_key.'" type="text/javascript"></script>'; 54 29 55 30 return $flux; -
_plugins_/_dev_/google_ajax_search/plugin.xml
r10569 r10573 15 15 _ {{Compatibilité :}} Si vous utilisez le plugin GIS, le plugin automatiquement récupère votre Google key. 16 16 _ {{Référence :}} [API Google Search.->http://code.google.com/apis/ajaxsearch/documentation/reference.html]</multi></description> 17 <lien> </lien>17 <lien>http://trac.rezo.net/trac/spip-zone/wiki/GoogleAjaxSearch</lien> 18 18 <prefix>googleajaxsearch</prefix> 19 19 <pipeline>
Note: See TracChangeset
for help on using the changeset viewer.