Advanced Installation

2007-05-10 Thread MrTufty

Hi guys,

I know I'm probably being really really thick, but I can't get my head
around something. I've been using Cake for months now - on my own
site, and also for sites at work.

All the sites at work are set up as just standard installations, with
the files unpacked inside htdocs. They work fine, no problems at all.

My personal site is installed slightly differently, with htdocs being
alongside the other folders (I originally followed the advanced
installation tutorials on the Wiki, and wanted to keep the application
files out of public access).

Now though, I want to move things around. I've recently added a couple
of extra domains to my server, so I've done some reorganisation to
make them all easier to manage. That's fine, except Cake breaks. This
is how I've got it set up at the minute, below that is how I want it
to be.

NOW:
/
/app
/cake
/htdocs
/vendors
/site_a
---/htdocs
/site_b
---/htdocs

FUTURE
/
/site_a/
---/app
---/cake
---/htdocs
---/vendors
/site_b/
---/app
---/cake
---/htdocs
---/vendors
/site_c/
---/app
---/cake
---/htdocs
---/vendors

As you can see I'm intending on using Cake for all the sites. I'll
probably at some point want to share the Cake files but I decided to
keep them separate for now.

What I get at the moment when I attempt to set up Cake in this
structure is a whole load of Page Not Found errors. I'm guessing
the .htaccess files are redirecting to the wrong places, but I've
checked them and I'm not seeing the problem. I've also tried changing
the index.php in htdocs (which SHOULD be the one that's getting
called, and indeed from my tests it does seem to be). All I get in
that case is errors about not being able to find config/core.php, or
cake/bootstrap.php.

I suspect I may not be changing the paths correctly, or making my
changes to the wrong file, because everything I've done seems to be
ok. Perhaps it's how my host is handling the redirections internally.

Any advice is appreciated!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Auto Complete

2007-05-10 Thread afindie

Hi all,

New Cake here, I tried the auto complete tutorials with Nate.
But I couldn't make it working.
I think i am just missing some of the helpers?

var $helpers = array('Html', 'Javascript', 'Ajax');

Which I don't have any of them, help?

thanks

andy.


--~--~-~--~~~---~--~~
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: Fancy File Delete

2007-05-10 Thread Joshua McFarren

Check out Marco's reply to my similar question here. Use the
beforeDelete method in your model:

http://groups.google.com/group/cake-php/browse_thread/thread/fcf9368c5e7e4b86/b97aabc8e020edfc

Second to last in the thread.


--~--~-~--~~~---~--~~
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: Need help for pushing CakePHP for a high traffic project

2007-05-10 Thread Dr. Tarique Sani

On 5/11/07, PD <[EMAIL PROTECTED]> wrote:

> I am pushing for cake to be used in one very large project which is
> going to be extremely high traffic. Probably around 50,000 hits at a
> time. I need some more information regarding the scaling and

By at a time you mean 50,000 concurrent users? What kind of server
setup will the project have?

and do remember High performance and Scalable are not the same :)

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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: invalidate() - can you set a message?

2007-05-10 Thread Dr. Tarique Sani

On 5/11/07, Greg Cerveny <[EMAIL PROTECTED]> wrote:
>
> I've been toying with invalidate to do custom error handling for a
> password change form and I've run into some confusion.
>
> One example in which I'm calling invalidate is...
>

Switch over to version 1.2 if the app is not already live and mission critical.
All your wishes will come true :)

Not only will you be able to set custom error message with invalidate
but you can do away with the $html->tagErrorMsg() thing. It is all
automagically managed for you.

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Langdon Stevenson

Hi Grant

>> In that example what I have found is that I tend to break the
>> functionality down into smaller pieces that (for instance) just update
>> small pieces of the view, or manipulate sections of the data.
> 
> Ahh, I see what you mean.  Not so much more complex actions for Ajax,
> rather more specific actions.  I imagine when we get serious about
> filling out the Ajax UI we will do the same - the popup bubble of
> details would be a different view (and perhaps action), than when you
> click for the full details to be shown.

Spot on :-)

Langdon

--~--~-~--~~~---~--~~
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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Grant Cox

> In that example what I have found is that I tend to break the
> functionality down into smaller pieces that (for instance) just update
> small pieces of the view, or manipulate sections of the data.

Ahh, I see what you mean.  Not so much more complex actions for Ajax,
rather more specific actions.  I imagine when we get serious about
filling out the Ajax UI we will do the same - the popup bubble of
details would be a different view (and perhaps action), than when you
click for the full details to be shown.


--~--~-~--~~~---~--~~
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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Langdon Stevenson

Hi Grant

>> Sure.  The apps that I have created that use AJAX use it to combine
>> - A production Batch
>> -- Its Operations
>> --- Each Operation's Inputs and Outputs
>>  Each Output's Storage Instances
>> The best comparison would be something like Windows Explorer with the
>> tree displayed on the left, versus Explorer without the tree.
> 
> Certainly, and I use Ajax for similar uses.  However, from your
> original post I understood that you often found the need to create
> Ajax specific controller actions - and for the above setup I can't see
> that the controller actions should be anything more than the CRUD
> needed for normal HTML views.

In that example what I have found is that I tend to break the 
functionality down into smaller pieces that (for instance) just update 
small pieces of the view, or manipulate sections of the data.

If I am honest about it, I would have to agree that there is a lot of 
what looks like pretty straight forward CRUD in there, so you may well 
be right.

The thing that strikes me though is that to the AJAX interface really 
can't be replicated at all easily with a non-ajax version.  The AJAX 
interface gives a lot of context to the user that is necessary for 
making decisions.  Without that context the non-AJAX version would have 
to supply a lot of extra information for each request to allow the 
interface to be fully re-displayed and the user to see what they needed.

The upshot of this is that my AJAX actions are smaller and less 
complicated than they might otherwise be.


>> Reading the above I got a strong feeling of complexity.  I use Cake to
>> try to speed up my development and maintenance of web applications.
>> Therefore I am very reluctant to complicate things.
> 
> I understand your point of view.  In this case I had two motivators -
> it is still undecided whether this app will have a Flash or Ajax UI,
> and it is likely that a plain text version is also required (for those
> without flash/js).  Also, many of our smaller cake apps fit into this
> - usually having a Flash UI with a HTML admin.  Previously this has
> involved creating almost duplicate controller actions for these two,
> one to render and another to return to flash.
> This new method allows our current app (and any new ones) to support
> all four request types with a minimum of change from "standard cake" -
> just using _response() instead of any render(), redirect() or return
> calls.
> 
> Ack, now it feels like I'm defending it.  Rather, do you have any
> suggestions for a simpler approach?  I agree that it would be simpler
> to keep the normal methods (render, redirect, return), and perhaps
> some kind of post-processor to then decide whether the request type
> actually wants the data in a different format.  Perhaps it would be
> best if any redirects were actually handled through a render call - as
> the RequestHandler already has functionality to change the render
> paths based on request format...

Short answer is no I can't really suggest a simpler way :-(  Given your 
criteria I suspect that a certain level of complication is inevitable 
(just MVC has some inherent complexity).  I almost sounds like you want 
another layer between the Controller and the View that manipulates the 
Controller's output for the requested view.  In a way, this sounds a lot 
like what you are doing already.

I can't imagine that the above has helped you that much! But you have 
made me think too, which is a good thing :-)

Regards,
Langdon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



cPanel folder structure issue with .htaccess solution

2007-05-10 Thread laptop

hi all,

was just struggling to figure out how to do this in a shared
environment with cPanel.

subdomain files are placed inside a directory inside where the www
domain files are located this means that the subdomain
test.example.com will be available www.example.com/test

placing a .htaccess file for cake to work meant that it applied to
test.example.com and i was getting server errors.

following is a code snipped which allows you to restrict to just that
database

RewriteCond %{HTTP_HOST} ^www\.novanate\.com$
RewriteRule^$ app/webroot/[L]
RewriteCond %{HTTP_HOST} ^www\.novanate\.com$
RewriteRule(.*) app/webroot/$1 [L]


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Discussion on cake-apps-sites-in-the-wild

2007-05-10 Thread kiwin

You can also add my site.
 www.yafn.cn

it built on Cake.



--~--~-~--~~~---~--~~
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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Grant Cox

Hi Langdon,

> Sure.  The apps that I have created that use AJAX use it to combine
> - A production Batch
> -- Its Operations
> --- Each Operation's Inputs and Outputs
>  Each Output's Storage Instances
> The best comparison would be something like Windows Explorer with the
> tree displayed on the left, versus Explorer without the tree.

Certainly, and I use Ajax for similar uses.  However, from your
original post I understood that you often found the need to create
Ajax specific controller actions - and for the above setup I can't see
that the controller actions should be anything more than the CRUD
needed for normal HTML views.


> Reading the above I got a strong feeling of complexity.  I use Cake to
> try to speed up my development and maintenance of web applications.
> Therefore I am very reluctant to complicate things.

I understand your point of view.  In this case I had two motivators -
it is still undecided whether this app will have a Flash or Ajax UI,
and it is likely that a plain text version is also required (for those
without flash/js).  Also, many of our smaller cake apps fit into this
- usually having a Flash UI with a HTML admin.  Previously this has
involved creating almost duplicate controller actions for these two,
one to render and another to return to flash.
This new method allows our current app (and any new ones) to support
all four request types with a minimum of change from "standard cake" -
just using _response() instead of any render(), redirect() or return
calls.

Ack, now it feels like I'm defending it.  Rather, do you have any
suggestions for a simpler approach?  I agree that it would be simpler
to keep the normal methods (render, redirect, return), and perhaps
some kind of post-processor to then decide whether the request type
actually wants the data in a different format.  Perhaps it would be
best if any redirects were actually handled through a render call - as
the RequestHandler already has functionality to change the render
paths based on request 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
-~--~~~~--~~--~--~---



You are not authorized to view this page - on localhost using uniserver

2007-05-10 Thread rtanz

hi i am trying to set up cakephp on my localhost, i am using
uniserver. what i did was make a directory /cake in the uniserver root
www folder, then copy the extracted cakephp files into this folder.
however whenever i access this folder i get the following message:

You are not authorized to view this page
You might not have permission to view this directory or page using the
credentials you supplied.



If you believe you should be able to view this directory or page,
please try to contact the Web site by using any e-mail address or
phone number that may be listed on the localhost home page.

You can click  Search to look for information on the Internet.




HTTP Error 403 - Forbidden
Internet Explorer


how can i solve this? thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Reverse Engineer to UML?

2007-05-10 Thread Tobias Parent

Hey, all -
 I've got a Cake app I wrote a while back, and now the client has asked 
