Re: MySQL Dump and Restore with Cake

2006-08-15 Thread Michael
why you need to do that? you can use phpmyadmin to restore the sql file, that's all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: HABTM save problem

2006-08-15 Thread ostronom
Thank you VERY much :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

Re: Cake 2.0 and object-based models

2006-08-15 Thread Stuart Miller
Sorry, I should have been more clear. I wasn't looking for how to do getAge(), but rather the best place to put such a method so that it would be available to views and such.I normally would put these type of methods in the value objects/transfer objects that I use to pass data between the model

Re: protecting methods in Othauth

2006-08-15 Thread CraZyLeGs
$othAuthRestrictions = array(show/8,show/9); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email

Re: Cake 2.0 and object-based models

2006-08-15 Thread nate
It's a method that's inherent to the model itself, and you don't need any data outside the model to determine it. But if you're trying to access it via the view, then you're doing something wrong. What you should be doing is using the controller to get the value and pass it to the view.

How add condition for associated model in findAll()

2006-08-15 Thread Michal Bilcik
Hello, I have 2 models connected with this associations: Waypoint belongsTo WaypointType WaypointType hasMany Waypoint I do this: $this-set('waypoint_types', $this-WaypointType-findAll()); It gives me all WaypointTypes with _all_ associated Waypoints. But I want obtain only associated

Re: MySQL Dump and Restore with Cake

2006-08-15 Thread Sonic Baker
Hi, I'd like to be able to unit test my code in it's own test database with limited test data. No data is supposed to persist between tests so I'd like to reset the test database to a known state between each test. I also export my schema as the structure changes between versions. In order to

Re: How add condition for associated model in findAll()

2006-08-15 Thread [EMAIL PROTECTED]
use bindModel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more

Re: How add condition for associated model in findAll()

2006-08-15 Thread Samuel DeVore
some examples can be found at http://cakebaker.wordpress.com/2006/02/22/new-feature-bindmodelunbindmodel/Sam Dps it a great feature, but if you find yourself using it all the time you might want to think about adding conditions to the model files them self and undoing the conditions when you do

need to use find() on complex relationship

2006-08-15 Thread chris
Hi all. First off, I am working on an app that has clients; clients have projects, projects have phases, and phases have pieces. A bland ER diagram would be: client --[ 1:N ]-- project project --[ 1:N ]-- phase phase --[ 1:N ]-- piece Obviously, each of the entities on the left side 'have many'

Re: need to use find() on complex relationship

2006-08-15 Thread DJ Spark
i *think* if you set the id of a MOdel, you can findAll the related Models $this-Client-id = 3; $this-Client-Project-findAll(); anyway, if you get the client using read() , find() or findAll() , you get an array with all the associated data. try this in your controller: $client =

Re: Problem witch model !

2006-08-15 Thread DJ Spark
is there a list of reserved words ? if not , i suggest making one to the 'naming conventions' area in the manual. going to add it in trac system spark On 8/14/06, nate [EMAIL PROTECTED] wrote: You can't have a model named File. It conflicts with Cake's internally File class. Bad idea,

Re: need to use find() on complex relationship

2006-08-15 Thread Jon Bennett
i *think* if you set the id of a MOdel, you can findAll the related Models $this-Client-id = 3; $this-Client-Project-findAll(); or you could get the record (project/phase/piece) and check that the id associated matches the current user, eg: $this-Phase-id = $id; $data = $this-Phase-read();

Re: View Caching IE Strict Mode

2006-08-15 Thread jaaaco
Hi Bakers, Andrew McCafferty wrote: I've noticed that when I turn on view caching the following string is appended to the rendered document above the DOCTYPE declaration: !--cachetime:2310440104-- This seems to cause IE6 to ignore the DOCTYPE and revert back to Quirks mode. Is this

Re: need to use find() on complex relationship

2006-08-15 Thread chris
Jon Bennett wrote: i *think* if you set the id of a MOdel, you can findAll the related Models $this-Client-id = 3; $this-Client-Project-findAll(); or you could get the record (project/phase/piece) and check that the id associated matches the current user, eg: $this-Phase-id = $id;

Re: need to use find() on complex relationship

2006-08-15 Thread Jon Bennett
$this-ScProject-id = 55; //doesnt matter what number i use $data = $this-ScProject-ScPhase-find(); debug($data); exit; that won't work as you're setting the ID of ScProject not ScPhase, you could do it two ways: 1. Automagically $this-ScProject-id = 55; //doesnt matter what number i use

