Multi model finds

2010-02-20 Thread Jeremy Burns
I am building a search form that retrieves data from four related models. The user can supply criteria against a number of fields from those models. What is the best method for doing a variable cross model search? To put that into context; If you have an Author model that hasMany Posts that hasMan

Re: Extending Component. Error

2010-02-20 Thread dtirer
oh sorry, here it is: /** * Confirmation email for new basic registration users * @param $id - User ID * @param $password - Un-hashed password */ public function send_registration_email($email, $password)

Re: Answering a recurring challenge from clients

2010-02-20 Thread cricket
Yes, I've got that before. First, if you have a few apps under your belt, show them those. Including the administration, and the source, etc. Show them some of the many existing plugins, components, behaviors, etc. And explain to them that, while Cake may not be the mostest popular framework out th

Re: Products controller / Model / Table setup

2010-02-20 Thread cricket
I recommend you use Modified Preorder Tree Traversal (MPTT) http://www.ad7six.com/entries/view/56/Working-with-Tree-data-%28MPTT%29 http://articles.sitepoint.com/print/hierarchical-data-database http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Here's an example of an app that h

Re: The right way to save updated Database Entry

2010-02-20 Thread amarradi
Hello, i tried this way now, but no data will be saved. The Older Version saved the status but not the other values. $this->WishlistEntry->read(null, $entryId); $data = array ( 'WishlistEntry' => array ( 'id' => $entryId

Products controller / Model / Table setup

2010-02-20 Thread Dave
I am starting in on a products controller for the first time and looking for some advice on best approach. Thought about using tree behaviour. My products will be in "levels" 3 deep Parent categorgy /child /grandchild i guess? Winter /Boots /Mens type idea. Whats the

Re: I can't get ACL-Auth to work

2010-02-20 Thread mattyh88
Yes, that's right. I did add the view action to Auth->allow in my pagescontroller instead of the * char. But then I get errors, Firefox not being able to load any pages. So I have to add a * to my pagescontroller and then deny access to admin functions such as "add" Strange isn't it? On 20 feb, 19

Re: Multiple Content Areas

2010-02-20 Thread Zaky Katalan-Ezra
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%" Donald Knuth Simplicity (KISS principal - http://en.wikipedia.org/wiki/

Re: Answering a recurring challenge from clients

2010-02-20 Thread Zaky Katalan-Ezra
You should use the exact same reasoning next time you will be offered to build a data based web application, to explain why you are coosing cake. 1. I am grantee that i'll build a web application that based on a proven standard and structure that tested on real production. 2. You will be able to

Re: Answering a recurring challenge from clients

2010-02-20 Thread rikdc
Hi keymaster, I have one particular system, and I make it clear that my software is 'leased', and should our business relationship cease for any reason, they are legally entitled to their raw data, and I reassure them that any competent programmer can import that data into another system. (It's ex

Answering a recurring challenge from clients

2010-02-20 Thread keymaster
Have any of you ever been presented with the following challenge by a client: "You are offering to build my site on top of your custom CMS based on cakephp. I am worried that by not going with a standard cms like Drupal, we will

Re: I can't get ACL-Auth to work

2010-02-20 Thread MST
When you use $this->Auth->allow('*') it overrides ACL for ALL of the actions in the controller. Just change the code to allow only the actions you want allowed. If you only want to allow the index and view actions, use this: $this->Auth->allow('index', 'view'); You will then need to fill your `

Re: How to make the paginator->sort link an image?

2010-02-20 Thread MST
Actually, in this case I only need a single, unchanging image to do the work, but I'll be needing them in another project. I had looked at the API to see if adding a CSS class would work and assumed it wouldn't when I didn't see 'class' in $options. I tested it out and it works like this, though:

Paginate: sorting JOINed data columns

2010-02-20 Thread Mario
Hi all, I am not finding a solution for the following issue: I have a perfectly working pagination query for model X that returns data from: * model X itself * model Y, through a LEFT join to a DB table added with $this->paginate['joins'][] = array( 'type' => 'LEFT', 'table

Re: Q: passing data between 2 models by controller/action?

2010-02-20 Thread WebbedIT
Are you viewing a Request and then wanting to create a Booking based on that request? If so, you need the link to go to www.yoursite.com/bookings/add/%request_id% which is calling the add() action within your Booking controller. Your add() action should be something like: function add($request_i

Re: sitemap.xml

2010-02-20 Thread mike karthauser
You need to place this sitemap into webroot Mike Karthauser Brightstorm limited Tel: 07939252144 On 19 Feb 2010, at 23:24, Cycling_Joe wrote: I cant seem to find the answer to this anywhere. Where would I implement a manually crated sitemap.xml file in CakePHP I have read there is ways to aut

Re: how to check view data in controller before add/save the data?

2010-02-20 Thread WebbedIT
Anything posted from a form is automagically made available to the controller in the $this->data array so you would be wanting to access. $this->data['BookingPosition']['number_adults'] etc. This work may be better handled by custom validation rules though: http://book.cakephp.org/view/150/Custom

Re: I want to develop an inventory system

2010-02-20 Thread WebbedIT
CakePHP 1.2x comes with an Ajax helper which works with the popular Prototype and Scriptaculous JavaScript libraries. A lot of people use jQuery or other JavaScript frameworks, whichever you chose it;s just as easy to include your own javascript calls for Ajax applications. The Auth component use

Re: Error Code

2010-02-20 Thread Jeremy Burns
It looks as if you haven't set the $books array in your controller. Jeremy Burns jeremybu...@me.com On 20 Feb 2010, at 09:45, dido wrote: > > >ISBNTitleAuthor > > > > > > > > > > > and any line of code : > > Notice (8):

Error Code

2010-02-20 Thread dido
ISBNTitleAuthor and any line of code : Notice (8): Undefined variable: books [APP\views\books\index.ctp, line 5] Warning (2): Invalid argument supplied for foreach() [APP\views\books \index.ctp, line 5] Please hel

Q: passing data between 2 models by controller/action?

2010-02-20 Thread mivogt-LU
hi, hope the title of my question might fit my thinking ... I am using a model to collect customer requests cake bake added the view add delete ... functions to controller and the buttons this for in the view. Now I would like to have an additional button in the view to do the follwing: get the r

how to check view data in controller before add/save the data?

2010-02-20 Thread mivogt-LU
hello @ all, I am just starting up my very first project with cakephp (current 1.3ß on a new xampp 1.7.3 installation). Setting up db and models worked fine, also baking the main things was quiet ok and worked well. Now I want to add my extras to the application and sadly I have no idea how to us

I want to develop an inventory system

2010-02-20 Thread Bankai
I want to develop an inventory system localized for my country (Venezuela). I am going to need some input from anyone. The system that I want to develop is obviously going to be developed using cakephp + ajax, hosted on an apache server. I want the system to have a login system, maybe using sha-1

Checkbox

2010-02-20 Thread Nayana
hello.. anyone can help me.. I m new to cake php .my query is how can i post mutiple value using checkbox. please help me Nayana Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscri

Re: Tree Behaviors, Move Functions

2010-02-20 Thread ross.hagg...@googlemail.com
Thanks Just select queries being ran, no update? SELECT `Category`.`id`, `Category`.`parent_id`, `Category`.`lft`, `Category`.`rght`, `Category`.`name`, `Category`.`quantities`, `Category`.`delivery`, `Category`.`description`, `Category`.`image`, `Category`.`created`, `Category`.`modified` FROM `

Re: Tree Behaviors, Move Functions

2010-02-20 Thread WebbedIT
try stopping the redirects and turn debug to 2 to see what queries are being ran. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post t

Re: The right way to save updated Database Entry

2010-02-20 Thread WebbedIT
You need to read the following in more detail: http://book.cakephp.org/view/75/Saving-Your-Data Basically your data array must be in the format array( 'ModelName'=>array( 'fieldName1'=>'value', 'fieldName2'=>'value', ... ) ) Check out the new CakePHP Questions site http://cakeqs.

Re: The right way to save updated Database Entry

2010-02-20 Thread amarradi
Thanks for your answer I tried to use an array but the fields will not(!) be saved $this->WishlistEntry->save( array( 'reservation_status' =>'FREE' ,'reservation_email' => null ,'reservation_mail_sent' => nu

Re: Screencasts won't play

2010-02-20 Thread tiberus
Had traced back the URLs to archive.org and found the listed videos and others there. Here is what I get: If I play "Setting Up the CakePHP Console on Windows" (went to archive.org and searched on cakephp), it loads and plays fine. That video plays fine both with and without the new tag. When

Re: Screencasts won't play

2010-02-20 Thread tiberus
Was running 7.6.4 and upgraded to 7,6,5. Should have thought of that but, it didn't seem to change anything. On Feb 20, 3:46 am, WebbedIT wrote: > Sounds like you need to update your quicktime player. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Tree Behaviors, Move Functions

2010-02-20 Thread ross.hagg...@googlemail.com
Hi I'm trying to use the moveup movedown functions from the cake book. I have the following and it doesn't return any errors, i've checked the values in the function, but it's not working. I get the success message but nothing has changed in the database, the record has not been modified? I've

Re: The right way to save updated Database Entry

2010-02-20 Thread WebbedIT
Use a data array with the id of the record and the 4 fields you want to update then run a Model->save($data), cake will automagically build a query to only update the fields you have included in the data array. HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others w

Re: I can't get ACL-Auth to work

2010-02-20 Thread mattyh88
I've come a step closer. I had to add $this->Auth->allow('*') to my pages controller. Now I can't access any group or user actions when I'm not logged in, and it redirects me to the login page. But now, I shouldn't be able to access the add or edit actions in the pages controller. How can I solve

The right way to save updated Database Entry

2010-02-20 Thread amarradi
Hello together, if have a cakephp software, which sends mail to the user, to activate an account. No great think. And it works. So now the user can diactivate the account The Database will be updated but not all fields only one of four. The reservation_status is right set but the other field are n

Re: sitemap.xml

2010-02-20 Thread WebbedIT
I'm no expert on XML, but think I know the answer to this, sorry if I'm wrong. If you're after a manual/static page to be shown (doesn't matter what language) it can be done from any controller/action. Add the RequestHandler component and simply by requesting /yourcontroller/ youraction.xml Cake

Re: Screencasts won't play

2010-02-20 Thread Jeremy Burns
I have had similar problems (and I am all up to date) and play/pause controls are out of site (below the frame). I view the source go directly to the URL - e.g. http://www.archive.org/download/AdminRouting/admin_routing.mov and it all works fine. Jeremy Burns jeremybu...@me.com On 20 Feb 2010,

Re: Screencasts won't play

2010-02-20 Thread WebbedIT
Sounds like you need to update your quicktime player. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to

Re: How to make the paginator->sort link an image?

2010-02-20 Thread WebbedIT
Would a single image be able to do the job of titling the column and providing a graphical link to reorder the index? If you are wanting a graphic link to reorder the index are we talking about up and down arrows after the text? If so this can't be done with the paginator helper (may take much mo