for a UML diagram, to present to their new in-house IT guy. I, however, 
never generated UML diagrams on it back then, and I need to 
reverse-engineer one now (I've forgotten some of what I did for them, as 
I haven't worked on that app in a good long while).

 Any ideas or suggestions for a quick way of automagically doing 
something like this?

 Thanks!
 -Toby

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



advantages of production setup?

2007-05-10 Thread laptop

hi all,

what are the advantages of a production setup?? is it ok to just leave
it in development mode??

craig


--~--~-~--~~~---~--~~
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: Use php in js files?

2007-05-10 Thread cdomigan

I think you can just rename the .js file to .php.

Or you could just assign it to a js var before you include your js
script.

On May 11, 7:27 am, hydra12 <[EMAIL PROTECTED]> wrote:
> I'm using jquery and ext.js to build a user interface.  When a page
> loads, I have a ext.js menu loading at the top with new, edit and
> delete options.  I want to click edit on the menu and have my page
> reload in editable form via ajax.  Here's my problem:  the new button
> works fine, but I can't get my edit button to work.  How can I pass
> the page's id from php to javascript?  Here's what I have, and it
> won't work since it's being loaded from a js file:
>
> $("#center1").load('/transportation/tickets/edit/id;?
>
> >');
>
> Any ideas?


--~--~-~--~~~---~--~~
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

2007-05-10 Thread peterhf

How do I set one specific option as "SELECTED"?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Beginner's question, about model

2007-05-10 Thread Ming

Hi there,

I am new to cake and I have several questions. :)

>From the blog tutorial:
1)

. Does ['Post'] here refer to the $name var?

2) In the controller, I have $this->set('posts',$this->Post-
>findAll());

Where does this 'posts' come from? Does the Post in $this->Post refer
to the data model named Post or the var $name with name Post?

3)

In view, I have 

The question is the same, does the Post here refer to the data model
named Post or the var $name with name Post?

Thanks a lot

Ming


--~--~-~--~~~---~--~~
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: Elements vs requestAction

2007-05-10 Thread Sliv

Tane's Bakery Article:

http://bakery.cakephp.org/articles/view/optimizing-your-cakephp-elements-and-views-with-caching

On May 10, 4:06 pm, gerhardsletten <[EMAIL PROTECTED]> wrote:
> Hi Tane
>
> Is it possible to cache an spesific element in 1.1 or is it a new
> function in 1.2? Can you give us an example?
>
> On May 9, 4:00 am, "Tane Piper" <[EMAIL PROTECTED]>
> wrote:
>
> > I actually like to mix the two.  What I find best is to create an
> > element, and put the rA() inside it.  Then I can use element caching
> > to speeding things up, and reduce the load.
>
> > Of course, you may find that when you update data on your site, these
> > elements don't update right away - what you need to do is in your
> > model, in the afterSave method is to use the PHP function unlink() and
> > delete the cached element.
>
> > Tane
>
> > On 5/8/07, buzznut <[EMAIL PROTECTED]> wrote:
>
> > > As I have been working on my app, I find myself using elements quite
> > > often. I am wondering what the advantage/disadvantage is to just using
> > > a $this->requestAction call in a view and using the normal view file
> > > associated with the action instead of creating an element.
>
> > > Thanks for any comments or feedback.


--~--~-~--~~~---~--~~
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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Langdon Stevenson

Hi Grant

> Langdon - I am still in two minds as to whether a non-Javascript
> version is really necessary.  Because if it is, then I'll need to
> write some alternative functionality in some places.  But being able
> to use the app on my mobile phone really does sounds neat.
> Can you expand on what Ajax specific actions you may create?

Sure.  The apps that I have created that use AJAX use it to combine 
multiple forms or functions into one page.  This allows the user to see 
(and manipulate) multiple layers of information in one screen like:

- A production Batch
-- Its Operations
--- Each Operation's Inputs and Outputs
 Each Output's Storage Instances

and so on.

The best comparison would be something like Windows Explorer with the 
tree displayed on the left, versus Explorer without the tree.

With the tree you can drill down into you file system without having to 
change the whole screen.  Ajax can help you deliver this kind of 
functionality in an application.

Without the tree you are only seeing one directory at a time.  This is 
much more like the kind of functionality that a non-ajax application is 
limited/suited to.


> The vast
> majority of our controllers just have CRUD actions, so there is very
> little difference whether the action is called from Ajax or a normal
> form submission.  

Given that situation (and I have one the same in the big app I am 
working on at the moment) then I just revert to non-ajax.  The 
performance benefit would be minimal since I would still be rendering 
most of the page.

Also I don't see a benefit to the client and to me in complicating the 
development and maintenance of the site to support AJAX where it isn't 
really required.  The only reason that I would do so would be to 
maintain consistent behavior in the interface (which may be reason 
enough of course).


> Anyway, as for the method that I've currently employed.  This is
> working well, but I would appreciate any comments as to how this
> method would / wouldn't be appropriate for your own applications.
> 
> The problem identified is that while the actual functionality of a
> controller action should be the same no matter how it was called, each
> UI may expect a different format response (ie rendered HTML,
> redirects, JSON, AMF).  A simple example of a common action would be:



> The disadvantage to this approach is that there are bound to be fringe
> cases where something non-standard needs to happen, for one particular
> UI.  And this will mean either adding options to the passed array, or
> adding UI request type checks to the actual actions...  I'm
> particularly interested if this looks like it could not work with your
> app.

Reading the above I got a strong feeling of complexity.  I use Cake to 
try to speed up my development and maintenance of web applications. 
Therefore I am very reluctant to complicate things.

I would want to have a very good business case before I built in so much 
complexity, which as you say is likely to have boundary cases that 
aren't covered.

My personal opinion is: if it is not explicitly required by the project 
for its success, then don't include it.  All it will do is make your 
maintenance and modification harder down the track.

Hope that this might be useful :-)

Regards,
Langdon








--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Need help for pushing CakePHP for a high traffic project

2007-05-10 Thread PD

Hi Nate,

I am a fan of cake and have used it in the following production site
that I build last december. www.lowimpactliving.com

I am pushing for cake to be used in one very large project which is
going to be extremely high traffic. Probably around 50,000 hits at a
time. I need some more information regarding the scaling and
performance to present my case to the board. Could you also let me
know some sample sites that are high traffic? Because the Board likes
to see real numbers and real sites.

This is a great chance for our community to be proudly involved. Could
you please help me out here?

Thank you.

Regards,
Pranav


--~--~-~--~~~---~--~~
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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Langdon Stevenson

Hi Samuel

>>> and is more likely to work when javascript is disabled ;)
 >>
>> This is meant to be a dig at me? :-)
>>
> 
> Not at all, I was simply trying to say that if one develops the
> non-ajax workflow first.  It is more likely that as one adds ajax to
> the flow that things will continue to work even when javascript is
> off.  Also it helps in that one takes away one degree of complexity
> when building up the app to a functional state.  Not a dig, but a
> brief and unhelpful supporting note ;)

No worries :-)  I was just got a bit confused.  I see your point now, 
and agree with it whole heartedly.

Regards,
Langdon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



invalidate() - can you set a message?

2007-05-10 Thread Greg Cerveny

I've been toying with invalidate to do custom error handling for a
password change form and I've run into some confusion.

One example in which I'm calling invalidate is...

if(md5($this->data['User']['password']) != $someone['User']['password']) {
$this->User->invalidate('User/password');
}

This stops the form from saving, but does not invoke the default error
msg for the field (created by tagErrorMsg())...

Old Password:
password('User/password', array('size' => 20)); ?>
tagErrorMsg('User/password', 'error')?>


Is it supposed to invoke the default message?

Is there a way to set the message that the associated tagErrorMsg() displays?

--~--~-~--~~~---~--~~
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: In-depth Model Tutorials

2007-05-10 Thread Jon Bennett

On 5/10/07, Sliv <[EMAIL PROTECTED]> wrote:
>
> https://trac.cakephp.org/milestone/2.0.0.x
>
> "Change Models to return object instances instead of arrays

this has come up many times whilst I've been on this list (over 12
months now I reckon!), and the usual response is that php (especially
v4) handles objects quite poorly, but handles arrays extremely well,
hence the decision to go with arrays (AFAIK).

I would love to know though, what are the benefits of:

echo $obj->property

vs

echo $data['property']

for what it's worth, I've recently tried to get my head around an
Actionscript 2 (flash) framework called PixLib
http://osflash.org/projects/pixlib , which has a lot going on in
models, and Commands with a single FrontController, and it took me a
long time to get my head around the differences between it and
CakePHP.

cheers,

jb

--~--~-~--~~~---~--~~
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: error handling style

2007-05-10 Thread Greg Cerveny

Definitely helps.

Generally speaking though, do you could an else statement in
regardless if it doesn't need the view or message setting just for
styles sake?

