Re: User Management\Login\Auth Framework

2008-02-07 Thread Mr-Yellow
Oh also a good idea to add HumanCheck or some kind of CAPTCHA on the forgotpassword and register pages (even if turned off by default you may need it later) -Ben On Feb 8, 4:10 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > DAuth (patch in forgotpassword etc) + Cake ACL (patch in multi-groups > or

Re: User Management\Login\Auth Framework

2008-02-07 Thread Mr-Yellow
DAuth (patch in forgotpassword etc) + Cake ACL (patch in multi-groups or whatever) Good start: http://www.realm3.com/articles/setting_up_user_groups_with_acl_and_auth_in_cakephp_1.2 -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: user authentication example...login redirects

2008-02-07 Thread manish
>From the first Error message It looks your Cache directory is not writable. and The third message regarding Cannot modify header information.. I Use Writing ob_start(); just next line to PHP start tags before starting my controller class and ob_clean(); just before my php end tags and after

Re: user authentication example...login redirects

2008-02-07 Thread polomasta
no luck yet, I tried this as well: $this->redirect(array('controller'=>'users','action'=>'login')); I'm also getting these things in the debug area... Warning (512): /var/www/html/bradsCakeApp/app/tmp/cache/ is not writable [CORE/cake/libs/cache/file.php, line 263] Notice (8): Use of undefine

Re: Dispatcher baseUrl method setting wrong webroot variable in CakePhp 1.2

2008-02-07 Thread nate
Look at dispatcher.test.php, line 1031. There's a whole set of tests dedicated to emulating different server environments in order to test the paths which the Dispatcher generates. Please add your settings to the list, along with the 'path' expected, and open a ticket with a diff of your changes

Model Association Query....stumped

2008-02-07 Thread EchoChargen
All - I've been using Mariano Iglesias Bindable behavior with 1.2 beta to nice effect, but I've run into a query I can't figure out. Here's what I have: Team hasMany Clip Team hasMany Site Site hasMany Clipranking A Site can play any of the Clips available in their Team in whatever ranked order

Re: user authentication example...login redirects

2008-02-07 Thread Siebren Bakker
try using the full path in the login redirect, i.e. $this->redirect('/users/login'); you also should add the 'true' tag, if you are using CakePHP1.2, to automatically call the exit() function after the redirect. i.e. $this->redirect('/users/login', true); Hope this helps! On Feb 7, 2008 5:43 PM,

Adding a radio groups destroys text input validation

2008-02-07 Thread Carl
I have a form with a text input field with validation code that works just fine... until I add a radio group to the form. Then if I enter invalid data the whole thing crashes without generating an error message (I have debug on). Is there a way to validate the radio group input? Is this a bug? --~

Re: Bug in $model->saveAll in 1.2

2008-02-07 Thread Joel
Use the newest SVN copy: svn co https://svn.cakephp.org/repo/trunk/cake/1.2.x.x /path/to/save On Feb 7, 5:00 pm, gerhardsletten <[EMAIL PROTECTED]> wrote: > Hi FL1 > > Where do i find the 6337 release? > And I can't see any //return true; in the model.php saveAll function > on line 1349. > > BTW

Re: ACL caching?

2008-02-07 Thread Mr-Yellow
Cake1.2 var $cacheQueries = true; In cake/libs/model/db_acl.php I thought the URL below was where I saw the docs say that it should be true for ACL (can't see that anymore), however when I set it to true the cache wasn't cleared when modifications were made as intended. http://api.cakephp.org/1

Re: new mssql driver

2008-02-07 Thread Dr. Tarique Sani
There will be a new version of mssql driver from Microsoft in a couple of weeks which will supercede the one you are using. If what i have heard is correct then there are several API changes as well. So if I were you I would wait a while - well in fact I am waiting ;) I too have a similar work in

Dispatcher baseUrl method setting wrong webroot variable in CakePhp 1.2

2008-02-07 Thread Gerardo Glez
I have recently change from version 1.19 to 1.2 and I start to have problems with routes. I note something odd when Cake thinks that my webroot directory is a controller. I have the following dir configuration (that works fine in cake 1.19) site-->www-->app-->myApp site->www-->cake site->www->we

user authentication example...login redirects

2008-02-07 Thread polomasta
i've been trying to implement that scattered examples of user registration/authentication systems and without much success. I know it's due to my lack of sKiLLz or whatever, but I could use some help. The code i have creates my user and puts it into the database just fine..but after that, nothing

Can A Permanent Place Be Found for the IBM Articles about CakePHP 1.1?

2008-02-07 Thread Dave Aiello
I was talking to Duane O'Brien today to try to find out what happened to the 1.1 version of the IBM articles. I started working through these articles but they all changed to 1.2 before I got through them. IMHO as long as 1.1 is the stable version, somebody needs to make the 1.1 version of the I

Configuration and usage of CakePHP with SQLite

2008-02-07 Thread Thomas
Hi folks, currently I am getting mad trying to bring CakePHP together with SQLite. Lets tell you my settings first: On a Windows system running Lighttpd with PHP 5.2.5 and unpacked cake_1.1.19.6305.tar.bz2. The php sqlite extension is uncommented and running. The default start website of CakePHP

new mssql driver

2008-02-07 Thread emrah
As you heard or not microsoft declared that, php will not be compatible with current mssql dlls. As a result they published a new dll called sqlsrv.dll for usage in 2008 versions. I tried to write the new driver of it for cake, I 'm able to overcome errors but it doesn't see my tables. you can fi

Re: Custom Component and Redirect problem

2008-02-07 Thread Kjell Bublitz
If you just wanna test if the timestamp is there, you can simply "exit" before doing the redirect(). You could just do this: pr($timeStamp); exit(); if you expect an array.. if you expect just a string exit($timeStamp); will do the same trick.. as an alternative to pr() which is just the print_r()

HABTM between models with different db configs

2008-02-07 Thread Troy Gilbert
I'm currently combining two web apps, both with their own databases (but located on the same server). One app is Pligg-based and handles user-authentication. The other app (mine) is CakePHP-based, and manages all of the "resources." I can create CakePHP models representing the user in Pligg's tab

Re: Custom Component and Redirect problem

2008-02-07 Thread Fran Iglesias
El 07/02/2008, a las 23:43, Micro escribió: > If I uncomment the $this->redirect(array('action'=>'index')), my > component works perfectly fine, and i don't get any error. I try to > comment out the component part, and it works fine. The problem only > occurs when I use my custom component an

Custom Component and Redirect problem

2008-02-07 Thread Micro
I am using CakePhp 1.2 So, I created a component called Date. I embedded in my class following the example. My controller class: class TradesController extends AppController { var $name = 'Trades'; var $components = array('Date'); var $helpers = array('Html', 'Form');

Re: Bug in $model->saveAll in 1.2

2008-02-07 Thread gerhardsletten
Hi FL1 Where do i find the 6337 release? And I can't see any //return true; in the model.php saveAll function on line 1349. BTW: Rgarg thanks for the tip! Gerhard On Feb 6, 3:49 pm, FL1 <[EMAIL PROTECTED]> wrote: > It's not returning true on success because the "return true;" was left > out in

Re: User Management\Login\Auth Framework

2008-02-07 Thread codecowboy
You might want to try this one by Mariano: It uses phpgacl which is a generic php acl app. http://dev.sypad.com/installing-phpgacl-plugin-cakephp Later, Codecowboy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: 1.2.x.x Autocomplete Ajax Helper not working

2008-02-07 Thread seedifferently
Dear group, I have fixed this by removing the "Security" component from my components list in the controller. Evidently the security component kills the ajax requests. Is this a bug or a feature? Thanks, Seth On Feb 6, 4:23 pm, seedifferently <[EMAIL PROTECTED]> wrote: > Hello group, > > I've

Re: SOLVED Re: cake is ignoring my hasMany/belongsTo (noob)

2008-02-07 Thread Samuel DeVore
On Feb 7, 2008 1:30 PM, sbeam <[EMAIL PROTECTED]> wrote: > > sorry folks I had model/project.php named as model/projects.php - I > finally realized Cake was ignoring the whole thing, without > complaining. So moral of the story - watch your cases and inflections! > just like ROR, figuring out what

Re: requestAction on crashes apache

2008-02-07 Thread AD7six
On Feb 7, 9:21 pm, majna <[EMAIL PROTECTED]> wrote: > There is no autoload for components, so requestAction is better for > maintenance. > (cached elements with requestAction). Don't know what that means but: Subjective your honor! :) --~--~-~--~~~---~--~~

Re: Beautiful URLs with tree behaviour

2008-02-07 Thread AD7six
On Feb 7, 9:29 pm, martinp <[EMAIL PROTECTED]> wrote: > Thanks AD for your ideas. > > My thinking is that if I store the whole slug in the slug field (ie > with the ancestors) then that will be a unique key to search for the > data from (I'll validate this to make sure it is). The typical probl

Re: Why forcing by default the primary key to be 'id'?

2008-02-07 Thread Baz
It can be whatever, but just like regular SQL, the user will need to manually keep track when inserting, etc. Search the Api for the Model Class. On Feb 7, 2008 2:18 PM, majna <[EMAIL PROTECTED]> wrote: > > Can primary key be id, but without auto_increment in 1.2? > > On 7 velj, 21:12, jakecake

SOLVED Re: cake is ignoring my hasMany/belongsTo (noob)

2008-02-07 Thread sbeam
sorry folks I had model/project.php named as model/projects.php - I finally realized Cake was ignoring the whole thing, without complaining. So moral of the story - watch your cases and inflections! just like ROR, figuring out what should be plural/singular or camelCase/under_score_separated is a

Re: Beautiful URLs with tree behaviour

2008-02-07 Thread martinp
Thanks AD for your ideas. My thinking is that if I store the whole slug in the slug field (ie with the ancestors) then that will be a unique key to search for the data from (I'll validate this to make sure it is). I guess I'll also have to handle the fact that the user may change their location s

Re: Programmatically creating/saving HABTM

2008-02-07 Thread macasek
Great that was it, thanks After I updated another issue popped up related to using variables declared with define(). Was something done in the latest cakePHP to cause a problem with these defined vars? I am using phpCAS which is riddled with those types of declarations. Thanks again!! Micha

Re: requestAction on crashes apache

2008-02-07 Thread majna
There is no autoload for components, so requestAction is better for maintenance. (cached elements with requestAction). On 7 velj, 21:10, AD7six <[EMAIL PROTECTED]> wrote: > On Feb 7, 5:35 pm, benniog <[EMAIL PROTECTED]> wrote: > > > Thanks for the replies... > > I am trying to get dynamic content

Re: Why forcing by default the primary key to be 'id'?

2008-02-07 Thread majna
Can primary key be id, but without auto_increment in 1.2? On 7 velj, 21:12, jakecake <[EMAIL PROTECTED]> wrote: > > Some things are simply more practical. You need certain conventions or there > > would be a gazillion configurations that need to be set before you can > > start. > > However it see

Re: Associating data with a HABTM join?

2008-02-07 Thread [EMAIL PROTECTED]
Make a model for your join table (ProductCustomers / whatever) In the habtm, use the 'with' index to specify this model. This only works in recent versions of 1.2 though, can't remember which revision it actually came out in. simon --~--~-~--~~~---~--~~ You rece

Re: Why forcing by default the primary key to be 'id'?

2008-02-07 Thread jakecake
> Some things are simply more practical. You need certain conventions or there > would be a gazillion configurations that need to be set before you can > start. However it seems that most of the conventions can be overridden by configuration, so that odd situations can be managed. Jake --~--~--

Re: requestAction on crashes apache

2008-02-07 Thread AD7six
On Feb 7, 5:35 pm, benniog <[EMAIL PROTECTED]> wrote: > Thanks for the replies... > I am trying to get dynamic content into the default layout (a side bar > containing latest news items).. thats why I can only think of using > requestAction... does that make more sense? See the frequent discuss

Associating data with a HABTM join?

2008-02-07 Thread Bradley Fellows
I am working with a HABTM join as follows: Customer <--HABTM--> Product I want to take this one step further and associate a discount % with each join - ie each Customer -> Product relationship has a specific discount. The goal is so that CustomerA and CustomerB could both have the "Rubber Ducki

cake is ignoring my hasMany/belongsTo (noob)

2008-02-07 Thread sbeam
I am starting out with Cake after messing with RoR for a while. I jumped right in with a project where 'ArtWorks' are organized into 'Projects'. I wrote it all thusly: === class Project extends AppModel { var $hasMany = array('PubWorks' => array('className'

Re: Beautiful URLs with tree behaviour

2008-02-07 Thread AD7six
On Feb 7, 8:34 pm, martinp <[EMAIL PROTECTED]> wrote: > I should maybe also add that I'm trying to also implement the > Translate Behaviour with this and the slug field would be hopefully be > translatable as well, so it has to read from the i18n table. I would recommend using urls of the form

Re: CakePHP guide

2008-02-07 Thread Rajesh
Thanks John for the reply. I really look forward to the new wiki-like application. - Rajesh --~--~-~--~~~---~--~~ 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: CakePHP guide

2008-02-07 Thread John David Anderson (_psychic_)
Rajesh, The new application is very wiki-like. It allows easy contributions (hopefully). It's different in that it has more structure (data is in tree form) and there's an approval/revision process built in. We hope it'll make things easier - hopefully we can have something to show really

Re: Why forcing by default the primary key to be 'id'?

2008-02-07 Thread Baz
I'm not sure that a lot of people really understand what's going on behind the scenes here. You are writing code that writes code. Some things are simply more practical. You need certain conventions or there would be a gazillion configurations that need to be set before you can start. S

Re: CakePHP guide

2008-02-07 Thread Rajesh
I ever think that you understood what i wrote. i just tried to explain what would ease the pressure on you guys. If there was a discussion previously on wiki, you could have just said "NO for a wiki" or "Its on the way" but not they way you had said. I just started cakePHP for about 4 months now

Re: form error detection (1.2)

2008-02-07 Thread Baz
$form->error(, array('div' => 'classForDiv', 'id' => 'id for field')); This would give you a wrapping div and/id and id on the field. or: FormHelper::isFieldError (...) returns true on error in field. On Feb 7, 2008 1:24 PM, <[EMAIL PROTECTED]> wrote: > > The problem is more cosmetic whe

Re: Beautiful URLs with tree behaviour

2008-02-07 Thread martinp
I should maybe also add that I'm trying to also implement the Translate Behaviour with this and the slug field would be hopefully be translatable as well, so it has to read from the i18n table. I'm thinking that maybe I have to store the entire URL in the slug field - eg 'common-expressions/greet

Re: form error detection (1.2)

2008-02-07 Thread tom
The problem is more cosmetic where I have a line box around the errors. I need to be able to detect errors before I use form->error() otherwise I have a visible box with no content. I am hoping I missed something in API doc that behave like the old HtmlHelper::validateErrors. --~--~-~--~--

Re: CakePHP guide

2008-02-07 Thread Baz
Ok ok ok, enough of all this talk Pointing fingers is going to help. I gather that people are busy, due to CakeFest etc. But when that's done, I'm expecting someone to send me a link or something telling me where to go to sign up for stuff. Because I've heard tons of complaints about nobody

Re: form error detection (1.2)

2008-02-07 Thread Baz
echo $form->error(...) only returns something if there's an errorNo need to wrap in a condition. On Feb 7, 2008 12:23 PM, <[EMAIL PROTECTED]> wrote: > > Hi, > > I am looking for means to detect if any errors exist in a form and > then wrap my errors in a div. The deprecated > HtmlHelper::val

Re: CakePHP guide

2008-02-07 Thread Chris Hartjes
On Feb 7, 2008 1:03 PM, Rajesh <[EMAIL PROTECTED]> wrote: > > Just a suggestion, why not open up a WIKI where everyone can > contribute and have a set of people as Moderators, that way sending > emails back and forth for documentation would reduce and also that > would ease the load on the people

Re: CakePHP guide

2008-02-07 Thread Dardo Sordi Bogado
I like that one. On Feb 7, 2008 4:03 PM, Rajesh <[EMAIL PROTECTED]> wrote: > > Just a suggestion, why not open up a WIKI where everyone can > contribute and have a set of people as Moderators, that way sending > emails back and forth for documentation would reduce and also that > would ease the l

form error detection (1.2)

2008-02-07 Thread tom
Hi, I am looking for means to detect if any errors exist in a form and then wrap my errors in a div. The deprecated HtmlHelper::validateErrors would work by returning an error count but according to API doc form->errors should now be used. The problem is that this method appears not to currently

Beautiful URLs with tree behaviour

2008-02-07 Thread martinp
I'm getting to grips with the Tree behaviour in 1.2, but what I really want to be able to do is have sections and sub-sections in my URLs as required. For example, if my page, "hello", had a parent, "greetings", which in turn had a parent, "common-expressions", I'd like my URL to be /common- expr

Re: CakePHP guide

2008-02-07 Thread Rajesh
Just a suggestion, why not open up a WIKI where everyone can contribute and have a set of people as Moderators, that way sending emails back and forth for documentation would reduce and also that would ease the load on the people writing the current documentation. -Rajesh --~--~-~--~~

Re: $belongsTo Inserts Line

2008-02-07 Thread Mark
Thanks to anyone who has any insight. m On Feb 6, 10:06 pm, Mark <[EMAIL PROTECTED]> wrote: > Hi everyone: > > I have a model that is inserting a blank like at the top of the > produced page. I've tracked the problem to the $belongsTo variable. If > I take $belongsTo out of the model I don't get

Re: Problem with new feature to create List

2008-02-07 Thread Baz
You'd do that in your view: $form->input('article', array('empty' => true)); or $form->input('article', array('empty' => 'Please select an article')); On Feb 7, 2008 9:29 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I migrated to cake 1.2 and i have a little problem with the new list >

Re: CakePHP guide

2008-02-07 Thread John David Anderson (_psychic_)
On Feb 7, 2008, at 6:17 AM, MonkeyGirl wrote: > > find a better way of doing something and I'll update my guide to do it > that way instead." > > If I was writing official documentation, I'd feel like I was saying > "this is how it's *supposed* to be done, how it *should* be done." I > don't f

Re: Programmatically creating/saving HABTM

2008-02-07 Thread jakecake
That's a known bug : http://groups.google.com/group/cake-php/browse_thread/thread/2ad48c4e10f58fc0/c7c4511051071b52 Try to update to a recent version of cake. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: requestAction on crashes apache

2008-02-07 Thread benniog
Thanks for the replies... I am trying to get dynamic content into the default layout (a side bar containing latest news items).. thats why I can only think of using requestAction... does that make more sense? Thanks Gary On Feb 7, 4:28 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Feb 7, 2

Re: Problem merging arrays. String-keys are cast as numners.

2008-02-07 Thread [EMAIL PROTECTED]
That looks like exactly what I am looking for. Thanks a lot! On Feb 7, 5:17 pm, Claudia <[EMAIL PROTECTED]> wrote: > I am not sure whether this will bring the desired result but have a > look at the union > operatorhttp://lu.php.net/manual/en/language.operators.array.php > > Good luck > > Claud

Re: requestAction on crashes apache

2008-02-07 Thread Samuel DeVore
apache crashes how? out of memory, what? how do you expect someone to help you with so little information. returning a lot of stuff or a little, what's in the logs, want some love, show a little effort Can't help with nothing in the way of information here. Hey my car won't start... help

Re: requestAction on crashes apache

2008-02-07 Thread Chris Hartjes
On Feb 7, 2008 11:16 AM, benniog <[EMAIL PROTECTED]> wrote: > > Whats the alternative? > I need to get data from the DB and i cant think of any other way to do > it... Um, what's wrong with using the existing methods in a model or creating custom methods in your model to return the data in the fo

Re: Validate one or two fields?

2008-02-07 Thread Siebren Bakker
I don't actually need to compare the information with that from the database, I just need to validate the data in the fields, preferably using the $validate array present in my User Model, in order to make sure that it is valid data for those fields, without having to add validation data to the co

Programmatically creating/saving HABTM

2008-02-07 Thread macasek
Hello All!! Before posting this I searched around this group, the cake manual, and api but was unable to find any information related to my problem. I am hoping someone here knows of a solution or can point me to information related to what I am trying to do. I have the need to programmatically

Problem with new feature to create List

2008-02-07 Thread [EMAIL PROTECTED]
I migrated to cake 1.2 and i have a little problem with the new list creation. Before, that was easy to let a blank element il front of the list. But now, with this code: $articles = $this->Article->find("all", array('fields' => array('Article.id','Article.titre') )); $result = Set::combine($arti

Re: find(all) and preppend a third value using Combine

2008-02-07 Thread Josoroma
Thank you. $cities = $this->City->find('all', array('fields' => array('City.id', 'City.name', 'Country.iso2', 'Country.name'), 'order'=>'City.country_id ASC')); $citiesCombine = Set::combine($cities, '{n}.City.id', array('%s - %s', '{n}.Country.iso2', '{n}.City.name'), '{n}.Country.name'); $th

Re: Problem merging arrays. String-keys are cast as numners.

2008-02-07 Thread Claudia
I am not sure whether this will bring the desired result but have a look at the union operator http://lu.php.net/manual/en/language.operators.array.php Good luck Claudia On Feb 7, 4:07 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > This is not strictly a CakePHP question but I hope that i

Re: requestAction on crashes apache

2008-02-07 Thread benniog
Whats the alternative? I need to get data from the DB and i cant think of any other way to do it... On Feb 7, 4:12 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Feb 7, 4:22 pm, benniog <[EMAIL PROTECTED]> wrote: > > > Hi, > > I'm a cake newbie writing my first app... > > However, I have a problem th

Re: requestAction on crashes apache

2008-02-07 Thread AD7six
On Feb 7, 4:22 pm, benniog <[EMAIL PROTECTED]> wrote: > Hi, > I'm a cake newbie writing my first app... > However, I have a problem that whenever I use requestAction ie. > $this->requestAction("profiles/index"); Apache crashes !!! I'm not using > > Zend optimizer which seems to have cause simil

requestAction on crashes apache

2008-02-07 Thread benniog
Hi, I'm a cake newbie writing my first app... However, I have a problem that whenever I use requestAction ie. $this- >requestAction("profiles/index"); Apache crashes !!! I'm not using Zend optimizer which seems to have cause similar problems in the past, so i'm a little stuck !!! As anyone any su

Re: Fatal error: Call to a member function schema() on a non-object

2008-02-07 Thread aaron bauman
fixed! - this may have been overkill, but i added defined var $uses = array(...) where "..." included all of the associated model classnames. On Feb 7, 10:42 am, aaron bauman <[EMAIL PROTECTED]> wrote: > I am hitting the same snag with a class called "Filter" with belongsTo > and habtm assoc's

Re: Fatal error: Call to a member function schema() on a non-object

2008-02-07 Thread aaron bauman
I am hitting the same snag with a class called "Filter" with belongsTo and habtm assoc's. Is filter also a class already? On Feb 2, 4:17 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Feb 2, 4:22 pm, "Doug @ Straw Dogs" <[EMAIL PROTECTED]> wrote: > > > I'm having loads of problems using bake in 1.2

Re: cake PHP installation problem

2008-02-07 Thread Samuel DeVore
see my sig On Feb 7, 2008 2:03 AM, Rgarg <[EMAIL PROTECTED]> wrote: > > Hi > > i am trying to cake php folder(cake_1.1.19.6305) on our server(eg > server.com). > > i have created model(product.php), views(view/products/index.thtml) > and controller(product_controller.php) > > everything w

Problem merging arrays. String-keys are cast as numners.

2008-02-07 Thread [EMAIL PROTECTED]
This is not strictly a CakePHP question but I hope that is OK. I am trying to merge two arrays. One containing dummy-data for each hour of the day, the other containing actual data extracted from a model for only some hours. All keys are strings but keys that looks like nice integers to php gets

Re: Inner Join on hasMany

2008-02-07 Thread AD7six
On Feb 7, 2:44 pm, Baz <[EMAIL PROTECTED]> wrote: > Hey AD7six, > > This sounds promising, but I'm unsure how to implement in my case. > >1. What would I use as the 'join table' since I have a Has Many and a >Belongs To? > > ThanX in advance. $this->bindModel(array('hasOne' => 'Dummy' =

Re: find(all) and preppend a third value using Combine

2008-02-07 Thread AD7six
On Feb 7, 2:06 pm, Josoroma <[EMAIL PROTECTED]> wrote: > Im trying to generate a select list, but before the value Citiy.name i > need to add Country.name like: > > Costa Rica - Heredia > EEUU - New York > > $cities = $this->City->find('all', array('fields' => array('City.id', > 'City.name', 'Co

Re: Inner Join on hasMany

2008-02-07 Thread Baz
Hey AD7six, This sounds promising, but I'm unsure how to implement in my case. 1. What would I use as the 'join table' since I have a Has Many and a Belongs To? ThanX in advance. On Feb 7, 2008 3:50 AM, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Feb 7, 7:03 am, Baz L <[EMAIL PROTECTED

Re: find(all) and preppend a third value using Combine

2008-02-07 Thread grigri
Sorry, bit of a typo there - where I've got '{n}.Country.name', '{n}.Country.name' [several times] It should of course be '{n}.Country.name', '{n}.City.name' On Feb 7, 1:34 pm, grigri <[EMAIL PROTECTED]> wrote: > To do exactly what you want: > > $citiesCombine = Set::combine($cities, '{n}.City

Re: find(all) and preppend a third value using Combine

2008-02-07 Thread grigri
To do exactly what you want: $citiesCombine = Set::combine($cities, '{n}.City.id', array('%s - %s', '{n}.Country.name', '{n}.Country.name')); But wouldn't you be better off generating option groups based on the country? That's easy too: $citiesCombine = Set::combine($cities, '{n}.City.id', '{n}

Re: CakePHP guide

2008-02-07 Thread MonkeyGirl
> By the way, I am Japanese. I think Japanese developers want to read > documents in Japanese. So I want to translate your guide into Japanese. > Can I do that? The way I understand the hacker spirit, everybody's free to share and build upon everyone else's work, which is what makes free software

Re: cakephp 1.2 pdfb helper

2008-02-07 Thread Matias Lespiau
Andrés, With the information you are giving us there is little we can do to help you. Also, you didn't asked a question. Are you looking for another PDF solution? What does broken PDF means? Why don't you post the code of you controller/view? Cheers, On Feb 7, 2008 11:07 AM, Andrés Otárola <[EM

Re: Problem select

2008-02-07 Thread Reny
Hi grigri, can you tell me what options I must use to remove optgroup from my select? ìWhat you suggest not work for me, I think that the problem is in which way I format my selct box. thanks --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: CakePHP guide

2008-02-07 Thread MonkeyGirl
On Feb 6, 5:03 pm, Baz <[EMAIL PROTECTED]> wrote: > I'm never sure whether I'm doing things the "right" way. To be > honest, all this MVC stuff was brand new to me by the time I started. This > is why I've been hesitant to submit articles to the bakery, for example. > Since a lot of my stuff, can

cakephp 1.2 pdfb helper

2008-02-07 Thread Andrés Otárola
Hi people! I've been having trouble using the library pdfb as a helper, even following the guide http://bakery.cakephp.org/articles/view/barcode-with-cake ( well, that's for 1.1 anyways...) ...the result is a broken pdf document any help would be appreciated... --~--~-~--~~--

find(all) and preppend a third value using Combine

2008-02-07 Thread Josoroma
Im trying to generate a select list, but before the value Citiy.name i need to add Country.name like: Costa Rica - Heredia EEUU - New York $cities = $this->City->find('all', array('fields' => array('City.id', 'City.name', 'Country.name'), 'order'=>'City.country_id ASC')); My question is, how ca

Re: CakePHP guide

2008-02-07 Thread dr. Hannibal Lecter
> Settle down - I think you've completely over-reacted. Nate's comment > wasn't a flame, but yours was. While Nate's opinion might be correct here (up to a point), it is obvious that his people skills are not his forte.. This is not a flame, it is just an opinion. No hard feelings towards Nate,

Re: Problem select

2008-02-07 Thread grigri
Try : $this->set('regioni', $this->Provincia->Regione->find("list", array("fields"=>array("Regione.idregioni","Regione.nome"; On Feb 7, 12:14 pm, Reny <[EMAIL PROTECTED]> wrote: > On 7 Feb, 12:46, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > > > Try a pr($regioni) and see what you get,

Re: Why forcing by default the primary key to be 'id'?

2008-02-07 Thread RichardAtHome
I doubt the naming of any keys would have any effect on database performance. CakePHP is flexible enough to allow you to use any primary key name in your tables, but if you use the recommended format you will find that cake does a lot more automatically. See Model::primaryKey ( http://api.cakep

Re: Problem select

2008-02-07 Thread Reny
On 7 Feb, 12:46, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > Try a pr($regioni) and see what you get, if it isn't something like > array( 1 => "PIEMONTE", 2 => "..." ) then that is your problem. in my first select I load all italian regions in my db, the controller method in my provincia c

ACL caching?

2008-02-07 Thread thomas
Hey folks, I'm wondering if its possible to enable caching for the ACLs somewhere globally? >From reading the tickets it was explicitly disabled because of it going wrong with adding/updating permissions. But I'm in a mostly read environment and the lots of queries just hurts ;). So, is there an

Why forcing by default the primary key to be 'id'?

2008-02-07 Thread Guillaume Chomat
Hi everyone, I'm little newby in cake so perhaps it would be simple to answer to my concerns. According to my knowledge a natural join is better when the two joined fields have the same name. In the cake policy the primary key and referenced one have different name: 'id' and '_id. Is the performa

Re: Problem select

2008-02-07 Thread Dardo Sordi Bogado
Try a pr($regioni) and see what you get, if it isn't something like array( 1 => "PIEMONTE", 2 => "..." ) then that is your problem. On Feb 7, 2008 8:47 AM, Reny <[EMAIL PROTECTED]> wrote: > > Hi all, > I have problem with select form helper > > I populate the select in this way > > echo $form->se

Re: HABTM filtering with indirect model relationship

2008-02-07 Thread Dardo Sordi Bogado
Use a custom query, search this group or read Frequent Discussions page. On Feb 7, 2008 1:51 AM, patcoll <[EMAIL PROTECTED]> wrote: > > I have the following model structure set up: > > Model1 -hasOne- Model2 -hasAndBelongsToMany- Model3 > > I'm trying to run a paginate() call on Model1 (in Model1

Re: bake

2008-02-07 Thread Dardo Sordi Bogado
I think this is what you need: http://www.ad7six.com/MiBlog/CustomBakeTemplates - Dardo Sordi. PD: AD7six you are my hero, thanks for fixing #4000. On Feb 7, 2008 9:25 AM, zeugme <[EMAIL PROTECTED]> wrote: > > Thanks, I'll have a look. > > Why not reusing scaffold templates ? > Bake could be s

Re: Just a dumb question

2008-02-07 Thread leo
Thanks, Grigri. I nearly bought a GriGri once but found them a little awkward to use. L On Feb 7, 12:11 pm, grigri <[EMAIL PROTECTED]> wrote: > In HTML, newlines are counted as spaces, and multiple consecutive > spaces are displayed as one single space, unless the content is inside > a element.

Re: turn off certain associations for a model

2008-02-07 Thread Dardo Sordi Bogado
Also note that is Mariano, not Martin. On Feb 6, 2008 9:06 PM, Baz <[EMAIL PROTECTED]> wrote: > Well it depends... > > If you only want to turn OFF a few, unbind() is fine. The bindable behavior > really shines when you only want to ADD a few... > > > > On Feb 6, 2008 4:20 PM, Robby Anderson <[EM

Re: bake

2008-02-07 Thread zeugme
Thanks, I'll have a look. Why not reusing scaffold templates ? Bake could be seen as a static scaffold, isn't it ? So saving the result of a scaffold template could be the bake result. Doing so will : * merge that part * make bake as flexible as scaffold I'm not sure ... I'll read that code, try

Re: Multiple Schemas in PostgreSQL

2008-02-07 Thread Prozac
Thanks for the answer. i was thinking that would be my last hope, to write custom queries for those models. But I think i found a way around this issue playing around with the dbo_postgre file, so far, i havent had any troubles, but i think it wont work if you have tables with the same name in se

Re: Just a dumb question

2008-02-07 Thread grigri
In HTML, newlines are counted as spaces, and multiple consecutive spaces are displayed as one single space, unless the content is inside a element. In plain old php, the way to properly display print_r (in HTML) is this: ' . htmlentities(print_r($variable, true)) . ''; ?> var_dump doesn't have

Re: Inner Join on hasMany

2008-02-07 Thread Dardo Sordi Bogado
http://groups.google.com/group/cake-php/browse_thread/thread/9f092441185a5b72/f32a7b86bc9ec5d1?lnk=gst&q=%22inner+join%22#f32a7b86bc9ec5d1[[BR On Feb 7, 2008 8:00 AM, grigri <[EMAIL PROTECTED]> wrote: > > The easiest way to simulate an INNER join from a LEFT is to impose a > not-null condition on

Just a dumb question

2008-02-07 Thread leo
Does anybody know why my var_dump.s and print_r.s all display without format? Could it be a browser config? It all just appears as one continuous string. This isn't just cake, it's plain old PHP too. It's something I've been meaning to investigate for years, but never got around to doing so. --~

Problem select

2008-02-07 Thread Reny
Hi all, I have problem with select form helper I populate the select in this way echo $form->select('Regione.idregioni', array('options'=>$regioni), null, array('id' => 'regioni'),false); $options was populate from controller this is the generate code 1 PIEMONTE 1) I want no optgroup in

  1   2   >