Jump to content

Search the Community

Showing results for tags 'search'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I have a site with a search form similar to the skyscrapers profile. the strange thing is that if you put in a keyword for 'guitar' and a 2nd keyword (anything), a 404 is triggered (!)... I can't figure out why this is happening, there are no errors in the log and no messages in the console; all other keywords work fine, just the word 'guitar' + another word triggers the 404 not found...
  2. Hey there. The pagination for my search isn’t working. I guess it has something to do with the merging of PageArrays beforehand. Take a look at the (simplified) search.php: $out = ""; if ( $q = $sanitizer->selectorValue( $input->get->q ) ) { $input->whitelist( "q", $q ); $pa = new PageArray(); $value = $pages->find( "title%=$q" ); $pa->import( $pages->find( "template=abc, …|…|…=$value" ) ); $pa->import( $pages->find( "template=abc, title%=$q" ) ); $result = $pa->find( "start=0, limit=4" ); $pagination = $result->renderPager(); $count = count( $pa ); if( $count ) { $out .= "<h2>Search results found</h2>"; $out .= "<ul>"; foreach( $result as $r ) { $out .= "<li>{$r->title}</li>"; } $out .= "</ul>"; $out .= $pagination; } else { $out .= "<h2>Sorry, no results were found</h2>"; } } else { $out .= "<h2>Please enter a search term in the search box</h2>"; } include("./head.inc"); echo $out; include("./foot.inc"); Pagination names are activated for the search template and the output of the pagination list is correct. When I go to "page2", "page3", etc. the result is always the very first 4 matches. Any help is appreciated, thanks! p.s.: I have to do the merging because one time I search for page references to a page (the "…" in the code) and one time for the title of a page with the template "abc". (offtopic: if you know a better solution to this just let me know)
  3. On a new install (copy of an absolutely fine-working PW) the search is not working. And it's really strange: same server, same PHP versions etc. The q parameter is not recognized by PHP. I tried to echo $_GET["q"] as well, but the var is empty. The search URL is just domain.tld/search/ - instead of domain.tld/search/?q=hello If I manually add the param in the URL: /search/?q=something, the search results are shown as expected. Error log doesn't show anything. I also checked any .htaccess files, whether something else hijacks the q param for mod_rewrite - nothing. Any ideas where to look further?
  4. Hi, I'm using more or less the same search code as in the default profile, however when searching on words or combinations of words using 3 letters or less, there are no search results returned. The site in question is a company who's name is 3 letters, and there are a lot of products that are between 1-3 characters. I'm guessing this is something to do with the whitelist, or sanitizer? I'd like to be able to adjust the settings somewhere to allow for 3 letter words to be returned on a search. TIA
  5. Need some help with these this filter if anyone can point me in the right direction. I altered the below from the skyscraper profile to meet my needs, but can not seem to get it to work in my case. The actual drop down on the form works properly displaying all locations, but I cant get the output to search what is selected. What am I missing? I am trying to grab all the employees when a specific location is selected. My structure is root Location 1 - employee -- jane doe -- jone doe Location 2 -employee -- jane smith form drop down for child page <select name="location"> <option value="">any</option> <?php foreach($pages->get("/")->children("id!=10") as $location) { $selected = $location->title == $input->whitelist->location ? " selected='selected' " : ''; echo "<option$selected value='{$location->id}'>{$location->title}</option>"; } ?> </select> output for child page if($input->get->location) { $location = $pages->get("template=location" . $sanitizer->pageName($input->get->location)); if($location->id) { $selector .= "location={$location}, "; $input->whitelist('location', $location->name); }}
  6. Is there a way to search for PW forum members by location? I'm interested in finding other PW developers in my local area.
  7. hi everyone:) i stumpled across ProcessWire on my way to learn ModX. It draws my attention because of it's fast backend, and the chance for me to connect it with my big wish to learn php (atm i know just very basic stuff :- ). PW seems to enable me to use some php-funktions with an easier layer on top of it. so, i can be productive at the beginning here are some questions, that i came up with at my exploration of the PW-wonderland in the last days: search: afaik there is the possibility to integrate a search function to the website. is it possible to combine a searchfield with checkbox filters to search and filter pages in a specific branche of the page tree? blogging: it's possible to build a tag-cloud for a blogging sections with PW. this hole filter possiblities-thing is somewhat unclear for me atm comments-module: the comments containing a name and an e-mail field, but i like to extend it with a "twitter" and "your website" field. is this possible without a lot of complicated "core hacking" ? forms: from what i have understand, it's possible to create a front-end form that collects data for the content of a page. are ther possibilities to get form entries per mail with csv-file attached or csv-styled text inside? demo page: maybe i've just overlooked it, but i was not able to find the skyscraper siteprofil on the download page. i realy like to have a look at it, to learn from the api usage there. does someone have experience with forums and newslettersystems, that go well along with PW ?(same userbase/passwords) (i hope my english was understandable, since i normaly don't write a lot in english myself. but i'm able to perfectly read and understand it). greetings, chris EDIT: a questions to the modx users in this his forum: is PW now your primary cms and modx a fallback for some special usecases? - PW made me desinterested to learn modx, but maybe i miss something
  8. Hi, I am using the basic search template from the processwire install. I havn't been able to return any search results from text contained in repeater fields. I have added the repeater field name and all fields contained inside it to my search template. On processwire.com i have found this post in the comments area by someone: Is there any way around this, or are repeaters left out of search results? thanks Alex
  9. Hi all, I'm tweaking a search engine that's built using PW selectors. I'm wondering if there is a way to set the selector to find word fragments, for example the user searches on 'grass seed' and I want to find fields that have the words 'grasses' and 'seeding' (or 'grassy' and 'seeds' for another example). I know I can use the %= selector, but my options there are body%=grass seed or body%=grass|seed, neither of which return just what I want. I could switch to using raw SQL (body LIKE 'grass%' AND body LIKE 'seed%') but I'd rather stick with PW selectors if I can. Thanks!
  10. In the "search.php" template that comes with the download of PW, this line allows you to search for "title", "body" and "sidebar" fields: $matches = $pages->find("title|body|sidebar~=$q, limit=50"); But how do you search for content inside a repeater field? Thanks.
  11. Just wanted to share that, when using pages find to search title|headline|body, since the body usually is text which contains html the search also finds html elements within text. http://processwire.com/search/?q=strong The pages found do not contain the word strong. I know searching pages using a pages->find(selector) does not account for this, but maybe one should clean all those tags out, or add it to stop words? Stripping tags before a search on texarea? Searching site with PW in genreal How do you guys also feel about using pages->find() to use as a site search? In cases where data pages are is pulled into other pages, it's getting hard to work around those cases and keep track of it. Also sometimes it seems the search doesn't return pages in correct relevance, depending on a lot of factors what fields you search and if they're full text etc. What is you're experience with PW search? If you use multilanguage, the stopwords are still only the english once used that come with core. So not ideal still. What you guys think about having a search tool to index pages using a parser and write index tables? Or would you use another tool or google custom search?
  12. I'm trying to work out the best way to implement an autocomplete search using this jqueryui plugin : http://jqueryui.com/demos/autocomplete I have over 1500 street names (sepearte pages in PW) which I'd like users to find via an autocomplete search. My first idea is to create a seperate search page which will return the results in json format (if called via ajax). Similar to this FAQ which explains how to work with ajax : http://processwire.c...__fromsearch__1 I'm currently using the %= like style selector which works well for the type of results I want. Just a little worried about performance hit when using this selector, especially if I have an autocomplete search - the number of documents I want to search should not be more than 1500. Is this a good approach? Any other ideas or suggestions? Also related to search, does anyone have any tips for improving the default search functionality? How about more advanced wildcard type searches? or maybe a google style "did you mean ______?" Thanks, Michael
  13. I'd like to make the search in the PW Admin a little more fuzzy (able to match partial terms etc). Can I somehow change the default operator from "~=" to "%=" ? In the admin theme I'm using, the form is generated like this: $searchForm = $user->hasPermission('page-edit') ? $modules->get('ProcessPageSearch')->renderSearchForm() : ''; Can I pass a parameter to the renderSearchForm() function, or something similar without changing the core? Thanks!
  14. Hello, I've tested some selectors on my site and I'm having a little question here. My 'page tree' look like this : /guests /guests/admin/ /guests/admin/Laurence /guests/admin/Le p'tit /guests/admin/Élodie As you can see, I have names with special characters. I'm trying to retrieve the pages for an autocomplete field on the front-end. So far so good, it worked ok, until I notices I had no result for 'l', that's when I added the 'Laurence' page and it worked. So I thought the problem was due to the apostrophe... Anyway, I used the new 'Selector test' module (thanks to the creator!) and noticed something : parent=/guests/41,title*=l >> returns 1 page found : Laurence (Why not 'Le p'tit' ?) parent=/guests/41,title^=l >> returns 1 page found : Laurence parent=/guests/41,title%=l >> returns 3 pages found : Laurence, Le p'tit, Élodie (no apostrophe problem?) And : parent=/guests/41,title$=ie >> returns 1 page found : Élodie parent=/guests/41,title$=die >> returns 0 pages found ? Why not 'Élodie'? So I don't really know what to think... Am I doing something wrong here? Thanks if anyone has time to give me a clue ;-)
  15. Greetings, I wonder if anyone can help me understand how to overcome this issue. I am building a simples catalog with 3 taxonomy: category (determined by hierarchical page), type and area (both are selected using PageArray dropdowns, meaning that the Options are "pages" which have attributes themselves. Now, I want to create a search-like template that picks up the URL arguments, but I don't know how to set this correctly. I picked up the search.php example, and added category restriction, but now I want to also restrict by 'area'. $matches = $pages->find("title|body|sidebar*=$q, parent=/catalogo/produtos/, arealimit=50, id!=1"); The area attribute has 4 items, all of them have title, description and a field called 'alias'. I would like to search by alias, and return all products that have that 'area' selected. The URL should look like this: domain.com/catalog-search/?q=carro&area=RH Now, I want to pickup the 'area alias' typed in the URL (which I already have), check to which 'area' this alias belongs, and use that area to filter my results. Since there can be multiple areas selected, how can that "search query" be built? Thank you very much for any help.
  16. Hello, I am bulding a site that uses the "Pages" fieldtype for categories and tags. Now I'd like to include this information in the search. Can I search the pages fieldtype without iterating over each page? Like if someone searches for "news", it finds any page where the field "tags" contains the page with the title "news"? Thanks! thomas
  17. Hello again! I'm still working with my PW powered site. I really love PW, but I've got problem with searching engine, while this is the most important part of my site (norwegian to polish dictionary) My searching rules: if (strlen($q)<=4) { // My sollution for short words: $matches = $pages->find("title|translation=$q, sort=title, limit=100"); // $matches = $pages->find("title|translation|definition%=$q, sort=title, sort=translation, limit=100"); // $matches = $pages->find("title|translation|definition^=$q, sort=title, sort=translation, limit=100"); } else { $matches = $pages->find("title|translation|definition~=$q, sort=title, sort=translation, limit=50"); } Some examples: Search word: sąd Results: domstol sąd frukthage en sad Search word: bąk Results: bak za, z tyłu, w tyle bak en pośladek, tył rørdrum en bąk So it looks that ą = a :/ Can someone tell me why? Another problem: When I'll change search querry to: $matches = $pages->find("title|translation|definition%=$q, sort=title, sort=translation, limit=100"); and I'm searching for: dom ("house" in english and "hus" in norwegian) I've got these results: advisere ogłosić, powiadomić aktivitetshus et dom kultury alderdom en starość aldershjem et dom starców ane przeczuwać, domyślać się, podejrzewać ane - aner - ante - ant etc... while I don't get hus in the first 100 matches :/ When I'll change search querry to: $matches = $pages->find("title|translation|definition%=$q, limit=100"); It's a little bit better, but still hus is very far from beginning of the search results. How can I improve that? Is there any rule to sort results by match?
  18. I have these pages: /fruit/ <- 'fruit' is not hidden /fruit/apples/ <- 'apples' is hidden /fruit/apples/green-apple/ <- 'green-apple' is not hidden I want 'fruit' to appear in the nav, it does, it's not hidden, all good. I want 'green-apple' to not appear in the nav, it doesn't, it's parent is hidden, all good. I want the contents of 'green-apple' to be findable by search, they are, it's not hidden, all good. When I click a search result link to 'green-apple' I see the page and no nav is 'lit-up' as this page's path into the nav is interrupted by the hidden page, no problem, I use this code to detect if the page displayed is under a hidden parent and if it is, display a breadcrumb: if($page->parent->isHidden()) { foreach($page->parents as $parent) if($parent->viewable()) echo "<li><a href='{$parent->url}'>{$parent->title}</a></li>"; } The problem I am seeing is that although the 'apples' page is set to Hidden, it is shown in the list of $parents, so it looks like I am misusing 'viewable()' in some way. Any pointers as to why this is happening and/or what I might do to fix? As ever, any comments most appreciated!
  19. The search form on the basic install works fine and is great... But if I add a new text field, i can't get it's content to appear in my search results. Do i need to configure new fields somehow to make them 'searchable' ? alex
×
×
  • Create New...