Re: Model Associations and Inserting through Associations

2012-05-05 Thread Nate
I should have specified - the user doesn't necessarily have to be the 
logged in user. It could be any user, in which case $this->Auth->user('id') 
doesn't fit my needs. This is closer, I just need to figure out how to grab 
the user id from the users/view page.

On Saturday, May 5, 2012 10:33:09 AM UTC-6, stork wrote:
>
> $this->Event->create($this->request->data);
> $this->Event->set('user_id', $this->Auth->user('id'));
> if ($this->Event->save()) {
> ...
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Model Associations and Inserting through Associations

2012-05-05 Thread Nate
Trying to learn it through straight code before I dive into any console 
commands. One of the biggest reasons that I've put off using MVC is because 
I like to feel like I'm in control. Yes, probably dumb, but it makes more 
sense to my fragile brain.

On Saturday, May 5, 2012 7:57:13 AM UTC-6, Michael wrote:
>
> You should take some time to learn how to use bake. It will setup the 
> basics for you based on your database and will serve as a great 
> example of how to do things. 
>
>
> http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html
>  
>
> There are many tutorials out there about setting it up. 
>
> ~Michael 
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Model Associations and Inserting through Associations

2012-05-05 Thread Nate
MVC Beginner here - I have created a database with a USER table which 
hasMany EVENTS, and conversely have set the EVENTS belongsTo USER

Here's my question: When I want to add an event from a user page 
(users/view), how do I automatically associate that event(event/add) with 
the user in the database? I know that it makes the foreign key connection 
with a user_id field in the events table, but I don't know how to get to 
the event/add page and carry/apply the user id to the form helper. Am I 
making any sense here?

Thanks in advance.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-13 Thread Nate
Glen, I know your situation. Been there.

The best thing I can say is to offer up a compromise and continue to
use what's there while you're learning the new framework.  Get
permission from your boss to spend a few hours a day learning the new
framework, and most of the day working on projects that make the
money. You may even have to spend some of your own free time learning
the framework...like, at home after work.

The biggest issue being that if you have work that needs to be done
quickly, you can do it with what you are used to. On the flip side, if
you're using a new framework and you get a request for something you
can't program in time, then you ultimately scramble back to your old
ways and waste time.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Disappointed with the training.

2012-01-04 Thread Nate
Thanks Larry.

I understand that not every time zone and every language can be
covered.

I think the live training lessons are a pretty great idea, but I just
wonder about those that are unable to attend the lesson when it's
scheduled.

"no cost" is not what I'm talking about, either. There are quite a few
web sites out there that offer a monthly and/or per video
subscription.  They're affordable and offer really good lessons.
Problem is, none of them offer any good CakePHP tutorials. Most video
tutorials that are available (to include the free seminars you
mention) are Cake version 1.2 or 1.3. I've yet to see a memorable 2.0
video tutorial. And I guess that's what I was expecting and hoping for
from the Cake Training.

But as you said - it's only an initial release. I understand that. I
don't think what you're offing is "bad". I am just disappointed
because I was looking forward to getting some lessons from the best
possible instructors, and I only find out that it's at a time that I
can't see it, and it's out of my price range.

It is what it is. I still enjoy using CakePHP. I'll just have to find
a different way to get better.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Disappointed with the training.

2012-01-04 Thread Nate
Right John.

But I'm not needing a "how to program" tutorial. If you're using
CakePHP, chances are you're already familiar with the concepts of
programming with PHP - you're just looking for a way to speed up your
programming process. Exactly what CakePHP is made for.

I'm still not sure what I'm getting for $89 per lesson. The
descriptions are rather vague.

Is it a requirement that I take the beginner course to get to the
intermediate course? Because the intermediate course builds off of
what you accomplished in the beginner course.

I don't really have a problem with taking the beginner course.  My
main disappointment lies in the fact that the lessons are not easily
accessible. They're scheduled for an odd hour, one time, and
expensive. Maybe if the lesson was saved and available for download at
a later time?

That's all my disappointment really is...just accessibility for people
who want to learn.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Disappointed with the training.

2012-01-04 Thread Nate
Well it looks like the CakePHP training came available for
registration, and I am rather disappointed in how the training
actually is.

The beginner, intermediate, and advanced courses are all scheduled
courses - each an hour long, from 4pm to 5pm, at $89 a pop.

3 courses, 3 hours, $267 dollars.

Cake, I hope you take into consideration the folks that can't afford
that kind of price tag, for such a short lesson, at a pretty
inconvenient hour.

I work 5 days a week...a typical 9-5 job. So by the time I get home
and want to learn some CakePHP, the lesson is already over. (I am
GMT-5, so that means the lesson would take place around noon time,
right in the middle of my work day)

I'll just use Lynda.com as my example, because I've used it for years.
The monthly price tag is fair. The videos are instant (I can watch
them at any time, at my convenience). And it's hours upon hours of
information and lessons.

Furthermore, it seems by the description that a lot of what is being
taught can be easily read in the Documentation. So, what am I getting
for a 1 hour, $89 lesson? Who is it aimed at?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Any word on the CakePHP Training?

2011-12-05 Thread Nate
Any updates on this?

Also, Are there any CakePHP 2.0 books in the works that anyone is
aware of?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Handling images

2011-11-05 Thread Nate
Thanks Joseph,

It's a work in progress - so yes, I can change over to InnoDB.

Saving the post first isn't really the method I'm looking for. I'm
interested in something like Uploadify, which I just discovered and am
trying to get it going.

I like it because it starts uploading and processing the image as soon
as you select it.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Handling images

2011-11-05 Thread Nate
I'm curious how I would go about setting up my script to process
multiple pictures and attach them to a post that doesn't exist yet.

In other words, a user is in the process of creating a new post - and
uploads an image that automatically gets processed (Some AJAX goodness
going on in the background). The post hasn't yet been submitted, but
now I need to associate the picture(s) with that post once it does get
submitted.

When the photo is uploaded and processed, and the response comes back
with the image name, would I put the name of the image in a hidden
field that gets submitted with the form?

Any other suggestions on how to accomplish this?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Getting logged in username and group id

2011-11-04 Thread Nate
Aw yeah that's definitely helpful. Thanks! Starting to really enjoy
CakePHP :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Getting logged in username and group id

2011-11-04 Thread Nate
Just trying to improve how I'm doing things.

I'm checking a user's usergroup id and displaying additional options
if they are in a particular usergroup. (followed the 2 part ACL
tutorial in the 2.0 book)

Here's an example I have in one of my views, to display different
content if you have the permissions:

Session->read('Auth.User');

if(isset($user)){
if($user['group_id'] == 1){
//Display Admin Options
}elseif($user['group_id'] == 2){
//Display Manager Options
}elseif($user['group_id'] == 3){
//Display User options
}
}
?>

It works - but it doesn't seem very efficient. I would have to put
that chunk of code into EVERY view that I create. Just looking for a
little guidance on how I can use this code more efficiently and
accomplish the same thing easier and more to standards.

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Routing

2011-11-01 Thread Nate
So what if I have different levels of management?

Super Administrators
Administrators
Managers


Managers have a set of options.
Administrators have all options that Managers have, and then some.
Super Administrators have all options that Managers and Administrators
have, and then some.

I'd rather not create 3 or 4 different admin views for each usergroup
- but check to see if a user is part of a usergroup and then display
or hide the additional options.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Admin Routing

2011-11-01 Thread Nate
So I'm reading over the Simple ACL tutorial provided in the
documentation.

Right at the beginning, it says...
"Leave out admin routing for now, this is a complicated enough subject
without them."

Can anyone give me any links or information on what exactly Admin
Routing is and how to utilize it?

I'm assuming it's something like mysite.com/admin and an administrator
interface.  I definitely need that :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Subscriptions

2011-10-31 Thread Nate
There's a few Paypal plugins available out there that I'll get into
when I begin coding.  Those seem to handle taking the initial payment,
and communicating with PayPal to ensure that the payment was
successful or a failure for whatever reason.

That's fine, for a one time payment - but how would a subscription
plan work?

User buys a 30 day subscription and the software updates to allow the
user access to features for 30 days.  At the end of that 30 days, how
would the program check with PayPal to ensure that the subscription is
still valid? How would we tell the system that the user has cancelled
their subscription through the PayPal website?

Thanks :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Any word on the CakePHP Training?

2011-10-22 Thread Nate
Just curious what's going on with the CakePHP Training. Kinda excited
about it. I could definitely use some help!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake Bake cannot connect to my database

2011-10-21 Thread Nate
Awesome!

Changing 'localhost' to '127.0.0.1' worked :)

Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth password encryption

2011-10-21 Thread Nate
MD5 is only one way.  It cannot be reversed...However, it has been
"cracked" and is considered insecure by itself.

Why? Rainbow tables have billions of hashes. They contain any and
every password combination you can come up with. All an attacker has
to do is take an MD5 hash and compare it to what's in a rainbow table
- and that table will show you the original value (a password).

Here's a great analogy I learned:
You're a chef and you make spaghetti and sauce. You serve the meal to
5 people. Those 5 people then add salt to their spaghetti.  No matter
how hard you try, you will never re-create their modification to the
meal. You don't know how much or how little they put on.

Hope that kinda clears things up :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Cake Bake cannot connect to my database

2011-10-21 Thread Nate
In manually setting everything up, I'm able to successfully add,
modify, view, and remove products with scaffolding enabled.

However, when I go into Bake, and I choose to create a [C]ontroller -
it then asks for my database (default).  I confirm that setting and I
get this error:

Warning Error: PDO::__construct(): [2002] No such file or directory
(trying to connect via unix:///var/mysql/mysql.sock) in [/Users/nate/
Sites/tor.local/html/lib/Cake/Model/Datasource/Database/Mysql.php,
line 160]

Any ideas? Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Following blog auth tutorial and get fatal error

2011-10-20 Thread Nate
I just followed the blog tutorial (http://book.cakephp.org/2.0/en/
tutorials-and-examples/blog/part-two.html) and now I'm following the
next tutorial that adds Authentication (http://book.cakephp.org/2.0/en/
tutorials-and-examples/blog-auth-example/auth.html)

Even after copying and pasting the UsersController class, I still get
this fatal error:

Fatal error: Call to a member function allow() on a non-object in /
Users/nate/Sites/cakeblog.local/html/app/Controller/
UsersController.php on line 8

I appreciate the help :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: gwoo Leaving CakePHP??

2009-10-15 Thread Nate

Thanks to those of you who actually acknowledged Garrett's efforts.  I
can tell you that he very much appreciates all of it.

On Oct 14, 11:50 pm, "Larry E. Masters aka PhpNut" 
wrote:
> Adam,
>
> Since being informed by gwoo that he was leaving the project a couple weeks
> ago, I have stepped back into a more active role in the project.
> At this time I have not selected a new project manager but you can be
> assured the project will go on. The lead developers are as active as ever on
> the current codebase, and work on it is increasing rapidly. A change in the
> project manager position for the CakePHP project at this juncture will allow
> us to realign the team to the development roadmap, and better achieve our
> goals in terms of development and release moving forward.
>
> Look forward to what is in store with the 1.3 and 2.0 releases, more to be
> announced on these later :).
>
> --
> /**
> * @author Larry E. Masters
> * @var string $userName
> * @param string $realName
> * @returns string aka PhpNut
> * @access  public
> */
>
>
>
> On Wed, Oct 14, 2009 at 5:18 PM, Adam  wrote:
>
> > "[gwoo] resigned from the Cake Software Foundation and cakephp
> > project. Thank you all for 4 great years. Best of luck to the team and
> > community."
>
> >https://www.ohloh.net/accounts/gwoo/messages
>
> > Is this true? Any reason behind this decision? Who will step up and
> > manage this great project?
>
> > In the event it is true, Garrett you did a fantastic job! I love
> > CakePHP and thank you for your time and dedication.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Changing Acl database

2009-09-04 Thread Nate

That did it, thanks very much. Off the top of your head, is there any
relatively complete documentation about the console switches
available? I haven't been able to find much console info in the
CakePHP.org docs.

For anyone else having this problem, running the following cake
command does the trick:

cake -app /path/to/app/with/named/data/source -connection
myDataSourceName schema run create
DbAcl

On Sep 4, 5:34 am, Dardo Sordi Bogado  wrote:
> Have you tried using the    -connection    switch?
>
> Regards,
> - Dardo.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Changing Acl database

2009-09-04 Thread Nate

I'd infer from the comments in the code that in order to change my
Acl's data source from the default, I should set the following in my
app's core.php:

Configure::write('Acl.database', 'myDataSourceName');

Assuming that $myDataSourceName is set in database.php, I'd expect
"cake -app /path/to/app/with/named/data/source schema run create
DbAcl" to create the Acl tables in the database defined in
$myDataSourceName. However, when I set the Acl.database config, I
can't get the console to write the Acl tables to any data source but
the default. And if I delete the default database from database.php, I
get an error complaining that CakePHP can't find the default.

