Re: Do I have to change webroot config ? Cake Newbie

2008-08-26 Thread Chris Hartjes

On Mon, Aug 25, 2008 at 1:00 PM, pmit [EMAIL PROTECTED] wrote:
  I am not clear about what to do next.
  If I had to I could switch to development on a Mac but that would
 mean giving up the convenience of
  developing on a laptop ?

http://book.cakephp.org/view/32/installation

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth Component - I'm going crazy

2008-08-25 Thread Chris Hartjes

On Mon, Aug 25, 2008 at 3:32 PM, luigi7up [EMAIL PROTECTED] wrote:
 I found few posts about this problem but none of them resolves my
 problem.

Really hard to diagnose without seeing any code.  Have you tried
looking at this fantastic tutorial on using the Auth component?

http://www.littlehart.net/atthekeyboard/2007/09/11/a-hopefully-useful-tutorial-for-using-cakephps-auth-component/

There are some other links there that deal with the Auth component as well.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Preventing Cache Reload In Case of Database Failure?

2008-08-23 Thread Chris Hartjes

On Sat, Aug 23, 2008 at 4:12 AM, aranworld [EMAIL PROTECTED] wrote:

 Is there a way to get Cake to not overwrite an old cached view, if it
 can detect that there was a database connectivity problem?


Well, it seems to me that this might actually be an application logic
problem.  Here's why:

Your caching logic should be cache the update box until a news update
comes along.  In your code that adds items that should show up in the
news update section should clear out the old information at that
time and cache the new stuff.

I hope I've explained myself properly.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problems with the Bake (Windows Vista + Xampp + MinGW)

2008-08-21 Thread Chris Hartjes

On Thu, Aug 21, 2008 at 9:53 PM, giulio [EMAIL PROTECTED] wrote:
 Is there some tutorials?

 If you can't send me a tutorial, i'll ask you the excact problem i
 find.


http://cakephp.org/screencasts

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problems with the Bake (Windows Vista + Xampp + MinGW)

2008-08-21 Thread Chris Hartjes

On Thu, Aug 21, 2008 at 10:22 PM, giulio [EMAIL PROTECTED] wrote:

 Thank you very much for the help.

 Can i find also a text help insted of videos?... i've some problems
 with my connection to see videos.


I don't know of any off-hand, but you can probably find them via Google.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Multiple Inserts without a loop

2008-08-20 Thread Chris Hartjes

On Wed, Aug 20, 2008 at 5:51 PM, seth [EMAIL PROTECTED] wrote:


  Right, but how many inserts does this perform?

 - As many inserts as required


 Yes, but my whole point is that if you are inserting 1000 questions,
 this could be done in 2 interests or 1001... Is cake currently smart
 enough to do it in 2?

If you set debug in config/core.php to 1 or greater you can see this
for yourself.  You'll see all the SQL calls.

Or, if you're feeling really adventurous, you could actually build the
damn thing and see if it matters.  I'm willing to bet that it won't
matter to your application's performance whether it's 2 or 1000.  If
it *does* matter, then congratulations are in order because you've
built an application with more users than 99% of CakePHP apps out
there and you will have other problems not related to Cake to worry
about.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: License issues

2008-08-18 Thread Chris Hartjes

On Mon, Aug 18, 2008 at 1:30 PM, bigboss0101 [EMAIL PROTECTED] wrote:

 Hi friends,
 Cakephp is released under MIT lincense. Can we use cakephp to develop
 commercial applications or only those applications that should be
 released under an MIT license or an opensource?
 Thanks a lot for ur guidance.

I am not an intellectual property lawyer, but the answer to your
question is Yes, you can use CakePHP to develop commercial
applications.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Loading a component with App::import() doesn't work

2008-07-25 Thread Chris Hartjes

On Fri, Jul 25, 2008 at 3:54 AM, Andreas Hofmann
[EMAIL PROTECTED] wrote:

 Hi all!

 I'm using cake 1.2.0.7296 RC2 and was now rewriting my code.
 When I try to import a component aith App::import, it seems not be
 loaded/started up:

 public function __construct()
 {
  parent::__construct();
  App::import('component', 'Auth');
 }

 Results in:
 Undefined property: GameController::$Auth

Well, usually you load a component by setting the $components array

var $components = array('Auth');

What is it you are trying to do?

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginate Custom Sql ..... Is there a better way to do this ?

2008-07-22 Thread Chris Hartjes

On Mon, Jul 21, 2008 at 7:41 PM, mrconfused [EMAIL PROTECTED] wrote:

 Dave,

 I looked at that link and I am not getting the same results as my
 custom query with no pagination...
 Here's the old custom query :



I wrote a blog posting a while back about doing custom pagination.
Might help you here.

http://www.littlehart.net/atthekeyboard/2008/03/04/custom-cakephp-12-pagination-queries/


-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: var $uses(), a better way?

2008-07-17 Thread Chris Hartjes

On Thu, Jul 17, 2008 at 10:49 AM, clrockwell
[EMAIL PROTECTED] wrote:

 Hello all,

 For one of my controllers I declare var $uses with 6 total values.
 What I see is that on every action within the controller, all 6 are
 'described' which uses more resources than needed.

Well, the correct use of $uses (hey, I made a pun) depends on how
you've setup relationships between your models.  If all the models you
need to use for a controller are related, you might only need to have
the parent model in your $uses array, and then you can reference the
other ones like:

$this-Foo-Bar-find('list');

etc.

You can also use App::import(...) to instantiate models on the fly.

Just my experience, that's all.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Trying to map findAll to $form-select()

2008-07-15 Thread Chris Hartjes

On Tue, Jul 15, 2008 at 10:39 AM, Igor [EMAIL PROTECTED] wrote:
 Is it possible to map this array in such a way so the output looks
 something like the example below? Or is it a matter of passing right
 query to findAll() to produce a asimpler array?

 select
  option value=2Stage 2/option
  option value=3Stage 3/option
 /select


$this-Stage-find('list') should generate an array that you can pass
to form-select()


-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 2:55 PM, villas [EMAIL PROTECTED] wrote:

 That's such a pity if the Bakery wouldn't be supported for such an
 avoidable reason. Surely the Cake team can just increase the number of
 trusted Bakery administrators so that there is always someone on
 'duty'.  Why not have 20 reviewers,  or more?  It seems so strange in
 such an active and knowledgeable community to take 2 weeks to approve
 something.

Does that mean you're volunteering?

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can't Get Validation to Work

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 3:22 PM, mwcbrent [EMAIL PROTECTED] wrote:

 I know this is mundane guys but whats up with this, it was a huge
 selling point for me when I was reading how it could work.  Is there a
 resource that could outline the steps here?

http://book.cakephp.org/view/125/data-validation

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake php ajax pagination

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 3:16 PM, puneetratan [EMAIL PROTECTED] wrote:

 Hello Group,
 I am doing ajax pagination in cake php. but i also have some search
 criterias which  i need on second or third pages also, so that
 condition retains.

 right now i am using cake session (storing the condition into session)
 is there any other way to store condition, so that we can get on
 second page.
 Plz let me know

http://book.cakephp.org/view/164/pagination

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 3:17 PM, puneetratan [EMAIL PROTECTED] wrote:

 Hello Group,
 Can anyone let me know, the use of ACL in cakephp, and howz we can
 implement that ?

http://book.cakephp.org/view/171/access-control-lists
http://tinyurl.com/2rfwr

However, many people have complained that it is not good enough
documentation.  Having not done any ACL myself, I cannot confirm that.

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: calling helper functions from within the controller

2008-07-11 Thread Chris Hartjes

On Fri, Jul 11, 2008 at 3:39 PM, Siegfried Hirsch
[EMAIL PROTECTED] wrote:

 Hello,

  the subject says it all:
 is it possible to call a helper function from within the controller.
 Of course the helper is
 included in the var $helpers = array('Myhelper');

Helpers are called within views, not controllers.

Perhaps you can place that function somewhere else?  Like in a model?

-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Linking to RSS feeds?

2008-07-10 Thread Chris Hartjes

On Wed, Jul 9, 2008 at 10:04 PM, Siebren Bakker
[EMAIL PROTECTED] wrote:

 on a side note: @Chris, the reason why I wanted to see if there was a way to
 do it through cake, is two fold: 1) it's a fair bit less text to put into
 the code file, making the file itself shorter, and 2) I am still a student,
 and I know the HTML/XHTML side of things, but I'm learning how to read code
 documentation still, and wanted to know if there was more to the code than I
 was reading into it after looking through the html.php file source.

I understand, but I try to think about this stuff pragmatically.  One
line of code in CakePHP or one line of code in HTML.  It really makes
little difference, but putting it in HTML means just a little bit less
work for PHP.


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Request for the Devs to take into consideration concerning print

2008-07-09 Thread Chris Hartjes

On Wed, Jul 9, 2008 at 3:39 PM, skelooth [EMAIL PROTECTED] wrote:

 I make this request because I feel printing is an integral part of any
 information based web application, and I found myself a bit 'stunned'
 at the reluctance of the IRC users to help or share experiences. I can
 only assume that these people have never been in a situation where
 they needed reports to be printed from cake php.

One person's 'integral part' is another's 'edge case'.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Linking to RSS feeds?

2008-07-09 Thread Chris Hartjes

On Wed, Jul 9, 2008 at 3:47 PM, Siebren Bakker [EMAIL PROTECTED] wrote:
 Currently, the HTML helper does not include functionality to do add this to
 a cake application, or layout. Does anyone know if there are any plans to do
 so?

Well, I think including something that is browser-specific is not a
good idea.  Not everyone uses Firefox.  Secondly, what's so hard about
adding it by hand to your layout file?  It's just one line.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Request for the Devs to take into consideration concerning print

2008-07-09 Thread Chris Hartjes

On Wed, Jul 9, 2008 at 3:59 PM, skelooth [EMAIL PROTECTED] wrote:

 Unfortunately Chris, your attempt at an argument is the same response
 I received from he IRC channel. I don't understand why so many people
 in this industry feel the need to take any and all opposing views and
 turn them into childish flame wars. I made nothing more than a request
 and offered my opinion. I apologize if this request and opinion has
 offended you or any of the other fine people here. I wanted no
 quarrel, I wanted nothing more than to express a concern over an issue
 I feel is important.


Don't apologize just because you think you're hurting someone's
feelings.  This isn't about an argument, it's pointing out the
obvious:  what you think is an integral part might be someone else's
edge case.  Surely you understand that.

 An edge case should by no means include 'printing a webpage'.
 Comptrollers and account executives typically don't store screenshots
 in filing cabinets and that is why I (in my own personal opinion) feel
 the ability to print is integral to any information based web
 application.


Still an edge case, as the vast majority (I'd even say 99%) of web
applications do not have a requirement for looks pretty when printed
output.

I understand your frustration, but please look at the problem objectively.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginate Order By COUNT()

2008-07-08 Thread Chris Hartjes

On Mon, Jul 7, 2008 at 11:52 PM, Jonathan Snook
[EMAIL PROTECTED] wrote:

 1) add a behaviour
 2) add a field to your table

 It seems to be built into CakePHP now:
 http://book.cakephp.org/view/490/countercache-cache-your-count

That's cool and all, but still...which solution is better in this case?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: FCKeditor

2008-07-08 Thread Chris Hartjes

On Tue, Jul 8, 2008 at 8:47 AM, kaushik [EMAIL PROTECTED] wrote:

 I want to integrate fckeditor in one of cakephp page. How do it? where
 I have to place the editor folder and how to integrate it?
 --~--~-~--~~~---~--~~

Perhaps Google is not working for you where you are?  Try this link as
a starting point, and next time try searching for an answer before
asking for help.

http://bakery.cakephp.org/articles/view/using-fckeditor-with-cakephp




-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model

2008-07-08 Thread Chris Hartjes

On Tue, Jul 8, 2008 at 6:38 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Hi.

 Is there anyway to call query() from a controller that has no model?

Not every controller has to have a model associated with it.  In fact,
you will sometimes find that you are calling multiple models from one
controller via associations.

As helpful as Grant's response is, I think it doesn't really answer
the question WHAT are you trying to do.  That is more important than
HOW.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model

2008-07-08 Thread Chris Hartjes

On Tue, Jul 8, 2008 at 9:53 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Hi.

 I'm trying to fetch some data from the DB from a statistics controller
 that doesn't have any particular model associated with it. I just need
 to collect some info from the DB with some custom queries.

Again, you missed my point.  You are not limited to models that are
associated with a specific controller.  There's no reason why you
could not do this:

1) create your model
2) tell your controller to use that model via either $uses or app::import
3) $results = $this-Model-query(...)

I'm hoping I am not misunderstanding the problem.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginate Order By COUNT()

2008-07-07 Thread Chris Hartjes

On Mon, Jul 7, 2008 at 8:52 AM, Kyle Decot [EMAIL PROTECTED] wrote:

 Is it possible to order a paginated set of results by the total number
 of comments a user has?

Yes, but you will have to create a customized pageCount() method.
Check out this link, as it might help you:

http://www.littlehart.net/atthekeyboard/2008/03/04/custom-cakephp-12-pagination-queries/

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginate Order By COUNT()

2008-07-07 Thread Chris Hartjes

On Mon, Jul 7, 2008 at 9:56 PM, Dardo Sordi Bogado [EMAIL PROTECTED] wrote:

 Or use counterCache.

Perhaps you could explain why counterCache is a better option than
writing a custom paginateCount() method in this case.  As far as I can
tell, to use counterCache you have to

1) add a behaviour
2) add a field to your table

Doing it the paginateCount() way, all you have to do it

1) write your own how we count things for pagination purposes query

I am making these assumptions based on the following link:

http://blog.matsimitsu.nl/code/163/cakephp-countercache


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Controller question

2008-07-05 Thread Chris Hartjes

On Sat, Jul 5, 2008 at 7:48 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Hi again.

 Is there anyway to detect from what view a controller action was
 called?

Controllers are not called from views, it's the other way around.

What are you trying to accomplish that you need to know this information?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session does not expire after closing Browser

2008-07-04 Thread Chris Hartjes

On Fri, Jul 4, 2008 at 6:55 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Session does not expire after closing Browser.

http://www.php.net/manual/en/ref.session.php

session.cookie_lifetime specifies the lifetime of the cookie in
seconds which is sent to the browser. The value 0 means until the
browser is closed. Defaults to 0. See also
session_get_cookie_params() and session_set_cookie_params(). Since the
cookie is returned by the browser, it is not prolonged to suffice the
lifetime. It must be sent manually by setcookie().

This is sometimes an issue due to PHP configuration settings.  Not a
CakePHP issue at all.

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Dynamic drop down

2008-07-02 Thread Chris Hartjes

On Wed, Jul 2, 2008 at 10:05 AM, kaushik [EMAIL PROTECTED] wrote:

 I want to make a drop down of categories from category table in
 Product page.
 How to do it? Please help me.

$categories = $this-Product-Category-find('list');


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: AuthComponent sessions not working in firefox or ie7

2008-06-30 Thread Chris Hartjes

