Re: Cannot use Model only for Validation (no table behind) $useTable = false;

2006-08-17 Thread [EMAIL PROTECTED]
if i use $useTable = null; it throws me this error: No Database table for model Sms (expected sms), create it first. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: Notice: Only variable references .. in adodb-mysql.inc.php on line 75

2006-08-17 Thread Voodoo
Probelm fixed! Some how extra characters were at the end of the file that was causing problem --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: MySQL Dump and Restore with Cake

2006-08-17 Thread Timo Derstappen
I had a look at this before but didn't want to get into it yet until I have do my first release. Then I might use it for migrations. I never thought of it for testing though. thinking of automatic deployment it is much worth to even create your very first database tables with migrations.

Re: Optimizing cake projects

2006-08-17 Thread [EMAIL PROTECTED]
you can use cake:nocache?php echo $myDynamicContent; ?/cake:nocache to cache static par of your view --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

set function

2006-08-17 Thread [EMAIL PROTECTED]
Hi, I have problem regarding the set function. following code in user_controller.php class UsersController extends AppController { function user { $this-set('var','this user fun'); }

How to use caching of views in multilinguaal sites?

2006-08-17 Thread mouth
Hi all, view caching is fine, but thing I'm really missing is something like $cache_id in Smarty template engine world. If I understand CakePHP's caching well, it is URL-based, so correct me, please: if I want to use caching of views and want to have as many caches for one view as I have

Re: Optimizing cake projects

2006-08-17 Thread sicapitan
really? are there a list of cake:commands ? --~--~-~--~~~---~--~~ 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: set function

2006-08-17 Thread sicapitan
if you had add.thtml your variable will be available when /add/ is called. if you set both variables under user() { } they will both be available in user.thtml. hope this helps --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: How to use caching of views in multilinguaal sites?

2006-08-17 Thread sicapitan
Hmm I have a multilingual site, and cacheing is enabled, but I never really checked if the pages are cached. Each page is rendered so i guess its caching as normal :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Optimizing cake projects

2006-08-17 Thread [EMAIL PROTECTED]
I don't know, I read it in the manual at http://manual.cakephp.org/chapter/view_cache --~--~-~--~~~---~--~~ 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

Re: Tree structures

2006-08-17 Thread Wilm
Hi John, I don't have my computer here, but I will come back to you later today when I get back at my computer. --~--~-~--~~~---~--~~ 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 use caching of views in multilinguaal sites?

2006-08-17 Thread mouth
I think You misunderstood my need. - I want to use caching of some views (controller's actions) - view (controller's action) can produce more then one output - in dependency of selected locale - I'm using I18n and L10n classes from CakePHP 1.2 with current trunk code I can not use

Page Not Found

2006-08-17 Thread Uday
Hello All, I m very new to the cake php. When i tried for using cake php i got the Page Not Found error. I have tried the turn on the mod_rewrite in the httpd.conf as well.but still messed with the error. Please help. Warm Thanx in Advance.

Re: Tree structures

2006-08-17 Thread Jon Bennett
I'm currently working on a new project: It has a model named Task, which has two relations: belongsTo = Task hasMany = Task I think you need something like: var $belongsTo = array('Parent'Task =array('className'='Page','foreignKey'='page_id')); var $hasMany= array('SubTask' =

Re: Tree structures

2006-08-17 Thread Jon Bennett
I think you need something like: var $belongsTo = array('Parent'Task =array('className'='Page','foreignKey'='page_id')); var $hasMany= array('SubTask' = array('className'='Page','foreignKey'= 'page_id')); that'll teach me to copy and paste to hastlely! try: var $belongsTo =

Re: Help Grasping HABTM...

2006-08-17 Thread admataz
Hi joel HABTM means there's a many-to-many relationship between the models - so the category data will ba available as a list, not as a single item as you are attempting. A quick look tells me that in your view you should be accessing the Category data as an indexed array. So instead of

Re: Tree structures

2006-08-17 Thread Wilm
Thanks for the reply, will try this. :) --~--~-~--~~~---~--~~ 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

Re: Cannot use Model only for Validation (no table behind) $useTable = false;

2006-08-17 Thread Samuel DeVore
You're right I looked in my own code where I use models for validation only (and for doing email) and I have $useTable = false;perhaps you should paste some source in the bin http://cakephp.org/pastes/add from your controller and show what you are doing and someone more awake then I might be able

Re: AJAX Update div not working

2006-08-17 Thread Chris Hartjes
Some overzealous pop-up blockers may think that your AJAX-related Javascript calls are trying to open up pop-up windows... On 8/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: josh southern wrote: For IE - that ended up being a problem with my Norton Internet Security Popup Blocker. If I