Am I likely just making a n00b mistake here?

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cakephp secret app at CakeFest

2009-07-17 Thread Nate Abele

It's hardly secret. ;-)

http://github.com/predominant/CakeFest-Berlin-2009-Workshop/

On Jul 17, 11:10 am, Isaac Raja  wrote:
> Hi,
>
> Anybody know where can i find the source of the application that nate
> created at the CakeFest this year? I searched for it and couldn't find it
> anywhere. I heard that the application was similiar to twitter.
>
> Thanks
> Isaac
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Validation

2009-06-22 Thread Nate Brunette

When I validate the cakephp.org pages, it comes back with html and css
errors.  I was hoping to start developing with cakephp, but I don't
think I will be able to if it creates validation errors like this.
Any reason for this?

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: php 5.3 compatibility?

2009-06-18 Thread Nate Abele

Workin' on it.

On Jun 18, 2:48 am, skylar  wrote:
> I noticed one bug in Trac for disabling E_DEPRECATED warnings in
> CakePHP for PHP 5.3, but nothing about a general migration of the code
> away from deprecated PHP functions.  If 1.3 is going to be designed
> for PHP > 5.0 then this seems to be a good goal as well, and helpful
> to projects migrating their own old code bases.  So far as I can tell,
> moving away from deprecated functions or language use doesn't prevent
> my code from running on older versions of PHP 5.x.
>
> PHP 5.3 is in RC3 now, so perhaps it is time to reopen the bug in Trac
> as well as considering reducing the number of error messages at the
> E_DEPRECATED level in the trunk.
>
> skylar
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $javascript->event() with Event:Selectors

2009-06-13 Thread Nate Abele

It's possible that your event:Selectors and Prototype versions are out
of sync.  Do you have the latest of both?  What does the JavaScript
output from the helper look like?

On Jun 12, 11:56 am, isho  wrote:
> Nate thanks for the reply.
>
> I tried using that syntax but it throws this Javascript error.
>
> iterator.call is not a functionhttp://dc-dev..xx/cakephp/js/prototype.js
> Line 661
>
> I'm using version 1.6.0.3 of prototype
>
> On Jun 11, 7:22 am, Nate Abele  wrote:
>
>
>
> > Hi Ishmael,
>
> > The event:Selectors style requires a slightly different syntax because
> > of how it's set up, and you need to write it like this:
>
> > $javascript->event('.post .title:mouseover', 'this.select
> > (".delete_action").invoke("show")');
>
> > Hope that helps,
> > - Nate
>
> > On Jun 8, 9:06 pm, isho  wrote:
>
> > > I having some trouble figuring out how to use $javascript->event()
> > > with selectors other than #id's
>
> > > First of all I was getting this error message "EventSelectors is not
> > > defined" until I included the js lib "event-selectors.js" that I found
> > > on github. (http://github.com/Caged/javascript-bits/tree/
> > > 16af773a1316774b53805b7fc63b5e1eec34c35d/event-selectors) The
> > > documentation doesn't really make this clear so I may have included
> > > the wrong library.
>
> > > Now I'm getting the js error: "mouseout is not defined"
>
> > > This is my php code:
> > > ---
> > > echo $javascript->event('.post .title', 'mouseover','this.select
> > > (".delete_action").invoke("show")');
> > > ---
> > > and here's the generated javascript:
>
> > > var Rules = {
> > > '.post .title': function(element, event) {
> > >  mouseout
> > >  }}
>
> > > EventSelectors.start(Rules);
>
> > > It seems like the method signature for this usage of the event()
> > > method is different. Does anyone know how to do this? I'm fairly new
> > > to cakephp and prototype.
>
> > > Best,
> > > Ishmael
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $javascript->event() with Event:Selectors

2009-06-11 Thread Nate Abele

Hi Ishmael,

The event:Selectors style requires a slightly different syntax because
of how it's set up, and you need to write it like this:

$javascript->event('.post .title:mouseover', 'this.select
(".delete_action").invoke("show")');

Hope that helps,
- Nate

On Jun 8, 9:06 pm, isho  wrote:
> I having some trouble figuring out how to use $javascript->event()
> with selectors other than #id's
>
> First of all I was getting this error message "EventSelectors is not
> defined" until I included the js lib "event-selectors.js" that I found
> on github. (http://github.com/Caged/javascript-bits/tree/
> 16af773a1316774b53805b7fc63b5e1eec34c35d/event-selectors) The
> documentation doesn't really make this clear so I may have included
> the wrong library.
>
> Now I'm getting the js error: "mouseout is not defined"
>
> This is my php code:
> ---
> echo $javascript->event('.post .title', 'mouseover','this.select
> (".delete_action").invoke("show")');
> ---
> and here's the generated javascript:
>
> var Rules = {
> '.post .title': function(element, event) {
>  mouseout
>  }}
>
> EventSelectors.start(Rules);
>
> It seems like the method signature for this usage of the event()
> method is different. Does anyone know how to do this? I'm fairly new
> to cakephp and prototype.
>
> Best,
> Ishmael
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Poll: what do you hate about CakePHP?

2009-05-26 Thread Nate Abele

Guys,

Thanks so much for all the feedback.  Some of it we can act on now,
some of it we may be able to act on in the future, and some of it we
might never be able to resolve directly, but it's helpful to know
what's important to you regardless.

We've got a few good goals for the upcoming version, and we'll try to
work in any changes that are in-sync with those goals.

As always, time is our main limitation, so if you'd like to help out,
the 1.3 source code is available on The Chaw (http://thechaw.com/
cakephp/source/branches).  We're trying a new approach with orienting
branches around features.

Anyway, thanks again everyone for the feedback and continued community
involvement.  We're all working  hard to keep CakePHP the best web
development platform around.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



FREE CakePHP e-book by Matt Curry

2009-05-14 Thread Nate

Hey everyone,

Matt Curry (of CakePHP Digest fame) has just published a *free* e-book
on advanced development techniques with CakePHP.  If you're already a
seasoned Cake developer, this book will help you pick up many new
tricks and best-practice solutions, as well as highlighting many
little-known framework features.

Read all about it here:
http://www.pseudocoder.com/archives/2009/05/13/free-cakephp-e-book-super-awesome-advanced-cakephp-tips/
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can't get $javascript->Object() working !

2009-05-07 Thread Nate Abele

Can you show us an array dump of $channel_list, and the final output
of the $javascript->object() call?

On May 7, 6:55 am, JAVAddicted  wrote:
> I'm trying to convert a php array into a json-friendly format but the
> following code doesn't output anything:
>
> ### Controller:
>
>  class ChannelsController extends AppController {
>
>         var $name = 'Channels';
>
>         function results($page=0,$limit=5) {
>                 $this->layout = "ajax";  //make cake use the ajax layout
>                 $channelArray = array();  //this will hold our data from the
> database.
>                 $count = $this->Channel->findCount(); //counts the number of 
> records
> in Message.
>                 $channelA = $this->Channel->find('all', array('limit'=>
> $limit,'page'=>$page,'order' => 'Channel.name DESC')); //gets all the
> Channel records and sorts them by name.
>                 $channelArray = Set::extract($channelA, '{n}.Channel');  
> //convert
> $productArray into a json-friendly format
>                 $this->set('total', $count);  //send total to the view
>                 $this->set('page_size', $limit);
>                 $this->set('channel_list', $channelArray);  //send messages 
> to the
> view
>         }
>
> }
>
> ?>
>
> ### View:
>
>          echo '{"totalRecords":' . $total . ', "recordsReturned":' .
> $page_size . ', "records":' . $javascript->Object($channel_list) .
> '}';
> ?>
>
> I've debugged the source and it seems that the $javascript->Object()
> is not doing its job and is not outputting anything. Is there any
> configuration to dd or am I wrong writing anything ?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Poll: what do you hate about CakePHP?

2009-05-07 Thread Nate

Well, maybe hate's a strong word.  Let's say, what do you like the
least?  Kind of an odd question, I know, but since we've kick-started
development of a new version, I'd like to know what the most
frustrating things with the framework are, even if they're things we
can't fix right away.

I'll get us started: PHP 4 support.

Who's next? TIA for the input.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->set(compact()) not working

2009-04-08 Thread Nate

I fixed this in 1.3: 
http://thechaw.com/cakephp/commits/view/987e469c2fc151bd5d5377517d43a74c3bdf2ba3#numbers

On Apr 7, 3:27 pm, brian  wrote:
> Thanks, both. I'm kicking myself because I did see something about
> this a while back.
>
> Yes, it's complaining about all three. Strange.
>
> This is one Cake convention I really hate. Variable names should never
> be camel-cased, IMHO. Ugh!
>
>
>
> On Tue, Apr 7, 2009 at 3:16 PM, John Andersen  wrote:
>
> > Does the view complain about all the variables or only about
> > volume_nodes?
>
> > For $this->set is stated that when using an associative array, as
> > compact will make, the names will be inflected, resulting in
> > volume_nodes becomes volumeNodes.
>
> > Enjoy,
> >   John
>
> > On Apr 7, 8:50 pm, brian  wrote:
> >> I noticed this a few days ago but never got around to looking into it
> >> further. I've just run into it again and can't find where things are
> >> going wrong.
>
> >> In my action, I have the following:
>
> >> $this->set(compact('group', 'aro', 'volume_nodes'));
>
> >> The View complains that all of these are undefined. So, I do this:
>
> >> $this->set('group', $group);
> >> $this->set('aro', $aro);
> >> $this->set('volume_nodes', $volume_nodes);
>
> >> And everything is swell. Being a convenience, I'm not too put out by
> >> this, but it seems really strange and possibly a bug. Poking around in
> >> the source hasn't turned up anything obvious and I don't see anything
> >> on Trac. Does anyone have an idea why this is failing?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: datasourcePaths?

2009-04-07 Thread Nate

On Apr 7, 3:12 am, rtconner  wrote:
> Do I have it right that there is $modelPaths, $behaviorPaths,
> $controllerPaths, $componentPaths, $viewPaths, $helperPaths,
> $pluginPaths, $vendorPaths, $localePaths, and $shellPaths... but no
> datasourcePaths?

Yup, that's correct.  This is on the docket to be fixed in 1.3.
Probably not with yet-another-bootstrap-variable, but there will be a
way to load DataSources from paths other than the default.

> Fun.

Since you're coming here asking for help, let's try and tone down the
douche-y, shall we?  Thanks.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is it so hard to find answers on cakephp trouble?

2009-03-26 Thread Nate

On Mar 26, 7:03 am, Xoubaman  wrote:
> I like fairies!

Guys, the Cookbook is a *collaborative* editing tool, and I really
can't stress the "collaborative" part enough.  We created it because
we're just a few guys, and Cake is a really big framework, and with
the pace of development around here, keeping everything in sync is a
really really hard problem.

> But i'm not an expert in Cake and fear to do something wrong. Pasting
> other people work doesn't look ethical either, but I'll try to add the
> habtm with extra fields :)

Cookbook submissions are always reviewed by members of the
documentation team, so rest assured that no incorrect information will
get through un-fixed.  Seriously, new developers are the *absolute
best* documentation reviewers, because you can point out things the
rest of us take for granted.

After finding the right answers from experts (either via this mailing
list, IRC, a blog, or whatever), you can submit that information so
that other new developers who come after you don't have to go
searching like you did.  Thalund, If you could have saved yourself the
trouble finding out about the different find types, would you have?
Think of the next guy!

In fact, I have a standing offer for one community member already,
that I'd gladly extend to you as well, which is this: any time you are
stumped or confused on a CakePHP issue, and can't find an answer in
the Cookbook, you can IM me directly, *any time*, and I'll explain it
to you in detail, *if* you are willing to take those answers and
contribute them back to the Cookbook after I've explained them (you
can email me to let me know what network(s) you're on and get my IM
info).

CakePHP is an Open Source project, and Open Source projects live or
die on the strength of their communities.  Not everyone can contribute
code, but *everyone* can contribute to documentation -- and there's
just no excuse not to.  If this project has benefitted you in some
way, I'd encourage you to get involved.  You might even be surprised
to find that you enjoy it. ;-)
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why is it so hard to find answers on cakephp trouble?

2009-03-25 Thread Nate

Hey there, I think these are some excellent points -- the
documentation could certainly use some more explanation in a few key
areas.  Would you be able to drop by #cakephp-docs on irc.freenode.net
to discuss it?  We could definitely use some people new to the
framework who are experienced at reviewing documentation.

On Mar 25, 3:12 pm, thalund  wrote:
> I've been developing with php for about 7 years,
> A total noob with cakephp, but I can definately see it's powers.
>
> But there's some basic weakness with the documentation, the subjects
> are being described in ways so only experienced users will understand.
>
> Example: I have a problem with a "find" operation.
> OK I go to:
>
> http://book.cakephp.org/view/449/find:
>
> Quote:
>
> "
> find($type, $params)
> $type is either 'all', 'first', 'count', 'list', 'neighbors' or
> 'threaded'. 'first' is the default find type.
> "
>
> All good. Now:
>
> "
> If you are using find('list'), the 'fields' key in $params defines the
> key, value and group
> "
> WaitWaitWait: What does the value 'list' mean in the first place? What
> is returned if you set type to 'list'? Yeah a list I guess but how is
> the datatype? a string, an array with one element?
>
> I'm very trained in reading documentation but this gets me more rather
> than less confused.
> There seems to be no firm conventions on how a method, behavior etc is
> documented
>
> That in fact this beginners tutorial from IBM 
> developmenthttp://www.scribd.com/doc/5503/CakePHP-tutorial-no-1-from-IBM
> and the other parts in the series
>
> Is way more understandable than anything found on cakephp.org.
>
> After few hours of development I ran into a problem with a HABTM
> relation. The problem is very basic.
> I tried to restrain myself from just writing it in plain SQL, but
> after 4 days of relentless googling for a solution I'm close to giving
> up cakePHP altogether.
>
> But I really want to get into CakePhp and also possibly contribute to
> it later.
>
> I'm just quited baffled since CakePHP has been there for years,
> does anybody here agree on some of my worries?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakeFest Berlin 2009 officially announced

2009-03-23 Thread Nate

After much hype and speculation, the next CakeFest event, which will
take place in Berlin beginning July 9th, has been officially
announced.  You can read the full details, along with some other
important announcements on the Bakery: 
http://bakery.cakephp.org/articles/view/cakephp-deutschland

Or, go straight to the conference site here: http://cakefest.org/

If you'd like a chance to win a free pass to the conference, check out
http://cakefest.org/pages/badges

Hope to see you there!
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake performance tips

2009-03-04 Thread Nate

Hint: that "RC" in the version identifier (1.2RC3) stands for "release
candidate".  And the one that you have in particular is outdated by
several versions.  We have a final release now, and several minor
releases that have come after it.  That in itself is probably your
main issue.

On Mar 4, 3:10 pm, Javier  wrote:
> Hello everyone,
> I've read some posts about cakephp performance posted here and we've
> implemented some of the stuff discussed previously, but our
> application still have a really slow response time (it feels really
> really slow). We are using cake 1.2RC3 and we don't have an opcodes
> cache (like APC or xcache) installed yet.
> I have a few questions:
> Updating to CakePHP helps?
> Our application have a lot of models and relation between them, could
> this is be the cause of the slow response time? Can this be fixed/
> improved somehow?
> Does anyone have any tips to improve the performance of a cakephp
> application?
> Are there any plans on improving CakePHP performance on the near
> future?
>
> Thanks in advance for any reply.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to Handle Tightly Coupled Database Tables?

2009-03-03 Thread Nate

Hi Brian,

I hope I can help.

On Mar 3, 2:53 pm, bcreeve  wrote:
> Most often the way Cake handles relationships is very efficient for
> getting new development off the ground.  However, I recently have hit
> a wall when it comes to handling two or more tables that are tightly
> coupled.  By "tightly coupled" I mean the data from multiple tables
> makes most sense when looked at in conjunction.

Based on your description, I think you misunderstand the concept of
coupling.  "Low coupling refers to a relationship in which one module
interacts with another module through a stable interface and does not
need to be concerned with the other module's internal
implementation" (from http://en.wikipedia.org/wiki/Coupling_(computer_science)
).  Particularly in terms of record relationships in third normal
form, the concept of coupling almost doesn't even apply.

