mutlipe class search

Author Message

Roman Mudrack

Monday 03 May 2004 2:39:29 am

hi,

is it possible to make a advancedsearch including multiple classes not only one ?
I've tried with array(1,2,3) but i won't work. It will be overridden.
Also hardcoding the fetch in the advancedsearch.tpl dosen't work.
Please help.

Balazs Halasy

Monday 03 May 2004 4:28:43 am

Hi,

You'll have to use "advancedsearch" instead of just plain "search". The
following code demonstrates how you can let users search for only articles
and folders (content class 1 and 2) using the advanced search method:

<form action={"/content/advancedsearch/"|ezurl} method="post">
<input type="text" size="20" name="SearchText" value="" />
<input type="hidden" name="SearchContentClassID[]" value="1" />
<input type="hidden" name="SearchContentClassID[]" value="2" />
<input name="SearchButton" type="submit" value="Search" />
</form>

Use the "SearchContentClassID[]" to specify which classes that should be
returned. In the example above, we search for folders (1) and articles (2).
Also, make sure that you use the HTTP POST method, as demonstrated in the
code above (instead of GET, which is the default and which makes things
appear in the URL). When using the POST method, things will not appear in the
URL, and people will not be able to mess around with it.

However, the POST method can still be "hacked" by a user who is able to fake a
POST request. I think very few users would do this. BUT: if you *really* need
high level of "security" then you should either disable searching within the
attributes of the classes that shouldn't be searched (and then reindex the
entire content tree) or setup some kind of role/permission settings that
prevent people for viewing the "secure" part of your content.

Cheers.

Balazs

Roman Mudrack

Monday 03 May 2004 5:21:20 am

thanks

Fabricio Guerrero

Wednesday 04 May 2005 7:20:16 am

Hi,

in need of a similar function.. we need to search various classes but this search can also me multiple attributes.

I tried the following script that obviously didn&#180;t work:

<form action={"/content/advancedsearch/"|ezurl} method="get">

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="9" />
<input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['9']['value']}" />

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="431" />
<input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['431']['value']}" />

name="SearchText" id="Search" value="" />-->
<input class="searchbutton" name="SearchButton" type="submit" value="Search" />
<input type="hidden" name="SearchContentClassID[]" value="4" />
<input type="hidden" name="SearchContentClassID[]" value="29" />
</form>

what i'm basically trying to do is tell ez to search my user class based on the attribute_id= 9
and my persons class on the attribute_id= 431

More or less let users perform multi-attribute and multi-class searches.

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

steve walker

Wednesday 04 May 2005 7:56:34 am

Hi there,

Has anyone got any ideas on Fabricio's que? An indication of whether:

a) the advanced search facility has the ability to search on specific attributes as well as multiple classes, or

b) we need to build a new search page that does this via some sort of fetch?

My understanding from Fabricio is that you can search on specific attributes with a class, and you can search on multiple classes for any attribute - but you cant do both?

Any ideas?

Cheers, Steve.

http://www.oneworldmarket.co.uk

steve walker

Monday 09 May 2005 12:48:52 am

Bump! Any pointers on this - is searching specific attributes across multiple classes possible?

Thanks, Steve.

http://www.oneworldmarket.co.uk

steve walker

Monday 09 May 2005 11:18:54 am

Hi there,

We'd really appreciate some help on this, even if its:

- "no, we don't think its possible", or

- "of course its possible, you should have read..."

Thanks.

http://www.oneworldmarket.co.uk

Ɓukasz Serwatka

Monday 09 May 2005 12:18:30 pm

Hi Steve,

Have you read this document?
http://ez.no/ez_publish/documentation/customization/components/search/custom_search_box

and

http://ez.no/community/forum/setup_design/custom_advanced_search_question

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

steve walker

Tuesday 10 May 2005 9:20:31 am

Many thanks.

Steve.

http://www.oneworldmarket.co.uk

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:19:29
Script start
Timing: Jan 31 2025 04:19:29
Module start 'layout'
Timing: Jan 31 2025 04:19:29
Module start 'content'
Timing: Jan 31 2025 04:19:29
Module end 'content'
Timing: Jan 31 2025 04:19:29
Script end

Main resources:

Total runtime0.0174 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.0313151.1953
Module start 'layout' 0.00530.0025 739.226636.6172
Module start 'content' 0.00790.0079 775.8438102.2500
Module end 'content' 0.01580.0015 878.093841.9922
Script end 0.0174  920.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002514.0881140.0002
Check MTime0.00116.3724140.0001
Mysql Total
Database connection0.00063.570710.0006
Mysqli_queries0.002514.425330.0008
Looping result0.00000.086410.0000
Template Total0.00116.110.0011
Template load0.00094.938710.0009
Template processing0.00021.178810.0002
Override
Cache load0.00063.426810.0006
General
dbfile0.003017.184680.0004
String conversion0.00000.038440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs