Re: Scaffold insert: session problem

2007-04-17 Thread bono
Solved, I had validate_empty in id field :) thanks John! PS. There is no way to edit own post titles here? Would be nice habit to put some status marks to them (Solved: Scaffold insert: session problem) On Apr 17, 12:08 am, John David Anderson [EMAIL PROTECTED] wrote: On Apr 16, 2007, at

Re: Cakephp 1.2 paginate

2007-04-17 Thread Jeremy Pointer
I don't know what it is guys but every one of my questions I've asked so far seems to take a fair while to get answered (Maybe I'm asking them wrong, or maybe my problems are too complicated (or too stupid) and yes I know we are all volunteers here so I'm not complaining just wondering if

Re: (HtmlHelper::submit) Deprecated: Use FormHelper::submit instead | switch off?

2007-04-17 Thread Schubidu
Have i any problems in future when i update to 1.2? On 16 Apr., 22:51, nate [EMAIL PROTECTED] wrote: You are getting this error because you are using Cake 1.1 code in Cake 1.2. If your knowledge of Cake is not sufficient for you to be able to solve this problem on your own, you should

Re: mod_rewrite Problem

2007-04-17 Thread jyrgen
For testing purposes you can disable the mod_rewrite feature by renaming the .htaccess files to _.htaccess with the DEFINE in app/config/core.php uncommented. if it works, than you have to check your apache conf to see if it allows overwriting settings by htaccess files at all. greetings,

isAjax() - how do I use?

2007-04-17 Thread Danielle Tilley
I am using Cake 1.2 I am trying to add the following function to my app_controller - from bakery article Redirects with Ajax - http://bakery.cakephp.org/articles/view/92 === function redirect($url, $status = null, $die = true) { if

Re: isAjax() - how do I use?

2007-04-17 Thread AD7six
On 17 abr, 09:35, Danielle Tilley [EMAIL PROTECTED] wrote: I am using Cake 1.2 I am trying to add the following function to my app_controller - from bakery article Redirects with Ajax -http://bakery.cakephp.org/articles/view/92 === function

AppController::uses vs. FooController::uses

2007-04-17 Thread Mr Pear
Hello I want to display recent articles list on every subpage of my website. So, I've set recent_articles variable in my AppController::beforeRender() function. I have also added: var $uses = array('Article'); to my AppController. But there is a problem now. When I try to request an action from

Re: AppController::uses vs. FooController::uses

2007-04-17 Thread gwoo
a) upgrade b) http://bakery.cakephp.org/articles/view/342 --~--~-~--~~~---~--~~ 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

Re: AppController::uses vs. FooController::uses

2007-04-17 Thread AD7six
On 17 abr, 11:14, gwoo [EMAIL PROTECTED] wrote: a) upgrade b)http://bakery.cakephp.org/articles/view/342 gwoo, Nice article. Theres a bit (lot?) of overlap with article 325, a candidate for pruning/consolidating? Cheers, AD --~--~-~--~~~---~--~~ You

Re: Problem with Model::afterSave() callback

2007-04-17 Thread GreyCells
Davide Why not just build the path when selecting the record? (afterFind() will do). You do not have to duplicate the record's id in the path column. If you must work around the framework lifecycle, then direct $model- execute('UPDATE blah, blah') calls will work. ~GreyCells On Apr 17, 1:06

Re: Problem with Model::afterSave() callback

2007-04-17 Thread Davide
Davide wrote: ... I'm trying to use the afterSave callback in order to update a field of a just inserted record. I have this code[1]. If I didn't comment the saveField() statement, the browser (FireFox) will complain saying[2]. ... Finally after some logging I found what it is. It's a

getting data from ClassRegistry

2007-04-17 Thread Copongcopong
Any consequence(s) of getting viewVars from ClassRegistry? I am trying to get some data in viewVars to be initialize for my helper. Any better way (or best practice) to accomplish this? The main goal is to have my viewVars, that were loaded using AppController::beforeRender(), be accessible by

Re: View this page Cake Apps/Sites In The Wild

2007-04-17 Thread CraZyLeGs
I see blogs in the page that aren't made using cake. iirc this page is about stuff made using cake and not websites about cake. On Apr 17, 12:16 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This is more or less still in a beta stage (it says alpha on the site) but I'd like to get some

