Re: cakephp email component

2008-09-23 Thread base64
ok thanks all, finnaly i am using phpmailer to send email. On Mon, Sep 22, 2008 at 7:23 AM, RichardAtHome [EMAIL PROTECTED]wrote: I suspect you are trying to SMTP to gmail or something similar. CakePHP doesn't support the encyption required to connect to these types of SMTP server. The

Re: saveAll limited to one level deep ?

2008-09-23 Thread bMilesp
after extensive research, saveAll only supports one level deep. I agree that this would be agreat feature. On Sep 2, 6:11 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: No it doesn't. It explains exactly the basic functionality I know works. What I was interested in finding out was if there

Re: Design a Highly dynamic content home page

2008-09-23 Thread [EMAIL PROTECTED]
This kind of portal-page is one place where I have put requestAction to good use. In combination with caching, it works pretty well. The main benefit is that each independent module (mine are plugins) can internally decide what to render and show on the front-page. The front-page does not need to

cakephp project

2008-09-23 Thread Ranju
I want to projects on cakephp for devlopment.I If any requiremnt pls contact me my email id: [EMAIL PROTECTED] . thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email

Re: Model Design

2008-09-23 Thread [EMAIL PROTECTED]
You are right that you can't use User.id when querying Group. And looking at the sql for one of my HABTMs I see that they are indeed two separate queries. My suggestion from yesterday would not work anyway. If you want this the Cake way then I suggest you take a look at Containable behavior. It

Re: asking about Vertical database on CakePHP

2008-09-23 Thread Yodi Aditya
Many thanks, Joel. now i'm understand what cake's design for ... Great reference with magento. i have tried it before.. On Tue, Sep 23, 2008 at 4:09 AM, Joel Perras [EMAIL PROTECTED] wrote: I believe what you are referring to is the entity-attribute-value data model (sometimes referred to as

Re: saveAll() not inserting related id pt II

2008-09-23 Thread [EMAIL PROTECTED]
Thanks for bumping this, I never really got anywhere close to fixing this and went back to old loop method. I'll keep an eye on this now. On Sep 23, 6:53 am, trustfundbaby [EMAIL PROTECTED] wrote: Okay ... I'll do that. On Sep 22, 11:46 pm, teknoid [EMAIL PROTECTED] wrote: You might want

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread Bookrock
Thanks for your suggestions. Raw queries for multiplae datbase is working fine $this-query(select * from caketoodoo.tasks as t2, test.stores as t1 where t2.id = t1.id); But my database name is depends on user input. How can I set $useDbConfig variable value. Like I made a module Task and

Multi lingual label fieldname table

2008-09-23 Thread gunung pangrango
i'm newbie in cakephp and don't know how to create site has Multilingual label field name table..?? example i'm have blog table (id, 'name') but in display sometime i want display it as id and 'people name' sometime id and 'person name'.. and information about this data stored in database

Re: HtmlHelper::selectTag does not exist in CakePHP 1.2

2008-09-23 Thread Yuris
Thanks a lot :) On 19 sep, 16:07, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: In 1.2, allform/input related stuff has been moved to FormHelper: http://api.cakephp.org/class_form_helper.html I assume you need the select:

Re: asking about Vertical database on CakePHP

2008-09-23 Thread leberle
No, actually i cantbecause i confused vertical with horizontal :D Sorry for that. Well, after the smoke cleared, i must say: Sounds interesting :) On Sep 22, 9:42 pm, Yodi Aditya [EMAIL PROTECTED] wrote: Can you give some reason why vertical database is bad and horrible? This is one of

Re: How to update a model with save method?

2008-09-23 Thread [EMAIL PROTECTED]
I noticed something similar a few weeks ago, just out of the blue. I am not entirely sure what I did to fix it. It was either: -Going to the tried and tested first create(), then save($data). -Or my favorite enemy the cache needing to visit the trash-can. /Martin On Sep 23, 7:28 am, ORCC

To model or not to model

2008-09-23 Thread forrestgump
Hey guys, Considering the fact that CakePhp follows the MVC architecture, id like to know...y we dont make function calls such as $this- find(where id=xyz) from function blocks typed out in Models rather than controllersim sure there is a logical reason to it...but someone asked me this

Re: Setting up CakePHP for Reporting

2008-09-23 Thread [EMAIL PROTECTED]
Wayne has a point. You could do a bit more searching and come to possibly a few more concise questions. Me and a couple of other people has a thread going about this kind of thing just a few days ago. http://groups.google.com/group/cake-php/browse_thread/thread/4d3c6aac7cc6f831/b30a00a45111977d

Re: saveAll() not inserting related id pt II

2008-09-23 Thread trustfundbaby
So why does it work in PHP5 with myisam tables? On Sep 23, 4:34 am, Penfold [EMAIL PROTECTED] wrote: Hi, Your table needs to be innodb for the saveall function to work properly. as the auto insert id relies on transactions to work. On 23 Sep, 09:29, [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: saveAll() not inserting related id pt II

2008-09-23 Thread Penfold
Hi, Your table needs to be innodb for the saveall function to work properly. as the auto insert id relies on transactions to work. On 23 Sep, 09:29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for bumping this, I never really got anywhere close to fixing this and went back to old loop

Re: How to update a model with save method?

2008-09-23 Thread forrestgump
I had a similar problem ORCC...check if the table you are inserting your data into has the primary key properly set...it appears you are using TYPE INTmake sure that it is the primary and is on auto_increment u usuallyy get duplicate entry errors when its not on auto_increment...

cakephp application templates

2008-09-23 Thread forrestgump
Hey, I was wondering if anyones got any good sites for application templates for cakephp...like templates having pre-programmed login/ logout/sessions maintainancemenu creation role based management etc... Thanks, Forrestgump --~--~-~--~~~---~--~~ You

Re: To model or not to model

2008-09-23 Thread dr. Hannibal Lecter
Well, calling find() in a controller is not a violation, but not the best practice if overused. Of course, calling find() from a controller is the fastest way to get your data, but usually, the find() call has other stuff around it, stuff that might be common to each call. The idea is to make

Re: Join a table to Itself with a join table

2008-09-23 Thread Werner Petry Moraes
True but if I have employee Bob who is a supervisor. Bob supervises Tina, and Pete but Bob also has a supervisor, Sam. In this scenario wouldn't Bob have to exist in both the Employee and Supervisor tables? That would be duplicate data which is bad. Right, a supervisor may have a

Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread gabriel
Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages, for instance I want to redirect a page in straight PHP it would be ' header(Location: index.php); ' does any one know how to do this in CAKE ? --~--~-~--~~~---~--~~ You received

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread dr. Hannibal Lecter
Of course, why not :) http://api.cakephp.org/class_controller.html#903188d3de83bd65c78bb676f61b3039 On Sep 23, 2:00 pm, gabriel [EMAIL PROTECTED] wrote: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages, for instance I want to redirect a page in straight PHP it

Re: cakephp application templates

2008-09-23 Thread RichardAtHome
To be honest, you would be much better if you created your own. All the components are there already in Cake, you just have to learn how to glue them together. If you don't, you'll come unstuck when it comes to something a little more challenging. Happy Baking! On Sep 23, 11:24 am,

Re: To model or not to model

2008-09-23 Thread RichardAtHome
Also worth noting: A controller can have multiple Models. Which model would $this-find() use? On Sep 23, 12:28 pm, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Well, calling find() in a controller is not a violation, but not the best practice if overused. Of course, calling find() from a

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread Rick
As I said before I do NOT want to use raw queries. Seems like Cake is applying arbitrary limitations. Do any of the developers read these posts? Be nice to have an opinion from one or more cake developers. Rick On Sep 23, 3:00 am, Bookrock [EMAIL PROTECTED] wrote: Thanks for your