2007/5/10, Gonzalo Servat <[EMAIL PROTECTED]>:
>
>
> On 5/10/07, Greg Cerveny <[EMAIL PROTECTED]> wrote:
> >
> > Which is better?
> >
> > if ($this->User->save($this->data)){
> > $this->flash('Password updated, please login
> again.','/users/logout');
> > } else {
> > $this->render();
> > }
> >
> > or just:
> >
> > if ($this->User->save($this->data)){
> > $this->flash('Password updated, please login
> again.','/users/logout');
> > }
> >
> > It seems to have the same functionality.
>
> It'll have the same functionality as long as there is no error saving the
> user data. If there is an error saving the data to the DB (for whatever
> reason that may be), the user will see whatever view corresponds to the
> action you're calling without an error message, so I would suggest if you're
> going to do that, you do a setFlash first to let the user know that their
> new password was not updated.
>
> Hope this helps.
>
> Regards,
> Gonzalo
>  >
>

--~--~-~--~~~---~--~~
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 updating from 1.1.13.4450 to 1.1.14.4797

2007-05-10 Thread Roger

Hi all,

I have been trying to update from version 1.1.13.4450 to 1.1.14.4797
and ran into troubles. Looks like my application specific
inflector.php is not included because with the newer version a model
with a uninflected name can not be found.

Any ideas?

Thanks,
Roger


--~--~-~--~~~---~--~~
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: Elements vs requestAction

2007-05-10 Thread gerhardsletten

Hi Tane

Is it possible to cache an spesific element in 1.1 or is it a new
function in 1.2? Can you give us an example?

On May 9, 4:00 am, "Tane Piper" <[EMAIL PROTECTED]>
wrote:
> I actually like to mix the two.  What I find best is to create an
> element, and put the rA() inside it.  Then I can use element caching
> to speeding things up, and reduce the load.
>
> Of course, you may find that when you update data on your site, these
> elements don't update right away - what you need to do is in your
> model, in the afterSave method is to use the PHP function unlink() and
> delete the cached element.
>
> Tane
>
> On 5/8/07, buzznut <[EMAIL PROTECTED]> wrote:
>
>
>
> > As I have been working on my app, I find myself using elements quite
> > often. I am wondering what the advantage/disadvantage is to just using
> > a $this->requestAction call in a view and using the normal view file
> > associated with the action instead of creating an element.
>
> > Thanks for any comments or feedback.


--~--~-~--~~~---~--~~
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: error handling style

2007-05-10 Thread Gonzalo Servat
On 5/10/07, Greg Cerveny <[EMAIL PROTECTED]> wrote:
>
>
> Which is better?
>
> if ($this->User->save($this->data)){
> $this->flash('Password updated, please login
> again.','/users/logout');
> } else {
> $this->render();
> }
>
> or just:
>
> if ($this->User->save($this->data)){
> $this->flash('Password updated, please login
> again.','/users/logout');
> }
>
> It seems to have the same functionality.


It'll have the same functionality as long as there is no error saving the
user data. If there is an error saving the data to the DB (for whatever
reason that may be), the user will see whatever view corresponds to the
action you're calling without an error message, so I would suggest if you're
going to do that, you do a setFlash first to let the user know that their
new password was not updated.

Hope this helps.

Regards,
Gonzalo

--~--~-~--~~~---~--~~
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 handling style

2007-05-10 Thread Greg Cerveny

Which is better?

if ($this->User->save($this->data)){
$this->flash('Password updated, please login again.','/users/logout');
} else {
$this->render();
}

or just:

if ($this->User->save($this->data)){
$this->flash('Password updated, please login again.','/users/logout');
}

It seems to have the same functionality.

--~--~-~--~~~---~--~~
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: redirection, rendering, or manually setting a view?

2007-05-10 Thread Greg Cerveny

Nice, that makes a lot of sense.

Since I'm writing the error message to the session anyway, there is no
reason to not forward.

I switched my code to:

$this->Session->setFlash('Validation failed.');
$this->redirect('../pages/home');
exit(); 

2007/5/10, AD7six <[EMAIL PROTECTED]>:
>
>
>
> On 10 mayo, 00:13, soytuny <[EMAIL PROTECTED]> wrote:
> > You can render the home view with
> >
> > $this->render('../pages/home');
> >
>
> IMO that's a bad habit that shouldn't be propogated - the unwary may
> think it's an equivalent to using requestAction and will start doing
> $this->render('../products/index'); wondering why there are lots of
> errors on the page.
>
> A better idea would be to simply redirect - if for whatever reason you
> don't want the url to change you could do something like the
> following:
>
> //controller code
> $this->set('requestUrl','/pages/home');
> $this->viewPath = "_generic"; // <- making cake look in the folder /
> app/views/_generic
> $this->render('pseudo_redirect');
>
> // /app/views/_generic/pseudo_redirect.thtml
> requestAction($requestUrl,array('return'); ?>
>
> But again: it would be simpler to just redirect.
>
> 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: Ajax and Pagination...I broke it

2007-05-10 Thread Stacey

Ok, this is probably starting to go off topic. But, after some more
playing around, I think it may be some kind of caching issue. It's not
just the first page that causes a problem. It seems to be centered
around the original link that is loaded in IE.

Ex. If I load '/mysite/conditions/?page=3', it loads the page and
pagination correctly. I can click on any of the page links and it uses
Ajax to correctly render the page...but, if I click on the link for
page 3, it is not using Ajax and reloads the entire page layout in the
div. I checked this by putting if ($this->RequestHandler->isAjax()) in
the controller's index function. How do I avoid this?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Use php in js files?

2007-05-10 Thread hydra12

I'm using jquery and ext.js to build a user interface.  When a page
loads, I have a ext.js menu loading at the top with new, edit and
delete options.  I want to click edit on the menu and have my page
reload in editable form via ajax.  Here's my problem:  the new button
works fine, but I can't get my edit button to work.  How can I pass
the page's id from php to javascript?  Here's what I have, and it
won't work since it's being loaded from a js file:

$("#center1").load('/transportation/tickets/edit/id;?
>');

Any ideas?


--~--~-~--~~~---~--~~
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 Session expiring problems...

2007-05-10 Thread joel

On Mar 19, 3:04 pm, "Andre" <[EMAIL PROTECTED]> wrote:
> So, since I'm trying to build a blog application, this could be a
> problem, because if a session expires while I'm still writing my
> article, as soon as I press the submit button all of my work becomes
> dust.

Andre, I got through this a while back by using this neat trick.  I
don't know how you have your authentication setup, but here's the
concept, and you can work it into your code.

Basically, you want to capture whatever is stored in $this->data (aka,
$_POST) and keep it around until you login again.  That way, you can
safely enter whatever you want into any form, take as long as you
want, and safely submit your form.  This trick will take you to your
login page, and then redirect you to the page you were trying to go
to, but this time, submit all your form data.

When you check to see if the current user is logged in, and then you
find out they're not, store both the destination ($this->here) and the
post data ($this->data) in two session variables.  Then redirect to
the login page.  Now, after you log back in, redirect to the original
destination, and when that page loads, check to see if there is any
post data stored in the session.  If so, assign $this->data the post
data, and you'll be all set.

It might take some working through to make it work right, but I got it
to work, and all of that in my app_controller and a little bit of
beforeFilter() magic.  Good luck!


--~--~-~--~~~---~--~~
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: In-depth Model Tutorials

2007-05-10 Thread chrislewis

Awesome! I hadn't seen that before.

On May 10, 2:52 pm, Sliv <[EMAIL PROTECTED]> wrote:
> https://trac.cakephp.org/milestone/2.0.0.x
>
> "Change Models to return object instances instead of arrays"
>
> On May 10, 2:34 pm, chrislewis <[EMAIL PROTECTED]> wrote:
>
> > A seemingly common misconception regarding MVC is that models just
> > hold data. This is incorrect. To use a buzzword, models represent
> > 'business models' - conceptual entities that are part of a specific
> > problem domain. So if your business/problem is a store of sorts, some
> > business models might be the  shopping cart, cart items, shopper,
> > order, etc. Business models don't just hold data - they should
> > represent the concept as a whole, and group functionality with data -
> > this is central to object oriented design. A cart then may supply
> > certain obvious data members that map directly to database fields,
> > such as the cart items, total quantity, etc. There may also be
> > functionality that make sense for the cart to supply. An example may
> > be an empty() method that purges all the items from the cart, or
> > tally() which might give a sum of the price of all contained items.
> > In my opinion, the cake's perspective of 'models' is its biggest
> > weakness. Yes, you can add methods to models that make contextual
> > sense, but it's difficult to achive any useful form of encapsulation
> > because cake's models don't really encapsulate anything! Cake models
> > represent themselves and simplistic arrays of scalar data ($this->data), 
> > and as such it requries that you know the structure, field
>
> > names and all, of any piece of data you want, whereever/whenever you
> > want it.
> > This is not at all object oriented. An object oriented 'model'
> > declares a contract - an interface - to anyone that wishes to use it.
> > This interface is simply its type, methods (method signatures), and
> > any public properties. The world should _never_ know/care how the
> > model handles its internal composition - that's the model's business.
> > Instead it should hide all this nonsense and simply state - if you
> > want my name, ask me - model->getName(). If you want my full name, ask
> > me - model->getFullName().
> > You shouldn't know/care whether or not name is a database field; if
> > whole name is a field or a dynamic concatenation of other fields (like
> > firstName and lastName). This is why we have encapsulation.
> > Controllers on the other hand should almost exclusively interpret/
> > execute commands on models based on user input from the views(s).
> > Cake's perspective of controllers seems pretty sane IMO.
>
> > I know the pain you're experiencing with the controller/model method
> > issue. Cake does not really impose good design for larger apps. I'd
> > wager the opposite in fact, and I credit most of this to it's
> > perspective on models. It can be corrected I think - and cake does
> > succeed in providing a pleasant, structured framework for web apps.
> > This is why Ive started a cakeforge project to help fix this model
> > problem in an unintrisive manner. If anyone is interested, check out
> > Object Model:http://cakeforge.org/projects/object-model/. There's a
> > small amount of very early code up at the moment, but i just started
> > and am developing in the context of a cake app Im working on. Here's a
> > controller and view snippet that show the difference when using object
> > model:
>
> > //controller home() action
> > function home() {
> > //Notice the method call; ofindAll() instead of findAll()
> > $this->set('posts', $this->Post->ofindAll());
> > }
>
> > //View code that enumerates $posts. Notice that we are not
> > interacting with post object data using cake model names
> > //as hash keys. $posts contains Post objects - NOT cake data arrays.
> > So instead of using typical cake-style access:
> > //$posts[$i]['Post']['title'];
> > //we can access it as an object like so:
> > //$posts[$i]->title;
>
> > 
> >  > for($i = 0; $i < count($posts); $i++) {
> > e("
> > 
> >  > class='title'>{$posts[$i]->title}
> >  > class='date'>".$sjcc->summaryDate($posts[$i]->created)." > div>
> >  > class='summary'>{$posts[$i]->body}
> > 
> > ");
> > if($i < count($posts) - 1) {
> > e('');
> > }
> > }
> > ?>
> > 


--~--~-~--~~~---~--~~
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 fro

Re: Ajax and Pagination...I broke it

2007-05-10 Thread Stacey

Sorry...I forgot about that. Now, I have everything working properly.
The only problem left is that there seems to be an issue with the Ajax
updates on IE. From what I can gather, every page that has a link like
'mysite/conditions/?page=x' works correctly, but if it's the first
page the link looks like this 'mysite/conditions' and it seems to
reload the whole page into the div and I end up with a sort of
'domino' effect.

I know it's an issue in my code, because the same thing does not
happen in your demo. I'm just trying to get an idea of where to look.

On May 10, 11:27 am, AD7six <[EMAIL PROTECTED]> wrote:
> On May 10, 4:46 pm, Stacey <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hmm, this could be a problem. Why are there two Event.observe for the
> > same div with different id's? Would this be causing the 'tabcontent1'
> > div not to update?
>
> > 
> > Results: 1-20 of 24<< 1 |
>
> >  > onclick=" return false;">2
>
> > Event.observe('link24171', 'click',
> > function(event){ new Ajax.Updater('tabcontent1','/mysite/search/
> > results/a/?page=2', {asynchronous:true, evalScripts:true,
> > requestHeaders:['X-Update', 'tabcontent1']}) }, false);
>
> >  > onclick=" return false;">>>
>
> > Event.observe('link26853', 'click',
> > function(event){ new Ajax.Updater('tabcontent1','/mysite/search/
> > results/a/?page=2', {asynchronous:true, evalScripts:true,
> > requestHeaders:['X-Update', 'tabcontent1']}) }, false);
>
> > 
> > 
>
> read from "Take note (from the demo) that..." in the previous 
> threadhttp://groups.google.com/group/cake-php/msg/ecff301f7cd90eca


--~--~-~--~~~---~--~~
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: In-depth Model Tutorials

2007-05-10 Thread Sliv

https://trac.cakephp.org/milestone/2.0.0.x

"Change Models to return object instances instead of arrays"

On May 10, 2:34 pm, chrislewis <[EMAIL PROTECTED]> wrote:
> A seemingly common misconception regarding MVC is that models just
> hold data. This is incorrect. To use a buzzword, models represent
> 'business models' - conceptual entities that are part of a specific
> problem domain. So if your business/problem is a store of sorts, some
> business models might be the  shopping cart, cart items, shopper,
> order, etc. Business models don't just hold data - they should
> represent the concept as a whole, and group functionality with data -
> this is central to object oriented design. A cart then may supply
> certain obvious data members that map directly to database fields,
> such as the cart items, total quantity, etc. There may also be
> functionality that make sense for the cart to supply. An example may
> be an empty() method that purges all the items from the cart, or
> tally() which might give a sum of the price of all contained items.
> In my opinion, the cake's perspective of 'models' is its biggest
> weakness. Yes, you can add methods to models that make contextual
> sense, but it's difficult to achive any useful form of encapsulation
> because cake's models don't really encapsulate anything! Cake models
> represent themselves and simplistic arrays of scalar data ($this->data), and 
> as such it requries that you know the structure, field
>
> names and all, of any piece of data you want, whereever/whenever you
> want it.
> This is not at all object oriented. An object oriented 'model'
> declares a contract - an interface - to anyone that wishes to use it.
> This interface is simply its type, methods (method signatures), and
> any public properties. The world should _never_ know/care how the
> model handles its internal composition - that's the model's business.
> Instead it should hide all this nonsense and simply state - if you
> want my name, ask me - model->getName(). If you want my full name, ask
> me - model->getFullName().
> You shouldn't know/care whether or not name is a database field; if
> whole name is a field or a dynamic concatenation of other fields (like
> firstName and lastName). This is why we have encapsulation.
> Controllers on the other hand should almost exclusively interpret/
> execute commands on models based on user input from the views(s).
> Cake's perspective of controllers seems pretty sane IMO.
>
> I know the pain you're experiencing with the controller/model method
> issue. Cake does not really impose good design for larger apps. I'd
> wager the opposite in fact, and I credit most of this to it's
> perspective on models. It can be corrected I think - and cake does
> succeed in providing a pleasant, structured framework for web apps.
> This is why Ive started a cakeforge project to help fix this model
> problem in an unintrisive manner. If anyone is interested, check out
> Object Model:http://cakeforge.org/projects/object-model/. There's a
> small amount of very early code up at the moment, but i just started
> and am developing in the context of a cake app Im working on. Here's a
> controller and view snippet that show the difference when using object
> model:
>
> //controller home() action
> function home() {
> //Notice the method call; ofindAll() instead of findAll()
> $this->set('posts', $this->Post->ofindAll());
> }
>
> //View code that enumerates $posts. Notice that we are not
> interacting with post object data using cake model names
> //as hash keys. $posts contains Post objects - NOT cake data arrays.
> So instead of using typical cake-style access:
> //$posts[$i]['Post']['title'];
> //we can access it as an object like so:
> //$posts[$i]->title;
>
> 
>  for($i = 0; $i < count($posts); $i++) {
> e("
> 
>  class='title'>{$posts[$i]->title}
>  class='date'>".$sjcc->summaryDate($posts[$i]->created)." div>
>  class='summary'>{$posts[$i]->body}
> 
> ");
> if($i < count($posts) - 1) {
> e('');
> }
> }
> ?>
> 


--~--~-~--~~~---~--~~
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: ajax in cakephp

2007-05-10 Thread junal

use Ajax helper...
http://manual.cakephp.org/chapter/helpers

On May 9, 3:30 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi,
> I am new to cakephp. i want to use AJAX with cakephp. but i am
> finding it difficult can anyone help me .
>
> Thanks


--~--~-~--~~~---~--~~
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 Firefox Redirect Error

2007-05-10 Thread [EMAIL PROTECTED]

Like Andy says, this problem could be because of the page keeps
redirecting to itself, hence causing a loop.

On May 9, 1:28 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On 9 mayo, 12:00, RLR <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi I have discovered a problem with my app and would like to know if
> > there is a solution...
>
> > When I browse my app with firefox I get this error regardless of Mac
> > or Pc version (1.5.0.10)
>
> > The page isn't redirecting properly
> > Firefox has detected that the server is redirecting the request for
> > this address in a way that will never complete.
> > *   This problem can sometimes be caused by disabling or refusing
> > to accept
> >   cookies."
>
> > All other browsers work fine (IE6, Safari etc.). I double checked
> > cookies and javascript settings both are enabled.
>
> > Thanks!
> > RLR
>
> Try this,
>
> !) change the first line of your webroot index to be "  php" (deliberate white space before  2) enable debug
> 3) if necessary put pr (debug_backtrace()); die; somewhere useful in
> your code (like in the controller redirect method)
>
> In this way you'll see some error messages and the redirect loop you
> currently have won't be possible and you can find out why your code is
> redirecting all the time. If you put debug code in the cake folder -
> remember to remove all traces of your presence when you resolve the
> issue ;).
>
> 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: In-depth Model Tutorials

2007-05-10 Thread chrislewis

A seemingly common misconception regarding MVC is that models just
hold data. This is incorrect. To use a buzzword, models represent
'business models' - conceptual entities that are part of a specific
problem domain. So if your business/problem is a store of sorts, some
business models might be the  shopping cart, cart items, shopper,
order, etc. Business models don't just hold data - they should
represent the concept as a whole, and group functionality with data -
this is central to object oriented design. A cart then may supply
certain obvious data members that map directly to database fields,
such as the cart items, total quantity, etc. There may also be
functionality that make sense for the cart to supply. An example may
be an empty() method that purges all the items from the cart, or
tally() which might give a sum of the price of all contained items.
In my opinion, the cake's perspective of 'models' is its biggest
weakness. Yes, you can add methods to models that make contextual
sense, but it's difficult to achive any useful form of encapsulation
because cake's models don't really encapsulate anything! Cake models
represent themselves and simplistic arrays of scalar data ($this-
>data), and as such it requries that you know the structure, field
names and all, of any piece of data you want, whereever/whenever you
want it.
This is not at all object oriented. An object oriented 'model'
declares a contract - an interface - to anyone that wishes to use it.
This interface is simply its type, methods (method signatures), and
any public properties. The world should _never_ know/care how the
model handles its internal composition - that's the model's business.
Instead it should hide all this nonsense and simply state - if you
want my name, ask me - model->getName(). If you want my full name, ask
me - model->getFullName().
You shouldn't know/care whether or not name is a database field; if
whole name is a field or a dynamic concatenation of other fields (like
firstName and lastName). This is why we have encapsulation.
Controllers on the other hand should almost exclusively interpret/
execute commands on models based on user input from the views(s).
Cake's perspective of controllers seems pretty sane IMO.

I know the pain you're experiencing with the controller/model method
issue. Cake does not really impose good design for larger apps. I'd
wager the opposite in fact, and I credit most of this to it's
perspective on models. It can be corrected I think - and cake does
succeed in providing a pleasant, structured framework for web apps.
This is why Ive started a cakeforge project to help fix this model
problem in an unintrisive manner. If anyone is interested, check out
Object Model: http://cakeforge.org/projects/object-model/. There's a
small amount of very early code up at the moment, but i just started
and am developing in the context of a cake app Im working on. Here's a
controller and view snippet that show the difference when using object
model:

//controller home() action
function home() {
//Notice the method call; ofindAll() instead of findAll()
$this->set('posts', $this->Post->ofindAll());
}


//View code that enumerates $posts. Notice that we are not
interacting with post object data using cake model names
//as hash keys. $posts contains Post objects - NOT cake data arrays.
So instead of using typical cake-style access:
//$posts[$i]['Post']['title'];
//we can access it as an object like so:
//$posts[$i]->title;



{$posts[$i]->title}
".$sjcc->summaryDate($posts[$i]->created)."
{$posts[$i]->body}

");
if($i < count($posts) - 1) {
e('');
}
}
?>



--~--~-~--~~~---~--~~
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: Lumad CMS / (Cupcake)

2007-05-10 Thread rhet

> On May 10, 3:01 pm, luke BAKING barker <[EMAIL PROTECTED]> wrote:
>
> > Hey well done on thisCupcake/ Lumad CMS - looks quite elegant and
> > simple.

Luke you were able to get this installed with the latest cake version?
I'm having difficulty installing, I"m getting 404 errors. Any help
would be appreciated.

>I'm also planning to write a developer's manual, documenting every
>custom model, view and controller of CupCake, with the intention to
>turn it into educational material to help teach CakePHP newbies on
>real world apps. (I also have to improve my home site with demos and
>tutorials.)

Jason-

When do you think the new functionality you mentioned will be ready?


--~--~-~--~~~---~--~~
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 Firefox Redirect Error

2007-05-10 Thread RLR

Thanks for your reply AD, I will try that.


--~--~-~--~~~---~--~~
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 read problem

2007-05-10 Thread Michael Augustyniak

in core.php
define('CAKE_SESSION_SAVE', 'php');

trying to write the class object into session
$this -> Session -> write('construct',new 
TextConstruct($this->params['data']['Email']['body']) );

and it works because I can ready it from the same function
$this->set('WordsAsStyle', $this -> Session -> 
read('construct')->grabWordsAs('Style'));

but can not read from other function previously declared in other function

There is more cake settings or doing wrong ?

I was trying set define('CAKE_SESSION_SAVE', 'cake'); either

Thanks for help

--~--~-~--~~~---~--~~
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: Group By when using array conditions

2007-05-10 Thread DJ Spark

 that would be a nice improvement, i think.
 maybe such query would return an array like this:

$this->User->findAll($condtitions.' GROUP BY User.name')

Array (
 'User.name' => array(
   'John' => array(
 [0] => (the row here)
 [1] => (the row here)
 [2] => (the row here)
   ),
   'Carl' => array(
 [0] => (the row here)
 [1] => (the row here)
   )
  )
)

  Is it possible to do a model behaviour, for example ?

  spark

On 5/10/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> On 10 mayo, 12:48, floepi <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > can someone please tell me how i can group in my SQL query when i am
> > using an array as condition for the findAll.
>
> You can't (afaik) - you need to use a string constraint. Do you need a
> group by though, would a sort not suffice?
>
> > $this->User->findAll($condtitions.' GROUP BY User.name')
>
> Well... even if it was possible to use GROUP by with an array
> constraint php doesn't let you concatonate a string onto the end of an
> array like that, all you'll get as a result is "array GROUP BY...".
>
> hth,
>
> AD
>
>
> >
>


-- 
[livesets] http://djspark.com.br/
[web] http://synapsisdi.com.br

--~--~-~--~~~---~--~~
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: findallthreaded to get nested posts in a thread

2007-05-10 Thread Greg

Solution found in thread:
http://groups.google.com/group/cake-php/browse_thread/thread/94ec5a3d33f2a935/ba469c8c052674b8?lnk=gst&q=findAllThreaded&rnum=1#ba469c8c052674b8

On May 10, 8:42 am, Greg <[EMAIL PROTECTED]> wrote:
> CakePHP version: 1.2.0.4986alpha
>
> I tried using findAllThreaded in my Post model to retrieve a tree of
> nested posts within a thread, where my Post model is self-joined (i.e.
> parent_id is the id of another Post).  The problem is, findAllThreaded
> only returns the ParentPost and the ChildPost, with the children array
> empty.  When I increase the Model::recursive value, I then get a
> deeper nesting, but what if I don't know how deep the nesting goes?
> Basically, how can I use findAllThreaded to retrieve the entire tree
> of nested posts?  (or is there an entirely different way of going
> about this?)
>
> In case it helps, here are my Post model associations:
>
> var $hasMany = array(
> 'ChildPost' => array(
>   'className' => 'Post',
>   'conditions' => '',
>   'order' => 'created',
>   'limit' => '',
>   'foreignKey' => 'parent_id',
>   'dependent' => false,
>   'exclusive' => false,
>   'finderQuery' => '')
>   );
>
> var $belongsTo = array(
> 'ParentPost' => array(
>   'className' => 'Post',
>   'conditions' => '',
>   'order' => '',
>   'foreignKey' => 'parent_id')
>   );
>
> When I call $this->Post->findAllThreaded('Post.id = 1') from my
> controller, the output is this:
>
> Array
> (
> [0] => Array
> (
> [Post] => Array
> (
> [id] => 1
> [parent_id] =>
> )
> [ParentPost] => Array
> (
> [id] =>
> [parent_id] =>
> )
> [ChildPost] => Array
> (
> [0] => Array
> (
> [id] => 2
> [parent_id] => 1
> )
>
> )
> [children] => Array
> (
> )
> )
> )
>
> However, there are about 7 other posts associated with this thread.
> So, rather than setting my recursive value to 7 (which uses up all the
> memory), how can I retrieve all posts from that thread using CakePHP's
> features?
>
> Thanks,
> Greg


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Partially OT] Request for Advice and Job Offer

2007-05-10 Thread [EMAIL PROTECTED]

I am putting together a team to build both a web site and a native
application (OS to be determined) for a digital printer.

Very briefly, the application is to run on the kiosks located
physically in
the printer's store. I presume most evolters are familiar with such
systems.

The site is to provide the same basic functionality (a subset in
reality) as
the kiosk software.

Both systems allow users to upload images, edit them (somewhat) and
then
print them on various media with various options. The detailed
specifications of both systems are presently being developed.

The "Job Offer" part is that any interested parties can contact me
ASAP with
a letter and resume.  :)