On Sun, Jun 29, 2008 at 5:36 PM, peele [EMAIL PROTECTED] wrote:

 I've searching this group and other resources for a day and half,
 tried multiple combinations of things, looked for whitespace. I'm
 familiar with php but new to cake. Thank you for your help.


You are missing a beforeFilter() method in your user controller:

beforeFilter() {
 parent::beforeFilter();
}

Without that, the user controller does not know that you are trying to
use Auth.  At least, that has been my experience.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Is there a CakePHP API/Manual mirror?

2008-06-30 Thread Chris Hartjes

On Mon, Jun 30, 2008 at 4:02 AM, marikka [EMAIL PROTECTED] wrote:

 Hi!

 Does a mirror of the API and the Manual exist? I need to work on my
 Cake app, but the whole cakephp.org seems to be down.. pings fine, but
 doesn't answer to http, not the first time either.

Works fine for me, maybe it's just a local issue for you.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Protect admin page

2008-06-29 Thread Chris Hartjes

On Sun, Jun 29, 2008 at 9:16 AM, maxi [EMAIL PROTECTED] wrote:

 How I can setup password for admin menu?


Use the Auth component.

http://book.cakephp.org/view/172/authentication

There are also lots of good tutorials out there for Auth, both on my
blog (URL listed below) and elsewhere (find 'em via Google or your
preferred search engine).

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: User Account Administration using Auth Component - Password reset/Forgot Password Functionality

2008-06-29 Thread Chris Hartjes

On Sun, Jun 29, 2008 at 12:03 PM, Maro [EMAIL PROTECTED] wrote:
if(strcmp($phrase,$createdHash) == 0)
{


 if(!empty($this-Auth-data['User']['password_confirm']))
{
if 
 ($this-Auth-data['User']['password'] == $this-Auth-
data['User']['password_confirm'])
{

 $this-User-confirmPassword($this-data);
$this-User-saveField('password',$this-Auth-
data['User']['password'],true);


Hi there, I noticed a few things.

Unless they changed things dramatically in the latest RC releases for
1.2, you should be using $this-data['User']['password'] not
$this-Auth-data['User']['password'].

Secondly, Auth automatically hashes the contents of your User password
input field if you pass data in the User 'username' field.  In order
to make your password confirm field work, you have to also hash the
password_confirm field.  Try this

if ($this-data['User']['password'] ==
$this-Auth-password($this-data['User']['password_confirm'])

as your check.

I recently added that info to book.cakephp.org in the Auth component
section.  Hope that helps.


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth loginAction Question

2008-06-29 Thread Chris Hartjes

On Sun, Jun 29, 2008 at 8:39 PM, Kyle Decot [EMAIL PROTECTED] wrote:

 Does anyone have another possible way to do this then? If the user is
 not logged in, I need to be able to redirect them to the login/
 register screen with the invitation code intact.

I think Auth doesn't like being sent to the login action if you are
already logged in, so you might want to consider sending them to
another page and using an element that contains your login form.

Just a thought, not tested, etc, etc.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Chris Hartjes
On Thu, Jun 26, 2008 at 1:42 PM, Gustavo Carreno [EMAIL PROTECTED] wrote:
 Now, with the time you took to cry about your issue and even write
 this, quite large, email I supose you could do something better with
 that time:
 - Register an account at book.cakephp.org
 - Browse through the contents and find where your knowledge would be
 well aplyed.
 - Enter the suggested text to be approved
 - After a while, rejoice because your contribution was accepted
 - Keep the warm feeling that ALOT of newbies will read your input for
 a long time to go. Futile messages about the Docs are just to much
 passé !!

Gustavo,

Thank you for showing the proper way to respond to criticisms about
the CakePHP documentation.

Wayne, while you are being singled out in this thread, I think people
are not alone in feeling overwhelmed by how to build something with
CakePHP.  If you don't have time to do the research (despite your
fantasticaly long email showing that you do indeed know how to find
answers) then I really think that CakePHP will disappoint you because,
well, you really need to be able to find out your own answers to
questions.  Documentation is hard and nobody (/me waves to psychic)
really wants to do it.  Is it any wonder that those amongst us who
have contributed documentation get upset when people complain about
it?

People have to understand that there comes a point whether you want to
be a developer, creating things and really understanding what you are
using, or a typist, relying on copious examples that you can simple
take and cut-and-paste into your work and then go onto the next
solution.  I believe that CakePHP wants you to be a *developer*, not a
*typist*.

So, to get back to my original point:  there is nothing stopping any
one from contributing documentation to the CakePHP manual except
themselves.  If you choose to direct your energies into complaining
about the documentation, that is obviously your choice.  Just don't be
shocked when people disagree with your tactics and suggest other
things.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Documentation

2008-06-24 Thread Chris Hartjes

On Tue, Jun 24, 2008 at 12:17 PM, Wayne Madison
[EMAIL PROTECTED] wrote:

 Hello,

Thanks for showing no social skills and hijacking a thread!

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problems with query functions on production server

2008-06-24 Thread Chris Hartjes

On Tue, Jun 24, 2008 at 4:37 PM, Sanfly [EMAIL PROTECTED] wrote:

 So i quickly changed the debug mode on my live website to '2' (Silly I
 know, but I dont know how to display debug info on one page when the
 site is set to '0', if anyone can tell me would appreciate), tried
 again, copied the debug info, which didnt show any errors.

 Then when I did the refresh, It appeared that it had worked!! I
 checked the database, and indeed it had been updated!!!

 But when I flicked the debug mode back to '0' it no longer works
 again  aggg.

 Any ideas what is going on here?  How can I diagnose the problem if
 there isnt one when its in full debug mode?

Any time you go from debug '0' to another debug setting, make sure
that you delete stuff in APP/tmp before you switch back.  The fact
that the code works when debug = 2 means that it will work just fine
when debug = 0.  It's probably crashing because you have cached model
and other information in APP/tmp.

Always good practice to delete stuff in APP/tmp every time you put a
change into production as well.  Just my opinion.


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: dateTime bug?

2008-06-23 Thread Chris Hartjes

On Mon, Jun 23, 2008 at 2:38 PM, radoslaw wesolowski [EMAIL PROTECTED] wrote:

 Hello,
 I think that line:
 $selectMinuteAttr['interval'] = $interval;
 should be added into switch statement near line 1484 (rev 7118) in the
 form.php file, or maybe somenone knows the reason why we can't set
 interval when 24 hours format is used ;)



Please file a ticket over at http://trac.cakephp.org

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth Component the most failment of Cakephp

2008-06-23 Thread Chris Hartjes

On Mon, Jun 23, 2008 at 9:05 PM, Alessio [EMAIL PROTECTED] wrote:
 Why the auth is so buggy...?

I wonder what I am doing in my code that Auth works perfectly every
time I use it, never experiencing the problems mentioned on the
mailing list.  I never get logins failing to work, I never get empty
values from $this-Auth-user().  Works like a charm.

As for what happen to CakePHP, I cannot answer that except to say
that when you use software that has not been labeled as stable, you
take your chances no matter how talented the developers are who
created it.

I use the bleeding edge from SVN and can only think of a onef time in
the last year where an update truly broke something in my application.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth Component the most failment of Cakephp

2008-06-23 Thread Chris Hartjes

On Mon, Jun 23, 2008 at 9:33 PM, Alessio [EMAIL PROTECTED] wrote:

 Ok thanks Chris...
 I believe that you have not problems with the component...

I wasn't try to be snarky or anything, but I realize it might come
across that way.  I just never run into those problems with Auth that
people report.  Again, I keep things very simple and haven't gone
wrong with that approach.

 Maybe I have found the reason...
 I believe that it doesn't work when you use a particular route::
// Custom URL route
  Router::connect('/*', array('controller' = 'contents', 'action' =
 'ProcessAllRequest'));

 Essentially when in my site the user write something, I redirect all
 to the Content_Controller...

 So When, the user enter in mycontroller by route, the component forces
 to logout...

Why would you do it that way?  Is there a requirement that every
single request has to go through just one controller?  It makes no
sense to me, but I probably don't understand the problem you are
trying to solve.


 Essentially I say to the auth component to allow all request of
 COntent_controller...
 But I saw after many hour of debugging that the Auth COmponent is not
 able to manage this situation...

I think (again, just my opinion) you are trying to use Auth for
something it is not intended to do.  You're not necessarily wrong,
you're just trying to do something that maybe Auth just cannot handle.

It might help if you paste some code to http://bin.cakephp.org it
might be helpful.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache problem ?

2008-06-20 Thread Chris Hartjes

On Fri, Jun 20, 2008 at 8:45 AM, Marc MENDEZ [EMAIL PROTECTED] wrote:

 Next test :

 I deleted app/views/essais and run bake again. I watched the folder and
 found, again the 4 views files in a new essais folder. So, now, I'm
 sure it's the right files and the right folder.
 I edit the index.ctp and guess what . nothing , still the same problem !

Well, here are a few things I would try:

1) look at your web server access and error logs to make sure you're
actually hitting the URL you think you are
2) delete everyting in APP/tmp/
3) set debug to a value  0 in APP/config/core.php

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: password not hashed by edit user

