Re: Help me with an Ajax update

2007-03-13 Thread sennet
R U solve this problem... It's possible or not.. reply through email. [EMAIL PROTECTED] is my id.. On Mar 5, 9:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Im having trouble updating a couple of div's with an update, the form > changes a date range stored in a session variable, tha

Re: Block field using find()

2007-03-13 Thread Javier Ramirez Molina
I don't have any requirement to use it, by this is a nice solution and I have just discovered loadInfo. Thank you. 2007/3/14, Mariano Iglesias <[EMAIL PROTECTED]>: > > You could use loadInfo() to fetch your model fields and implode the array. > > Assuming your model is Application, and the field

Re: Database proxy, or something like that...

2007-03-13 Thread Martin Schapendonk
2007/3/14, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > I want to catch all the queries my application asks to the DB (the > ones that goes throught Model->save), append this SQL queries to a > flat file, and run all the queries together using just one connection. I don't see how that will reduce the

Database proxy, or something like that...

2007-03-13 Thread [EMAIL PROTECTED]
Hello everyone! I have created my hole app "but", I need to reduce the number of connections to the database. This is what I have in mind. I want to catch all the queries my application asks to the DB (the ones that goes throught Model->save), append this SQL queries to a flat file, and run all

Re: Block field using find()

2007-03-13 Thread wralph
Thanks very much for this Mariano, a very nice solution. Regards, Winston --~--~-~--~~~---~--~~ 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 unsubscr

Re: Web Services in Cake 1.2.x.x

2007-03-13 Thread dizz
Just took a look, looks pretty simple. Does CakePHP have any SOAP functionality built in? On Mar 14, 9:58 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > Hey guys, with some help from Nate I just put together a little blog > entry on my experiences building a web service with Cake 1.2.x.x. > > h

RE: Block field using find()

2007-03-13 Thread Mariano Iglesias
You could use loadInfo() to fetch your model fields and implode the array. Assuming your model is Application, and the field you want to omit is 'contents', do (look to see that the only difference between 1.1 and 1.2 version is the call to extract()): CakePHP 1.1: $info = $this->Application->l

Block field using find()

2007-03-13 Thread wralph
Hi, I've got a large table (large in regards the number of columns) 'applications' with 40 columns. One of those columns is a BLOB, which holds the contents of a file (held in the database as there are two sides to the application, an internal and external - both of which use the same DB, but not

Web Services in Cake 1.2.x.x

2007-03-13 Thread Chris Hartjes
Hey guys, with some help from Nate I just put together a little blog entry on my experiences building a web service with Cake 1.2.x.x. http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/ (If the link above is destroyed by your mailer, just go t

mod_rewrite and mod_rewrite (virtual hosts)

2007-03-13 Thread guigouz
Hello We currently use mod_rewrite to map urls to their correct path on the webserver as mentioned on the apache manual, for instance RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C] RewriteRule ^www\.([a-z-]+)\.isp\.com/(.*) /home/$1/$2 Would redirect www.something.isp.com to /home/somethin

Re: HABTM problems

