Re: Authenticate user to only add/edit/view with their user_id

2007-09-14 Thread McFadly
http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x On Sep 14, 3:58 pm, seans9 <[EMAIL PROTECTED]> wrote: > I've read so many tutorials on Authenticating and not one has the > answer to my questions. > > How can I authenticate a user and have that user only able to edit/add/ > view th

Re: Using 2 models in 1 controller? (or in 1 view? I'm confused...)

2007-09-14 Thread McFadly
in controller: $uses = array('News', 'Testimonial'); You'll have access to both models. On Sep 14, 3:47 pm, AliBabNet <[EMAIL PROTECTED]> wrote: > Hello > > I'm turning crazy, I've been over the manual 50 times, read tutorials, > I just can't find out how to use 2 models in 1 controller. > > Le

Re: Cake Pages w/Multiple Actions, Multiple Models

2007-09-14 Thread McFadly
Ryan, This is a pretty standard question from people just getting started, so don't worry. The simple answer is in your controller, add the variable: $uses = array('Post, 'Comment'); You can then access both $this->Post->save(); and $this->Comment- >save(); from that controller. Of course any

/app/webroot/ as home link ...

2007-09-14 Thread Seth
Hi all, I have used url('/'); ?> to link the logo to home page and instead to go to www.site.com it goes to www.site.com/app/webroot/ it works but is ugly .. does anybody knows what i need to do ? thanks! Claudiu --~--~-~--~~~---~--~~ You received this message b

RE: get access from one controller to another

2007-09-14 Thread Ryan Rose
Try requestAction: http://manual.cakephp.org/chapter/controllers Regards, Ryan Rose Vice President Digiwize, Inc. One Technology Drive Tolland, CT 06084 e: [EMAIL PROTECTED] p: 860.730.2631 http://www.digiwize.com -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTEC

get access from one controller to another

2007-09-14 Thread millZ
Hello, how is it possible to call functions of a Controller (EventsController) in another Controller (VisitsController)? The models are connected with visits:belongsto Events events: hasMany Visits I've tried to call "$this->Visit->Event->isFriendEvent($eID)", but this ends with an error, becau

Cake Pages w/Multiple Actions, Multiple Models

2007-09-14 Thread nryan
Hello everyone, I've been working with Cake and I understand exactly how everything works to create pages which are tied to one particular action with one particular model. However, I am building a web application which requires pages that can perform multiple actions on multiple models, dependi

Authenticate user to only add/edit/view with their user_id

2007-09-14 Thread seans9
I've read so many tutorials on Authenticating and not one has the answer to my questions. How can I authenticate a user and have that user only able to edit/add/ view their own records (attached with user_id)? I know I can follow a simple authentication tutorial and write some conditionals to ma

Using 2 models in 1 controller? (or in 1 view? I'm confused...)

2007-09-14 Thread AliBabNet
Hello I'm turning crazy, I've been over the manual 50 times, read tutorials, I just can't find out how to use 2 models in 1 controller. Let's say on my homepage I want to list my NEWS, and list my TESTIMONIALS. Both of them are models, but if I follow the examples, I would have to declare someth

Re: Models /HABTM references

2007-09-14 Thread Dave
Ooops. Wrong button. Sorry! I wondered why the message didn't appear! SQL: CREATE TABLE `images` ( `id` int(10) unsigned NOT NULL auto_increment, `file_name` tinytext NOT NULL, `created` date NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Stored reference t

Re: unset unwanted fields

2007-09-14 Thread bujanga
The fields are not in the edit.ctp but using form injection a knowledgeable user could add them. Here are the fields in edit.ctp: create('User');?> input('id'); echo $form->input('person_name_id'); echo $form->input('username');

Re: unset unwanted fields

2007-09-14 Thread Claudia
Hi there I have added a two-dimensional array to each model which for each action states the fields that are allowed to be saved in this action. When I call $this->model->save() in an action, I supply the respective array entry as second parameter to the save() function which limits the fields th

Re: Connecting to multiple backends

2007-09-14 Thread sologroupmc
It sure has been covered. Thanks. Using search terms like "multiple databases" was perfect. I was using "multiple backends". Just thinking with my backend I guess. Thanks again for the fast response. mc On Sep 14, 3:05 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 9/14/07, sologroupmc

Re: Connecting to multiple backends

2007-09-14 Thread Chris Hartjes
On 9/14/07, sologroupmc <[EMAIL PROTECTED]> wrote: > > Newbie here, starting on a pilot project, hoping to use cake as main > front end. > > We will have a main db, could be in mysql (preferred), or shared ms > sql server. The app will need to run on it's own database, but pull > from two others

Connecting to multiple backends

2007-09-14 Thread sologroupmc
Newbie here, starting on a pilot project, hoping to use cake as main front end. We will have a main db, could be in mysql (preferred), or shared ms sql server. The app will need to run on it's own database, but pull from two others running on separate ms sql servers. Is it possible to mix and m

Re: EmailComponent: UTF-8 and text-only mail

2007-09-14 Thread Preloader
Solved the Problem, added the patch to Ticket #2970: https://trac.cakephp.org/ticket/2970 Regards, Christoph On 13 Sep., 23:32, Preloader <[EMAIL PROTECTED]> wrote: > Hello Bakers, > > I try to send a text only mail via the EmailComponent in Cake 1.2: > > $this->Email->sendAs = 'text'; > $this-

Re: Very cool dynamic Ajax timelines

2007-09-14 Thread [EMAIL PROTECTED]
That looks pretty cool. I would look forward to seeing that tutorial :-) On Sep 14, 6:36 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi All, > > I've just implemented the SIMILE Timeline as found > herehttp://simile.mit.edu/timeline/ > It is licensed under the BSD license. > > Since it