The "Request for Advice" part is that I have been involved solely in
web
development for many years now. For whatever reasons, this opportunity
has
been presented to me now for application development. If anyone can
recommend to me OFFLINE other resources (lists/forums) where I might
be able
to find capable and reliable talent to build the application part, I
would
appreciate that.

Thank you,
Fred


--~--~-~--~~~---~--~~
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: is anyone using Acl and AuthComponent in 1.2

2007-05-10 Thread Tribastian



On 26 Apr., 07:09, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I was just wondering if anyone is successfully using cakephpAcland
> the new AuthComponent in 1.2?
>
> If so, could you give us mortals some guidance in setting it up? It
> looks as thoughAclhas changed significantly from 1.1.
>
> Here is some of what I have managed to peace together so far...
>
> //add theACLcomponent
> var $components = array('Acl');
>
> //get the aro model
> $aro = $this->Acl->Aro;
>
> //create a new aro for User:scook, related to a user in the Users
> table
> $aro->create( array('model' => 'User', 'foreign_key' => 2, 'alias' =>
> 'scook') );
>
> //save the new aro
> $aro->save();
>
> //get the aco model
> $aco = $this->Acl->Aco;
>
> //create an aco for my Clients controller
> $aco->create( array('foreign_key' => 0, 'alias' => 'Clients') );
>
> //save the new aco
> $aco->save();
>
> //create an aco for the index action of my Clients controller
> $aco->create( array('parent_id'=>'[id of Client Aco]', 'foreign_key'
> => 0, 'alias' => 'Index') );
>
> //save the new aco
> $aco->save();
>
> //grant User:scook access to the Clients controller
> $this->Acl->allow('scook','Clients');
>
> So now I can accesswww.site.com/clients/index
>
> 1. Is everything I have done so far correct and reasonable?
>
> 2. How do I allow User:scook access to ALL of the Clients > actions,
> without adding an aco for each action? I have tried using "*" and "/",
> but no luck.
>
> 3. Can I exclude certain controllers and/or actions from being
> checked? It seems that if I include theAuthComponent, then every
> single action is automatically checked. But if the user is not logged
> in, theaclcheck will deny access to any action (including login). If
> that is the case, how do I access the login action?
>
> Any insight would be appreciated.
>
> cook

