Sanitize, weird. Class 'App' not found.

2008-11-18 Thread Louie Miranda
?php App::import('Sanitize'); class CatalogsController extends AppController { *Fatal error*: Class 'App' not found in * /Volumes/Web/Www/adminpage2/app/controllers/catalogs_controller.php* on line *2* Its weird. I think this is the proper way of instantiating the App::import. However, I got

Re: Sanitize, weird. Class 'App' not found.

2008-11-18 Thread Louie Miranda
However, uses('sanitize'); Works. Louie On Tue, Nov 18, 2008 at 4:10 PM, Louie Miranda [EMAIL PROTECTED] wrote: ?php App::import('Sanitize'); class CatalogsController extends AppController { *Fatal error*: Class 'App' not found in *

Re: Ways to display data from another controller without resorting to requestAction?

2008-11-18 Thread David C. Zentgraf
http://book.cakephp.org/view/63/Introduction On 18 Nov 2008, at 16:55, Pizgin wrote: David tell me please more detail. Thanks. On 18 нояб, 10:31, David C. Zentgraf [EMAIL PROTECTED] wrote: How about making a reusable component? On 18 Nov 2008, at 16:22, Pizgin wrote: Hi! What else

Re: Advice needed ... cake to control zipping of directory of images

2008-11-18 Thread AD7six
On Nov 18, 6:11 am, westaussie [EMAIL PROTECTED] wrote: Hey all ... need some advice on how to go about having cake zip a folder of images and then allow download of zip file from the browser. I've built a simple property listing upload system ... each listing can have up to 5 images ...

Re: stuck with Configure::store

2008-11-18 Thread johnbl4ck
yeah actually after i posted this message i found that solution too. thanks On 18 нояб, 05:03, Dardo Sordi Bogado [EMAIL PROTECTED] wrote: I use this in APP/config/bootstrap.phphttp://bin.cakephp.org/saved/34212 HTH, - Dardo Sordi. On Mon, Nov 17, 2008 at 9:45 AM, johnbl4ck [EMAIL

Re: self-recursive models

2008-11-18 Thread grigri
What do you get if you set recursive to 3? On Nov 18, 7:53 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, thanks for the reply =) don't see how that matters, but sure ?php class Person extends AppModel {         var $name = 'Person';         var $hasAndBelongsToMany =

AW: Ways to display data from another controller without resorting to requestAction?

2008-11-18 Thread Liebermann, Anja Carolin
This is very useful: http://mark-story.com/posts/view/reducing-requestaction-use-in-your-cakephp-sites-with-fat-models?utm_source=rss Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von David C. Zentgraf Gesendet: Dienstag, 18.

Re: Configuring Cake with openSUSE 11

2008-11-18 Thread Alexandru Ciobanu
undbund wrote: AllowOverride FileInfo AuthConfig Limit Indexes Replace the above line with: AllowOverride All --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: Advice needed ... cake to control zipping of directory of images

2008-11-18 Thread westaussie
Thanks AD ... didn't occur to me to use an exec call. That will certainly work! I have managed to track down a class that I'm playing with right now ... looks promising so I'll try to make a behaviour out of it when I get a chance. I'm tending to agree that the functionality I want to implement

Re: Best method to allow user to have multiple sessions

2008-11-18 Thread Kyo
Share session across multiple cake applications? Is that what you want to achieve? --~--~-~--~~~---~--~~ 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

Re: Sanitize, weird. Class 'App' not found.

2008-11-18 Thread Daniel Hofstetter
Hi Louie, ?php App::import('Sanitize'); class CatalogsController extends AppController { *Fatal error*: Class 'App' not found in * /Volumes/Web/Www/adminpage2/app/controllers/catalogs_controller.php* on line *2* Its weird. I think this is the proper way of instantiating the

how can i implement modular approach in cakephp??

2008-11-18 Thread Russell
i have just started cakephp before that i worked in various framework of php. i have found that if we develop our application in modular approach that it can help us in the long run if the application get bigger and bigger. sometimes its become easy to work in multiple application if we work

Re: url parameters in cake1.2

2008-11-18 Thread Kyo
Use debug($this-params) to see all the parameters you passed. --~--~-~--~~~---~--~~ 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: CakePHP bake console and mysql-client 5.0, error - Client does not support authentication protocol requested by server

2008-11-18 Thread Ramsey Ramos
Yup me too. Cheers! ramsey From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Louie Miranda Sent: Tuesday, November 18, 2008 10:54 AM To: cake-php@googlegroups.com Subject: Re: CakePHP bake console and mysql-client 5.0, error - Client does not support authentication

Re: How to add colour to product? [Models associations/relations, habtm?]

2008-11-18 Thread Hipnotik
On 17 Lis, 15:03, Joel Perras [EMAIL PROTECTED] wrote: http://teknoid.wordpress.com/2008/07/11/notes-on-cakephp-habtm-part-2... It's not the same :( I have products and colours defined and I need only to bind these models, such as select product, select colour and click save. -J. On 17 Nov,

Re: cakephp scaffold

2008-11-18 Thread Hakan ÇELEBİ
I think you should update table name which is categorys. cakes want like that :))) ?php class Category extends AppModel { var $name = 'Category'; } ? ?php class CategorysController extends AppController { var $name = 'Categorys'; var $scaffold; } ?

