Re: Auth component and login() layout

2010-09-29 Thread arro
no problem if we use different layout for that function.. what is the error message? On Sep 30, 4:41 am, tekomp wrote: > I wanted to use a different layout for my login page, so in > users_controller.php, I have this: > > function login() { >         $this->layout = 'login'; > > } > > What's str

function addMarker in googlemap helpers

2010-09-29 Thread arro
hii...is there any tutorial her how to make function marker in google maps helper? I want to make marker when I click on the map and save it to database.. I've been searching in google, but totaly different in cakephp... Check out the new CakePHP Questions site http://cakeqs.org and help others wi

Re: date fields

2010-09-29 Thread wrdevos
Or you might just use PHP to do it: echo date('l, d-m-Y', strtotime($this->data['Model']['date_field'])); Further reading: http://php.net/manual/en/function.date.php http://www.php.net/manual/en/function.strtotime.php ~wrdevos On Sep 29, 4:50 pm, "Mike Karthauser" wrote: > On Wed, September 29

Re: Issue getting deeper info

2010-09-29 Thread wrdevos
Hi Michael, take a look at the Containable behavior: http://book.cakephp.org/view/1323/Containable That should fix your problems easy enough. ~wrdevos On Sep 30, 4:02 am, Michael Gaiser wrote: > Might this have anything to do with it using the tree behavior? > On Sep 29, 2010 7:14 AM, "Michael

Re: Do I need to use sanitize?

2010-09-29 Thread Dr. Loboto
I personally never user Sanitize as don't want to break user-entered data. Instead of it I use h() to escape all text on HTML output. On save to database also nothing needed as Cake properly escape data itself. So if you send HTML emails you need just escape user-entered text and that's all. On Se

Re: Issue getting deeper info

2010-09-29 Thread Michael Gaiser
Might this have anything to do with it using the tree behavior? On Sep 29, 2010 7:14 AM, "Michael Gaiser" wrote: > I will also add that changing the recursive setting does not seem to work. > > ~Michael Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Re: Is it possible to get a query and display it to views/layouts/default.ctp? Cake 1.3?

2010-09-29 Thread Louie Miranda
I got it. Add the variables on function beforeFilter() { $cartcount = '123'; $this->set(compact('cartcount')); } on app/app_controller.php It worked. -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Thu, Sep 30, 2010 at 8:22 AM, Louie M

Re: Is it possible to get a query and display it to views/layouts/default.ctp? Cake 1.3?

2010-09-29 Thread Louie Miranda
Data variables did not worked when placed on views/layouts/default.ctp? -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Wed, Sep 29, 2010 at 3:54 PM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > Put it in an element - in fact your whol

Auth component and login() layout

2010-09-29 Thread tekomp
I wanted to use a different layout for my login page, so in users_controller.php, I have this: function login() { $this->layout = 'login'; } What's strange though is that according to the Auth component docs, code in the login() function will only execute after authentication is attempted

Re: reporting component

2010-09-29 Thread rez...@gmail.com
http://bakery.cakephp.org/articles/view/report-creator-component I think he mean that component Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" gr

DB_ACL 1.3 X Multiple Apps

2010-09-29 Thread Celso
In the 1.2, works (fine) with this tree: app1/ controllers/ controllerName/ actionName/ app2/ controllers/ controllerName2/ actionName2/ But in db_acl 1.3 does not works...and cake does not provide the actionPath.. How works in 1.3? Thanks, Celso. Check out the new CakePHP Questio

Re: Redirection based on validation results.

2010-09-29 Thread j.blotus
that or create a separate function to search for an existing user before adding instead of using cake's validation rules On Sep 29, 1:00 pm, Anthony wrote: > > It sounds like you are saving a record right? When you are done with > > your $this->Model->save(), the id of the record will be in $this

Re: Redirection based on validation results.

2010-09-29 Thread j.blotus
Well if you want to break MVC, you could instantiate the Controller class and use the redirect function in your model, e.g., App::Import('Core', 'Controller'); $controller = new Controller(); $controller->redirect('http://mysite.com/playerPage'); On Sep 29, 1:00 pm, Anthony wrote: > > It sounds

Re: Need help finalizing the configuration of my CakePHP setup

2010-09-29 Thread cricket
On Tue, Sep 28, 2010 at 8:54 PM, Dan wrote: > > Cake core: c:\cake\ > > ... > >        if (!defined('CAKE_CORE_INCLUDE_PATH')) { >                define('CAKE_CORE_INCLUDE_PATH', DS.'cake'); >        } That should be, 'c:' . DS . 'cake', no? Check out the new CakePHP Questions site http://cakeqs

Re: Redirection based on validation results.

2010-09-29 Thread Anthony
> It sounds like you are saving a record right? When you are done with > your $this->Model->save(), the id of the record will be in $this- > > >Model->id and you can redirect from there in the controller. Correct, this part I have done. When a new player is saved the redirect takes you to the act

Do I need to use sanitize?

2010-09-29 Thread WhyNotSmile
I'm creating a website which has a few forms, and wondering whether I need to use Sanitize for those. In each case, there are a few text boxes which accept input from visitors; that information gets emailed to a central address. Nothing is stored in the database. Do I need to use sanitize for th

Re: Redirection based on validation results.

2010-09-29 Thread j.blotus
It sounds like you are saving a record right? When you are done with your $this->Model->save(), the id of the record will be in $this- >Model->id and you can redirect from there in the controller. Why would you want to redirect during validation? Validation is generally for the saving and updating

Redirection based on validation results.