2008-06-20 Thread Chris Hartjes

On Fri, Jun 20, 2008 at 11:57 AM, Siebren Bakker
[EMAIL PROTECTED] wrote:
 Unfortunately, cake does not seem to hash the password automatically, at
 least as far as I've been able to find. This is of course for a
 User.password type field, which cake automatically sets as a password-text
 input, right? I've had to do all my hashing manually. If this functionality
 could be added, it would cut out a decent amount of code scattered around my
 controllers from it.

If you use the Auth component, the password is automatically hashed
when you create a new record in your User table.  Any reason why
you're not using it (this is a trick question)?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: password not hashed by edit user

2008-06-20 Thread Chris Hartjes

On Fri, Jun 20, 2008 at 12:08 PM, leo [EMAIL PROTECTED] wrote:

 It works ticketyboo when inserting a _new_ record. It ticketydoesn't
 when you then edit that record.

Interesting...I have some edit user functionality in an app, and I
will test it out later to see this error for myself.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Localization and Internationalization: Can't switch languages

2008-06-20 Thread Chris Hartjes

On Fri, Jun 20, 2008 at 1:21 PM, deltawing [EMAIL PROTECTED] wrote:

 I followed the CakePHP 1.2 tutorial and was able to set the language
 in beforeFilter().

 The problem is I want users to be able to switch the language at any
 time, by clicking on a link. How can I do that? I've tried many things
 but I still can't get it to work.

 Any takers?

 Thanks in advance.

Please don't double post.  People will respond if they have an answer.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how do I handle foreign keys??

2008-06-20 Thread Chris Hartjes

On Fri, Jun 20, 2008 at 10:33 PM, Turnquist, Jonah [EMAIL PROTECTED] wrote:

 Eh, it did not work.  And I read those pages, it does not seem to tell
 me.  Do I need to do this manually using find() to find all the
 categories and than pass those to the input through 'options' or will
 cake do some magic because of my $belongsTo definition?  Also, if I do
 it manually, how would I call the Categories modal from the Scripts
 controller?  This obviously did not work in my Scripts controller:
 $this-Category-find('all', array('recursive' = -1));

It looks to me like you're trying to generate a list of things for
your form.  If so, try this from your scripts controller:

$this-Entry-Category-recursive = -1;
$results = $this-Entry-Category-find('list');

Make sure that you've set the $uses variable in your Scripts
controller to tell it you want to use Entry.

class ScriptsController extends AppController {
 var $uses = array('Entry', ...)
 ...
}

Hope that helps.


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Importing a helper

2008-06-19 Thread Chris Hartjes

On Wed, Jun 18, 2008 at 9:15 PM, Turnquist, Jonah [EMAIL PROTECTED] wrote:

 I do not understand I did not give an answer I gave another question,
 the question mark indicating that.  Does the RAM not effect
 performance?  also, it does not matter if the database is slower than
 the loading of the helper.  That does not mean I should not optimize
 other areas besides the database.  Also I do not want the Time helper
 loaded into all the actions because they are not used there, and that
 is bad organization, and organization is what cakePHP is about,
 right?  So why not try to be organized.

My point was that there are probably other things that are more likely
to affect the performance of your application than loading the Time
helper for every action in a controller.

And how can you say that it does not matter if the database is slower
than the loading of the helper?!?  Of course it matters.  How can
someone who is so concerned about speed ignore such a thing as the
speed at which you get data from a database?

In the interest of avoiding further douchebaggery, I will agree to
disagree with you on the topic of premature optimization.  Glad that
Mr. Snook found the answer for you.  My solution was missing a step,
but I have no idea if it was going to work:

App::Import('Helper', 'Time');
$timeHelper = new TimeHelper();
$this-set('timeHelper', $timeHelper);

and then in your view you could reference the helper via $timeHelper.

Like I said, it *looks* good but no idea if it would work.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Ajax in Cakephp

2008-06-19 Thread Chris Hartjes

On Thu, Jun 19, 2008 at 8:19 AM, joselee [EMAIL PROTECTED] wrote:

 I have an ajaxed Cakephp 1.1 application, I want to move it into
 cakephp 1.2.0.71 to enjoy new features, I get some Javscript error
 each time i load the application, could it be the versions of the
 scriptaculous 1.8.1 and prototype 1.6.0.1 libs, please help


How about you share some code via http://bin.cakephp.org, because
you've given us (meaning the mailing list) nothing to work with.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Does SimpleTest v1.01 break Test Suite v1.2.0.0??

2008-06-19 Thread Chris Hartjes

On Thu, Jun 19, 2008 at 8:19 AM, mGee [EMAIL PROTECTED] wrote:

 Thanks for submitting the ticket. I had no idea that there WAS in fact
 a bug or it was something that I was doing wrong, so submitting a
 ticket didn't make much sense to me until I knew for sure. Thanks
 again.


There's no harm in filing tickets when you find something.  What's the
worst thing that can happen?  It gets rejected, and life moves on.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Which find to use on controller?

2008-06-19 Thread Chris Hartjes

On Thu, Jun 19, 2008 at 11:17 PM, Louie Miranda [EMAIL PROTECTED] wrote:
 Anyway.. tried this..
 $this-Post-find('articles', array('conditions'= array('Post.category_id'
 = 1)));

 But, could not get the correct parameters working. I'll check again the
 book.

$this-Post-find('all', array('conditions' = array('Post.category_id' = 1)));

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best Upgrade Path

2008-06-18 Thread Chris Hartjes

On Wed, Jun 18, 2008 at 9:15 AM, theandystratton
[EMAIL PROTECTED] wrote:

 Thanks guys, these are both great and give me some good insight. @Sam
 I really like the linking idea, thanks again.

 One other question then, does the app directory never need to be
 touched? The only thing that confused me was if the configuration
 objects/methods have changed, you could be breaking something by
 updating your cake directory.

Sometimes things do change, like the names of options in
APP/config/core.php, and I have not found a good way to keep track of
those changes.  Probably because I'm lazy.

Fortunately, Cake does tend to send out quite verbose
framework-related error messages and I have on occasion done a simple
diff between a stock APP/config/core.php and my current core.php file
to see if anything major has changed.

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 1.2 RC1 Release Notes - wood and trees

2008-06-18 Thread Chris Hartjes