> In the interest of simplicity, let's say I have Parent that hasMany
> Child (and Child belongs to Parent).  I often want to view, search and
> sort using anything like the parent's last name, number of children,
> number of male children, are any children under 18, etc.

In my experience, I'd say you're better off explaining your actual
problem, rather than a contrived one.  Your explanation would lead
someone to reasonably conclude that you're talking about a model (i.e.
Person) joined on itself in a hasMany/belongsTo relationship, however,
the way you're approaching the explanation seems to contradict this.
Your example is ambiguous.

> It's conceivable that everywhere I consider a Parent, I also want to
> have access to all the data I mentioned in the paragraph above.  So, I
> add some pseudo-columns in the Parent model called child_count,
> male_child_count, and has_children_under_18.  Great, now I have this
> data available every time I ask for Parent(s).

This is called de-normalization, and is a very common thing to want to
do, for many reasons, including but not limited to performance
improvements and reducing code complexity.  You can see an example
implemented in the CakePHP core in the form of counter caches for
hasMany/belongsTo relationships: 
http://book.cakephp.org/view/490/counterCache-Cache-your-count

> For my needs, the above has several limitations:
> 1. I cannot query against any Child columns or these calculated
> columns.

This seems like an artificial constraint.  Why not query the Child
object directly?

> 2. I cannot sort on said columns.

See above.

> 3. Cake gives each Child get its own SELECT via hasMany, and each
> pseudo column for each parent gets its own SELECT, which likely won't
> scale with respect to performance.

If you query the Child object directly, Parent will be attached via a
LEFT JOIN, and everything will happen in one query.  Also, I'm not
sure what you mean about "pseudo" columns.  Why not just actually
create the columns you mentioned above, and use them to cache count
values?

> 4. Lastly, I need to paginate filtered and/or sorted results, which
> just seems to add another layer of complexity.

See the solution I mentioned immediately above.  The default core
pagination would apply perfectly in that scenario.

> Basically, I am wondering if there is a native Cake 1.2 way of
> handling this.  If this is a case where the framework doesn't fit the
> need, I would like a sanity check to make sure the following is the
> most Cake-like way to do it.

I think I have explained an appropriate solution above.  Please post a
follow-up with any relevant clarifying detail if this will not work
for your situation.

> I am considering writing a MySQL view called something like
> parents_children.  It will join parents with children and calculate/
> expose the necessary columns.  Then I will bake a model for this MySQL
> view and make my ParentsController use the freshly baked ParentChild
> model.  My index can programatically build WHERE and ORDER BY clauses
> and use $this->ParentChild->query(...).  All my read operations can
> then use $this->ParentChild->find(...).  From what I understand, as
> long as I alias my MySQL view columns like Model.column, I should
> still get a nice associative array like $parentChild['Parent']
> ['last_name'] from query and find, right?

As long as you properly alias all the columns in the view (search this
list for examples), yes, it will work the same as normal Cake query
results.

> And then for pagination, I should be able to do something like
> described inhttp://book.cakephp.org/view/249/Custom-Query-Pagination,
> or no?

Sure.

Hope that helps.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: debugging a ->find that cause 100% cpu usage

2009-02-13 Thread Nate

If you're using a commercial product, contact the vendor and ask for
an updated copy.

On Feb 13, 8:20 am, Paamayim  wrote:
> > > But, you really should see this as a very good excuse to update your
> > > core to the current version and deal with the tweaks you may find
> > > necessary in your code.
>
> > but that's always good advice.
>
> Obviously it should. But I purchased a software and only later when I
> had to made some addons I discovered it was buildt over a pre-beta
> version :|
>
> I tried to upgrade the framework /cake/ but too many "fatal errors"
> showed up, too many stuff went deprecated, I was so disuraged to
> continue in that process :(
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Top 10 Framework

2009-02-02 Thread Nate

That's too meta.  Your head asplode.

On Feb 2, 10:57 am, Samuel DeVore  wrote:
> nate do you have a top ten list of people who like to make top ten
> lists?  I'm looking for the top 'ten list' maker to see how cakephp
> ranks among the top ten,  ten list makers who make lists about the top
> ten frameworks for the top ten languages...  but they have to of made
> at least 10 top ten lists on ten topics to be considered for this
> list...
>
> On Mon, Feb 2, 2009 at 8:41 AM, Nate  wrote:
>
> > These kinds of top 10 lists are for people with nothing better to do
> > with their time than make top 10 lists.
>
> > On Feb 1, 7:11 pm, yusuf widi  wrote:
> >> Hi guyz... i got this somewhere on the net...
>
> >>http://www.phpframeworks.com/top-10-php-frameworks/
>
> >> Why they put cake php on the fifth place? i dont think we were worse than
> >> those framework... :)
> >> does anyone here have already done some research with those framework's
> >> which is have higher place than CakePHP?.
>
> >> for me, i had only done some research with Zend and CodeIgniter.
>
> >> Thanks.
> >> --http://www.wmonou.com
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Top 10 Framework

2009-02-02 Thread Nate

These kinds of top 10 lists are for people with nothing better to do
with their time than make top 10 lists.

On Feb 1, 7:11 pm, yusuf widi  wrote:
> Hi guyz... i got this somewhere on the net...
>
> http://www.phpframeworks.com/top-10-php-frameworks/
>
> Why they put cake php on the fifth place? i dont think we were worse than
> those framework... :)
> does anyone here have already done some research with those framework's
> which is have higher place than CakePHP?.
>
> for me, i had only done some research with Zend and CodeIgniter.
>
> Thanks.
> --http://www.wmonou.com
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-01-30 Thread Nate

There's probably a more optimal way to run the loop, but apparently
one's run into this particular issue before.  Your options are (a)
file an optimization ticket and wait for someone to fix it, or (b)
file an optimization ticket with a patch ping a core developer (gwoo,
AD7six, Mark Story, me, etc.) to get it reviewed and committed, so no
one else has this problem.  Ain't Open Source the greatest?

On Jan 30, 11:47 am, Dan  wrote:
> No one has feedback on this? It seems like a MAJOR issue if you can't
> load more than a few thousand rows from "has many" relationship tables.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: set(compact('whatever'))

2009-01-28 Thread Nate

On Jan 26, 11:05 pm, brian  wrote:
> On Mon, Jan 26, 2009 at 10:23 PM, Nate  wrote:
>
> > This has already been covered many times in the mailing list.  Please
> > search before posting next time.  Thanks.
>
> Yeah, yeah. Meaning, you're fed up with people complaining about the
> Cake devs' seemingly-arbitrary decisions, like enforcing coding styles
> on others. Whatever. I guess it'd bug me, too. FWIW, I'm sure there's
> a very good reason. I take back the "inane" comment. Sorry for being
> so melodramatic.

Nope, there's actually no good reason, and it is a pretty stupid
idea.  That's why I'm removing it in the next release.

> And I didn't search for this because I didn't know that Inflector had
> anything to do with my problem when I started this thread.

You could have searched the mailing list for "set()" and "variable
names" or "set" and "variables".  In either case, the answer would
have been in the first few results.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: set(compact('whatever'))

2009-01-26 Thread Nate

This has already been covered many times in the mailing list.  Please
search before posting next time.  Thanks.

On Jan 26, 8:31 pm, brian  wrote:
> I was ruminating over the code while having dinner just now and
> remembered something. I realised that set() does provide a way to
> avoid Inflector having its way with one's var names:
>
> 00640         foreach ($data as $name => $value) {
> 00641             if ($name === 'title') {
> 00642                 $this->pageTitle = $value;
> 00643             } else {
> 00644                 if ($two === null && is_array($one)) {
> 00645                     $this->viewVars[Inflector::variable($name)] = 
> $value;
> 00646                 } else {
> 00647                     $this->viewVars[$name] = $value;
> 00648                 }
> 00649             }
> 00650         }
>
> I just needed to pass false as the second param. 3 cheers for
> undocumented features!
>
> On Mon, Jan 26, 2009 at 7:09 PM, brian  wrote:
> > So I just got a clue and stuck this right after my call to the component:
>
> > die(debug($this->viewVars));
>
> > It turns out that Cake sets loose Inflector upon the var names! What
> > kind of inane "feature" is that?!? And no flag to keep it from doing
> > so!
>
> > I think I'm going to have to break down and alter Cake core for this.
> > Please, someone talk me down from the ledge and explain to me why this
> > isn't a bug and I really should appreciate it.
>
> > On Mon, Jan 26, 2009 at 6:54 PM, brian  wrote:
> >> I'm putting together a component to move a bunch of logic out of one
> >> of my controllers. The component has a method whose sole purpose is to
> >> set a number of vars for a view that's tightly-coupled to the
> >> component. I wanted to do it this way because there are several places
> >> where these are required to be set, though the values come from
> >> different places. This way, I can pass the values t the component and
> >> have it set everything the way it requires.
>
> >> Anyway, my component method looks something like:
>
> >> public function setStuff($foo, $bar, $something_else)
> >> {
> >>  $this->controller->set(compact('foo', 'bar', 'something_else'));
> >> }
>
> >> The component also has this startup method:
>
> >> function startup(&$controller)
> >> {
> >>        $this->controller = $controller;
> >> }
>
> >> (and, of course, a $controller member var)
>
> >> Unfortunately, this doesn't appear to be working--I'm getting
> >> undefined vars in the view. Is there any reason why I couldn't set
> >> view vars from the component like this? I know the vars are available
> >> in the symbol table, of course, though I did put a debug(compact(...))
> >> in there, just to be sure.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How did they do that?