Servus,

Well i am a newbe, but very interesseted in the ACL component. But i
could not even get close to what you have already managed. So i wonder
if you could help me a bit... i loaded the component:

var $components = array('Acl');   super

then i let cake print out me aktive components:

$aro = new Aro();

but in the same time i get a real ugly sql error:

Query: startup

Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version 
blablabla

well if you have any idea what i do wrong, i would be very happy...

tribastian


--~--~-~--~~~---~--~~
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 Another winner

2007-05-10 Thread Aaron Shafovaloff

Great job CakePHP devs!

Keep up the good work.

On May 10, 8:52 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Or if you don't want to scroll down:
>
> http://www.seomoz.org/web2.0#cat_51
>
> -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 Tane Piper
> Enviado el: Jueves, 10 de Mayo de 2007 11:47 a.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: CakePHP Another winner
>
> Oh, here is the direct link to the awards:


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Paginate a query

2007-05-10 Thread Ghost

Hi guys, I was reading about how to paginate, all this is applied to
the models (tables),  but for me isn't clear if I can paginate query
results. I'm trying to do this:

class MyModel extends AppModel {
...
function findAllItems($owner=null, $limit = 20, $page =1 ) { return
$this->query("SELECT "); }

}

and in the Controller:

class MyController extends AppController {
...
  function view($id = null) {
...
$data = $this->MyModel->findAllItems($id)
...
  }
}

How I can paginate?,  I wrote something like this:

$this->set('myresutl', $this->paginate($data));

But that doesn't work.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



findallthreaded to get nested posts in a thread

2007-05-10 Thread Greg

CakePHP version: 1.2.0.4986alpha

I tried using findAllThreaded in my Post model to retrieve a tree of
nested posts within a thread, where my Post model is self-joined (i.e.
parent_id is the id of another Post).  The problem is, findAllThreaded
only returns the ParentPost and the ChildPost, with the children array
empty.  When I increase the Model::recursive value, I then get a
deeper nesting, but what if I don't know how deep the nesting goes?
Basically, how can I use findAllThreaded to retrieve the entire tree
of nested posts?  (or is there an entirely different way of going
about this?)

In case it helps, here are my Post model associations:

var $hasMany = array(
'ChildPost' => array(
  'className' => 'Post',
  'conditions' => '',
  'order' => 'created',
  'limit' => '',
  'foreignKey' => 'parent_id',
  'dependent' => false,
  'exclusive' => false,
  'finderQuery' => '')
  );

var $belongsTo = array(
'ParentPost' => array(
  'className' => 'Post',
  'conditions' => '',
  'order' => '',
  'foreignKey' => 'parent_id')
  );

When I call $this->Post->findAllThreaded('Post.id = 1') from my
controller, the output is this:

Array
(
[0] => Array
(
[Post] => Array
(
[id] => 1
[parent_id] =>
)
[ParentPost] => Array
(
[id] =>
[parent_id] =>
)
[ChildPost] => Array
(
[0] => Array
(
[id] => 2
[parent_id] => 1
)

)
[children] => Array
(
)
)
)

However, there are about 7 other posts associated with this thread.
So, rather than setting my recursive value to 7 (which uses up all the
memory), how can I retrieve all posts from that thread using CakePHP's
features?

Thanks,
Greg


--~--~-~--~~~---~--~~
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: Ajax and Pagination...I broke it

2007-05-10 Thread AD7six



On May 10, 4:46 pm, Stacey <[EMAIL PROTECTED]> wrote:
> Hmm, this could be a problem. Why are there two Event.observe for the
> same div with different id's? Would this be causing the 'tabcontent1'
> div not to update?
>
> 
> Results: 1-20 of 24<< 1 |
>
>  onclick=" return false;">2
>
> Event.observe('link24171', 'click',
> function(event){ new Ajax.Updater('tabcontent1','/mysite/search/
> results/a/?page=2', {asynchronous:true, evalScripts:true,
> requestHeaders:['X-Update', 'tabcontent1']}) }, false);
>
>  onclick=" return false;">>>
>
> Event.observe('link26853', 'click',
> function(event){ new Ajax.Updater('tabcontent1','/mysite/search/
> results/a/?page=2', {asynchronous:true, evalScripts:true,
> requestHeaders:['X-Update', 'tabcontent1']}) }, false);
>
> 
> 

read from "Take note (from the demo) that..." in the previous thread
http://groups.google.com/group/cake-php/msg/ecff301f7cd90eca


--~--~-~--~~~---~--~~
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: Update multiple div on one ajax call

2007-05-10 Thread Joshua McFarren


You can also use onSuccess:function(){new Ajax.Updater(...)} to call
another update from inside the first Ajax.Updater call. Here's an
example where a checkbox is clicked to change an invoice status to
paid. Its then moved down to the paid table (id="invoices_done") and
then the onSuccess calls another update to change the total of all
outstanding invoices.

'
?>


--~--~-~--~~~---~--~~
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: Lumad CMS / (Cupcake)

2007-05-10 Thread luke BAKING barker

Also - the navigation management menu seems glitchy to me - or at
least I could not get the inner levels to work? Why did you not follow
the page creation structure of Radiant CMS, if I may ask? I think it
is perhaps clearer in its add child approach to the management of
pages /navigation.

regards

Luke

On May 10, 3:01 pm, luke BAKING barker <[EMAIL PROTECTED]> wrote:
> Hey well done on thisCupcake/ Lumad CMS - looks quite elegant and
> simple.
>
> I am just running through and got a couple of bugs -
>
> the default layout default.thtml needs a  opening statement
> (perhaps this is what causes cupcakecms.com to not display properly -
> all content is over to one side?)
>
> the bootstrap.php might be improved by deleting the absoule URL and
> using something more generic like
>
> define(USERFILESPATHABS,$_SERVER['DOCUMENT_ROOT'] . DS . 'webroot' .
> DS .'files'); //(works on any platform)
>
> also, can I ask why you are using tilde character as a prefix? maybe a
> word plus a hyphen, suggestions from anyone? I am not sure as to the
> best thing in terms of SEO :/ perhaps set it as a constant too in
> bootstrap that can get set by user according to their needs.
>
> In the packaged FCK Config there is a funny character in line 200 - it
> throws an error and breaks FCKEditor.
>
> I'll let you know of any other bugs - but I am only nit-picking -
> appreciate all the worthwhile time and effort you ahve put into this!
>
> regards
>
> Luke
>
> On Apr 18, 8:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Hello, Tarique.
>
> > It's a prohibition in CakeForge only, not elsewhere. My first
> > application got rejected so I used the word Lumad instead.
>
> > Regards.
>
> > On Apr 18, 12:23 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> > > On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > > Hi, this is Jason, author ofCupCakeCMS. (Lumad CMS is the project
> > > > name in CakeForge, renamed because of a policy that prohibits
> > > > unofficial projects to have the word cake in its name.)
>
> > > Ummm... use of cakephp in the name can be prohibited when did use of
> > > just 'cake' in projects become a NO NO?
>
> > > Cheers
> > > Tarique
>
> > > --
> > > =
> > > PHP for E-Biz:http://sanisoft.com
> > > Cheesecake-Photoblog needs you!: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: Ajax and Pagination...I broke it

2007-05-10 Thread Stacey

Hmm, this could be a problem. Why are there two Event.observe for the
same div with different id's? Would this be causing the 'tabcontent1'
div not to update?


Results: 1-20 of 24<< 1 |

2

Event.observe('link24171', 'click',
function(event){ new Ajax.Updater('tabcontent1','/mysite/search/
results/a/?page=2', {asynchronous:true, evalScripts:true,
requestHeaders:['X-Update', 'tabcontent1']}) }, false);

