Page 1 of 2
Tag pisearch (réglé)
Posted: Mon Dec 12, 2005 6:40 pm
by Marc
Bonjour,
J'aimerais placer un module de recherche interne au site et afficher le tout sur une page résultat.
Apparemment le tag 'pisearch' réponds à ma demande mais je n'ai pas réussi à le configurer.
Voilà ce que j'ai fait :
1 - Modifier le paramètre 'default_encoding' = 'utf-8' dans le fichier config.php du site,
2 - Créer le tag (coté tag utilisateur) en copiant l'intégralité de la fonction 'function.pisearch.php'
3 - Copier le fichier 'pisearch.tpl' dans le répertoire 'tmp/template' (mais je ne vois pas la nécessité puisque cela n'est pas pris en compte par les templates de CMSMS.)
4 - j'ai copié le code suivant ds mon template :
Code: Select all
<!-- Copy code of pisearch -->
<form action="/index.php?" method="get">
<input type="hidden" name="page" value="search">
<input type="text" value="" maxlength="50" size="15" name="pisearch" id="query_string" />
<input type="submit" value="Recherche" id="buttonSearch" />
</form>
<!-- end of copy -->
5 - J'ai créé une nouvelle page 'search'
6 - J'ai effacé le cache
Lorsque je lance une recherche, la page search s'affiche mais sans résultats.
Quelqu'un a déjà utilisé ce tag ?
Avez-vous une idée pou configurer cette fonction ?
Merci de votre aide
Re: Tag pisearch
Posted: Tue Dec 13, 2005 2:55 pm
by cyberman
Don't know that helps, but perhaps your form tag should looks like this:
Code: Select all
<form action="http://www.yourdomain.fr/index.php" method="get">
or this
Code: Select all
<form action="'.$config['root_url'].'/index.php" method="get">
(full path, without "?")
Sorry, my french is too bad so I can use it here

...
Re: Tag pisearch
Posted: Tue Dec 13, 2005 4:52 pm
by Marc
Thank cyberman.
My english is very bad

My problem is not in the code of pisearch.
But don't have a result of request when i search a word.
You can see my problem in
http://www.spa-cabourg.org
Bye
Re: Tag pisearch
Posted: Wed Dec 14, 2005 7:44 am
by cyberman
Marc wrote:
1 - Modifier le paramètre 'default_encoding' = 'utf-8' dans le fichier config.php du site,
Your default encoding (config.php) is utf-8. The encoding of your template is ISO-8859-1. I think this should be the same. Now you have the choice to set config.php to ISO-8859-1 or template to utf-8

.
PS: Your site isn't xhtml-valid - I get 46 warnings from the html validator

.
Re: Tag pisearch
Posted: Wed Dec 14, 2005 9:47 am
by Marc
Thank cyberman.
Oh yes, ma config isn't a same between config.php and my template. I modify and test that.
For xhtml-valid, i see this but when you know this warnings ?
Re: Tag pisearch
Posted: Wed Dec 14, 2005 12:13 pm
by Marc
Now, i have modify my config.php and my template for default encoding as ISO-8859-1.
I have same result.
Have-you a another idea ?
Thank your contribution.
Re: Tag pisearch
Posted: Wed Dec 14, 2005 1:49 pm
by cyberman
Marc wrote:
For xhtml-valid, i see this but when you know this warnings ?
I'm using firefox with the html validator plugin version 0.7.6 so I can see all errors / warnings in status line

Re: Tag pisearch
Posted: Wed Dec 14, 2005 1:50 pm
by cyberman
Marc wrote:
Have-you a another idea ?
I will check it once again ...
Re: Tag pisearch
Posted: Wed Dec 14, 2005 3:31 pm
by cyberman
Marc wrote:
Have-you a another idea ?
Pisearch works fine on my
playground - please look.
Have you insert the {pisearch} tag near the {content} tag?
Re: Tag pisearch
Posted: Wed Dec 14, 2005 4:53 pm
by Marc
cyberman wrote:
Have you insert the {pisearch} tag near the {content} tag?
Yes, i have insert the {pisearch} tag near the {content} tag.
I have testing the {pisearch} tag into the content page : no success.
Re: Tag pisearch
Posted: Wed Dec 14, 2005 7:04 pm
by Piratos
Oh man
YOur form looks so:
Code: Select all
<form action="/index.php?" method="get">
<div align='right'>
<input type="hidden" name="page" value="search"/>
Recherche : <input type="text" value="" maxlength="50" size="15" name="pisearch" id="query_string" />
<input type="submit" value="Ok" id="buttonSearch" />
</div>
if you look in tag help and do so how it was witten it look like so
(Here an example with full function (view the html-source of this page and copy and paste it into your template):
Code: Select all
<!-- Copy this code and paste it into your template -->
<form action="http://localhost/ctest/index.php" method="get">
<input type="text" value="" maxlength="50" size="15" name="pisearch" id="query_string" />
<input type="submit" value="Suchen" id="buttonSearch" />
</form>
<!-- end of copy -->
This ""
http://localhost/ctest/index.php"" comes directly from your config.php.
Your <form action="/index.php?" is wrong and must be corrected.
By By i'm in hollidays.
Re: Tag pisearch
Posted: Wed Dec 14, 2005 11:14 pm
by Marc
I have modify my template with your remarque but is a same...
I have not a result in my page.
Good hollidays
Re: Tag pisearch
Posted: Thu Dec 15, 2005 9:02 am
by Piratos
form is now ok.
please post your template.
it must come something like this:
No results a text like this:
Es wurden kein Inhalt mit dem Suchbegriff ->piratossimple<- gefunden.
On your Site no text comes look as there are no or corrupted template.
Take the original Template to test in tmp/templates
Re: Tag pisearch
Posted: Thu Dec 15, 2005 3:54 pm
by Marc
I have get a admin access o cyberman who have find a solution of my problem.
Thank at the all body to help me.

And excuse-me of a bad english

Re: Tag pisearch
Posted: Fri Dec 16, 2005 6:55 am
by cyberman
Piratos wrote:
Code: Select all
<form action="/index.php?" method="get">
<div align='right'>
<input type="hidden" name="page" value="search"/>
Recherche : <input type="text" value="" maxlength="50" size="15" name="pisearch" id="query_string" />
<input type="submit" value="Ok" id="buttonSearch" />
</div>
if you look in tag help and do so how it was witten it look like so
I've try it on my playground - the label "Recherche" works fine, no problems

.