Newbie - web server user for tmp

2009-02-02 Thread neridaj
Hello, I'm trying to set things up for CakePHP and was unsure how to figure out who the web server user is, and how to then change the permissions for the tmp directory to make it writable by that web server user. Thanks for any help, J --~--~-~--~~~---~--~~ You

Re: how to show table and fetch mysql queries in the coloumns of table

2009-02-02 Thread gkc
The query code should go in the controller. It might look something like this: $this->set('stats',$this->Model->find('all',array('fields'=>array ('field1','field2'; In your view code you would do something like this: On Feb 3, 12:23 am, aman batr

Cannot modify header information - headers already sent by

2009-02-02 Thread gkc
I have researched this problem and have already removed any blank space after the closing php tag. Here is the controller code: function beforeFilter() { if(isset($this->params['admin'])) { $this->checkAdminSession(); $allowed =

how to show table and fetch mysql queries in the coloumns of table

2009-02-02 Thread aman batra
hello..i want to create a table in my admin page so that i can see the stats of site directly. how can i make a table and then how to fetch the mysql queries of number of views and no of entities on my site on the table column. the code for table must be in the view.ctp ?? and where to write the

Re: the domain can't been login.

2009-02-02 Thread Rimoe
hi, everyone the value of _SERVER["HTTP_COOKIE"] are different, the domain 1 is CAKEPHP=903164a556083a14845a2dabadcbf170; __utmz=135676141.1233124975.44.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=%22%E6%A0%AA%E5%BC%8F%20%E4%BC%9A%E7%A4%BE%20%E3%82%BC%E3%82%A2%E3%83%AB%22; PHPSESSID=

Re: Prototype AND extJS?

2009-02-02 Thread Miles J
Youll usually have conflicts between js frameworks unless you build one specifically to not interfere with the other. Your best bet is to use one or the other. If you use extjs, create your own helper for it. On Feb 2, 9:11 pm, Aurelius wrote: > Hi! > > I really like the Ajax-Helper, but the ex

Re: the domain can't been login.

2009-02-02 Thread Rimoe
add, in the PC, 2 domain can been login very good. 2009/2/3 Rimoe > hi, > > everyone. > > I have used 2 domain to view my site by mobile, > > The domain 1 can been login. > but the domain 2 can't been login. > > I think the cause is apache's config > which one apache setting is wrong, > I do

Re: Top 10 Framework

2009-02-02 Thread Samuel DeVore
To me cake will always be one higher, to me it is an ELEVEN ;) On Mon, Feb 2, 2009 at 10:12 PM, mark_story wrote: > > Wow I'm a total tard. Way to press cancel, instead of send on that > last message. Let this be a lesson to all on how not to use gmail.. > > Anyways, might as well finish that

Re: Top 10 Framework

2009-02-02 Thread mark_story
Wow I'm a total tard. Way to press cancel, instead of send on that last message. Let this be a lesson to all on how not to use gmail.. Anyways, might as well finish that thought. What I was trying to say, was that is that people love comparisons and top ten lists. If you can itemize and order

Prototype AND extJS?

2009-02-02 Thread Aurelius
Hi! I really like the Ajax-Helper, but the extJS-Framework has some function which are not provided by prototype, so is there any reason why not to use both at the same time (beside a bit more download at the first page)? thx Aurelius --~--~-~--~~~---~--~~ You rec

Re: Top 10 Framework

2009-02-02 Thread mark_story
Oh noes! honestly, I only care about making the best framework we can. Every frameowkr On Feb 1, 7:11 pm, yusuf widi wrote: > Hi guyz... i got this somewhere on the net... > > http://www.phpframeworks.com/top-10-php-frameworks/ > > Why they put cake php on the fifth place? i dont think we were

the domain can't been login.

2009-02-02 Thread Rimoe
hi, everyone. I have used 2 domain to view my site by mobile, The domain 1 can been login. but the domain 2 can't been login. I think the cause is apache's config which one apache setting is wrong, I don't know. If you know,please tell me, Thank you very much. rimoe --~--~-~--~---

Re: utf-8 encoding problem

2009-02-02 Thread Dr. Loboto
Mohammad Al-Ani, you really found your real problem - your page is not UTF-8 page! %xx form is url-encoded non-ANSI string as only 7-bit symbols can be used in URLs. That's why browers encode non-ANSI symbols and then they are automatically decoded by Cake before go into params. Some of browsers s

Re: AJAX update of related model

2009-02-02 Thread Al
Well, i wasn't able to make one central update function to cover both models, but here is what I did just in case some other newbie needs help: VIEW/ //This code is in the view and updates the '$phd_users['PhdUser'] ['lastName']' div. editor( $phd_users['PhdUser']['lastName'], array(

Re: Show validationerrors after a redirect

2009-02-02 Thread brian
I misread your original post. I think what you need to do is call render(), not redirect(). $this->render('chartofaccounts'); On Mon, Feb 2, 2009 at 3:40 PM, Mickiii wrote: > > Thanks Brian, however if I remove the redirect call it displays the > view for the function "add", i.e. the add.ctp (w

Re: Top 10 Framework

2009-02-02 Thread yusuf widi
Ok guyz... thanks for response. I think that website is only accessories only for us. :) On Tue, Feb 3, 2009 at 3:18 AM, ache...@gmail.com wrote: > > And now the site has been completely F'ed. It looks like they aren't > sanitizing their data (shame on them) and now people have figured out > tha

Re: Using pagination inside elements

2009-02-02 Thread dr. Hannibal Lecter
Xoubaman, use var $helpers = array(..., 'Paginator'); in your AppController. make sure you fetch your data by using $this->paginate() in your controller to avoid the undefined indexes you're getting. Don't use renderElement() it has been deprecated, use element() instead. Hope that will set yo

Re: Show validationerrors after a redirect

2009-02-02 Thread Miles J
Oops and also remove this: } else { $this->Session->setFlash('Venligt ret fejlene herunder', 'default', array('class'=>'bad')); $this->redirect('chartofaccounts'); } --~--~-~--~~~--

Re: Show validationerrors after a redirect

2009-02-02 Thread Miles J
I see what your saying, do this: if($this->Ledgeraccount->validates()) { if ($this->Ledgeraccount->save($this->data, false)) { $this->redirect('chartofaccounts'); } } --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Show validationerrors after a redirect

2009-02-02 Thread Mickiii
Miles, is that not what the 'url' option is doing? On Feb 2, 10:54 pm, Miles J wrote: > Just change the url the form is posting to. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

Re: i am unable to validate the empty fields and scripts

2009-02-02 Thread Miles J
Create a custom method for doing this, instead of doing it in beforeValidate(). (You will have to change the $this->data a bit). function checkCode() { App::import('Core','Sanitize'); $clean = Sanitize::stripScripts($this->data['Comment'] ['comment']); $clean = Sa

Re: Show validationerrors after a redirect

2009-02-02 Thread Miles J
Just change the url the form is posting to. --~--~-~--~~~---~--~~ 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

Re: loading cake into code

2009-02-02 Thread bwragg
Awsome Martin. Thanks. I did try this a few days back before posting but could get it to work. I'll try again in case I did something wrong. Cheers, bwragg On Feb 2, 11:51 pm, Martin Westin wrote: > You can probably do something like this: > > 1. make a copy of app/webroot/index.php - call it

Re: how to config my habtm?

2009-02-02 Thread Webweave
You simply tell the model what the name of the table is as described here: http://book.cakephp.org/view/436/useTable You can always use existing table structure, it's just a little easier with things that follow the Cake convention. I do something similar with the primary key fields in my DB, si

Re: utf-8 encoding problem

2009-02-02 Thread Webweave
Well, that to me would seem to mean that you are indeed trying to access the page from a page that is not defined as UTF-8. >From Firefox, if I type مقال into the Google search box, I get a return search of http://www.google.com/search?q=مقال&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official

Re: Show validationerrors after a redirect

2009-02-02 Thread Mickiii
Hang on, I just found this post in the Bakery: http://bakery.cakephp.org/articles/view/validation-in-another-controller Does that still apply? Or has there been done anything built in stuff in the latest version of Cake? On Feb 2, 9:40 pm, Mickiii wrote: > Thanks Brian, however if I remove the

Re: loading a layout from a database

2009-02-02 Thread Simz
Using elements? On 2 fév, 15:14, Aurelius wrote: > Hi! > > Whats the best way to read a layout from the database? > > Simply writing a model for the layout-table and using following layout- > code? > echo $database_layout['top']; > echo $scripts_for_layout; > echo $database_layout['middle']; >

Re: Show validationerrors after a redirect

2009-02-02 Thread Mickiii
Thanks Brian, however if I remove the redirect call it displays the view for the function "add", i.e. the add.ctp (which doesnt exists), but I want it to go back to chartofaccounts where the form is, and then display the errors there. On Feb 2, 9:30 pm, brian wrote: > You don't need to redirect.

Re: nice new API layout

2009-02-02 Thread brian
Those methods aren't included in the API because they don't technically exist and the docs are generated from the source. The findBy* methods are basically constructs of the model's schema and are handled by Model::call__(). That's the nutshell version, anyway. On Mon, Feb 2, 2009 at 3:26 PM, Mo

Re: Show validationerrors after a redirect

2009-02-02 Thread brian
You don't need to redirect. When you do so, the information stored in $validationErrors is lost because you're making a new request. If you remove the redirect() call, Cake should simply re-display the form. Then if all is working well, FormHelper will take care of printing the errors for you. On

Re: nice new API layout

2009-02-02 Thread Mona
> http://cakeforge.org/frs/?group_id=53&release_id=76 Thanks for the link. However I noticed that this documentation is incomplete...for instance AppModel.findAllBy is missing... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread brian
On Mon, Feb 2, 2009 at 2:45 PM, Chris Mc wrote: > > Mate, it's not you it's me . I'm simply guessing at what's working > here to get my app to work. I just assumed that I could get some data > on the homepage by using that file because that file renders the > homepage screen. If there's som

Show validationerrors after a redirect

2009-02-02 Thread Mickiii
Hi, This is probably simple, but I can't find any specifics on it. I have a controller called ledger_controller, which uses two models: Ledgeraccount and Ledgertransaction. Within this controller i have a function called chartofaccounts, which includes a form, with an action that leads to the le

loading a layout from a database

2009-02-02 Thread Aurelius
Hi! Whats the best way to read a layout from the database? Simply writing a model for the layout-table and using following layout- code? flash(); echo $content_for_layout; ?> echo $database_layout['bottom']; echo $cakeDebug; ?> Or is there an more elegant way? thx! Aurelius --~--~-~--~

Migrating from 1.2 alpha to 1.2 Final

2009-02-02 Thread zonium
Like many of you, we use alpha for production and... our application ( a large one) is working well. But it's the time for us to migrate to 1.2 final. Where can we find a list of all the changes between the 2 versions. I know that there are a lot of changes and I wonder if any one has gone thru

Re: Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Rodrigo Rodrigues Moyle
You try to use saveAll? On Mon, Feb 2, 2009 at 10:16 AM, Graham Weldon wrote: > > > If some association exists between these objects, you can do something > like: > > $this->User->save($this->data); > $this->User->Site->save(array('Site' => array( > 'user_id' => $this->User->id, > // --- a

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread Chris Mc
> Colour me confused, then. I have no idea how one would get Cake to use > a view file at views/index.ctp short of changing the controller's > $viewPath. Or, maybe this is something new to me. Mate, it's not you it's me . I'm simply guessing at what's working here to get my app to work. I ju

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread brian
On Mon, Feb 2, 2009 at 2:15 PM, Chris Mc wrote: > > LOL again. This is where I say "I'm a newbie, so I don't know what's > happenning ;)". I think this is what I mean (and what you asked) .. > the view is called from /views/index.ctp and I know this is being > picked up properly because of the

Re: utf-8 encoding problem

2009-02-02 Thread mohammad al-ani
thank you Dr. Loboto but i find the real problem. i develop the site under firefox so if i use the internet explorer i can get the arabic word like it it but when i use the firefox and search for word like مقال the address of firefox will be /search?keyword=مقال and when i just confirm this link

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread Chris Mc
> > Yes, I'm getting an empty table, the for loop just doesn't execute at > > all, but all the other code works (even the stuff after the for) > > OK, so $restaurants is empty. Yes, I understand that bit :) > > Yes, I've been trying to do that.  The controller action is a function > > defined i

Re: how to config my habtm?

2009-02-02 Thread persivo_cunha
Now, i just have this: [ relevant part of code ] model Usuario var $hasAndBelongsToMany = 'ObjetoAprendizagem'; model ObjetoAprendizagem var $hasAndBelongsToMany = 'Usuario'; just this. Thank you, I couldn't change the db because other people use it, and i have to make a system using cake

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread brian
On Mon, Feb 2, 2009 at 1:47 PM, Chris Mc wrote: > > Hi brian, > >> Are you getting an empty table? Or, is Cake running into an error and >> not continuing to output anything? > > Yes, I'm getting an empty table, the for loop just doesn't execute at > all, but all the other code works (even the st

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread Chris Mc
Hi brian, > Are you getting an empty table? Or, is Cake running into an error and > not continuing to output anything? Yes, I'm getting an empty table, the for loop just doesn't execute at all, but all the other code works (even the stuff after the for) > If the former, it's likely that you hav

find('all') using internal paginate??

2009-02-02 Thread jwerd
Let me tell you my dilemma: I can't use the $this->paginate in the Model, probably because that's a controller only method, but is there a way to set up the same functionality (being able to pass in controller/action/page:1 and have it paginate the results from a find('all') ??? Right now I have

Re: Top 10 Framework

2009-02-02 Thread Ged Crimsonclaw
I just voted it 40 stars, because that's just how good it is. On Feb 2, 4:43 am, the_woodsman wrote: > I just gave Cake a 5 star rating :) > > On Feb 2, 12:11 am, yusuf widi wrote: > > > Hi guyz... i got this somewhere on the net... > > >http://www.phpframeworks.com/top-10-php-frameworks/ > > >

Re: Top 10 Framework

2009-02-02 Thread ache...@gmail.com
And now the site has been completely F'ed. It looks like they aren't sanitizing their data (shame on them) and now people have figured out that you can post whatever you want in there as a review. "I liked cake for 500 stars." Look at the average, 5.3 means people are gaming it. So, don't worry ab

Re: Cake Bake 500 Internal Server Error

2009-02-02 Thread brian
I didn't until i googled for "is smaller than min_uid". I suspect the problem is that your PHP scripts are owned by the httpd (apache) user. They should be owned by you or some other regular user on the system. On Mon, Feb 2, 2009 at 12:35 PM, CP wrote: > > Yes. any idea what this means > > [Mon

Re: how to config my habtm?

2009-02-02 Thread brian
You can specify the table in your model $hasAndBelongsToMany array (see 'joinTable' field). http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM What do you have in there now for those 2 models? On Mon, Feb 2, 2009 at 12:06 PM, persivo_cunha wrote: > > Hello, > > i'm using HABTM but, how

Re: Top 10 Framework

2009-02-02 Thread Martin Westin
@sunertl I was refering more to the website you linked to than to your post. I really liked this guy: "It is poorly written. Just look at those lengthy functions." Say what? And Cake is off the list... all the top ones new "un-heard-of" frameworks :) But look at the id's. Zend is id 1 (quite na

Re: Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread brian
Are you getting an empty table? Or, is Cake running into an error and not continuing to output anything? If the former, it's likely that you haven't set a var named 'restaurants'. You need $this->set('restaurants', ...); in your controller action. On Mon, Feb 2, 2009 at 6:45 AM, Chris Mc wrote:

Re: Cake Bake 500 Internal Server Error

2009-02-02 Thread CP
Yes. any idea what this means [Mon Feb 02 09:18:13 2009] [error] [client 99.186.32.62] SoftException in Application.cpp:303: UID of script "/home/clarityp/public_html/ invoicr/webroot/index.php" is smaller than min_uid [Mon Feb 02 09:17:22 2009] [error] [client 99.186.32.62] File does not exist:

Form + Subform suggestion

2009-02-02 Thread Ernesto
Hello. My app has 3 models: - Customer - RMA - Item Customer hasMany Order hasMany Item. each model has his own Controller. everything works smoothly. now i'm trying to code a particular form (first time for me). my goal is to do something similar to this: RMA.code (hidden, this field will b

Auth component not working in 1.2.1.8004

2009-02-02 Thread MalContented
I have an application build with cake 1.2.0.7962 and implementing the simple authentication detailed in the online manual. I just upgraded to 1.2.1.8004 and now can no longer log in. No messages are displayed and 40 dots are displayed in the password box (the length of the password string) when th

Re: not filter with username case sensitive

2009-02-02 Thread Martin Westin
Auth does not enforce either case sensitivity or insensitivity. This is all up to how you have your database configured. If your database, table of field is set to a "_ci" collation you will have case insensitive usernames. If you have a "_cs" or "_bin" collation you will be case sensitive. (All M

Re: Using pagination inside elements

2009-02-02 Thread Xoubaman
I've discovered the view method renderElement, that has a parameter called loadHelpers, false but default, that looked good. But it doesn't work. The paginator helper isn't loaded and I'm getting the same odd undefined indexes notices. The renderElement method isn't properly explained neither in

Re: Cake Bake 500 Internal Server Error

2009-02-02 Thread brian
The issue could be one of many things, not necessarily related to bake at all. Have you checked the server log? On Mon, Feb 2, 2009 at 10:37 AM, CP wrote: > > I have cake installed at /cake/ of my server. I baked an application > using > > cake -app /home/clarityp/www/invoicr > > when i accessed

Re: ORM

2009-02-02 Thread persivo_cunha
I've not seen SQL errors, i asked because teached me wrong, without to put hasMany, but i never had troubles. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-

how to config my habtm?

2009-02-02 Thread persivo_cunha
Hello, i'm using HABTM but, how i didn't know it, my db doesn't follow the cake's convention. I have two tables called 'objetos_aprendizagens' and 'usuarios', but my join table is 'objeto_aprendizagem_autores' . How can i use it without change my db? Thanks. --~--~-~--~~~

Re: ORM

2009-02-02 Thread brian
I imagine that you'd see some problems when doing find() from one of the models that included associations to the other. But, if your find conditions didn't refer to the other, I suppose it might work alright. Why would you want to do this, though? Anyway, did you try it? Are you seeing any SQL e

Re: loading cake into code

2009-02-02 Thread Vikas Yadav
Hi, I wanted to do something similar but did not get a thread response. I wanted to append to cakes sql log from code that is written outside cake or maybe use cake's model->query method so that would happen automatically. Any suggestions? Thanks, Vikas On Mon, 2009-02-02 at 04:51 -0800, Martin

Newbie needs help with CakePHP / ModelBaker

2009-02-02 Thread Chris Mc
Hi, I'm stuck :( I have been using ModelBaker to create my app and it went extremely well until I wanted to start customising the code. I'm learning CakePHP and MVC at the moment, but I've exceeded my curent knowledge (which is pretty easy at the moment). Anyway, I've been trying to customise t

Re: loading cake into code

2009-02-02 Thread bwragg
Any way from outside the cake system? Or any way to make the App::import function available in my existing code? On Feb 2, 8:04 pm, Miles J wrote: > App::import('Model', 'ModelName'); > $model = new ModelName(); > > But that would only work within the cake system itself. > > On Feb 1, 8:20 pm,b

Re: Cannot get aros_acos to populate, so cannot access anything

2009-02-02 Thread Affinity
I have discovered (with difficulty) the initDb and buildAcl functions are called by going to them in the URLs, which is not documented in any tutorials: http://localhost/yourproject/users/initDB http://localhost/yourproject/users/buildAcl I get an error when running initDB but at least the permi

Re: Cannot get aros_acos to populate, so cannot access anything

2009-02-02 Thread Affinity
Oh I just realised the above code where it says $aroAlias, $acoAlias I assume you should replace it with the right arcoAlias and $acoAlias I think?? Anyway, still doesnt work if I enter:- cake acl grant Administrators Users all cake acl grant 1 Users all still get same error whatever I try, and

Re: Security Notice for 1.2.0.7962, Using AuthComponent without SecurityComponent

2009-02-02 Thread lober
hi gwoo i want to give you a email,but i don't know your email,so i have a problem about 1.20 bug i write this in postcontroller ajax is well,but write this in appcontroller is wrong,about ajax. my website:www.zhuyinghao.com var $helpers = array('Html', 'Form', 'Javascript', 'Ajax'); On 1月17日,

ajax helper can't use in appcontroller

2009-02-02 Thread lober
i from china,myblog is www.zhuyinghao.com today i find a cakephp bug i write this in my postcontroller is well,but in appcontroller can't use it var $helpers = array('Html', 'Form', 'Javascript', 'Ajax'); gwoo are you there? --~--~-~--~~~---~--~~ You received t

not filter with username case sensitive

2009-02-02 Thread sophy
I am new cakephp user. How to make case sensitive username with auth component? When I login with my username "Sophy" or "sophy" it login successful. I need to case sensitive with my username. how can I do? --~--~-~--~~~---~--~~ You received this message because yo

Re: need Help on Internationalization in CakePHP

2009-02-02 Thread Martin Westin
It is not as hard as you may think at first. The hard part about this is figuring out what your language is called. :) There is an ISO standard for this which can be a bit confusing. Swedish (my native language) can be called up using: swe - 3-letter version sv - 2-letter version for standard Sw

Re: Top 10 Framework

2009-02-02 Thread Nate
That's too meta. Your head asplode. On Feb 2, 10:57 am, Samuel DeVore wrote: > nate do you have a top ten list of people who like to make top ten > lists?  I'm looking for the top 'ten list' maker to see how cakephp > ranks among the top ten,  ten list makers who make lists about the top > ten

Re: Running bake on a remote server using console

2009-02-02 Thread Smelly_Eddie
First off you would need shell access to your remote server, and can't call it locally. If your using CYgwin the commands should be identical, only the paths will change. But you will need putty or similar if your running windows locally. Second, why don't you just replicate your local files and

Re: Top 10 Framework

2009-02-02 Thread Samuel DeVore
nate do you have a top ten list of people who like to make top ten lists? I'm looking for the top 'ten list' maker to see how cakephp ranks among the top ten, ten list makers who make lists about the top ten frameworks for the top ten languages... but they have to of made at least 10 top ten li

Re: Usage of is_dir

2009-02-02 Thread Rogelio Nodal
That is quite a big difference. Thanks a lot for taking the time to share this information. I wonder why the insane amount of calls to is_dir. On Fri, Jan 30, 2009 at 3:28 PM, Loic Didelot wrote: > > Hi, > I didnt get any feedback but I tried to debug a little further by > comparing to my other

Re: Top 10 Framework

2009-02-02 Thread Nate
These kinds of top 10 lists are for people with nothing better to do with their time than make top 10 lists. On Feb 1, 7:11 pm, yusuf widi wrote: > Hi guyz... i got this somewhere on the net... > > http://www.phpframeworks.com/top-10-php-frameworks/ > > Why they put cake php on the fifth place?

Cake Bake 500 Internal Server Error

2009-02-02 Thread CP
I have cake installed at /cake/ of my server. I baked an application using cake -app /home/clarityp/www/invoicr when i accessed the application at domain.com/invoicr i got an internal server error 500. does anyone have any advice how to fix this? have i got something setup wrong? any help is mu

need Help on Internationalization in CakePHP

2009-02-02 Thread vikas
Hello all.. I want to convert my site in multilingual site. I have read the tutorial of Internationalization in CakePHP at http://book.cakephp.org/view/163/Internationalization-in-CakePHP. But not so much helpful, also no idea about what url have to use... So if somebody has a example file of "

Re: Top 10 Framework

2009-02-02 Thread teknoid
Top 10 this, top 10 That... you know that 87% of all statics are misleading :) Use the one that makes sense for your project and the one that you like working with... There is no fair comparison of any framework that would be equally great for any application. (Well, besides cake of course ;))

Re: Top 10 Framework

2009-02-02 Thread sunertl
Oh, if is seemed I cried jihad, i made something wrong! Maybe because english is not my primary language... To be honest I do not give a about the rank of a framework or another. I use rankings like the mentioned one to look what is new in the field of frameworks. This way I discovered Yii an

Re: Where to define constants

2009-02-02 Thread hellfish
I recommend using some other file and then loading that file in the bootstrap. This way if you need to update cake files you don't have to worry about overriding your stuff, well, only one line will be lost. I use a appconfig.php file with my stuff and then I load it in the bootstrap like this

Re: BeforeFind

2009-02-02 Thread Martin Westin
I'd say that beforeFind should be used for thing that you want to run at all times. Instead of doing this in beforeFind you might want to create a custom find which is a good way to enforce custom logic to the find operation while leaving any associations and other internal queries alone. As a s

Re: Top 10 Framework

2009-02-02 Thread Martin Westin
Why do I hear the cries of Jihad every time I read about this vs that framework :) If that website is a guide the the best framework, then these are the very best short films and videos. http://www.youtube.com/browse?s=tr&c=0&l=&b=0 You decide popularity by voting and popular is not always the s

Re: BeforeFind

2009-02-02 Thread j0n4s.h4rtm...@googlemail.com
This /could/ be related to https://trac.cakephp.org/ticket/2056 On Feb 2, 2:40 am, Fred wrote: > Thanks...that is very helpful. One thing to note it looks like the > children method of a tree doesn't support callbacks of false (line 275 > of tree.php has only to recursive on the find, but no cal

Re: loading cake into code

2009-02-02 Thread Martin Westin
You can probably do something like this: 1. make a copy of app/webroot/index.php - call it start_cake.php or something and put it where you can include it. In that file: 2. alter the include paths to suit your environment so that cake can be found. 3. remove the call to Dispatcher almost at the

Re: svn or git?

2009-02-02 Thread Martin Westin
@leo I know what you mean. That is why, for two years, I stubbornly kept using SmartSVN, which is free but horrible in comparison. After trying Cornerstone and smiling with every commit, I gladly paid the license for Cornerstone... or I should say my employer reluctantly did :) --~--~-~

Re: i am unable to validate the empty fields and scripts

2009-02-02 Thread Marcelo Iwata
maybe using Sanitize::paranoid method.. They mention as the strictest way of doing this kind of task. http://www.ibm.com/developerworks/library/os-php-cake3/index.html good luck. On Mon, Feb 2, 2009 at 7:17 AM, aman batra wrote: > > i want to flash an error messege whenever someone tries to add

ORM

2009-02-02 Thread persivo_cunha
Does anyone know if there is some trouble if, in an one-to-many relationship, i don't put $hasMany variable in one of the models, but to put $belongsTo in the other. Is this right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Top 10 Framework

2009-02-02 Thread sunertl
I tested Yii for a while. It seems nice but not as fully featured as Cake. E.g. code generation is not even half as nice as in Cake - relations are made by hand in every model, controller, view. a little bit annoying. But it is fast as hell. I implemented a little project database which I also mad

Re: Where to define constants

2009-02-02 Thread Turgs
Thanks Brian!! I knew they would be a logical place somewhere. Cheers Turgs On Feb 2, 4:38 am, brian wrote: > Place them in config/bootstrap.php. > > But, if you're doing language-specific stuff, you'd be *far* off > creating .po files and putting them in the locale dir. > > On Sun, Feb 1, 2009

Re: Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Graham Weldon
If some association exists between these objects, you can do something like: $this->User->save($this->data); $this->User->Site->save(array('Site' => array( 'user_id' => $this->User->id, // --- any other data ))); $this->User->Site->SitePage->save(array('SitePage' => array( 'site_i

Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Turgs
Hello all What's an appropriate use of requestAction()? I have 3 controllers: * UsersController * SiteController * SitePagesController Within the add() function of UsersController, I want to (a) create a new user (b) create a new site for that user with (c) one new page for that site.

Re: Top 10 Framework

2009-02-02 Thread the_woodsman
I just gave Cake a 5 star rating :) On Feb 2, 12:11 am, yusuf widi wrote: > Hi guyz... i got this somewhere on the net... > > http://www.phpframeworks.com/top-10-php-frameworks/ > > Why they put cake php on the fifth place? i dont think we were worse than > those framework... :) > does anyone h

singular, plural and correpsonding translations

2009-02-02 Thread Paamayim
Hi, is this the right way for a cake app to support singular/plural terms? default.po of the language: msgid "item" msgid_plural "items" msgstr[0] "" msgstr[1] "" In the app may I use then: Inflector::pluralize(i18n::translate('item')) to get plural translation of "item", after setting proper

Re: URL Problem | Adding Slash at the end makes any difference ?

2009-02-02 Thread Sridhar Kuppalli
Hey Thanks Miles. It has solved my issue. One more basic problem I struct in question is I have a products/view/ page ( Products controller and view method ) eg : http://xyz.com/products/view/leatherProd So in this page what should be the href value for any other products eg. http://xyz.com/produ

i am unable to validate the empty fields and scripts

2009-02-02 Thread aman batra
i want to flash an error messege whenever someone tries to add any php or javascript on the comments tag on any image on my website. i have stripped the scripts but now it is adding an empty comment on the comments field rather than displaying an error messege. this is my strip script beforevalid

Re: loading cake into code

2009-02-02 Thread Miles J
App::import('Model', 'ModelName'); $model = new ModelName(); But that would only work within the cake system itself. On Feb 1, 8:20 pm, bwragg wrote: > Hi all, > > We have some code written in an existing app and will be migrating it > to cake in the future but for step 1 of the migration we ne