On Wed, Jun 18, 2008 at 10:09 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 https://trac.cakephp.org/timeline
 https://trac.cakephp.org/wiki/changelog/1.2.x.x

 All I've ever needed, all I've ever used :D

As loath as I am to argue with people (that's a joke, for those who
don't know me) I have to agree that sometimes, it would be nice to see
documentation with the releases that says we've added this cool new
feature, and here's how to use it.

Given the massive size of the change log, I don't know if that's even feasible.
-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Does SimpleTest v1.01 break Test Suite v1.2.0.0??

2008-06-18 Thread Chris Hartjes

On Wed, Jun 18, 2008 at 2:31 PM, mGee [EMAIL PROTECTED] wrote:

 Any chance someone might have some input? It would be greatly
 appreciated.

 Peace
 Mike

I filed a ticket on your behalf about this:

https://trac.cakephp.org/ticket/4946

In the future, I suggest you file tickets when you find things like this.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Importing a helper

2008-06-18 Thread Chris Hartjes

On Wed, Jun 18, 2008 at 7:50 PM, Turnquist, Jonah [EMAIL PROTECTED] wrote:

 But that would include it into all the actions, not just the 'index'
 action which I need.  How do I include it into in index action alone?
 I always worry about speed.  Also, can I include it from the view?
 that would be best, as it is only used in the view.  How do i do this?

If you seriously think that having the Time helper included when your
controller is loaded and being available for every action will reduce
the speed of the application in any appreciable way, I doubt your
ability to determine the choke points of an application.

No, you can't include it from the view either.

Did you try this in your index controller (assuming you are using 1.2):

App::import('Helper', 'Time');
$timeHelper = new TimeHelper;

Hope that helps, and beware of premature optimization.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Importing a helper

2008-06-18 Thread Chris Hartjes

On Wed, Jun 18, 2008 at 8:15 PM, Turnquist, Jonah [EMAIL PROTECTED] wrote:
 If it does not slow it down why don't all the helpers just all get
 loaded automatically?  I mean, the Time helper is 538 lines of code.
 It must slow it down to load that into RAM and deal with it.

Your answer shows that you do not understand the question.  It's not
about RAM, it's about performance.  It's likely that it will take more
resources to talk to your database than to hold the time helper in
memory.

Just my opinion, but others share it.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Simple Auth not working when models are defined

2008-06-17 Thread Chris Hartjes

On Tue, Jun 17, 2008 at 9:43 AM, Aaron [EMAIL PROTECTED] wrote:

 Thanks for the quick response but I have already tried that and it
 doesn't make a difference.  I've moved the beforeFilter() stuff into
 app_controller.php, into users_controller.php and other combinations.
 Looking at the stack trace it is getting into the Auth component but
 the component's $this-user() comes back null.  $sessionKey isn't
 found in the session.  The session appears to get corrupted or isn't
 set properly.  _loggedIn is also blank.


I'm using Auth just fine with a constantly-updated version of Cake
from SVN, but aren't using anything other than the conventions.  I
have also seen users experiencing problems with sessions when the
security level in config/core.php is set to high.  I always roll with
it set to medium, but your mileage may vary.

If you setting Auth-related things in your app_controller's
beforeFilter function, you should have a beforeFilter() method in your
other controllers that inherits from app_controller.  I have always
done this and never experienced any problems with Auth, even when
going with non-standard Auth configurations.

If the problem still persists, I suggest that you file a ticket at
trac.cakephp.org so that the issue will get looked at it.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 3:45 PM, Corie [EMAIL PROTECTED] wrote:

 I'm using the bootstrap file to load up default controllers and other
 stuff.

Why would you do it this way when none of the examples out there do
anything remotely similar to this.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 4:11 PM, Corie [EMAIL PROTECTED] wrote:

 I've not found any examples.

 What would you recommend as a better way to share models, controllers,
 and views between multiple sites?

 -Corie

Having never done that (i.e. sharing models, controllers and views
between multiple sites) I do not have an answer, but from what I do
know about building CakePHP apps, it is definitely not that way.

Perhaps you could explain a little more what it is you are trying to do.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 4:26 PM, Corie [EMAIL PROTECTED] wrote:

 I build a lot of small web sites and most of them use the same type of
 controllers so I'd like to be able to have one set of these to update
 instead of 20 to update every time I make a change. Maybe plugins
 would be another route to go, but that would require having to update
 all the sites for every small change I make.

It has been my experience that CakePHP is not well suited to that
task.  If others have done it, I'm sure they will share their
experiences.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore [EMAIL PROTECTED] wrote:

 It is documented in the manual
 http://manual.cakephp.org/view/32/installation#advanced-installation-35

Thanks for pointing that out, Sam.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 1.2 revamped

2008-06-14 Thread Chris Hartjes

On Sat, Jun 14, 2008 at 12:35 AM, garrettjohnson [EMAIL PROTECTED] wrote:

 Sorry if this seems like a horrible question, but i am new to php, but
 i have been looking around for a framework to develop with while i
 mess with php, i have heard in the past that since cake was origally
 built with php4.


Yes, it was built in PHP 4 originally but it works just fine in PHP 5.

Cake 2.0 will be the first release of CakePHP that will be PHP 5 only.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bake - problems with Slashes in path (windows)

2008-06-13 Thread Chris Hartjes

On Fri, Jun 13, 2008 at 4:01 AM, KevinH [EMAIL PROTECTED] wrote:
 But like you see, it makes standard slashes in the path and not
 backslashes.
 So it tries to create the views in C:/xampp/htdocs/todo\app\views\
 which is wrong.
 What do i need to do that it makes only backslashes?


Hrm, that is an old bug that was supposed to have been fixed.  Can
anyone else baking on Windows using RC1 confirm this?

If I get a lull at work I'll fire up WinXP in Parallels and see what's going on.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: AjaxHelp editor missing submitOnBlur option

2008-06-12 Thread Chris Hartjes

On Thu, Jun 12, 2008 at 10:55 AM, Boris [EMAIL PROTECTED] wrote:

 Hi,
 just to let you know, i discovered that the helper does not recognize
 submitOnBlur option.
 It has to be added to the $editorOptions array in the cake/libs/view/
 helpers/ajax.php line 101

 I am using cakephp 1.2 rc1

 I love cakephp thanks for all the great work!

If you really want to say thanks, go and file a ticket for this over
at trac.cakephp.org

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How i do date validation?

2008-06-09 Thread Chris Hartjes

On Mon, Jun 9, 2008 at 12:56 PM, GreyWolf [EMAIL PROTECTED] wrote:
 What's wrong? Thanks.

What version of CakePHP are you using?  If you're using 1.2, have you
looked at this:

http://book.cakephp.org/view/125/data-validation


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Routing

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 2:25 AM, Turnquist, Jonah [EMAIL PROTECTED] wrote:

 grrr I'm starting to consider going back to codeigniter... they
 allowed for regular expressions...

Have you never heard of google?

Found this in under 5 seconds by searching for regular expressions
cake routing

http://c7y.phparch.com/c/entry/1/art,cake-seo


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Proper debugging of CakePHP

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 9:43 AM, Sake [EMAIL PROTECTED] wrote:

 ok, so do I run the debugger on the index.php file? How does it work?


You're going off-topic from Cake and into the Land of Debugging.
Please use Google or your other favourite search engine to find info
on how to use XDebug or any other debugging tools.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best Upgrade Path

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 11:52 AM, theandystratton
[EMAIL PROTECTED] wrote:

 We're also thinking about standardizing this for all of our sites
 eventually, and will definitely want to create a safe, clean, upgrade
 process as Cake's development continues.


The best way I have found to handle this is to have your cake CORE
directory in a different place from your cake APP directory, so that
way you can update cake CORE without over-writing anything in your
Cake APP.  Plus, makes it really easy to move code from dev - staging
- production if there are slight differences in how each environment
is configured.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: find('list') in view - noob problem

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 1:36 PM, Rich [EMAIL PROTECTED] wrote:

 I was actually following what cake baked for me but it did create the
 list for me which was not what i wanted to do. Every time I try to
 change the type of find to something else . . i still don't get the
 data. . . kinda lost here.

find('list') is generally used when you want to create a list of
entries for a form select field.

I think you need to go to http://book.cakephp.org and read through it
so you understand what you might be doing wrong.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: find('list') in view - noob problem

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 2:04 PM, Rich [EMAIL PROTECTED] wrote:

 Kinda figured i'd get a response like that. . . .


Don't take it personally, I never do.

What do you need the data to look like?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Keep current password

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 4:33 PM, benjam [EMAIL PROTECTED] wrote:
 I was wondering if there was a way to prevent it from hashing the
 password if there is no password entered?

Well, before you save the data when you're editing, you could unset
the password field.

i.e. unset($this-data['User']['password']

Totally untested.  Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Keep current password

2008-06-06 Thread Chris Hartjes

On Fri, Jun 6, 2008 at 4:42 PM, benjam [EMAIL PROTECTED] wrote:

 If you'll notice in my controller method, that's exactly what I do,
 but because it's already hashed, it's not empty, it's a hash of an
 empty string.

 I need to find a way to delete it before it gets hashed.  And it gets
 hashed before the data gets to the method.  So I need to find a way to
 delete it even before that.


Ugh.  Didn't notice that you were doing that before I posted.  My apologies.

Try doing it in the beforeSave() method of your model.  You'd have to
do a check to see what action you were doing so that you can say if
you're accessing this via my edit method, unset the password.

I'm not 100% on where in the whole save process that Auth hashes the
password, so putting it in beforeSave() hopefully does the trick.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: a bit confused (n00b warning)

2008-06-05 Thread Chris Hartjes

On Thu, Jun 5, 2008 at 8:00 AM, winter [EMAIL PROTECTED] wrote:

 Everything was going fin untill I wanted to put some html select tags
 on the add view for the pivots table. The docs don't say how I can
 access data from another model - $this-set('units', $unit-Unit-
findAll());. Of course it's not $this. I read the docs some more and
 found out about ascociations. This is where hair begins to fall out.

 I've been making DB apps for quite some time now and never used
 something like this. It reminds me of MS Access. Ugh. Do I really need
 to set this up? Will it be flexible in the end? What ascociation do I
 use? I read about the hasAndBelongsToMany and the required join table.
 It sounds like it's just what I want to do. Is it? Can I just Item-
findAll() and pass the data to the view and put it in the html
 select?


Here's what I would try:

1) rename your 'pivots' table and change it to be named 'items_units'
and drop the ID field as you don't need it
2) create your HABTM relationship (instructions in the manual)

