RE: phpGACL for CakePHP 1.0.2b Released - Integrating phpGACL with CakePHP

2007-03-09 Thread Mariano Iglesias

CakeForge Project approved:

http://cakeforge.org/projects/phpgacl-cake

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread h3raLd

 CakePHP is trademark of the Cake Software Foundation, Inc.

^^^ I suggest to specify this clearly on the CakePHP website, like
Rails does, at least.
I did a quick search on the Trademark Electronic Search System (http://
www.uspto.gov/main/trademarks.htm): Ruby on Rails came up and CakePHP
didn't, but I may be wrong...

 We would like to be involved at some level of any book that comes out.

I'd like to share my personal experience and a small anecdote
regarding this. Although the CSF was paid to review the whole book, as
a matter of fact they reviewed it *what they wanted* and *when they
felt like it*.
An example? Although they are - apparently - so concerned about having
proper code used in a book, it seems that they didn't care about some
obvious mistake in Chapter 3 of my book when I used the .html
extension for the views (deprecated in 1.2) instead of .ctp... This
means nothing, of course, but according to them such chapter was
fine.

On the contrary, Larry explicitly *forbid me* to put any reference to
Michal Tatarynowicz in the book, stating that himself should be
considered the creator of the framework. So much for a technical
review!

Here's the censored passage:

---
History and Uses of CakePHP

While it's difficult to copy Rails in PHP, it's quite possible to
write an equivalent system. I like the terseness of Ruby code, but I
need the structure that Rails provides, how it makes me organize my
code into something sustainable. That's why I'm ripping off Rails in
Cake .

This was a comment by Michal Tatarynowicz a.k.a. Pies in reply to a
blog post about Rails clones. Michal started to develop a rapid
development framework in 2005, drawing his inspiration from Ruby on
Rails structure and methodologies.
About CakePHP's early days

The old CakePHP Web site is still available at www.sputnik.pl/cake-old/.
Please note that the framework has evolved a lot since then, with the
help of an always-growing, hyper active community.
As repeatedly remarked by Michal Tatarynowicz and other core
developers like Larry E. Masters and Garret G. Woodsworth - who now
actively maintain the framework - CakePHP is not a port of Ruby on
Rails to PHP. RoR was developed in Ruby for a reason, mainly because
only Ruby could provide a concise and elegant syntax and offered
advanced OO features necessary to develop such an optimized and quick-
to-use application framework.

---

I complied, although reluctant, to the order and informed the
publishers that - despite the chapter was already sent to production -
I needed to re-write that bit. I was asked by one of the editors how
much of a modification was it, and I replied:

---

Basically Larry wasn't too happy to read that I mentioned the former
creator of the Cake framework, a project originally available in
public domain which is the ancestor of CakePHP.
Basically I'll remove all the references to the creator of the Cake
project in the very first part of the chapter (History of CakePHP)

---

As I put Larry in Cc, he immediately sent me the following email:

---
Ok Fabio,

Any reason you replied with this when the question was How much of a
modification, not why are you doing a modification? Seems to me you
are trying to piss me off, or make me look bad in the public eye.
Fabio take the time and go through the code of CakePHP, it is not what
was in the public domain. And I am going to say this again to you,
Michal is not the creator of the project. Look at the time line in the
trac site...

I already told you in an IRC chat, that Brego and I are the ones whose
code was what has now become CakePHP

I will be glad when this project with you is over, I wish I would have
thought about it more before thinking you where the best to write this
book. There are others who have a better understanding of the code
that would have been more qualified to write this IMO, and it worries
me with this being the first book, what the quality of that book is
going to be with you at the helm of the writing...
---

Was I _really_ trying to piss him off? I don't think so! Definitely
_he_ did after such a comment though!

Anyhow, a piece of advice for potential writers and publishers: be
extreely careful of what you write or try to publish. If he doesn't
like it, he'll tell you that you won't be allowed to use the CakePHP
logo and name in the book title and that would be it: the book gets
cancelled. That's precisely what happened to me.

Again, sorry for voicing my own in such a dramatic way, it just feels
wrong that after someone spends so much time writing articles and
doing his best to promote the framework he's treated in such a
disrespectful way.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For 

How to link the CSS

2007-03-09 Thread jaideepj

I have a doubt,
The thtml file has a link which refers href=/css/aptusa.css  its in
my server i have downloaded it and now the path added to it is  /
amateurpokertour/trunk/app .

link rel=stylesheet href=/css/aptusa.css type=text/css
media=screen title=Amateur Poker Tour USA stylesheet
charset=utf-8 /

The css file consists of background like

background: url(/img/template/content_box/big-content_box-
bg.jpg)
repeat-y;

how can i link the css file with the thtml file with out adding this
extra urls  /amateurpokertour/trunk/app .


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakePHP and Version control Poll

2007-03-09 Thread Martin Schapendonk

2007/3/8, Sonic Baker [EMAIL PROTECTED]:
 I take it this means you use  the vendors directory in the root of the repo
 for the initial vendor drops, then tag each drop and merge the changes
 between 'current' and the previous tag into the vendors directory in the
 cake or app directoies, e.g.

 repo
 trunk
 app
 controllers
 
 
 vendors -
 cake   |-- changes merged from below into here
 vendors  ---

 branches
 tags
 vendor vendor drops of cake, external calsses etc go here
 cake
 current
 1.1.2.xxx
 1.1.3.xxx
 etc...
 some_lib
 current
 1.0.1
 1.1.2
 etc...
 Is this along the lines of what you're doing?


That is exactly how I laid out my repository. Cake as well as other
external libs go in the vendors-dir in the repository, loaded by
svn_load_dirs. I drop the entire Cake-archive, including app and cake.

I then merge changes between previously-current and current into the trunk.

Any changes to the app-skeleton (or changes in default configuration
files in app - consider an extra configuration option) will be merged
in as well (of course, I'm extra cautious with any merge that changes
something in app/).

Martin