2009-01-21 Thread Nate

It's all jQuery, as written by Marc Grabanski.  Check out
http://cakephp.org/js/common.js

On Jan 20, 11:13 pm, bee  wrote:
> Hi I am a newbie to cakephp and I am dying to know how to implement
> one of the main menus on cakephp main page:
> I have cakephp setup and have implemented one site. Now, I am trying
> out advanced features (ajax, etc)
>
> So, my question is:
> Onhttp://cakephp.org/at the top portion of the page, a menu lists:
> (it is almost flash like)
>
> Get It Now
> Hot Features
> Learn
> Interact
> ...
>
> with two arrows allowing the user to quickly move to the next section
> to read.
>
> That is cool. I want to do that Please let me know the best way to
> implement this!
> Thanks,
> Christy
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Trying to update a controller from a different model...

2009-01-20 Thread Nate

Not exactly sure what you're trying to do here, but I'd wrap that save
() call in an if block, because right now it looks like you have no
way of knowing if the save fails.

On Jan 20, 9:25 pm, Parris  wrote:
> come on... someone has to know the answer to this... are you all just
> using request action or something along those lines?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Confusion with $uniqueIds in dbo_source.php

2009-01-17 Thread Nate

In my book, something needs to be broken before it should be
fixed. ;-)

In a default HABTM relationship, multiple records with the same
foreign key pair are not allowed.  Simple as that.  If you want to do
something custom, set 'unique' to false, and/or create a join model
and set up your associations (both of them) to use it.

On Jan 17, 9:06 pm, Brenton B  wrote:
> After a bit of a hiatus, I'm back ... and very saddened to see this
> still isn't fixed ...
> seriously? Has no one else run into this??
>
> On Nov 28 2008, 1:25 pm, Brenton B  wrote:
>
> > Yup, and was met with a "need test case" reply ... which I understand
> > is required ... unfortunately I don't have time as of late to create
> > one.
> > If you have the time, go nuts ... otherwise I'm hoping to get to it in
> > the next few weeks.
>
> > On Nov 15, 3:14 pm, Mauro Zadu  wrote:
>
> > > I'm with you Brenton! Can you share the modification you made to
> > > dbo_source.php? Did you consider open a ticket with this issue?
> > > Thank you
>
> > > On 4 nov, 06:43, Brenton B  wrote:
>
> > > > Still no love, hey?
> > > > I'm not sure how else to explain this other than to ask why
> > > > dbo_source.php is over-writing.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: best cakephp calendar?

2009-01-15 Thread Nate

I actually wrote one a bit ago that I was gonna release this week.
I'll post the URL back here when I do.

On Jan 15, 12:23 pm, ezekfred  wrote:
> Hi,
>
> I have to display a schedule and I'd like to know which calendar
> plugin/helper do you use in your projects?
>
> till now I 
> know:http://www.stellarcore.com/2009/01/07/cakephp-calendar-helper/#more-90http://github.com/davidgolding/anno-domini/tree/masterhttp://www.formation-cakephp.com/14/generation-automatique-calendrier...
>
> the last one is in french but rather understandable.
>
> thanks!
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: (Bad) Tip: Checking HTTP Auth against your normal users table

2009-01-12 Thread Nate

Actually, I'd say this is a good tip given the caveat that HTTP
authentication always be done over SSL.

On Jan 12, 11:19 am, Martin Westin  wrote:
> Hi all,
> It is not overtly documented but you can check your http
> authentication against your normal users table, just like Auth
> Component does. I didn't know this before. I thought I had to make an
> loginUserrs array. But a simple change gave me the opportunity to
> check the login any way I wanted.
>
> Generally speaking I'd say this is a bad idea. Letting users login
> using HTTP basic authentication is a bit of a security risk. It can be
> very useful at times though so i thought I'd post my code in case
> anyone else wants to use something like it... or just criticize the
> whole idea until I change my mind :)
>
> My reason is that I want a "protected" RSS feed. The feed will include
> private information not intended for public use but I still like rss
> as a notification scheme. THis is the best solution I have come up
> with for protecting a feed.
>
> Here is the relevant lines from my controller. Auth is globally
> configured in AppController much like in the numerous tutorials
> around. Nothing special there but it is active.
>
> ---
> var $components = array('Security');
>
> function beforeFilter() {
>     if ( $this->RequestHandler->isRss() ) {
>         $this->Auth->allow('index');
>         $this->Security->loginOptions = array(
>             'type'=>'basic',
>             'login'=>'authenticate',
>             'realm'=>'My_RSS_Feeds'
>         );
>         $this->Security->loginUsers = array();
>         $this->Security->requireLogin('index');
>     }
>     parent::beforeFilter();
>
> }
>
> function authenticate($args) {
>     $data[ $this->Auth->fields['username'] ] = $args['username'];
>     $data[ $this->Auth->fields['password'] ] = $this->Auth->password
> ($args['password']);
>
>     if ( $this->Auth->login($data) ) {
>         return true;
>     } else {
>         $this->Security->blackHole($this, 'login');
>         return false;
>     }}
>
> ---
>
> As you can see there is not much different from the cookbook (for
> example). The key is the login-key in the loginOptions hash. This lets
> me provide a method that will take care of allowing or disallowing a
> login.
>
> The authenticate method re-packages the username and password to suit
> Auth and then tries to login.. and Voilà!
>
> I noticed that returning true or false was not enough. I had to
> specify that the request should "blackHole" here. I could try digest
> authentication but I haven't gotten around to it yet. (My normal
> logins pass passwords in the clear already so...)
>
> That's all
> /Martin
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: route conundrum

2009-01-11 Thread Nate

The 'pass' key only applies to parameters that actually come out of
the URL.  Try this one:

Router::connect('/ASK',
array(
'controller' => 'pages',
'action' => 'display',
'ask', 'index'
)
);


On Jan 10, 6:32 pm, brian  wrote:
> A section of my site is split into several smaller sections, each of
> those concerned with its own model:
>
> /ASK/funders
> /ASK/organisations
> ... etc.
>
> The routes for these are all perfect, save for the "index" route,
> which is handled by PagesController. The view for that is in:
>
> /views./pages/ask/index
>
> ... and Pages Controller has:
>
> public function display() {
>         if (!func_num_args()) {
>                 $this->redirect('/');
>         }
>         $path = func_get_args();
>
>         // splits $path by '/' and redirects
>         ...
>
> This works fine, even for deeply buried views. This is how this
> particular view was set up in routes.php:
>
> Router::connect('/ASK',
>         array(
>                 'controller' => 'pages',
>                 'action' => 'display',
>                 'ask/index'
>         )
> );
>
> That route was working fine until I just changed the breadcrumb links
> in all of the ASK views to use the proper routing arrays (because
> routing rocks my socks)
>
> array('controller' => 'pages', 'action' => 'display', 'ask/index')
>
> However, this creates URLs like "/pages/ask/index", instead of "/ASK".
>
> I tried adding a 'path' param in both the view and routes:
>
> array('controller' => 'pages', 'action' => 'display', 'path' => 'ask/index')
>
> Router::connect('/ASK',
>         array(
>                 'controller' => 'pages',
>                 'action' => 'display',
>                 'path' => 'ask/index'
>         ),
>         array('pass' => 'path')
> );
>
> This creates the URL I want, but PagesController doesn't see the arg :-(
>
> I can modify PagesController to check both func_get_args() and a $path
> param. However, I'm at a loss as to what route to use, both in
> routes.php and to pass to HtmlHelper.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: MS SQL 2008 PHP driver

2009-01-08 Thread Nate

Hey eXcalibur,

If you end up going with option 2, feel free to ping me off-list if
you get stuck.  Aside from a few gotchas, the existing driver should
be fairly straightforward to adapt, and it'd be great to get one done
for the new SQL Server.

On Jan 8, 7:25 am, Martin Westin  wrote:
> Hi eXcalibur,
> You have a few options.
> • You can wait for the CakePHP team to re-write the dbo_mssql class.
> • You can make a copy of the dbo_mssql.php file yourself and start
> remaning anything prefixed with "mssql_" and see how far that gets
> you. You should probably remane the file and class to "sqlsrv" also.
>
> I don't know the core teams policy on how to deal with these types of
> changes but if you get a working driver you can submit it to them if
> you want. I think a "new" dbo driver is a good way to go here. (there
> are already two mysql drivers so...)
>
> /Martin
>
> On Jan 8, 9:08 am, eXcalibur  wrote:
>
> > I have just come across CakePHP and started to get my head around the
> > OO & MVC of the framework.
>
> > As I am very familiar with MS SQL, I attempted to create the Blog
> > using MS SQL as the database on PHP 5.2.8 to find that the only PHP
> > driver available are MS's new driver (which they have changed all
> > function prefixes from "mssql" to "sqlsrv", amongst other things).
>
> > For this driver change; will there be a new dbo created for MS SQL
> > users or do we have to use previous versions of PHP?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: generatetreelist error in rc4

2008-12-23 Thread Nate

Hi Korcan,

Without more information, it's hard to tell what the issue is.  Could
you paste your model files at http://bin.cakephp.org/, and post the
link back here?

Thanks.

On Dec 23, 11:28 am, korcan  wrote:
> I have this line of code in my project that works in RC3, changed the
> cake dir to the rc4 version and this happens:
>
> my $conditions are defined before this line...
> line: 326
> $this->UserTicketAlert->TicketCategory->generatetreelist(array
> ($conditions),null, null, ''));
>
> I moved to rc4 and I am getting:
> Undefined property:  AppModel::$TicketCategory [APP/controllers/
> users_controller.php, line 326]
> Fatal error: Call to a member function generatetreelist() on a non-
> object
>
> any ideas?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Guys (and gals), we're slackin' here

2008-12-19 Thread Nate

Get out the vote!

http://www.brownphp.com/2008/12/popular-php-frameworks-whats-your-fav/
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Release: CakePHP RC4 ...Close

2008-12-18 Thread Nate

CakePHP 1.2 is almost ready...

We have all been waiting a long time for 1.2 stable. Today we are
happy to announce that we are one step closer to that goal. We are
happy to announce the release of CakePHP 1.2 RC4[1].

CakePHP 1.2 RC4 has received more test coverage and over 300 commits.
Please review the changelog[2] to verify the fixes that are included
in this release. Our expectation is that we will be able to release a
stable very soon after RC4.

In other news, CakeBOOK, the application which runs http://book.cakephp.org
has been forked by more than 40 developers and more than 68 users have
cloned the repository. This activity is great news for our
documentation project and has also allowed us to test and improve
http://thchaw.com. Visit Chaw to learn more about it and the CakeBOOK.

We would like to remind everyone that is looking for developers or
looking for a job that http://cakephp.org/jobs is still going strong.
This is a great place to reach the CakePHP community and support the
project.

[1] http://cakeforge.org/frs/?group_id=23&release_id=432
[2] https://trac.cakephp.org/wiki/changelog/1.2.x.x


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Tip: FormHelper can create field names like Model[][field]

2008-12-09 Thread Nate

Hey Martin, interesting trick.  This isn't technically "sactioned" by
the API, and could at some point change, but I agree that there needs
to be a way to do this, so we'll look at formalizing one in the
future.

On Dec 8, 10:26 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I may have added it to the manual... not sure since it has been acting
> a bit strange today and the post timed out.
> I will check later to see if my edit was submitted.
>
> On Dec 8, 2:59 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > Sweet! Thanks for sharing this, it should probably be added to the
> > official manual or something..
>
> > On Dec 8, 2:14 pm, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > This is just a small thing but I did not find a mention of it in the
> > > manual. I found this out today, after a few years of using Cake :)
>
> > > I want a form input to have the name Modelname[][fieldname] so that I
> > > can post an array of "fieldname" values. The manual only mentions
> > > creating these "hard coded" as Modelname.0.fieldname => Modelname[0]
> > > [fieldname] and then incrementing the number.
>
> > > The reason I like the "empty" version is that is makes for a lot
> > > simpler javascript when I want to create these additional fields on
> > > the fly in the GUI and don't know how many I will need at the time of
> > > rendering the form on the server.
>
> > > Then I tried this (half by accident):
>
> > > $form->input('Modelname. .fieldname'); // notice the space between the
> > > dots
>
> > > Voila! The form has the empty space in the field name but Cake creates
> > > the array of values just the way Iike it.
--~--~-~--~~~---~--~~
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: cakephp.org down/inaccessable

2008-12-08 Thread Nate

Hey everybody,

Early this morning (about 2am to 8am CST) we had some very large
traffic spikes.  We're still looking into what caused them, and we'll
do what we need to in order to correct it as soon as we track down
which service was getting hit.  Presently, most CakePHP properties are
hosted on a single server, which isn't helping matters.  However, I
will tell you that we've never experienced an outage like this before,
and we'll do what we can do make sure it doesn't happen in the
future.  Thanks everyone for your support.

