Forums / Developer / mutlipe class search

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

eZ debug

Timing: Jan 18 2025 18:39:34
Script start
Timing: Jan 18 2025 18:39:34
Module start 'content'
Timing: Jan 18 2025 18:39:35
Module end 'content'
Timing: Jan 18 2025 18:39:35
Script end

Main resources:

Total runtime1.3123 sec
Peak memory usage4,096.0000 KB
Database Queries218

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.6094180.8438
Module start 'content' 0.00701.0587 768.4531743.1172
Module end 'content' 1.06560.2465 1,511.5703344.4453
Script end 1.3121  1,856.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00560.4247210.0003
Check MTime0.00180.1352210.0001
Mysql Total
Database connection0.00070.053210.0007
Mysqli_queries1.213892.49562180.0056
Looping result0.00250.18722160.0000
Template Total1.280297.620.6401
Template load0.00220.170120.0011
Template processing1.278097.389520.6390
Template load and register function0.00020.018910.0002
states
state_id_array0.00120.094510.0012
state_identifier_array0.00180.134920.0009
Override
Cache load0.00200.1532760.0000
Sytem overhead
Fetch class attribute can translate value0.00130.101860.0002
Fetch class attribute name0.00120.0940120.0001
XML
Image XML parsing0.00230.172860.0004
class_abstraction
Instantiating content class attribute0.00000.0016120.0000
General
dbfile0.00480.3648410.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs