How can I validate the form fields first before recaptcha?

2010-10-21 Thread Louie Miranda
On the bin: http://bin.cakephp.org/view/263117079 It validates the recaptcha first, before the fields. What I wanted is, validate the fields then recaptcha. I tried to move the codes.. if($this-Recaptcha-valid($this-params['form'])) { after if ($this-Feedback-save($this-data)) {, then it

Re: Cake PHP Migration Problems

2010-10-21 Thread jmdesign
Thanks for the replies. I presume the doc route is this section of code specified in the index.php file: define('APP_DIR', 'app'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); define('WEBROOT_DIR', 'webroot'); define('WWW_ROOT', ROOT . DS

Re: Cake PHP Migration Problems

2010-10-21 Thread jmdesign
Thanks for the replies, I thought it might be a doc route issue, I presume the doc route is this section of code: define('APP_DIR', 'app'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); define('WEBROOT_DIR', 'webroot');

Re: Cake PHP Migration Problems

2010-10-21 Thread jmdesign
Thanks for the replies, I thought it might be a doc route issue, I presume the doc route is this section of code: define('APP_DIR', 'app'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); define('WEBROOT_DIR', 'webroot');

Re: Cake PHP Migration Problems

2010-10-21 Thread jmdesign
Thanks for the replies, I thought it might be a doc route issue, I presume the doc route is this section of code: define('APP_DIR', 'app'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); define('WEBROOT_DIR', 'webroot');

Re: How can I validate the form fields first before recaptcha?

2010-10-21 Thread euromark
i would validate it together this is the most comfortable form for a user. in any case you need to make sure that that you use validate: $this-Feedback-set($this-data); $res = $this-Feedback-validates(); $res2 = $this-Recaptcha-valid($this-params['form']); if ($res $res2) { //save now

LoadModel on login form

2010-10-21 Thread IWC
I want my users to select a Depot at login so that I can use the selected Depot to filter reports and enquiries. I have been trying to use LoadModel to populate a select list on my login form but it never does. How do I do this? Is there a better way to achieve the same thing. Thanks Check out

Auto genereated links do not include route prefixes

2010-10-21 Thread odd
Hello, i have a small routing and linking problem, and i can't find a solution for it. The problematic route looks like this: Router::connect('/mobile/:controller/:action/*', array('mobile' = true)); Works fine so far, the problem are the links, they aren't compiled as i would expect it, the

problem with utf8 signs in Html-link(..) function

2010-10-21 Thread KK
Hello everyone! I use in my small cakephp (version 1.3) project some UTF8 signs. In one of my view I used lines below: echo $this-Html-link('tryb edycji albumów', array('controller' = 'albums', 'action' = 'index')); echo $this-Html-link('tryb edycji albumow', array('controller' = 'albums',

Overridden paginateCount method in controller?

2010-10-21 Thread Pim
Is it possible to over ride the paginateCount as described here http://book.cakephp.org/view/249/Custom-Query-Pagination in the controller? I have several actions in my controller, each of which paginate the results. In one instance I have a $this-paginate = array(

Re: Cake PHP Migration Problems

2010-10-21 Thread jmdesign
Okay managed to get access to the error logs and they say the following: mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary. On Oct 21, 9:42 am, jmdesign webmas...@jmdesignsolutions.com

pdo_postgres strange error.

2010-10-21 Thread Fanck
Hi, Before flaming down, let me say that it may not be related to CakePHP, but somehow on my configuration (hopefully): - Ubuntu 10.10 - PHP 5.3.3 - PostgreSQL 8.4.5 - CakePHP 1.3.4 (but same error with Cake 1.2.8) So here's the deal: I was getting white screen (of death?) at application start.

Re: Video upload and view

2010-10-21 Thread lordojazz
Hi, I'm interested on the video upload ffmpeg can you help me what method or script did you used? Thanks -- View this message in context: http://cakephp.1045679.n5.nabble.com/Video-upload-and-view-tp1267055p3229673.html Sent from the CakePHP mailing list archive at Nabble.com. Check out

Re: How can I validate the form fields first before recaptcha?

2010-10-21 Thread Tilen Majerle
but in save method use second parameter false, to it won't validate again $this-Feedback-save($this-data, false); -- Tilen Majerle http://majerle.eu 2010/10/21 euromark dereurom...@googlemail.com i would validate it together this is the most comfortable form for a user. in any case you

Re: How to set Timer in cakephp?

2010-10-21 Thread Anthony
I'm not sure of a cake way, but for things like this I prefer to create a php script intended for running on CLI and using cron to run it at a given interval. Or create an action in one of your controllers and request that page. I've done this but it seems pretty insecure so setup I some

Re: How can I validate the form fields first before recaptcha?

2010-10-21 Thread euromark
to be really precise it would be $this-Feedback-save(null, false); ^^ On 21 Okt., 14:33, Tilen Majerle tilen.maje...@gmail.com wrote: but in save method use second parameter false, to it won't validate again $this-Feedback-save($this-data, false); -- Tilen Majerlehttp://majerle.eu

Re: Send 'first' parameter to pagination function

2010-10-21 Thread Mariano C.
idea? On 20 Ott, 19:04, Mariano C. mariano.calan...@gmail.com wrote: This gave me Book array, Author array, and an empty BooksUser array, the rest of array is not returned On 20 Ott, 18:45, Fran Iglesias cakephpi...@gmail.com wrote: $this-paginate['Book'][0] = 'first'; should do the

Re: Cache config in core.php

2010-10-21 Thread mark_story
The trailing ? has been omitted from all the all PHP files in Cake for 1.3, too many headaches with headers already sent errors. -Mark On Oct 20, 7:29 am, PaulW paul.wil...@me.com wrote: Okay cheers for that, I was looking for Configure::Cache.check so a text search of the file didn't show it,

Re: Cake PHP Migration Problems

2010-10-21 Thread cricket
On Thu, Oct 21, 2010 at 8:07 AM, jmdesign webmas...@jmdesignsolutions.com wrote: Okay managed to get access to the error logs and they say the following: mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the

Re: LoadModel on login form

2010-10-21 Thread cricket
On Wed, Oct 20, 2010 at 9:53 AM, IWC ianw.chart...@gmail.com wrote: I want my users to select a Depot at login so that I can use the selected Depot to filter reports and enquiries. I have been trying to use LoadModel to populate a select list on my login form but it never does. Because you'd

cakePHP + openID component (cakebaker) + google

2010-10-21 Thread Dmitry Shevchenko
Hi. I'm trying to run example from http://code.42dh.com/openid/. For regular openID provider like MyOpenid it works fine, but when I'm trying to use it for google ( https://www.google.com/accounts/o8/id ) it show me Invalid OpenID . but when I use demo: http://openid-example.42dh.com/ all works

Re: problem with utf8 signs in Html-link(..) function

2010-10-21 Thread cricket
On Wed, Oct 20, 2010 at 12:38 PM, KK kdiablo...@gmail.com wrote: Hello everyone! I use in my small cakephp (version 1.3) project some UTF8 signs. In one of my view I used lines below: echo $this-Html-link('tryb edycji albumów', array('controller' = 'albums', 'action' = 'index')); echo

Logout not... logging out?

2010-10-21 Thread xtraorange
Howdy all, I have a very standard logout method (see below) in my user controller. But when I go to my logout (which used to work the last time I tested it) I just get forwarded to the root with no flash message and no actual logout. Any ideas? function logout() {

spooky trouble with a plugin behavior

2010-10-21 Thread cricket
I'm working on a Comment plugin that I want to use for several models. One, Gallery, works perfectly. But another, Post, not so much. Both models have $actsAs = array('Comments.Commentable'); In the behavior's afterFind() I have this line: $data = $Model-Comment-threaded($Model-alias,

Re: problem with utf8 signs in Html-link(..) function

2010-10-21 Thread jsalonen
Is the source code encoded in UTF-8? Not all byte sequences are valid in UTF-8. Htmlentities, the function that is used to escape the title, clobbers input that is invalid in the character encoding you specify. You can check if this is the issue with code like this: if (ę == \304\231) echo It is

Re: Logout not... logging out?

2010-10-21 Thread jsalonen
Are you sure logoout is not logging you out? You can check with: $this-Session-read($this-Auth-sessionKey) (AuthComponent uses the session to store information about the logged in user) On Oct 21, 11:58 pm, xtraorange xtraora...@gmail.com wrote: Howdy all, I have a very standard logout

Re: Logout not... logging out?

2010-10-21 Thread xtraorange
It's showing me my username where I have it displayed at the top right, and giving me the message saying I can't register or login because I'm already logged in when I try to do either of those. So I have to assume that I'm still logged in. :P On Oct 21, 5:36 pm, jsalonen joni.salo...@gmail.com

Re: spooky trouble with a plugin behavior

2010-10-21 Thread cricket
OK, that's ... six (?!) hours of my life I'll never get back. I've been chipping away at this, adding all kinds of debug() lines in Model ClassRegistry, becoming convinced the latter had a bug whereby two models couldn't use the same plugin behavior. And then I looked--once again, but with a bit

Populating a parent field when adding new rows

2010-10-21 Thread Philip
Hi, I'm sorry if this has been answered elsewhere but I've done a bit of googling and can't seem to find this situation. I've got a table which refers back to itself. It's a table of geographical locations (territories) and each territory may have a parent territory which it is a part of. I've

Re: Populating a parent field when adding new rows

2010-10-21 Thread cricket
On Thu, Oct 21, 2010 at 8:12 AM, Philip theevill...@gmail.com wrote: Hi, I'm sorry if this has been answered elsewhere but I've done a bit of googling and can't seem to find this situation. I've got a table which refers back to itself. It's  a table of geographical locations (territories)

Re: cakePHP + openID component (cakebaker) + google

2010-10-21 Thread Dr. Loboto
Google needs HTTPS instead of HTTP as MyOpenId. On Oct 22, 1:32 am, Dmitry Shevchenko dmitr...@gmail.com wrote: Hi. I'm trying to run example fromhttp://code.42dh.com/openid/. For regular openID provider like MyOpenid it works fine, but when I'm trying to use it for google