What is the best ajax user login solution?

2006-08-15 Thread cyberlogi
Hi, i've been looking through the different resources off the cake website and around the web over the past week, and i haven't been able to find an elegant ajax user register. I just have 4 fields: email, username, password, confirm. Confirm is not in my data model which has given me some grief.

How to pass arguments to the index function of the controller?

2006-08-15 Thread Serge Stanarevic
Hi, This is my first post here (new in cakephp waters) I hope you won't mind it being a basic question. I have a need for the following setup site.com/team/some_name I have created a Teams controller and made a view function that handles data for the team view. The view function takes in

Re: What is the best ajax user login solution?

2006-08-15 Thread nate
Check out rdBloggery, that has an Ajax login for posting comments: http://cakeforge.org/projects/rdos/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: How to pass arguments to the index function of the controller?

2006-08-15 Thread nate
Try site.com/controller/index/team/some_name --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email

Re: How to pass arguments to the index function of the controller?

2006-08-15 Thread Jon Bennett
site.com/team/view/some_name I have tried with the index() function and making it index($some_name=) but that doesn't help me. I couldn't find anywhere in the documentation how to do this. Is there a way to do this without chaning the routes configuration? Any help would be welcome even if

Directory Structure with no hpptd.conf or mod_rewite

2006-08-15 Thread Daemon
Hi, I'm about to choose a PHP Framework and my options are very limited due to the environment I'm using, I am on Apache2, PHP5 in CGI mode and without mod_rewrite access. The admins are not willing to enable it and I cannot point my root to the webroot directory since the departmental site I'm

Re: Directory Structure with no hpptd.conf or mod_rewite

2006-08-15 Thread John David Anderson (_psychic_)
On Aug 15, 2006, at 2:01 PM, Daemon wrote: Hi, I'm about to choose a PHP Framework and my options are very limited due to the environment I'm using, I am on Apache2, PHP5 in CGI mode and without mod_rewrite access. The admins are not willing to enable it and I cannot point my root

Re: How to pass arguments to the index function of the controller?

2006-08-15 Thread Serge Stanarevic
Thanks, So it has to be done with routes. This is settled once and for all than :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: Directory Structure with no hpptd.conf or mod_rewite

2006-08-15 Thread Daemon
Using the latest stable build (1.1.7.3363) Here's what I have: /app/webroot/ - /www/account/project/ /app/ - /www/account/lib/app_project/ /cake/ - /www/account/lib/cake/ In /www/account/project/index.php I have changed to: if (!defined('ROOT')) { define('ROOT',

Re: Directory Structure with no hpptd.conf or mod_rewite

2006-08-15 Thread John David Anderson (_psychic_)
On Aug 15, 2006, at 2:37 PM, Daemon wrote:Fatal error: main() [function.require]: Failed opening required 'cake/bootstrap.php' (include_path='.:/usr/local/lib/php:/www/account/lib/cake:/www/account/lib/app_project/') in /www/account/project/index.php on line 89 Is the file located at

API documentation needs stylesheet change

2006-08-15 Thread [EMAIL PROTECTED]
At the present time, Cake web-based API documentation for classes is difficult to read, with no separation between classes above and below the desired one. Here is a simple solution to that annoying problem, along with a proposed solution. In api.css, please add the following lines:

Re: API documentation needs stylesheet change

2006-08-15 Thread [EMAIL PROTECTED]
In the prior message, I meant to write, with no visible separation between methods above and below the desired method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

Getting Cake to work without access to the apache config file

2006-08-15 Thread [EMAIL PROTECTED]
I have hosting at 1and1.com, so i dont have access to modify the DocumentRoot property. Is there any way i can get cake to work without having to use urls like mysite.com/cake/users ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Getting Cake to work without access to the apache config file

2006-08-15 Thread John David Anderson (_psychic_)
On Aug 15, 2006, at 3:42 PM, [EMAIL PROTECTED] wrote: I have hosting at 1and1.com, so i dont have access to modify the DocumentRoot property. Is there any way i can get cake to work without having to use urls like mysite.com/cake/users ? Check out the settings dealing with mod_rewrite

Re: Passing variables to views with Cajax

2006-08-15 Thread RosSoft
thanks for using cjs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

Re: Directory Structure with no hpptd.conf or mod_rewite