2010-09-29 Thread Anthony
Each server has many players and players belong to a server. Each player may have the same first and last name but only one per server. I have a custom validation that is working correctly when the form is submitted. My thoughts were to kill two birds with one stone and have the validation funct

Re: New model obj doesn't get populated with data after set() and save()?

2010-09-29 Thread psybear83
To be a bit more specific... I want to test an unchangeable field "name" of my model: function testShouldNotAcceptNameAsParameter() { // Name is generated automatically $o = new Contract(); $o->create(); $o->set($this->getValidDataExcept(array('name' => 'New Name'))); // Load valid data

Re: New model obj doesn't get populated with data after set() and save()?

2010-09-29 Thread Joshua Muheim
To be a bit more specific... I want to test an unchangeable field "name" of my model: function testShouldNotAcceptNameAsParameter() { // Name is generated automatically $o = new Contract(); $o->create(); $o->set($this->getValidDataExcept(array('name' => 'New Name'))); // Load valid

Re: date fields

2010-09-29 Thread Mike Karthauser
On Wed, September 29, 2010 3:22 pm, james livsey wrote: > yeah its a database field - just a regular date outputting 'September 29 > 2010' but i need to 'add' the day to that output - does that make sense? > > so if the outputted date is the above i need to work out that the day is a > Wednesday.

New model obj doesn't get populated with data after set() and save()?

2010-09-29 Thread psybear83
Hi all Why is a new model object not populated with data etc. after creation? $o = new Contract(); $o->create(); $o->set($this->getValidDataExcept(array('number' => '555-66-777'))); $o->save(); // The save works - an array with fields' data is returned debug($o->field('number'

Re: date fields

2010-09-29 Thread james livsey
yeah its a database field - just a regular date outputting 'September 29 2010' but i need to 'add' the day to that output - does that make sense? so if the outputted date is the above i need to work out that the day is a Wednesday. Thanks for replying! On Wed, Sep 29, 2010 at 3:19 PM, Tilen Maj

Re: date fields

2010-09-29 Thread Tilen Majerle
Time Helper u mean? or u mean database fields? "created" and "modified" ("updated") -- Tilen Majerle http://majerle.eu 2010/9/29 james > Hi, > > is there a cake way to work out the day from a date field? > > thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help other

date fields

2010-09-29 Thread james
Hi, is there a cake way to work out the day from a date field? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gro

Re: Issue getting deeper info

2010-09-29 Thread Michael Gaiser
I will also add that changing the recursive setting does not seem to work. ~Michael Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To pos

Debug error with media view

2010-09-29 Thread Jeremy Burns
I am using the media view to allow customers to download PDF documents they have purchased. Everything is working fine, but the debug.log has these lines in it: 2010-09-28 22:53:24 Notice: Notice (8): ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in [/xxx/cake/libs

relationship problem

2010-09-29 Thread Abhishek Ubhadia
i have 4 types of users for User table 1) admin 2) agent 3) advertiser 4) client. Onc real estate property have three users like client of that property, agent of that property and advertiser. how should i get 3 users from the same 'User table' for one property so i can show them in property detai

Need help finalizing the configuration of my CakePHP setup

2010-09-29 Thread Dan
I thought I understood the advanced configuration of CakePHP... however, I keep getting the error stated at the bottom of this email... Cake core: c:\cake\ The rest: c:\Apache2.2\htdocs\app My config file: /** * The full path to the directory which holds "app", WITHOUT a trailing DS. * */

Re: Model validates when needed field is not available in $data array!

2010-09-29 Thread Joshua Muheim
Oh, I found the problem. Because I used the fixture with the ID 1, the record was already available in the test-DB and so actually there was a value of number when no number key was in the array. :-) Thanks anyway. On Wed, Sep 29, 2010 at 12:02 PM, psybear83 wrote: > Hi everybody > > I'm doing so

Mysql GROUP in containable not working

2010-09-29 Thread Bryan Paddock
Hey all, Trying to use GROUP by in containable behaviour and it's not working as expected. Ratings model has fields: *Rating.id, Rating.restaurant_id, Rating.rating (1-5)* I have a query (which amongst other things) fetches the average + total ratings for a restaurant: $restaurant = $this->Rest

Model validates when needed field is not available in $data array!

2010-09-29 Thread psybear83
Hi everybody I'm doing some unit testing right now, and I stumbled over the following... I have a model Contract, which has the following validation rule: class Contract extends AppModel { var $name = 'Contract'; var $validate = array( 'number' => array('rule' =>

Re: model->delete error

2010-09-29 Thread Frobozz
We've found the reason of the error. CakePHP bug reopened: http://cakephp.lighthouseapp.com/projects/42648/tickets/250-model-delete-bug On 28 сен, 12:36, Frobozz wrote: > We have exactly the same problem on production server now with CakePHP > 1.3.x applications. Did you succeed in solving this i

Re: Is it possible to get a query and display it to views/layouts/default.ctp? Cake 1.3?

2010-09-29 Thread Jeremy Burns | Class Outfit
Put it in an element - in fact your whole cart should be an element. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Sep 2010, at 08:25, Louie Miranda wrote: > Hi, > > I have this shopping cart where I am trying to figure out how can I display a > query

Is it possible to get a query and display it to views/layouts/default.ctp? Cake 1.3?

2010-09-29 Thread Louie Miranda
Hi, I have this shopping cart where I am trying to figure out how can I display a query (example numbers of items on cart) and display it on my views/layouts/default.ctp file? Image http://i141.photobucket.com/albums/r50/louiemiranda/debug/shopcart.png On a normal controller, I would just add th