Then you can access info like this (these are only examples)

$results = $this-Item-find('all') == gives you all Items and their
associated units
$results = $this-Item-Unit-find('all', conditions go here) =
gives you all units that match your conditions

Hope that helps (and I hope I did that right :) )

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model::find(). Condition handled as an integer when it should be handled as a string

2008-06-05 Thread Chris Hartjes

On Thu, Jun 5, 2008 at 9:56 AM, Jonathan Snook [EMAIL PROTECTED] wrote:

 How would Cake be able to know that when you pass it a number that
 what you really mean is a string?

 Cake knows because it's DEFINEd the fields from the database. If it's
 VARCHAR, CHAR, or TEXT, treat it as a string.

/me smacks himself in the forehead.

I had thought that was the case, but is that *really* what is going
on?  It looks to me like Cake is not honouring that for whatever
reason.

I wonder if this is something that works properly in 1.2?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Complex CMS routing

2008-06-05 Thread Chris Hartjes

On Wed, Jun 4, 2008 at 6:11 PM,  [EMAIL PROTECTED] wrote:
 Here is my problem though: I don't want to impact my users' sites,
 meaning I want to keep their URLs intact and continue to use the same
 underlying database containing sites and pages (where a record in the
 page table has a URI, a parent id/URI, page content, an optional
 controller and template, and lots of other fields. Since the site page
 hierarchies can be arbitrarily complex, the URLs can be very long and
 don't fit the usual /controller/action/param1/param2 convention that's
 easy to work with in CakePHP.

 So the main issue I'm facing is, how to map that /program/about/people/
 faculty URI to the faculty page which is a child of the people
 page which is a child of the about page which is a child of the
 program page. I'm not looking for specific code here, just some
 general approaches. The two obvious approaches that I could see are:

This link should help you out:

http://c7y.phparch.com/c/entry/1/art,cake-seo

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: reset Session variables without any visible cause

2008-06-05 Thread Chris Hartjes

On Thu, Jun 5, 2008 at 3:27 PM, Jeff [EMAIL PROTECTED] wrote:
 But, the question is, why does it happen sometimes (randomly) and not
 other times.  I
 know exactly what the others are going through, because it is
 happening
 on my site too. I can do the exact same steps that killed my session,
 and it will
 work.  If it was a coding error, then it would be reproducible by
 doing the exact
 same thing that caused it to fail the first time.

When things happen randomly, there are usually two possible problems:

1) the framework is wrong
2) your own code is wrong

While I will concede that from time to time, the framework is wrong,
more often than not it is your own code that is wrong.  This is not
meant as a slight, this is simply reality.  I write shitty code all
the time and when the app goes kablooey it is my fault, not the
framework.

None of the people who complained in the thread about having problems
bothered to provide code samples, so who the hell knows what the
problem really is.  Show us a sample in http://bin.cakephp.org of your
code that is not working properly and that might point these people in
the right direction.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Validation - some things are more alphanumeric than others

2008-06-02 Thread Chris Hartjes

On Mon, Jun 2, 2008 at 10:40 AM, leo [EMAIL PROTECTED] wrote:

 I only meant, but didn't explain very well (at all) that it is no
 longer good enough to assume that the whole world speaks American
 English. While there is a good case for English-based programming
 languages, programming is about end-users. They don't know and don't
 want to know about limitations of 8 bits or ASCII's definition of the
 alphabet, nor do clients or project managers. They just want to be
 able to read things in their own language. We're getting there slowly.

Programming is also about the people who write it as well, and I'd be
willing to bet that this thread will be ignored if there is no ticket
filed.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recommendations for changes to Cake manual.

2008-06-02 Thread Chris Hartjes

On Mon, Jun 2, 2008 at 1:20 PM, mustan9 [EMAIL PROTECTED] wrote:

 Hi,

 I have a few improvement requests for the Cake online manual.

File a ticket over at trac.cakephp.org rather than place your requests
in the mailing list.  I can almost guarantee nothing will happen
without a ticket.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recommendations for changes to Cake manual.

2008-06-02 Thread Chris Hartjes

On Mon, Jun 2, 2008 at 2:07 PM, mustan9 [EMAIL PROTECTED] wrote:

 I've filed tickets there before and gotten replies telling me to post
 things like this on the mailing list.

I doubt that, and would be happy to take it back if you show some
proof.  All work on the project flows through either the ticket system
or at the initiative of the core developers (disclaimer: I am a core
developer who has been slacking off in the initiative department as of
late).

If people want to rant and rave in the mailing list, all the power to
you.  But don't lie about the reasons for not filing tickets please.

If someone did indeed tell that to you before, don't let one bad apple
spoil the whole bunch.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recommendations for changes to Cake manual.

2008-06-02 Thread Chris Hartjes