Re: simpletest how to ??

2006-08-17 Thread georgeL
Teemow pasted a nice example of a simpletest of a cake model in the german cake usergroup. see it here: http://groups.google.com/group/cakephp-de/browse_thread/thread/9c50792e4ea0b95e --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Action raising error 404 not found

2006-08-17 Thread Mathieu Gagnon
I was looking for a way to raise 404 inside controller actions but didnt found anything about it. Below is the solution i'm using right now but I have the feeling there must be a better way. I would like to know what people think, whats the proper way? class AppController extends Controller {

Need Cake developer(s) to join project for large scale web

2006-08-17 Thread airbag41
Hello, We are looking to hire/partner with 1 or 2 other talented PHP/MySQL developers to help out with various aspects of the system. Since much of the system is being built using Cake you should be familiar with the framework. Work would begin immediately, with the potential for a longer term

Re: Dynamic Navigation Menu

2006-08-17 Thread Jonathan Snook
I have this same issue with an application I'm building. What I've done is built a component/element combo that does the work for me. The component pulls in all the data required for the nav. Then, I use an element to build out the nav using that data. I just wrote up a quick post that hopefully

Re: write in Db without render a page

2006-08-17 Thread darx
Thnx both guys In my project $this-layout='ajax'; was the right one :) Any other type of solution gives me an error. bye --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

url and routing

2006-08-17 Thread darx
Hi bakers, i know it's been asked before but none of the threads was so claryfing. What i need to is have url like this www.mysite.com/lang/controllerForSelectedLang/actionForSelectedLang (all pages are created with dinamic data from db) Ex: EN www.mysite.com/en/events/index Ex: IT

Re: Help Grasping HABTM...

2006-08-17 Thread j o e l
Awesome! TY, AD! That was what I needed. I understood the many-to-many relationship aspect. I guess I even understood the result would be in the form of an array. I just didn't know how to access that, and it now makes sense what you wrote given it is an indexed array. I also see it now

Problem posting to my Baked application.

2006-08-17 Thread jasz
Bakers. I have a cake application in www.domain.com and another application (no cake) located in www.anotherdomain.com There is a form in www.anotherdomain.com where the action looks something like this: form action=http://www.domain.com/user/login; method=post ... /form As you can see, this

commit, rollback and transactions

2006-08-17 Thread M
Hello, I read a few emails about the lacking of transaction management in Cake. As I am building a web application with Cake for a potential customer, i wonder how to assure that my application has consistent data on the database. For example, if I write some data to the DB, and at a certain

Re: commit, rollback and transactions

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 4:27 AM, M wrote: Hello, I read a few emails about the lacking of transaction management in Cake. As I am building a web application with Cake for a potential customer, i wonder how to assure that my application has consistent data on the database. For example, if

Re: url and routing

2006-08-17 Thread RosSoft
in file routes.php, you've the variable $from_url (or something like this, search the groups etc.). You can parse manually this variable in that file, and modify it. Proof of concept: routes.php ?php $parts=split('/',$from_url); $lang=$parts[0]; //Save $lang to session $from_url

Re: Help for a New User... Please!

2006-08-17 Thread Llama Llama Llama
Thank you thank you thank you. :) To which address can I send my first born in gratitude? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Polymorphism in Cake Models

2006-08-17 Thread irfan baig
On 8/16/06, nate [EMAIL PROTECTED] wrote: Cake is written in PHP, and PHP does not support polymorphism. So no, Cake does not support polymorphism. Err ... I think it depends on what aspect of polymorphism you're talking about. Perhaps you meant PHP doesn't inherently support function

Re: Dynamic Navigation Menu

2006-08-17 Thread Armando Sosa
I have a navigation helper too http://www.nolimit-studio.com/baking/2006/08/02/navigation-helper/ It's add an active state to an element whenever certain controller or action is called. On 8/17/06, Jonathan Snook [EMAIL PROTECTED] wrote: I have this same issue with an application I'm

Re: MySQL Dump and Restore with Cake

2006-08-17 Thread Sonic Baker
Thanks for your help teemow. Cheers, Sonic --~--~-~--~~~---~--~~ 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

using generateList with 2 related models

2006-08-17 Thread [EMAIL PROTECTED]
I have 2 models: Users Counties I have set up User model with HABTM relationship, because a user has one or more counties with their account tables look like this users - id - username - password - email counties - id - county users_counties - user_id - county_id I need to generate

Re: Unwanted GET variable in URL