-- 
  Martin Schapendonk, [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

Fabio,

I can sympathize about how sad you feel that your project ended, but I
believe this is BY NO MEANS proper, professional behavior.

All you do here is to rant against people at CSF, disclosing details that
should be between you and the other party.

If you wanted to come across with an advice, the first thing you should've
done is stay objective, or *at least* professional.

What good can we get out of this? By us I mean the rest of Cake community
reading this google group. All I see here is someone who's annoyed with
someone else, pasting emails that we do not know for sure if they were ever
written, possibly leaving out your own emails, and which we don't even care.
Or at least we shouldn't.

We are here to promote, maintain, and help other bakers use CakePHP.
 
As a final note, I've looked at old Cake's source code and it's not at all
what it is today. Just because someone had the idea to build something
doesn't make them the creators when that something was completely rewritten.
Or do you consider Alexander Graham Bell to be the inventor of the cell
phone?

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de h3raLd
Enviado el: Viernes, 09 de Marzo de 2007 05:11 a.m.
Para: Cake PHP
Asunto: Re: Cake Recipes cancelled

Anyhow, a piece of advice for potential writers and publishers: be
extreely careful of what you write or try to publish. If he doesn't
like it, he'll tell you that you won't be allowed to use the CakePHP
logo and name in the book title and that would be it: the book gets
cancelled. That's precisely what happened to me.

Again, sorry for voicing my own in such a dramatic way, it just feels
wrong that after someone spends so much time writing articles and
doing his best to promote the framework he's treated in such a
disrespectful way.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread gwoo

Fabio,

Already, you have clearly voiced your opinion on your own blog.
Now, I hope you have sufficiently voiced your opinion throughout the
community.
Please, consider moving past this issue and on to new outlets for your
passion.

best of luck on your future work.
Gwoo


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread h3raLd

Yes, you're right.

My behaviour right now is not professional, and I'm sorry for that. I
just feel very hurt and sick of someone's behaviour. I realize the
community will be sick of my behaviour at this point, and I'll
probably quit ranting, the community doesn't need this.

I would just like some people - Larry in particular - to realize that
what he did was wrong and inappropriate towards me and the publisher.
True, there's probably nothing of Michal's Cake in CakePHP, but I do
believe he had at least just the idea for it, at least, and he should
be at least mentioned. On a side note, I always praised Larry's effort
in the past, in the book, and even now I think he's probably the best
PHP coder I've met.

BUT I would like him to realize that is not OK to treat people like
crap, especially when he was the one who failed to meet the deadlines
in the first place.

Everyone is entitled to his own opinion - I have mine, people may
share it or not, of course. His behavior during the whole thing was
not professional. They set their own deadlines and they failed each
one of them!
And they keep putting the blame on my lack of coding/writing skills
while they didn't develop a medium sized application in over seven
months? At be honest and say clearly, to the community, that you
didn't feel motivated all along and couldn't be bothered! That - at
least - would have been more honest.
If they didn't want to be involved in the project, they shouldn't have
signed the contract *or* cancel it right when they felt that they
didn't like it, not right when everyone is expecting the book to come
out. I would have been annoyed, pissed off, but I definitely wouldn't
have bothered to make all this public.

I don't only feel sad about the failure of the project, I feel I was
deliberately blamed for its failure and insulted by people who cannot
admit their own mistakes. It wasn't because of my lack of skills that
they failed the deadlines, was it?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Fetching rows one by one

2007-03-09 Thread Adrian Maier

Hello,

The Model-find  method builds a big array that contains all the tuples. Is
it possible to fetch the records one by one , in order to avoid that big array
to be constructed ?

One possible way would be to : get the list of id's , and then traverse it
and use read($id)  to get only the current row.  This implies a select to be
called for each row, though . So this approach could be slow.

Are there better ways to fetch the query result one by one  ?


Cheers,
Adrian Maier

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread Dr. Tarique Sani

On 3/9/07, Mariano Iglesias [EMAIL PROTECTED] wrote:
 Or do you consider Alexander Graham Bell to be the inventor of the cell
 phone?
A more appropriate corollary would be - Is Rasmus still the creator of PHP?

I personally appreciate the mail by Fabio, which I feel despite being
emotional has some details which make the hairs on back of my nape
prickle.

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

And how do you know those details come from actual facts? And what about the
other side of the story?

Trust me, when you are not an insider in a fight (using quotes on
purpose), then there's no way for you to actually know what happen, so we
should clearly avoid judging what someone tells us someone else did. All we
can do is judge what we do see, for that matter.

I have seen this kind of ranting during corporate takeovers and they
certainly lead no where.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Dr. Tarique Sani
Enviado el: Viernes, 09 de Marzo de 2007 06:26 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Cake Recipes cancelled

I personally appreciate the mail by Fabio, which I feel despite being
emotional has some details which make the hairs on back of my nape
prickle.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

Fabio,

 I realize the community will be sick of my behaviour at this point, 
 and I'll probably quit ranting, the community doesn't need this.

I don't know about sick, and I can't speak for the whole community, but I
know I don't need to witness an internal power struggle.

 I would just like some people - Larry in particular - to realize that
 what he did was wrong and inappropriate towards me and the publisher.

Then that is something you and Larry should talk, be it over the phone or
email, but disclosing your internal communication all it does (look at Dr.
Tarique's comment) is confuse the rest of us, giving us a one side of the
story that leads nowhere.

 On a side note, I always praised Larry's effort in the past, in the book,
 and even now I think he's probably the best PHP coder I've met.

You are wrong, that would be me... Just kidding :)

 BUT I would like him to realize that is not OK to treat people like
 crap, especially when he was the one who failed to meet the deadlines
 in the first place.

Nor it is right to disclose personal communications, or talk bad about
someone, is it? If you wanted to point out someone else's mistakes, the best
thing you could've done in the beginning is avoid making the same mistakes
you are accusing the other party of.

 His behavior during the whole thing was not professional. They set their
 own deadlines and they failed each one of them!

I don't know what your contractual agreement regarding deadlines was, nor I
am interested, but Larry, Nate, Gwoo and the rest of the CSF have shown us
(the community) endless commitment to producing what IT'S REALLY IMPORTANT:
the framework itself. I have even seen releases on Christmas Day! What more
commitment can we get on an open source project?

We had this discussion on the Spanish google group today, where someone was
saying that probably CSF's biggest mistake was lack of marketing. I say,
aren't we users of a rapid development framework? So isn't it better that
1.2 is out stable, production-ready than having a nicer website than Rails?

I think some of us need to have a look over on our priorities as developers.

 And they keep putting the blame on my lack of coding/writing skills
 while they didn't develop a medium sized application in over seven
 months?

Again, I'm not familiar with deadlines nor I am interested, but as a witness
of their source code habilities I can tell you know that they can not only
build an application in seven months, but in one day! Look at the changes
from one SVN commit to the other and you'll see the amount of work they can
do on such little time.

 If they didn't want to be involved in the project, they shouldn't have
 signed the contract *or* cancel it right when they felt that they
 didn't like it, not right when everyone is expecting the book to come
 out.

I completely disagree. I have the right to cancel a contract *AFTER* it has
been signed if I believe the quality of the work doesn't meet my
expectations. I'm not saying you had poor or great quality, I just believe
that a person has the right to cancel on a contract. Signing a contract
doesn't mean stick with it no matter what.

 I don't only feel sad about the failure of the project, I feel I was
 deliberately blamed for its failure and insulted by people who cannot
 admit their own mistakes. It wasn't because of my lack of skills that
 they failed the deadlines, was it?

They didn't make a statement saying they cancelled the project because you
were to blame, nor they wrote a blog post about it. It all started with your
blog post, were you accused the other party of being disrespectful,
dishonest, and with a general lack of commitment.

When that happens, I obviously understand the need to defend their
reputation the CSF had.

So to tell you the truth Fabio, as I see it, this would've all been avoided
if your comments didn't make this personal.

But then again, I can understand how a man can be upset. For my personal
experience, leave feelings behind when addressing the general public, or you
may be hurting someone else's feelings and reputation.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread The Mullet

On 9 Mrz., 06:56, Larry E. Masters aka PhpNut [EMAIL PROTECTED]
wrote:
  An allied question - Will an Unofficial book be allowed by CSF?

 If you mean will someone be able to use CakePHP in the title of a book
 without permission, then I will say no.
 CakePHP is trademark of the Cake Software Foundation, Inc.

Larry, you cannot forbid anyone to write a book _ABOUT_ Cakephp, and
it would definately be allowed to use the name even in the title, as
long as it does not claim to be an official book.

But legal issues aside: if what Larry says is representative of the
thinking that dominates the CSF, then, members of the community, be
careful. Thats because, if he thinks anyone needs his permission to
publish an _unofficial_ book containing the word CakePHP, how can
anyone be sure that he is allowed to write a CakePHP Blog? Or even a
website mentioning the Word CakePHP? Larry, will we be hearing from
your lawyers if we do so? What do you demand if I want to start a blog
which is named my unofficial CakePHP blog?

So, please Larry/CSF let us know, if we can safely assume that the
term CakePHP and its fair use are assured for the future - for free!-.
And please don't refer to the CSF website as it does not answer any
questions.

Should you stick to your position that the term CakePHP can be used
only with permission of CSF, I must strongly recommend everyone to
switch to another framework, because I must fear that would be the
beginning of an alienated community.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread Daniel Hofstetter

@The Mullet: There was some time ago a discussion about using the
CakePHP trademark with statements from Larry and Gwoo, see
http://groups.google.com/group/cake-php/browse_thread/thread/f2d9932d54dcb3d5/208047789ceee4d3?lnk=gstq=trademarkrnum=1#208047789ceee4d3

--
Daniel Hofstetter
http://cakebaker.42dh.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread gwoo

@Mullet
This has been discussed in other threads. If you would like further
clarification please contact legal [at] cakefoundation [dot] org.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread Sergei

put

$this-Model-recursive=-1;

before your -find query.



On 9 мар, 17:20, Adrian Maier [EMAIL PROTECTED] wrote:
 Hello,

 The Model-find  method builds a big array that contains all the tuples. Is
 it possible to fetch the records one by one , in order to avoid that big array
 to be constructed ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

I may be out of my way here, but I don't believe CSF members behave like
dictators.

This is an open source project released under the MIT license, and as such
it is bound by those terms.

I think it is safe to say that you *can* use the term CakePHP as long as you
address the binding of its license.

However it is obvious that you cannot put an official CakePHP stamp on your
book/blog/whatever (not just talking about an icon, I mean presenting your
content as official CakePHP content) if you do not have the approval of CSF.
This is just common sense.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de The Mullet
Enviado el: Viernes, 09 de Marzo de 2007 06:47 a.m.
Para: Cake PHP
Asunto: Re: Cake Recipes cancelled

So, please Larry/CSF let us know, if we can safely assume that the
term CakePHP and its fair use are assured for the future - for free!-.
And please don't refer to the CSF website as it does not answer any
questions.

Should you stick to your position that the term CakePHP can be used
only with permission of CSF, I must strongly recommend everyone to
switch to another framework, because I must fear that would be the
beginning of an alienated community.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread AD7six



On Mar 9, 10:20 am, Adrian Maier [EMAIL PROTECTED] wrote:
 Hello,

 The Model-find  method builds a big array that contains all the tuples. Is
 it possible to fetch the records one by one , in order to avoid that big array
 to be constructed ?

 One possible way would be to : get the list of id's , and then traverse it
 and use read($id)  to get only the current row.  This implies a select to be
 called for each row, though . So this approach could be slow.

 Are there better ways to fetch the query result one by one  ?

Why do you want to, what is the goal you want to achieve?

Cheers,

AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Mech7

Q: How to do HABTM with Conditions? (could only find this here)

Q: How to select only the fields that you need from the database to
cause less overhead?

Q: How to do a sidewide (global) menu that does not break Cake when
there is an error or when page controller is called? (Happens to me
when i put a fcuntion in app_controller.

Q: How to deal with templates? Sometimes you will want to switch
layout's and views and link certain layouts to certain views so you
can switch the entire look and feel of the page. How to do this and
how to keep it organized?

Well these are some of the questions i have been struggeling with with
Cake will post here if i can remember anymore :D


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakePHP and Version control Poll

2007-03-09 Thread AD7six



On Mar 7, 9:00 pm, Sonic Baker [EMAIL PROTECTED] wrote:
 On 3/5/07, AD7six [EMAIL PROTECTED] wrote:





  On Mar 5, 9:52 pm, Sonic Baker [EMAIL PROTECTED] wrote:
   Hi bakers,

   I know this has been touched on before but I would like to pay a revisit
  if
   you'll bare with me for a few minutes. With the advent of cakePHP 1.2 on
  the
   horizon people have been coming out with some nice additions to the
   framework which require external libraries to be added to the Global
   'Vendors' directory. Since I usually only keep my 'app' directory under
   version control this causes me re-think my practices once again.
   Therefore, I was wondering if you would take a minute to share your
  version
   control strategies so we may see a show of hands and see the most common
   set-ups used.
   So, which of the following set-ups do you use:

   (a) Keep your entire cake installation with your application in your own
   Repository and merge new changes as necessary with every new release
  drop.

   (b) Keep your entire cake installation with your application in your own
   Repository and use svn::externals to point the framework files to the
   cakePHP repository.

  That's me too. externals only for the cake folder.

 Hi there AD7six,
 Do you mean only the 'cake' subfolder within the framework?

Hi Sonic,

I always use a modified production style install so that everything is
out of the webroot even on shared hosts.

The simple view of what I have is the following:

webroot/
 .htaccess
 index.php
 css/
 img/
 files/
private_files/
 app/
 cake/*
 vendors/

The cake folder is the only thing that is an external. Everything else
is 'just' in my svn repository.

If you wanted to be 100% covered you could set up your repository as:
Create vendor branch for cake
Copy vendor branch to working copy
remove cake folder contents from working copy
set up cake as external
start coding.

Your upgrade process would typically be:
update

The cake folder would be automatically updated to the latest trunk,
unless you specify a specific revision to update to.

Whenever you want, you could updated the vendor cake install code and
any new files/folders that were added by the cake team would be
propogated to your working copy. But it's also usual (or at least good
practice :) ) to EXCLUDE the config folder, so that you don't keep out-
of-syncing your test/live site with your deveopment setup - as such,
and given this is where many of those infrequent changes appear,
managing new folders or file changes outside of the cake folder is
perhaps best as a (rather simple/fast) manual task than a problematic
automated one.

HTH,

AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakePHP and Version control Poll

2007-03-09 Thread AD7six



On Mar 9, 11:40 am, AD7six [EMAIL PROTECTED] wrote:
 On Mar 7, 9:00 pm, Sonic Baker [EMAIL PROTECTED] wrote:



  On 3/5/07, AD7six [EMAIL PROTECTED] wrote:

   On Mar 5, 9:52 pm, Sonic Baker [EMAIL PROTECTED] wrote:
Hi bakers,

I know this has been touched on before but I would like to pay a revisit
   if
you'll bare with me for a few minutes. With the advent of cakePHP 1.2 on
   the
horizon people have been coming out with some nice additions to the
framework which require external libraries to be added to the Global
'Vendors' directory. Since I usually only keep my 'app' directory under
version control this causes me re-think my practices once again.
Therefore, I was wondering if you would take a minute to share your
   version
control strategies so we may see a show of hands and see the most common
set-ups used.
So, which of the following set-ups do you use:

(a) Keep your entire cake installation with your application in your own
Repository and merge new changes as necessary with every new release
   drop.

(b) Keep your entire cake installation with your application in your own
Repository and use svn::externals to point the framework files to the
cakePHP repository.

   That's me too. externals only for the cake folder.

  Hi there AD7six,
  Do you mean only the 'cake' subfolder within the framework?

 Hi Sonic,

 I always use a modified production style install so that everything is
 out of the webroot even on shared hosts.

 The simple view of what I have is the following:

 webroot/
  .htaccess
  index.php
  css/
  img/
  files/
 private_files/
  app/
  cake/*
  vendors/

 The cake folder is the only thing that is an external. Everything else
 is 'just' in my svn repository.

 If you wanted to be 100% covered you could set up your repository as:
 Create vendor branch for cake

For clarity that should read Create vendor branch from a full
download (meaing the whole zip app/ cake/ etc)

Cheers,

AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread Adrian Maier

On 3/9/07, AD7six [EMAIL PROTECTED] wrote:

  Are there better ways to fetch the query result one by one  ?

 Why do you want to, what is the goal you want to achieve?

In short: I'm reading the tuples from table T1, and for each tuple i'm
searching for corresponding tuple in table T2 and , if neccessary, update
some fields of T2 according to the current tuple of T1.

Sometimes, if there are enough records in T1, my action reaches
PHP's maximum memory limit.  I haven't researched to see exactly
what is the number of records when the memory gets filled (but was
less than 15000 records).

What i want is to fetch the query results one by one, because in this
case i really don't need the array with all the records.


-- 
Adrian Maier

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Strange result with findCount

2007-03-09 Thread szeta

Hm,

findCount('Install_Count',0) works fine
findCount('Status',0) does not work (returns 0)

Both Fields are in the same table and both are the same data-type
(VARCHAR 255)

Is this a bug in CakePHP? Is 'Status' a keyword? How can I use this as
normal Table Field for findCount?
I have searched the whole CakePHP Code for Status, but I did not
find anything suspicious.

I'd be glad for any hint!

On 8 Mrz., 18:00, phirschybar [EMAIL PROTECTED] wrote:
 try:

 $this-set('test', $this-Rat-findCount('Install_Count = 7',0));

 quotes around the 7. does it work? might be because it is a varchar

 On Mar 8, 10:48 am, szeta [EMAIL PROTECTED] wrote:

  Hello,

  if I'm using

  $this-set('test', $this-Rat-findCount('Install_Count = 7',0));

  I get a result, but if I do it on

  $this-set('test', $this-Rat-findCount('Status = 7',0));

  (the only difference is the given Condition Field)

  I always get 0 in return, even if i know that there are several 7.
  A direct Select Statement with WHERE Status = 7 works fine.

  Both fields (Status and Install_Count) are a VARCHAR(255)

  Any suggestion how I may count my Status?

  Regards
  Ralph


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with windows install needed - php\php.exe instead of cake ROOT

2007-03-09 Thread jyrgen

thanks hydra,

and sorry for my impatience.

define('ROOT', 'e:'.DS.'programs'.DS.'apache'.DS.'htdocs'.DS.'cake');

didn't solve the problem. start page render flawlessly, links ($html-
link as
well as $html-submit) are all wrong. (see above).

as soon as i find the time, i'll dig into the cake core.  can
somebody
point me to direction (for example some class class that creates
urls ?
maybe the html helper is a good start...

cheers, jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread phirschybar

Take a look at this article:
http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/

Dealing with big fat arrays in Cake can be a struggle at first but
using the Set::extract method can pull out a set of the data you need
very elegantly. See how Felix also uses array_combine to get just a
nice set of key/value pairs out a deeply nested array?

Anyways I would use extract to get the data you need from Table 1 and
then loop over the array and do your UPDATE queries on your second
table.

On Mar 9, 6:02 am, Adrian Maier [EMAIL PROTECTED] wrote:
 On 3/9/07, AD7six [EMAIL PROTECTED] wrote:



   Are there better ways to fetch the query result one by one  ?

  Why do you want to, what is the goal you want to achieve?

 In short: I'm reading the tuples from table T1, and for each tuple i'm
 searching for corresponding tuple in table T2 and , if neccessary, update
 some fields of T2 according to the current tuple of T1.

 Sometimes, if there are enough records in T1, my action reaches
 PHP's maximum memory limit.  I haven't researched to see exactly
 what is the number of records when the memory gets filled (but was
 less than 15000 records).

 What i want is to fetch the query results one by one, because in this
 case i really don't need the array with all the records.

 --
 Adrian Maier


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with windows install needed - php\php.exe instead of cake ROOT

2007-03-09 Thread jyrgen

it worked on linux ;-)



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread Dr. Tarique Sani

On 3/9/07, Mariano Iglesias [EMAIL PROTECTED] wrote:

 I think it is safe to say that you *can* use the term CakePHP as long as you
 address the binding of its license.


Unfortunately it is not very clear and I have asked in the past and
not got satisfactory replies.

The term CakePHP is trademarked so you can be prevented from using
that for almost everything (including blog posts) *if* CSF wishes.

It is this ambiguity from CSF which I do not like.

I personally feel that exceptions to the use of CakePHP trademark
should be clearly defined on the site and they should be mentioned in
a clause in the registering contract of the trademark or its
equivalent in the country it was registered.

Merely pointing to a reply by someone in a thread on the group is just
not enough.

And yes I have reasons to judge on basis of past behaviors :)

This is definitely the last post in this thread from me.

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake Php + AJAX

2007-03-09 Thread shafi

How to implement AJAX in Cake Php


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Php + AJAX

2007-03-09 Thread Dr. Tarique Sani

On 3/9/07, shafi [EMAIL PROTECTED] wrote:

 How to implement AJAX in Cake Php


http://www.google.com/search?q=cakephp+ajax

HTH
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Php + AJAX

2007-03-09 Thread Mariano Iglesias

I'll answer if you answer me this question:

How to drive a car?

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de shafi
Enviado el: Viernes, 09 de Marzo de 2007 08:49 a.m.
Para: Cake PHP
Asunto: Cake Php + AJAX

How to implement AJAX in Cake Php


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread h3raLd

I wasn't going to post anymore but I feel compelled to include a few
more emails concerning that conversation.

I emailed Larry back:



Larry,

I didn't mean to offend you or to piss you off and I hope you can
accept my apologies: I really didn't mean to say that, and to me it
doesn't sound offensive either (maybe because I'm not a native English
speacker).

Regarding this statement:

I will be glad when this project with you is over, I wish I would have
thought about it more before thinking you where the best to write this
book. There are others who have a better understanding of the code
that would have been more qualified to write this IMO, and it worries
me with this being the first book, what the quality of that book is
going to be with you at the helm of the writing...

This certainly does not improve my morale - which is already not at
its best - and it does indeed hurt my feelings. I'm sorry you feel
like this about me and about me writing the book: if you feel this way
I suggest you talk to the Peachpit staff and sort it out as you see
fit. Just let me remind you that the book was proposed to me long ago,
because a Peachpit acquisition editor noticed one of my (many)
articles about CakePHP which I wrote for a magazine.

I never criticized your code or your way of programming (which I
indeed praised everywhere and in every possible occasion), moreover,
it was me who told Peachpit staff to wait for you to finish the
application despite the fact that you failed to meet the deadlines for
the project that you set not only once, but twice.

It sounds to me that you were waiting for a spark to pour out your
real opinion about me and the book, and that really doesn't help
neither me, nor you or the project.

Again, I didn't mean any offense.


...and then he replied, in a more civilized manner:


 I didn't mean to offend you or to piss you off and I hope you can accept
 my apologies: I really didn't mean to say that, and to me it doesn't sound
 offensive either (maybe because I'm not a native English speacker).


Accepted

Regarding this statement:

 I will be glad when this project with you is over, I wish I would have
 thought about it more before thinking you where the best to write this book.
 There are others who have a better understanding of the code that would have
 been more qualified to write this IMO, and it worries me with this being
 the first book, what the quality of that book is going to be with you at the
 helm of the writing...

 This certainly does not improve my morale - which is already not at its
 best - and it does indeed hurt my feelings. I'm sorry you feel like this
 about me and about me writing the book: if you feel this way I suggest you
 talk to the Peachpit staff and sort it out as you see fit. Just let me
 remind you that the book was proposed to me long ago, because a Peachpit
 acquisition editor noticed one of my (many) articles about CakePHP which 
 Iwrote for a magazine.


I am sorry about this comment,  I should have thought about it more
before
sending it. It upsets me when you  continue to  give Michal credit
when his
work on the project was minimal, there are others who have worked on
this
project and contributed a lot more then Michal ever did. To see him
given
credit for this work, when he would not continue to take the code
where it
needed to go, does piss me off. You know this project consumes most of
my
life, and it is like one of my kids. I am very protective of it as I
am with
my kids.


Then, eventually Garrett agreed to just mention -- in a restricted way
-- Michal and Brego.



The bottom line is, both parts did mistakes during the course of the
project, I may have been a bit arrogant sometimes but I think my
reactions were justified by seeing, day after day, that the CSF didn't
seem to have a lot of interested in doing their part.

All I'd like is people to understand my part, and that I'm definitely
not the one to be blamed for the fact that the book wasn't published.
I did my best, sorry if it wasn't sufficient.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Php + AJAX

2007-03-09 Thread Kjell Bublitz

well, first of all you can call prepend an /ajax/ to any URL in cake,
which makes your pages uses the ajax-layout (layouts folder) instead
of the default. Other way around is, that you force the ajax-layout in
your controller action like so: var $layout = 'ajax';

Both works and depends on what you want to do with that method besides
calling it with ajax. i found the /ajax/ thing to be more flexible.

Lets say you have a page where you list your users and you would like
to be able to update that list with ajax. For that, you should create
a method in you users controller and name it something like
userlist.

In another view you can then use the ajax helper to create a ajax link
to that new action, which you could called like so:
/ajax/users/userlist/ (refer to the manual, helper section)

Here is some example code you could basicly place anywhere in your
views.. index maybe.

div id=userlist/div
?php echo $ajax-link('Get Userlist', '/ajax/users/userlist/',
array('update' = 'userlist')); ?

Hope this helps

On 3/9/07, shafi [EMAIL PROTECTED] wrote:

 How to implement AJAX in Cake Php


 



-- 
Regards, Kjell
www.m3nt0r.de

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread AD7six



On Mar 9, 12:02 pm, Adrian Maier [EMAIL PROTECTED] wrote:
 On 3/9/07, AD7six [EMAIL PROTECTED] wrote:



   Are there better ways to fetch the query result one by one  ?

  Why do you want to, what is the goal you want to achieve?

 In short: I'm reading the tuples from table T1, and for each tuple i'm
 searching for corresponding tuple in table T2 and , if neccessary, update
 some fields of T2 according to the current tuple of T1.

 Sometimes, if there are enough records in T1, my action reaches
 PHP's maximum memory limit.  I haven't researched to see exactly
 what is the number of records when the memory gets filled (but was
 less than 15000 records).

Why isn't all this logic in the db? I think you'd be better off
showing what you are doing rather than describing it ;).

HTH,

AD




 What i want is to fetch the query results one by one, because in this
 case i really don't need the array with all the records.

 --
 Adrian Maier


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Strange result with findCount

2007-03-09 Thread phirschybar

I don't have a definite answer but I 'think' status is a reserved word
in MySQL. I only say this because when I type it into the query box in
my MySQL client, it gets highlighted as if it is reserved. Wanna try
changing it to see?

On Mar 9, 6:42 am, szeta [EMAIL PROTECTED] wrote:
 Hm,

 findCount('Install_Count',0) works fine
 findCount('Status',0) does not work (returns 0)

 Both Fields are in the same table and both are the same data-type
 (VARCHAR 255)

 Is this a bug in CakePHP? Is 'Status' a keyword? How can I use this as
 normal Table Field for findCount?
 I have searched the whole CakePHP Code for Status, but I did not
 find anything suspicious.

 I'd be glad for any hint!

 On 8 Mrz., 18:00, phirschybar [EMAIL PROTECTED] wrote:

  try:

  $this-set('test', $this-Rat-findCount('Install_Count = 7',0));

  quotes around the 7. does it work? might be because it is a varchar

  On Mar 8, 10:48 am, szeta [EMAIL PROTECTED] wrote:

   Hello,

   if I'm using

   $this-set('test', $this-Rat-findCount('Install_Count = 7',0));

   I get a result, but if I do it on

   $this-set('test', $this-Rat-findCount('Status = 7',0));

   (the only difference is the given Condition Field)

   I always get 0 in return, even if i know that there are several 7.
   A direct Select Statement with WHERE Status = 7 works fine.

   Both fields (Status and Install_Count) are a VARCHAR(255)

   Any suggestion how I may count my Status?

   Regards
   Ralph


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best Practices: Toggle Item In Element

2007-03-09 Thread jitka

if (!empty($data['ticker']))


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Martin Schapendonk

2007/3/8, nate [EMAIL PROTECTED]:
 We're putting together an official CakePHP FAQ.  So add your
 recommended frequently asked questions (and answers) here:
 https://trac.cakephp.org/ticket/1576

Q: Why does Cake mess up my website in browser XYZ?

A: It's not Cake's fault - check your views and layouts to track down
any browser incompatibilities in the rendered HTML.


Martin

-- 
  Martin Schapendonk, [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Best Practices: Toggle Item In Element

2007-03-09 Thread phirschybar

Ok so I have a bunch of views, called by different controllers that
each reference the same element 'post'. Each controller passes a set
of parameters to the element via the renderElement('post', $data)
method. All the parameters are passed through $data and all is peachy.

However, ONE of the views has a special little parameter called
'ticker' passed through $data['ticker']. In my view I have set
$data['ticker'] = 1 to indicate that the little ticker should be shown
in the element only for this one view!

In my 'post' element I say:

if ($data['ticker']){
   // show that ticker!!!
}

Problem is that for ALL the other controllers-views I get a 'missing
index' for ticker. So, what I am asking is what is the best php5 /
cake practice for handling this. I would rather not have to define
$data['ticker'] in every other view or anywhere else. Is there a way
to define it in the element and then overwrite it on load (or
something). I am trying to determine the best, most agile practice for
this situation.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread phirschybar

findAll($conditions = null, $fields = null, $order = null, $limit =
null, $page = 1, $recursive = null);

You can specify the fields you want to return, along with conditions,
limits, just like any basic query.

On Mar 9, 7:39 am, Adrian Maier [EMAIL PROTECTED] wrote:
 On 3/9/07, phirschybar [EMAIL PROTECTED] wrote:



  Take a look at this article:
 http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-...

  Dealing with big fat arrays in Cake can be a struggle at first but
  using the Set::extract method can pull out a set of the data you need
  very elegantly. See how Felix also uses array_combine to get just a
  nice set of key/value pairs out a deeply nested array?

 Thanks for the link.
 However it seems to me that the article is dealing with another issue :
 this Set is another method of traversing an array and getting only some values
 from that tree.  But it still requires you to do a $users =
 $this-User-findAll().

 My issue is that i want to avoid the creation of that tree of arrays ,
 in order to
 reduce the memory footprint.

  Anyways I would use extract to get the data you need from Table 1 and
  then loop over the array and do your UPDATE queries on your second
  table.

 It looks like indeed it's not possible to fetch records the way i'd like. If i
 get into memory limitations  i'll just increase php's limit ...

 Cheers,
 Adrian Maier


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread Adrian Maier

On 3/9/07, phirschybar [EMAIL PROTECTED] wrote:

 Take a look at this article:
 http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/

 Dealing with big fat arrays in Cake can be a struggle at first but
 using the Set::extract method can pull out a set of the data you need
 very elegantly. See how Felix also uses array_combine to get just a
 nice set of key/value pairs out a deeply nested array?

Thanks for the link.
However it seems to me that the article is dealing with another issue :
this Set is another method of traversing an array and getting only some values
from that tree.  But it still requires you to do a $users =
$this-User-findAll().

My issue is that i want to avoid the creation of that tree of arrays ,
in order to
reduce the memory footprint.

 Anyways I would use extract to get the data you need from Table 1 and
 then loop over the array and do your UPDATE queries on your second
 table.


It looks like indeed it's not possible to fetch records the way i'd like. If i
get into memory limitations  i'll just increase php's limit ...


Cheers,
Adrian Maier

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Php + AJAX

2007-03-09 Thread Chris Hartjes

On 3/9/07, Mariano Iglesias [EMAIL PROTECTED] wrote:

 I'll answer if you answer me this question:

 How to drive a car?

 -MI


C'mon now Mariano, you know I'm the one who is supposed to giving out
the rude answers...


-- 
Chris Hartjes

My motto for 2007:  Just build it, damnit!

rallyhat.com - digital photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread The Mullet

Tarique is exactly right:
The term CakePHP is trademarked so you can be prevented from using
that for almost everything (including blog posts) *if* CSF wishes.

It is this ambiguity from CSF which I do not like.

Now, unless CSF decides to set up a public license which allows for
some basic use of the Name, CakePHP is unusable in a commercial
environment. Actually, right now CSF is even violating the MIT license
under which Cake is published: the MIT license allows for
redistribution of the Software, which I can't though, as the software
contains the word CakePHP all over, but I am not allowed to use this
word.

Now, to make this clear: I have total understanding if the CSF wants
to protect themselves against anyone who might abuse the term CakePHP
by giving the impression that he is certified, or his book is an
official Cake-Book or whatsoever. But a simple use of the word
CakePHP, stating My Company has used the CakePHP framework in so many
projects should be allowed.

Once again:
ACME is an officially licensed CakePHP-company should be forbidden
unless licensed by CSF.

ACME has produced software using the CakePHP framework should be
allowed.

CSF should provide such a statement with every copy of CakePHP. Unless
they do so, no company should seriously consider investing time in
this framework, because tomorrow CSF may decide it's time to cash in.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread Adrian Maier

On 3/9/07, phirschybar [EMAIL PROTECTED] wrote:

 findAll($conditions = null, $fields = null, $order = null, $limit =
 null, $page = 1, $recursive = null);

 You can specify the fields you want to return, along with conditions,
 limits, just like any basic query.

I am aware that i can select only some of the fields

My issue is that find / findAll :
- reads all the matching the records from the table
- stores all the values in memory
- returns a reference to that array
Let's exaggerate and assume that there are 20 million tuples in
the table:  findAll will create an array with 20 million elements , even
if i specify only 2 of the table's fields .

I'd like to :
- issue a query
- while (are records left in the query result) : get next record  and process it

In this case only the array containing the current record would be generated,
therefore I could process millions of records without needing them stored
in memory.



-- 
Adrian Maier

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread Sergei

cant you just try it?

-1 will fetch ONLY the fields of current model table, without any
associated data.


On 9 мар, 19:08, Adrian Maier [EMAIL PROTECTED] wrote:
  $this-Model-recursive=-1;

  before your -find query.

 -1 doesn't appear in the manual amongst the possible values of $recursive.
 What does it do exactly ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Page not refreshed after $this-redirect

2007-03-09 Thread Adrian Maier

Hello again,

When installing my application on a server  I have problems with
pages that are not refreshed after $this-redirect().

For example: a page displays several records, and each has a Delete
link.  The delete action deletes the records and then should re-generate
the page: $this-redirect(array('action'='index'), null, true);

The problem is that the page is not refreshed, and the deleted record is
still visible until i  click the browser's Refresh button.

This is happens only on my server (NetBSD, apache 2.0.55, php 5.2)
and it works on my workstation (Mandriva Linux, apache 2.2.3, php 4.4.4).

It's probably a configuration problem, but i have no idea where
to start investigating the problem.  Did anyone stumble across
similar problems ?



Thanks,
Adrian Maier

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Internal domain aliases yield 404 errors (cake thinks part of domain is a page/controller request?)

2007-03-09 Thread phrygius

I figured it out!

It was Isapi_rewrite at fault here.  I had RewriteCond Host
conditions before my rewrite rules that looked like domain(\.some
\.more\.stuff)?, and it was capturing that bit in parentheses as part
of the rewrite rules below.  By changing the condition to domain|
domain\.some\.more\.stuff, the capture has disappeared.

Thanks,
phrygius

On Mar 8, 3:33 pm, phrygius [EMAIL PROTECTED] wrote:
 Hello,

 I have an application being served on a closed, internal network with
 internal DNS.  I had a DNS entry, we'll call it domain, set up to
 point to my server (Windows server + IIS6).  In DNS, this means that I
 have domain, but I also have domain.some.more.stuff.  I am not
 sure why both exist, probably something to do with the complexity of
 this network (big company).  Either way, I set up IIS to handle both
 at the same web-site.

 When I navigate to http://domain/;, cake behaves wonderfully and as-
 expected, but when I navigate to http://domain.some.more.stuff/;, I
 get a *Cake* 404 error which says: Not found. The requested
 address .some.more.stuff was not found on this server.  I guess it
 begins okay because it gets far enough to get a Cake error message.

 So, is cake confused about the full domain?  Does anybody know why it
 would take part of the full domain this way?

 Thanks,
 phrygius


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



[no subject]

2007-03-09 Thread Yuriy Veremeyenko


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread Adrian Maier

On 3/9/07, Sergei [EMAIL PROTECTED] wrote:

 cant you just try it?

 -1 will fetch ONLY the fields of current model table, without any
 associated data.

Oh, I understand what you mean.   We are speaking of
different things :  you are telling me how to get no data at all.
While I want all the data , but in small chunks. Not all data
at once.


-- 
Adrian Maier

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Session ID changes

2007-03-09 Thread Mattijs

Though similar to some other problems, it seems I can't find a
solution... when changing pages in my Cake application the Session ID
changes, thus losing all stored session data. Is there a method of
observing the session object or such? finding out why the session is
reset? This also happens when trying 'database' as session storage.

The server: PHP Version 4.4.4.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Full Text Search

2007-03-09 Thread [EMAIL PROTECTED]

Does Cake support full text search in the find and findAll methods?
I'd like to add something like this as a condition:

$search = 'some words to find';
$conditions[] = array(MATCH column1 AGAINST ('$search'));
$conditions[] = array('Model.column2' = 'somevalue');

Assume that there would be multiple other normal conditions, as
above.  Does Cake support this?  I'd like to avoid using the query
method, and be able to exploit the simplicity of the findAll method.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Php + AJAX

2007-03-09 Thread Mariano Iglesias

I know I know, was just too damn tired to be nice :)

Sorry shafi for the snap

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Chris Hartjes
Enviado el: Viernes, 09 de Marzo de 2007 09:48 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Cake Php + AJAX

C'mon now Mariano, you know I'm the one who is supposed to giving out
the rude answers...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

Fabio,

After this email I seriously have a problem understanding you. As I told you
before, I can sympathize with someone when they are feeling sad or hopeless
(I have had my own share of sad moments), but your actions seem to be driven
by a need of making us come to bad conclusions against the CSF.

I am sure everyone had their share of mistakes, and frankly I'm no one to
judge. But I think the point was clear in that *no one* was getting anything
out of this public disclosure of personal emails.

As I told you before, WE DIDN'T have the idea that you screwed up, until you
so eloquently said you didn't. We didn't think you attacked anyone until,
while in the spirit of retaliation against an attack that never came, you
started criticizing members of the CSF.

I politely ask you to come to your senses and approach this as *if you were
not* a party involved in this issue. Just think of it as a member of the
community, reading all this bull on what *should be* a group to support
CakePHP's development, not to bury it in endless battles.

Just remember, there was no such thing as a part, until you started giving
the rest details about your conversations. Then you started making it
personal, and hell broke loose.

So with the respect that I have towards your previous CakePHP related
articles (that is as far as I know your work), please stop this
unprofessional, un-needed behavior so we can all move on.

Letting go, and moving on to the next battle is not such a bad idea. Trust
me, I know.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de h3raLd
Enviado el: Viernes, 09 de Marzo de 2007 09:16 a.m.
Para: Cake PHP
Asunto: Re: Cake Recipes cancelled

The bottom line is, both parts did mistakes during the course of the
project, I may have been a bit arrogant sometimes but I think my
reactions were justified by seeing, day after day, that the CSF didn't
seem to have a lot of interested in doing their part.

All I'd like is people to understand my part, and that I'm definitely
not the one to be blamed for the fact that the book wasn't published.
I did my best, sorry if it wasn't sufficient.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Full Text Search

2007-03-09 Thread djiize

Hello

For an old project, I did that:
$this-Document-findAll(MATCH (`Document`.`name`) AGAINST
('{$search_term}' IN BOOLEAN MODE))
and it works as any other findAll.

For multiple conditions, I can only say: try it ;)

On 9 mar, 16:06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Does Cake support full text search in the find and findAll methods?
 I'd like to add something like this as a condition:

 $search = 'some words to find';
 $conditions[] = array(MATCH column1 AGAINST ('$search'));
 $conditions[] = array('Model.column2' = 'somevalue');

 Assume that there would be multiple other normal conditions, as
 above.  Does Cake support this?  I'd like to avoid using the query
 method, and be able to exploit the simplicity of the findAll method.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread [EMAIL PROTECTED]

As ad7six said, this should be handled in your db if at all possible.
Assuming thats not possible, use limit and page arguments to work on a
small subset of the data at one time.  First execute a count to find
out how many records your dealing with, then loop through each subset.
Something like this:

$count = findCount($conditions);
$page = 0;
$limit=20; //set limit to any size, even 1
   //this is how many records you will have in memory at
any given time.

while(($page*$limit)  $count){
$page++;
$recs = findAll($conditions, $fields, $order, $limit, $page,
$recursive);
//now use a function call ror foreach to process your records
}

Good Luck,
cook

On Mar 9, 9:38 am, Adrian Maier [EMAIL PROTECTED] wrote:
 On 3/9/07, Sergei [EMAIL PROTECTED] wrote:



  cant you just try it?

  -1 will fetch ONLY the fields of current model table, without any
  associated data.

 Oh, I understand what you mean.   We are speaking of
 different things :  you are telling me how to get no data at all.
 While I want all the data , but in small chunks. Not all data
 at once.

 --
 Adrian Maier


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: help with windows install needed - php\php.exe instead of cake ROOT[Scanned]

2007-03-09 Thread Buckner, Mark

Not a problem.  I've been known to get impatient a time or two myself.
The cake group is normally really good/quick to respond to requests, but
sometimes things slip through the cracks.  My advice is, if you stick
with cake for long, start answering posts to the group.  That way, even
if gwoo, nate, mariano, chris, ad7six, or any of the other great guys on
the list can't/don't post, help is still available.

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jyrgen
Sent: Friday, March 09, 2007 5:43 AM
To: Cake PHP
Subject: Re: help with windows install needed - php\php.exe instead of
cake ROOT[Scanned]


thanks hydra,

and sorry for my impatience.

define('ROOT', 'e:'.DS.'programs'.DS.'apache'.DS.'htdocs'.DS.'cake');

didn't solve the problem. start page render flawlessly, links ($html-
link as
well as $html-submit) are all wrong. (see above).

as soon as i find the time, i'll dig into the cake core.  can
somebody
point me to direction (for example some class class that creates
urls ?
maybe the html helper is a good start...

cheers, jyrgen




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem using $form-create() with a model having var $useTable = false (cake 1.2)

2007-03-09 Thread jcsiegrist

I'm trying to implement a simple form to be used for emailing. I'm
using a model with var $useTable = false to take advantage of the
validation features.

Generally it works, the data is passing fine, but I get the php
warning:

Warning: array_combine() [function.array-combine]: Both parameters
should have at least 1 element in /path/to/cake/libs/view/helpers/
form.php on line 98

Since the model has no db it does not return any metadata, just an
empty array. So there should be a check for that in the formHelper
around

95: if(isset($object)) {
$fields = $object-loadInfo();
$data = array(
'fields' = 
array_combine($fields-extract('{n}.name'), $fields-
extract('{n}.type')),
'key' = $object-primaryKey,
'validates' = (ife(empty($object-validate), 
array(),
array_keys($object-validate)))
);
}

Or am I missing something? I would not beginn to know how to properly
patch it, so I'm hesitant to submit a ticket.

Has anyone successfully used the new formHelpers create() method with
models having no db?

Thanks,

:jc


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: New Cake FAQ

2007-03-09 Thread Mariano Iglesias

I've added some to the ticket.

Should I also post them here? I'm not sure if you were following the ticket
since no one seems to post on it, they are all writing on this thread :)

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Jueves, 08 de Marzo de 2007 12:43 a.m.
Para: Cake PHP
Asunto: New Cake FAQ

We're putting together an official CakePHP FAQ.  So add your
recommended frequently asked questions (and answers) here:

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


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP/SWFObject/Multiple Files

2007-03-09 Thread MrTufty

Hi guys...

I'm having a few issues, and I was hoping one of the more experienced/
knowledgeable people here could help me out.

On the website I'm currently developing, we have a Flash-based
location map showing all our clients sites. This Flash file is made up
of multiple movies, which each get loaded as you click around. This
map is loaded with the SWFObject javascript library, which I've
previously used to great effect in other sites, Cake-based and
otherwise.

When I use this outside Cake, it works correctly - but bringing it
into the Cake site, none of the sub-movies load, at all. I have a
feeling this is something to do with mod_rewrite, or something else
meaning Flash is looking in the wrong place for all the files.

My solution is to make the Flash file accept a parameter of where the
files are stored, but given it loads something like 80 different
movies, doing so will take a fair bit of work, so I'd prefer to avoid
giving our designer all the hassle :)

Has anyone else got experience with using Flash in Cake in this way,
or any ideas of other ways I can solve my problem?

Thanks in advance :)

Steve


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Fetching rows one by one

2007-03-09 Thread MrTufty

Nope, they definitely don't mean stored procedures. Cookxyz's answer
would seem to be the most appropriate for what you're trying to do, in
this case. It's how I'd do it, and it does avoid having several
thousand records in memory at once... it may not be the optimal way in
this case but we don't have a huge amount of detail on what you're
attempting to do.

Hope this helps anyway...

On Mar 9, 4:07 pm, Adrian Maier [EMAIL PROTECTED] wrote:
 On 3/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



  As ad7six said, this should be handled in your db if at all possible.

 I guess that's what the two of you are thinking when you say handle inside
 the db  are stored procedures, right?  It's not possible because the database
 is  MySql...



  Assuming thats not possible, use limit and page arguments to work on a
  small subset of the data at one time.  First execute a count to find
  out how many records your dealing with, then loop through each subset.
  Something like this:

  $count = findCount($conditions);
  $page = 0;
  $limit=20; //set limit to any size, even 1
 //this is how many records you will have in memory at
  any given time.

  while(($page*$limit)  $count){
  $page++;
  $recs = findAll($conditions, $fields, $order, $limit, $page,
  $recursive);
  //now use a function call ror foreach to process your records
  }

 Thanks.

 I am perfectly clarified :  it is not possible to do exactly how i
 hoped  ,  therefore i'll need to use a workaround.

 Thanks you all,
 Adrian Maier


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem using $form-create() with a model having var $useTable = false (cake 1.2)

2007-03-09 Thread nate

You either implement the loadInfo() method in your model so it returns
descriptions consistent with the fields you are using in your form.
Do pr($this-Model-loadInfo()); to get an idea of the format.

On Mar 9, 11:28 am, jcsiegrist [EMAIL PROTECTED] wrote:
 I'm trying to implement a simple form to be used for emailing. I'm
 using a model with var $useTable = false to take advantage of the
 validation features.

 Generally it works, the data is passing fine, but I get the php
 warning:

 Warning: array_combine() [function.array-combine]: Both parameters
 should have at least 1 element in /path/to/cake/libs/view/helpers/
 form.php on line 98

 Since the model has no db it does not return any metadata, just an
 empty array. So there should be a check for that in the formHelper
 around

 95: if(isset($object)) {
 $fields = $object-loadInfo();
 $data = array(
 'fields' = 
 array_combine($fields-extract('{n}.name'), $fields-extract('{n}.type')),

 'key' = $object-primaryKey,
 'validates' = (ife(empty($object-validate), 
 array(),
 array_keys($object-validate)))
 );
 }

 Or am I missing something? I would not beginn to know how to properly
 patch it, so I'm hesitant to submit a ticket.

 Has anyone successfully used the new formHelpers create() method with
 models having no db?

 Thanks,

 :jc


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Date field SQL error

2007-03-09 Thread Matt Adams

miggs wrote:


 Thanks a lot for the quick response.  I really appreciate it
 I tried to use beforeSave and it ended up getting rid of my sql error,
 but it would not save any data.  So I added
 
 if (empty($this-data['Story']['dateSend'])){
unset($this-data['Story']['dateSend']);
 }

Ensure that your use of beforeSave() returned true.  Not returning true 
would cause your model record save to be discarded.

-- 
BASIC: A programming language.  Related to certain social diseases
in that those who have it will not admit it in polite company.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Problem using $form-create() with a model having var $useTable = false (cake 1.2)

2007-03-09 Thread Mariano Iglesias

This is related to:

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

Try this. Change this:

$fields = $object-loadInfo();
$data = array(
'fields' = array_combine($fields-extract('{n}.name'), $fields-
extract('{n}.type')),
'key' = $object-primaryKey,
'validates' = (ife(empty($object-validate), array(),
array_keys($object-validate)))
);

To:

$fields = $object-loadInfo();

$data = array(
'fields' = ife((is_array($fields-value) 
isset($fields-value[0]), array_combine($fields-extract('{n}.name'),
$fields-
extract('{n}.type')), array()),
'key' = $object-primaryKey,
'validates' = (ife(empty($object-validate), array(),
array_keys($object-validate)))
);
}

If it works, submit a patch for it. 

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de jcsiegrist
Enviado el: Viernes, 09 de Marzo de 2007 01:29 p.m.
Para: Cake PHP
Asunto: Problem using $form-create() with a model having var $useTable =
false (cake 1.2)

I'm trying to implement a simple form to be used for emailing. I'm
using a model with var $useTable = false to take advantage of the
validation features.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Prevent double data in recursive find/findAll

2007-03-09 Thread David Pärsson

Hi,

I'm creating an application where i use a lot of belongsTo and hasMany
relations. It's kind of like a school. A school has many classes and
the classes belongs to the school. Every class has many students who
belong to the school.

Now when I in my application do a findAll on, let's say, a group with
a high recursion level, i.e. 5, the main structure resulting array
looks something like this: (I'm skipping the details that doesn't
matter)

Group = array(
   Student = array(
  Group = array(
 Student = array(
...
 )
 ...
  )
  ...
   )
   ...
)

The same group and the same students are fetched several times (using
different queries). Of course, with even more models (schools,
regions, ...), the amount of data fetched grows huge! This might not
have a very big impact on performance, but it sure doesn't feel
good. :)

My question is, is there a way to prevent that the same data is
fetched (and added to the results array) several times, without
lowering the recursion level?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bake fatal error

2007-03-09 Thread rtconner

Would you like to create the views for admin routing? (y/n)
[y]  n
PHP Fatal error:  Class 'Dispatcher' not found in C:\www\htdocs\cake
\cake\libs\error.php on line 58

Fatal error: Class 'Dispatcher' not found in C:\www\htdocs\cake\cake
\libs\error.php on line 58


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Error validation textarea?

2007-03-09 Thread Mech7

I am trying to make a contact form but for some reason the textarea
with the message does not give a warning when i put nothing in it?
Does anybody know why? here is my code.

Model contact.php:

?php
class Contact extends AppModel {
var $name = 'Contact';
// Let Cake know there is not a DB Table
var $useTable = false;
// Validators used
var $validate = array(
'name' = VALID_NOT_EMPTY,
'email' = VALID_EMAIL,
'subject' = VALID_NOT_EMPTY,
'message' = VALID_NOT_EMPTY
);
}
?

Controller contact_controller.php

?php
class ContactController extends AppController {
var $name = 'Contact';
// Use swift mailer component and ajax validator
var $components = array('SwiftMailer');

function index()
{
if ($this-Contact-validates($this-data))
{
// mail
}
}
}
?

View index.thtml

h1 class=titleContact form/h1
form method=post action=?php echo $html-url('/contact')?
class=contact-form
labelName:/label
?php echo $html-input('Contact/name', array('size' = '40'))?

?php echo $html-tagErrorMsg('Contact/name', 'Name is
required.') ?
labelEmail:/label
?php echo $html-input('Contact/email', array('size' =
'40'))?
?php echo $html-tagErrorMsg('Contact/email', 'Email is
required.') ?
labelSubject:/label
?php echo $html-input('Contact/subject', array('size' =
'40'))?
?php echo $html-tagErrorMsg('Contact/subject', 'Subject is
required.') ?
labelMessage:/label
?php echo $html-textarea('Conctact/message',
array('rows'='10', 'cols'='37')) ?
   ?php echo $html-tagErrorMsg('Contact/message', 'Message is
required.') ?
?php echo $html-submit('Save') ?
/form


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Problem using $form-create() with a model having var $useTable = false (cake 1.2)

2007-03-09 Thread Mariano Iglesias

Is this expected for all table-less models? If so implementing loadInfo()
would fix the related issue I sent on this thread.

And if that's the case, and before I submit an enhancement ticket, do you
think something like the following may be useful:

1. For table-less models, define a $fields on your model like so:

class Model extends AppModel
{
var $fields = array(
'email' = 'string',
'name' = 'string',
'message' = 'string'
);
}

2. Then on AppModel:

class AppModel
{
function loadInfo()
{
if ($this-useTable === false)
{
$defaults = array(
'null' = false,
'default' = null,
'length' = null
);

$fields = array();

foreach($this-fields as $field = $type)
{
$fields[] = am(array('name'=$field,
'type'=$type), $defaults);
}

return new Set($fields);
}

return parent::loadInfo();
}
}

This could be on CakePHP's built in AppModel, so developer has still the
choice to override loadInfo(), but if he/she doesn't, and they are dealing
with table-less models, then setting the $fields array is all they have to
do to get it right. If it is built in on cakephp, then it should go on
Model::loadInfo(), and instead of return parent::loadInfo() that would be
where normal code would be.

Then again, this is only useful if table-less models *need* to implement
loadInfo()

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Viernes, 09 de Marzo de 2007 01:55 p.m.
Para: Cake PHP
Asunto: Re: Problem using $form-create() with a model having var $useTable
= false (cake 1.2)

You either implement the loadInfo() method in your model so it returns
descriptions consistent with the fields you are using in your form.
Do pr($this-Model-loadInfo()); to get an idea of the format.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Parse Error on finderQuery

2007-03-09 Thread Mike Digital Egg

Hi,

I am getting an error when adding {$__cakeID__$} variable to my
finderQuery. If I replace that variable with a hard coded number then
it works fine, any ideas what the problem could be? It has me a bit
baffled.

'finderQuery'   =  SELECT `product_attributes_products`.`value`,
`ProductAttribute`.`id`, `ProductAttribute`.`name`,
`ProductAttribute`.`desc`, `ProductAttribute`.`created_by`,
`ProductAttribute`.`created`, `ProductAttribute`.`modified_by`,
`ProductAttribute`.`modified` FROM `product_attributes` AS
`ProductAttribute` JOIN `product_attributes_products` ON
`product_attributes_products`.`product_id` = {$__cakeID__$} AND
`product_attributes_products`.`product_attribute_id` =
`ProductAttribute`.`id` WHERE 1 = 1

This is the error message:

Parse error: parse error, unexpected ''

Help would be appreciated

Thanks

Mike


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread Mika

As far as I know they can't stop anyone talking or mentioning CakePHP
as per the 'Fair Use' defense. Check 
http://en.wikipedia.org/wiki/Fair_use_%28US_trademark_law%29


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread John David Anderson


On Mar 9, 2007, at 9:24 AM, Mariano Iglesias wrote:


 I've added some to the ticket.

 Should I also post them here? I'm not sure if you were following  
 the ticket
 since no one seems to post on it, they are all writing on this  
 thread :)

No need to duplicate the information. We'll make sure to gather info  
from both places.

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread anselm

Nate, we love you, stop complaining :)

I think such a FAQ should have a section dedicated to associations !
Here's some :


Q. Which model association should I use ?
A. CakePHP offers the following associations to link models together :
has many, has one,
belongs to, has and belongs to many. These have a clear semantic
meaning, and
you should be able to work out which you need by thinking about what
your models represent :

A city has many roads. A road belongs to a city. A post belongs to an
author. An author has many posts.
An organisation has one president. An organisation has and belongs to
many individuals.

Things worth keeping in mind :
* has one is just a special case of has many ;
* belongs to is the converse of has many/has one (if A has many
B then B belongs to A)



Q. I've worked out which associations to use - which table should I
put the association field in ?
A. The easy way is to look at the has many relationship. Clearly, if
A has many B you don't want
an infinite number of fields in A -- so the field making the
relationship goes in B (A_id).
has one is just a special case of has many, and belongs to is
the converse of has many -
so if D belongs to E, then you put a field E_id in D.


I'll add some more when I have some time :)
Anselm


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Mech7

Also there should be in how to work with Ajax.. retrieving data, form
validation, making it degradable, accesiable.. right now there is
nothing about Ajax in the manuel :(


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread rtconner

I'm pretty much a noob. I just started on cakePHP 2 days ago.

Biggest questions so far...

Problem 1: Make a Hello World Application. I found nothing like this,
just messed around with things and figuered it out eventually.

Problem 2: Make a Hello World Application which connects to the
database. The blog tutorial was great, its a good thing I had no idea
that it existed until I had figuered it out already.

Problem 3: My practice application had the commonly used date fields
in it. Any system worth its weight in anything would have some
automated date handling. It took me forever to find a way to  easily
handle dates.

I'm still learning. But its not been easy to get started at all.
Nothing seems to have gone right. I guess, my biggest problem was
locating tutorials on how to get started on basic functions. It seems
they exist, I did not know they were there at all though.

-Rob


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-09 Thread nate

Oh yes we can.  If you write a book about Cake, mention Cake in your
blog, record a conversation with a friend or family member in which
Cake is mentioned, or make any pastries in the likeness of our logo,
we will hunt you down and confiscate all your worldly posessions under
the Digital Millenium Copyright Act.  Furthermore, we will ransack
your home and torch your town.

We Are Watching You.
Our Spies Are Everywhere.
Freedom Through Obedience.

On Mar 9, 1:13 pm, Mika [EMAIL PROTECTED] wrote:
 As far as I know they can't stop anyone talking or mentioning CakePHP
 as per the 'Fair Use' defense. 
 Checkhttp://en.wikipedia.org/wiki/Fair_use_%28US_trademark_law%29


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prevent double data in recursive find/findAll

2007-03-09 Thread Jon Bennett

 My question is, is there a way to prevent that the same data is
 fetched (and added to the results array) several times, without
 lowering the recursion level?

check out http://bakery.cakephp.org/articles/view/183 (or one of the
other variants).

What I would do is:

// set recursive level
$this-Group-recursive = 1;
// unbind all associations except the Student model
$this-Group-unbindAll(array('hasMany'=array('Student')));
// unbind all assocations from the Student model to avoid
$this-Group-Student-unbindAll();
// grab records
$groups = $this-Group-findAll();

hth

jon

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prevent double data in recursive find/findAll

2007-03-09 Thread Jon Bennett

  My question is, is there a way to prevent that the same data is
  fetched (and added to the results array) several times, without
  lowering the recursion level?

 check out http://bakery.cakephp.org/articles/view/183 (or one of the
 other variants).

 What I would do is:

 // set recursive level
 $this-Group-recursive = 1;
 // unbind all associations except the Student model
 $this-Group-unbindAll(array('hasMany'=array('Student')));
 // unbind all assocations from the Student model to avoid
 $this-Group-Student-unbindAll();
 // grab records
 $groups = $this-Group-findAll();

I meant recursive = 2 sorry!

hth

jon

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem using $form-create() with a model having var $useTable = false (cake 1.2)

2007-03-09 Thread jcsiegrist

I tried something like that too, but couldn't get it to work. Your
suggested patch also still throws the same warning. Right now I just
avoided using the $form-create() and just set the form by hand,
which is fine also.

Somehow all the checks on the status of $fields on line 98 of the
formHelper didn't work, even though a print_r only shows $fields-
value as an empty array it should be easy. Probably overlooking
something obvious I'll take another stab at it later this weekend or
so. But right now I have a site to bake

cheers

:jc

On 9 Mrz., 17:54, Mariano Iglesias [EMAIL PROTECTED]
wrote:
 This is related to:

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

 Try this. Change this:

 $fields = $object-loadInfo();
 $data = array(
 'fields' = array_combine($fields-extract('{n}.name'), 
 $fields-extract('{n}.type')),

 'key' = $object-primaryKey,
 'validates' = (ife(empty($object-validate), array(),
 array_keys($object-validate)))
 );

 To:

 $fields = $object-loadInfo();

 $data = array(
 'fields' = ife((is_array($fields-value) 
 isset($fields-value[0]), array_combine($fields-extract('{n}.name'),
 $fields-extract('{n}.type')), array()),

 'key' = $object-primaryKey,
 'validates' = (ife(empty($object-validate), array(),
 array_keys($object-validate)))
 );

 }

 If it works, submit a patch for it.

 -MI

 ---

 Remember, smart coders answer ten questions for every question they ask.
 So be smart, be cool, and share your knowledge.

 BAKE ON!

 blog:http://www.MarianoIglesias.com.ar

 -Mensaje original-
 De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
 de jcsiegrist
 Enviado el: Viernes, 09 de Marzo de 2007 01:29 p.m.
 Para: Cake PHP
 Asunto: Problem using $form-create() with a model having var $useTable =
 false (cake 1.2)

 I'm trying to implement a simple form to be used for emailing. I'm
 using a model with var $useTable = false to take advantage of the
 validation features.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakePHP and Version control Poll

2007-03-09 Thread Sonic Baker
Hi Martin, AD7six

Thanks very much for your responses. Very much appreciated.

Sonic

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with windows install needed - php\php.exe instead of cake ROOT[Scanned]

2007-03-09 Thread jyrgen

Thanks Mark,

i'll try out what you suggested. In the meantime i've put the app
on a remote server and check it there.
But i'm too curious about what might causing this, and i wouldn't
be the first time that trace the code, my way of contribution to
this fantastic framework.
i'll let guys know..
jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP/SWFObject/Multiple Files

2007-03-09 Thread Sam Sherlock
I would expect the base param to solve your issues.

I have'nt had any and have always been setting the base param.

I put my swf's inside a folder in webroot called 'flash'

then I set a javascript variable with $this-webroot  eg

var strBase = '?php  echo ($this-webroot); ?';

- S

On 09/03/07, MrTufty [EMAIL PROTECTED] wrote:


 Hi guys...

 I'm having a few issues, and I was hoping one of the more experienced/
 knowledgeable people here could help me out.

 On the website I'm currently developing, we have a Flash-based
 location map showing all our clients sites. This Flash file is made up
 of multiple movies, which each get loaded as you click around. This
 map is loaded with the SWFObject javascript library, which I've
 previously used to great effect in other sites, Cake-based and
 otherwise.

 When I use this outside Cake, it works correctly - but bringing it
 into the Cake site, none of the sub-movies load, at all. I have a
 feeling this is something to do with mod_rewrite, or something else
 meaning Flash is looking in the wrong place for all the files.

 My solution is to make the Flash file accept a parameter of where the
 files are stored, but given it loads something like 80 different
 movies, doing so will take a fair bit of work, so I'd prefer to avoid
 giving our designer all the hassle :)

 Has anyone else got experience with using Flash in Cake in this way,
 or any ideas of other ways I can solve my problem?

 Thanks in advance :)

 Steve


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread haj

Q: What really is vendors and how do I use it? (benefits explanation
in a big picture with simple damn example)
Q: What really is components? (manual explanation doesn't clearly
explain me what it is and why they exists)
Q: How can split big controller files (or other type files) and
manage?
Q: Some concrete example of why something should go pages rather
than layouts
Q: Where should I implement a model function which lays on several
tables? (asking a good practice)
Q: Any target date for 1.2, or is it stable enough to use in
relatively serious real world biz app?

Those are questions obviously from a new learner but the manual
doesn't explain why they're there and for what etc..


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem using $form-create() with a model having var $useTable = false (cake 1.2)

2007-03-09 Thread jcsiegrist

this works great! But I think the formHelper create() method should
still be fixed. Or maybe not if there s a standard way for defining
the metadata by hand. Actually I guess that could be very useful. The
maybe one could even use something like a scaffold on db-less models?

:jc

On 9 Mrz., 18:30, Mariano Iglesias [EMAIL PROTECTED]
wrote:
 Is this expected for all table-less models? If so implementing loadInfo()
 would fix the related issue I sent on this thread.

 And if that's the case, and before I submit an enhancement ticket, do you
 think something like the following may be useful:

 1. For table-less models, define a $fields on your model like so:

 class Model extends AppModel
 {
 var $fields = array(
 'email' = 'string',
 'name' = 'string',
 'message' = 'string'
 );

 }

 2. Then on AppModel:

 class AppModel
 {
 function loadInfo()
 {
 if ($this-useTable === false)
 {
 $defaults = array(
 'null' = false,
 'default' = null,
 'length' = null
 );

 $fields = array();

 foreach($this-fields as $field = $type)
 {
 $fields[] = am(array('name'=$field,
 'type'=$type), $defaults);
 }

 return new Set($fields);
 }

 return parent::loadInfo();
 }

 }

 This could be on CakePHP's built in AppModel, so developer has still the
 choice to override loadInfo(), but if he/she doesn't, and they are dealing
 with table-less models, then setting the $fields array is all they have to
 do to get it right. If it is built in on cakephp, then it should go on
 Model::loadInfo(), and instead of return parent::loadInfo() that would be
 where normal code would be.

 Then again, this is only useful if table-less models *need* to implement
 loadInfo()

 -MI

 ---

 Remember, smart coders answer ten questions for every question they ask.
 So be smart, be cool, and share your knowledge.

 BAKE ON!

 blog:http://www.MarianoIglesias.com.ar

 -Mensaje original-
 De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
 de nate
 Enviado el: Viernes, 09 de Marzo de 2007 01:55 p.m.
 Para: Cake PHP
 Asunto: Re: Problem using $form-create() with a model having var $useTable
 = false (cake 1.2)

 You either implement the loadInfo() method in your model so it returns
 descriptions consistent with the fields you are using in your form.
 Do pr($this-Model-loadInfo()); to get an idea of the format.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with windows install needed - php\php.exe instead of cake ROOT[Scanned]

2007-03-09 Thread hydra12

If you find out what's wrong, please post it here so I can see what
happened.  I'll be away from my computer for about a week - it's
spring break in Texas, and I'm taking my youth group on a trip - but
I'll check it when I get a chance.

hydra12 (Mark)

On Mar 9, 1:20 pm, jyrgen [EMAIL PROTECTED] wrote:
 Thanks Mark,

 i'll try out what you suggested. In the meantime i've put the app
 on a remote server and check it there.
 But i'm too curious about what might causing this, and i wouldn't
 be the first time that trace the code, my way of contribution to
 this fantastic framework.
 i'll let guys know..
 jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Security-requireAuth funktionality broken? (cake 1.2)

2007-03-09 Thread jcsiegrist

Hi,

I'm trying out the requireAuth functionality for the Security
component. I use requirePost and requireAuth as stated in the Manual.
But even cutting out the token key it always passes through even
though it shouldn't, the request should be blackholed. After adding
some debug()s in the SecurityComponent around line 165 I discovered im
never entering the check. The reason is the !empty($controller-
params['form'] check on line 165. This key is empty using the cake
1.2 forms. All the data from the post is in the params['data]. The
['form'] never seems to get anything for me.

I'm obviously overlooking something or is the functionality broken in
1.2?

my form code looks like this:

form action=/contact/sendanfrage method=post
id=ContactAddForm

?php //echo $form-hidden('_Token/key') ?
?php echo $form-input('Contact/name', array('label'='Name')) ?
?php echo $form-input('Contact/vorname',
array('label'='Vorname')) ?
?php echo $form-input('Contact/email', array('label'='Email')) ?
?php echo $form-submit('Abschicken');?

/form

I commented the tokenkey out for testing. I needed to manually put the
token hidden field in, because I couldn't use the normal $form-
create() method of 1.2, because that is in turn broken for models
without a db (as I posted here earlier today)

Anyone any ideas of how to patch the problem or work around it?

:jc


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Samuel DeVore

As a foot note on the tutorial, I just ran through it again using a
virgin install of http://mamp.info/  (Mac version of lamp) and it
worked perfectly from what I could tell.  I tried to do a screen cast
of it but my copy of Snapz totally crapped out writing the file.

Sam D

On 3/9/07, haj [EMAIL PROTECTED] wrote:

 rtconner:

 I think the blog tutorial pretty much satisfies problem 1 and 2.
 Then it is a problem of the tutorial not getting big attention for the
 beginner...

 On Mar 9, 1:49 pm, rtconner [EMAIL PROTECTED] wrote:
  I'm pretty much a noob. I just started on cakePHP 2 days ago.
 
  Biggest questions so far...
 
  Problem 1: Make a Hello World Application. I found nothing like this,
  just messed around with things and figuered it out eventually.
 
  Problem 2: Make a Hello World Application which connects to the
  database. The blog tutorial was great, its a good thing I had no idea
  that it existed until I had figuered it out already.
 
  Problem 3: My practice application had the commonly used date fields
  in it. Any system worth its weight in anything would have some
  automated date handling. It took me forever to find a way to  easily
  handle dates.
 
  I'm still learning. But its not been easy to get started at all.
  Nothing seems to have gone right. I guess, my biggest problem was
  locating tutorials on how to get started on basic functions. It seems
  they exist, I did not know they were there at all though.
 
  -Rob


 



-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



SelectTag + Unicode (hebrew) UTF-8 not displaying

2007-03-09 Thread jteran

Hi, I'm using $html-selecttag to create a menu in different
languages, according to a session variable. When I choose Hebrew, it
just display fixed html instead of hebrew chars. Any way to bypass
this? On the links I've got this same issue, but using parameter
escapeTitle fixed the problem and displyed a proper link.

Ideas?

Thanks, Jaime


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Flame On! DB recommendations

2007-03-09 Thread [EMAIL PROTECTED]

I'm in the planning stage of what will hopefully become my first non-
trivial web app.  I'm trying to minimize future pain resulting from
poor planning, and have been reading up on DB trivia.

If I use MySQL, how do I choose between MyISAM and InnoDB?  What are
the trade-offs?  It seems InnoDB is the way to go if I want to handle
rollbacks and such, but MyISAM may produce considerably shorter query
times.  Is this true?

Should I use PostreSQL instead?  I find the popularity of MySQL
comforting, but the PostreSQL crowd has some convincing zealots.

At the end of the day, I'm not doing anything too complicated, and I
just want to minimize DB-related stress in the long run.

Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Security-requireAuth funktionality broken? (cake 1.2)

2007-03-09 Thread jcsiegrist

this is why the params['form'] is empty:

in dispatcher parseParams() starting line 416 the params['form']
['data'] gets moved into params['data'] leaving params['form'] empty.

if (isset($params['form']['data'])) {
$params['data'] = $params['form']['data'];
unset($params['form']['data']);
}

I guess I'll submit a ticket for the security component on line 165

from:
if (is_array($this-requireAuth)  !empty($this-requireAuth)  !
empty($controller-params['form']))

to

if (is_array($this-requireAuth)  !empty($this-requireAuth))

but that still doesn't help with the different token key problem
between $form-create hidden field output and what is put into the
session.

:jc


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SelectTag + Unicode (hebrew) UTF-8 not displaying

2007-03-09 Thread Michael Rubanov
Are you generating dropdown's from database ?

On 3/9/07, jteran [EMAIL PROTECTED] wrote:


 Hi, I'm using $html-selecttag to create a menu in different
 languages, according to a session variable. When I choose Hebrew, it
 just display fixed html instead of hebrew chars. Any way to bypass
 this? On the links I've got this same issue, but using parameter
 escapeTitle fixed the problem and displyed a proper link.

 Ideas?

 Thanks, Jaime


 



-- 
Best Regards,

Michael Rubanov.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Sam Sherlock

 1: Make a Hello World Application.



Yep and perhaps the  title should be

We knew you were coming so we baked a cake!

then links to documentation, faq's

furthermore how about

An example app could be a included with the download ready to copy to an app

directory and sql to insert with phpmyadmin.

this app would display documentation for cakePHP and credits to the core
minds of cakePHP.
it could be a simple interactive demo which a newbie to cake would be
invited and code to edit and where it is and you can delete and reinstall it
- great for trial and error




On 09/03/07, rtconner [EMAIL PROTECTED] wrote:


 I'm pretty much a noob. I just started on cakePHP 2 days ago.

 Biggest questions so far...

 Problem 1: Make a Hello World Application. I found nothing like this,
 just messed around with things and figuered it out eventually.

 Problem 2: Make a Hello World Application which connects to the
 database. The blog tutorial was great, its a good thing I had no idea
 that it existed until I had figuered it out already.

 Problem 3: My practice application had the commonly used date fields
 in it. Any system worth its weight in anything would have some
 automated date handling. It took me forever to find a way to  easily
 handle dates.

 I'm still learning. But its not been easy to get started at all.
 Nothing seems to have gone right. I guess, my biggest problem was
 locating tutorials on how to get started on basic functions. It seems
 they exist, I did not know they were there at all though.

 -Rob


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Mech7

I think it should also cover cake sessions, how to handle cake session
user validation acl etc..


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

Sounds too bushy ;)

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Viernes, 09 de Marzo de 2007 03:49 p.m.
Para: Cake PHP
Asunto: Re: Cake Recipes cancelled

We Are Watching You.
Our Spies Are Everywhere.
Freedom Through Obedience.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cake Recipes cancelled

2007-03-09 Thread Mariano Iglesias

 It seems to me that a few individuals are mis-understanding
 our words and have a general mis-understanding of trademark policy.

That was exactly my point, and I think such a document would help others
avoid confusion. Confusion so high that some people even thought CSF lawyers
were going to hunt them down if they mention CakePHP to a friend on the
privacy of their homes.

I mean the CSF is not a record label company :)

 But the more I have to do this, the less I have time to work on the
 thing that matters most, CakePHP.

What about appointing people for areas, such as writing documents about
trademark protection or marketing decisions (regarding website), that are
not *core PHP* oriented?

 This is a community built on the trust of everyone to
 do their part.

And some of us try to :)

 The MIT license covers the copyright on the code

The day I found CakePHP and discovered it was licensed under MIT was the day
that I felt in love with it. MIT license simply rocks.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread Samuel DeVore

Also as people are pointed to articles in the bakery they should get a
'faq' tag that can also be linked too (perhaps sorted by rating and
views)  like http://bakery.cakephp.org/tags/view/faq

Sam D

On 3/9/07, Mech7 [EMAIL PROTECTED] wrote:

 I think it should also cover cake sessions, how to handle cake session
 user validation acl etc..


 



-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SelectTag + Unicode (hebrew) UTF-8 not displaying

2007-03-09 Thread jteran

Hi Michael

nope, In the controller first I call generatelist() method, to create
the array..


On 9 mar, 18:37, Michael Rubanov [EMAIL PROTECTED] wrote:
 Are you generating dropdown's from database ?

 On 3/9/07, jteran [EMAIL PROTECTED] wrote:



  Hi, I'm using $html-selecttag to create a menu in different
  languages, according to a session variable. When I choose Hebrew, it
  just display fixed html instead of hebrew chars. Any way to bypass
  this? On the links I've got this same issue, but using parameter
  escapeTitle fixed the problem and displyed a proper link.

  Ideas?

  Thanks, Jaime

 --
 Best Regards,

 Michael Rubanov.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: For every model every database table also?

2007-03-09 Thread Louie Miranda
BTW, the views/pages/about works fine though, but if i wanted to be able to
do domain/about then i need to use the controller?

On 3/10/07, Louie Miranda [EMAIL PROTECTED] wrote:

 How would i do that here?

 about_controller.php
 ?php

 class AboutController extends AppController
 {
 var $name = 'About';

 function index()
 {
  //$this-set('abouts', $this-About-findAll());
 }

 }

 ?

 --
 Louie Miranda ([EMAIL PROTECTED])
 http://www.axishift.com

 //JSM-W




-- 
Louie Miranda ([EMAIL PROTECTED])
http://www.axishift.com

//JSM-W

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---