2006-08-15 Thread Daemon
Yes, it is along with: app_controller.php app_model.php basics.php bootstrap.php dispatcher.php and foud directories Running on: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7a mod_fastcgi/2.4.2 PHP/5.0.5 Thanks! John David Anderson (_psychic_) wrote: On Aug 15, 2006, at 2:37 PM, Daemon

More than one way to skin a concatenate... (generateList)

2006-08-15 Thread Mini Mouse
Hey folks, As a note, there are many solutions to a problem, and all of them are good ones, this is my approach to the problem of not being able to do something in cake. After banging my head in trying to get generateList to concatenate two fields (for the purpose of using the data in a

Re: API documentation needs stylesheet change

2006-08-15 Thread nate
We don't respond to requests or bugs posted here. You can open a ticket at https://trac.cakephp.org/ Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: API documentation needs stylesheet change

2006-08-15 Thread John Zimmerman [gmail]
Donehttps://trac.cakephp.org/ticket/1321On 8/15/06, nate [EMAIL PROTECTED] wrote:We don't respond to requests or bugs posted here.You can open a ticket at https://trac.cakephp.org/Thanks. --~--~-~--~~~---~--~~ You received this message because you are

Inflector bug or newbie mistake?

2006-08-15 Thread jbernat
I am baking my first Cake app, and I created a controller named address_controller.php for a table named addresses: ?php class AddressController extends AppController { var $name = 'Address'; //var $scaffold; } ? I created a model called address.php: ?php class Address extends

Re: Inflector bug or newbie mistake?

2006-08-15 Thread John Zimmerman [gmail]
Your controller needs to be plural.addresses_controller.phpclass AddressesController extends AppController{ var $name = Addresses;}On 8/15/06, jbernat [EMAIL PROTECTED] wrote: I am baking my first Cake app, and I created a controller namedaddress_controller.php for a table named

How to upload image? Please give me a example,thanks!

2006-08-15 Thread JitZhang
I try to you copy or move_uploaded_file ,but I faill! How to upload image? Please give me a example,thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: How to upload image? Please give me a example,thanks!

2006-08-15 Thread Mikee Freedom
hey dood, a FileHandler component has been written by Chris Partridge (thanks Chris) that might help you: http://cakeforge.org/snippet/browse.php?by=langlang=5 (id = 52) http://cakeforge.org/snippet/detail.php?type=snippetid=52 also, you might want to check out:

Framework panel discussion in Boston

2006-08-15 Thread nate
Hi all, If you're in the area, come check me out at BostonPHP: http://cake.insertdesignhere.com/posts/view/6 I'll be presenting CakePHP along side some other frameworks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Framework panel discussion in Boston

2006-08-15 Thread Samuel DeVore
other frameworks... there are other frameworks, dang it should of looked at those... ;) good luck and knock their socks off sam d On 8/15/06, nate [EMAIL PROTECTED] wrote: Hi all, If you're in the area, come check me out at BostonPHP: http://cake.insertdesignhere.com/posts/view/6 I'll

Re: How to upload image? Please give me a example,thanks!

2006-08-15 Thread JitZhang
thank you suggest,but not work! form enctype==multipart/form-data action=/edit/product/edit method=postinput type=hidden name=data[Product][product_id] value=3 id=ProductProductId /input type=hidden name=data[Product][company_id] value=1 id=ProductCompanyId / ... input type=file

Re: API documentation needs stylesheet change

2006-08-15 Thread [EMAIL PROTECTED]
Thank you for entering that ticket, John. I meant to write that you can see a sample of the improved appearance at http://jengels.maxsoft.com/test/ versus the existing page at http://api.cakephp.org/class_controller.html (The top of my sample page is not rendered correctly. I didn't bother

Re: More than one way to skin a concatenate... (generateList)

2006-08-15 Thread [EMAIL PROTECTED]
Mini, That's a great suggestion. I'm also using sql views (not to be confused with Cake views!) to make things easier in my project. Incidentally, I wonder if the use of Postgres could reduce the number of steps in that solution by means of triggers. I suspect a calculated field could be

Re: API documentation needs stylesheet change

2006-08-15 Thread John Zimmerman [gmail]
Gwoo updated the stylesheet already.http://api.cakephp.org/class_controller.htmlRefresh your the page if it doesn't show up.I marked it as trivial because it did not present a security concern or logical error in a code example that could lead to unworkable code (which can be very frustrating