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'm building a site where pages will include a field listing one or more plant species. The problem with plant species is that several different names can refer to the same plant. For example, all the following refer to one plant: Spinifex sericieus, spinifex, kowhangatara, silvery sand grass My client wants to avoid having to enter all the aliases for every species on every page and just use a single "master name", but wants a search for "kowhangatara" to return pages that include "Spinifex sericieus". I'd be grateful for any suggestions on how I could achieve this kind of alias searching in ProcessWire.
  2. I installed ServiceCurrencyConversion and it's great. I was wondering if any of you by chance had any experience with using this as I would expect it would often be used, to search by price... in your currency. Right now I have products that each have fields price_currency and price_amount. So each has a native currency. I am able to show the price in each currency we currently support on our listings index by way of this function: function currencyConvert($page) { //echo $page->id . '<br/>'; $cc = wire('modules')->get('ServiceCurrencyConversion'); $current = $page->price_currency->name; $amt = $page->price_amount; $currencies = wire("pages")->find('parent=1135,include=all'); //echo count($currencies) . '<br/>'; $converted = []; foreach($currencies as $currency) { //echo $currency->name; //if($currency = $cc) continue; //$converted["$currency->name"] = $cc->convert($current, $currency->name, $page->price_amount); //if($current != $currency->name) { //echo " Set: $current Now: $currency->name Amt: $page->price_amount "; $converted[$currency->name] = $cc->convert(strToUpper($current), strToUpper($currency->name), $page->price_amount); $amount = $currency->name == 'eur' ? number_format($converted[$currency->name], 0, ',', ' ') : number_format($converted[$currency->name]); $converted[$currency->name] = wire("pages")->find("parent=1135, name=$currency->name, include=all")->first()->title . $amount; //} } //print_r($converted); return $converted; //echo '<br/><br/>'; } So in my listings index I have: foreach(wire("pages")->find('parent=1135, include=all') as $currency) { if($currency->name != $item->price_currency->name) $price .= ' / ' . currencyConvert($item)[$currency->name]; } That outputs the price in every currency that isn't the default for the listing (which is already output). So I already have a search in place for listings that searches by the price_amount. I want to incorporate the different currencies in my search, while not excluding results based on their set currency. The way I have this set up currently works, but incorrectly, as it doesn't restrict listings based on their currency conversion. Now that I can convert them I want to fix the search feature to accommodate this. So how can I do this? I would think to maybe store a separate price_amount per currency, with a default set (to base other values from), but this does seem a bit tricky... Right now only 3 currencies are supported but if it grows to be a large amount it might become unwieldy. If that's the right way to do it though, so I will. Or, just leave the fields as-is, and go by the chosen currency in the search, returning all results that match the amount in that currency. This is what I would like to do because it seems simpler. But then I worry about performance... This means every search would have to convert the price for potentially almost every listing, and that's before even returning a set of results!(?) Like, you would have to search, with a currency and max. and/or min. amount set for price... then that search would have to first process the converted price for every listing that fits all the other search criteria, right (potentially all), and then return the values that match the price range in the chosen currency. That sounds like too much to me. Also obviously outputting the price in every currency we have would get too lengthy so I want to be able to target a single one efficiently. You see my dilemma? Anyone more knowledgeable have any advice, please? Much appreciated.
  3. EDIT: Not sure why it didn't work the first time I tried it, but creating a tag without the space or hyphen did eventually work. I'll have to use my workaround (since I can't omit the space in the title of the page). Mods are welcome to delete this post or leave it for someone else who might run into the same thing. I thought I was doing something to make life easier on myself (this is how all tragedies begin). On a site (live, of course), I had two separate areas where product literature documents were referenced. There is a product literature section, and individual product pages. Before, in each template, I was linking to static URLs for files that were placed on the site via FTP. What usually happened was that I'd upload a file to the Literature section and forget to add it to the product page. Yesterday I decided that it would be less complicated (and more fool-proof) to use a File upload field in the Product Literature section, with tags that match the titles of the product pages, so that the product's template could pull from the same files. I thought tags would allow me the flexibility to add any tag I might need down the line. With some fits and starts, I got it working yesterday for two categories of document (I thought). Today, I tried to finish up the task and noticed that two of the products are not pulling any documents at all. My first instinct, because mysql searches have burned me before, was that the tags "Spectra 500" and "RDS-30" were falling under the search term limits. "Spectra 1000" and "Spectra 1100" work as intended. Reading up in the forums seemed to agree about the search phrase length. I went to the site and did a quick change up of the product page's title and the tags on the document to test, but changing the terms to "Spectra500" and "RDS30" didn't correct it. Later this did start behaving as expected, not sure why I had misleading results from my first attempt. So I set up and coded a workaround (thinking a multi-Page Select field on the literature page and a corresponding text field for the product pages). Final code to pull files on pages of template "document" using Page Multiselect from the template of pages of template "product": $datasheets = $pages->find("parent=/product-literature/product-data-sheets/,template=document,product_tag=$page"); $manuals = $pages->find("parent=/product-literature/product-instruction-manuals/,template=document,product_tag=$page"); if(count($datasheets)) { echo "<div class='col span_2_of_4'>"; echo "<section class='reports'>"; echo "<h4 class='section_names'>Available Product Documentation</h4>"; foreach($datasheets as $datasheet) { echo "<div>"; $datasheetLink = $datasheet->get("254_file")->url; echo "<a href='{$datasheetLink}' target='doc_window'><img src='{$config->urls->assets}images/documenticon.png' class='floatleft' alt='{$datasheet->title}'>"; echo "<p class='file_names'>{$datasheet->headline}</p></a>"; echo "</div>"; } if(count($manuals)) { foreach($manuals as $manual) { echo "<div>"; $manualLink = $manual->get("254_file")->url; echo "<a href='{$manualLink}' target='doc_window'><img src='{$config->urls->assets}images/documenticon.png' class='floatleft' alt='{$manual->headline}'>"; echo "<p class='file_names'>{$manual->headline}</p></a>"; echo "</div>"; } } echo "<br /> <br /></section>"; echo "</div>"; } else if(count($manuals)) { echo "<div class='col span_2_of_4'>"; echo "<section class='reports'>"; echo "<h4 class='section_names'>Available Product Documentation</h4>"; foreach($manuals as $manual) { echo "<div>"; $manualLink = $manual->get("254_file")->url; echo "<a href='{$manualLink} target='doc_window'><img src='{$config->urls->assets}images/documenticon.png' class='floatleft' alt='{$manual->headline}'>"; echo "<p class='file_names'>{$manual->headline}</p></a>"; echo "</div>"; } echo "<br /> <br /></section>"; echo "</div>"; }
  4. If a user searches (frontend) for words with german umlauts like ä, ö, etc. no results are given back. Do you have any solution? Thanks.
  5. I am building a search with standard API selectors. Have faced a few confusing moments, so decided to share my experience with it. 1) In the default site profile the search is built with the ~= selector operator like this: $selector = "title|body~=$q, limit=50"; Let's assume that $q = "Process Wire" This does find pages with title or body fields containing both full words Process and Wire (disregarding the case of the letters). It would not find any pages with ProcessWire. That is expected. But if $q = "Process" it still won't find pages with ProcessWire as ~= looks only for full words. This is quite uncomfortable especially for fusional languages like Russian. 2) Nice way to go is to use *= instead like this: $selector = "title|body*=$q, limit=50"; This does find ProcessWire with $q = "Process". But it won't find Pro-Fields with $q = "Pro", as *= uses MySQL fulltext indexes. This index does not index short words (<4 letters or so by default). And the hyphen breaks complex words and makes both split parts index separately (see user comments here). So Pro never gets indexed as it is only 3 letters long. This *= selector operator also does not allow to serch for several separate words as ~= does with its limitations. 3) The slower but more advanced way is to use %= like this: $selector = "title|body%=$q, limit=50"; This would find Pro-Fields with $q = "Pro", but will work slower and still won't be able to search for several words in the same time. I did not find a way to search for several incomplete words in the same time. Seems like it is impossible to achieve with just one selector. Probably I would need to process the search input somehow and build a series of selectors. If someone have already done that I would be delighted to find out how. Good day!
  6. That title has the worst run on sentence, eh? When I installed PW, I opted for the new option of installing with a BLANK profile. It's been great so far. But I can't figure out how to get my search searching?! From another fresh installation (2.5.3), I copied the contents of 'search.php' into my own 'search.php' file. Added my included header and footer. Then one by one, I copied every setting for the template and page from the other installation to my own. Even copied exactly how the template had the search form. Every search result is a blank page. Nothing is outputted.
  7. I am having issues with the search function when searching by numbers. I need to search items like: 18-29-201 201 201.1.2 I am using admin to edit /wire/modules/Process/ProcessPageSearch/ProcessPageSearch.module and have added the fields to search and also tried changing the operators to =Equals and ~= Contains all the words with no luck or success. Am I in the right area? Cache?
  8. Dear all I have created a website for a local newspaper and I am trying to make its search field to work using as input greek words (letters) but in vain. I tried to figure out what is going on and even to borrow any idea from the recent multilingual profile which is optional during new installations...but also on this one I tried to search english or suomi or deutsch words but neither it, was functioning.... I would much appreciated your kind assistance and support
  9. I have been working on this logic off and on lately and have made some progress. The original question has been answered/fixed. Now I am on to making my search results make more sense. See from post #11 for new content. ---------------------------------------------------------------------- I fear I am a bit out of my depth on this one. I have been trying to get a site search up on an art gallery site that I am developing. I have created a template that has all of the fields in all of the templates on my site that I want to search against. From this list I am wanting to generate my search query. When I try and run a fulltext query based on these templates I get a big error. Error: Exception: SQLSTATE[HY000]: General error: 1191 Can't find FULLTEXT index matching the column list //use field template to create list of fields foreach ($pages->get("/search-engine-fields/")->fields as $field){ $allFields .= $field.'|'; } $matches = $pages->find("{$allFields}body~=$q,limit=50,template!=admin,template!=permission,template!=user"); I have attempted using %= but then I am unable to locate items which have segments that contain the terms. Is there another method that I should employ?
  10. So i've somehting to share expecially for beginners with processwire!! I'm like others here not really satisfied with the forum search - so i decided to make a google custom search page https://www.google.com/cse/publicurl?cx=014789015761400632609:fxrf0rj4wr4 but the optical result is not that i imagine so i created a very small html page with the PW Logo + Google CSE JS Code and now it looks better.... so i've had a fast search on the /talk/ /api/ /docs/ and cheatsheet pages from processwire.com! so maybe it's usefull for anybody? Have Fun PW-Search.zip
  11. hi there! I started with the basic PW template and now I have this site tree, it has the categories (apartments, houses etc...) then I have pages that will work as option for the articles, these options are presented in the article as a select input field type. For example objective field name is called option_objective in my article template. root Properties (articles-list-all) - Apartments (articles-parent) -- apartment one (article) -- apartment two - Houses -- house one -- house two Objective (options-template) - Sell - Rent Type of deal (options-template) - Commercial property - Private property Other options (options-template) - other option one ----------------------------------- Page name (template name) To filter and render the results similar to skyscraper's site profile I looked at how selectors work and also at the skycrapper and Macrura's from the speaker's shop example. I can generate the options to select input fields in the frontend but I can't generate the results page. The following is a part of what I have at the moment. I have this part to generate one of the article's option in the search_form.php <option value=''>Any</option> <?php foreach($pages->get("/objective/")->children("id!=1594") as $objective) { $selected = $objective->id == $input->whitelist->objective ? " selected='selected' " : ''; echo "<option$selected value='{$objective->id}'>{$objective->title}</option>"; } Part of the search_results.php $matches = $pages->find("template=article, title|body|objective~=$q, limit=20"); $count = count($matches); echo $out; Thanks in advance for the help.
  12. Hello! My first post on the forum and I start with a question. I'm trying to modify the module datatable by Soma and I want to search by $page->id. code: if( $this->input->get->sSearch ) { $q = $this->sanitizer->text($this->input->get->sSearch); $selector .= "title|body%=$q,"; } my code (doesn´t work): if( $this->input->get->sSearch ) { $q = $this->sanitizer->text($this->input->get->sSearch); $selector .= "id|title|body%=$q,"; } $thanks->ryan; $thanks->soma; And please excuse my bad English
  13. I am trying to get an image to go along with my search results. I can create the image as a file but of course the path is incorrect as it refers to the search page itself. Any idea how I can reference the relevant assets file folder? foreach($matches as $m) { $img = $m->images->last->width(200); $out .= " <li> <img src='{$img}' /> <h4><a href='{$m->url}'>{$m->title}</a></h4> <p>{$m->summary}</p> </li> "; } Thanks again
  14. Hi everone. I've searched the forum to find a solution to my problem, but so far nothing did the trick for me. So here's the issue: I've created a repeater called "news" and it's used on several overview pages (working perfectly). Now, on the home page, I want to show the latest 10 news, and I figured you can do this like this: <? foreach($pages->find("template=repeater_news, sort=-modified, limit=10") as $news): ?> <li><a href="<?php echo $news->getForpage()->url ?>"><img src="<?php echo $news->getForpage()->icon->url ?>"><span><?php echo $news->text_primary ?></span><br><?php echo $news->getForpage()->title ?> - <?php echo date('d/m/Y g:i a', $news->modified) ?></a></li> <? endforeach; ?> That works fine on my localhost, but as soon as I access the page via IP (like externally), the list stays empty. The same problem happens on my search page (when searching news). "Normal" pages don't seem to have the problem. Can anybody help me? Cheers and thanks
  15. Hey, guys. I've been a daily visitor of this forum and have learned a lot from you, thanks for that. \o/ I'm learning php, so I'm quite noob =( , and decided to try and learn it with processwire. I'm loving it. I really enjoy the fact that I can build something based on totally different approaches. But I'm having a problem on how to create and structure a Search. Can someone provide me a few tips on where to begin? Thanks in advance xoxo
  16. I very frequently see people not finding stuff in the forums, I don't blame them, the forum search sucks bit time Then many times forum members suggest to use {searchterm} site:processwire.com/talk on Google. It's true, nine times out of ten I DON'T find what I am looking for using the standard forum search. Nine times out of ten I DO find what I am looking for using Google search. So perhaps there should be a hint on the search dialog/page to use Google instead (if that's even possible). New users would find stuff quicker, saves time for all.
  17. Hi everyone. I really need help /guidance knowing if this can be done and what direction I need to take. I have a week to develop and deploy a front end music catalog. I have some limited experience with PW, developing only very small sites....nothing of this magnitude and complexity. If you could guide me to the technologies I need to look at and point me in the right direction, I will be very appreciative. I need to create a searchable page for essentially a music catalog which will pull information from artist's pages. Each track / entry needs to have a number of sections associated with it (track title, length, genre, publisher, songwriter, mood), and maybe an external-pointing link to lyrics. Each line / track will also have to have a play button and link to the music purchasing page for that particular artist. All those sections / fields listed above need to be able to be searched / filtered as well. Easier if I just show you a link to something similar. http://www.noideaband.com/songlist/ That is a WP module and I want that basic look / feel / functionality. It needs to basically pull all of the music files / products from individual pages and into the catalog I don't know. Maybe I am in over-my-head but I am really not sure where to start :/ So here is the site structure I must have: Home - Music Catalog (contains all the songs/artists on the website. This must be a searchable database front-end) - Artists -Artist Name (contains info about artist, etc) -Album 1(contains individual tracks, bio, genre, lyrics, etc) -Album 2 -etc Thanks in advance for whatever information you can bring to the table.
  18. Dear ProcessWire-Community, first of all I want to apologize for my weak english. I'm german and will try my best, but I hope you can forgive me if I missspell something or can't explain it in the right way. Further I want to point out, that in the last few weeks I've become a big fan of the ProcessWire CMS. The free structure with no useless functions and the great community made this CMS to one of my favourite CMSs. And that's the reason why I would like to ask for your help. I'm developing right now an medium-sized website and for this website I'm using the Template Twig Replace-Module. This module is great for saving lots of PHP-syntax, but is also very strict when you code wrong. For this website I want to implement an search and front-end-login-function and even though there are great tutorials for those functions available in PHP, I don't know how to translate those functions into the Twig-syntax. For the front-end-login-function I would like to try out this script. And for the search-function I would like to use the function from the search.php-template file, which is available when you first download ProcessWire. Now here is my question: Would somebody of you like to help me translate those functions into the Twig-Syntax or could someone explain to me how to use PHP-functions within the Template Twig Replace-Module. I know this is a lot to ask for and that this is a ProcessWire-forum and not a Twig-forum, but you would help me a lot. Sincerely, Andreas
  19. This excludes children of "/example/" (/example/ has id of 1006) $results = $pages->find("title|summary~=$q")->not("has_parent=1006"); … and this will exclude them too $results = $pages->find("title|summary~=$q, has_parent!=/example/"); … but this won't $results = $pages->find("title|summary~=$q")->not("has_parent=/example/"); And … is there any difference using not() and != ?
  20. Hi, I have installed processwire with foundation. I have edited my site a lot. Now i need site search. But my search is not working. It gives me a blank page. I have placed below code where i want search box. <form id='search-form' action='<?php echo $config->urls->root?>search/' method='get''> <input type="text" name="q" value="<?php echo $sanitizer->entities($input->whitelist('q')); ?>" placeholder="" /> <button type='submit' class="button prefix">Search</button> </form> I copied this code from _main.php file. I have removed _main.php file as it is not required for me. Plz help me. Regards, Pravin
  21. Hello. I've been hanging out in Google Analytics a bit these days enjoying the real-time activity view of my site's traffic. It has prompted me to wonder if there is a way to record the terms people search for using the built-in PW search engine to a log file of some sort on the server so I can review it from time to time to get a sense of user needs.
  22. Hi, I use a search with MySQL like operator: $matches = $pages->find("{$suchFelder}%=$q, limit=$limit"); My $suchFelder are: 'body|headline|pagefield.title' When searching for a phrase like schmidt+meier the result contains matches with the phrase if it is in body or headline, but not if it is in pagefield.title. Why isn't it consistent? Why doesn't it find them in pagefield.title? If I do a search only for schmidt it returns all matches, including that from pagefield.title. If this is a bug, I'm also interested in a (quick) workaround. I need this to work properly for a live site!
  23. Hi, I have two questions about the search coming with PW 2.3.6. 1. How would I be able to search word fragments? I only want titles to be searchable. If a title is "superdog" and you search for "dog" nothing will be found here. Only when you exactly search for "superdog". --> Ok found the answer here: http://processwire.com/talk/topic/168-wildcard/?p=1181 But strangely it's exactly the other way around. * will find "apple" in "applesauce" where ~ does only find results matching exactly the string. 2. I have a multilingual site. How would it be possible that the search also works in other languages? For now it always switches to the default language when previously the language was switched. --> Also found a solution here: Just have to get the language prefix as usual, for example: domain.de/es/search/, and it will search the spanish site. Thank you. - Relmos
  24. Hi there, I am struggling to work out something that i know should be really simple but its just not working out for me! I have set up images manager and i need to be able to search on the user side only through the image pages that get created with images manager, the thing is I need it to search by a page feild called imageTags. Here is the set up as I dont think i am explaining myself too well! images Category 1 Image 1 -> this has a page list multiple select that is selected from imageTags Image 2 " " " Image 3 " " " imageTags tag1 tag2 tag3 So when searching it needs to output an image page based on a search through that pages imageTags! Here is what I have But its probably far off! <?php $out = ''; if($q = $sanitizer->selectorValue($input->get->q)) { $input->whitelist('q', $q); $matches = $pages->find("image.imageTags%=$q, limit=20"); $count = count($matches); if($count) { $out .= "<h2>Found $count pages matching your query:</h2>" . } } else { $out .= "<h2>Sorry, no results were found.</h2>"; } } else { $out .= "<h2>Please enter a search term in the search box (upper right corner)</h2>"; } include("./head.inc"); echo $out; include("./foot.inc"); And the search form is this: <form class="search-form" id='search_form' action='<?php echo $config->urls->root?>search/' method='get'> <input type='text' name='q' id='search_query' placeholder="Search" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Search'" value='<?php echo htmlentities($input->whitelist('q'), ENT_QUOTES, 'UTF-8'); ?>' /> </form> Any help is greatly appreciated so a big thanks in advance! Ollie
  25. 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...
×
×
  • Create New...