>>

Event.observe('link26853', 'click',
function(event){ new Ajax.Updater('tabcontent1','/mysite/search/
results/a/?page=2', {asynchronous:true, evalScripts:true,
requestHeaders:['X-Update', 'tabcontent1']}) }, false);





--~--~-~--~~~---~--~~
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: Ajax and Pagination...I broke it

2007-05-10 Thread Stacey

note: In the above post, I stated that the html in firebug was the
correct html, but it was not rendering correctly on the screen.
Actually, it is the post 'response' that has the correct html. The
actual html is still the original page loaded. Don't know if that
makes a difference, but I thought I'd clarify.

On May 10, 10:02 am, Stacey <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a page which shows search results for three controllers
> (conditions, remedies & ratings) in three, separate divs. I finally
> got the pagination working correctly so that each 'paginator' is
> showing the correct number of pages/results.
>
> Then, I decided to use an Ajax update to allow the users to page
> through each set of results separately. I added everything from the
> pagination tutorial by AD7Six. I have 'Ajax' included in my helpers,
> 'RequestHandler' included in my components, and linked to the
> prototype.js in my html header. And, each paginator has 'ajaxDivUpate'
> set to it's corresponding div.
>
> When I first load the page, the pagination is correct. Then, for
> example, if I click to go to the 2nd page of conditions, nothing
> happens. So, after reading some posts here, I installed 'firebug'.
> I've never used it before, but now, when I click on the link for page
> 2, firebug reports a 'post' and the url for the post is correct. ie:
> mysite/search/results/test/?page=2. And, if I look at the html for the
> post request, it is correct. (Other than the fact that it is trying to
> switch all of my divs to page 2, which is a whole other matter that
> I'll address later) But, the html shows 'Results: 20-30 of 40'...yet,
> this is not reflected on screen. Also, firebug does not report any
> javascript errors.
>
> Can anyone give me a direction to look in? What am I doing wrong? I
> can paste some code if needed...I just didn't want to put up a bunch
> of irrelevant stuff.


--~--~-~--~~~---~--~~
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: Update multiple div on one ajax call

2007-05-10 Thread fr3nch13

This should help you

http://groups.google.com/group/cake-php/search?group=cake-php&q=multiple+div+ajax


--~--~-~--~~~---~--~~
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 Wins 1st Place In Web 2.0 Awards

2007-05-10 Thread Sliv

bah I should have refreshed the group first LOL :P

Sorry...

On May 10, 11:03 am, Sliv <[EMAIL PROTECTED]> wrote:
> Sorry if this was posted already, but I don't think it was:
>
> http://www.seomoz.org/web2.0#cat_51


--~--~-~--~~~---~--~~
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 Wins 1st Place In Web 2.0 Awards

2007-05-10 Thread Sliv

Sorry if this was posted already, but I don't think it was:

http://www.seomoz.org/web2.0#cat_51


--~--~-~--~~~---~--~~
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 Another winner

2007-05-10 Thread Mariano Iglesias

Or if you don't want to scroll down:

http://www.seomoz.org/web2.0#cat_51

-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 Tane Piper
Enviado el: Jueves, 10 de Mayo de 2007 11:47 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: CakePHP Another winner

Oh, here is the direct link to the awards:


--~--~-~--~~~---~--~~
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 Another winner

2007-05-10 Thread Brian Dailey

Congratulations to the developers and contributors to CakePHP. It's
definitely worthy of every award it gets. I hope financial success
follows. ;-)

- Brian

Software Developer
NY, NY (nyphp.org)

On 5/10/07, Tane Piper <[EMAIL PROTECTED]> wrote:
>
> Oh, here is the direct link to the awards:
>
> http://www.seomoz.org/web2.0
>
> Tane
>
> On 5/10/07, Tane Piper <[EMAIL PROTECTED]> wrote:
> > CakePHP has come first in the Web 2.0 Awards 2007 for the Web
> > Development and Design catagory
> >
> > http://www.mjama.com/mjama/blog/index.php/2007/05/10/web-20-awards-2007/
> >
> > CakePHP FTW!!!
> >
>
> >
>

--~--~-~--~~~---~--~~
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 Another winner

2007-05-10 Thread Tane Piper

Oh, here is the direct link to the awards:

http://www.seomoz.org/web2.0

Tane

On 5/10/07, Tane Piper <[EMAIL PROTECTED]> wrote:
> CakePHP has come first in the Web 2.0 Awards 2007 for the Web
> Development and Design catagory
>
> http://www.mjama.com/mjama/blog/index.php/2007/05/10/web-20-awards-2007/
>
> CakePHP FTW!!!
>

--~--~-~--~~~---~--~~
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 Another winner

2007-05-10 Thread Tane Piper

CakePHP has come first in the Web 2.0 Awards 2007 for the Web
Development and Design catagory

http://www.mjama.com/mjama/blog/index.php/2007/05/10/web-20-awards-2007/

CakePHP FTW!!!

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



List of CakePHP related links

2007-05-10 Thread Sliv

FYI - http://ma.gnolia.com/tags/cakephp


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Ajax and Pagination...I broke it

2007-05-10 Thread Stacey

Hi All,

I have a page which shows search results for three controllers
(conditions, remedies & ratings) in three, separate divs. I finally
got the pagination working correctly so that each 'paginator' is
showing the correct number of pages/results.

Then, I decided to use an Ajax update to allow the users to page
through each set of results separately. I added everything from the
pagination tutorial by AD7Six. I have 'Ajax' included in my helpers,
'RequestHandler' included in my components, and linked to the
prototype.js in my html header. And, each paginator has 'ajaxDivUpate'
set to it's corresponding div.

When I first load the page, the pagination is correct. Then, for
example, if I click to go to the 2nd page of conditions, nothing
happens. So, after reading some posts here, I installed 'firebug'.
I've never used it before, but now, when I click on the link for page
2, firebug reports a 'post' and the url for the post is correct. ie:
mysite/search/results/test/?page=2. And, if I look at the html for the
post request, it is correct. (Other than the fact that it is trying to
switch all of my divs to page 2, which is a whole other matter that
I'll address later) But, the html shows 'Results: 20-30 of 40'...yet,
this is not reflected on screen. Also, firebug does not report any
javascript errors.

Can anyone give me a direction to look in? What am I doing wrong? I
can paste some code if needed...I just didn't want to put up a bunch
of irrelevant stuff.


--~--~-~--~~~---~--~~
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: Lumad CMS / (Cupcake)

2007-05-10 Thread luke BAKING barker

Hey well done on this Cupcake / Lumad CMS - looks quite elegant and
simple.

I am just running through and got a couple of bugs -

the default layout default.thtml needs a  opening statement
(perhaps this is what causes cupcakecms.com to not display properly -
all content is over to one side?)

the bootstrap.php might be improved by deleting the absoule URL and
using something more generic like

define(USERFILESPATHABS,$_SERVER['DOCUMENT_ROOT'] . DS . 'webroot' .
DS .'files'); //(works on any platform)

also, can I ask why you are using tilde character as a prefix? maybe a
word plus a hyphen, suggestions from anyone? I am not sure as to the
best thing in terms of SEO :/ perhaps set it as a constant too in
bootstrap that can get set by user according to their needs.

In the packaged FCK Config there is a funny character in line 200 - it
throws an error and breaks FCKEditor.

I'll let you know of any other bugs - but I am only nit-picking -
appreciate all the worthwhile time and effort you ahve put into this!

regards

Luke



On Apr 18, 8:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hello, Tarique.
>
> It's a prohibition in CakeForge only, not elsewhere. My first
> application got rejected so I used the word Lumad instead.
>
> Regards.
>
> On Apr 18, 12:23 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> > On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > Hi, this is Jason, author ofCupCakeCMS. (Lumad CMS is the project
> > > name in CakeForge, renamed because of a policy that prohibits
> > > unofficial projects to have the word cake in its name.)
>
> > Ummm... use of cakephp in the name can be prohibited when did use of
> > just 'cake' in projects become a NO NO?
>
> > Cheers
> > Tarique
>
> > --
> > =
> > PHP for E-Biz:http://sanisoft.com
> > Cheesecake-Photoblog needs you!: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: CakePHP < ZF!?

2007-05-10 Thread John David Anderson


On May 10, 2007, at 5:24 AM, Mariano Iglesias wrote:

>
> Hard to find a vote for best framework where we don't rock.
>
> The weird thing is that I didn't find Symfony on that list.

I personally don't find that odd.

;o)

-- 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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Samuel DeVore

On 5/10/07, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
>
> Hi Samuel
>
> > and is more likely to work when javascript is disabled ;)
>
> This is meant to be a dig at me? :-)
>

Not at all, I was simply trying to say that if one develops the
non-ajax workflow first.  It is more likely that as one adds ajax to
the flow that things will continue to work even when javascript is
off.  Also it helps in that one takes away one degree of complexity
when building up the app to a functional state.  Not a dig, but a
brief and unhelpful supporting note ;)

