Re: hi need to maintain to layouts one for admin and one for remaining

2011-11-13 Thread anjith
Hi, I have created admin routing, so controllers are having functions with admin_index etc, and in the url it is admin/controller_name, cant i specify for admin/controller_names a template. On Nov 14, 11:54 am, Sadikul Ameen Mohamed wrote: > Use this code in App_controller > > if($this->params[

Re: hi need to maintain to layouts one for admin and one for remaining

2011-11-13 Thread Sadikul Ameen Mohamed
Use this code in App_controller if($this->params['controller'] == 'admins') { $this->layout = 'admin_layout'; } On Nov 14, 11:48 am, anjith wrote: > Hi, > > I need to have two layouts one for admin and one for remaining all > pages. > > How to create new admin template just like default

hi need to maintain to layouts one for admin and one for remaining

2011-11-13 Thread anjith
Hi, I need to have two layouts one for admin and one for remaining all pages. How to create new admin template just like default.ctp and how to specify that to functions of admin controller. Regards, Anjith Kumar G -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakeph

Re: CakePHP 2.0.3 out of the oven

2011-11-13 Thread stefanski
Many Thanks to the core team. You guys are fantasic! I love CakePHP -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from th

Re: Strange Session Data Corruption on CakePHP

2011-11-13 Thread Rayhan Chowdhury
Yes, I want to back to this url later, but it gets changed, so I am in big trouble... On Nov 13, 10:28 pm, AD7six wrote: > On Nov 13, 12:47 pm, Rayhan Chowdhury wrote: > > > > > > > > > > > Hi, > > > I am getting a very strange problem in CakePHP. When I store data into > > session, it works. On

Message: No input file specified.

2011-11-13 Thread Mister Mistah
hello, i'm just beginning to start the blog tutorial and have completed the initial setup of cakephp. i'm getting all green lights, except when i start going into the views. for example, when i type www.example.com/posts, i get the message "No input file specified." reading around i see that pe

Re: primaryKey in cake 2.0

2011-11-13 Thread Graham Weldon
Can you provide a code sample to reproduce this? Cheers, Graham Weldon http://grahamweldon.com e. gra...@grahamweldon.com p. (+61) 0407 017 293 Skype: grahamweldon On Monday, 14 November 2011 at 3:50 PM, sixthpoint wrote: > I have been running into a issue once upgrading to cake 2.0. When > de

primaryKey in cake 2.0

2011-11-13 Thread sixthpoint
I have been running into a issue once upgrading to cake 2.0. When defining a HABTM association and then setting the primaryKey var in each of my models. It fails to utilize my altered primary key in the association. It resets to the default "id" field as the primary key in each model. Has there bee

Re: TimeHelper problem

2011-11-13 Thread Thiago Belem
Did you enabled the TimeHelper on the $helpers property on your Controller? http://book.cakephp.org/2.0/en/controllers.html#Controller::$helpers Cya, -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil +55 (21) 8865.9250 thiagobelem.net cont...@thiagobelem.net *Skype / gTalk **»* thi

TimeHelper problem

2011-11-13 Thread john lyles
I am using Cake v2.0.2 Why would the following generate this error??: Fatal error: Call to a member function format() on a non-object in C: \xampp\htdocs\myapp\View\Themed\mytheme\posts\index.ctp on line 6 $this->Time->format('F j, Y', $post['Post']['created']); -- Our newest site for the com

CakePHP 2.0.3 out of the oven

2011-11-13 Thread José Lorenzo
The CakePHP core team is proud to announce the immediate availability of CakePHP 2.0.3 [1]. A lot has happened in the PHP world since our last release, this new version incorporates all needed changes needed to adapt to the ever evolving world of PHP frameworks. One of the big changes out the

Re: How to paginate "subtable" in a view?

2011-11-13 Thread Sam Sherlock
Paginate returns results paginated. Find returns unpaginated data - S On 13 Nov 2011 16:51, "Daniel" wrote: > On Nov 13, 11:01 am, phpMagpie wrote: > > You can't paginate data you have fetched with $this->Model->find() you > > must use $this->paginate(). > > > > HTH, Paul. > > OK, here is what

Re: How-to URL modification

2011-11-13 Thread phpMagpie
Links to the relevant book pages: http://book.cakephp.org/view/945/Routes-Configuration // 1.3 http://book.cakephp.org/2.0/en/development/routing.html#routes-configuration // 2.0 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Quest

Re: How to paginate "subtable" in a view?

2011-11-13 Thread phpMagpie
Daniel, You're trying to do a find (for your Category data) and thinking you can then paginate the contained Posts it fetches, you cannot. I advise you spend some time going through the book's pages on pagination to understand it: http://book.cakephp.org/view/1231/Pagination In essence you nee

Re: How-to URL modification

2011-11-13 Thread wudu
In your users controller (cake 2.0): function view($id = null) { if (!empty($this->request- >params['userid'])) { $id = $this->request->params['userid']; } ...} In your routes.php:Router::connect('/:userid', array('controller' => 'users', 'action' => 'view'), array('u

Re: Auth - 2 logged in models simultaneously

2011-11-13 Thread phpMagpie
For them to exist as separate entities and at the same time they will need their own (and I assume on the same client) then you will need them to use separate sessions, well pretty much separate everything ... not sure how easy that is going to be to configure, i possible at all. In summary, yo

Auth - 2 logged in models simultaneously

2011-11-13 Thread wudu
I have Users and Admins models. For various reasons I don't want to merge them and use "role/type" field. Is it possible to use Auth component so that Admin and User can both be logged in at the same time? I'm using cakephp 2.0 -- Our newest site for the community: CakePHP Video Tutorials http:/

How-to URL modification

2011-11-13 Thread Sushil Gupta
Hi! I'm a CakePhp beginner. In my app, users can view their details from, http://myapp/users/view/userid. But I what I want is, http://myapp/userid. How do I do this? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site h

Re: How to paginate "subtable" in a view?

2011-11-13 Thread Daniel
On Nov 13, 11:01 am, phpMagpie wrote: > You can't paginate data you have fetched with $this->Model->find() you > must use $this->paginate(). > > HTH, Paul. OK, here is what I tried: $this->set( 'category', $this->paginate( $this->Category->find(

Re: Strange Session Data Corruption on CakePHP

2011-11-13 Thread AD7six
On Nov 13, 12:47 pm, Rayhan Chowdhury wrote: > Hi, > > I am getting a very strange problem in CakePHP. When I store data into > session, it works. On next page load it gets changed automatically. > --- > Like: >             pr($this->Session->read('data')); >             $this->Session->write('d

Re: Having layout breaking because of a whitespace?

2011-11-13 Thread Sam Sherlock
Really this is a css question. Using cake as your front end is not the cause of the whitespace. Perhaps some css applied to the container is adding space. Either way your question is better suited to a list such as webstandardsgroup.org/mail/ - S On 13 Nov 2011 09:20, "heohni" wrote: > Well,

Strange Session Data Corruption on CakePHP

2011-11-13 Thread Rayhan Chowdhury
Hi, I am getting a very strange problem in CakePHP. When I store data into session, it works. On next page load it gets changed automatically. --- Like: pr($this->Session->read('data')); $this->Session->write('data', '/mine2share.com/trunk/ inviters/invitation/64/4');

Re: Ignoring 'belongsTo' inside model

2011-11-13 Thread phpMagpie
another thread has now been started about this: http://groups.google.com/group/cake-php/t/425ad9184aea7654 Will be interesting to see the results, I have never heard anyone else complain about this at any length so doubt it is that much of a factor. Certainly not enough for me to manually bind an

Re: Making a real mess of Auth Component

2011-11-13 Thread Ed Propsner
Yikes! I almost feel foolish seeing that ;) No harm done, I've gotten into areas I' never messed with and learned a few things in the process. Thank you. On Sun, Nov 13, 2011 at 5:59 AM, majna wrote: > https://gist.github.com/1361982 > > -- > Our newest site for the community: CakePHP Video T

Re: How to paginate "subtable" in a view?

2011-11-13 Thread phpMagpie
> But I get the error: > Undefined property: View::$Paginator [APP\views\categories\view.ctp, > line 69] You can't paginate data you have fetched with $this->Model->find() you must use $this->paginate(). HTH, Paul. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp

Re: Making a real mess of Auth Component

2011-11-13 Thread majna
https://gist.github.com/1361982 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+uns

Re: Making a real mess of Auth Component

2011-11-13 Thread Ed Propsner
I've been beating myself in the head with "the bible" for quite some time now ;) "misusing Basic HTTP authentication" is purely me "misusnderstanding Basic HTTP authentication." ... I've come to the conclusion hours ago that I was heading down the wrong road with it and switched gears accordingly.

Re: Making a real mess of Auth Component

2011-11-13 Thread majna
This chapter is about creating custom Auth: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html?highlight=auth#creating-custom-authentication-objects -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: Making a real mess of Auth Component

2011-11-13 Thread majna
> > When I initiate the login() it succeeds every time even though it should > most definitely be failing. > When you pass $user param, it's up to you to authenticate. https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Controller/Component/AuthComponent.php#L511 I'll suggest you to create F

Re: CakePHP and Sqlite

2011-11-13 Thread Matteo Landi
On Sun, Nov 13, 2011 at 5:25 AM, zer0_gravity wrote: > Having trouble setting up CakePHP to work with Sqlite? could you > explain or point me to where I can get info in rewards to this. > > thanks > FWIW a couple of weeks ago I wrote a mini-tutorial about how to setup a SQLite connection within C

Re: Having layout breaking because of a whitespace?

2011-11-13 Thread heohni
Well, the funny thing is: When I take out the complete part, the white space is gone. So I am pretty sure, it's not within the elements, it somewhere inside the part. Also strange: If I take all out what I have inside the (and add an dummy ) the blank line is still there... My css for the is

Re: Schema migrations like RoR

2011-11-13 Thread Chris Cinelli
Are those any better than LiquidBase? On Sat, Nov 12, 2011 at 11:54 PM, Sathia S wrote: > http://lquery.com/blog/cakephp-migration-plugin---part-1 > > -- > Regards > > sathia > http://www.sathia27.wordpress.com > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.ca