2006-08-17 Thread Chris Hartjes
That looks awfully like a session ID that is being sent via the URL instead of stored in a cookie. On 8/17/06, 379 the manifesto [EMAIL PROTECTED] wrote: I have this in my URLs: a href=/pages/about?CAKEPHP=f312feb5ded3ae8831811ccfea78e566spanabout/span/a Its not something that I am

Re: Help for a New User... Please!

2006-08-17 Thread Marcelo de Moraes Serpa
Hi,To which address can I send my first born in gratitude?If you feel like donating, take a look at:http://www.cakefoundation.org/pages/contribute You can donate via paypal, it´s fast and secure. Btw, welcome to the Cake community! Be sure to get your feet on #cakephp :) If you need anything, just

Re: Unwanted GET variable in URL

2006-08-17 Thread 379 the manifesto
Yeah, cheers Chris. I normally use : IfModule mod_php4.c php_value session.use_trans_sid 0 php_value session.use_only_cookies 1 php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 /IfModule IfModule sapi_apache2.c php_value session.use_trans_sid 0 php_value

how do i using routing to pass an array to my action function?

2006-08-17 Thread cyberlogi
hey, i'm working on a travel site and would like to use routing to change the url string into an array for easier processing in my action function. urls are formatted like this /posts/search/country_id/region_id/location_id/tag_id1/tag_id2/tag_id3/etc and might look like this

Routine Page Tasks

2006-08-17 Thread Simplerules
I want to do an routine check of permissions on every page/visit/execution, where would the best place to put the code be? Its only a function call, a function set in app_controller, but where should I put the call so it executes on every single load?

Re: Routine Page Tasks

2006-08-17 Thread Samuel DeVore
look up beforeFilter in the manualOn 8/17/06, Simplerules [EMAIL PROTECTED] wrote: I want to do an routine check of permissions on everypage/visit/execution, where would the best place to put the code be? Its only a function call, a function set in app_controller, but whereshould I put the call so

Re: using generateList with 2 related models

2006-08-17 Thread Mikee Freedom
morning mate, If I understand what you're after exactly I think it is something I was looking for just yesterday. In the end I came up with a not so elegant solution which may work for you. But at the end of the day I would love something a bit nicer. In my model I: 1. Set up my HABTM

Re: can actions return a value without doing anything with a view

2006-08-17 Thread codecowboy
This seems pretty heavy wieght. I wouldn't want the server to go through all of the extra logic of rendering an empty view just to simulate a function returning a value. Is there another way using cake or is cake just not meant for ajax enabled applications?

Re: Unwanted GET variable in URL

2006-08-17 Thread Mikee Freedom
i think this came up the other day: http://groups.google.com/group/cake-php/browse_thread/thread/54830d6975cea12d/9e8121877d9712a1?lnk=gstq=%3FCAKEPHP%3Dd550b7b78dbfe545d4afeda95d470eaa+appended+to+all+urlsrnum=1#9e8121877d9712a1 On 18/08/06, 379 the manifesto [EMAIL PROTECTED] wrote: Yeah,

Re: can actions return a value without doing anything with a view

2006-08-17 Thread Samuel DeVore
you might look at the component that nate did for autoCompletehttp://cakeforge.org/snippet/detail.php?type=snippetid=70Sam D On 8/17/06, codecowboy [EMAIL PROTECTED] wrote: This seems pretty heavy wieght.I wouldn't want the server to gothrough all of the extra logic of rendering an empty view just

Re: Routine Page Tasks

2006-08-17 Thread Simplerules
Would that require me to put the the same beforeFilter in each controller, or would I put that in app_controller? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Problem witch model !

2006-08-17 Thread [EMAIL PROTECTED]
I didn't create category.php in model ! :) now is ok ! --~--~-~--~~~---~--~~ 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,

Re: how do i using routing to pass an array to my action function?

2006-08-17 Thread nate
Nope. Unless you use func_get_args. --~--~-~--~~~---~--~~ 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

Re: Unwanted GET variable in URL

2006-08-17 Thread MJ Ray
Chris Hartjes [EMAIL PROTECTED] That looks awfully like a session ID that is being sent via the URL instead of stored in a cookie. Which is good. No need to lock people out just because they won't give you write access to their computer. Regards, -- MJ Ray [EMAIL PROTECTED]

Request other model in controler