Re: Odd Queries for Pagination

2007-04-17 Thread Joshua Benner
nate wrote: Nate: I can post a detailed bug if you'd like. It works, just has unexpected behavior for last page. Despite it being a limitation with mssql, there might be some php-side stuff that can be done to overcome it. In addition, SQL 2005 allegedly has a function that may allow more

A Component called via Ajax request don't execute its startup() method

2007-04-17 Thread Charles Schaefer
Hi all, I'm developing a component that will use values setteds in the controller to execute some routines. But when I call my controllers (that use this component) via Ajax the startup() method (and the init() also) isn't called. The result is that i haven't a reference to the controller and i

Re: Problem with Model::afterSave() callback

2007-04-17 Thread Davide
GreyCells wrote: Why not just build the path when selecting the record? (afterFind() will do). You do not have to duplicate the record's id in the path column. I thought about an additional field, 'cause if I build the path in the afterFind(), I would have to cycle the recordset in order to

Re: A Component called via Ajax request don't execute its startup() method

2007-04-17 Thread Charles Schaefer
Oh, sorry by the error. The fact is that i was trying see the startup() method functioning inside the beforeFilter() callback, but this appears be impossible in the cake way. I've already solved this problem by changing my method (ajaxMethod(), in this case) to use a reference of the controller

Re: getting data from ClassRegistry

