Re: Bug in the blog tutorial

2006-05-12 Thread John Anderson
What blog tutorial? http://manual.cakephp.org/chapter/18 This one? And the error you've linked to has to do with view code that is rendering, not a missing model error message... *confused* -- John On May 12, 2006, at 2:08 PM, modmans2ndcoming wrote: > > I was following the blog tutorial

Re: More hasAndBelongsToMany Fun

2006-05-12 Thread John Anderson
:o) /app/config/core.php This is a pretty basic question - make sure you guys are at least trying to find this out for yourselves before asking. If you already did, kudos to you. -- J On May 12, 2006, at 1:24 PM, David Spitzley wrote: > > Perfection. I'd been wondering how to recover the

Re: More hasAndBelongsToMany Fun

2006-05-12 Thread John Anderson
/app/config/core.php -- J On May 12, 2006, at 1:22 PM, [EMAIL PROTECTED] wrote: > > Can you tell me where to set the DEBUG, is that global, or in this one > model file? > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: More hasAndBelongsToMany Fun

2006-05-12 Thread John Anderson
I'd run a normal Cake HABTM query, with DEBUG turned to 3. Take the query Cake is using for its vanilla HABTM fetch, and tweak it to your liking before specifying it as the finderSQL for your association. -- John On May 12, 2006, at 1:16 PM, [EMAIL PROTECTED] wrote: > > If you figure this

Re: More hasAndBelongsToMany Fun

2006-05-12 Thread John Anderson
Is this something I have to do by explicitly setting the findersql property of the hABTM associations? Yep. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send e

Re: rdAuth? Users? ACL?

2006-05-12 Thread John Anderson
On May 11, 2006, at 6:21 PM, tom wrote: > > I'm trying it out right now, and so far... > in the last code sample, $this->checkAccess(); should probably be > $this->checkSession(); Good eye... good eye. Thanks! -- John --~--~-~--~~~---~--~~ You received this me

Re: displaying data from has_and_belongs_to_many (habtm) relationship

2006-05-12 Thread John Anderson
What needs to be changed? (btw: I think we need to check out the manual to see why some of the view code is missing carriage returns. Some views are still getting rendered as a single line on the manual site.) -- J On May 12, 2006, at 3:50 AM, gwoo wrote: > > Check out > http://manual.cake

Re: Following blog tutorial.... problem

2006-05-12 Thread John Anderson
On May 12, 2006, at 7:44 AM, modmans2ndcoming wrote: > Is there anything else you might need? The SQL for the posts table, I suppose, and the contents of your /app/ config/database.php file. -- John --~--~-~--~~~---~--~~ You received this message because you ar

Re: rdAuth? Users? ACL?

2006-05-11 Thread John Anderson
*throws confetti* http://manual.cakephp.org/chapter/19 ;o) I was gonna wait till someone proofed it, but no one has bothered me about major problems with it. -- John On May 11, 2006, at 5:15 PM, calzone wrote: > > You beat me to it! > > I was very excited to see this chapter in the manual

Re: rdAuth? Users? ACL?