2006-08-17 Thread [EMAIL PROTECTED]
so i have a 1st model and controller for Files and 2th / controller and model for Comments, my question is - Can I use findAll() for Comments in files Controller ? - class FilesController extends AppController{ var $name='Files'; var $components = array ('Pagination');

Re: Request other model in controler

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 3:22 PM, [EMAIL PROTECTED] wrote: so i have a 1st model and controller for Files and 2th / controller and model for Comments, my question is - Can I use findAll() for Comments in files Controller ? stick in var $uses = array('File', 'Comment'); In your

How can I do this?

2006-08-17 Thread [EMAIL PROTECTED]
Hello group, I would like to get some ideas on what is the best way to do the following in CakePHP. I am developing a little content management app that allows the user to create pages. I want to allow them to add dynamic content to their pages. That dynamic content, let's say a stock market

Re: Routine Page Tasks

2006-08-17 Thread Mathieu Gagnon
Each controller extends app_controller, so write it once there to execute globally. Simplerules wrote: Would that require me to put the the same beforeFilter in each controller, or would I put that in app_controller? --~--~-~--~~~---~--~~ You received

Re: How can I do this?

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 3:42 PM, [EMAIL PROTECTED] wrote: snip Any ideas and suggestions are appreciated! Since its rather view-related, it might be better housed in a helper. So you have user-created data that is gathered in the controller. I'd hand it to the view, which is then manipulated by

Re: How can I do this?

2006-08-17 Thread Gregory Stewart
requestAction might be actually what I am looking for.It allows me to call a method in another controller, and already pre-rendered if I want to. That's perfect!I will play around with that tonight and see how well it works. Thanks for tipp!GregoryOn 8/17/06, John David Anderson (_psychic_) [EMAIL

Session Helper not Available?

2006-08-17 Thread Jeff
In the documentation is shows that there is a Session Helper. When I add 'Session' to my app/app_controller it says that there is not a session view. When I look in the cake/view/helpers/ directory, I don't see a session.php. Is the documentation wrong, or am I missing something? Thanks

Change Template

2006-08-17 Thread Simplerules
I just setup CakePHP, how can I change the default main HTML wrapper? The one that titles pages CakePHP and has a powered by CakePHP icon in the footer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: Change Template

2006-08-17 Thread John Zimmerman [gmail]
copy the file from /cake/libs/view/templates/layouts/default.thtmlto/app/views/layouts/default.thtmlAnd start editing the new file in your application directory. It will override the default. On 8/17/06, Simplerules [EMAIL PROTECTED] wrote: I just setup CakePHP, how can I change the default main

Remove Powered By

2006-08-17 Thread Simplerules
I couldn't find the exact license on the site, do I have to leave in the 'Powered by CakePHP' icon and reference?. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Can I call a model's function from beforeFilter callback in app_controller?

2006-08-17 Thread eveloper
So basically can I do the following: File: app_controller.php class AppController extends Controller { var $beforeFilter = array('init_cons'); var $uses = array('Terms'); function init_cons() { $this-Terms-init(); } } File: terms.php class Terms extends AppModel {

Re: Can I call a model's function from beforeFilter callback in app_controller?

2006-08-17 Thread eveloper
Sorry, I think I have to re-phrase my question. What I have outlined above is actually do-able. I got the error message because of something else. Which in this case was a missing view due to typos. But now my question, given that I got that error message instead of message that the view was

can you restrict the table fields cake recursively retrieves?

2006-08-17 Thread Bret Kuhns
Contrary to popular practice, I want to create a gallery script using BLOB fields in my database to store the images and thumbnails. When I retrieve the list of gallery albums, cake recursively gets all the fields from the associated images table. However, pulling all of this data at once with

Re: can you restrict the table fields cake recursively retrieves?

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 8:01 PM, Bret Kuhns wrote: Contrary to popular practice, There's a reason for this... ;o) I want to create a gallery script using BLOB fields in my database to store the images and thumbnails. When I retrieve the list of gallery albums, cake recursively gets all the

Re: Remove Powered By

2006-08-17 Thread John Zimmerman [gmail]
No. Cake is distributed under the MIT license.http://en.wikipedia.org/wiki/MIT_Licensehttp://www.opensource.org/licenses/mit-license.php On 8/17/06, Simplerules [EMAIL PROTECTED] wrote: I couldn't find the exact license on the site, do I have to leave inthe 'Powered by CakePHP' icon and

inheritance beyond model?

2006-08-17 Thread riverfr0zen
Hi there - under app/models I have Vehicle extending Model. I would now like to create Car and Scooter, which should extend Vehicle. I'm probably missing something really dumb, but I'm not sure what the right way to include Vehicle is - trying the usual include_once/require_once returns an error

Re: inheritance beyond model?

2006-08-17 Thread irfan baig
Ok, so looking a little deeper, the problem seems to stem from the fact in loading models, basics.php gets a list of models to load from listClasses, but then doesn't load them based on the inheritance tree ... The problem can be mitigated by using require_once() instead of require() in