Changeset 82377 in spip-zone


Ignore:
Timestamp:
May 15, 2014, 9:55:31 AM (5 years ago)
Author:
fil@…
Message:

ajouter le snippet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/indexer/trunk/prive/squelettes/contenu/sphinx.html

    r82376 r82377  
    11<h1>Test SPHINX</h1>
    22
    3 [(#FORMULAIRE_RECHERCHE{#URL_ECRIRE{sphinx}})]
     3[(#FORMULAIRE_RECHERCHE{#SELF})]
    44
    55<?php
     
    1515?>
    1616
    17 [(#SET{sql,SELECT * FROM [(#ENV{source,spip})] WHERE MATCH('[(#ENV{recherche})]') LIMIT 10})]
     17[(#SET{sql,"SELECT *, SNIPPET(content,"[(#ENV*{recherche}|_q|concat{","})]'limit=200') as snippet FROM [(#ENV{source,spip})] WHERE MATCH([(#ENV*{recherche}|_q)]) LIMIT 10})]
     18
     19<pre>[(#GET{sql}|htmlspecialchars)]</pre>
    1820
    1921
     
    2224        <B_documents>
    2325            <h2>Liste des documents trouvés</h2>
    24             <ul>
     26            <dl>
    2527        <BOUCLE_documents(DATA){source tableau, #VALEUR}{si #CLE|=={docs}}>
    26                 [<li><a href="[(#URI)]">(#TITLE)</a></li>]
     28                [<dt><a href="[(#URI)]">(#TITLE)</a></dt>
     29                <dd>#SNIPPET</dd>]
    2730        </BOUCLE_documents>
    28             </ul>
     31            </dl>
    2932        </B_documents>
    3033
Note: See TracChangeset for help on using the changeset viewer.