On Mon, Jun 2, 2008 at 3:41 PM, mustan9 [EMAIL PROTECTED] wrote:

 If you wish to have an argument about the truthfulness of my posts,
 then I recommend we move this to a private exchange of e-mails. My e-
 mail address is publicly shown with all my posts.

So is mine.  What's your point exactly?

I have no desire to continue this exchange in private emails because
it does not serve my purposes.  The purpose of my email is to tell
people FILE TICKETS IF YOU WANT TO SEE THINGS CHANGE.

I repeat my request to be shown proof that when filing tickets to do
with the manual you have been told to not file a ticket but to discuss
it on the mailing list instead.

I also repeat my statement that if this was the case I will be glad to
say I was wrong and credit you for being correct.  People can say what
they want about me, but I do tend to stick with what I say in my
e-mails.  If I am wrong, I'll do a blog post apology where many people
can see it.

Seriously, when did his happen because that is not current
ticket-responding policy as far as I am aware.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: replacement for beforeFilter?

2008-05-30 Thread Chris Hartjes

On Fri, May 30, 2008 at 11:08 AM, TWIOF [EMAIL PROTECTED] wrote:

 Hello all,

 now that cake 1.2 returns: beforeFilter property usage is deprecated
 on

 class AppController extends Controller
 {
#var $components = array('Auth');
var $beforeFilter = array('funcname');

function funcname()
{

}
 }

 What is the new way of using this type of functionality?


function beforeFilter() {
// do whatever was in funcname here
}


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Validation - some things are more alphanumeric than others

2008-05-30 Thread Chris Hartjes
On Fri, May 30, 2008 at 12:53 PM, leo [EMAIL PROTECTED] wrote:

 Letters like ñ  ç fail the following validation:

 'rule' = 'alphaNumeric'

 I would say that's a bug, but my head still hasn't grown back from the
 last time I said that, so I won't.

That is probably because the regex that checks for alphaNumeric might
not be UTF-8 friendly.  Don't panic, just file a ticket while your
head regrows.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Need a lightbox type app

2008-05-29 Thread Chris Hartjes

On Thu, May 29, 2008 at 1:34 PM, Kyle Decot [EMAIL PROTECTED] wrote:

 Thanks, but I forgot to mention that it has to use prototype/
 scriptaculous
 --~--~-~--~~~---~--~~

Found the perfect solution for you, the URL is kind of long so I put
it through TinyURL:

http://tinyurl.com/6orb8o

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: InPlaceEditor

2008-05-29 Thread Chris Hartjes

On Thu, May 29, 2008 at 4:03 PM, Kyle Decot [EMAIL PROTECTED] wrote:

 I am attempting to build an ajax calendar. Each date will have a piece
 of information in it, and when you click on that day I need it to
 become an editable field. Does anyone know of any good tutorials for
 something like this? Thank you as always.
 
/me throws hands up in the air over unwillingness of poster to utilize
internet search engines to find answers

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Different performance between 1.1 and 1.2

2008-05-29 Thread Chris Hartjes

On Thu, May 29, 2008 at 4:56 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:


 The problem is that it's the same even if debug is off .
 The difference is smaller but Cake 1.1 seems faster than Cake 1.2


Ah, you crazy kids and your concerns about the speed of Cake.  Back in
my day, we looked at all factors of an application before we started
blaming the code, since the database would inevitably be the
bottleneck unless we had written really shitty code or were actually
doing computationally-intensive work.

I think the additional features of 1.2 are what make it worth
upgrading from 1.1, and I hate to burst anyone's ego but I doubt your
application will get so much traffic that any alleged speed decrease
from Cake 1.2 will make a difference.  Good coding practices go a long
way towards ensuring application speed.

Performance testing and benchmarking is an art in itself and unless
you use tools specifically dedicated towards those  ends (like Xdebug
or Apache Benchmark or Siege ) you are just making shit up.

Have I used these tools on Cake?  No.  Why? Because I don't care about
CakePHP's speed.  For 99.999% of those who use CakePHP, it is
MTFEIYFTR (More Than Fast Enough If You Follow The Rules).  For the
other .001%, either change your code or go with a non-Cake solution.

This is the Twitter sucks because of Rails fallacy.  Twitter sucks
because they built a messaging system using tools for building a
content management system.

So, to get back to your initial question from the beginning of the thread:

Upgrade to 1.2 because it is light-years ahead of 1.1 in available features.

Now get off my lawn!

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recommended User Authentication setup?

2008-05-28 Thread Chris Hartjes

On Wed, May 28, 2008 at 1:22 PM, 703designs [EMAIL PROTECTED] wrote:

 I'm sorry, but duh. I wasn't leveling any criticism, and I'm well
 aware that the two are separate.I must have made myself unclear. In
 any case, I'll take a look at Chris' tutorial. It's a bit old, can I
 expect it to work with recent nightlies?


Yes, it should be fine as the Auth component hasn't really changed
much since I wrote it.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: when is cakephp 1.2 stable release?

2008-05-28 Thread Chris Hartjes

On Wed, May 28, 2008 at 10:05 PM, kknd [EMAIL PROTECTED] wrote:

 but when the 1.2 stable is release?

When it's ready.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Htmlhelper link and passing value to controller function

2008-05-27 Thread Chris Hartjes

On Tue, May 27, 2008 at 1:51 PM, Mike [EMAIL PROTECTED] wrote:

 Ok, I think I solved it. The proper value was being passed into the
 function after all. The problem was in how I was structuring my find
 in the controller function. I had:

 $conditions = array();
 $conditions['Transaction']['clientID'] = = {$theclientid};
 $results = $this-Transaction-findAll($conditions);

 Which does not work (any ideas why???). However, this does work:

Conditions are usually done as key = value pairs.

$conditions = array('clientID' = $theclientid);
$results = $this-Transaction-find('all', compact('conditions'));

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Upgrading Cake

2008-05-22 Thread Chris Hartjes

On Thu, May 22, 2008 at 11:56 AM, Rob Wilkerson [EMAIL PROTECTED] wrote:

 Would love to know if there's a baked in upgrade path or, if not, what
 strategy experienced users employ.

 Thanks.

 Rob

Well, I keep my Cake core files out of the web path (no snooping,
thanks!) and my app directories are in the web path.  So, when I
upgrade the core, nothing in my app gets overwritten.  Best way, if
you ask me.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why CakePHP always uses var?

2008-05-21 Thread Chris Hartjes

On Wed, May 21, 2008 at 1:03 PM, mustan9 [EMAIL PROTECTED] wrote:

 Hi,

 The var keyword is deprecated in PHP5. The Cake documentation and
 source code constantly use this keyword to define properties for
 classes. The documentation should be changed, and all references to
 var should be replaced with the correct visibility of that member
 variable.

CakePHP 1.x is PHP 4 compatible, so that is why 'var' is being used.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Multiple rule Validation causes Redirect to fail.

2008-05-20 Thread Chris Hartjes

On Tue, May 20, 2008 at 10:10 PM, Mr-Yellow [EMAIL PROTECTED] wrote:

 Email component loads all your helpers in as part of it's rendering of
 the email view into a variable.

 This causes the helpers to be included along with any whitespace they
 may have.

 So deeply hidden whitespace issues with EmailComponent = Helpers with
 whitespace

It can also be whitespace issues in your templates, couldn't it?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Newcomer with feedback and question with a concern

2008-05-16 Thread Chris Hartjes

On Thu, May 15, 2008 at 8:50 PM, Jason Carlson [EMAIL PROTECTED] wrote:
 Here this feature was requested by a couple of folks.  The developer nate
 responds to the first requester by saying this is definitely not the
 direction they want to take CakePHP in but gives no other reason why.  The
 second requester sees what I see in that it doesn't look like they think it
 is important so he re-opens it mentioning that it is important enough that
 ZF supports this.  The same developer not only shuts it down but minimizes
 it to trivial and warns the guy about ever mentioning ZF.  I've not looked
 at ZF personally but is it not open source and if there are good ideas in it
 is it not okay to adopt them, after all isn't CakePHP isn't original but
 based strongly on Ruby on Rails from what I understand.