-- 
(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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Grant Cox

Langdon - I am still in two minds as to whether a non-Javascript
version is really necessary.  Because if it is, then I'll need to
write some alternative functionality in some places.  But being able
to use the app on my mobile phone really does sounds neat.
Can you expand on what Ajax specific actions you may create?  The vast
majority of our controllers just have CRUD actions, so there is very
little difference whether the action is called from Ajax or a normal
form submission.  Javascript may make the interface a drag & drop, or
a double-click to edit, but our controller interface primarily remains
index/add/edit/delete etc - it's only how the result of these actions
is returned that needs to be different.

Jitka - I hadn't thought of using the beforeRender and afterRender of
a helper, thats a good idea.  It should be able to simplify one aspect
of my current method.  I agree that there should be a minimum of code
in the controller that applies to a single view type, and tips for
attaining this is what I'm after :)


Anyway, as for the method that I've currently employed.  This is
working well, but I would appreciate any comments as to how this
method would / wouldn't be appropriate for your own applications.

The problem identified is that while the actual functionality of a
controller action should be the same no matter how it was called, each
UI may expect a different format response (ie rendered HTML,
redirects, JSON, AMF).  A simple example of a common action would be:

function edit($id){
if ( ... not authenticated to edit this id ... ){
// exit point 1
}

if(empty($this->data)) {
$this->data = $this->Model->read(null, $id);

// exit point 2
} else {
if($this->Model->save($this->data)) {
// exit point 3

} else {
// exit point 4
}
}
}

with four possible exit points, each indicating a different response
for the action.  Now the method decided upon was to execute a single
function in each of these, which would provide the correct response
based upon the request type, and some passed options (whether this was
successful or an error, and whether the database was modified in this
action).  Something like:

function edit($id){
if ( ... not authenticated to edit this id ... ){
return $this->_response( array('success'=>false, 
'modified'=>false,
'msg'=>'Detailed error message', 'redirect'=>'/redirect/location') );
} else {

if(empty($this->data)) {
$this->data = $this->Model->read(null, $id);

return $this->_response( array('success'=>true, 
'modified'=>false,
'vars'=>array('view','data')) );

} else {
if($this->Model->save($this->data)) {
return $this->_response( array('success'=>true, 
'modified'=>true,
'msg'=>'Success message', 'redirect'=>'/redirect/location') );

} else {
return $this->_response( array('success'=>true, 
'modified'=>false,
'msg'=>'Fails validation message',
'vars'=>array('view','data','validation'=>array('Model')) );
}
}
}
}

In this initial example the options that can be passed are:
success - whether this was a valid request made, or are you trying to
edit someone elses data?
modified - whether the database has been changed by this request - so
some screens may need to be refreshed
msg - Any status message
redirect - If this exit point should not result in a page render, the
desired redirect location
vars - for those output targets that expect an array of data (JSON,
Flash), what data to provide (set view vars, $this->data, validation
info etc)

In further implementation I've also found it necessary to allow a
specific view / layout / file to be rendered, so these options can be
in there too.


The skeleton of the _response function is:


function _response( $options )
{
// compile an array of data, from the requested $options['vars']
$return_data = array('view'=>$this->viewVars, 
'data'=>$this->data);

if ( isset($this->RequestHandler) and 
$this->RequestHandler->ext ==
'json' ){
// The requester just wants the data as JSON
$this->set('JSON', $return_data);

$this->RequestHandler->respondAs('js');
$this->viewPath = 'json';
$this->render('json_vars', 'ajax');


} else if ( isset($this->RequestHandler) and 
$this->RequestHandler-
>isAjax() ){
// Ajax.Updater wants a rendered page, with an optional 
JSON header

// set a JSON header of the passed options, for the 
success /
modified etc
 

Re: Problem with autocompleting "created" field in database

2007-05-10 Thread snowdog

Nobody answered... So I had to find a solution by myself.

The problem mentioned above is kind of feature of Cake 1.2,
explanation and hack can be found in https://trac.cakephp.org/ticket/2390


--~--~-~--~~~---~--~~
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: Update multiple div on one ajax call

2007-05-10 Thread [EMAIL PROTECTED]

Can you make me an example of use of the option "with"?

Many Thanks

Marco
On 10 Mag, 13:03, francky06l <[EMAIL PROTECTED]> wrote:
> Well you can use the option "with" in ajax call, I know it works with
> a Form (or DOM id) of what you want to send. Maybe you can use this if
> you have a Form ..
>
> On May 10, 10:21 am, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Hi
>
> > How  can i update multiple divs with one call specifing
> > their content in the call ?
>
> > link('Try',
> > array('funtionA','functionB'), array('update' =>
> > array('div_A','div_B'))); ?>- Nascondi testo tra virgolette -
>
> - Mostra testo tra virgolette -


--~--~-~--~~~---~--~~
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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Mariano Iglesias

Again, I was just kidding around. Let it go, mate, let it go. I'll promise
I'll send you some beauty creams ;)

-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 AD7six
Enviado el: Jueves, 10 de Mayo de 2007 08:24 a.m.
Para: Cake PHP
Asunto: Re: Plugin Controller name uniqueness. was: phpGACL installation

Only when I've run out of beauty creams ;). No, I don't know to what
you are referring - I should approach it how..? Obviously I wouldn't
create an enhancement ticket for something I don't agree with
(although I believe there are plans already afoot for some changes),
so ...?


--~--~-~--~~~---~--~~
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 < ZF!?

2007-05-10 Thread Mariano Iglesias

Hard to find a vote for best framework where we don't rock.

The weird thing is that I didn't find Symfony on that list.

-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 Tane Piper
Enviado el: Jueves, 10 de Mayo de 2007 08:19 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: CakePHP < ZF!?

Yay!  Now we have over half the votes!!!


--~--~-~--~~~---~--~~
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: Filtering/Searching/Sorting

2007-05-10 Thread CraZyLeGs

Of course and in case you didn't know, 1.2 has native pagination
support. filtering is a matter of setting a search criteria.

On May 9, 8:04 am, AD7six <[EMAIL PROTECTED]> wrote:
> On 30 abr, 18:47, phpsmitty <[EMAIL PROTECTED]> wrote:
>
> > This is similar functionality that the masterbake.php file can bake up
> > but the code it produces is very messy. Seams like a couple include
> > files should be able to dynamically generate this functionality
> > automatically.
>
> Hi,
>
> You can download and pick through a few examples of filtering and
> sorting data using the 1.1 pagination component/helper 
> here:http://cakeforge.org/frs/?group_id=152
>
> 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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread AD7six



On 10 mayo, 13:17, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Oh come on, don't give me that freedom of speech BS, just kidding around.
> Sensitive day?

Only when I've run out of beauty creams ;). No, I don't know to what
you are referring - I should approach it how..? Obviously I wouldn't
create an enhancement ticket for something I don't agree with
(although I believe there are plans already afoot for some changes),
so ...?

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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Mariano Iglesias

Oh come on, don't give me that freedom of speech BS, just kidding around.
Sensitive day?

-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 AD7six
Enviado el: Jueves, 10 de Mayo de 2007 08:10 a.m.
Para: Cake PHP
Asunto: Re: Plugin Controller name uniqueness. was: phpGACL installation

I don't feel that expressing a different opinion is an inappropriate
approach. Or you mean something different..?


--~--~-~--~~~---~--~~
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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Mariano Iglesias

I'm not a core developer, I'm a contributor reporting to all-mighty nut.

-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: Jueves, 10 de Mayo de 2007 08:14 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Plugin Controller name uniqueness. was: phpGACL installation

MI is just showing signs of being a core CakePHP developer - just let him be
:P


--~--~-~--~~~---~--~~
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 < ZF!?

2007-05-10 Thread Tane Piper
Yay!  Now we have over half the votes!!!
As this time when I voted, the results are:

CodeIgniter 19.0%
Biscuit  0.0%
Blueshoes 0.0%
CakePHP 52.9%
Easy PHP Framework 0.7%
P4A 0.0%
PHP on TRAX 0.0%
Propel 0.7%
Seagull 14.4%
Solar 0.0%
Zend 12.4%


Tane

On 5/10/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>
>
>
> And resides, ZF is never ahead of anything.
>
>
> -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
>
>  
>
>
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de John David Anderson
>  Enviado el: Mi�rcoles, 09 de Mayo de 2007 07:54 p.m.
>  Para: cake-php@googlegroups.com
>  Asunto: CakePHP < ZF!?
>
>
>
>
> I only provide this link because at the time of this writing, ZF is ahead in
> the poll. Please, please do as your conscience requires.
>
>
>
>
>
>
> http://www.php-mag.net/magphpde/magphpde_news/psecom,id,27201,nodeid,5.html
>  >
>
>

--~--~-~--~~~---~--~~
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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Dr. Tarique Sani

On 5/10/07, AD7six <[EMAIL PROTECTED]> wrote:
>
> I don't feel that expressing a different opinion is an inappropriate
> approach. Or you mean something different..?
>

MI is just showing signs of being a core CakePHP developer - just let him be :P


Tarique

P.S. Cheesecake shouldn't have been called a plugin in the first place
-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread AD7six



On 10 mayo, 13:00, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Now we're talking.
>
> See Andy? That's how you should approach it ;)

?

I don't feel that expressing a different opinion is an inappropriate
approach. Or you mean something different..?

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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Mariano Iglesias

Now we're talking.

See Andy? That's how you should approach 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 Dr. Tarique Sani
Enviado el: Jueves, 10 de Mayo de 2007 07:41 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Plugin Controller name uniqueness. was: phpGACL installation

On 5/10/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> Why should I not? What's wrong about it? If I build a plugin I decide what
> is available to my application. And using requestAction() is perfectly
> acceptable and under some circumstances even recommended.
>

Agreed and that exactly is why, hell should not break loose  If in my
application I have a UsersController, and need to do a requestAction()
to a plugin's UsersController.

An enhancement ticket in trac will be an acceptable end to the thread?


--~--~-~--~~~---~--~~
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: Update multiple div on one ajax call

2007-05-10 Thread francky06l

Well you can use the option "with" in ajax call, I know it works with
a Form (or DOM id) of what you want to send. Maybe you can use this if
you have a Form ..

On May 10, 10:21 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi
>
> How  can i update multiple divs with one call specifing
> their content in the call ?
>
> link('Try',
> array('funtionA','functionB'), array('update' =>
> array('div_A','div_B'))); ?>


--~--~-~--~~~---~--~~
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: Group By when using array conditions

2007-05-10 Thread AD7six



On 10 mayo, 12:48, floepi <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> can someone please tell me how i can group in my SQL query when i am
> using an array as condition for the findAll.

You can't (afaik) - you need to use a string constraint. Do you need a
group by though, would a sort not suffice?

> $this->User->findAll($condtitions.' GROUP BY User.name')

Well... even if it was possible to use GROUP by with an array
constraint php doesn't let you concatonate a string onto the end of an
array like that, all you'll get as a result is "array GROUP BY...".

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
-~--~~~~--~~--~--~---



Group By when using array conditions

2007-05-10 Thread floepi

Hi all,

can someone please tell me how i can group in my SQL query when i am
using an array as condition for the findAll.

Have a look

$conditions['User.name'] = 'test'

$this->User->findAll($condtitions.' GROUP BY User.name')

does not work since it will concatenate the array and the group by
into something like

1rray Group by 

So how can i group my results in SQL?

Hope somebody can help me.

Cheers

Phil


--~--~-~--~~~---~--~~
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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Dr. Tarique Sani

On 5/10/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> Why should I not? What's wrong about it? If I build a plugin I decide what
> is available to my application. And using requestAction() is perfectly
> acceptable and under some circumstances even recommended.
>

Agreed and that exactly is why, hell should not break loose  If in my
application I have a UsersController, and need to do a requestAction()
to a plugin's UsersController.

An enhancement ticket in trac will be an acceptable end to the thread?

Cheers
Tarique
-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread AD7six



On 10 mayo, 12:23, AD7six <[EMAIL PROTECTED]> wrote:

> things which are app wide like, for example, user management or access

Oops Freudian slip there.
user management -> authentication

User management is in itself a good example of what a plugin can be
used for.

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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread jitka

Hi Grant,

Let me show You some sweet features of CakePHP 1.2, please...

1. CakePHP 1.2 can parse 'file extensions' in url so RequestHandler
component can send proper headers and also customize helpers, viewPath
and layoutPath properties of controller. By the other words: if Your
ajax request will call url example.com/posts/index.js, it will look
for view posts/js/index.ctp (and switch layout and add JsHelper to
$helpers). Only thing You have to do is call
Router::parseExtensions(); in app/config/routes.php (it is better call
it with 'some' arguments, see api) and add 'RequestHandler' to
AppController::$components (or to all related controllers). This is
preferred way how to obtain rss, xml, json, wml etc from Your
application.

2. You can also call some RequestHandler methods in Your
AppController::beforeFilter() so RequestHandler can send any custom
header for any custom 'file extension'

3. Themed views: another way how to let CakePHP customize paths for
rendered content (with fallback to obvious file locations)

4. Rendering of flash messages: helpers now have 2 callbacks:
beforeRender() and afterRender(). So Your custom helper can use
session helper internally and customize returned output also.

With above features in mind, there may be some need for implementation
of AppController::redirect(), AppController::flash() or
AppController::beforeFilter/Render(), off course, maybe along with
some custom helper (it depends on ajax toolkit which You're using).

What I'm trying to say is maybe better explained at link that someone
(I think it was gwoo) posted some time ago: 
http://slash7.com/assets/2007/2/12/layercake.png

Code of Your controller shouldn't be most fat part of Your cake, so
controllers should be written so they can work with any interface that
You will create for them. Sure, You will maybe create some
controller's methods just for some fancy XHR things, but most of
changes should be in 'V' part of cake's MVC. Just my 0.02 :)

Regards, Jitka


--~--~-~--~~~---~--~~
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: Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread Mariano Iglesias

Why should I not? What's wrong about it? If I build a plugin I decide what
is available to my application. And using requestAction() is perfectly
acceptable and under some circumstances even recommended. 

So where's the sin? 

-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 AD7six
Enviado el: Jueves, 10 de Mayo de 2007 07:24 a.m.
Para: Cake PHP
Asunto: Plugin Controller name uniqueness. was: phpGACL installation

> If in my application I have a UsersController, and need to do a
> requestAction() to a plugin's UsersController, then hell breaks loose.

Why would you want to do that? Because something is a technical
possibility, I don't feel that should be the basis for giving Plugin
controllers 'unique' names. having inbuilt namespaces for plugins
would completely avoid the issue though (which of course would involve
cake expecting plugin controllers to be named differently).


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Plugin Controller name uniqueness. was: phpGACL installation

2007-05-10 Thread AD7six

HI all,

On 10 mayo, 10:49, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Fromhttp://manual.cakephp.org/chapter/plugins:
>
> "While it isn't required, it is recommended that you name your plugin
> controllers something relatively unique in order to avoid namespace
> conflicts with parent applications. Its not a stretch to think that a parent
> application might have a UsersController, OrderController, or
> ProductController: so you might want to be creative with controller names,
> or prepend the name of the plugin to the classname"

I don't feel that advice is appropriate.

The only means of normally generating a pseudo-conflict is if you have
an app controller with the same name as a plugin - in that case in the
absence of a specific route the app controller will be used for the
url /plugin_name/. but that's not really a problem - just a side
effect of bad (user) design.

> If in my application I have a UsersController, and need to do a
> requestAction() to a plugin's UsersController, then hell breaks loose.

Why would you want to do that? Because something is a technical
possibility, I don't feel that should be the basis for giving Plugin
controllers 'unique' names. having inbuilt namespaces for plugins
would completely avoid the issue though (which of course would involve
cake expecting plugin controllers to be named differently).

A plugin is supposed to be a self contained mini (although in reality
it doesn't have to be mini at all) application, in principle there
shouldn't be any intereractions such as the above between a plugin and
the app/another plugin.

If you have a controller with the same name in a plugin and in your
app, unless you
1) explicitly use loadControllers in the plugin
2) explicitly load and try to use the plugin xyz controller from the
app xyz controller
3) requestAction from app xyz controller to plugin xzy controller (why
would anyone want to do that?)
4) requestAction from plugin xyz controller to app xzy controller (why
would anyone want to do that?)
5) requestAction from one plugin xyz controller to a different plugin
xyz controller (why would anyone want to do that?)

You won't come across any issues at all.

I feel that only the misuse of requestAction can cause issues, and
that's the basis for my disagreeing with the manual page on plugin
controller name uniqueness.

I should perhaps add that I don't think any plugin should contain
things which are app wide like, for example, user management or access
control. However a shop plugin shouldn't, for example, need to care /
at all/ about having a products controller since as a user who has
just installed the 'shop' plugin why would you then either a) butcher
the plugin to look at your app controllers or b) start using request
action in your app xyz controller to look at the plugin xyz controller
or c) something else a bit wacky?