2007-03-13 Thread Langdon Stevenson
Hi dan > somebody has a really easy explanation of how to deal with HABTMs with > extra fields... If you need extra fields in the join table, then the standard solution in Cake is along these lines: Table1 (hasMany JoinTable) JoinTable (belongsTo Table1 and belongsTo Table2) Table2 (hasMany

Re: Dispatcher->dispatch causing 500 internal server error, 50Mb data dumps

2007-03-13 Thread gwoo
stop by IRC and we may be able to help you more easily. If you do not have an irc client goto: http://irc.cakephp.org/irc I would say the error probably comes from your server config which could be unique to your host. --~--~-~--~~~---~--~~ You received this mes

Re: Dispatcher->dispatch causing 500 internal server error, 50Mb data dumps

2007-03-13 Thread james revillini
and btw i've run many different web apps on this host: phpwiki, wordpress, oscommerce, zencart, phpBB; so I'm pretty good with LAMP app configuration and deployment. I've just never seen anything like this and cannot find a lick of information about anything even remotely related on the web, so I

Dispatcher->dispatch causing 500 internal server error, 50Mb data dumps

2007-03-13 Thread james revillini
I've been trying to figure out what on earth is going on with my CakePHP application. It runs fine on my home box, but once I upload it to the server, I get 500s. The symptoms of this problem are really strange: the actual 500 error is Premature end of script headers: /path/to/my/ dir/app/webro

RE: email form

2007-03-13 Thread Mariano Iglesias
My bad. Good thing I asked him to do new Sanitize() and then pr -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www

Re: email form

2007-03-13 Thread gwoo
Sanitize cleanArray can not be called statically in 1.1. That was part of the reason for the switch to clean. Also in 1.1 cleanArray uses a reference of whatever you pass it, so you do not have to do $this- >data =. To sum it up, in 1.1 using Sanitize you must create an instance, while in 1.2 you

Re: New Auth component asking for login on every page :(

2007-03-13 Thread BlenderStyle
I got the new AuthComponent going by doing this in UsersController: function beforeFilter() { $this->Auth->allow('index', 'register', 'login', 'logout'); } I'm reading cake/libs/controller/components/auth.php as I go along. My next step is to figure out how to use $this->Auth->login(). I'm sure

HABTM problems

2007-03-13 Thread [EMAIL PROTECTED]
Hi, from what I've seen in this group, it seems that Cake has trouble dealing with any information further than foreign_key and association foreign_key being put into the join table. I have to build an application with nearly all join tables, and usually the join tables have some extra info in the

RE: email form

2007-03-13 Thread Mariano Iglesias
If you are using CakePHP 1.2 then change this: $this->data = Sanitize::cleanArray($this->data); To this: $this->data = Sanitize::clean($this->data); But if you are using CakePHP 1.1 you're telling me that this: $this->data = Sanitize::cleanArray($this->data); Tells you there's no such thing

Re: Things I need help on

2007-03-13 Thread Grant Cox
1. Add these to app/config/bootstrap.php 2. It's up to you. I expect most people will use a helper like that, if they do not need the location to be linked between objects (where you would want them in the database). If you have your "countries" table, you can get a list suitable for a select

Re: Gettext unstable ¿?

2007-03-13 Thread Mika
That might work for some short stings, but I would want to keep translated data from the database also in the database. For example whole articles that are translated. There must be a better way? --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Best Practices: Toggle Item In Element

2007-03-13 Thread phirschybar
Actually both seemed to work for me. Thanks to you both. Anyone know the difference, out of curiousity? On Mar 12, 8:49 am, "jmn2k1" <[EMAIL PROTECTED]> wrote: > I guess this gives the same error, bc the index is still undefined, so > you should try with isset() > > On Mar 9, 9:30 am, "jitka" <[E

Re: Gettext unstable ¿?

2007-03-13 Thread Stefan
Using or where $data["description"] = "Description for product" and comes from db is the same thing. locale/your language/LC_MESSAGES/default.po file must have the translation for string "Product description". --~--~-~--~~~---~--~~ You received this message bec

Re: Confirmation after form validation

2007-03-13 Thread dev_null
What I actually wanted was the ability to do multi-forms. Just didn't properly word my original post. I found several posts here on that subject and you two gentlemen have already commented on them. Thank you for the help. I know I'll be back! Now I have to just build the damn thing!! --~--~

Things I need help on

2007-03-13 Thread rtconner
Hello, I have been using Cake for a week now. I have learned a lot, but still have a long way to go. I have a few questions still. Mostly I am trying to learn "the cake way" to do things so that I am flowing with the framework and not fighting against it. 1. I have a few global functions I use in

Re: How to restrict cakephp to certain sections of your site?

2007-03-13 Thread Samuel DeVore
On 3/13/07, BlenderStyle <[EMAIL PROTECTED]> wrote: > > Putting the folders in webroot seems to be a better solution. I will > try that too. Thanks, AD7six! Are you one of the Cake developers or > something? > he's something ;) -- (the old fart) the advice is free, the lack of crankiness will co

Re: Gettext unstable ¿?

2007-03-13 Thread Mika
Brilliant, thanks for the reply. Any idea about the db questions? --~--~-~--~~~---~--~~ 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

Re: email form

2007-03-13 Thread gerbenzomp
This is the controller code as I have it: data)) { // no data has been passed to page from form $this->render(); } else { // data has been passed from form

Re: How to restrict cakephp to certain sections of your site?

2007-03-13 Thread BlenderStyle
Putting the folders in webroot seems to be a better solution. I will try that too. Thanks, AD7six! Are you one of the Cake developers or something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. T

Re: Best testing option for Cake?

2007-03-13 Thread Bootstrapper
Is there a tutorial or article about the official CakePHP Test Suite? I can't find any documentation. I'll check your Test Suite out too, Daniel, especially since you've got a tutorial! Thanks everyone! On Mar 13, 7:05 am, "nate" <[EMAIL PROTECTED]> wrote: > I'm pretty sure Selenium is for clie

RE: Secure page for cake

2007-03-13 Thread Mariano Iglesias
Look at this: http://groups.google.com/group/cake-php/browse_thread/thread/f603fbcad492144 f Also having http and https on the same directory is a Server configuration, and can be easily done with Apache, so it depends on your hosting. For example one of my servers is a Godaddy server (which use

Re: Secure page for cake

2007-03-13 Thread Samuel DeVore
if you know how to do it for a php app then you know how to do it for a cake app. The only challange might be your figuring out how to force certain pages to be served in https On 3/13/07, FredsFriend <[EMAIL PROTECTED]> wrote: > > Hi > Please excuse my ignorance but is it possible to have part

Secure page for cake

2007-03-13 Thread FredsFriend
Hi Please excuse my ignorance but is it possible to have part of my cakephp app run over http and some of it run over https without having at put cake into the two different directories? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

RE: email form

2007-03-13 Thread Mariano Iglesias
Eventhough one calls the other, use cleanArray(), not cleanArrayr() Can you paste the code as you have it? -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share y

Re: Best testing option for Cake?

2007-03-13 Thread Daniel Hofstetter
@Chris: You can use Selenium also with SimpleTest as described here: http://cakebaker.42dh.com/2006/11/16/how-to-use-selenium-with-simpletest/ @Bootstrapper: If you are using Cake 1.2 you could also try my test suite, which is imho more powerful than the official one. You can download it from htt

Re: email form

2007-03-13 Thread gerbenzomp
> Should be: > > uses('Sanitize'); > $this->data = Sanitize::cleanArray($this->data); Changed that, but get a fatal error: Fatal error: Call to undefined function: cleanarrayr() I looked at sanitize.php and the cleanArrayR(); function is present. On 13 mrt, 13:26, "Mariano Iglesias" <[EMAIL P

Re: Categories dropdown

2007-03-13 Thread gerbenzomp
Sorry, I'm still getting used to the concepts. I guess I was just unsure about how to access data from another model, but I found out I can just acces the category model by doing this: $this->Post->Category->generateList(); // notice the Post->Category part Wow, Cake amazes me with its intuïtiv

Re: Best testing option for Cake?

2007-03-13 Thread Chris Hartjes
On 3/13/07, nate <[EMAIL PROTECTED]> wrote: > > I'm pretty sure Selenium is for client-side (i.e. JavaScript) testing > only. The official CakePHP Test Suite is based on SimpleTest, which > you can download from simpletest.org. It is very easy to use, and > extremely powerful. > On a related no

Re: Confirmation after form validation

2007-03-13 Thread Chris Hartjes
Thanks Mariano. On 3/13/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > Of course: > > if ($this->Model->create($this->data) && $this-Model->validates()) > { > // Validates, so let's save > > $this->Model->save(); > } > > -MI > > ---

Re: Best testing option for Cake?

2007-03-13 Thread nate
I'm pretty sure Selenium is for client-side (i.e. JavaScript) testing only. The official CakePHP Test Suite is based on SimpleTest, which you can download from simpletest.org. It is very easy to use, and extremely powerful. On Mar 13, 2:28 am, "Bootstrapper" <[EMAIL PROTECTED]> wrote: > What ar

Re: Access Helper Object from Element in PHP4

2007-03-13 Thread miggs
Nope, I worked around it by having the helper return an array to the view and then passing that array into the element rather than having the element access the helper. $this->renderElement('elementName', $helperArray); On Mar 12, 9:17 am, "jabbit" <[EMAIL PROTECTED]> wrote: > Do you ever f

RE: Confirmation after form validation

2007-03-13 Thread Mariano Iglesias
Of course: if ($this->Model->create($this->data) && $this-Model->validates()) { // Validates, so let's save $this->Model->save(); } -MI --- Remember, smart coders answer ten questions for every question th

Re: Confirmation after form validation

2007-03-13 Thread Chris Hartjes
On 3/13/07, dev_null <[EMAIL PROTECTED]> wrote: > > I am VERY new to cake and am using version 1.1. Cake will validate a > form for me, but then it gets saved straight away. I have always coded > forms that provide users the opportunity to look at their validated > input and confirm their data, ei

Confirmation after form validation

2007-03-13 Thread dev_null
I am VERY new to cake and am using version 1.1. Cake will validate a form for me, but then it gets saved straight away. I have always coded forms that provide users the opportunity to look at their validated input and confirm their data, either accepting it or going back and modifying the data pri

Re: Categories dropdown

2007-03-13 Thread Dr. Tarique Sani
On 3/13/07, gerbenzomp <[EMAIL PROTECTED]> wrote: > In my app, a post can belong to one category, and I want to list all > categories in a dropdown, with the current category selected. Hmmm... why do I have a sinking feeling that you have not really read the manual? http://manual.cakephp.org/ch

RE: email form

2007-03-13 Thread Mariano Iglesias
This: $this->Sanitize->cleanArray($this->data); Should be: uses('Sanitize'); $this->data = Sanitize::cleanArray($this->data); -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart,

Re: email form

2007-03-13 Thread gerbenzomp
I'm using Mariano's email form code as well, and updated it to work with 1.2, but it still throws errors over this line: $this->Sanitize->cleanArray($this->data); error: "Call to a member-function on a non-object" Any idea what could be the problem? Maybe I use the wrong email- component? On

Re: Categories dropdown

2007-03-13 Thread gerbenzomp
Thanks, that worked, but now I get other errors about undefined indexes and undefined variables... Looking at my code it doesn't really make sense either. Maybe the example I found isn't really suitable for what I'm trying to achieve? In my app, a post can belong to one category, and I want to li

AJAX - Possible to update DB with textarea content from the textarea onblur()??

2007-03-13 Thread quincy
I have searched around the board and found some bits that look useful but haven't been able to figure this out. We need to have ajax functionality so that when the user tabs out of a textarea, or onblurs() it in any other way, it auto updates a database with the contents of that textarea. Any he

Re: Gettext unstable ¿?

2007-03-13 Thread Nico
Creating .po files and then compiling them into .mo is really simple, all you have to do is use xgettex and then msgfmt, and make sure you have the locales compiled in your system. Take a look at these, they are really useful and simple: - http://www.onlamp.com/pub/a/php/2002/06/13/php.html?page=

Re: jQuery question!

2007-03-13 Thread digital spaghetti
For graceful degradation, you should really do: Then in your javascript, at the end do return false; That way, if the user does not have JavaScript, they can still access the page! Tane On 3/13/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote: > > Whoops.. of course it should read: > Guestbook >

Re: Cake Recipes cancelled

2007-03-13 Thread Olivier Percebois-Garve
By the way Michal how are your projects coming along ? Fase ? jQuery stuffs ? You have removed the links but the files are still accessible... Any update to expect ? or a new project ? Olivier On 3/13/07, Michal Tatarynowicz <[EMAIL PROTECTED]> wrote: > > > It's because I wanted to avoid all th

Re: Categories dropdown

2007-03-13 Thread Dr. Tarique Sani
On 3/13/07, gerbenzomp <[EMAIL PROTECTED]> wrote: > foreach ($this->model['post']->category->findAll() as $pass) Try $categories = $this->Post->Category->findAll(); foreach($categories as $pass) HTH Tarique -- = PHP for E-Biz: http:/

RE: Updated AppModel::expects() function for specifying which models should be returned

2007-03-13 Thread Mariano Iglesias
Ok after fixing that issue on the bakery the article has been updated: http://bakery.cakephp.org/articles/view/185 -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and

Categories dropdown

2007-03-13 Thread gerbenzomp
I'm trying to create a dropdown list to select the category in the add and edit views of the Post controller. I found an example in this thread: http://groups.google.com/group/cake-php/browse_thread/thread/a4af5b2ffeb1231e/0de3fed71d9697c2?lnk=gst&q=category+dropdown&rnum=1#0de3fed71d9697c2 So I

RE: email form

2007-03-13 Thread Mariano Iglesias
Also see: https://trac.cakephp.org/ticket/2241 -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.

Re: email form

2007-03-13 Thread GreyCells
This is not a bug - I thought it was too, but see: https://trac.cakephp.org/ticket/2026 You need to override loadInfo() in the model.. ~GreyCells On Mar 6, 11:47 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Ok can you do us bakers a favour and report this tohttps://trac.cakephp.org > ?

Re: How to restrict cakephp to certain sections of your site?

2007-03-13 Thread AD7six
On Mar 12, 8:57 pm, mellowjen <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to install cakephp on my website but whenever I do so, every > page on my site that's currently live cannot be accessed and is viewed as a > cakephp page (throwing errors about modules not being found, etc.) > > Th