--- a/web/wp-content/themes/IRI-Theme/search.php Tue Jan 05 09:59:49 2010 +0000
+++ b/web/wp-content/themes/IRI-Theme/search.php Mon Feb 01 09:51:57 2010 +0000
@@ -1,27 +1,202 @@
<?php get_header(); ?>
<div class="column span-17 colborder first" id="maincontent">
<div class="content">
- <?php if (have_posts()) : ?>
- <h2 class="pagetitle"><?php echo(str_replace("%s", $s,__("Search results for “%s”"))); ?></h2>
- <!-- -->
+ <!-- -->
+ <?php
+ $search_text = utf8_decode(stripslashes($_GET['s']));
+
+ if (isset($_GET['engine'])){
+ $engine = $_GET['engine'];
+
+ if ($engine=="0") {
+
+
+ } else if ($engine=="1") {
+
+ $title = str_replace("%s", $search_text,__("Search results for “%s”"));
+
+ echo ("
+ <h2 class='pagetitle'>".$title ."</h2><br/>
+ <!-- Google Custom Search Element -->
+ <div id=\"cse\" style=\"width:100%;\">Loading</div>
+ <script src=\"http://www.google.com/jsapi\" type=\"text/javascript\"></script>
+ <script type=\"text/javascript\">
+ google.load('search', '1');
+
+ google.setOnLoadCallback(function(){
+ var cse = new google.search.CustomSearchControl('015480955628162126762:skh3unbz0s8');
+ cse.setNoResultsString('Aucun résultat pour cette requète, essayer avec les autres moteurs.');
+ cse.draw('cse');
+ cse.setLinkTarget(GSearch.LINK_TARGET_BLANK);
+ cse.execute('".utf8_encode(addslashes($s))."');
+ }, true);
+
+ </script> ");
+
+ } else if ($engine=="2") {
+
+ } else if ($engine=="3") {
+
+ } else {
+
+ }
+ }else {
+ $engine="0";
+ }
+ //echo ("========== ".$engine);
+ ?>
+
+ <!-- LIGNE DE TEMPS / ENMI :: RESEARCH -->
+ <?php if ($engine=="2") : ?>
+ <h2 class='pagetitle'><?php echo(str_replace("%s", $search_text,__("Rechercher dans les annotations des ENMI “%s”"))); ?></h2>
+ <script src="http://amateur.iri.centrepompidou.fr/nouveaumonde/static/js/jquery.DOMWindow.js" type="text/javascript">
+ </script>
+ <script type="text/javascript">// <![CDATA[
+ function launch_search($) {
+ $.openDOMWindow({
+ height:662,
+ width:1022,
+ windowSource:'iframe',
+ windowSourceURL: 'http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/conf/search/loading/',
+ windowHTTPType:'get',
+ windowPadding:5,
+ windowBGColor: 'rgb(239, 239, 239)',
+ loader:1,
+ loaderImagePath:'http://amateur.iri.centrepompidou.fr/nouveaumonde/static/img/loadingAnimation.gif',
+ loaderHeight:13,
+ loaderWidth:208,
+ windowOverflow:'hidden'
+ });
+ $("#search_form").attr("target",$("#DOMWindowIframe").attr("name"));
+ }
+ jQuery(document).ready(function($) {
+ $('#search_form').bind('submit', function(e) {
+ $('#search_ts').val(e.timeStamp);
+ $(this).attr("action","http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/ldt/search/?"+e.timeStamp);
+ launch_search($);
+ });
+ <?php
+ if ($search_text!=""){
+ echo ("$(\"#search_form\").submit();");
+ }
+ ?>
+
+ });
+ // ]]></script>
+ <div class="box">
+ <div>
+ <div id="search">
+
+ <h6>Rechercher dans les anotations des Entretiens du nouveau monde industriel :<h6>
+
+ <form id="search_form" action="http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/ldt/search/" method="post">
+
+ <input name="edition" type="hidden" value="all" /> <input id="search_ts" name="ts" type="hidden" />
+ <input id="s" name="search" type="text" value="<?php echo($search_text); ?>" style="width:250px;"/>
+ <select id="id_type" name="type" style="width:100px;">
+ <option value="all">tous</option>
+ <option value="project">Contribution</option>
+ <option value="content">contenu</option>
+ </select>
+ <select id="id_field" name="field" style="width:100px;">
+ <option value="all">tous</option>
+ <option value="title">titre</option>
+ <option value="abstract">résumé</option>
+ <option value="tags">tags</option>
+ </select>
+ <input type="submit" value="recherche" />
+
+ </form>
+
+ </div>
+ <br/><br/>
+ <hr/>
+ <div id="msg">
+ Retrouvez l'ensemble des contenus et annotations et participez à l'annotation collaborative sur le site des Entretien à l'adresse suivante :<br/>
+ <a href="http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/conf/program/2009_2" target="_blank">http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/conf/program/2009_2</a>
+ </div>
+ <div class="cleaner"> </div>
+ </div>
+ </div>
+ <?php endif; ?>
+
+ <!-- LIGNE DE TEMPS / AMATEURS :: SEMINAIRES -->
+ <?php if ($engine=="3") : ?>
+ <h2 class='pagetitle'><?php echo(str_replace("%s", $search_text,__("Rechercher dans les annotations des séminaires “%s”"))); ?></h2>
+ <script src="http://amateur.iri.centrepompidou.fr/nouveaumonde/static/js/jquery.DOMWindow.js" type="text/javascript">
+ </script>
+ <script type="text/javascript">// <![CDATA[
+ function launch_search($) {
+ $.openDOMWindow({
+ height:662,
+ width:1022,
+ windowSource:'iframe',
+ windowSourceURL: 'http://web.iri.centrepompidou.fr/fonds/ldt/index/seminaire/__post__',
+ windowHTTPType:'post',
+ windowPadding:5,
+ windowBGColor: 'rgb(239, 239, 239)',
+ loader:1,
+ loaderImagePath:'http://amateur.iri.centrepompidou.fr/nouveaumonde/static/img/loadingAnimation.gif',
+ loaderHeight:13,
+ loaderWidth:208,
+ windowOverflow:'hidden'
+ });
+ $("#search_form").attr("target",$("#DOMWindowIframe").attr("name"));
+ }
+ jQuery(document).ready(function($) {
+ $('#search_form').bind('submit', function(e) {
+ //$('#search_ts').val(e.timeStamp);
+ $(this).attr("action","http://web.iri.centrepompidou.fr/fonds/ldt/index/seminaire/__post__");
+ launch_search($);
+ });
+ <?php
+ if ($search_text!=""){
+ echo ("$(\"#search_form\").submit();");
+ }
+ ?>
+
+ });
+ // ]]></script>
+ <div class="box">
+ <div>
+ <div id="search">
+ <form action="http://web.iri.centrepompidou.fr/fonds/ldt/index/seminaire/__post__" method="post" id="search_form" >
+ <h6>Recherche interséminaire dans ligne de temps : <h6>
+ <input id="s" type="text" name="value" value="<?php echo($search_text); ?>" />
+ <input type="submit" value="rechercher" />
+ </form>
+ </div>
+ <div class="cleaner"></div>
+ </div>
+ </div>
+
+ <?php endif; ?>
+
+ <!-- WORDPRESS / RESEARCH -->
+ <?php if (have_posts() and $engine=="0") : ?>
+
+ <h2 class="pagetitle"><?php echo(str_replace("%s", $search_text,__("Search results for “%s”"))); ?></h2>
+
<?php getSearch(); ?>
-
+
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Previous') ?></div>
<div class="alignright"><?php previous_posts_link('Next »') ?></div>
</div>
<div class="clear"></div>
+
<?php while (have_posts()) : the_post(); ?>
+
<div class="post" id="post-<?php the_ID(); ?>">
<p class="large nomargin"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></p>
<?php
// Support for "Search Excerpt" plugin
// http://fucoder.com/code/search-excerpt/
if ( function_exists('the_excerpt') && is_search() ) {
- the_excerpt();
+ the_excerpt_rss();
} ?>
<p class="small">
<?php the_time('F jS, Y') ?> |
@@ -43,11 +218,31 @@
<div class="alignleft"><?php next_posts_link('« Previous') ?></div>
<div class="alignright"><?php previous_posts_link('Next »') ?></div>
</div>
- <?php else : ?>
+ <?php elseif($engine=="0") : ?>
+
<h2 class="center"><?php _e("No results found."); ?></h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
+
+ <?php // <!-- Tag Element if no result-->
+ $newoptions['tcolor'] = '3466FE';
+ $newoptions['tcolor2'] = '3268FF';
+ $newoptions['hicolor'] = '000000';
+ $newoptions['bgcolor'] = 'ffffff';
+ $newoptions['speed'] = '100';
+ $newoptions['trans'] = 'false';
+ $newoptions['distr'] = 'true';
+ $newoptions['args'] = '';
+ $newoptions['mode'] = 'tags';
+ $newoptions['width'] = '590';
+ $newoptions['height'] = '410';
+
+ echo wp_cumulus_insert($newoptions);
+ ?>
+
<?php endif; ?>
-</div>
+
+ <!-- -->
+ </div>
</div>
<div class="column span-5 last">
<?php include (TEMPLATEPATH . '/sidebar_single.php'); ?>