2 basic Problems - Validation and Date Fields

2007-09-14 Thread cronet
Hi there, i get rid of simple things... (Things which worked already)... I could bang my head to the wall !! My first cake app, and i'm very impressed by cakephp. Tow basic things won't work for me: I think i'm doing all right, but the automagic of validating fields and throwing an error won't

Re: 500 Errors

2007-09-14 Thread Thiago Paes
Try remove the lines beginning with "php" in the .htaccess file.. For me, works fine after this alteration on a shared webserver... On 9/14/07, jsgriffin <[EMAIL PROTECTED]> wrote: > > > Hi > > I've got Cake running on a VD Server, with PHP5 running through > suexec. It's running quite a large we

Re: unset unwanted fields

2007-09-14 Thread RichardAtHome
I may be misunderstanding your query, but can't you just remove the fields from edit.ctp ? Admin will still be able to change them in admin_edit.ctp On Sep 14, 4:42 pm, bujanga <[EMAIL PROTECTED]> wrote: > I think my question is just the result of a Friday brainlock but anyway. > > Is there a ca

Re: Case Insensitive Routes

2007-09-14 Thread Troy Gilbert
> Here's the solution for anyone who stumples upon this and has the same > question: Good one-off solution... is there a way to make routing in general case-insensitive? Case-sensitive URLs just feel wrong to me (even though I know that officially, according to spec, they are case-sensitive). I'm

post back

2007-09-14 Thread greg2000
Is there any native functionality for a controller to do something like a redirect but to do it as a form submission? In this situation, it would be submitting all of the fields that were submitted to it... back to a different controller and view. Is this something something that anyone has seen

500 Errors

2007-09-14 Thread jsgriffin
Hi I've got Cake running on a VD Server, with PHP5 running through suexec. It's running quite a large web app which collates and delivers content to users. The site works mostly fine, until we get to the more intensive parts, feed processors, layout processors etc, which is where the server start

Re: Models /HABTM references

2007-09-14 Thread Jon Bennett
Hi Dave, > Yup :) Each Tag is unique. Uploads are working great now. If each Tag is unique, then I think a HABTM association is incorrect, as a HABTM is for linking 2 different models that are not unique to each other. You should be using either Image hasOne or Image hasMany Tag Could you paste

unset unwanted fields

2007-09-14 Thread bujanga
I think my question is just the result of a Friday brainlock but anyway. Is there a cake way to prevent unwanted fields being inserted into an edit form post? * Admin user is allowed to set $nologin to TRUE or FALSE * but Manager user is only allowed to view it. * Manager user is however allowed

Re: table names

2007-09-14 Thread Mike Green
var $useTable = 'myNewTable'; in your model definition. Mike On Sep 13, 7:35 pm, thanuja <[EMAIL PROTECTED]> wrote: > Is it a requirement in cakePHP that table names to be plural? If not > how do I tell the model to look for a specific table? > > Thanks --~--~-~--~~~

Re: Cake1.2

2007-09-14 Thread [EMAIL PROTECTED]
Go do the console directory and type cake bake On Sep 14, 4:33 pm, wickass <[EMAIL PROTECTED]> wrote: > How do you bake an app in cake 1.2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post t

Very cool dynamic Ajax timelines

2007-09-14 Thread [EMAIL PROTECTED]
Hi All, I've just implemented the SIMILE Timeline as found here http://simile.mit.edu/timeline/ It is licensed under the BSD license. Since it uses a very simple XML input file, you can simply create an XML view, point the Javascript file to it and voila!! Very slick, sliding active timeline.