2007-04-17 Thread nate
If on Cake 1.2: $view = ClassRegistry::getObject(view); $vars = $view-getVars(); On Apr 17, 7:47 am, Copongcopong [EMAIL PROTECTED] wrote: Any consequence(s) of getting viewVars from ClassRegistry? I am trying to get some data in viewVars to be initialize for my helper. Any better way (or

Re: View this page Cake Apps/Sites In The Wild

2007-04-17 Thread nate
It's about both. That's why we have sections called Sites and Blogs On Apr 17, 8:52 am, CraZyLeGs [EMAIL PROTECTED] wrote: I see blogs in the page that aren't made using cake. iirc this page is about stuff made using cake and not websites about cake. On Apr 17, 12:16 am, [EMAIL PROTECTED]

Re: Odd Queries for Pagination

2007-04-17 Thread nate
That's great, any patches would be greatly appreciated. If you ever have any questions about how the driver works, feel free to ping me offline and I'll answer you as quickly as I can. On Apr 17, 8:53 am, Joshua Benner [EMAIL PROTECTED] wrote: nate wrote: Nate: I can post a detailed bug if

RE: View this page Cake Apps/Sites In The Wild

2007-04-17 Thread Mariano Iglesias
But he's kind of right though. Yesterday I removed a couple of blogs that had no: 1. CakePHP posts. 2. Where not built with CakePHP. That is not supposed to be added on that list. -MI --- Remember, smart coders answer

Reload page in Cake PHP

2007-04-17 Thread NicoE
Hi everybody. I am using redirect to take the user to the same index page after deleting a post, but the old post still appears. Does the redirect do a reload of the page or just take the user to the page? If it does not, is there a way in Cake PHP to reload a page? Thanks a lot.

Re: A Component called via Ajax request don't execute its startup() method

2007-04-17 Thread AD7six
On 17 abr, 15:24, Charles Schaefer [EMAIL PROTECTED] wrote: Hi all, I'm developing a component that will use values setteds in the controller to execute some routines. But when I call my controllers (that use this component) via Ajax the startup() method (and the init() also) isn't

Master view

2007-04-17 Thread Andreas
Hi I wanna use a master view across my entire application so i don't have to hard code it into every view. The only thing I have found that's even close is some stuff about Smarty but that sounds so overkill. I just need a small and easy solution. I'm using the latest stable version of Cake

Re: whats the relationship between CakePHP 1.2 test suite N SimpleTest

2007-04-17 Thread ks
Both use SimpleTest. In the case of test suite, you have add that in your vendors folder as well. From what I was able to do: TestSuite allows you to test your controllers using get/post as well which is useful. I did not find that in the CakeTest TestSuite integrates with bake2 and can run

Re: Master view

2007-04-17 Thread AD7six
On 17 abr, 14:45, Andreas [EMAIL PROTECTED] wrote: Hi I wanna use a master view across my entire application so i don't have to hard code it into every view. Search the usual places for layout ;). hth, AD --~--~-~--~~~---~--~~ You received this message

Change a Image dinamically

2007-04-17 Thread [EMAIL PROTECTED]
Hi I have this question I have a list of link-image and I want that whan I click on a image this image change . I use Jquery. My javascript code in the view is: The list is : ul ?php foreach ($images as $image): ? li ?php echo $html-link($html-image($image['Image']

Re: Master view

2007-04-17 Thread Andreas
Thanks! First I found setLayout() but that will be depracated in 1.2 and i have no idea if that even could solve my needs. However i continued to search and found the following: http://bakery.cakephp.org/articles/view/317 // Andreas Falk On 17 Apr, 15:50, AD7six [EMAIL PROTECTED] wrote: On 17

Re: Master view

2007-04-17 Thread AD7six
I think it would be extremely valuable for you to read the view chapter in the manual, and look for the word layout. This should have been step one of your quest for info. Unless there is something you haven't mentioned yet, using smarty or joomla layouts or anything else instead of just using

Re: Master view

2007-04-17 Thread Samuel DeVore
So did you read the manual on views http://manual.cakephp.org/chapter/views the section on 'layouts' On 4/17/07, Andreas [EMAIL PROTECTED] wrote: Thanks! First I found setLayout() but that will be depracated in 1.2 and i have no idea if that even could solve my needs. However i continued

RE: getting data from ClassRegistry

2007-04-17 Thread Mariano Iglesias
Further on nate's comment: $vars = array(); $view = ClassRegistry::getObject('view'); $viewVars = $view-getVars(); foreach($viewVars as $var) { $vars[$var] = $view-getVar($var); } And 'vars' is now an indexed array with your view vars. -MI

RE: whats the relationship between CakePHP 1.2 test suite N SimpleTest

2007-04-17 Thread Mariano Iglesias
Be a little patient and you are about to see some awesome stuff in Cake test suite to test controllers. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your

Re: Reload page in Cake PHP

2007-04-17 Thread gwoo
are you sure its deleting? set DEBUG to 2, comment out the redirect, and see what query is produced. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Reload page in Cake PHP

2007-04-17 Thread NicoE
Yes I am sure it is deleting because it works fine in most cases. My client tried to delete a post with Explorer 6.0 and nothing happens and when he hit reload the change mas made. On Apr 17, 2:31 pm, gwoo [EMAIL PROTECTED] wrote: are you sure its deleting? set DEBUG to 2, comment out the

Only showing debug on main layout?

2007-04-17 Thread Tane Piper
Hey folks, Quick question. I'm using jQuery, rather than the Ajax helper to do all my Ajax stuff on my site. I'm wondering if during debug mode there is a way to switch off the queries table at the bottom of each view that loads, and maybe even do an ajax update on that area for each view

Re: Best place to put Custom Object file code

2007-04-17 Thread Sonic Baker
Hi Steven, You can put the custom/third party files in the 'vendors' directory and access them from the controller/component using the 'vendor()' function. E.g. put your custom class in '/vendors/my_classes/my.class.php' Call it from the controller like so: vendor('my_classes' . DS .

Multiple Models - One Controller - One Form - With Validation (code examples)

2007-04-17 Thread Dustin Weber
I have done quite a bit of reading on the subject of multiple models, one controller, and one form; but I'm still stumped with a particular issue I'm trying to solve. Let me show the code first, I'll explain the problem after the code. I have the following setup (highly simplified for ease of

Re: Scaffolding question 2

2007-04-17 Thread Sonic Baker
Your table structure should be something like: students (id, name), awards_ students (student_id, award_id) awards (id, name, award_type_id), award_types (id, award_name) Your model associations should then be: Student hasAndBelongsToMany Award, Award hasOne AwardType Set the reverse

Re: Scaffolding question

2007-04-17 Thread Sonic Baker
If you just select the customer you want and save it the student will only be associated to that customer. If you want that customer to be already selected prior to going to the add student page, set the student id in the URL or session and edit the CustomersController::add() action to get the id

Re: Reload page in Cake PHP

2007-04-17 Thread NicoE
http://bin.cakephp.org/view/1774439709 On Apr 17, 2:41 pm, gwoo [EMAIL PROTECTED] wrote: time to paste some code.http://bin.cakephp.org then, supply the link back to the paste. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: whats the relationship between CakePHP 1.2 test suite N SimpleTest

2007-04-17 Thread Sonic Baker
On 4/17/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Be a little patient and you are about to see some awesome stuff in Cake test suite to test controllers. Wicked I'm going to hold you to that now Mariano :) Sonic --~--~-~--~~~---~--~~ You received

Re: Multiple Models - One Controller - One Form - With Validation (code examples)

2007-04-17 Thread ianh
I'm going to quickly tell you what I found, there is so much in your post though that I cannot get into it all. Here are some pointers though that I hope will move you forward. 1) In Cake 1.1.x the method you have used is more or less how its done, there is no magic save multi models as far as I

Re: Reload page in Cake PHP

2007-04-17 Thread Joshua Benner
When you click reload, does the old post still show up? If it does not, then you may be dealing with some sort of local or server cache issue. On Apr 17, 3:22 pm, NicoE [EMAIL PROTECTED] wrote: http://bin.cakephp.org/view/1774439709 On Apr 17, 2:41 pm, gwoo [EMAIL PROTECTED] wrote: time to

Re: Reload page in Cake PHP

2007-04-17 Thread NicoE
It does not show up. I guess it´s a client issue because I have no problems when trying with Firefox and Explorer. My client is the one with the problem. On Apr 17, 3:58 pm, Joshua Benner [EMAIL PROTECTED] wrote: When you click reload, does the old post still show up? If it does not, then you

Re: any 1.2 validation example?

2007-04-17 Thread Zoltan
Basically you create your tables, set up the database config file and go to /cake/scripts/ and run php bake.php and it will ask you where want to bake to, check that the path is correct (should be something long pointing to the app folder - sorry I'm just going by memory here). You'll want to

Re: Multiple Models - One Controller - One Form - With Validation (code examples)

2007-04-17 Thread Dustin Weber
I have to admit I'm a little disappointed this aspect isn't handled a little more gracefully, but I'll work around it with your helpful suggestions. Thanks! - Dustin Weber http://www.dustinweber.com ianh wrote: I'm going to quickly tell you what I found, there is so much in your post

Re: Scaffolding question

2007-04-17 Thread Sergei Gerasenko
See, because there's a potential for selecting the wrong customer on the student form, that dropdown should really contain only one customer. Or that dropdown shouldn't be shown at all. Or the scaffolding should be taken down. Is there a way to get rid of the other customers in the dropdown

Re: Lumad CMS / (Cupcake)

2007-04-17 Thread [EMAIL PROTECTED]
Hi, this is Jason, author of CupCake CMS. (Lumad CMS is the project name in CakeForge, renamed because of a policy that prohibits unofficial projects to have the word cake in its name.) Thanks for the feedback. The following are in the pipeline: - ability to select a different template in each

calling HTML-LINK helper from within an ELEMENT

2007-04-17 Thread Dan Ballance
Hi there, I have a series of links within an element called 'stories.thtml'. I am trying to create a link with the html helper and I want each link to send the user to the story_controller with the action 'view', passing an $id for the item to be viewed. However, it seems that because my stories

How can I do login, grab web pages, parse email with cakephp/php?

2007-04-17 Thread Humble Groups
I know this has got nothing to do with cakephp as such. I wrote a java program to login to yahoo groups, grab the messages, dump to mysql. Used cakephp as UI and found it as awesome. Within 2 days it was done. Now revamping the UI. http://ps.namo-namaha.net http://dev.ps.namo-namaha.net The

Re: How can I do login, grab web pages, parse email with cakephp/php?

2007-04-17 Thread Chris Lamb
Humble Groups wrote: If somebody can throw me some inputs on this, I would really appreciate. If this is off-topic to cakephp, please ignore. Hmm, definately OT, but probably of interest. Two of the best programs are Beautiful Soup[0] and Mechanize[1]. Both are in Python, but this /is/

Re: how to use parseExtensions

2007-04-17 Thread davyke
thanks for your help On Apr 14, 1:26 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-s... Chris has blogged about it HTH Tarique On 4/14/07, davyke [EMAIL PROTECTED] wrote: i've just download 'cake_1.2.0.4798alpha',

Re: Lumad CMS / (Cupcake)

2007-04-17 Thread Dan Ballance
Hi Jason, I really like the sound of CupCake / Lumad CMS (CupCake is a way better name btw) and I will definitely be giving it a test drive when I have time. I'm not much of a programmer, just about coping with cake, but far too useless to contribute directly to your project. However, I will

Newbie: Can cake routing handle this?

2007-04-17 Thread DragonI
Hi, I know the traditional route is http://domain/controller/action but can you do this http:/domain/username ? Where username can be routed to a default controller, i.e. username. If so, can I create my own controller name - something other username? Thanks for your time!

Re: Newbie: Can cake routing handle this?

2007-04-17 Thread gwoo
you would need to setup a route for all your controllers. then have the catch all as the last route in the chain. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: integration with manual omoes

2007-04-17 Thread gwoo
check out $this-params['form'] you could easily reformat the params inside of a component or in the controller. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Model SubTypes Database Design

2007-04-17 Thread laptop
Hi, Can anyone tell me what is the best way to go about implementing a base model class and then a type of that model. For example I have a base Advertisement and then I will have PrintAdvertisement, OnlineAdvertisement. Each sub type will have its own specific fields and some types should be

Re: Newbie: Can cake routing handle this?

2007-04-17 Thread DragonI
Great thanks I'm going to download cake try it out :) On Apr 17, 8:55 pm, gwoo [EMAIL PROTECTED] wrote: you would need to setup a route for all your controllers. then have the catch all as the last route in the chain. --~--~-~--~~~---~--~~ You received this

Re: getting data from ClassRegistry

2007-04-17 Thread Copongcopong
Thanks for your reply, I did do the same suggested code. My other question is, if this is a bad practice, since I am doing this code inside a helper. Thanks. On Apr 18, 1:35 am, Mariano Iglesias [EMAIL PROTECTED] wrote: Further on nate's comment: $vars = array(); $view =

Re: Model SubTypes Database Design

2007-04-17 Thread kristofer
you could try making a base component for all your advertisements. components are to controllers as helpers are to views. On Apr 17, 9:19 pm, laptop [EMAIL PROTECTED] wrote: Hi, Can anyone tell me what is the best way to go about implementing a base model class and then a type of that

Re: Model SubTypes Database Design

2007-04-17 Thread gwoo
Advertisement hasOne PrintAdvertisement, Advertisement hasOne OnlineAdvertisment With these assocaitions there would be common fields in the advertisements table and then type specific fields on the print_advertisements and online_advertisements tables. So, laptop you have the right idea. Build

Re: How can I do login, grab web pages, parse email with cakephp/php?

2007-04-17 Thread gwoo
You can run Cake from cli. There are messages on the list that talk about it. PHP can interface with mailboxs pretty easily. Does yahoo groups have an rss feed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Model SubTypes Database Design

2007-04-17 Thread laptop
Thanks gwoo.. does this mean I make models PrintAdvertisement extends Advertisement?? I thought the hasOne association meant the object MUST have a related record, or is it optional? I was more inclined to have a PrintAdvertisement which has a hasOne association with the base advertisements

Re: Model SubTypes Database Design

2007-04-17 Thread gwoo
no, they woudl still exend AppModel. OnlineAdvertisment belongsTo Advertisement I was thinking of it like User and Profile where the Advertisement is like the User and the OnlineAdvertisment holds specifc details about the Ad, like a Profile would.

Re: Lumad CMS / (Cupcake)

2007-04-17 Thread Dr. Tarique Sani
On 4/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, this is Jason, author of CupCake CMS. (Lumad CMS is the project name in CakeForge, renamed because of a policy that prohibits unofficial projects to have the word cake in its name.) Ummm... use of cakephp in the name can be

Re: Only showing debug on main layout?

2007-04-17 Thread Jeremy Pointer
It's not exactly what you're asking but maybe it will help, I needed something similar for 'autocomplete' actions in the controller I ended up with some help from othersnputting the following in app_controller and calling it from the action for which I don't want debugging. function

Re: problems with alternative installation and acl.php

2007-04-17 Thread Wi1d
Anyone got a clue with this problem? I'm having the same problem on Gentoo Linux: php acl.php initdb -core /usr/local/src/cake -root /home/myHome/ cake_projects/ -app tor Warning: require(cake/basics.php): failed to open stream: No such file or directory in