Re: asking about Vertical database on CakePHP

2008-09-23 Thread mark_story
As for an already built solution to EAV in cake take a look at http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3 Seems to fit the bill pretty closely, and you retain a fair bit of 'magic' -Mark On Sep 23, 3:50 am, leberle [EMAIL

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread [EMAIL PROTECTED]
To call it an arbitrary limitation is a bit harsh. Having Cake support queries and associations across multiple databases would be a cool feature but I struggle to find a very good reason for willingly design an application in this way. CakePHP was never designes to be compatible with any and all

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread Rick
Thanks for your response Martin. Maybe that was too harsh. Perhaps it was just that the developers never thought of an application spanning multiple databases. For a medium to large company it is common practice to seperate related data into different databases within the same db instance.

getting another model inside afterSave() cake 1.1

2008-09-23 Thread Mithu
I want to wirte a afterSave() function in app_controller so that afery every save operation for all models of the application, i can insert LAST_INSERTED id to another table, Is it possible with cake 1.1? function afterSave() { $this-AnotherModel-updateStatus($this-{$modelClass}); //

Re: How to update a model with save method?

2008-09-23 Thread techiguy
just drop ur table and re create it with id as a primary key with an auto_increment. On Sep 23, 2:37 pm, forrestgump [EMAIL PROTECTED] wrote: I had a similar problem ORCC...check if the table you are inserting your data into has the primary key properly set...it appears you are using TYPE

Re: PostgreSQL schema problems in code generator scripts

2008-09-23 Thread wyrdvans
I've also noticed a bunch of problems with PostgreSQL support in CakePHP. The best thing to do if you can't fix it is to open a trac ticket with as much relevant info as you can give them. Be sure to search first to see if a ticket is already open on the topic. As for the email group and IRC,

bigner for cake

2008-09-23 Thread akhilesh
http://localhost/myfirstcake/ this is my cake folder name -- i have set in httpd.conf both Apache mod_rewrite module is switched on AllowOverride is set to all temp dir is writable - table sturucture is CREATE

Re: saveAll() not inserting related id pt II

2008-09-23 Thread [EMAIL PROTECTED]
Well that explains my problem - many thanks. On Sep 23, 10:34 am, Penfold [EMAIL PROTECTED] wrote: Hi, Your table needs to be innodb for the saveall function to work properly. as the auto insert id relies on transactions to work. On 23 Sep, 09:29, [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: To model or not to model

2008-09-23 Thread techiguy
hi forrestgump, using $this-find() in controller doesn't voilate the MVC architecture even if you use $this-find('all') but i heared if you direct query in controller will violate the MVC rule i.e if you use $this-Model-query(select * from models); the above query will violate the MVC rule.

Storing InnoDB AUTO_INCREMENT values to a table

2008-09-23 Thread Mithu
I want to store AUTO_INCREMENT values of my application's innoDB tables into a table since auto increments are lossing mysql restart. Is there any shortcut way in cakePHP1.1 so that every inser operation will be logged as a table record? --~--~-~--~~~---~--~~ You

Re: Multi lingual label fieldname table

2008-09-23 Thread techiguy
i think ur question is not so clear in the above ur saying u have blog table(id,'name') and later u r showing the data stored in database?? id table_name field_namedisplay1 display2 1 blog name people name person name du hav

Re: bigner for cake

2008-09-23 Thread dr. Hannibal Lecter
Do you get an error message when you try to open that in your browser? Did you check your log files for any errors? On Sep 23, 1:31 pm, akhilesh [EMAIL PROTECTED] wrote: http://localhost/myfirstcake/ this is my cake folder name -- i have set in

Models Association - Paginator - Conditional View.

2008-09-23 Thread iGloo
Hi folks, I've looked around a lot but could'nt find an answer or example to what i am trying to do. I'm trying to create a message center where a user sends message to either 1 user or a group of user. so: User hasMany messages messages hasAndBelongsToMany User This would create the

Suggestion: Improving the cakephp homepage

2008-09-23 Thread toby78
Somehow I never seem to find the necessary information on the website. One example. I remembered there was some sort of Calendar for the date input. However I don't know how to do it. When I enter it on the search box on the top of the website, there are no results for Calendar. When I look on

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
Hi doc Thanks for the reply, but how do I redirect in a view which does not have a model or controller? On Tue, Sep 23, 2008 at 1:26 PM, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Of course, why not :) http://api.cakephp.org/class_controller.html#903188d3de83bd65c78bb676f61b3039 On Sep

Re: bigner for cake

2008-09-23 Thread Donkeybob
Have you tried creating a tasks folder under your view directory and put your index.ctp file in there?? On Sep 23, 10:30 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Do you get an error message when you try to open that in your browser? Did you check your log files for any errors? On

Re: getting error can't establish a connection to the server at localhost

2008-09-23 Thread Lance Willett
i copied a new app folder over the existing one and not i can't even see the cakePHP default screen harry, Make sure when you copy Cake directories around that you make sure hidden files are moved as well. A very common topic here is the issue where htaccess files don't get moved with their

Re: saveAll() not inserting related id pt II

2008-09-23 Thread teknoid
It may work, but it may not work correctly. MyIsam tables do not support transactions, so there is not point in doing saveAll() for multiple models. On Sep 23, 5:59 am, trustfundbaby [EMAIL PROTECTED] wrote: So why does it work in PHP5 with myisam tables? On Sep 23, 4:34 am, Penfold [EMAIL

Re: How to update a model with save method?

2008-09-23 Thread teknoid
Is your primary key field really named 'id' ... not 'ID' or something along those lines? That being said $this-Manufacturer-id = $id should work regardless of the primary key column name, since the $id property here simply refers to the key column and has nothing to do with the actual name. The

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread teknoid
You shouldn't do redirects in a view. Seems like an incorrect approach... and btw, you can always use header() if absolutely necessary (although it's probably not). On Sep 23, 10:53 am, Gabriel Kolbe [EMAIL PROTECTED] wrote: Hi doc Thanks for the reply, but how do I redirect in a view which

Different behavior of Model::create from prod to dev

2008-09-23 Thread Pixelastic
Hello, I have an issue with the Model::create method. I tried to do an update of an existing row in my DB by doing in my controller $this-myModel-create($this-data); and then $this- myModel-save(). $this-data contains the id of my entry, so it gets updated but every fields that were not in

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Michael
Gabriel, You can put the content of the page in views/pages. They will use the default layout. Your path would be whatever you define in routes.php. For example, Router::connect('/contact', array('controller' = 'pages', 'action' = 'display', 'contact')); In views/pages you would have a PHP

DatePicker / Calendar popup

2008-09-23 Thread toby78
The OvenCMS uses this line for a calendar popup: $form-input(Lawsuite/date_end, array(label = false, type = text, class = datepicker)); When I copy this into another project it does not work. Where is this plugin located or where is it supposed to be ? And how come a plugin can overwrite

Re: Different behavior of Model::create from prod to dev

2008-09-23 Thread Pixelastic
Ok, the answer of my question was in the question. Prior to MySQL 5.0.2, MySQL was putting default values itself, as I've just learned from there : http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html On 23 sep, 17:13, Pixelastic [EMAIL PROTECTED] wrote: Hello, I have an issue with

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread dr. Hannibal Lecter
Hi again, as teknoid said, don't redirect from a view. If you've come to a point where you redirect from a view, you should seriously reconsider you coding strategy. Views are supposed to display data, define the look of your app and input forms; but never handle any business or application

can't get installation to work

2008-09-23 Thread grimripper
Hi I've got Cake in Apache/htdocs/cake, and my app folder on another drive. I changed the ROOT and CAKE_CORE_INCLUDE_PATH in the file .../ cake/app/webroot/index.php. When I go to localhost/cake, it shows Cake's intro page, /cake/app shows the main page of my app, and /cake/ app/tests shows the

what does data logging means

2008-09-23 Thread harry
how can we catch the o/p of a query in a variable and log it --~--~-~--~~~---~--~~ 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

Re: How to update a model with save method?

2008-09-23 Thread ORCC
Thanks for all your answers. I found my error: I've overridden the exists method in my model for other uses. So, it seems that save method invokes the exists method to decide wheter call an INSERT or an UPDATE. I thought erroneuosly that save method only checked that the id attribute was set.

Validate Problem

2008-09-23 Thread [EMAIL PROTECTED]
Hi awesome Cake developers, Having a problem with validate in 1.2. Something in the last portion of this $validate definition is kicking out an error: var $validate = array( 'name' = array( 'alphaNumeric'=array(

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread ORCC
You can issue a header or any php function into the View, but it is not correct from the point of view of the MVC pattern, because it seems that you are putting application logic into the view. --~--~-~--~~~---~--~~ You received this message because you are

Cookie-write Bug

2008-09-23 Thread Sir Tabs
I think I stumbled across a bug when using the Cookie-write method. Inside a controller I need to keep track of a date, so one of my method sets the cookie variable like this: $this-Cookie-write('month', $month, false); $this-Cookie-write('year', $year, false);

Re: Suggestion: Improving the cakephp homepage

2008-09-23 Thread gremlin
There is nothing in the core having to do with a Calendar. That might explain why you failed to find one. More importantly, you seem to be under the impression that because you saw something somewhere having to do with a Calendar ( I assume you mean a javascript date picking widget ) referenced

Re: Simply aligning form-input fields and labels nicely....

2008-09-23 Thread gremlin
Toby - you seem to be using the google groups as a source for all your answers. Might I reccomend that you learn to use the api.cakephp.org pages and the book.cakephp.org pages as a reference before posting here? On Sep 22, 7:17 am, RichardAtHome [EMAIL PROTECTED] wrote: Note: div

Re: Cookie-write Bug

2008-09-23 Thread Sir Tabs
Well, 1/15 times the line of code gets executed. It could be an ajax bug, but I doubt it, since my initial call to display the page is not an ajax call. And after my first call I can inspect my cookies and the first variable to be written never gets set. On Sep 23, 11:39 am, Sir Tabs [EMAIL

Re: DatePicker / Calendar popup

2008-09-23 Thread mark_story
The datepicker class just adds a CSS class called datepicker. Look at the OvenCMS javascript to see how the datepicker is being added in. -Mark On Sep 23, 11:27 am, toby78 [EMAIL PROTECTED] wrote: The OvenCMS uses this line for a calendar popup: $form-input(Lawsuite/date_end, array(label =

Re: Model Design

2008-09-23 Thread aborjinos
thanks for your help martin, i change my query and I remove User models Left join associations and I add gid(group_id) to Session with the help of this I remove User models in my query I add $conditions['GroupPermission.group_id'] = (int)$this-Session- read('gid'); I remove

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
Hi, my situation is the following: // check if user is logged in... ? if ($session-check('Auth.User.id')) { ? do your thing ? } else { ? redirect page somewhere else ? } ? is is done in a view how, do you mean I have to check the login in the function in the controller ? Regards On Tue, Sep

Re: Containable: all + couple extras.

2008-09-23 Thread Brenton B
This isn't possible? Or just so obvious? On Sep 22, 8:31 pm, Brenton B [EMAIL PROTECTED] wrote: I'm using the Containable behavior ... I want to get a couple extra specific things off one of the associations, but still want to get all the others. Instead of having to relist everything, is

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
Sorry, just to add to the info below, the view DOES not have a controller or a model, not I don't want to place it in the app_controller, because some page accessable even if you are not logged in.. my problem is I am unexperienced and it is mega frastrating !! On Tue, Sep 23, 2008 at 7:09 PM,

Re: Containable: all + couple extras.

2008-09-23 Thread teknoid
You should be more specific as to what you are tying to do... get couple of things doesn't really explain the issue. On Sep 23, 2:12 pm, Brenton B [EMAIL PROTECTED] wrote: This isn't possible? Or just so obvious? On Sep 22, 8:31 pm, Brenton B [EMAIL PROTECTED] wrote: I'm using the

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
thanks On Tue, Sep 23, 2008 at 7:26 PM, teknoid [EMAIL PROTECTED] wrote: Again, this approach is not correct. Checking for user status, should always be done in the controller. Take a look at the auth component in the manual to see how you can restrict access to certain resources/pages.

Re: Validate Problem

2008-09-23 Thread teknoid
You've not specified a 'rule' for 'content'. ('required' is not a rule, really). could be: 'content'=array( 'rule='notEmpty', 'required'=true ) Double check in the manual to see what 'required' means On Sep 23, 1:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi awesome Cake

Re: Validate Problem

2008-09-23 Thread [EMAIL PROTECTED]
Cool, thanks teknoid. I was simply going through a tutorial in the Apress book Beginning CakePHP. . . maybe an errata in the book. Anyways, thanks. On Sep 23, 2:33 pm, teknoid [EMAIL PROTECTED] wrote: You've not specified a 'rule' for 'content'. ('required' is not a rule, really). could

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread teknoid
Again, this approach is not correct. Checking for user status, should always be done in the controller. Take a look at the auth component in the manual to see how you can restrict access to certain resources/pages. On Sep 23, 2:14 pm, Gabriel Kolbe [EMAIL PROTECTED] wrote: Sorry, just to add

Re: Containable: all + couple extras.

2008-09-23 Thread Brenton B
So I've got a User a User has a Profile, Addresses, Images, Webpages. When I do a simple `find()`, by default it'll get the first level. However, Webpages also has WebpageType. So my options are to either bump up the recursivity by 1, which will get the Addresses, but because of the

Re: DatePicker / Calendar popup

2008-09-23 Thread gremlin
I already answered your question Toby. The datepicker class is added to the date input element. That is all that cake has to do with it. After that it is purely javascript. The javascript is then using the classname to attach a behavior to the element. The javascript is not a part of the CakePHP

Re: Setting up CakePHP for Reporting

2008-09-23 Thread torbjorn
point well taken, I should not have past in all the vb code. But it could be of use for someone, as to research there is no open source out there that will do what my current spreadsheet is doing. So, my questions was directed towards CakePHP flexibility of being used for resoruce scheduling.

Re: Containable: all + couple extras.

2008-09-23 Thread teknoid
I could be mistaken, but I've not seen a 'catch all' argument for Containable. If you find that you always do the same 'contain' for User... i.e. 'contain'=array('Profile', 'Address', 'Images', 'Webpages'=array('WebpageType')); you could make the above array as a var $defaultContain in the User

Re: Returning false from beforeValidate wont abort save

2008-09-23 Thread gremlin
beforeValidate runs before validation, but doesn't actually prevent saving. If there is something you need to check that prevents saving a record, you should put the logic in beforeSave -Abba On Sep 21, 8:34 am, Novice Programmer [EMAIL PROTECTED] wrote: got that... Need to set soem field as

Re: Containable: all + couple extras.

2008-09-23 Thread Brenton B
That's not a bad idea. Would just really like to see something that adds onto it ... I'll probably just code something up. Thanks anyway. On Sep 23, 1:25 pm, teknoid [EMAIL PROTECTED] wrote: I could be mistaken, but I've not seen a 'catch all' argument for Containable. If you find that you

problem in auth component, please help

2008-09-23 Thread Golam Kibria
hello i have tried authcomponent but i dont know why it is not working for me. i have two controller Doctors and Patients. Login methods are in Doctors controller. After hit the login form, the login form reappears with no flash/auth message. Doctors Controller code var $name = 'Doctors';

HtmlHelper selectTag

2008-09-23 Thread slimcady
i’m trying to just create a “selected” option and currently this is what i have: $html-SelectTag(’Event/is_private’, array(”Y” = “Yes”, “N” = “No” ), array(”tabindex” = 4)); basically i just want the “Yes” option to be the default, and i can’t seem to wrap my mind around the idea of $optionAttr

image button coordinates are not sent with an ajax form

2008-09-23 Thread Mache
Hello, I'm trying to submit a form with and image button using the Ajax Helper. When I do it with a regular form, with a postback, I get the x and y coordinates of the place I clicked inside the button with: $this- params['form']['buttonName_x'] and $this-params['form'] ['buttonName_y']. When

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread [EMAIL PROTECTED]
Thanks for clarifying your application's context, Rick. I am more used the the kind of application where you decide to build a web-app and then create the database schema you need. When dealing with corporate databases I have previously either synchronized a subset of that data to a web database

how do i output results of my mysql query in error.log file

2008-09-23 Thread harry
the result is of a finder query. as follows class SearchesController extends AppController { var $name = 'Searches'; var $layout = 'home'; var $uses = array('User','Entity'); var $conditions = array();

Re: Setting up CakePHP for Reporting

2008-09-23 Thread Wayne Fay
As suggested by Martin, your current way of doing things in Excel may not be ideal. Rather than looking for a way to rebuild the current tool with CakePHP, perhaps you should open your mind a bit, close the Excel sheet, and think about a better way to build a similar tool that provides the same

Models: Why not more Object Oriented??

2008-09-23 Thread Brenton B
This one is a bit more for the dev team ... but since I doubt they read this much, wonder if anyone else wants to chime in ... One thing I'm struggling with is the lack of OOP on the part of the models after a find, especially for a list. Now, before I get flamed, let me explain what I mean. If

Re: Models: Why not more Object Oriented??

2008-09-23 Thread John David Anderson
On Sep 23, 2008, at 3:34 PM, Brenton B wrote: If anyone is still reading by this point (sorry it's so long), hopefully you can shed some light. PHP4 support. It's gotten us where we're at, and future versions of Cake will be PHP5-based and more OOP-friendly. -- John

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Brenton B
Hmmm ... never thought of backwards compatibility to PHP4 as a reason. I figured since PHP5 has been out for over 4 years (first beta was over 5 yrs ago) worrying about PHP4's support would've waned ... like, completely dropped off. So I'm guessing there must be some super fanciness in the Cake

Re: Models: Why not more Object Oriented??

2008-09-23 Thread John David Anderson
On Sep 23, 2008, at 3:52 PM, Brenton B wrote: Hmmm ... never thought of backwards compatibility to PHP4 as a reason. I figured since PHP5 has been out for over 4 years (first beta was over 5 yrs ago) worrying about PHP4's support would've waned ... like, completely dropped off. So I'm

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Nate
On Sep 23, 5:52 pm, Brenton B [EMAIL PROTECTED] wrote: Hmmm ... never thought of backwards compatibility to PHP4 as a reason. I figured since PHP5 has been out for over 4 years (first beta was over 5 yrs ago) worrying about PHP4's support would've waned ... like, completely dropped off. Yup,

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Brenton B
Heh, I figured there was some intricacies that I'd forgotten about ... it's been a long time since I touched PHP4. On Sep 23, 4:02 pm, John David Anderson [EMAIL PROTECTED] wrote: On Sep 23, 2008, at 3:52 PM, Brenton B wrote: Hmmm ... never thought of backwards compatibility to PHP4 as a

Re: Models: Why not more Object Oriented??

2008-09-23 Thread teknoid
To address your specific example, such functionality should be handled in models' afterFind(), where you can modify the returned data. Also, take a look at the Set class in cake's API for some powerful array manipulation tools. And as far as the array structure, it also depends on how deep your

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Brenton B
Even if `afterFind()` is used, I'd still be doing 1 more loop than I should need to. But thanks for the tip, it's all very useful. On Sep 23, 4:55 pm, teknoid [EMAIL PROTECTED] wrote: To address your specific example, such functionality should be handled in models' afterFind(), where you can

HttpSocket with proxy

2008-09-23 Thread Fahad
hi, i m working on a API service with cake. the project is heavily depended upon API calls. the server is located in Asia, and most of the time the HTTP request fails. is there any feature in HttpSocket class that will let me do the API calls via a proxy? thanks

display o/p of query in error.log file

2008-09-23 Thread harry
?php class SearchesController extends AppController { var $name = 'Searches'; var $layout = 'home'; var $uses = array('User','Entity'); var $fields = array(); var $conditions = array();

question about sha1 usage?

2008-09-23 Thread rocket
So I have validation code for my user password ($password) in my model to be 6-20 characters, but I am doing sha1($password) on my password before it gets passed into the $this-User-save() operation, so it always bypasses the validation requirement (since sha1 creates a really big string). How

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Jon Bennett
Even if `afterFind()` is used, I'd still be doing 1 more loop than I should need to. But thanks for the tip, it's all very useful. If you have logic that you need in the view, create a helper and add methods to it, like: // /app/helpers/ecom.php class EcomHelper extends Helper {

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Brenton B
This is all well and good, in this specific example ... but the underlying principle still exists: better OOP layout. On Sep 23, 5:32 pm, Jon Bennett [EMAIL PROTECTED] wrote: Even if `afterFind()` is used, I'd still be doing 1 more loop than I should need to. But thanks for the tip,

Re: question about sha1 usage?

2008-09-23 Thread Joel Perras
I'm guessing you're not using the Auth component ( http://book.cakephp.org/view/172/Authentication ) due to a legacy DB. In that case: http://book.cakephp.org/view/76/Callback-Methods#beforeSave-683 Also take a look at the core Security class: http://api.cakephp.org/class_security.html for

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Nate
Yah. We know. We'll get to it. On Sep 23, 7:39 pm, Brenton B [EMAIL PROTECTED] wrote: This is all well and good, in this specific example ... but the underlying principle still exists: better OOP layout. On Sep 23, 5:32 pm, Jon Bennett [EMAIL PROTECTED] wrote:  Even if `afterFind()` is

Re: question about sha1 usage?

2008-09-23 Thread Joel Perras
Oh, and I forgot to mention that you can actually integrate the Auth component into a pre-existing users table which used a custom hashing/ salting scheme: http://book.cakephp.org/view/566/Changing-Encryption-Type -J. On Sep 23, 7:42 pm, Joel Perras [EMAIL PROTECTED] wrote: I'm guessing you're

Re: Models: Why not more Object Oriented??

2008-09-23 Thread Brenton B
Sorry, not meaning to be annoying, just grasping for understanding. Thanks to all :) On Sep 23, 5:42 pm, Nate [EMAIL PROTECTED] wrote: Yah. We know. We'll get to it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

bulk load data into CakePHP?

2008-09-23 Thread Mike
Hello! I'm trying to load a bunch of rows into a table - on the order of 1,000 or so. This isn't huge, but I'm having problems when I try to do it using CakePHP. My basic approach is to upload a .CSV file, which i then pull apart, and use to repeatedly save() new rows into the appropriate

How to cache page with same controller/action, but different parameters.

2008-09-23 Thread aranworld
Is there a way to cache the following two pages so that the cached pages are different? http://www.cakephp.org/articles/index/18?year=2003 http://www.cakephp.org/articles/index/18?year=2007 The default behavior of the Cache helper seems to just make these two pages have the same content which

  1   2   >