Need help on password generation

2009-05-26 Thread liaogz82
Hi all, I need help on the cakePHP coding. I have a function called generatePassword() in the controller. I want to create an ajax link in such a way that user can click on the link and it will talk to the method, take the password and display it on the textbox. Can this be done? Gangzheng --~--

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Thanks. What I'm missing is some kind of listing where it's clearly defined which form field in cake is associated with which datatype in mysql. something like $form->input ---> varchar, text $form->minute & hour --> datetime $form->checkbox --> some kind of int field for setting "0" or "1" Tha

Re: Moving a webapp from Windows to Linux

2009-05-26 Thread ShiVik
Hello there This is the error that I am getting. Failed opening required 'cake/bootstrap.php' (include_path='/webapp/ code/app1/cake:/webapp/code/app1/:.:/opt/lampp/lib/php') in /var/www/ webapp/htdocs/index.php on line 88 Thanks and Regards Vikram On May 27, 2:52 pm, Braindead wrote: > Are y

Re: Moving a webapp from Windows to Linux

2009-05-26 Thread Braindead
Are you sure that your problem is related to the PATH_SEPARATOR? I guess they use the constant PATH_SEPARATOR to make it work on Windows and Linux without having to worry about that. I also develop on Windows using XAMPP and my production server is on Linux. I never had that kind of problems. --~-

Re: Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Braindead
I use admin routing to build an administration interface that has a minimalistic design and is quite straight forward to the need to administer the main page (write news, edit user profiles etc.) So if you don't require this kind of admin interface than there is no need to use admin routing at all

Moving a webapp from Windows to Linux

2009-05-26 Thread SeeVik
Hello all, I created an application on WIndows using XAMPP. Now I want to move the application to LAMPP on Ubuntu. The thing is it seems like PATH_SEPARATOR constant in Cakephp seems to set to ":" (a colon) in linux, so my include path is appearing like ".:/opt/lampp/lib/php". Where should I cha

Re: Validation and the return of data

2009-05-26 Thread Braindead
echo $form->input( 'password', array( 'type' => 'password', 'value' => '' ) ); Hope that helps, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this grou