Currently we don't have anyone to do sysadmin work or monitoring, so
we'll see if this becomes a motivation to donate. ;-)  Kidding,
kidding.

On Dec 8, 5:02 am, WebbedIT <[EMAIL PROTECTED]> wrote:
> Does anyone else regularly find they cannot access cakephp.org?  It's
> a nightmare for a newbie who needs to constantly reference the Manual
> and API.  I couldn't access it last night and still cant get it this
> morning.
>
> My broadband is through AOL/Carphone Warehouse and a search 
> onhttp://downforeveryoneorjustme.com/cakephp.orgresults in "Huh?
> doesn't look like a site on the interwho."
>
> Any ideas?
--~--~-~--~~~---~--~~
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: MVC falling to pieces for modern AJAX apps

2008-11-30 Thread Nate

Maybe something kinda like this?

http://github.com/1Marc/cake-stuff/tree/master/live-validate

Not all the way there yet, but you get the idea.

Hint: it's an integration problem, not an MVC problem.

wirtsi wrote:
> Hey guys
>
> I've been developing web applications with Cake for almost 2 years
> and  I never want go back to the old vile php ways again.
>
> I must say that with more advanced applications the MVC concept isn't
> working so good any more. With any halfway decent webapp you will have
> a lot of controller logic in the views, namely all those JavaScript
> functions you use.
>
> For example: Passing form field values to the server via ajax calls
> for validation or opening modal windows over content items (ie context
> menus etc)
>
> If you take JavaScript even a step further then you'll end up with
> frameworks like ExtJS ... you don't write a single line of HTML code
> anymore, just the body. The framework then will insert all the lists,
> menus or whatever you want onto the canvas and populate them with data
> it gets from the server via json.
>
> Working with Cake this gets really ugly .. because then you will end
> up with redundant code, data validation on the server side but also on
> the client.
>
> Yesterday I read an article on this issue (http://advogato.org/article/
> 993.html) ... it's a bit strong anti-PHP but it hits the spot. It goes
> on about combining a MVC framework (Web2Py) with a Python-to-
> Javascript compiler (Pyjamas) which in the end will result in coding
> in Python and having a framework do all the html work .. so like Ext
> but with a proper server-side backend.
>
> What also would solve the problem of code redundancy is a JS framework
> like TrimPath  (http://code.google.com/p/trimpath/wiki/TrimJunction)
> where you only code in JS and the same code gets executed on the
> server and the client ... BUT ... do we really want to code ours apps
> in JavaScript? I for sure don't want to.
>
> So I had this idea yesterday how to solve this problem at least
> partly .. by partly I mean at least all the data validation.
>
> Develop a doped up form helper. Said form helper gets the validation
> rules for every field from the model and implements the JavaScript
> rules automatically ... on the server side everything stays the same.
>
> For examle if field "name" has the NOT_EMPTY validation rule, the
> DopeFormHelper could add this validation to the view so even before
> submitting to the server the user gets notified of his mistake.
>
> What I'm not quite sure of is ... am I breaking all the MVC rules
> thinking like this? AFAIK the view (and therefore the Helper as well)
> should have no knowledge of any model rules or code. How do I get
> these informations in there?
>
> So what do the gurus think of this? Any ideas how to keep all that JS
> code out of our views?
>
> Enjoy your weekends
>
> wirtsi
--~--~-~--~~~---~--~~
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: Mambo on CakePHP brainstorm

2008-11-25 Thread Nate

Based on your stated goals, the two suggestions I would add are:

(1) Develop as many of Mambo's features as possible as extensions.
This will not only make the CMS itself as flexible as possible (and
the CMS's extension API as robust as possible), but it will also help
you 'feel the pain' of extension developers as they write new
extensions or migrate old ones.

(2) Develop as much of the functionality of the Mambo core itself as
CakePHP plugins.  This will not only make the core easily extensible,
but it will enable CakePHP developers to more easily integrate Mambo
code within their own applications, and lower the barrier to entry on
contributing back to the Mambo core.


On Nov 25, 8:16 am, andphe <[EMAIL PROTECTED]> wrote:
> Hi James,
>
>
>
> > On Nov 25, 1:27 am, James K <[EMAIL PROTECTED]> wrote:
>
> > > Simple - if you're starting from scratch, seriously start over and
> > > rethink a lot of the fundamentals.
>
> > > Mambo's idea of what content is and how it should be organized within
> > > a CMS is very outdated and short sighted.
>
> > > Joomla's been making a valiant effort to modernize the Mambo codebase,
> > > but it still suffers from several of the same fatal flaws in terms of
> > > execution. Why in the world can I only organize content 2 levels deep?
> > > Why can I only add content to a single category?
>
> > > In addition, it would be wise to look into broadening Mambo's idea of
> > > "content". Drupal does a pretty good job of making it easy to create
> > > several different content types (ie blog posts, news items, products,
> > > etc) and handle them in different ways without having to make very
> > > literal "sections"
>
> > > Why are the security permissions hard coded? I know Joomla's in the
> > > middle of a really messy migration to a proper ACL implementation, but
> > > they're not anywhere near close yet. Security roles should be
> > > flexible, customizable, granular, and hierarchical.
>
> > > Mambo's 8 years old now and while it may be tempting to give Mambo's
> > > users something very familiar in execution, you'd just be doing the
> > > project a disservice by ignoring the vast innovations that have
> > > occurred in the CMS space since Mambo was originally architected.
>
> > > There are lots of good CMSes on the market - both commercial and open
> > > source that are doing a lot of really interesting things these days.
> > > Do your research, take all the lessons learned from Mambo development
> > > over the years and get crackin! Before writing a line of code, you
> > > should put a lot of thought and time into the database design. Many
> > > fundamental design choices will be made at that point which will be
> > > hard to go back on once you've written a significant amount of code.
>
> > > The more planning you do, the better the end product will be.
>
> > > Good luck!
>
> Thanks for all your comments, it sure will be part of our
> discussions :)
>
> we also are interested in to know about the expectations about the CMS
> framework, things like:
>
> Been a cake developer, would you  use/integrate your projects in a
> cms ?
> What must accomplish that cms to be considered in your cake projects ?
>
> Mambo is not just a CMS but a framework too, it should help the
> developers to create his own pieces of software and reuse the ones
> that the cms currently have.
>
> Thanks
>
> Andrés
--~--~-~--~~~---~--~~
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 request: store view templates in one location

2008-11-20 Thread Nate

@grigri: Clever and elegant solution, good job. :-)

@wisecounselor:  Difficult clients are to be educated, charged more,
or fired. Hehehe.
--~--~-~--~~~---~--~~
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: databases supported?

2008-11-12 Thread Nate

http://book.cakephp.org/view/68/Creating-Database-Tables

No, Ingres is not one of them, but you're welcome to write a driver
for it.  Just make a copy of whatever driver is the most similar.

On Nov 12, 5:07 pm, "soldier.coder" <[EMAIL PROTECTED]>
wrote:
> Is there a nice list somewhere of databases supported with CakePHP?
>
> It would be oh so nice if Ingres was one of them.
>
> Thanks!
--~--~-~--~~~---~--~~
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: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Nate



On Nov 11, 8:43 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:

> One question, with the following route:
>
> Router::connect("/articles/:action",
>                 array("controller"=>"articles"),
>                 array("action" => "list|controller|actions|here")
>         );
>
> Am I right in thinking I need to list ALL methods my Articles
> controller has here? Is that just public or private as well?

Only public, route-able actions go here.  This is required because
every other pattern is going to be captured as a category by the route
following it.
--~--~-~--~~~---~--~~
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: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Nate

Off the cuff (so I'm not even sure it parses):

Router::connect(
"/articles/:year/:month/:day/:slug",
array("controller" => "articles", "month" => null, "day" => null,
"slug" => null),
array('year' => $Year, 'month' => $Month, 'day' => $Day, 'slug' =>
"[A-Za-z0-9_\-]+")
);

Router::connect("/articles/:action", array("controller" =>
"articles"), array("action" => "list|controller|actions|here"));

Router::connect("/articles/:slug", array("controller" => "articles",
'action' => 'view'), array("slug" => "[A-Za-z0-9_\-]+"));

All the variables used are magic variables that are available in
config/routes.php.  Also, passing null to keys in the second parameter
makes those parameters optional, so that first route takes care of all
your date / date + slug URLs.

On Nov 11, 2:12 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> hi folks,
>
> I'd like to have the following urls:
>
> /articles
> /articles/$category_slug
> /articles/$year
> /articles/$year/$month
> /articles/$year/$month/$day
> /articles/$year/$month/$day/$article_slug
>
> I've been looking at routes but hit a mental block, most likely due to
> a lack of regex experience. Should I:
>
> a) follow cake's pages->display method and do a switch on the number
> of args (with some type checking)
> b) use cake's routes to redirect a single call to 3 different methods
> (index, category, view)
> c) use cake's routes to do regex and pass the correct value in params
> to a single method
>
> I think C is the answer, but I need a bit of help getting there!
>
> Thanks,
>
> Jon
>
> --
>
> jon bennett
> w:http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~~---~--~~
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: Annoying RC3 form->input behavior, form->input produces select box despite type => text

2008-11-10 Thread Nate

FormHelper should not be overriding anything you set explicitly.  If
you can reproduce this with a unit test, please submit a bug report at
https://trac.cakephp.org/

On Nov 9, 4:48 pm, Kimble <[EMAIL PROTECTED]> wrote:
> On Nov 9, 10:35 pm, Kimble <[EMAIL PROTECTED]> wrote:
>
> > echo $form->input("customer_id", array("label" => "Kundenummer:",
> > "type" => "text"));
>
> > I would like this to produce a text field, but cakephp creates a
> > select box filled with all the data from the customer table. Someone
> > knows how to avoid this?
>
> After reading the form helpers php code it turns out that if you've
> set ie. customers at the same time you're using form->input(customer_id) 
> cakephp will use data from $customers to populate
>
> the select box. It's a shame that this isn't documented somewhere..
--~--~-~--~~~---~--~~
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: PHP 6 and cakePHP?

2008-11-10 Thread Nate

A stable release of PHP6 will most likely not be available for several
years.  We're not worrying about it.

On Nov 10, 9:35 am, Yodiaditya <[EMAIL PROTECTED]> wrote:
> I have heard about PHP 6 from my friend a few hours ago.
> He told me that PHP 6 have much updates and significant change rather than
> before.
> Seems it will be make new problem since PHP 6 maybe have big different
> syntax.
>
> So, I think again, if new PHP 6 have big difference, it's possible kill
> frameworks development.
> Every developer must have "big effort" to migrate from PHP 5 to PHP 6.
>
> That's all my opinion,
> i'm just asking.. cakephp core development have think about this potential
> problem?
--~--~-~--~~~---~--~~
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 couple of things with Security Component

2008-10-31 Thread Nate

There were a couple of bug fixes related to this issue that got
committed just recently.  If you're not running on the latest SVN
branch code, try updating to that and see if the problem persists.

On Oct 31, 3:54 pm, Stinkbug <[EMAIL PROTECTED]> wrote:
> I'm having a bit of a problem with the Security Component on one of my
> actions.  It works on most, but this one action is quiet complex.  I'm
> not even sure what the problem could possible be.  So rather than
> asking what the problem is with my action, I would rather ask if there
> is any information that explains how the security component works (not
> how to implement it), so that I might be able to pin point the problem
> with my code.  Basically, my request get's black holed when I select a
> checkbox.  I'm using
>
> select('Category.Category', $categories,
> $selectedCategories, array('multiple' => 'checkbox'));?>
>
> Everything works fine if I don't select a category.  But if I select a
> category, the request get's blackholed.  So if I can learn how the
> security component actually works, maybe I can figure out my problem.
> How does the security component create it's token?  Hidden field
> values?  And at what point does it do this?  afterRender perhaps,
> because how can it know what hidden fields there are if we're setting
> those values in our controller action?
--~--~-~--~~~---~--~~
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: Function which is executed at the end

2008-10-29 Thread Nate

Off the top of my head, I think the closest thing would be
afterFilter() in the Controller or the shutdown() in a component.  Is
that late enough?

On Oct 29, 10:24 am, Abhimanyu Grover <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I am looking for a function in CakePHP which is executed after the
> dispatching and processing a request.
> I wish to log controller / model behavior for some debugging. Should I
> just use destructor functions or is there any sweet solution available
> in CakePHP for this already?
--~--~-~--~~~---~--~~
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: PHPShop v2 is a cake app!

2008-10-28 Thread Nate

I think it would be possible to write the core of the application as a
plugin, but distribute it inside of an application that provides the
front-end.  This would serve the purpose of (a) appealing to a mass
market by making it a working application out of the box, (b)
providing a plugin for CakePHP developers to integrate into their own
apps, and (c) an example application that demonstrates how to
integrate said plugin, for the benefit of those who wish to do so.