If someones app controller makes a requestAction call for all requests
that could indeed make this sort of problem apparent; But again: I'd
file that under misuse of requestAction.

All IMO of course. If I've made a mistake (i.e. not just a difference
of opinion) of any kind in my post please let me know.

To finish on a q: Has anyone had a specific problem of the type being
discussed?

Cheers,

AD
PS. Is there a consensus on top posting? I don't like it :D! (Lamby
where are you and your informative footer :))


--~--~-~--~~~---~--~~
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: get a 404 page

2007-05-10 Thread rocky

Hey All,

I dropped the table and import the back up sql file in again. It
works.

Blessings,
Rocky

On May 9, 5:52 pm, rocky <[EMAIL PROTECTED]> wrote:
> Hey,
>
> http://localhost/cakephpxxx/index.php?url=userswould give me the
> right content but I click on the link of register whose right url 
> washttp://localhost/cakephpxxx/users/registerand it gives me the 404
> page again unless I 
> inputhttp://localhost/cakephpxxx/index.php?url=users/register.
>
> It is so strange, as I said another application works perfectly fine.
> Can any of you give me a hint on how to solve the problem please?
>
> Blessings,Rocky
>
> On May 9, 5:27 pm,rocky<[EMAIL PROTECTED]> wrote:
>
> > Hey list,
>
> > I followed the tutorial of "IBM: Cook Up Websites Fast (5 part
> > series)" and got the user registration system up and running
> > successfully. Today I did an database table back up use mysqldump --
> > add-drop-table xxx command and did some other editing which I forgot.
> > The problem is the when I go tohttp://localhost/cakephpxxx/usersI
> > got a 404 warning. I got another system called post 
> > andhttp://localhost/cakephpxxx/postsgivesme the content without any
> > problem. Can any of you give me a hint on how to solve the problem
> > please?
>
> > The error message is "The requested URL /cakephp/cakephp1113/users was
> > not found on this server."
>
> > Blessings,
> >Rocky


--~--~-~--~~~---~--~~
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: get a 404 page

2007-05-10 Thread rocky

Can any of you help me please?

On May 9, 5:52 pm, rocky <[EMAIL PROTECTED]> wrote:
> Hey,
>
> http://localhost/cakephpxxx/index.php?url=userswould give me the
> right content but I click on the link of register whose right url 
> washttp://localhost/cakephpxxx/users/registerand it gives me the 404
> page again unless I 
> inputhttp://localhost/cakephpxxx/index.php?url=users/register.
>
> It is so strange, as I said another application works perfectly fine.
> Can any of you give me a hint on how to solve the problem please?
>
> Blessings,Rocky
>
> On May 9, 5:27 pm,rocky<[EMAIL PROTECTED]> wrote:
>
> > Hey list,
>
> > I followed the tutorial of "IBM: Cook Up Websites Fast (5 part
> > series)" and got the user registration system up and running
> > successfully. Today I did an database table back up use mysqldump --
> > add-drop-table xxx command and did some other editing which I forgot.
> > The problem is the when I go tohttp://localhost/cakephpxxx/usersI
> > got a 404 warning. I got another system called post 
> > andhttp://localhost/cakephpxxx/postsgivesme the content without any
> > problem. Can any of you give me a hint on how to solve the problem
> > please?
>
> > The error message is "The requested URL /cakephp/cakephp1113/users was
> > not found on this server."
>
> > Blessings,
> >Rocky


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How can I do install xinha to CAKEphp

2007-05-10 Thread tekcorap

dear masters,
I want use xinha text editor in my all textarea. How can install xinha
web editor in my project?
thanks your helps.
tek.


--~--~-~--~~~---~--~~
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: Techniques for implementing multiple UIs (ie HTML, Ajax, Flash) for the same actions.

2007-05-10 Thread Langdon Stevenson

Hi Samuel

> and is more likely to work when javascript is disabled ;)

This is meant to be a dig at me? :-)

If so, then let me clarify a little.  If I can't guarantee that 
javascript is available, then I won't require it, either by providing a 
regular get/post alternative, or not using AJAX at all.

If I require AJAX only, then it is in a situation where I know that the 
client has a corporate policy of using browser X or Y with Javascript 
enabled.

So, I don't leave my users hanging with a broken application because of 
no Javascript.

Regards,
Langdon


--~--~-~--~~~---~--~~
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: phpGACL installation

2007-05-10 Thread Dr. Tarique Sani

On 5/10/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> From http://manual.cakephp.org/chapter/plugins:
>
> "While it isn't required, it is recommended that you name your plugin
> controllers something relatively unique in order to avoid namespace
> conflicts with parent applications. Its not a stretch to think that a parent
> application might have a UsersController, OrderController, or
> ProductController: so you might want to be creative with controller names,
> or prepend the name of the plugin to the classname"

Ugh! wonder how I missed it...

But again IMO the framework should handle this gracefully. Prepending
or appending classname is not an answer as it will lead to
ugly/confusing/funny URLs or the developers will have to use routes
which is not so bad BUT for apps where plugins are supposed to be plug
and play expecting end users to edit routes is not an acceptable
option.

Hmmm... DB based routing anyone?

Just my 2ps

Tarique
-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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: phpGACL installation

2007-05-10 Thread Mariano Iglesias

>From http://manual.cakephp.org/chapter/plugins:

"While it isn't required, it is recommended that you name your plugin
controllers something relatively unique in order to avoid namespace
conflicts with parent applications. Its not a stretch to think that a parent
application might have a UsersController, OrderController, or
ProductController: so you might want to be creative with controller names,
or prepend the name of the plugin to the classname"

If in my application I have a UsersController, and need to do a
requestAction() to a plugin's UsersController, then hell breaks loose.

-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: Jueves, 10 de Mayo de 2007 04:17 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: phpGACL installation

Sorry I disagree on the point that uniqueness of  plugin controller
name should/would be a requisite for it to be plug and play


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Update multiple div on one ajax call

2007-05-10 Thread [EMAIL PROTECTED]

Hi

How  can i update multiple divs with one call specifing
their content in the call ?

link('Try',
array('funtionA','functionB'), array('update' =>
array('div_A','div_B'))); ?>


--~--~-~--~~~---~--~~
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: phpGACL installation

2007-05-10 Thread Dr. Tarique Sani

On 5/9/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:

> point. Plugin controllers should be named as unique as possible, because
> that's the idea of plugins: you drop it on any application and it should
> avoid collisions as much as possible.

Sorry I disagree on the point that uniqueness of  plugin controller
name should/would be a requisite for it to be plug and play

It is merely a matter of referring to the said controller as
plugin/controllername which the framework already manages (?)

And yeah it is demeaning for an app to be referred as a plugin :))

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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: URL issue

2007-05-10 Thread AD7six



On 10 mayo, 02:54, "Erich C. Beyrent" <[EMAIL PROTECTED]>
wrote:
> I am sorry I was not clear - I don't need to construct the URL from Cake
> - I need Cake to HANDLE this URL.

In what way (exactly) does cake /not/ handle that url.

In 1.2 you may be able to write a route for it, not so in 1.1 though.

You could use .htaccess to do it, or you could "hijack" the url in
your bootstrap file and reaarrange it. If the urls are always of that
form (and off the root) then you could, for example, set up the
controller for your root to check for these get params and act
appropriately.

e.g.
1) copy the pages controller to your app controllers folder (this is
the default controller that handles the url "/")
2) add beforeFilter logic to check for these get params
3) redirect to the true url
4) die.

For step 2 look at pr ($this->params); with the url you are speaking
about - you'll see everything is in there ready for your to pick it
out.

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
-~--~~~~--~~--~--~---