Re: Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Matti Putkonen
When sticking the isAuthorized functionality to AppController and running it automatically with BeforeFilter you can get the protection easily to all admin actions, no matter how many you have, automatically. This is what I did with BakeSale (http:// www.bakesalepro.com/). On 27 touko, 05:08, Sid

Re: CakePHP Admin section w/ Separate HTML files

2009-05-26 Thread Miles J
Use the admin routing, or create a whole separate cake php for the admin but share models between the 2 apps. http://book.cakephp.org/view/46/Routes-Configuration http://book.cakephp.org/view/35/Advanced-Installation --~--~-~--~~~---~--~~ You received this message

Re: What's the preferred authentication module?

2009-05-26 Thread Miles J
AuthComponent http://book.cakephp.org/view/172/Authentication --~--~-~--~~~---~--~~ 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 gr

complex query for pivot table

2009-05-26 Thread 0x1A4
hey all, i have a problem here.There are 2 tables contracts and holders. [contracts] -id -holder_id -duration -contract_no -contract_title -date_start -date_end -created [holders] -id -name i need to display it in a table order by holder's names. [holders][no of contracts][average duration][d

What's the preferred authentication module?

2009-05-26 Thread Jorge Garifuna
I would like to add a registration page to my site. I noticed the tutorials section has a few authentication modules. I would like to know if there is a standard (or preferred) authentication module in CakePHP. Thanks, Jorge --~--~-~--~~~---~--~~ You received thi

Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Sidney
Hi All, This is a general question - I have read the manual, and got the code working. In my app I have a need for some admin functions e.g. reset password and change user status (banned/vip etc). So I set up admin prefix routing by uncommenting Configure::write ('Routing.admin', 'admin'); in

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Brendon Kozlowski
Although there are some discrepancies or missing inforrmation in the Cookbook, the nice thing is that we, as a community, can offer suggestions to improve it. It's basically a huge moderated Wiki (or integrated and web-based Trac system for documentation). ...either way, even without a definition

Validation and the return of data

2009-05-26 Thread frodosghost
Howdy Guys, I am working on a little bit of data validation. I have a code setup to check the password and the password_confirm are correct, everything is working well, except for when the data doesn't validate. When the password do not match, and it brings up the error message, the password fiel

Re: Forms with math computations and multiple buttons

2009-05-26 Thread espontaneo
it works, thanks! I have another question, how can I format the computed values coming from my component? brian-263 wrote: > > > if (isset($this->params['form']['compute'])) > > On Tue, May 26, 2009 at 3:31 AM, espontaneo wrote: >> >> >> Hope you guys could help me. I am currently workin

CakePHP Admin section w/ Separate HTML files

2009-05-26 Thread Sphinx06
I need some serious help ASAP. I'm working on a project and I decided to use CakePHP and I want to use CakePHP for the admin portion of the site (to add products to a store, etc). I finished that portion and now I'm trying to actually tie in the html into it and I'm having issues. Is there a wa

Re: how to integrate openID with Auth component?

2009-05-26 Thread Matti Putkonen
Some code I used way back when using the Auth + OpenId: http://trac.assembla.com/bakesale/browser/bakesalehq/controllers/users_controller.php On 24 touko, 20:55, Andrei Thomaz wrote: > dear forum, > > I am developing a very simple admin with CakePHP. I want the user be > able to login using Ope

Re: Poll: what do you hate about CakePHP?

2009-05-26 Thread Nate Abele
Guys, Thanks so much for all the feedback. Some of it we can act on now, some of it we may be able to act on in the future, and some of it we might never be able to resolve directly, but it's helpful to know what's important to you regardless. We've got a few good goals for the upcoming version

Re: Can I called CakeLog::write() like this?

2009-05-26 Thread Jules
That's it Mark, thanks! --~--~-~--~~~---~--~~ 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 cake-php+unsubscr.

Re: Involuntary logouts - WHY?

2009-05-26 Thread Miles J
Try changing this: $this->Auth->allow('display'); $this->Auth->allow('recoverpassword_submit'); $this->Auth->allow('*'); To this: $this->Auth->allow('display', 'recoverpassword_submit'); By putting the * your overwriting the other 2. You also only need to call allow() once but supply many argu

Involuntary logouts - WHY?

2009-05-26 Thread foldiman
My Cake built site is in QA and is receiving bugs from testers saying they are getting involuntarily logged out at random places in both the admin and public side. I'm using a simple implementation of the Auth component...no Acl. I have my Security set to low for long sessions. But I'm really stu

Add actions to model dinamically in behavior

2009-05-26 Thread Gabriel
I'm working with an image behavior, that stores resized images for the specified fields. Thats work fine. To get the images i have to define an action in the controller for each image field... i'm wonder if can i add these actions dinamically in the behavior? Thanks in advance and sorry by mi

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi Brendon, the problem I have with the Cookbook is that many methods aren't documented that well. The "minute" function for example...I couldn't find any info what values are allowed for "attributes". The method is just defined but not documented that well. On 26 Mai, 20:24, Brendon Kozlowski

Re: Good way to paginate my index view by several keys / and-conditions

2009-05-26 Thread Bs
Well, right now my index looks just like in the cookbook sort('Country', ''Country'); ?> sort('Postal', 'Postal'); ?> sort('Region', 'Region'); ?> sort('City', 'City'); ?> .print the model entries When the user clicks "Country" the model view is ordered by country, when he clicks "Post

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Thanks christo, I'll look into the stuff you wrote. I didn't understand it fully, but I'll look into it more closely tomorrow. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group,

How do I bake pre-existing tables with non-conforming names?

2009-05-26 Thread Jorge Garifuna
I have a few database tables that were created several years ago and are now heavily dependent upon for pre-existing components. I would like to use cakePHP to bake a portion of the application to make publically available. My issues is that the command "cake bake all" is failing the create the m

set and field of more words

2009-05-26 Thread fain182
hello, usually a do something like: $this->set('posts', $this->Post->find('list'); and a $form->input() create for me a select, automagically, using $posts.. but when i have to do a select with a field that contains spaces, like "post of the month" i don't know how to solve the question.. because

Re: regarding the HTML link helper..

2009-05-26 Thread Abhishek
Hi Andrew, It worked .. thanks a lot .. On May 24, 1:31 am, Andrew McCafferty wrote: > If you're not doing any advanced routing then this should work: > > link('Go', '/users/index'); ?> > > On 23 May, 15:21, Abhishek wrote: > > > Hi, > > When i use this to generate the link > > $html->link('Go

Re: user/group dependent redirect

2009-05-26 Thread draikin
This doesn't work for me. I added the redirekt in app_controller and create a new function home() in users_controller: function home() { $userinfo = $this->Auth->user(); // assuming the group is in there switch($userinfo['User']['group_id'])

Add id to error-message div element

2009-05-26 Thread ross.hagg...@googlemail.com
Hi Is it possible to add an id to the error-message div, tried adding it to the $validate array in the model. I want an id that's specific to the form field. Cheers R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: user/group dependent redirect

2009-05-26 Thread draikin
It seems that the rest of your post has been lost. Could you complete the post? Thank you, draikin brian schrieb: > On Tue, May 26, 2009 at 11:02 AM, Teh Treag wrote: > > > > in your app_controller::beforeFilter(){ > >    $this->Auth->loginRedirect=array > > ('controller'=>'users','action'=>'ho

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Brendon Kozlowski
It doesn't look like you're using the FormHelper's methods properly. Looking at the API, and just the minute's method, I see it's incorrectly used. function minute($fieldName, $selected = null, $attributes = array(), $showEmpty = true){ //... } Check the book (book.cakephp.org) and Core Helpe

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread christo
Model::deconstruct() may be what you are looking for. I had some trouble with a save() call that wouldn't work with the date array from formhelper. I think save() is supposed to call deconstruct, which turns arrays from the form into the right format for the insert. My save() was choking on the da

Re: Add global function to parse content

2009-05-26 Thread Benedikt R.
I put my code in the bootstrap: $replacementsFolder = 'contentReplacements/'; $searchTemplate; $searchContent = ''; $adSenseTemplate; $adSenseContent = ''; $searchTemplate = $replacementsFolder . 'searchField.tpl'; $adSenseTemplate = $replacementsFolder . 'googleAdSense.tpl'; if ( file_exists(

Re: Add global function to parse content

2009-05-26 Thread Alexandru Ciobanu
On 05/26/2009 08:10 PM, Benedikt R. wrote: > Hmm... I forgot to mention, that I want to read seperate templates > from files and place them at this position. So this will be too much > code. I need a seperate function that does that. > Global function should go in your bootstrap.php. --~--~--

Re: HABTM (tags) - using a text input instead of a select.

2009-05-26 Thread Paolo Portaluri
Il giorno 26/mag/09, alle ore 18:49, number9 ha scritto: > > It really isn't feasible to use a select input since a project I am > working on is likely to produce a large amount of tags. I basically am > looking to create something akin to wordpress where when a new "post" > is created, there is

Re: Add global function to parse content

2009-05-26 Thread brian
bootstrap.php would work On Tue, May 26, 2009 at 12:57 PM, Benedikt R. wrote: > > Hey! > > Is there a way to add a global function (which can be called either > from the layout, a view or a controller) that parses a string? > > For example: > I have a string that contains an article: "Lorem ipsu

Re: Good way to paginate my index view by several keys / and-conditions

2009-05-26 Thread brian
OK, I understand. It looks like you'll need to check $this->params and deal with yourself some of the things paginator does automatically. The principle is the same, however: just add however many fields you need to the order array. It seems like you're going to make the interface overly complica

Re: Add global function to parse content

2009-05-26 Thread Benedikt R.
I already got a component, that I am using in my controller: replacementsFolder . 'searchField.tpl'; $adSenseTemplate = $this->replacementsFolder . 'googleAdSense.tpl'; if ( file_exists( $searchTemplate ) ) { $fil

Re: HABTM (tags) - using a text input instead of a select.

2009-05-26 Thread Dan Soendergaard
Take a look the the Simple Tagging Behavior: http://bakery.cakephp.org/articles/view/simple-tagging-behavior On May 26, 6:49 pm, number9 wrote: > It really isn't feasible to use a select input since a project I am > working on is likely to produce a large amount of tags. I basically am > looking

Re: cookie stays empty on production server

2009-05-26 Thread CheshirePuss
OK fixed it, it had to do with a serialized array, which also had to be urlencoded, why I'm not sure, but that fixed it. I guess WAMP doesn't give the cookie some extra treatment the server did. On May 26, 2:10 pm, CheshirePuss wrote: > Another difference I found was that on the local server, wh

Re: Add global function to parse content

2009-05-26 Thread Benedikt R.
Hmm... I forgot to mention, that I want to read seperate templates from files and place them at this position. So this will be too much code. I need a seperate function that does that. On 26 Mai, 19:01, Alexandru Ciobanu wrote: > On 05/26/2009 07:57 PM, Benedikt R. wrote:> Hey! > > > Is there a

Re: Add global function to parse content

2009-05-26 Thread Alexandru Ciobanu
On 05/26/2009 07:57 PM, Benedikt R. wrote: > Hey! > > Is there a way to add a global function (which can be called either > from the layout, a view or a controller) that parses a string? > > For example: > I have a string that contains an article: "Lorem ipsum dolor sit amet, > consetetur sadipsci

Add global function to parse content

2009-05-26 Thread Benedikt R.
Hey! Is there a way to add a global function (which can be called either from the layout, a view or a controller) that parses a string? For example: I have a string that contains an article: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labor

Re: Good way to paginate my index view by several keys / and-conditions

2009-05-26 Thread Bs
Hi, thanks for the hint but I want to provide the users with buttons to paginate the index view dynamically. Just like written in this howto http://book.cakephp.org/view/166/Pagination-in-Views but not only for singular columns but for 2, 3 or more so that they can order their view after countr

Re: .htaccess password protect admin routes

2009-05-26 Thread Sam Sherlock
http://snook.ca/archives/servers/password_protect_admin/ - S 2009/5/26 Roman Brunnemann > > Hi, > > I want to use the admin routes (this works) and protect the requests to > e.g. admin/products/edit with .htaccess > > Given that everything is rewrited there is no real admin folder, so > where d

HABTM (tags) - using a text input instead of a select.

2009-05-26 Thread number9
It really isn't feasible to use a select input since a project I am working on is likely to produce a large amount of tags. I basically am looking to create something akin to wordpress where when a new "post" is created, there is a single text box where you can enter tags with comments. If they do

Data validation: date validation doesn't work

2009-05-26 Thread jbarbede
Hi, I have a problem to obtain translated error messages when I validate dates. I have the following: - a model "Member" with the following validation rules (I use the Multivalidatable behavior) : public $validationSets = array( 'signUp' => array( 'gender'

Re: Newbie question: Query Table

2009-05-26 Thread Bysa
thanks alot. On May 26, 8:34 pm, brian wrote: > app/config/core.php > > Configure::write('debug', 0); > > On Tue, May 26, 2009 at 11:45 AM, Bysa wrote: > > > hi > > i ask my question first: > > How to remove the query table that is below of all my page, it shows > > some query and affected, tim

Re: Good way to paginate my index view by several keys / and-conditions

2009-05-26 Thread brian
On Tue, May 26, 2009 at 11:56 AM, Bs wrote: > > Hi, > > I'm trying to order my index view by several conditions. As far as I > can see from the documentation, the $paginator only accepts one key > for sorting the model. > > http://book.cakephp.org/view/166/Pagination-in-Views > >  What is the bes

Re: Newbie question: Query Table

2009-05-26 Thread brian
app/config/core.php Configure::write('debug', 0); On Tue, May 26, 2009 at 11:45 AM, Bysa wrote: > > hi > i ask my question first: > How to remove the query table that is below of all my page, it shows > some query and affected, time, and some more. i built my first blog > application and i was

Re: Forms with math computations and multiple buttons

2009-05-26 Thread brian
if (isset($this->params['form']['compute'])) On Tue, May 26, 2009 at 3:31 AM, espontaneo wrote: > > > Hope you guys could help me. I am currently working on a form that will have > two buttons: Compute and Add. > > What I wanted to do: click Compute button->computed values will populate > fields

Re: Can I called CakeLog::write() like this?

2009-05-26 Thread Mark
i usually use $this->log() as everything usually inheritades from "object" class On 26 Mai, 08:56, Jules wrote: > I've written a panic() function which resides in config/bootstrap.php, > and can be called from anywhere in my CakePHP app.  The idea is that > it is called when the site admin (me

Re: Star Rating Help

2009-05-26 Thread schneimi
Hi all, this topic brought me to create a plugin for CakePHP out of my ajax rating system to hopefully help some bakers. Because I am not sure about the requirements for the bakery, I just put it on my blog: http://schneimi.wordpress.com/2009/05/25/star-rating-plugin-for-cakephp/ Let me know w

Re: user/group dependent redirect

2009-05-26 Thread brian
On Tue, May 26, 2009 at 11:02 AM, Teh Treag wrote: > > in your app_controller::beforeFilter(){ >    $this->Auth->loginRedirect=array > ('controller'=>'users','action'=>'home'); > } > > in users_controller::home(){ >    $userinfo=$this->Auth->user(); // assuming the group is in there >    switch($

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi Stu, I tried it out with "datetime" column but that doesn't work, either. Result is "null" in the column. Here's part of my code: add.cpt: ... Opening time from hour ('OpeningStartHours',1,6);?> : minute ('OpeningStartMinutes',0,null,"00");?>

Restrict AJAX functions

2009-05-26 Thread Dave Maharaj :: WidePixels.com
How would be the way to restrict a call to AJAX specific to its controller/view? For example users_controller has a ajax function profile () journals_controller has a ajax function view () Basic idea: Using firebug you can modify URL of links so a user could change the users_controller "users/p

Re: 400 Bad Request when URL contains %

2009-05-26 Thread rich...@home
Still struggling with this one. After a bit more rigorous testing the above doesn't work :-( Anyone who has fixed this issue want to share their wisdom? :-) On May 14, 4:39 pm, "rich...@home" wrote: > After even more testing: > > Add the following to AppController beforeRender(): > >          

Re: Aggregating child field

2009-05-26 Thread brian
On Mon, May 25, 2009 at 5:39 PM, jakobjp wrote: > > I suspect this to be a pretty common thing to do, so I hope someone > can let me know how ;-) It's quite common. But nobody but The Amazing Kreskin can let you know how you have things configured. Once again: >> What do you have $this->Event->

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi Stu, thanks for your answer. I used "time" as column type, cause the start and end time in my model has nothing to do with any date, but only with the time of day (general opening times for a store, for example). So I'll have to use "datetime" as column and then simply ignore the date part (wi

Good way to paginate my index view by several keys / and-conditions

2009-05-26 Thread Bs
Hi, I'm trying to order my index view by several conditions. As far as I can see from the documentation, the $paginator only accepts one key for sorting the model. http://book.cakephp.org/view/166/Pagination-in-Views What is the best practice to order my model by several keys? (For example, or

Re: RFC 6160

2009-05-26 Thread Braulio
Hello. On 25 mayo, 03:49, WebbedIT wrote: > I didn't make the first few comments ... but in honesty I didn't even > think you could use spaces in MySQL table/field names as I've never > seen a schema in all my time using such a naming convention. Just because you did not know that it could been

.htaccess password protect admin routes

2009-05-26 Thread Roman Brunnemann
Hi, I want to use the admin routes (this works) and protect the requests to e.g. admin/products/edit with .htaccess Given that everything is rewrited there is no real admin folder, so where do I have to place my .htaccess to tell, that users accessing a admin path have to make a normal authen

Newbie question: Query Table

2009-05-26 Thread Bysa
hi i ask my question first: How to remove the query table that is below of all my page, it shows some query and affected, time, and some more. i built my first blog application and i was wondering how to remove the below table, i looked in files i created but no help. im very new to cake but i kn

Re: Can this slug code be improved?

2009-05-26 Thread number9
A simple if/else statement worked in the end, so thanks Dan, I have attached the code below in case anybody is interested... I have tried slugabble behaviour but could not get it working and decided not to bother trying to investigate since it would probably have taken a while. I hadn't come acro

Re: user/group dependent redirect

2009-05-26 Thread Teh Treag
in your app_controller::beforeFilter(){ $this->Auth->loginRedirect=array ('controller'=>'users','action'=>'home'); } in users_controller::home(){ $userinfo=$this->Auth->user(); // assuming the group is in there switch($userinf['User']['Group']){ case 'admin': $url=array('contr

Re: Can I called CakeLog::write() like this?

2009-05-26 Thread Mark
well, except for the boostrap files of course although, the function is used like this: function write($type, $msg) {} first type, then msg!!! so this might be your problem... with $this->log() its the other way around On 26 Mai, 08:56, Jules wrote: > I've written a panic() function which re

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Stu
This is strange, I had to double check in my app to check it out. It is normal for cake to store dateTime information in an array, and it "Should" save it correctly to your MySql table. Could you send your controller and view code? Taking a shot in the dark, I'd think it's because of your colum

Re: cake php is not installed correctly

2009-05-26 Thread draikin
To help you it is necessary to have some more info about your system and what you have done excatly till now. What version of cake you are using? What operatin system? Is this an (X)lampp installation or something similar? draikin On 26 Mai, 15:21, mona wrote: > can anybody tell me how to insta

user/group dependent redirect

2009-05-26 Thread draikin
Hi, for my cakePHP application I use the acl to handle authentication and authorisation. For this purpose I have 3 groups who have different rights for the application. Now I want to redirect the user after successful login, dependent on his group, to different actions in my application. And I do

Re: Cakephp Forms Security Flaw

2009-05-26 Thread @zghanv/-
Nice ... i would say ... it was undocumented for cake1.1 i checked it in core file now .. function save($data = null, $validate = true, $fieldList = array()) { Thanks. On May 4, 3:04 pm, BeroFX wrote: > Well, first of all, you need to validate the data before saving it. > > http://book.cakeph

Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi, I'm new here and just wanna say first that I'm absolutely in love with CakePHP and will definitely donate for this project. This framework saves me work each day. I have a question about handling "minute" and "hour" elements in forms. I'm using those for setting a start and end time in my mo

cake php is not installed correctly

2009-05-26 Thread mona
can anybody tell me how to install cakephp i read the manual and follow that procedure for installatiion but when i view cakephp default page using localhost it is not correctly displaying and also cake console is not working so please help me out because it's very urgent I am attaching you the sc

Forms with math computations and multiple buttons

2009-05-26 Thread espontaneo
I am currently working on a form that will have two buttons: Compute and Add. What I wanted to do: click Compute button->computed values will populate fields->click Add button(submit form) So when I click on my Compute button, the salary will be passed on a component I made and will be processed

Forms with math computations and multiple buttons

2009-05-26 Thread espontaneo
Hope you guys could help me. I am currently working on a form that will have two buttons: Compute and Add. What I wanted to do: click Compute button->computed values will populate fields->click Add button(submit form) So when I click on my Compute button, the salary will be passed on a compone

Re: find list distinct

2009-05-26 Thread fain182
> What error displays? syntax error, anyway i found the solution: http://blog.pepa.info/php-html-css/cakephp/populating-a-select-box-with-distinct-values/ find( list,..) doesn't support distinct, so i should make a lot of find all and set combine.. thank you ;-) -- pietro --~--~-~--~-

Re: cookie stays empty on production server

2009-05-26 Thread CheshirePuss
Another difference I found was that on the local server, when I check cookies in firefox, A cookie is added every time i visit the page, and when I add a vote cookie (when it works), I see as the cookie name CakeCookie[votes], whereas when I execute the same code on the production server, I get no

Re: how to abort save?

2009-05-26 Thread Teh Treag
cakephp101, You don't have to save the records that would put a blank row in your table. What validation rules are you using now? You can set some of your fields as 'notEmpty' or 'required'. You stated you are using saveAll (); are you aware of the validate option for saveAll()? http://teknoid

Re: using invalidate

2009-05-26 Thread bram
On May 26, 12:57 pm, Braindead wrote: > Why do you call save when validation in the controller fails? > Save validates your data using the validation rules in your model. If > you want to do some extra validate in your controller, you should make > sure, that you don't call save when the extra va

Re: find list distinct

2009-05-26 Thread andy
What error displays? On May 25, 2:21 pm, fain182 wrote: > > Take a look athttp://book.cakephp.org/view/809/find-count > > i tried: > $this->set('stati', >      $this->{$this->Singular}->Sito->Stato->find( >                'list', >                array('fields'=>'DISTINCT stato') >       ) > );

Re: using invalidate

2009-05-26 Thread Braindead
Why do you call save when validation in the controller fails? Save validates your data using the validation rules in your model. If you want to do some extra validate in your controller, you should make sure, that you don't call save when the extra validation fails. Did you setup validation rules

Re: using invalidate

2009-05-26 Thread Bogdan I. Bursuc
If you have no validation for that field in the Model then when you do: $this->Item->save($this->data); It will pass the validation: You should check for invalid fields if you do this in the controller something like this: if ($this->Item->invalidFields()) { if

Re: Add "created" field to HABTM join tables

2009-05-26 Thread thebeardman
Hi everyone, Just for letting you know that my 'created' and 'modified" fields are working with Datetime, Not Null and default set on None. It is working for every table except join tables as notices by Marcco, for example : I have three tables as follow: categories, contacts, categories_contact

using invalidate

2009-05-26 Thread bram
I'm trying to doo some custom validation in a controller. Code: if (!empty($this->data)) { "check some things" if "check failed" $this->Item->invalidate('field that failed'); if ($this->Item->save($this->data) { } } The Item gets saved regardless the check failes or not. Whil

Re: How to redirect to login page

2009-05-26 Thread Bryan Paddock
Hi Bharani, Read through the cakephp cookbook http://book.cakephp.org More specifically the section on auth: http://book.cakephp.org/view/172/Authentication Pointers: - set up the Auth component in your app_controller and add setup settings in th

How to redirect to login page

2009-05-26 Thread lakers fan
Hello, I m new to cakephp.. I want to check in every page whether a user has logged in or not.. If not I want to redirect him to login page. Is there a way to do it in a common place like app_controller? Thanks, Bharani

Re: How to edit translated data?

2009-05-26 Thread nastya
i use this behaviour: http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation-part-2/ find it much easier and straightforward than core cake translate behaviour... just disable it before making findAll and save in your model add and edit functions On May 25, 2:27 pm, Szymon

Re: Form vs. Function

2009-05-26 Thread grigri
>From a pure HTTP/REST point of view: Links only support the GET method. Forms support POST and GET. Retrieving information should be a GET. If the action adds/modifies a data entry, it should be a POST. Therefore, use links. For example: Would it matter if google/some other bot crawled the li

can't get data from multiple databases

2009-05-26 Thread reuvers
Hello, At the moment i'm using three models, two of them have the same database and the other one uses a different one. the center model name is coursedate, a coursedate is linked to a course (this works) but it's also linked to a user(teacher) but this doesn't work(from another DB). here are the

Re: RSS feed not validating

2009-05-26 Thread Miles J
Haha yeah must of been it, that worked. I allowed with Auth. Something like that just completely went over my head. Thanks again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group