Re: Odd code in sanitize core lib?

2009-10-28 Thread Miles J
I thought you were lying so I checked, and haha it is there. Im curious on this as well. On Oct 28, 8:51 pm, George H wrote: > Hi guys, > > I've been debugging my controller that is using Sanitize and I had a > peek inside the CakePHP Sanitize core lib file, where I found > something odd. > > Is

Problem with DATE.

2009-10-28 Thread Jiru
Hii Programmers , In cakephp when I use DATE field it displays the dropdown list with year limit 1989-2029 how can we get the date from 1950? regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: "null" response on Ajax request

2009-10-28 Thread Dr. Loboto
Set debug to at least 1 (and no matter that it is ajax) to see error. On Oct 28, 10:34 pm, Thanos Atskakanis wrote: > Hi all, > > I am currently building a CMS and my system does some ajax requests which > return some html: simple and nice. > When I run it locally it all works fine but when I pu

Odd code in sanitize core lib?

2009-10-28 Thread George H
Hi guys, I've been debugging my controller that is using Sanitize and I had a peek inside the CakePHP Sanitize core lib file, where I found something odd. Is it possible if someone could explain to me (I'm just genuinely curious) the reasoning behind line 223 in /cake/libs/sanitize.php (version

Re: Using Cake amongst existing non-cake site

2009-10-28 Thread Miles J
In short answer, you don't and shouldn't. If they already have a pre- built system, build the code procedurally, not with cake. On Oct 28, 2:02 pm, dtirer wrote: > Lets say someone has a website that was done using no framework.  Then > they come to me and ask me to add a large section onto the

Using Cake amongst existing non-cake site

2009-10-28 Thread dtirer
Lets say someone has a website that was done using no framework. Then they come to me and ask me to add a large section onto the site. I would like to use Cake for that section of the site. However, how does that work with the existing design and layout of the site? If the rest of the site alr

Re: Inflection wrong

2009-10-28 Thread matalina
Nevermind I found what I was looking for. I don't much care whether the file names are wrong, just wanted the output to be correct. On Oct 28, 8:48 pm, matalina wrote: > I've created a simple headache tracker app using cakephp, however the > inflection for headache is wrong.  I know at one poi

Inflection wrong

2009-10-28 Thread matalina
I've created a simple headache tracker app using cakephp, however the inflection for headache is wrong. I know at one point I saw a way to change the inflection so that it reads correctly. Instead of saying "Add Headach" I want it correctly read as "Add Headache". Can someone point me in the ri

Re: Parse error in Model.

2009-10-28 Thread centr0
omg. kill me. this is what i get for programming in java for a month.. then going back to php. thank you toby... and thanks miles for the link! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Re: Dynamic routes

2009-10-28 Thread Miles J
What are you trying to route to? Router::connect('/:cat/*', array('controller' =>'categories', 'action' => 'view'), array('cat' => 'categories|kategorie')); On Oct 28, 4:23 pm, kicaj wrote: > Why doesn't work: Router::connect('/:cat/*', array('controller' => > 'categories', 'action' => 'view'),

Dynamic routes

2009-10-28 Thread kicaj
Why doesn't work: Router::connect('/:cat/*', array('controller' => 'categories', 'action' => 'view'), array('cat' => '[categories| kategorie]')); ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To p

Re: Parse error in Model.

2009-10-28 Thread Toby Ashley
This... function validatePassword(password1 = null, password2 = null) { ...should be function validatePassword($password1 = null, $password2 = null) { On Wed, Oct 28, 2009 at 10:59 PM, centr0 wrote: > > For the life of me i cant figure out why im getting a parse error. > > class U

Re: Parse error in Model.

2009-10-28 Thread Miles J
It doesn't help if you don't explain what your are doing and what you are trying to achieve. Where is validatePassword used? Also: http://www.milesj.me/resources/snippet/17 On Oct 28, 3:59 pm, centr0 wrote: > For the life of me i cant figure out why im getting a parse error. > > class User ext

Parse error in Model.

2009-10-28 Thread centr0
For the life of me i cant figure out why im getting a parse error. array( 'rule' => 'email', 'message' => 'Email address is required.' ), 'password' => array( 'rule' => 'alphaNumeric',

Re: Select Distinct only for Unique fields?

2009-10-28 Thread lapinski
What do you mean by "it doesn't work"...? any more details? --Lapinski gimperdaniel wrote: > > > I am having a problem with SELECT DISTINCT > > This is what I have in my model: > > This works: > > $this->find('all', array('fields'=>array('DISTINCT Album.id', > 'Album.year'), 'recursive'

Re: Inefficient SQL queries with hasMany/belongsTo relationship

2009-10-28 Thread robustsolution
the question why do you want to paginate comments while you are paginating posts? in general when you paginate the main model (Post), you just include summary fields from the associated models example -last commented by commenter name -last comment title... not body... (text) -last commented in (d

Re: Query (using "greater than")

2009-10-28 Thread gimperdan...@gmail.com
I was following the code and examples from a Book, not the book.cake. Sorry I wasn't clear on that. On Oct 6, 1:57 pm, brian wrote: > On Tue, Oct 6, 2009 at 12:20 PM, gimperdan...@gmail.com > > wrote: > > > thanks!! Maybe the book is outdated or just a typo. > > Outdated. The behavior changed a

Select Distinct only for Unique fields?

2009-10-28 Thread gimperdan...@gmail.com
I am having a problem with SELECT DISTINCT This is what I have in my model: This works: $this->find('all', array('fields'=>array('DISTINCT Album.id', 'Album.year'), 'recursive'=>-1)); This Doesn't Work: $this->find('all', array('fields'=>array('DISTINCT Album.year'), 'recursive'=>-1)); Albu

Re: what do you mean by bake ?

2009-10-28 Thread jacmoe
A little bit of reading, please, before you ask. :) You could have learned what 'bake' was by reading the CakePhp book. Do yourself a favor and do the blog tutorial. -> http://book.cakephp.org/view/219/Blog On Oct 28, 9:58 am, "www.landed.at" wrote: > I thought at first bake was just a fancy nam

Re: Problems cakephp 1.2.5

2009-10-28 Thread Miles J
Well then theres your problem. Figure out why user is empty. Should of probably debugged that before blaming extract. On Oct 28, 9:37 am, Sergio Silva wrote: > $data   =       array( >        "User" => null > ) > > User data is null!! > > 2009/10/28 Simon : > > > > > ___viewFn       =       > >

Re: What the heck? CakePHP is dead?

2009-10-28 Thread alvivar
jeje... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups

"null" response on Ajax request

2009-10-28 Thread Thanos Atskakanis
Hi all, I am currently building a CMS and my system does some ajax requests which return some html: simple and nice. When I run it locally it all works fine but when I put it live instead of the expected html I get "null". Not "Not found" or any other error, just the word "null". All I use is the

Re: How to: A user logs in from a second location and the first location's session gets killed?

2009-10-28 Thread Miles J
You need to save the session ID/token to the database. On each page load you check to see if the current ID/token matches the one in the database, if it does not, you log them out. So if A logs in and has a token, hell be fine. Once B logs in, a new token is created nad logged in the database. A

ajax recursion in nested elements

2009-10-28 Thread paulinthought
I have an element right.ctp with the code echo ""; echo $this->element('pplcollection'); echo "".$ajax->dropRemote('dropzone',null,array('url' => '/casts/ remuser/','with'=>'{draggedid:element.id}'', 'update'=>'res')); The pplcollection.ctp element has the code below echo $this->requestAction('ca

Re: Schema migrations won't work with Capistrano deployment

2009-10-28 Thread majna
Use "cake schema generate -name my_schema" and "cake schema create " (checked in 1.3) On Oct 27, 8:21 pm, Jesse wrote: > I've got a bunch of large CakePHP apps and I'm working on getting the > CakePHP schema migration to work instead of maintaining all the DB > struture by hand. > > The proble

Re: Saving data to three models from one form

2009-10-28 Thread Miles J
If you are saving date for the first time (inserting), you cannot use saveAll. The foreign keys and relations will not be set. This only works for updating, and when you do an update the IDs need to be hidden in the form somewhere. You need to do it like so: http://book.cakephp.org/view/75/Saving

Re: Saving data to three models from one form

2009-10-28 Thread Daniel
I am using saveAll: if ($this->Story->saveAll($this->data, array('validate' => 'first'))) // passed validation and successfully saved Unless you mean without the array('validate' => 'first') - in which case the validation only works for the Story model. On Oct 28, 4:58 pm, Celso wrote: > Use s

Re: Saving data to three models from one form

2009-10-28 Thread Celso
Use saveAll On 28 out, 13:19, Daniel wrote: > Hi guys, I've got a bit of a problem. Rather than type it all out > again here, is it OK if I just link to my blog with all the info: > > http://theworldofdan.co.uk/2009/10/28/problem-saving-data-to-three-mo... > > I would really appreciate it if som

How to: A user logs in from a second location and the first location's session gets killed?

2009-10-28 Thread j0n4s.h4rtm...@googlemail.com
Hi, the subject essentially asks the whole question already. How did you detect that a user logs in from a second location, and kick him from the first location? The first location should display a warning on the next action that requires to be logged in like "You have been logged out automatica

Re: Problems cakephp 1.2.5

2009-10-28 Thread Sergio Silva
$data = array( "User" => null ) User data is null!! 2009/10/28 Simon : > > ___viewFn       =       > "C:\xampp\htdocs\one\vendors\base\views\elements\email\html > \users/welcome.ctp" > $___dataForView =       array( >        "content" => "", >        "html" => HtmlHelper > HtmlH

Re: Problems cakephp 1.2.5

2009-10-28 Thread Simon
___viewFn = "C:\xampp\htdocs\one\vendors\base\views\elements\email\html \users/welcome.ctp" $___dataForView = array( "content" => "", "html" => HtmlHelper HtmlHelper::$tags = array HtmlHelper::$base = NULL HtmlHelper::$here = NULL HtmlHelper::$params = array Html

Saving data to three models from one form

2009-10-28 Thread Daniel
Hi guys, I've got a bit of a problem. Rather than type it all out again here, is it OK if I just link to my blog with all the info: http://theworldofdan.co.uk/2009/10/28/problem-saving-data-to-three-models/ I would really appreciate it if someone is able to help me out with this. Thank you --~--

Re: Problems cakephp 1.2.5

2009-10-28 Thread Sergio Silva
Could you paste here the content of $data['User'] using debug($data['User']) ? It seems empty 2009/10/28 Simon : > > extract ($data['User']) ?> > > > this is in email template in email i get these errors > > Undefined variable: first_name > extract() [function.extract]: First argument should be

Re: $html->link HELP

2009-10-28 Thread bradmaxs
Thank you both very much. Miles J - your suggestion was it - I can't believe I haven't joined this forum and asked many of my questions earlier. BTW, I am using your Uploader in one of my development sites and it is awesome! TimG - Gonna go read that article at the bakery right now. Thanks for

Re: Problems cakephp 1.2.5

2009-10-28 Thread Simon
extract ($data['User']) ?> this is in email template in email i get these errors Undefined variable: first_name extract() [function.extract]: First argument should be an array On Oct 28, 8:56 am, Sergio Silva wrote: > debug($data['User']) ? > > 2009/10/28 Simon : > > > > > > > extract() [fun

Re: Problems cakephp 1.2.5

2009-10-28 Thread Sergio Silva
debug($data['User']) ? 2009/10/28 Simon : > > extract() [function.extract]: First argument should be an array > > it used to work with cakephp 1.2.0.7962 Final  any idea > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: what is up with cakephp.org

2009-10-28 Thread Celso
Plants vs Zombie ??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@

Problems cakephp 1.2.5

2009-10-28 Thread Simon
extract() [function.extract]: First argument should be an array it used to work with cakephp 1.2.0.7962 Final any idea --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

Re: What the heck? CakePHP is dead?

2009-10-28 Thread jacmoe
The Interact tab is totally killer! :D On Oct 28, 1:58 pm, "O.J. Tibi" wrote: > Help! I'm eaten by the site's zombie language!!! W!!! > > On Oct 28, 8:57 pm, "O.J. Tibi" wrote: > > > Of course, he means that CakePHP.org's got the Halloween theme! This > > MUST, I mean, NEEDS, no, I real

Re: No layout appears on installation

2009-10-28 Thread Patrick
Ok found the error, it was related to the allow_override directive. I had in my httpd.conf file a first part (for , the default directory) with AllowOverride set to All but I didn't see that below in the same file, I have a directive for the that was set to None. Resetted to All, it's working now

Re: HABTM and extra field

2009-10-28 Thread CG
IMHO I think the complication relies on the logic, not on the HABTM. Maybe you should look for a workaround, maybe get a fixed discount per unit (litre, kilo, whatever) which can be stored on the product table. I wouldn't go for it, but it's a workaround. Other solution would be to set fixed pac

Limiting paginate total results

2009-10-28 Thread Zvonko
Hi! Is there a way to use paginate and limit the total number of results. To explain myself, I have a table with 1000 rows, but I only want to show the last 200 and paginate it 25 per page. Is it possible in CakePHP and how. Thanks Zvonko --~--~-~--~~~---~--~~ Y

Re: what is up with cakephp.org

2009-10-28 Thread O.J. Tibi
Haha, I think the Halloween theme was Mark's idea. :) On Oct 28, 11:49 am, Samuel DeVore wrote: > Did someone hack it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

Re: what do you mean by bake ?

2009-10-28 Thread O.J. Tibi
You should read the docs more my friend, and besides, "bake" is a catchy verb for CakePHP! Here the documentation link (aka "The Cookbook") http://book.cakephp.org/view/113/Code-Generation-with-Bake On Oct 28, 4:58 pm, "www.landed.at" wrote: > I thought at first bake was just a fancy name for

Re: login page - some public & some access by memeber only

2009-10-28 Thread Céryl
This has CakePHP's Authentication Component written all over it! :D http://book.cakephp.org/view/172/Authentication On 28 okt, 01:07, leafchild wrote: > I want to create site that have some public page and some pages has > access restriction which accessed by member who created an account > th

Re: What the heck? CakePHP is dead?

2009-10-28 Thread O.J. Tibi
Help! I'm eaten by the site's zombie language!!! W!!! On Oct 28, 8:57 pm, "O.J. Tibi" wrote: > Of course, he means that CakePHP.org's got the Halloween theme! This > MUST, I mean, NEEDS, no, I really mean SCREAMS to be screenshot! Cool! > > Trick or Treat!!! > > On Oct 28, 4:53 pm, Herbe

Re: What the heck? CakePHP is dead?

2009-10-28 Thread O.J. Tibi
Of course, he means that CakePHP.org's got the Halloween theme! This MUST, I mean, NEEDS, no, I really mean SCREAMS to be screenshot! Cool! Trick or Treat!!! On Oct 28, 4:53 pm, Herberth Amaral wrote: > HAHA! Awesome! > > On Oct 28, 2:44 am, Marcelo Andrade wrote: > > > On Wed, Oct 28, 2009 at

Re: What's going on with www.cakephp.org?

2009-10-28 Thread jitka (poLK)
When I saw some public reactions on recent team fork, first of all, I was surprised people thinks CakePHP aims to its grave. Then, I was surprised by amount of blogs who actually thinks CakePHP will die. Well, not just core developers, all tens of thousands of monthly cake downloaders and users, w

Re: What's going on with www.cakephp.org?

2009-10-28 Thread Jonathon Musters
Actually what they wanted was to draw attention to the project. By doing this we got talking about it, it was posted on blogs and got a buzz going. not a bad way to do it but IMO not the best way either. :) Jonathon --~--~-~--~~~---~--~~ You received this me

Re: Newbie - issue with layout default.ctp

2009-10-28 Thread rtconner
should work as is. you are a bit weak on details, but perhaps something is causing the default layout not to be used? perhaps put "var $layout = 'default';" in your controller? On Oct 27, 10:40 pm, Jennifer wrote: > I have created a new template file, called it default.ctp in app/views/ > layout

Re: What's going on with www.cakephp.org?

2009-10-28 Thread Sergio Silva
cool ; ) 2009/10/28 Aurimas : > > oh sorry, fixed > > On Oct 28, 1:50 pm, Sergio Silva wrote: >> @Aurimas: 403 Forbidden >> >> 2009/10/28 Aurimas : >> >> >> >> > here is zombie language translator used by cakephp ;) >> >http://lickus.lt/zomb.php >> >> > On Oct 28, 12:27 pm, "euromark (munich)"

Re: What's going on with www.cakephp.org?

2009-10-28 Thread Aurimas
oh sorry, fixed On Oct 28, 1:50 pm, Sergio Silva wrote: > @Aurimas: 403 Forbidden > > 2009/10/28 Aurimas : > > > > > here is zombie language translator used by cakephp ;) > >http://lickus.lt/zomb.php > > > On Oct 28, 12:27 pm, "euromark (munich)" > > wrote: > >> yeah :) > >> i like the "BRAAIII

Re: What's going on with www.cakephp.org?

2009-10-28 Thread Sergio Silva
@Aurimas: 403 Forbidden 2009/10/28 Aurimas : > > here is zombie language translator used by cakephp ;) > http://lickus.lt/zomb.php > > On Oct 28, 12:27 pm, "euromark (munich)" > wrote: >> yeah :) >> i like the "BRAAIIINS" stuff^^ >> >> On 28 Okt., 10:59, Eugene Golovan wrote: >> >> > Helloween?

Re: What's going on with www.cakephp.org?

2009-10-28 Thread Aurimas
here is zombie language translator used by cakephp ;) http://lickus.lt/zomb.php On Oct 28, 12:27 pm, "euromark (munich)" wrote: > yeah :) > i like the "BRAAIIINS" stuff^^ > > On 28 Okt., 10:59, Eugene Golovan wrote: > > > Helloween? %) > > > jordicakephp wrote: > > > Hello everybody, it's 10:45

Re: what do you mean by bake ?

2009-10-28 Thread Jonathon Musters
Well let's ask the question how do you mAke a cake. On 10/28/09, www.landed.at wrote: > > I thought at first bake was just a fancy name for serve, its not a > great idea to introduce new terms if they are not required in a > framework. Maybe there is a great reason... > > > -- Sent from my m

Re: cakephp not working, please help

2009-10-28 Thread 浪漫様
well, finally! after sending them an email explaining step by step how to change it, they finally did it : ) so is working now as expected! thanks Rohman On Oct 26, 11:16 pm, David Roda wrote: > not if they dont allow you to override the .htaccess rules unfortunately. > > I've never known a hos

Re: What's going on with www.cakephp.org?

2009-10-28 Thread euromark (munich)
yeah :) i like the "BRAAIIINS" stuff^^ On 28 Okt., 10:59, Eugene Golovan wrote: > Helloween? %) > > jordicakephp wrote: > > Hello everybody, it's 10:45 am in Barcelona, Spain. > > > When trying to access the project's site,www.cakephp.org, I'm getting > > some very strange images! The site seems

Re: What's going on with www.cakephp.org?

2009-10-28 Thread Eugene Golovan
Helloween? %) jordicakephp wrote: > Hello everybody, it's 10:45 am in Barcelona, Spain. > > When trying to access the project's site, www.cakephp.org, I'm getting > some very strange images! The site seems to be attacked or I don't > understand the message that the project is trying to send us (

Re: Routes not working in site copy

2009-10-28 Thread toby1kenobi
Thanks Pablo, I actually found what the problem was eventually, I needed a Directory directive for the new directory in the Apache config. Toby Pablo Viojo wrote: > Try deleting the files in tmp/cache/* folders. > > Regards, > > Pablo Viojo > pvi...@gmail.com > http://pviojo.net > > ¿Que necesit

What's going on with www.cakephp.org?

2009-10-28 Thread jordicakephp
Hello everybody, it's 10:45 am in Barcelona, Spain. When trying to access the project's site, www.cakephp.org, I'm getting some very strange images! The site seems to be attacked or I don't understand the message that the project is trying to send us (it's Halloween and I'm a catalan guy ;-) Chee

Re: what is up with cakephp.org

2009-10-28 Thread Aurimas
http://mark-story.com/posts/view/happy-cakephp-halloween?utm_source=rss On Oct 28, 6:07 am, "Websta*" wrote: > halloween methinks. > > On Oct 28, 4:49 pm, Samuel DeVore wrote: > > > Did someone hack it? > > --~--~-~--~~~---~--~~ You received this message because

what do you mean by bake ?

2009-10-28 Thread www.landed.at
I thought at first bake was just a fancy name for serve, its not a great idea to introduce new terms if they are not required in a framework. Maybe there is a great reason... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: What the heck? CakePHP is dead?

2009-10-28 Thread Herberth Amaral
HAHA! Awesome! On Oct 28, 2:44 am, Marcelo Andrade wrote: > On Wed, Oct 28, 2009 at 12:07 AM, Dave wrote: > > > If you go tohttp://cakephp.org/the site is unavailable. > > Happy halloween! :-D > > http://cakephp.org > > -- > MARCELO DE F. ANDRADE > Belem, PA, Amazonia, Brazil > Linux User #2211

Re: HABTM and extra field

2009-10-28 Thread Sergio Silva
Product hasMany PackagesProduct Package hasMany PackagesProduct PackagesProduct hasOne Product PackagesProduct hasOne Package You can replace PackagesProduct with the semantic name you want, but you don't have to. ( Excuse my bad English! ) sersilva 2009/10/28 kicaj : > > Yes, but this exampl

Re: What the heck? CakePHP is dead?

2009-10-28 Thread Hols Kay
Holy crap! It's risen from the dead and now it craves fresh human BRAINS!! On Oct 28, 4:44 am, Marcelo Andrade wrote: > On Wed, Oct 28, 2009 at 12:07 AM, Dave wrote: > > > If you go tohttp://cakephp.org/the site is unavailable. > > Happy halloween! :-D > > http://cakephp.org > > -- > MARCELO DE

Re: Nested HABTM brainstorming / how to

2009-10-28 Thread r4zv4n
That's a good idea, thanks John ;) Now I just have to see how I integrate this in order to make it seamless for the user. Anyone else got a version of how they would do it? :) On Oct 28, 8:32 am, John Andersen wrote: > My guess: > > You want to define a package as a collection of products, eac