Re: HABTM and required relations

2006-12-03 Thread Alexey
Yes, this solution looks great, but there are one trouble: I have for example 10 fields and when I'm using beforeValidate method, when one of additional field is empty, I see error. Then I fix error, save again, other error, then again and again. So I was use advanced validation (http://wiki.cakep

CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-03 Thread Larry E. Masters aka PhpNut
Well, its not often that you can take something out of the freezer and have it taste better than before, but that's what happened. We received a few more bugs and as Gwoo said in a message last week, speed was an issue. So, with the bugs that came in, we spent some time making things work a bit fas

going crazy about update method.

2006-12-03 Thread [EMAIL PROTECTED]
I use a table to store all the config information: CREATE TABLE `configs` ( `id` int(10) unsigned zerofill NOT NULL auto_increment, `name` varchar(255) collate utf8_unicode_ci NOT NULL default '', `value` text collate utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) and I have filled some

Rendering a view for ajax and non ajax

2006-12-03 Thread Grant Davies
Hi guys, I have a view where I need to render the same content when its an ajax call another time when its first page render. I don't want a duplicate of the table_contents.thtml file even if its uses elements to create itself. So in the table_content.html view file has : $this->render("table

RE: what can I do, when I want download files form cake build system.

2006-12-03 Thread Mariano Iglesias
That's what I just gave you :) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! -Mensaje original- De: cake-php@googlegro

Re: what can I do, when I want download files form cake build system.

2006-12-03 Thread rainbow686
Oh, thank a lot, I will try it. I don't know how download the file with the Cake way, and I didn't find the infomation is the Cake's doc, so can you tell me where can I get those information? --~--~-~--~~~---~--~~ You received this message because you are subscri

RE: what can I do, when I want download files form cake build system.

2006-12-03 Thread Mariano Iglesias
Why instead of doing a redirect to the file you handle it the Cake way? For example, build an action called download in a controller called downloads. Something like: downloadPath . DS . $file; // Check against path injection if (preg_match('/^[A-Za-z0-9_\-\.]*$/

Re: error messages (validation) ghost text

2006-12-03 Thread nate
http://www.google.com/search?client=safari&rls=en&q=debugging+css+in+IE&ie=UTF-8&oe=UTF-8 --~--~-~--~~~---~--~~ 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

Re: what can I do, when I want download files form cake build system.

2006-12-03 Thread nate
That usually means you got the file path wrong, as any path to a real file in your web root does not get "eaten" by Cake. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, sen

what can I do, when I want download files form cake build system.

2006-12-03 Thread rainbow686
I'm a newer in cakephp. I want to build a download system with cake. I host the file at WWW_ROOT.DS.'upload'.DS.$filename (eg:www.aaa.com/upload/aaa.txt). I use the code $this->redirect("/upload/$file_name"); to download the file. But the system told me: Missing controller You are se

Re: Extra queries to fetch associations

2006-12-03 Thread francky06l
Making the association from Image and "belongsTo" would produce one query .. Well just a guess .. On Dec 3, 4:54 am, "Brad Daily" <[EMAIL PROTECTED]> wrote: > Pardon my use of a Rails example here, but that is my reference point. > Let's say I have two models, Album and Image. Obviously: > > Albu

Re: CakePHP highlighted in IBM's PHP project resource website

2006-12-03 Thread francky06l
Superb, thanks folks.. On Dec 2, 8:33 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Nic... > > http://www-128.ibm.com/developerworks/opensource/top-projects/php.html > > P.S: Thanks Domain Developer for the pointer. > > -MI > > ---

Re: Updating a different div

2006-12-03 Thread francky06l
Just put the 2 div's in the update parameters of your call, into the view you render just choose the one you render ...I do that quite often and no much problem... such view as : div('div1); ?> ... .. divEnd('div1'); endif; ?> div('div2) : ?> .. .. $ajax->divEnd('div2'); endif; ?> well of

rewrite, custom paths, and helpers

2006-12-03 Thread 1WebGuy
Any help with this will be GREATLY APPRECIATED! My paths are setup as such: app cake public_html <- I have copied the contents of app/webroot to this folder I have adjusted the index.php page to setup the correct ROOT and other paths. My host doesn't allow mod_rewrite so I'm trying to use ca

RE: HABTM and required relations

2006-12-03 Thread Mariano Iglesias
You could use the beforeValidate() method on your model class to check anything you want, something like: class Site extends AppModel { function beforeValidate() { if (!isset($this->data['Niches']) || empty($this->data['Niches']['id'])) {

error messages (validation) ghost text

2006-12-03 Thread Domain Developer
Does anyone know why this block of css causes error messages in IE to blend in with the white background.When I highlight the invisible error message with my cursor it then stays visible. Seems to work fine in Firefox. input, textarea { clear: both; display:block; font-size: 14px; font-family: i

HABTM and required relations

2006-12-03 Thread Alexey
Hi all I have Model where are Site-Niches connected with HABTM. But it's possible to add Sites without selected Niches. How is it possible to add "required" relations, so it will be error if Niches not selected? Something like VALID_NOT_EMPTY for related records. --~--~-~--~~---

hasBelongsToMany and checkboxes()

2006-12-03 Thread [EMAIL PROTECTED]
Hello, CakePHP: 1.1.8.3544 Database: Postgresql I use this http://wiki.cakephp.org/docs:helpers:custom:checkboxes to generate checkboxes which I want to save in the database. Values from checkboxes are associated with table services like this: Services { idinteger na

Re: How to make HABTM edit pages auto-select selected items?

2006-12-03 Thread Tijs Teulings
I tend to use: $this->set('selectedTopics', $this->Topic->generateList()); which creates a list that is usable in a select dropdown right away. note the absence of 'id' in the function call which makes array_reverse unnecessary i believe. [EMAIL PROTECTED] wrote: > > > Try this in your cont

Re: A PHP SITE can check yr IP

2006-12-03 Thread Daniel Hofstetter
I removed that post. -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ 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

RE: How do I use cookies in cakePHP

2006-12-03 Thread Mariano Iglesias
Check this, it works for me (although I changad the code a little bit): http://rossoft.wordpress.com/2006/05/22/cookie-component/ -MI --- Remember, smart coders answer ten questions for every question they ask. So be smar

RE: A PHP SITE can check yr IP

2006-12-03 Thread Mariano Iglesias
This definitely seems like SPAM. Too bad messages can't be deleted (so link can be taken out before google spidering...) Or is it possible? -MI --- Remember, smart coders answer ten questions for every question they ask.

How do I use cookies in cakePHP

2006-12-03 Thread [EMAIL PROTECTED]
Hi, I want to be able to use cookies in cakePHP, since there is no built in interface for setting cookies I use the standard php setcookie(). However, when I try to retrieve the cookie later, using $_COOKIE, I get an empty array, as if cake has wiped the cookie. How can I get around this? Than

Re: A PHP SITE can check yr IP

2006-12-03 Thread Eric C Blount
I don't get it. Is this spam? Why send this? Anyway, the site's not very good - I'm in Las Vegas, NV and it put me just outside of Wichita, Kansas. And my hostname is at lv.lv.cox.net. Hey, any other Las Vegas CakePHP users? Eric --~--~-~--~~~---~--~~ You recei