Well, *asking* for a feature is different from *implementing* a
feature.  Perhaps Nate was a little brusque, but people need to accept
that from time to time, the people who do the coding might disagree
with other people's ideas.

I have no idea how ZF has implemented multi-column primary indexes as
keys in their database abstraction layer, but I don't think that's
really the issue.  Just because ZF has it does not automatically mean
that CakePHP should have it too.  I suspect that your guess about the
amount of work needed vs. the benefits gained is probably the best
reason.

As for the ZF comment, I don't think that Nate really meant thou
shalt not mention ZF ever more.  It was more along the lines of
complaining that ZF has something that CakePHP doesn't isn't the best
way to motivate me.

 With what is posted however, I hope you can understand why as a newbie to
 CakePHP I have my concerns.

I think you should judge CakePHP on how it actually works, instead of
how the developers who create it comment on tickets.  That ticket is
very old (we're up into the high 4000's for tickets now) so maybe
enough changes have been made to the Model classes that this could be
implemented in the future.  If you really want to take the bull by the
horns, create a ticket on trac.cakephp.org asking that this be
reopened again.  The worst thing that is going to happen is that they
will reject the ticket.  And again, you should never take it
personally when a ticket is rejected, no matter what it says in the
comments.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RFC: cake deploy

2008-05-16 Thread Chris Hartjes

Hi kids.

I'm starting to get my notes together for creating a 'cake deploy'
task, since I have become rather involved in application deployment as
of late.

In my mind right now I have two options:

'cake deploy config'
- configure what options will be used for the deployment

I envision you choosing between ssh and ftp, usernames and passwords,
servers, source and destination.  That info will be stored in a file
in APP/config.

'cake deploy'
- pretty self explanatory

Anyway, I would appreciate people's thoughts and comments on what they
would like to see as part of 'cake deploy'.  Please keep in mind that
I am under no obligation to accept any of your ideas. :)

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginator and subdirectory

2008-05-15 Thread Chris Hartjes
On Thu, May 15, 2008 at 4:32 PM, Nicolás Andrade
[EMAIL PROTECTED] wrote:


 To solve my issue, I've added the following lines:

 if(strpos($url['action'], Configure::read('Routing.admin') .
 '_') !== false){
 $url['action'] =
 str_replace(Configure::read('Routing.admin') . '_' , '', $url['action']);
 }

 in /cake/libs/router.php, line 749 aprox.

Please file a ticket over at trac.cakephp.org about this, as it might
be something that can be fixed in a more generic way.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: WebService in Cake 1.2

2008-05-14 Thread Chris Hartjes

On Wed, May 14, 2008 at 3:04 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 This is my situation:
 I have the same action that can be a normal page or a xml page.
 For example /posts/view/1 or /posts/view/1.xml

 If is a normal page I would set Layout ajax.
 If is a xml page I would set Layout default.


http://c7y.phparch.com/c/entry/1/art,mvc_and_cake


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: possible bug? validation successful even though required fields are not empty

2008-05-14 Thread Chris Hartjes

On Wed, May 14, 2008 at 3:38 PM, Marc Schuetze [EMAIL PROTECTED] wrote:

 But the current behavior is not doing that. When a field is missing in
 a request it is not being picked up by the validation routine

Wasn't this question already answered in this thread?  If your
validation rules require that a certain field be present, then you
MUST specify that the field is required in your validation rules.


var $validate = array(
   'name' = VALID_NOT_EMPTY,
   );

is not the same as

var $validate = array(
   'name' = array('rule' = 'alphaNumeric', 'required' = true,
'message' = 'Required')
);

If I am misunderstanding the issue, please correct me.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange counter cache behavior - is this supposed to be like that?

2008-05-14 Thread Chris Hartjes

On Wed, May 14, 2008 at 4:04 PM, MarcS [EMAIL PROTECTED] wrote:

 UPDATE foos as foo LEFT JOIN 'bars' as 'bar' ON ('foo'.bar_id =
 bar.id) SET foo.dependent_count = 99 WHERE foo.id=1

 Why does it do that? I can't see the point in creating this join. It
 serves no purpose whatsoever.

Well, do you have an association in your models between foo and bar?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange counter cache behavior - is this supposed to be like that?

2008-05-14 Thread Chris Hartjes

On Wed, May 14, 2008 at 4:13 PM, MarcS [EMAIL PROTECTED] wrote:

 I understand that it is this association which is causing the join.
 But I don't understand why that join is required.
 Isn't all the counter cache is supposed to do is update
 foo.dependent_count
 What does it need the join for then?

It's not a question of needing the join, it seems to be doing it
automatically.  You should file a ticket for this over at
trac.cakephp.org.  I'm betting it's a relatively easy fix.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange counter cache behavior - is this supposed to be like that?

2008-05-14 Thread Chris Hartjes

On Wed, May 14, 2008 at 4:19 PM, Marc Schuetze [EMAIL PROTECTED] wrote:

 will do that.
 Before submitting a ticket I was gonna ask if there is a purpose in
 this that I don't understand.
 I'm still fairly new to cake and I just wanted to be sure

The worst thing that will happen if you file a ticket is that it will
be rejected along with an explanation.  There might be a snarky
comment associated with it, but that's it.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Ajax form submission

2008-05-14 Thread Chris Hartjes

On Wed, May 14, 2008 at 6:01 PM, koala kid [EMAIL PROTECTED] wrote:

 I am new to cake and have just built my first site using it. To spice
 it up I wanted to add a newsletter sign-up form on the home page that
 uses Ajax to both submit the email address and provide a response.
 However the documentation appears to be lacking and I can't find a
 good example anywhere of how to do this. Could someone provide any
 pointers on:

 What a controller would look like
 What components I need to include
 What a view would like like
 Can I perform validation on the email
 What a model may look like.

 Thanks in advance for any help I get.

Was book.cakephp.org no help to you?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Current Id - wie bekomme ich diese heraus

2008-05-13 Thread Chris Hartjes
On Tue, May 13, 2008 at 7:45 AM, grobald [EMAIL PROTECTED] wrote:

  sIst sicher trivialst, aber ich steh wieder mal auf der Leitung. ich
  habe eine Funktion mit der ich ein bestimmtes Feld (url) aus dem
  derzeitigen Record rausholen will:
  $post = $this-Post-read('url', $this-Post-id);

  Aber wie komme ich auf die id des Posts den ich gerade offen hab

  grüße

Mein Herr,

Es tut mir leid aber wir sprechen English auf dieser Postsendungliste.
 Koennte Sie die Frage auf Englisch wieder stellen?

(My German is a bit rusty...)

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth::allowedActions appear seriously messed up

2008-05-13 Thread Chris Hartjes

On Tue, May 13, 2008 at 10:36 PM, b logica [EMAIL PROTECTED] wrote:


  function beforeFilter()
  {
 parent::beforeFilter();
 //$this-Auth-allow('admin_index', 'index', 'view', 'search',
  'alpha', 'getAlphaList');
 $this-Auth-allow('*');
  }

If you are allowing every single action, why are you using Auth?  Or
am I misunderstanding something? $this-Auth-allow(...) tells the
controller what actions Auth should not bother checking authentication
for.

What controller/action pair is failing?  Is it just that one
controller/action pair or is authentication failing everywhere?

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



  1   2   3   4   5   6   7   8   9   10   >