I think a lot of re-distributable CakePHP apps could benefit from
being designed like this.  Anyway, something to think about.

On Oct 23, 9:12 am, Mathew <[EMAIL PROTECTED]> wrote:
> > I have honestly not given that idea much thought.  I mostly approached
> > the development as if phpShop were the base application and that it
> > would have it's own set of plugins to expand its functionality.  I
> > would have to see how a plugin can have plugins...  Or how to have a
> > similar ability to extend functionality.  If you have ideas or can
> > point me in the right direction, please let me know.
>
> If you redesign it to be a CakePHP plug-in then your addressing a much
> smaller market, and that isn't healthy for the project.
>
> What you should do is continue with what your doing, but add a
> phpShopAPI and then develop a CakePHP plugin that uses that
> phpShopAPI.
>
> Now PHP developers can use your phpShopAPI, and Cake developers can
> use the phpShopAPI plugin. While regular phpShop users can just use
> the standalone application.
--~--~-~--~~~---~--~~
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: An informal survey of development times using cake

2008-10-28 Thread Nate

This sort of thing is probably very difficult to measure.  While
CakePHP does remove the "plumbing" work that you need to do on your
application, the core business logic in each app is unique, and
therefore difficult to compare on a timeline.

On Oct 28, 6:03 am, keymaster <[EMAIL PROTECTED]> wrote:
> A post by Teknoid in this 
> thread:http://groups.google.com/group/cake-php/browse_thread/thread/0635f46f...
>
> ... got me thinking.
>
> Wouldn't it be nice to see some (very informal) accounts of actual
> development times experienced using cakePHP?
>
> Something like:
> (app metrics, weeks)?
>
> I was thinking of little more than a thread in this forum. One post in
> the thread per project. Describe the project, Tell us how long you
> spent on development.
>
> What do people think?
--~--~-~--~~~---~--~~
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: Politics aside.....

2008-10-28 Thread Nate

Hey, very cool.  You should submit this to the Cookbook's "In the
Wild" page.

On Oct 28, 11:33 am, Walker Hamilton <[EMAIL PROTECTED]> wrote:
> I just thought I'd let the cakePHP community know that cakePHP is
> powering a site and a "utility" service at the Barack Obama website. I
> built both of these.
>
> Here's the site:http://radar.barackobama.com/
>
> The utility service isn't anything to look at, but let's just say,
> it's provided some much needed "plumbing" for our infrastructure.
--~--~-~--~~~---~--~~
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 Cakephp 1.2 faster than Code Igniter ?

2008-10-27 Thread Nate

This "benchmark" should not be taken seriously.  There is no available
methodology or documentation to reproduce the results independently,
nor is there any explanation of how the benchmarks were conducted.
Most likely, Yii *appears* to be fast because it does nothing or next
to nothing for you.

On Oct 27, 12:04 pm, "wahyu setianto" <[EMAIL PROTECTED]>
wrote:
> I have read inhttp://www.yiiframework.com/performance, it is true ? i know
> that CI is faster than cakephp because CI is not using OOP actualy
>
> --
> Octopus
> East Java Baker
--~--~-~--~~~---~--~~
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: CakePHP conference in Tokyo 2008 - report

2008-10-27 Thread Nate

That's really amazing.  I'm glad the event was so successful, now I
just need to learn to speak Japanese. :-)

On Oct 26, 8:45 pm, sdozono <[EMAIL PROTECTED]> wrote:
> Hello, CakePHP users.
>
> Last Satureday, we had a CakePHP conference in Tokyo, Japan. (In
> Japan.)
>
> This was a fourth CakePHP study meeting (in Japanese language). More
> than 140  + (at ustream 70) people attended.
>
> Conference page:http://conference.cakephp.jp
>
> Photos:http://www.flickr.com/photos/tsukimiya/sets/72157608356377914/
>
> Blog articles:http://b.hatena.ne.jp/t/cakecon?sort=eid
>
> Google trends (in 
> Japan)http://www.google.com/trends?q=CakePHP%2CSymfony%2CZend+Framework%2CR...
>
> Shun(sdozono)
--~--~-~--~~~---~--~~
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: change MIT license to GPL?

2008-10-23 Thread Nate

Gwoo,

You need to chill, and realize what you're talking about before making
stupid accusations.  You're confusing the issue.  The topic at hand is
in fact something that's done with OS software all the time.  All the
knowledge in the world won't help you if you're not paying attention.

On Oct 23, 2:27 am, Gwoo <[EMAIL PROTECTED]> wrote:
> Nate,
>
> You should stick to coding and leave the licensing questions to the
> people who actually know what they are talking about.
> Please see my previous message to learn a little about intellectual
> property issues.
>
> Sincerely,
> Garrett J. Woodworth
> JD/MBA 2005 Fordham University
--~--~-~--~~~---~--~~
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: change MIT license to GPL?

2008-10-22 Thread Nate

On Oct 22, 4:15 pm, pepejose <[EMAIL PROTECTED]> wrote:
> hello, I've been looking for information about the GPL and MIT and
> wanted to know, because I am not sure, if I can change the license of
> a framework cakephp to GPL and as I have to make changes
>
> greetings and thank you very much

You can certainly re-release the framework under a different license,
though why anyone would ever want to use the GPL is quite beyond me.
Please see here: 
http://video.google.com/videoplay?docid=8073195220998636516&ei=Eu7_SL7BIYruqALaz7m7BA
--~--~-~--~~~---~--~~
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: Cakephp, European privacy laws, key hased models

2008-10-10 Thread Nate

Do you have a reference to these laws that we could look at?

On Oct 4, 4:31 am, イタリア人 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> as per the european community laws on privacy and data protection, it
> seems that even if a database is stolen, it should not be possible to
> reconstruct the data tables links without the final application.
>
> For example, if Mr Right Person lives in 15 Cambden Street, London,
> the table "persons" and the table "addresses" should be linked
> together with an hashed key:
>
> SELECT * FROM 
> persons,addressesWHEREcrypt(persons.id,'hereyoursalt')=addresses.id
>
> Do you know how can I set this up in models in a way that I have not
> to re-write queries ?
>
> Thanks
> イタリア人
--~--~-~--~~~---~--~~
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: Javascript causing Ajax form to submit, but not all ajaxy like I want

2008-10-08 Thread Nate

http://book.cakephp.org/view/208/AJAX

And I quote:
"The AjaxHelper utilizes the ever-popular Prototype and
script.aculo.us libraries for Ajax operations and client side
effects."

On Oct 8, 7:40 pm, Chez17 <[EMAIL PROTECTED]> wrote:
> In case anyone wants to know. I did get this to work but I had to use
> the prototype library and javascript. I couldn't get it working within
> cakes own features.
--~--~-~--~~~---~--~~
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: Release: CakePHP RC3 - The RC of Triumph!

2008-10-07 Thread Nate

Hi Thomas,

As Marcin said, it isn't really a matter of anyone's opinion, other
than that of the core team.  We actively encourage test-driven
development, and we actively encourage people to contribute to the
framework, particularly in the form of test cases.  Therefore, we
include the tests.

Generally speaking (and directed at no one in particular), I really
don't see the point of getting all worked up over stuff like this.
Disk space is measured in the dozens or hundreds of gigabytes, and
bandwidth is measured in the dozens or hundreds of megabits per
second.  Does having fewer files in a tarball somehow just make people
feel better for no rational reason?

On Oct 7, 12:45 am, 703designs <[EMAIL PROTECTED]> wrote:
> Just a thought. You should run a poll of Cake developers (those who
> develop with Cake, not core developers) and see how many people use
> these extra parts. Can't hurt to know which "extras" are the most
> popular.
>
> On Oct 6, 4:18 pm, Yodiaditya <[EMAIL PROTECTED]> wrote:
>
> > I'm agree with you nate. Actually, i never using testing cause don't know
> > how to use it.
> > But, in another cases, testing is needed not only for test your sweet cake
> > before product it. But also give us test the cake for bugs...
>
> > On 10/7/08, Nate <[EMAIL PROTECTED]> wrote:
>
> > > The tweet was just me venting my frustration over an unrelated issue,
> > > I happened to think the timeliness was funny though.
>
> > > Anyway, as far as the "wasted bandwidth" argument, I have to say that
> > > seems a bit silly.  Even the largest of the packages weighs in at less
> > > than 1.2mb.  Anyway, the tests are included for lots of reasons, not
> > > the least of which being that it helps us as core developers, but also
> > > the fact that it promotes visibility of testing within the community,
> > > as well as the ability for people to verify (or more commonly to
> > > verify the absence of) bugs.
>
> > > On Oct 6, 2:05 pm, 703designs <[EMAIL PROTECTED]> wrote:
> > > > Ah, that makes sense. I'm pretty sure that Nate's suggestion was
> > > > uncalled for, but he's helped me enough with Cake stuff over the last
> > > > year that I know it's in good spirit.
>
> > > > Here's a question: Why are the tests included? Why not make them a
> > > > separate download? I mean, yes, if they're distributed together, you
> > > > know for sure that the test match the framework package. But you guys
> > > > are certainly wasting bandwidth on the test files.
>
> > > > Thomas
>
> > > > On Oct 6, 1:56 pm, Gwoo <[EMAIL PROTECTED]> wrote:
>
> > > > > Test cases account for at least two thirds of the overall package
> > > > > size. In my opinion, thats a good thing.
--~--~-~--~~~---~--~~
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: Release: CakePHP RC3 - The RC of Triumph!

2008-10-06 Thread Nate

The tweet was just me venting my frustration over an unrelated issue,
I happened to think the timeliness was funny though.

Anyway, as far as the "wasted bandwidth" argument, I have to say that
seems a bit silly.  Even the largest of the packages weighs in at less
than 1.2mb.  Anyway, the tests are included for lots of reasons, not
the least of which being that it helps us as core developers, but also
the fact that it promotes visibility of testing within the community,
as well as the ability for people to verify (or more commonly to
verify the absence of) bugs.

On Oct 6, 2:05 pm, 703designs <[EMAIL PROTECTED]> wrote:
> Ah, that makes sense. I'm pretty sure that Nate's suggestion was
> uncalled for, but he's helped me enough with Cake stuff over the last
> year that I know it's in good spirit.
>
> Here's a question: Why are the tests included? Why not make them a
> separate download? I mean, yes, if they're distributed together, you
> know for sure that the test match the framework package. But you guys
> are certainly wasting bandwidth on the test files.
>
> Thomas
>
> On Oct 6, 1:56 pm, Gwoo <[EMAIL PROTECTED]> wrote:
>
> > Test cases account for at least two thirds of the overall package
> > size. In my opinion, thats a good thing.
--~--~-~--~~~---~--~~
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: Release: CakePHP RC3 - The RC of Triumph!

2008-10-06 Thread Nate

http://twitter.com/nateabele/statuses/933228799

I'll have to do a blog post expanding on this at some point.

On Oct 6, 1:12 pm, 703designs <[EMAIL PROTECTED]> wrote:
> It's...getting...bigger. Compare the archive sizes from 1.1.x to 1.2
> RC3. Sure, it's no Zend Framework, but let's try to keep the framework
> light and simple if possible. A web framework and simplicity may seem
> like oil and water at times, but a concerted effort to limit the core
> is important. Opinions?
>
> Thomas
>
> On Oct 4, 9:26 pm, alita <[EMAIL PROTECTED]> wrote:
>
> > Hey folks,
>
> > Sounds great what RC3 offering to us.
> > Everything seems get faster. Is RC2 really "slow" compare to RC3,
> > anyway?
> > I haven't look at RC3, and I have no idea how I will compare them (RC2
> > and RC3).
>
> > But surely I'm getting deep with this cake's stuff. So sweet...
> > Hopefully will contributed something to the community soon.
>
> > Thanks to all for making this happen.
> > I'm looking forward to use the new release.
>
> > Cheers,
> > ketut
> > Happy Mark Story Day :)
>
> > On Oct 4, 1:51 am, Mathew <[EMAIL PROTECTED]> wrote:
>
> > > Thanks so much for all the hard work guys!
>
> > > Special thanks to Mark Story, because bugs I reported were fixed the
> > > next day by him. He's so fast! Thanks for all the hard work Mark!
--~--~-~--~~~---~--~~
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: Migration RC2 -> RC3 and more generally

2008-10-02 Thread Nate

Other than replacing the CakePHP core, there were minor changes to a
few files in the app folder.  Please see here:

http://cakebaker.42dh.com/2008/10/02/migration-from-cakephp-12-rc2-to-rc3/

