Missing behaviour file when adding search functionality

2011-12-13 Thread Daniel
I have added a search_index table to my DB. I put the following code in my post_controller: function search() { $this-SearchIndex-searchModels(array('Post','Comment')); $this-paginate = array( 'limit' = 10, 'conditions'

Re: Missing behaviour file when adding search functionality

2011-12-13 Thread Daniel
OK, I didn't install the search plugin. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to

Re: Implementing a search functionality

2011-11-02 Thread WebbedIT
@Yves: People keep recommending paginaton along with CakeDC's searchable plugin. If you take their advice and go and read the associated documentation you should easily be able to figure this out for yourself. At present you have still not got your head around the fact that you only need to run

Re: Implementing a search functionality

2011-11-02 Thread WebbedIT
And for proof of how easy other people find the CakeDC plugin: http://groups.google.com/group/cake-php/browse_thread/thread/bdb93d2ec770be06 Question asked and resolved in 4 days! HTH, Paul. On Nov 2, 9:23 am, WebbedIT p...@webbedit.co.uk wrote: @Yves: People keep recommending paginaton along

Re: Implementing a search functionality

2011-11-01 Thread WebbedIT
Me thinks Jeremy has been reading too many of Andy's replies :P On Nov 1, 5:31 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I hope we all know that I was being ironic. ^^ Jeremy Burns Class Outfit http://www.classoutfit.com On 1 Nov 2011, at 03:48, Yves wrote:

Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
It would've worked better if there indeed wasn't a Joogle out there :-) . On Tue, Nov 1, 2011 at 1:31 AM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I hope we all know that I was being ironic. ^^ Jeremy Burns Class Outfit http://www.classoutfit.com On 1 Nov 2011, at

Re: Implementing a search functionality

2011-11-01 Thread Jon Bennett
I hope we all know that I was being ironic. ^^ Don't think that's irony, more sarcasm ;) j -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Re: Implementing a search functionality

