search function

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

search function

Post by oops »

how it works?
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Create a new content part "search".
Fill in all fields and have a look at the article.

Wirldcards are allowed: * (any char/s), ? (exact 1 char)

The result will be listed on the same page. You can create multiple search content parts.

You can create custom search forms!
Put a normal HTML form anywhere inside your template but use the following replacement tags:
name of the search input field: ###search_input_field###
name the form action: ###search_input_action:SEARCH_FORM_ARTICLE_ID###
form method sent to: method="post"
if you wish that the search value should be filled in the search input field use: value="###search_input_value###"

Search is not finished yet for handling multiple result pages in frontend.
The backend search form template field is not used at the moment.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

cool:)

one question: how remove other content parts from search results page?
Last edited by oops on Sun 4. Jan 2004, 16:32, edited 1 time in total.
Sphinx
Posts: 15
Joined: Sun 4. Jan 2004, 15:46
Location: Nürnberg
Contact:

Post by Sphinx »

Hi,

i've tryed this but the cms dosn't replace the
###search_input_action:SEARCH_FORM_ARTICLE_ID###


I've put a html part into the page:

Code: Select all

<form method="POST" action=###search_input_action:SEARCH_FORM_ARTICLE_ID###>
<input type="text" name=###search_input_field### 
 size="20"><input type="submit" value="Suchen" name="B1"></p>
</form>
Dosn't work... :(


PS: I use a custom form because i want to insert a search form into the menu
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Sphinx wrote:Hi,

Dosn't work... :(
Eg try something like

Code: Select all

<form action="###search_input_action:XX###" method="post">
<input name="###search_input_field###" type="text" size="10" maxlength="200" value="###search_input_value###" style="font-size:10px; width:75px;"> <input type="submit" value="Go" style="font-size:10px;">
</form>
XX=id
http://www.studmed.dk Portal for doctors and medical students in Denmark
Sphinx
Posts: 15
Joined: Sun 4. Jan 2004, 15:46
Location: Nürnberg
Contact:

Post by Sphinx »

But i want to search in all articles
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

create new article and content part "search"
this article ID = XX
Sphinx
Posts: 15
Joined: Sun 4. Jan 2004, 15:46
Location: Nürnberg
Contact:

Post by Sphinx »

Great, it works. THX

Best regards,
Kai Burkard
Germany
Sphinx
Posts: 15
Joined: Sun 4. Jan 2004, 15:46
Location: Nürnberg
Contact:

Post by Sphinx »

Oh no, a little problem more....

Look at http://cms2.pingino.de

When i search 4 test or 4 kontakt then it shows me the correct informations.

But when the user is in an submenu then the search dosn't work. Any ideas? :?:
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

search form template field is not used at the moment
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

@Sphinx:

You are a little wrong with your search content - and try to set your form action in quotes.
Last edited by Oliver Georgi on Tue 6. Jan 2004, 12:26, edited 1 time in total.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

who are you talking to`?
http://www.studmed.dk Portal for doctors and medical students in Denmark
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post by Denis Parshutin »

Hi All!

I'm trying to use this code in my Search page with ID=7
<form action="###search_input_action:7###" method="post">
<input type="text" name="###search_input_field###" size="10" maxlength="250" value="###search_input_value###" style="font: normal 11px/11px sans-serif; border: solid 1px #94A4BF; background: #727A89; padding: 2px; color: #FFCC00;">
<input type="submit" value="Go" style="font-size:10px;">
</form>
but nothing returned :(
any ideas??

Thanks in advance
hidiho
Posts: 38
Joined: Wed 3. Dec 2003, 23:44

Post by hidiho »

Hi Dennis,

if not solved yet: i used your code in my template, changed only the 7 into my own search id and it worked fine
So the code is ok

Now:

when creating a search page (id=7 in your case) this code (see above) should only be used on other pages or in the template.

Please just state where you put the code into, i'll try to help

regards

hidiho
pk2000
Posts: 63
Joined: Mon 17. May 2004, 22:43
Location: Tallinn, Estonia
Contact:

Post by pk2000 »

maybe i'm way stupid to get it but when i use this in my template:

Code: Select all

<form action="###search_input_action:24###" method="post">
<input name="###search_input_field###" type="text" size="10" maxlength="200" value="###search_input_value###" class="input">
<input type="submit" value="Otsi" class="input-button">
</form>
it only works on the page that has the search content part on it ID=24 for me. And it doesn't work on any other page. I use header/main/footer layout and the code is in main.

can anyone give me some clue?

Thanks.

You can see it not working here: http://www.kallas.biz/index.php
Post Reply