On Oct 2, 8:57 am, Zeugme <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I found myself not sure about what to change and what to keep on a  
> CahePHP upgrade :
> For the cake folder, its pretty clear : remove the old one and copy  
> the new one.
>
> What about the app folder ? Can I safely keep the old one ?
>
> That folder is full of modified files but the new version might have  
> upgraded the file.
> I'm talking here about files provided by CajePHP like config/
> core.php ...
>
> Thanks !
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Release: CakePHP RC3 - The RC of Triumph!

2008-10-01 Thread Nate

It's finally here: the final release before the final release of
CakePHP 1.2, and I just want to say how thrilled I am. This release,
possibly more than any other in the history of the project, has truly
been a team effort. Everyone has really come together to make this a
great release, and I just can't say how proud and happy I am of the
effort that the team has put in.

Some of you may remember the benchmarks posted by Rasmus Lerdorf, in
which CakePHP did not perform so well. We can all debate Rasmus' due
diligence (or lack of), but what was clear was that we had some
catching up to do. Over the past few weeks, Larry has worked
tirelessly on iteration after iteration of performance improvements,
and now we're faster than ever before. By itself, the bootstrap
process is over 10x faster than RC2, and basic requests for static
content are now about 5x faster overall.

Tim Koschuetzki really stepped up as well. Not only has he contributed
several new features and many, many tests to the latest release, but
he also knocked out the remaining bugs left over from 1.1, so we're
now able to push out another stable 1.1 release for those who haven't
already moved up to 1.2.

Garrett, as always, has kept this project running in all the ways we
don't notice, in addition to many we do. As project manager, Garrett
works to keep everything running, in addition to tracking bugs and
contributing code. This project would not be possible without his
continued efforts.

Lastly, but most certainly not leastly, I'd like to thank Mark Story,
who has put as much or more effort into this last release as anyone.
In working to get RC3 done, Mark has been the most consistent, hardest-
working contributor, and we'd like to honor him as such. Henceforth,
October 1st shall be known to the CakePHP community as Mark Story Day!

So, thanks to everyone on the team for their positive efforts. As
always, you can download the latest release on CakeForge[1]. To
announce this release, Jeff and I have recorded a new episode of The
Show, which you can listen to at the CakePHP Live Website[2]. You can
also read up on the changes that have gone into this release in the
changeset[3].

So thanks again everyone, and merry Mark Story Day!

[1] http://cakeforge.org/frs/?group_id=23&release_id=426
[2] http://live.cakephp.org/
[3] https://trac.cakephp.org/wiki/changelog/1.2.x.x


--~--~-~--~~~---~--~~
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: This Router test fails when using named parameters.

2008-09-29 Thread Nate

You're trying to make it do two different things.  Named parameter
format is:

/profiles/username:mustan9

"Normal" parameter format is:

/profiles/mustan9.

The latter has nothing to do with CakePHP's notion of 'named
parameters'.  Please refer to 
http://book.cakephp.org/view/46/Routes-Configuration

On Sep 29, 10:06 am, Mathew <[EMAIL PROTECTED]> wrote:
> I've been debugging this code, and I'm confused as to how Routing is
> suppose to work with named parameters.
>
> In the Router.php file in the function mapRouteElements there is this
> logic.
>
> if (!strpos($route[0], '*') && (!empty($pass) || !empty($named))) {
>   return false;
>
> }
>
> This will return false from mapRouteElement if the named array is not
> empty. So if there are named parameters they are not getting handled,
> and after returning to Router::url() it continues to build a simple /
> gems/gemsProfiles/show/username:mustan9 URL.
>
> It it be possible that this code is broken?
--~--~-~--~~~---~--~~
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: Models: Why not more Object Oriented??

2008-09-23 Thread Nate

Yah.  We know.  We'll get to it.

On Sep 23, 7:39 pm, Brenton B <[EMAIL PROTECTED]> wrote:
> This is all well and good, in this specific example ... but the
> underlying principle still exists: better OOP layout.
>
> On Sep 23, 5:32 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
>
> > >  Even if `afterFind()` is used, I'd still be doing 1 more loop than I
> > >  should need to.
> > >  But thanks for the tip, it's all very useful.
>
> > If you have logic that you need in the view, create a helper and add
> > methods to it, like:
>
> > // /app/helpers/ecom.php
> > class EcomHelper extends Helper {
>
> >         public function calculate_totals($record)
> >         {
> >                 # do stuff
> >         }
>
> > }
>
> > // A view of some sort
> > foreach($data as $row):
> >         echo $Ecom->calculate_totals($row['Model']);
> > endforeach;
>
> > Though personally I would do this in the afterFind.
>
> > jb
>
> > --
>
> > jon bennett
> > w:http://www.jben.net/
> > iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~~---~--~~
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: Models: Why not more Object Oriented??

2008-09-23 Thread Nate

On Sep 23, 5:52 pm, Brenton B <[EMAIL PROTECTED]> wrote:
> Hmmm ... never thought of backwards compatibility to PHP4 as a reason.
> I figured since PHP5 has been out for over 4 years (first beta was
> over 5 yrs ago) worrying about PHP4's support would've waned ... like,
> completely dropped off.

Yup, you'd think, but check the charts.  The vast majority of PHP's
installed based is on a version < 5.  And yes, it'll be more OO in a
future PHP5-only version.  And yes, the dev team still does read the
list every now and again.
--~--~-~--~~~---~--~~
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: CakePHP not recommenable for busy websites?

2008-09-21 Thread Nate

http://book.cakephp.org/view/510/Sites-in-the-wild

Take special note of the Mozilla Add-ons portal, one of the most
heavily trafficked in the world.

On Sep 21, 2:35 am, toby78 <[EMAIL PROTECTED]> wrote:
> I am currently evaluating different frameworks and also looking at
> cakePHP.
>
> My first thought was that it seems not very efficient...
>
> If you have an object, e.g. "User" that has other related objects such
> as "Message" or "Photo" - there will be SQL statements to select all
> content from all related tabled - no matter whether it is used or not.
>
> If you have a large database table this could also lead to problems as
> the query is not pages, but everything is selected at once?
>
> There also does not seem to be a caching of database queries?
>
> Or is this possible? And if so, how do you define which queries are
> cached in which intervall?
>
> Thanks!
>
> Toby
--~--~-~--~~~---~--~~
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: Unsigned Integers??

2008-09-16 Thread Nate

On Sep 13, 11:47 pm, Brenton B <[EMAIL PROTECTED]> wrote:

>
> I'll chalk this up to storage-type dependency ... (ex: MySQL can do
> unsigned ints, but others can't) ...

Yeah, that.
--~--~-~--~~~---~--~~
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: KTML Editor

2008-09-12 Thread Nate

http://www.google.com/search?client=safari&rls=en-us&q=KHTML+editor+CakePHP&ie=UTF-8&oe=UTF-8

On Sep 12, 12:59 am, mirfan <[EMAIL PROTECTED]> wrote:
> Hello,
> Well, anybody help me how i will include KTML Editor in cake php
> please reply me on [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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 1.2 custom route

2008-09-03 Thread Nate

Please consult the documentation: 
http://book.cakephp.org/view/542/Defining-Routes

On Sep 3, 3:36 pm, aka <[EMAIL PROTECTED]> wrote:
> Hey thats great, thanx works like a charm!
>
> Can someone also tell me what is happening here...?!
>
> On 3 sep, 20:39, Nate <[EMAIL PROTECTED]> wrote:
>
> > Router::connect(
> >     "/view/:id",
> >     array("controller" => "posts", "action" => "view"),
> >     array('id' => '[0-9]+', 'pass' => array('id'))
> > );
>
> > On Sep 3, 1:37 pm, aka <[EMAIL PROTECTED]> wrote:
>
> > > Ok, i've been breaking my head over this.
>
> > > I'm trying to change the routing of my app so that (for my base
> > > controller, lets say 'posts') it will be hidden in the url. That is to
> > > say that i can use url's 
> > > likewww.mysite.com/view/1insteadofwww.mysite.com/posts/view/1. 
> > > Effectively just hiding (or re-routing)
> > > the controller. Now I know this is possible since this method is used
> > > on the cakephp website itself
> > > (i.e.http://book.cakephp.org/view/542).
>
> > > Any ideas how the routes for this situation should be set up?
>
> > > Thanx!
--~--~-~--~~~---~--~~
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 1.2 custom route

2008-09-03 Thread Nate

Router::connect(
"/view/:id",
array("controller" => "posts", "action" => "view"),
array('id' => '[0-9]+', 'pass' => array('id'))
);

On Sep 3, 1:37 pm, aka <[EMAIL PROTECTED]> wrote:
> Ok, i've been breaking my head over this.
>
> I'm trying to change the routing of my app so that (for my base
> controller, lets say 'posts') it will be hidden in the url. That is to
> say that i can use url's likewww.mysite.com/view/1instead 
> ofwww.mysite.com/posts/view/1. Effectively just hiding (or re-routing)
> the controller. Now I know this is possible since this method is used
> on the cakephp website itself
> (i.e.http://book.cakephp.org/view/542).
>
> Any ideas how the routes for this situation should be set up?
>
> Thanx!
--~--~-~--~~~---~--~~
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 is Hard, talked by Rasmus Lerdorf @ FrOSCon 2008

2008-08-30 Thread Nate



On Aug 30, 12:41 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Sat, Aug 30, 2008 at 1:17 AM, Gwoo <[EMAIL PROTECTED]> wrote:
>
> > Since we have spent some time over the last week optimizing, I figured
> > I would run some more tests. I really don't like "ab" as a utility. I
>
> But what was the test?
>
> Can we have a peek at the areas where Cake 1.2 is being looked into -
> after going thru Rasmus's presentation I also did some profiling on
> CakePHP and was going to look deeper over the weekend

The test was of the basic dispatch/rendering cycle, i.e. the "hello
world" example used by Paul M. Jones, with helpers and layout turned
off, but pretty much all other production-mode defaults left in
place.  The areas of the framework being looked into right now are
pretty much all that go into executing the benchmark test, and you'll
start to see which areas are being optimized by watching the
changesets as they show up in the timeline (i.e. 
https://trac.cakephp.org/changeset/7536).

As always, if you'd like to help out, and you find a portion of the
framework that could be improved, open an optimization ticket with
suggestions or a patch.

--~--~-~--~~~---~--~~
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 is Hard, talked by Rasmus Lerdorf @ FrOSCon 2008

2008-08-28 Thread Nate

@kiang: That's a great idea.  I think a more general performance-
tuning guide would really help out.  I know there are some resources
on this, but I think a comprehensive guide in the Cookbook somewhere
would be great.  I'll see what we can do about this.

On Aug 28, 11:11 am, kiang <[EMAIL PROTECTED]> wrote:
> Maybe there could be one page like 'Read first before benchmarking' in
> home page since there exists many mis-understandings around the
> world. :)
>
> ---
> kiang
>
> On Aug 28, 10:41 pm, Gwoo <[EMAIL PROTECTED]> wrote:
>
> > One thing we know for sure is that we can always work to improve the
> > speed. However, we will not do it in earnest until the time is right.
> > We have been here before, seen similar things, and come up with the
> > answers.
>
> > While the hello world is pretty silly, a couple of things strike me
> > right off the bat. For one, var $helpers = array() will still load 3
> > files, while setting it to null will stop all loading. So, in a lot of
> > ways Cake shows up slower because it does more from the start. The
> > other major place is the session handling. We have no idea what his
> > settings were in this regard.
>
> > In any case, now that we are deeper into the RC cycle you will see in
> > the timeline many efforts to improve and optimize the responsiveness
> > of the framework. If you would like the historical perspective have a
> > look at what happened in 1.1 between the 1.1.13 and 1.1.17 releases.
> > We have a history of squeezing speed out of this language and
> > framework and we prepared to do it again.
--~--~-~--~~~---~--~~
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 is Hard, talked by Rasmus Lerdorf @ FrOSCon 2008

2008-08-28 Thread Nate

Sorry, but Rasmus' benchmarks are useless.  There's no documentation
of his methodology. There's not even any indication that he wasn't
running in debug mode.  I've spoken to Paul M. Jones (author of the
original PHP framework benchmarks), and he's getting ready to run
another round soon.  So, we'll see who comes out on top when
everything is actually done right.

On Aug 28, 8:33 am, kiang <[EMAIL PROTECTED]> wrote:
> http://talks.php.net/show/froscon08/
>
> He compared the performance of several PHP frameworks and CakePHP
> seems to be the one which have the biggest space to improve. ^^||
--~--~-~--~~~---~--~~
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: OrderedBehavior - Order your lists in a TreeBehavior like manner, but only for one level.

2008-08-21 Thread Nate

@Alkemann: If you'd like, you can email me directly when the article
is updated.  I'd be more than happy to review it myself.