Re: Acl + Auth and now all I see is a blank page

2008-11-18 Thread Dardo Sordi Bogado
Hi Anja, Thank you for your continuing help! Now I have (thanks to you) the correct password in my db and don't get the message anymore about the wrong login information. You are welcome, I'm glad to be of help. However: I still cannot access my application. What happenes now is (debug

Cake 1.1.20.7692 Model::saveFiled broken, bug

2008-11-18 Thread majna
There is major bug in stable release of Cake 1.1 (Cake 1.1.20.7692) saveField() pass wrong $validate parameters to save(); model_php5.php line 785: function saveField($name, $value, $validate = false) { $id = $this-id; $this-create(); if (is_array($validate)) {

Re: Sanitize, weird. Class 'App' not found.

2008-11-18 Thread Dardo Sordi Bogado
@Daniel *Fatal error*: Class 'App' not found in * That means there is not such class... so changing parameters would make no difference. @Louie: Are you using Cake 1.2? If yes, then it is a very old one... If not, App::import() is for Cake 1.2 Regards, - Dardo Sordi. On Tue, Nov 18, 2008

Re: Best method to allow user to have multiple sessions

2008-11-18 Thread AD7six
On Nov 17, 11:52 pm, Leo [EMAIL PROTECTED] wrote: The problem I have is that I want to enable users to log in to the application multiple times with different credentials. I store session information in the database, and, of course, when I open the application in separate windows,  they all

Saving a Model with belongsTo association

2008-11-18 Thread Cjo
Hi, I am new to cake php and have been playing around for some time. First of all thanks for all the replies for earlier queries. Regarding this post. I have 2 Models Exporter which belong to User. I am doing a page for creating a New Exporter. But for creating a Exporter I would have to save

OT: Thanks for the noise Xavier...

2008-11-18 Thread AD7six
... but we've had enough. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

Re: Working with forms for CMS

2008-11-18 Thread Jon Bennett
Hi bakers, Got a theory/approach question, hoping someone's been down this route already. A lot of my projects are CMS'd sites. This largely means a few models: * Page * Article * Documents (files, images, media etc) Often I have to work with forms, contact forms, email sign ups

Re: Working with forms for CMS

2008-11-18 Thread Dardo Sordi Bogado
Often I have to work with forms, contact forms, email sign ups etc that are then embedded in each page, and I'd really like to use the cake validation and auto magic, whilst avoiding manually creating a model for each form. What is wrong with creating a Model for handling the data of your

Re: Working with forms for CMS

2008-11-18 Thread Dardo Sordi Bogado
What about adding 2 fields to Forms: Forms - id - name - schema (serialised obj) - validation_rules (serialised obj) And then passing the values of each to the Form model in beforeValidate? It seems pretty strightforward to do, why don't give it a try and then tell us how it went? It

Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread acoustic_overdrive
I think I've found a problem in the dispatcher, please have a look and see if you agree. I've noticed that if you rename your app directory to something other than 'app', the html helper will not generate correct links. They seem to get prefixed with the name of your app directory, and this

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread AD7six
On Nov 18, 1:04 pm, acoustic_overdrive [EMAIL PROTECTED] wrote: I think I've found a problem in the dispatcher, please have a look and see if you agree. I've noticed that if you rename your app directory to something other than 'app', the html helper will not generate correct links. They

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread acoustic_overdrive
OK I've duplicated app a second time so I now have app, testapp and testapp2 but I still see the same behaviour. Is that what you meant? Thanks! Jamie On Nov 18, 12:07 pm, AD7six [EMAIL PROTECTED] wrote: On Nov 18, 1:04 pm, acoustic_overdrive [EMAIL PROTECTED] wrote: I think I've found

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread AD7six
On Nov 18, 1:12 pm, acoustic_overdrive [EMAIL PROTECTED] wrote: OK I've duplicated app a second time so I now have app, testapp and testapp2 but I still see the same behaviour. Is that what you meant? Thanks! Jamie 5. edit the root .htaccess to jump you into testapp/webroot/ instead of

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread acoustic_overdrive
The example I gave was just a quick way of demonstrating. I know it works fine with only one app called 'app', but what if you do want more than one? I was just browsing the source for dispatcher::baseUrl() and see that it used to be aware of the value of APP_DIR but now assumes it to be 'app':

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread AD7six
On Nov 18, 1:33 pm, acoustic_overdrive [EMAIL PROTECTED] wrote: The example I gave was just a quick way of demonstrating. I know it works fine with only one app called 'app', but what if you do want more than one? I was just browsing the source for dispatcher::baseUrl() and see that it

Re: Working with forms for CMS

2008-11-18 Thread Jon Bennett
It seems pretty strightforward to do, why don't give it a try and then tell us how it went? Am just thinking things through a little further. I was thinking about how I would set the _schema and validate values. I had thought about calling a method in afterFind, but they aren't run for

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread acoustic_overdrive
Hi Andy, Thanks for your detailed response. Very interesting, I didn't know it worked like that. The reason I wanted to use a different app directory name was because I have multiple apps on my dev machine and when I uploaded one site into production I thought I may as well leave its app

Re: self-recursive models

2008-11-18 Thread [EMAIL PROTECTED]
I just get the same, as there are no more models associated =( On Nov 18, 10:00 am, grigri [EMAIL PROTECTED] wrote: What do you get if you set recursive to 3? On Nov 18, 7:53 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, thanks for the reply =) don't see how that matters, but sure

Re: Working with forms for CMS

2008-11-18 Thread Flipflops
Hi Passing the schema and validation rules seems like a good idea - I'm guessing your are thinking you could couple it with some kind of wizard / interface so you build your forms within the CMS... could be a really goood feature but at the end of the day it boils down to how long the initial

Destroying cakephp session on closing browser window

2008-11-18 Thread Yogesh
Hi Can anyone please help me out? I wan't to destroy the session when user closes the Browser windows. my cakephp version is 1.2 beta Explanation: If user is logged in and closes the Browser without log out then next time if he opens the Browser then it should not store the session. Currently if

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread acoustic_overdrive
And I realise now I wouldn't have this problem if I was using a proper production setup with the webroot set as the docroot, but this is a shared server so everything is inside the docroot. So would it be fair to summarise it like below: Don't rename your 'app' folder if you want it to appear

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread AD7six
On Nov 18, 2:31 pm, acoustic_overdrive [EMAIL PROTECTED] wrote: And I realise now I wouldn't have this problem if I was using a proper production setup with the webroot set as the docroot, but this is a shared server so everything is inside the docroot. Try that:

Re: how can i implement modular approach in cakephp??

2008-11-18 Thread dr. Hannibal Lecter
What do you mean by modular approach? We can't read your mind... On Nov 18, 10:14 am, Russell [EMAIL PROTECTED] wrote: i have just started cakephp before that i worked in various framework of php. i have found that if we develop our application in modular approach that it can help us in the

Re: How to bake PHP5 code?

2008-11-18 Thread mark_story
Since Cake is a PHP4 compatible framework we cannot support visibility keywords in core. However, feel free to make changes to your copy :) Currently there are no templates for Models or Controllers. So you will need to edit core files to change the output of those tasks. -Mark On Nov 18,

Re: How to bake the controller/views from console

2008-11-18 Thread Daniel Hofstetter
Hi Srini, how to bake the cotroller from console in cake php. anyone can help me in this. Have a look at http://book.cakephp.org/view/113/Code-Generation-with-Bake Hope that helps! -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ You

Re: Sanitize, weird. Class 'App' not found.

2008-11-18 Thread mark_story
If you are using 1.1 there is no App class and as such you must use uses() -Mark On Nov 18, 3:10 am, Louie Miranda [EMAIL PROTECTED] wrote: ?php App::import('Sanitize'); class CatalogsController extends AppController { *Fatal error*: Class 'App' not found in *

Re: Sanitize, weird. Class 'App' not found.

2008-11-18 Thread Daniel Hofstetter
@Dardo Sordi: Ah yes, you are right, I should have read it more thoroughly. Thanks for correcting me! -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group.

Re: Manage App's CSS/Scripts

2008-11-18 Thread Josey
I had this same problem and here is how I took care of this. I created 2 php files. One that had a CSS header so it would act as CSS and the other, you guessed it, with a JS header. I used the php include in those files to include any scripts that would be used across the entire app. // Below

Re: Manage App's CSS/Scripts

2008-11-18 Thread Josey
I had this same problem and here is how I took care of this. I created 2 php files. One that had a CSS header so it would act as CSS and the other, you guessed it, with a JS header. I used the php include in those files to include any scripts that would be used across the entire app. // Below

AW: Destroying cakephp session on closing browser window

2008-11-18 Thread Liebermann, Anja Carolin
Hi Yogesh, As far as I know this is not possible. This is also the reason why you can set a session timeout. The server and therefore your application has no clue if your user still views teh browser window or if the windows has bee closed, the PC shut down etc. Maybe you can do a kind of

Re: Manage App's CSS/Scripts

2008-11-18 Thread Marcus Silva
Most of the solutions provide are very ugly and messy as well. What you really want is to add and remove css/js files as and when you want and display them when you want too. To do that you need this: In the app_controller.php declare a var to hold all the js and scc files like so: var

Re: Working with forms for CMS

2008-11-18 Thread Jon Bennett
Hi Flip flops, Passing the schema and validation rules seems like a good idea - I'm guessing your are thinking you could couple it with some kind of wizard / interface so you build your forms within the CMS... could be a really goood feature but at the end of the day it boils down to how

Re: Edit in Views

2008-11-18 Thread Rob
Sounds like you may have baked the files in a different location than the one you're editing. Put a debug statement in your controller and see if that shows up (make sure debug is set in config/core.php). On Nov 17, 1:09 am, raremon [EMAIL PROTECTED] wrote: Hi guys, I need some help

creating a globally accessible variable within a helper

2008-11-18 Thread muszek
Hi all, Before I proceed to the question, I'll show you what I want to achieve. I want to create a simple and straightforward way of placing tooltipped help icons (user hovers over a question mark icon and sees a tooltip with a nice explanation). To do this, I need something like a

Re: Access control via custom component vs. ACL

2008-11-18 Thread validkeys
anyone? On Nov 17, 8:01 pm, validkeys [EMAIL PROTECTED] wrote: Hey Guys, I have a kind of complicated app and I don't think that the ACL would have worked for me. So I created a component to control access. So far, it seems to be working really well. Quick question, will this component's

Re: creating a globally accessible variable within a helper

2008-11-18 Thread muszek
[cut!] Now... how should I _properly_ store that information that's going to be printed out later on in layouts/default.ctp?  I could use a global variable, but it doesn't look pretty.  I'm sure there's a nicer way of doing it. Sorry if it doesn't belong to CakePHP mailing list at all...

Re: Destroying cakephp session on closing browser window

2008-11-18 Thread Marcelo Andrade
On Tue, Nov 18, 2008 at 9:02 AM, Yogesh [EMAIL PROTECTED] wrote: I wan't to destroy the session when user closes the Browser windows. my cakephp version is 1.2 beta Explanation: If user is logged in and closes the Browser without log out then next time if he opens the Browser then it should

Re: Cake 1.1.20.7692 Model::saveFiled broken, bug

2008-11-18 Thread thatsgreat2345
It isn't a bug, I believe that when you save , and validate is set to true, it validates the entire array. However if you define only one field as saveField does then it will only validate the field(s) in the array that is passed. So saveField makes an array since it is only saving one field, and

Re: Saving a Model with belongsTo association

2008-11-18 Thread thatsgreat2345
It is all about how you name your forms and it will return the proper structure that a simple save can handle. Check out this link http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo On Nov 18, 3:32 am, Cjo [EMAIL PROTECTED] wrote: Hi, I am new to cake php and

Re: Destroying cakephp session on closing browser window

2008-11-18 Thread thatsgreat2345
Yeah multiple tabs in firefox and such the session , meaning the user still browsing is still alive. Thus they don't get destroyed. As for the ajax it might work, have to do something like those annoying popups that popup when you try to leave some sites. Which they use the onunload property in

CSS aggregation / asset filtering

2008-11-18 Thread the_woodsman
Hey Bakers, I came across Asset/filter.css in my core file, and thought I'd try and get it working - so far no luck! I'm assuming its supposed to aggregate all my CSS files into one big one? I've saved the csspp file in the vendors/csspp/csspp.php I did find the core setting a bit confusing -

Re: CSS aggregation / asset filtering

2008-11-18 Thread Dardo Sordi Bogado
Hi, On Tue, Nov 18, 2008 at 4:00 PM, the_woodsman [EMAIL PROTECTED] wrote: Hey Bakers, I came across Asset/filter.css in my core file, and thought I'd try and get it working - so far no luck! I'm assuming its supposed to aggregate all my CSS files into one big one? I've saved the csspp

Re: Working with forms for CMS

2008-11-18 Thread Dardo Sordi Bogado
so did I - but I've just realised that my 'EmailForm' model would have it's own schema, at least: Why don't use two models: one for handling the validation of the dynamic forms and one for storing the metadata in the DB. Then in the dynamics forms, you can override schema() and probably a

Re: Cake 1.1.20.7692 Model::saveFiled broken, bug

2008-11-18 Thread majna
Tnx for reply. Still, second save() parameter is bollean $validate, but saveField() set an array! right? On Nov 18, 5:44 pm, thatsgreat2345 [EMAIL PROTECTED] wrote: It isn't a bug, I believe that when you save , and validate is set to true, it validates the entire array. However if you define

Re: Access control via custom component vs. ACL

2008-11-18 Thread mark_story
initialize() - before beforeFilter() startup() - after beforeFilter() -Mark On Nov 17, 8:01 pm, validkeys [EMAIL PROTECTED] wrote: Hey Guys, I have a kind of complicated app and I don't think that the ACL would have worked for me. So I created a component to control access. So far, it

Re: Access control via custom component vs. ACL

2008-11-18 Thread validkeys
if I add a beforeFilter function into the component, that would obviously run during beforeFilter just like in the controller? If so, would it run at the beginning of the calling controller's beforeFilter or at the end? Sorry for the tedious questions, I think these are it. On Nov 18, 1:57 pm,

Re: counterQuery, is this implemented yet?

2008-11-18 Thread BrendonKoz
Update: Well, I decided against using beforeSave/afterSave to write a manual query call and avoid counterCache...now that I'm a bit more clear headed, I'm not sure why. Either way, I think I may have found a solution to fix this in the core, but I need to write some tests and submit a patch to

Crazy problem with special characters in the controllers

2008-11-18 Thread carlos ferrandis
Hello I have 2 controllers getting info through find('list) from within the same table which has special characters from Portuguese, the crazy thing is one controller is able to show the right characters, the other show weird characters. How could that be possible? any idea what I can try?

Re: Dispatcher::baseUrl - renaming 'app' directory changes behaviour of Router::url

2008-11-18 Thread acoustic_overdrive
Hi Andy, Thanks for the link. I had to ask my hosting company to create me a directory outside the docroot as they don't give me permission to do that. In my last post what I should have said was: Don't rename your 'app' folder if you want it to appear as the root when using a

Re: Crazy problem with special characters in the controllers

2008-11-18 Thread thatsgreat2345
Are both views UTF-8 ? On Nov 18, 2:28 pm, carlos ferrandis [EMAIL PROTECTED] wrote: Hello I have 2 controllers getting info through find('list) from within the same table which has special characters from Portuguese, the crazy thing is one controller is able to show the right characters,

Always show $paginator-first();

2008-11-18 Thread Kyle Decot
I am trying to use $paginator-first(); but if I am on the first page or if there is only one page of results the first text does not appear. I would like it to appear but dimmed out. How would I do this? I am currently using: ?php echo $paginator-first(First,array(),First,array

Re: How to update a model with save method?

2008-11-18 Thread Sabir
Hey ORC can you explain how you have overridden the exists method. It would be good if you can paste a sample code. Thanks Sabir On Sep 23, 11:29 am, ORCC [EMAIL PROTECTED] wrote: Thanks for all your answers. I found my error: I've overridden the exists method in my model for other uses.

Named parameters VS $_GET

2008-11-18 Thread tekomp
Are there any particular reasons to use named parameters in a URL instead of a normal GET string? /posts/view/var1:3/var2:4 VS /posts/view/?var1=3var2=4 Both can be accessed in $this-params. I've always used a regular GET string, but if Cake convention suggests not to, I'd be interested to

Accessing named parameters

2008-11-18 Thread tekomp
Should named parameters be accessed through $this-passedArgs or $this- params? The docs say that they are accessed through both, but I'm not sure which one to choose. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Extract data

2008-11-18 Thread thatsgreat2345
I was curious , I have been trying and looking around but have failed. Array ( [0] = Array ( [User] = Array(..) [Point] = Array(..) ) ); However how do I remove the 0 to just get the User and Point to be top level.