2006-05-11 Thread John Anderson
On May 11, 2006, at 5:11 PM, tom wrote: > > But they need to add at least something about hashing... Yeah I wrote it yesterday because of everyone's comments. I hope it clears things up a bit. Its meant to be very simple - It isn't meant as a security article (I'm not going to mention hash

Re: Question about an example in teh manual

2006-05-11 Thread John Anderson
You might want to read up a bit on MVC patterned programming. It might give you a better idea of how things work together. The Wikipedia article is a decent one, I think. Controllers manipulate logic (often using instantiations of Model classes) and hand that data to a view. Since models a

Re: Help me out with the conceptualization here please.

2006-05-11 Thread John Anderson
On May 11, 2006, at 3:33 PM, modmans2ndcoming wrote: > In the blog tutorial, the model is extremely simple, however, in the > manual the section on the model is extremely complex and covers a lot > of built in functions. Are all those functions for the model or are > they made available to the co

Re: Cake for the Newbies

2006-05-11 Thread John Anderson
On May 11, 2006, at 1:48 PM, Garth Braithwaite wrote: > > I was working on Graham's bookmark tutorial at > http://grahambird.co.uk/cake/tutorials/scaffolding.php > and I keep getting the same error. I think I am missing something. > > I downloaded the stable release and unpacked in on my deskto

Re: Getting Bake.php to work

2006-05-10 Thread John Anderson
Bake isn't something you run from your browser, its run from the command line: $ php bake.php ;o) -- John On May 10, 2006, at 12:46 PM, dspitzle wrote: > > I'm currently working through Cake, and I'm having trouble getting > Bake.php to run. I'm running Cake 1.0.1.2708 on Windows XP, and m

Re: Model association

2006-05-09 Thread John Anderson
Gotta use model assocations - it makes this sort of thing so much nicer. http://manual.cakephp.org/chapter/6 Looks like your Comment belongsTo Post, and probably Post hasMany Comment. Give the manual a look, and let me know if you have questions on it. -- J On May 9, 2006, at 1:47 PM, rober

Re: Model association

2006-05-09 Thread John Anderson
Are you using Cake to define model associations?Looks to me like:Post hasAndBelongsToMany CategoryCategory hasAndBelongsToMany PostSo tables would look like:posts- id- title- bodycategories- id- name - desccategories_posts (HABTM tables are plural of both models, in alphabetical order)post_idcatego

Re: What kind of code is appropriate for a view?

2006-05-09 Thread John Anderson
I wouldn't balk too much at something like Logout in a view. Just my opinion though. I mean I guess you could put something in the controller that would tell the view if you're logged in or not (which I *would* do if you're checking login status more than once in a page), but I don't kn

Re: Need help passing "id" between controllers

2006-05-09 Thread John Anderson
What URL are you trying to access? Does your form action have the ID in it? .. ? -- John On May 9, 2006, at 9:47 AM, Dusty wrote: > > John, > > Thanks for the help !! Basically I have already tried that > and for some reason I get the warning "missing argument for add() > in /vlogs_con

Re: Need help passing "id" between controllers

2006-05-09 Thread John Anderson
On May 9, 2006, at 9:05 AM, Dusty wrote:The problem is that the vlogs page knows nothingabout the "4".  All of my relationships in my models andcontrollers and tables is correct I believe.How do I tell the "vlogs" model the right "vehicle_id"top insert the record with.  What is the correct "cake"wa

Re: MVC 101? Please forgive this really basic question

2006-05-08 Thread John Anderson
On May 8, 2006, at 2:48 PM, calzone wrote: > > Thank you John. > > Now that I know that my questions are related to a weak MVC > understanding, I'm hoping you can direct me toward a good source on > this. Is this something I'll have to purchase as a book or are there > good online references?

Re: MVC 101? Please forgive this really basic question

2006-05-08 Thread John Anderson
On May 8, 2006, at 1:51 PM, calzone wrote: > > Reading the manual: > > Chapter 6, "Models," in the first section shows an example of a model > with two methods, hide() and unhide(). > > Chapter 18, "The Cake Blog Tutorial," Sections 9 and 11 show how to > add() and delete() posts. The methods a

Re: rdAuth? Users? ACL?

2006-05-08 Thread John Anderson
I don't know, but seems to me like you've just described Cake's ACL. You can stick ACL checks wherever you want (AppController, Controller, Action, etc.). You can have a million groups, or just a single "authenticated" group if you want to. ACO's have action permissions default for CRUD ope

Re: scaffolding and foreign keys

2006-05-08 Thread John Anderson
On May 8, 2006, at 11:24 AM, calzone wrote: > > This isn't so much of a question, because I think I know the answer. > > I'm just curious as to future plans for cake in this regard. > > When using scaffolding, columns ending in _id are assumed to be > foreign > keys to a table having the name

Re: rdAuth? Users? ACL?

2006-05-08 Thread John Anderson
On May 7, 2006, at 9:19 PM, tom wrote: > > My problem is that I see ACL as a somewhat useful solution, but that > it's so abstract that it needs some kind of wrapper so that ACOs > can be > used as users (especially because it seems like there is absolutely no > other way that they could be us

Re: rdAuth? Users? ACL?

2006-05-07 Thread John Anderson
On May 7, 2006, at 7:12 PM, tom wrote: > > Hi, > > I'm very experienced with PHP How did you normally set something like this up before you used Cake? It shouldn't be hard to adapt to the way Cake works: You have some sort of user-persistence (sessions, most often) You have some sort of auth

Re: Extending the blog tutorial to include login?

2006-05-05 Thread John Anderson
On May 5, 2006, at 2:33 PM, roberts.sean wrote: > > The blog tutorial was great, but I think it left out a crucial step: > securing it from malicious users who want nothing more than to make a > series of "hahaha lol owned you" posts on your blog. The section in > the manual on ACL was interest

Re: LDAP AppModel?

2006-05-05 Thread John Anderson
On May 5, 2006, at 1:00 PM, elijah wrote: > > I am working on an interface for managing scalable mail systems (to be > released under GPL) and I would like to use Cake! > > The user directory is stored in LDAP. I have a bunch of PHP code which > uses reflection and crude to access the LDAP data

Re: Scaffolding like Rails

2006-04-20 Thread John Anderson
Thanks for your notes here, though. I'll get to them, but Nate is right: let's use trac for this sort of thing. -- J On Apr 20, 2006, at 2:09 PM, nate wrote: > > If you find errors, please report them here: > https://trac.cakephp.org/report/1 (you have to register and/or > login to > create

Re: Scaffolding like Rails

2006-04-18 Thread John Anderson
On Apr 18, 2006, at 4:06 PM, ofir wrote: > > Hi John, I've installed your script and I loved the way it walks you > through, however I found a few glitches you may wanna fix: > > 1. The generated view files contain the following code: > $row[Model][field], PHP throws a warning meaning this shoul

Re: emplate (home.php) into layouts

2006-04-18 Thread John Anderson
On Apr 18, 2006, at 5:54 PM, guy wrote: > > I have added a template (home.php) Should be .thtml, and if you're doing layouts, it should be called a layout rather than a template. -- John --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Scaffolding like Rails

2006-04-18 Thread John Anderson
You can try the one I've been working on. Its strictly experimental, but its been working for me for a few weeks now. Here's what it can do thus far: Model baking - model name guessing based on DB - validation criteria based on DB - associations auto detect and setup Controller baking - basi

Re: Help with how to do a query

2006-04-12 Thread John Anderson
On Apr 12, 2006, at 2:53 PM, spacedz wrote: > How would you suggest running the above query and getting the data > set? Make a model for your phpBB posts, and assign it one of the tables listed in your query. Then just do something like: $this->PhpBBPost->query($reallyBigQueryGoesHere); -