On Aug 21, 4:28 am, alkemann <[EMAIL PROTECTED]> wrote:
> The behaviour is currently beeing updated to be more generally usable.
> (Raw sql being removed).
>
> I will (try to) publish new version when its' ready.
>
> Alkemann
>
> On 21 Aug, 06:39, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> > On Wed, Aug 20, 2008 at 4:03 PM, villas <[EMAIL PROTECTED]> wrote:
>
> > > @Tarique
>
> > > > I am not arguing the value of bakery - you missed the point :D
>
> > > Well,  in all fairness,  I imagine Alkemann already knows about search
> > > engines but he would still like to publish his work on the Bakery. I
> > > believe that is the main point here.
>
> > Ah! Yes, the altruistic desire share or the desire to earn the portfolio
> > brownie points or whatever
>
> > My contention is with the 'ad nauseum' whining which the audience of this
> > list has to put up with because of these reasons.
>
> > EOT for me
>
> > Tarique
>
> > --
> > =
> > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> > PHP for E-Biz:http://sanisoft.com
> > =
--~--~-~--~~~---~--~~
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: OrderedBehavior - Order your lists in a TreeBehavior like manner, but only for one level.

2008-08-19 Thread Nate

It exists for many reasons, one of which is providing a centralized
location for CakePHP resources.  Another is to showcase best practices
for application development, and using raw SQL in a class that should
be portable is not a best practice.

On Aug 19, 2:13 pm, villas <[EMAIL PROTECTED]> wrote:
> @Tarique
>
> >> Post a URL here or on the forums with enough keywords and sooner or later 
> >> it gets picked up by google
>
> That may be so.  But doesn't the Bakery exist so that interesting
> stuff worthy of publication can brought together in one place so we
> can reduce our time spent searching?  ;-)
--~--~-~--~~~---~--~~
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: MSSQL ntext problem

2008-07-15 Thread Nate

If the code above is the same as the method you patched in the core,
then it should work fine.  Try examining the query output, and/or
running the query in Enterprise Manager to get to a more informative
error message.

On Jul 15, 8:22 am, bitkidoku <[EMAIL PROTECTED]> wrote:
> When I change the source it works fine. But when I try to extend the
> driver I get the same error saying:
> Warning (2): mssql_query() [function.mssql-query]: Query failed [CORE
> \cake\libs\model\datasources\dbo\dbo_mssql.php, line 176]
>
> I changed the database config to 'my_mssql'. And created the following
> extension. I am obviously missing something but what?
>
> - CODE START -
>  require (LIBS . 'model' . DS . 'datasources' . DS . 'dbo' . DS .
> 'dbo_mssql.php');
>
> class DboMyMssql extends DboMssql {
>
>         var $description = "MSSQL DBO Extension Driver";
>
>         // override this method to make ntext problem solved
>         function fields(&$model, $alias = null, $fields = array(), $quote =
> true) {
>                 if (empty($alias)) {
>                         $alias = $model->alias;
>                 }
>                 $fields = parent::fields($model, $alias, $fields, false);
>                 $count = count($fields);
>
>                 $fieldDescription = $this-> describe($model); // edit by 
> b.e.d .
> ref:https://trac.cakephp.org/attachment/ticket/4287/mssql_cake.patch
>
>                 if ($count >= 1 && $fields[0] != '*' && strpos($fields[0],
> 'COUNT(*)') === false) {
>                         for ($i = 0; $i < $count; $i++) {
>                                 $prepend = '';
>
>                                 if (strpos($fields[$i], 'DISTINCT') !== 
> false) {
>                                         $prepend = 'DISTINCT ';
>                                         $fields[$i] = 
> trim(str_replace('DISTINCT', '', $fields[$i]));
>                                 }
>                                 $fieldAlias = count($this->__fieldMappings);
>
>                                 if (!preg_match('/\s+AS\s+/i', $fields[$i])) {
>                                         if (strpos($fields[$i], '.') === 
> false) {
>                                                 $this->__fieldMappings[$alias 
> . '__' . $fieldAlias] = $alias .
> '.' . $fields[$i];
>                                                 // edit by b.e.d start
>                                                 //-$fieldName  = 
> $this->name($alias . '.' . $fields[$i]);
>                                                 //-$fieldAlias = 
> $this->name($alias . '__' . $fieldAlias);
>                                                 if 
> ($fieldDescription[$fields[$i]]['type'] == 'text')
>                                                 {
>                                                         $fieldName  = 
> "CAST(CAST(".$this->name($alias) . '.' . $this->name($fields[$i]) ." AS 
> VARCHAR(8000)) AS TEXT)";
>
>                                                         $fieldAlias = 
> $this->name($alias . '__' . $fieldAlias);
>                                                 }
>                                                 else
>                                                 {
>                                                         $fieldName = 
> $this->name($alias) . '.' . $this->name($fields[$i]);
>
>                                                         $fieldAlias = 
> $this->name($alias . '__' . $fieldAlias);
>                                                 }
>                                                 // edit by b.e.d end
>                                         } else {
>                                                 $build = explode('.', 
> $fields[$i]);
>                                                 
> $this->__fieldMappings[$build[0] . '__' . $fieldAlias] =
> $fields[$i];
>                                                 $fieldName  = 
> $this->name($build[0] . '.' . $build[1]);
>                                                 $fieldAlias = 
> $this->name(preg_replace("/^\[(.+)\]$/", "$1",
> $build[0]) . '__' . $fieldAlias);
>                                         }
>                                         if 
> ($model->getColumnType($fields[$i]) == 'datetime') {
>                                                 $fieldNam

Re: MSSQL ntext problem

2008-07-11 Thread Nate

You don't need to change the source.  Just extend the driver and
override the correct method.

On Jul 10, 8:45 pm, bitkidoku <[EMAIL PROTECTED]> wrote:
> Thank you very much :-) I did a change in the source in a similar way.
> It is dirty but it works.
>
> On Jul 11, 12:32 am, James K <[EMAIL PROTECTED]> wrote:
>
> > Oh, PS - I modified the hack so that it only runs when it recognizes
> > an XML type from SQL 2005. If you change my
> > $fieldDescription[$fields[$i]]['type'] == 'xml' to
> > $fieldDescription[$fields[$i]]['type'] == 'text', it should work for
> > ntext fields in general.
>
> > - James
>
> > On Jul 10, 12:34 pm, James K <[EMAIL PROTECTED]> wrote:
>
> > > The official word from the CakePHP team is that "CakePHP does not
> > > support ntext fields". You're stuck using the text casting hack. I'm
> > > using MS SQL myself, and have had to use it, unfortunately.
>
> > > I'm using 1.2 RC2 and have successfully gotten that same hack to work
> > > - you have to change it a bit to work with the changes introduced in
> > > RC1. Here's my version of the fields function from RC2:
>
> > >         function fields(&$model, $alias = null, $fields = array(), $quote 
> > > =
> > > true) {
> > >                 if (empty($alias)) {
> > >                         $alias = $model->alias;
> > >                 }
> > >                 $fields = parent::fields($model, $alias, $fields, false);
> > >                 $count = count($fields);
>
> > >                 $fieldDescription = $this->describe($model);
>
> > >                 if ($count >= 1 && $fields[0] != '*' && strpos($fields[0],
> > > 'COUNT(*)') === false) {
> > >                         for ($i = 0; $i < $count; $i++) {
> > >                                 $prepend = '';
>
> > >                                 if (strpos($fields[$i], 'DISTINCT') !== 
> > > false) {
> > >                                         $prepend = 'DISTINCT ';
> > >                                         $fields[$i] = 
> > > trim(str_replace('DISTINCT', '', $fields[$i]));
> > >                                 }
> > >                                 $fieldAlias = 
> > > count($this->__fieldMappings);
>
> > >                                 if (!preg_match('/\s+AS\s+/i', 
> > > $fields[$i])) {
> > >                                         if (strpos($fields[$i], '.') === 
> > > false) {
> > >                                                 
> > > $this->__fieldMappings[$alias . '__' . $fieldAlias] = $alias .
> > > '.' . $fields[$i];
> > >                                                 if 
> > > ($fieldDescription[$fields[$i]]['type'] == 'xml') {
> > >                                                         $fieldName = 
> > > "CAST(CAST(".$this->name($alias . '.' .
> > > $fields[$i])." AS VARCHAR(8000)) AS TEXT)";
> > >                                                 } else {
> > >                                                         $fieldName  = 
> > > $this->name($alias . '.' . $fields[$i]);
> > >                                                 }
> > >                                                 $fieldAlias = 
> > > $this->name($alias . '__' . $fieldAlias);
> > >                                         } else {
> > >                                                 $build = explode('.', 
> > > $fields[$i]);
> > >                                                 
> > > $this->__fieldMappings[$build[0] . '__' . $fieldAlias] =
> > > $fields[$i];
> > >                                                 $fieldName  = 
> > > $this->name($build[0] . '.' . $build[1]);
> > >                                                 $fieldAlias = 
> > > $this->name(preg_replace("/^\[(.+)\]$/", "$1",
> > > $build[0]) . '__' . $fieldAlias);
> > >                                         }
> > >                                         if 
> > > ($model->getColumnType($fields[$i]) == 'datetime') {
> > >                                                 $fieldName = 
> > > "CONVERT(VARCHAR(20), {$fieldName}, 20)";
> > >                                         }
> > >                                         $fields[$i] =  "{$fieldName} AS 
> > > {$fieldAlias}";
> > >                                 }
> > >                                 $fields[$i] = $prepend . $fields[$i];
> > >                         }
> > >                 }
> > >                 return $fields;
> > >         }
>
> > > On Jul 10, 9:59 am, bitkidoku <[EMAIL PROTECTED]> wrote:
>
> > > > Hi everyone,
>
> > > > I have a problem using my existing MSSQL DB. I get the following
> > > > error:
> > > > "SQL Error: Unicode data in a Unicode-only collation or ntext data
> > > > cannot be sent to clients using DB-Library (such as ISQL) or ODBC
> > > > version 3.7 or earlier. [CORE\cake\libs\model\datasources
> > > > \dbo_source.php, line 512]"
>
> > > > I encountered this error before while writing my own PHP code. It can
> > > > be 'solved' casting ntext field to text. The closest solution for
> > > > CakePHP I found is this:https://trac.cakep

Re: New CakePHP, CodeIgniter, Zend Framework and Ruby on Rails Benchmark

2008-07-01 Thread Nate

Also, he probably has no idea how to set up a Cake install.  He (and
you) would do well to refer to the benchmarks produced by Paul M.
Jones.

On Jul 1, 11:12 am, DragonI <[EMAIL PROTECTED]> wrote:
> Ekerete of AVNet Labs has performed "PHP framework comparison
> benchmarks"http://www.avnetlabs.com/php/php-framework-comparison-benchmarks.
>
> Cake performance - request per second aren't pretty. CakePHP
> 1.2.0.7125 rc1 was used! debug set to 0 - file caching is used.
>
> Anyway, read for yourself
--~--~-~--~~~---~--~~
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: CakePHP Corporate Identity Colorpalette

2008-06-30 Thread Nate

We have a palette that's available with most of those colors, which
you can find in cake.generic.css, which ships with the framework.
That's about it though.

On Jun 30, 7:48 am, powtac <[EMAIL PROTECTED]> wrote:
> Is there a CakePHP (PS) colorpalette to use for cake applications? To
> get this "green" look and feel?
--~--~-~--~~~---~--~~
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 Nate

I totally don't get ACL.  Like, at all.  Who the heck wrote that??

On Jun 24, 12:11 pm, John David Anderson <[EMAIL PROTECTED]>
wrote:
> Bakers,
>
> How are we doing? What is the most confusing? What's most needed and  
> missing? I have a punchlist of my own, but I'm looking for input from  
> you guys, especially the new ones.
>
> Thanks,
>
> John
--~--~-~--~~~---~--~~
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: Are Cake Models half-baked?

2008-06-23 Thread Nate

Since PHP(4) has better support for arrays than objects, we've decided
to play to that and use it for database results.  The same
architectural principles apply, just in a modified way.  Logic can
still be embedded in model objects using callbacks and custom
methods.  See http://c7y.phparch.com/c/entry/1/art,mvc_and_cake

On Jun 23, 6:40 pm, Howie <[EMAIL PROTECTED]> wrote:
> Hi there. This is my first post. I'm just learning Cake, coming from a
> strong Java background. I like what I've see so far, but am a little
> confused with the Model part of the MVC implementation. Perhaps I'm
> missing something.
>
> My understanding of MVC, is that the Model represents the data. In
> Cake, the Model appears to be nothing more than an a DAO (Data Access
> Object). Is this correct?
>
> If I have a Model Class representing a blog post mapped to a database
> table, I would expect that the Class have attributes for each database
> field. What I get instead is a set of database helper methods
> returning results as a multi-dimensional array. There is no Object-
> Relational Mapping.
>
> As I say, perhaps I'm missin something. Google suggests there is an
> ActiveRecord implementation in Cake somewhere. Not too familiar with
> this pattern, bt perhaps this is what I'm after?
>
> Can someone please point me in the right direction?
>
> cheers
--~--~-~--~~~---~--~~
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   >