2011-11-01 Thread Jeremy Burns | Class Outfit
You're right of course. Now if you are American, it would be ironic that you understand sarcasm (or irony)! Jeremy Burns Class Outfit http://www.classoutfit.com On 1 Nov 2011, at 15:22, Jon Bennett wrote: I hope we all know that I was being ironic. ^^ Don't think that's irony, more

Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
Ok, one more time! This is my view: http://bin.cakephp.org/view/859204807 My model: http://bin.cakephp.org/view/455436825 My controller: http://bin.cakephp.org/view/2083728780 Now, what happens is that when I run a search for, say, Smith, the page just refreshes with all of the stuff as it was.

Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
Ok, as I have it works. Yay! The thing that was tripping me up was that the pagination ran _after_ the search. This is how view_admit_lookup is now. function view_admit_lookup() { $this-helpers['Paginator'] = array('ajax' = 'ajax'); // provide pagination for the user.

Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
Ok, this is weird. It does pagination, which is good. The problem arises is that when I run the search, after it it runs again, for all of the names in the DB... on the first page the search results are displayed, but on the next, the rest of the data is displayed! Does pagination run some

Re: Implementing a search functionality

2011-11-01 Thread rchavik
I highly recommend to take a look at cakedc's search pluginhttps://github.com/cakedc/search. It's a little more involved to setup but worth the trouble to learn and use. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: Implementing a search functionality

2011-11-01 Thread Yves
Where should the processing happen, controller or view? Also, why is the second provider started with an upper-case letter? On Nov 1, 2011, at 10:25 PM, rchavik rcha...@gmail.com wrote: On Wednesday, November 2, 2011 3:00:01 AM UTC+7, Yves S. Garret wrote:

Re: Implementing a search functionality

2011-11-01 Thread rchavik
On Wednesday, November 2, 2011 10:29:04 AM UTC+7, Yves S. Garret wrote: Where should the processing happen, controller or view? Controller. See: http://book.cakephp.org/view/1232/Controller-Setup Also, why is the second provider started with an upper-case letter? I assume you're

Re: Implementing a search functionality

2011-10-31 Thread Ryan Schmidt
On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote: I didn't search there. I used another little know search engine called Joogle (or something like that): You probably meant Google. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: Implementing a search functionality

2011-10-31 Thread Yves
There actually is a search engine plugin called joogle. On Oct 31, 2011, at 11:20 PM, Ryan Schmidt google-2...@ryandesign.com wrote: On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote: I didn't search there. I used another little know search engine called Joogle (or something

Re: Implementing a search functionality

2011-10-31 Thread Jeremy Burns | Class Outfit
I hope we all know that I was being ironic. ^^ Jeremy Burns Class Outfit http://www.classoutfit.com On 1 Nov 2011, at 03:48, Yves wrote: There actually is a search engine plugin called joogle. On Oct 31, 2011, at 11:20 PM, Ryan Schmidt google-2...@ryandesign.com wrote: On Oct 31,

Re: Implementing a search functionality

2011-10-25 Thread Yves S. Garret
Thanks, this is the structure of my directory tree, tell me if I need to re-name anything: app\ controllers\ models\ views\ providers\ Should I rename the providers directory to provider? On Mon, Oct 24, 2011 at 11:33 PM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote:

Re: Implementing a search functionality

2011-10-25 Thread Yves S. Garret
This time I'll include the file names and where they are: app\ controllers\ providers_controller.php (has ProvidersController class) models\ Provider.php (has Provider class) views\ providers\ viewAdmitLookup.ctp (contains all of the view display stuff) On Tue, Oct 25,

Re: Implementing a search functionality

2011-10-25 Thread Jeremy Burns | Class Outfit
Why. Not. Read. My. Post? And the guide? With the link I sent you? From this tree I can tell you that the model file should be lower case and that view is not named correctly. Lower case, with underscores, to match the controller function name (as I mention in my post(s)). Once you have read

Re: Implementing a search functionality

2011-10-25 Thread Yves S. Garret
Yes, they're wrong. But being new I was sure how correct/incorrect my approach was. I'm working off of the stuff of another developer (who made the said file names). This is what I have setup now: app\ controllers\ providers_controller.php models\ provider.php views\

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Ok, this is weird. I found this tutorial on doing searches. http://mrphp.com.au/code/search-forms-cakephp That's good. Now, this is my Model: http://bin.cakephp.org/view/1495255597 View: http://bin.cakephp.org/view/814828491 Controller: http://bin.cakephp.org/view/1212386780 Now, when I run

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Your controller names should be plural; try: class ProvidersController extends AppController { var $name = 'Providers'; Jeremy Burns Class Outfit http://www.classoutfit.com On 24 Oct 2011, at 18:24, Yves S. Garret wrote: Ok, this is weird. I found this tutorial on doing searches.

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
This is my view: http://bin.cakephp.org/view/1913574686 This is my controller: http://bin.cakephp.org/view/1556854836 This is my model: http://bin.cakephp.org/view/416003093 This is the error that I'm getting: Missing Controller *Error: **ProviderController* could not be found. *Error: *Create

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Did you change anything? This is 1.3, right? The filename should be providers_controller.php Change the code as per my post below. The view should be in /app/views/providers/ Add $var $name = 'Provider'; to the beginning of the Provider model file. Jeremy Burns Class Outfit

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Yup. CakePHP 1.3. The view is in \app\views\providers\view_admit_lookup.ctp The controller file name is providers_controller.php. I added the variable that you suggested to the model file (which is called Provider.php) and I get the same error :-( . On Mon, Oct 24, 2011 at 2:03 PM, Jeremy

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Ok, now I'm getting this when I turned everything to plural. Missing Controller *Error: **ProviderController* could not be found. *Error: *Create the class *ProviderController* below in file: app\controllers\provider_controller.php ?php class ProviderController extends AppController {

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Your conventions are all over the place. Its best to stick to them. Did you change the code inside the controller as suggested in my first post? class ProvidersController extends AppController { var $name = 'Providers'; The filename is view_admit_lookup, yet the controller function is

Re: Implementing a search functionality

2011-10-21 Thread Yves S. Garret
My question in that case would be, why am I getting that error? On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret yoursurrogate...@gmail.comwrote: I have a decent understanding of what the tutorial is trying to do. However, trying it to move it into my project is my present issue. Here is my

Re: Implementing a search functionality

2011-10-20 Thread Yves S. Garret
I have a decent understanding of what the tutorial is trying to do. However, trying it to move it into my project is my present issue. Here is my model: http://bin.cakephp.org/view/792515073 Here is my controller: http://bin.cakephp.org/view/514764310 Here is my view:

Implementing a search functionality

2011-10-18 Thread Yves S. Garret
I've been looking into this problem. Basically the idea is to look through one column in one table and see if the string matches the search string. The string searches the last names of a person. So if the search string is 'Smith', the following values are expected to be caught up in the

Re: Implementing a search functionality

2011-10-18 Thread Dee Johnson
If I understand correctly you want to search for a literal 'Smith' and not any %Smith% which yeilds results containing Smith as well? If you have a column for last name already you can just alter your find query in the controller to only bring back that specific item $this-Model-find('all',

Re: Implementing a search functionality

2011-10-18 Thread Yves S. Garret
Thanks for your reply. To be more specific, would it make sense to do this portion of the tutorial? Setup So to get things started, we need to download seachable behavior from ( http://code.google.com/p/searchable-behaviour-for-cakephp). Then we copy the archive contents to the /app folder. To

Re: Implementing a search functionality

2011-10-18 Thread Yves S. Garret
And yes, the specific column does exist already. Also, when you wrote this portion: $this-Model-find('all', array('conditions' = array('Model.lastname LIKE' = '%' . $searchterm . '%'))); I didn't see that in the tutorial, where did you get this? On Tue, Oct 18, 2011 at 2:45 PM, Dee Johnson

Re: Implementing a search functionality

2011-10-18 Thread Dee Johnson
my apologies, I saw where you said you wanted to make the tutorial simpler and i assumed that you already knew how to make calls etc. The tutorial is using a search behavior (which probably does the calls - i haven't looked to verify) but to answer your question from above, I would recommend

Re: Pagination problem in search functionality

2009-04-11 Thread AD7six
On Apr 10, 2:03 pm, kaushik kaushikwo...@gmail.com wrote: I have a search form for Blog with pagination. The form is like below. form name=BlogSearchForm onSubmit=javascript:return check(); id=BlogSearchForm method=post action=/blogs/search fieldset style=display:none; input type=hidden

Pagination problem in search functionality

2009-04-10 Thread kaushik
I have a search form for Blog with pagination. The form is like below. form name=BlogSearchForm onSubmit=javascript:return check(); id=BlogSearchForm method=post action=/blogs/search fieldset style=display:none; input type=hidden name=_method value=POST / /fieldset input type=text

search functionality

2009-04-08 Thread nam
I want the code for search functionality with searching by list category. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

Re: search functionality for whole website

2006-07-20 Thread teemow
hey spark, there is a lucene lib in the zend 'framework'. you just have to put it in your vendors folder. so if you like to implement an advanced search solution take a look at the advantages of an indexer over a database. http://lucene.apache.org/java/docs/features.html greez, timo

Re: search functionality for whole website

2006-07-20 Thread Langdon Stevenson
I have to agree with timo here. I was involved in the development of a very powerful search tool based on Lucene. If you want really powerful site wide searching then this is the way to go. Regards, Langdon teemow wrote: hey spark, there is a lucene lib in the zend 'framework'. you

Re: search functionality for whole website

2006-07-20 Thread Ryan Petrain
The only drawback to this is if your data that want to search is in the database.Does Lucene index the database too?On 7/20/06, Langdon Stevenson [EMAIL PROTECTED] wrote: I have to agree with timo here.I was involved in the development of avery powerful search tool based on Lucene.If you want

Re: search functionality for whole website

2006-07-20 Thread DJ Spark
yo teemow, thanks for the tip here, i'll check if that's what I need here :) see ya in koln :) spark! On 7/20/06, teemow [EMAIL PROTECTED] wrote: hey spark, there is a lucene lib in the zend 'framework'. you just have to put it in your vendors folder. so if you like to implement an

Re: search functionality for whole website

2006-07-20 Thread Langdon Stevenson
Bearing in mind that the aim here is to provide a site wide search ... There are a lot of ways that you can use Lucene (and I am not an expert in it, so best to read up on Lucene yourself to get a really good understanding). We used it to index pages just like a search engine does.

Re: search functionality for whole website

2006-07-19 Thread carlosrg
But, we need a model for this Controller, it's ok? What should be the model? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: search functionality for whole website

2006-07-19 Thread Felix Geisendörfer
Well you could refactor the Search functionality into an own model, which would make sense to me. But you don't necessarily have to do that. You can put this in any controller to say that no Model is being used: var $uses = array(); But really, if you plan to implement a quality search

Re: search functionality for whole website

2006-07-19 Thread DJ Spark
search for the same term). Any article related would be a good reading for me at this point ;) spark On 7/19/06, Felix Geisendörfer [EMAIL PROTECTED] wrote: Well you could refactor the Search functionality into an own model, which would make sense to me. But you don't necessarily have to do

Re: search functionality for whole website

2006-07-19 Thread DJ Spark
on the next search for the same term). Any article related would be a good reading for me at this point ;) spark On 7/19/06, Felix Geisendörfer [EMAIL PROTECTED] wrote: Well you could refactor the Search functionality into an own model, which would make sense to me. But you don't

search functionality for whole website

2006-07-18 Thread bingo
hi, I am new to CakePHP and wondering where the function such as search should be implemented. I have 5 tables and want to use single search box. On submit it should call the search function which basically call appropriate search function for 5 tables and display the results in a view. Regards

Re: search functionality for whole website

2006-07-18 Thread gwoo
class SearchController extends AppController { var $name = 'Search'; var $uses = array('Model1','Model2','Model3'); function results() { $results = array(); $conditions = $this-params['url']['searchfieldname'];

Re: search functionality for whole website

2006-07-18 Thread bingo
Thanks Got working with the above approach. Regards, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,