Re: Session - losing value after redirect

2007-09-14 Thread majna
...even with security set as LOW. please notice, session array key (not all session array) is lost and only when session is in database. On Sep 14, 9:28 am, AD7six <[EMAIL PROTECTED]> wrote: > On Sep 14, 6:23 am, Grant Cox <[EMAIL PROTECTED]> wrote: > > > > > The issue with lost sessions often co

Re: Cake1.2

2007-09-14 Thread Tijs Teulings
check under the header titled console: http://ahsanity.wordpress.com/2007/08/29/cakephp-12-the-romance- continues/ On 14-sep-2007, at 8:33, wickass wrote: > > How do you bake an app in cake 1.2 > > > > -- Tijs Teulings tel: +31645004824 http://blog.tijs.org more: http://www.automatique.nl http

Re: The forbidden hack? | An attempt to redesign Cake View handling

2007-09-14 Thread Danijel Kurinčič
thanks majna! I sure didn't know you actually can use the same method names in extended classes and that then parent classes use them! I now have renamed back my controller::MYrender() into controller::render() and now cake uses my render method instead the default one. By the way, what exactly

Re: Undefined index after query

2007-09-14 Thread imrankhanjoya
try to check out the result by this $result = $this->Post->query($sql); print_r($result ); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups

Re: Undefined index after query

2007-09-14 Thread Chris
I've tried setting debug level to 3 to dump the controller object as well, and the query seems to be pulling the data out please see ... http://test.courva.co.uk/posts/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Undefined index after query

2007-09-14 Thread Chris
Thanks for the quick reply guys. Geoff, in the first instance yes that should work but I'd like to make a more complicated sql query at a later stage so I'd like to work out what was wrong with my syntax here. Samuel, I've set debug to 2 and I get Nr Query Error AffectedNum. rows

Re: flash() produces wrong URL

2007-09-14 Thread imrankhanjoya
try this one $this->flash("--String message to dispay--","/---Name of controller-/---Name of action---/- perameters---") $this->flash("text,"/article/4545/"); --~--~-~--~~~---~--~~ You received this message because you are subscribe

Cake1.2

2007-09-14 Thread wickass
How do you bake an app in cake 1.2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAI

Re: aro errors in IBM tutorial part 2

2007-09-14 Thread booyah
Use 0 instead of null for the parent_id. worked for me. eg. php acl.php create aro 0 0 Users php acl.php create aro 0 0 Dealers HTH. On Aug 30, 1:40 pm, "SIXS" <[EMAIL PROTECTED]> wrote: > Hello, > I am running the Cake IBM part 2 and creating the aro files. > I got an error-- running acl an

Re: Case Insensitive Routes

2007-09-14 Thread MattC
Here's the solution for anyone who stumples upon this and has the same question: Router::connect('/(?i:about)', array('controller' => 'pages', 'action' =>'display', 'about')); -Matt www.pseudocoder.com On Sep 5, 10:00 am, MattC <[EMAIL PROTECTED]> wrote: > Hey all, > I'm tryting to set a couple

Re: flash() produces wrong URL

2007-09-14 Thread Anuj Chauhan
write $this->flash("text","/article/4545/"); instead od $this->flash("text,"/article/4545/"); On 9/14/07, Sergei <[EMAIL PROTECTED]> wrote: > > > Hello, > > I've encountered situation where > > $this->flash("text,"/article/4545/"); > > produces wrong url on the production web server (not o

flash() produces wrong URL

2007-09-14 Thread Sergei
Hello, I've encountered situation where $this->flash("text,"/article/4545/"); produces wrong url on the production web server (not on my local webserver!): \/article\/4545\/ You see, it inserts \ before /. Anyone knows a solution? --~--~-~--~~~---~--~~ You r

Re: Session - losing value after redirect

2007-09-14 Thread AD7six
On Sep 14, 6:23 am, Grant Cox <[EMAIL PROTECTED]> wrote: > The issue with lost sessions often comes down to the SessionComponent > being quite strict, and destroying the session if the user agent > changes. Of course, the user agent shouldn't really change, but with > Ajax calls and whatnot it

Re: Session - losing value after redirect

2007-09-14 Thread Dr. Tarique Sani
On 9/14/07, Grant Cox <[EMAIL PROTECTED]> wrote: > > Good point. Is the issue that browsers will see the Location header, > and ignore the Set-Cookie header, or is it that PHP does not even Well I really never bothered to investigate but if you look at the search results - this issue is not even