Re: View Caching issues

2006-11-13 Thread AD7six

> Does cake perhaps check if it can create the folder once, and then never 
> again?
>
> Rory
I wouldn't expect cake to try to create anything that is part of the
download:
https://trac.cakephp.org/browser/branches/1.1.x.x/app/tmp/cache

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.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
-~--~~~~--~~--~--~---



[SOLVED]Re: View Caching issues

2006-11-13 Thread Rory

Hi All

I appear to have solved the problem. I downloaded the new version of
Cake this morning - but this also did not solve my problem. I trawled
through the cake folder and everything there seemd to be telling that
caching was working. Finally, I tried manually creating the folder
app/tmp/cache/views, and chmod'ed it to 777. Voila - caching started
working.

The odd thing is that app/tmp/cache was on 777 since yesterday
afternoon (at least) and cake should have (in theory) been able to
create the folder but for some reason it didn't. Does cake perhaps
check if it can create the folder once, and then never again?

Rory


--~--~-~--~~~---~--~~
 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: Changing theme

2006-11-13 Thread Dr. Tarique Sani

On 11/14/06, Eric <[EMAIL PROTECTED]> wrote:
> Sry for the late reply.
> I really wanna start. BUT, I am confuse also.
> Where should I start?
> The controller? or ?

After you put theme.php in your views folder

Start with your app_controller.php put

var $view = 'Theme';
var $theme = "YourTheme"

YourTheme is a folder in your views as well a webroot

Once again see cheesecake code for the organization of files -
cheesecake by default has two themes Classic and Modern

Once you get the hardcoded "YourTheme" working you can think about how
to change that value using either DB or user input etc

This should get you started

Tarique

-- 
=
PHP Applications for E-Biz: http://www.sanisoft.com
Coppermine Picture Gallery: http://coppermine.sf.net
=

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

2006-11-13 Thread Claudio Poli 

hi,
I've this code in my view:



ID:  - 




sortable('list', array('url' =>
'/dashboard/ordinapagine', 'update' => 'list-info', 'complete' => 'new
Effect.Highlight("list",{})'))?>

in my controller:

function ordinapagine() {
  $ids = $this->params['form']['list'];
debug($this->params);
$i = 1;
  foreach($ids as $id){
$this->Page->id = $id;
$this->Page->saveField('order', $i++);
  }
$this->autoRender = false;
}

when I debug($this->params) however I don't get all elements, but only
this:
[form] => Array
(
[list] => Array
(
[0] => 5
)

[_] =>
)

this prevents me to save the correct order. anybody has a clue?
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: generateList()

2006-11-13 Thread nate

The wonderful thing about open-source software is that you can pick
apart the portion you're interested in, look at the parts that make it
work, and use them to make your own.

Cake isn't designed to do everything you could possibly want to do,
just most things.  And for the things it doesn't specifically cover, it
gives you more than enough leverage to cover them yourself.


--~--~-~--~~~---~--~~
 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: Re: Redirect to homepage after an AJAX form submission.

2006-11-13 Thread Samuel DeVore

Actually I believe the correct code is

:)


codeBlock(); ?>

   alert('Nate is a god.');
window.location.href = "url("/"); ?>";
 
 // Show an error
 
 

On 11/13/06, nate <[EMAIL PROTECTED]> wrote:
>
> Here's your response view:
>
> codeBlock(); ?>
> 
>window.location.href = "url("/"); ?>";
> 
> // Show an error
> 
> 
>
>
> >
>


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

--~--~-~--~~~---~--~~
 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: Redirect to homepage after an AJAX form submission.

2006-11-13 Thread nate

Here's your response view:

codeBlock(); ?>

   window.location.href = "url("/"); ?>";

// Show an error




--~--~-~--~~~---~--~~
 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: Changing theme

2006-11-13 Thread Eric

Sry for the late reply.
I really wanna start. BUT, I am confuse also.
Where should I start?
The controller? or ?

Can U write like a steps for this? I know there is lots of code to do.
BUT, I really got no idea.
There is lack of docs for theme. Maybe, you can post a artciles in the
bakery. Cause I saw it theme.php in the Cake 1.2.

Thanks


"Dr. Tarique Sani 写道:
"
> On 11/12/06, Eric <[EMAIL PROTECTED]> wrote:
> > I am quite confused about the whole process.
> No problems
>
> > OK. When the page opend, it fetchs the config.theme from the db, like
> > modern, and then pass it to the Theme.php to handle the rest of the
> > thing ?
>
> Yes ThemeView will handle the rest automagically
>
> > Is the Theme.php just jump in to 'load' the theme by users?
>
> Yes
>
> > I am just newbie. Wanna to know more and clear.
>
> I was a newbie too not very long ago ;)
>
> My best suggestion now would be to try and use ThemeView in your
> application - when you run into problems ask more questions.
>
> > Thanks. The cheese is really cheese. It contains lots of function. A
> > excenllent sample about how to use Cake.
>
> Thanks - that is an encouragment to make cheesecake even better
>
> Cheers
> Tarique
>
> --
> =
> PHP Applications for E-Biz: http://www.sanisoft.com
> Coppermine Picture Gallery: http://coppermine.sf.net
> =


--~--~-~--~~~---~--~~
 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 to display a xml file for certain number?

2006-11-13 Thread Eric

Hi,

Now, I am using SimpleXML and MySql to setup a rss-reader. It works
fine.

1.. So, How can I control the numbers items of a rss displayed ?
 Defaultly, It will display all the items.
 How to control this? For example, a dropdown list for 1,2 3 items.

2.. How to do some cache for the rss? 

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: Suggestions on a multi-app installation

2006-11-13 Thread mariano.iglesias

Look at this thread. This issue has been covered before:

http://groups.google.com/group/cake-php/browse_thread/thread/b78b0abbb0d72136/ddc05cce0b688f52?lnk=gst&q=&rnum=20#ddc05cce0b688f52


--~--~-~--~~~---~--~~
 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: generateList()

2006-11-13 Thread Mikee Freedom

or you could write on exceptionally cool one in your app_model.php and
then use it throughout.

depends on the requirements though.

good luck.
mikee

On 14/11/06, Christoph <[EMAIL PROTECTED]> wrote:
>
> > but just think about all the functionality you didn't have to write. a
> > simple advanced generateList method is nothing in the scheme of things :)
>
> More than a fair point.  It's just that with the number of complex
> SELECT boxes I'm going to have on my site, I'm going to have to write
> at least 1 advanced generateList() method for the majority of my
> models.
>
> Oh, well.  Off to work. :)
>
> thnx,
> Christoph
>
>
> >
>

--~--~-~--~~~---~--~~
 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: Retrieve URL - New thread.

2006-11-13 Thread mariano.iglesias

One thing I forgot on the above code. If there is an error on the login
details the URL gets lost. So on the login() action right before you
set the errorMessage add:

if (isset($this->data['User']['url']))
{
$this->set('url', $this->data['User']['url']);
}


--~--~-~--~~~---~--~~
 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: generateList()

2006-11-13 Thread Christoph

> but just think about all the functionality you didn't have to write. a
> simple advanced generateList method is nothing in the scheme of things :)

More than a fair point.  It's just that with the number of complex
SELECT boxes I'm going to have on my site, I'm going to have to write
at least 1 advanced generateList() method for the majority of my
models.

Oh, well.  Off to work. :)

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: Retrieve URL - New thread.

2006-11-13 Thread mariano.iglesias

Quite simple. Take advantage of the HTTP_REFERER index available at
$_SERVER.

You should take this into consideration and add it to your login form
when the login was accessed without submitting any data. So on your
controller where you handle the login (I assume you use a login()
action) you could do something like:

function login()
{
if (!empty($this->data))
{
$user = $this->User->findByLogin($this->data['User']['login']);

if($user !== false && $user['User']['password'] ==
sha1($this->data['User']['password']))
{
$this->Session->write('User', $user);

if (isset($this->data['User']['url']))
{
$this->redirect($this->data['User']['url']);
}
else
{
$this->redirect('/');
}
}
else
{
$this->set('errorMessage', 'The account you\'ve 
specified is not
valid.');
}
}
else if (isset($_SERVER['HTTP_REFERER']))
{
$this->set('url', $_SERVER['HTTP_REFERER']);
}
}

and on your login.thtml view file you would have something like:




formTag('/account/login'); ?>
hiddenTag('User/url', $url);
}
?>
User: input('User/login'); ?>
Password: password('User/password'); ?>

submit('Login'); ?>


Hope it helps.

-MI


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



Not quite understanding associations

2006-11-13 Thread Christoph

I have the following tables:

users
collections, FK user_id, FK game_piece_id
game_pieces, FK games_set_id
games_sets, FK game_id, FK set_id
games
sets

So, if I understand correctly:

users $hasMany collections
collections $belongsTo users, game_pieces
game_pieces $belongsTo game_sets
games_sets $belongsTo games, sets
games $hasMany games_sets
sets $hasMany games_sets

I would think that collections $hasMany game_pieces (such that many
game pieces make up a collection), but using the relationship between
users and collections as, well, a model, that means since collections
belongs to users, it must also belong to game_pieces.

I suppose collections is a HABTM joining table between users and
game_pieces?  But if I try to define the association that way, I get an
error from cake (using the debug mode 3) showing:

1146: Table 'cake_communal_haven.collections_users' doesn't exist
1146: Table 'cake_communal_haven.collections_game_pieces' doesn't exist

so obviously I can't make it a HABTM association.  So I'm just not
quite getting this...

Any help would be greatly appreciated!

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: generateList()

2006-11-13 Thread Mikee Freedom

but just think about all the functionality you didn't have to write. a
simple advanced generateList method is nothing in the scheme of things
:)

then you can save other people from writing the same thing by posting
the function in the pastes or the bakery. isn't open source wonderful!

On 14/11/06, Christoph <[EMAIL PROTECTED]> wrote:
>
> I took a look at many of those threads and none seemed to address this
> specific issue.  When I turn debugging on to level 3, it is showing me
> all the SQL executed and the query used to fill my SELECT box for my
> game pieces doesn't look anything like it should.  It's not using any
> joins whatsoever, even by using variations of franky's suggestion above
> (admittedly not likely the proper syntax).
>
> I'm starting to dispair that I won't be able to use generateList() for
> anything but the simplist of SELECT boxes.  Anything that may require a
> complex join or anything that needs multiple column values to comprise
> the SELECTs display value, it's looking like I'm going to need to write
> my own functionality... :(
>
> thnx,
> Christoph
>
>
> >
>

--~--~-~--~~~---~--~~
 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: generateList()

2006-11-13 Thread Christoph

I took a look at many of those threads and none seemed to address this
specific issue.  When I turn debugging on to level 3, it is showing me
all the SQL executed and the query used to fill my SELECT box for my
game pieces doesn't look anything like it should.  It's not using any
joins whatsoever, even by using variations of franky's suggestion above
(admittedly not likely the proper syntax).

I'm starting to dispair that I won't be able to use generateList() for
anything but the simplist of SELECT boxes.  Anything that may require a
complex join or anything that needs multiple column values to comprise
the SELECTs display value, it's looking like I'm going to need to write
my own functionality... :(

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: Bind parameters in DB layer

2006-11-13 Thread nate

Because (a) an abstraction layer on top of an abstraction layer would
be too slow, as neither of those packages are optimized for how Cake
works, (b) it would make Cake dependent on an external library, over
which we have no control, and finally (c) it would disallow us from
distributing Cake under the MIT license.

So no, definitely not worth the benefit.  Not that we won't implement
that at some point in the future for drivers that support it.


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



Suggestions on a multi-app installation

2006-11-13 Thread F. Robin Knight Jr

Hey everyone,

I've been lurking on the list for some time now, and thought I'd send
of my first message.

I have two extra files (one component and one helper) that I've put
into my /cake/libs. At first I told myself I shouldn't do this, as
it's not really convention to mess around with the core, but it's only
two files, and only two apps using them. Rather than updating them
independently, I just let them stay.

Now those classes are getting rather big, and need to be branched off.
Other files want to jump in as well. I could keep throwing them into
/cake/libs/whatever, making a mess. I could add them to my individual
projects. This sounds more appealing, as it would require that I stop
FTPing and start using a deploy script to copy these extra files. But
it still doesn't seem the *best* way. Inituition tells me there ought
to be a folder created just for these files, but no such mechanism
exists in Cake.

I guess I'm just wondering what suggestions everyone has on how to solve this.

Thanks!

-Rob

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



Redirect to homepage after an AJAX form submission.

2006-11-13 Thread avy

Hi everyone! I have the following problem:

I have a login form contained in a div called 'popup' which gets shown
via AJAX when a user clicks an ajax->link on the homepage. I'm
submitting the login form through ajax->submit().

In my Users controller, login() method, I set the following logic:

- if login data was not good set $error and display it in the login
form.

- if login data good, redirect to homepage - $this->redirect('/');

In the controller I have the requestHandler component enabled.

Now my problem is that if the login data is good, $this->redirect('/')
kicks in, but, because the form submission was done through AJAX, the
redirect result (my homepage) gets rendered inside the 'popup' div.

I was not able to find a way to do a full non-ajax redirect subsequent
to an ajax form submission.

For better explaining the above, please go to
http://bin.cakephp.org/saved/519 where you'll see my controller code,
my form as well as a more detailed description of the problem.

Hopefully someone has had this problem before me and knows a fix for
it.

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



Webservices

2006-11-13 Thread Christoph

I'm fooling around w/cake to try to see what it's capable of.  All of
my MVC parts have all been created by bake.php and I've done very
little modification from there.  I'm still learning.

So I have a users controller with the default index action (as provided
by bake).  The manual (http://manual.cakephp.org/chapter/configuration)
says that if I set WEBSERVICES to 'on' in /app/config/core.php, then I
can access different 'views' of the data.  When I go to

www.mysite.com/users/index

I see the HTML view just fine.  But if I go to

www.mysite.com/xml/users/index

I get the missing component error page.  The exact error text is:

Fatal: Create the Class:

in file : app/controllers/components/xml.php

Why is it looking for XmlComponent? The manual makes no mention of
having to create any component. Is there something else I need to do?
Is there something I'm missing?  I do have the
/app/views/users/xml/index.thtml file as instructed in the manual.  The
odd thing is that if that file is not there, I get a missing controller
error page instead...?  I also get the missing controller error page if
I set WEBSERVICES to off.

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: 2 noobie questions

2006-11-13 Thread the_woodsman

Hi,
Just to try and help with point 1

"Is it possible to tell a controller to use multiple views?  It's own
and also
any other? "

The auto-rendering of views matching the controller action is handy,
but not enforced - I believe you're looking for the Controller's
render() method.
As per the manual:

   render
* string $action
* string $layout
* string $file

" ... you can call this function to render the view at any point in the
controller logic"

Hope that helps!


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



Security and performance of Cake PHP

2006-11-13 Thread Ger_Val

Hi! I'm new to CakePHP, seems it's a really great framework. I didn't
find any bad comments about it in the Internet. Probably, I was looking
badly. :)
What about using CakePHP for large projects? My concerns are about
performance and security. I've read some posts and people say
performance is not a problem. What about a site with 10 000 visitors
daily and a user area with many database-driven features (edit personal
data, history etc.)?
Should I worry about security of my site powered by CakePHP? Security
is of great importance for me since a hacker intrusion can destroy the
whole business.


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



Retrieve URL - New thread.

2006-11-13 Thread Bernard Grosperrin

I would like to improve my rather crude login system. For now, after 
login, I redirect the user to '/', or the "Home" page.
I would like to "trap" or retrieve the URL the user intended to go to, 
pass it as parameter to my login function, to redirect to this URL 
instead of Home.
Is there a way to do this, or should I write a "checkSession" with 
parameter, which would be the URL from where it is called? (which I tried and 
does not seems able to make it work.)

Thanks,
Bernard


--~--~-~--~~~---~--~~
 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: [professionel] RE: Retrieve URL?

2006-11-13 Thread Bernard Grosperrin

Mariano Iglesias wrote:
> Please post this message on its own thread. I have a possible solution but
> it wouldn't be polite to the other readers of this thread to completely
> change the subject this thread was about.
Sorry, did not realize I did that!~~-
Bernard


--~--~-~--~~~---~--~~
 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: Retrieve URL?

2006-11-13 Thread Mariano Iglesias

Please post this message on its own thread. I have a possible solution but
it wouldn't be polite to the other readers of this thread to completely
change the subject this thread was about.

-MI

-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Bernard Grosperrin
Enviado el: Lunes, 13 de Noviembre de 2006 07:22 p.m.
Para: cake-php@googlegroups.com
Asunto: Retrieve URL?

I would like to improve my rather crude login system. For now, after 
login, I redirect the user to '/', or the "Home" page.
I would like to "trap" or retrieve the URL the user intended to go to, 
pass it as parameter to my login function, to redirect to this URL 
instead of Home.
is there a way to do this, or should I write a "checkSession" with 
parameter, which would be the URL from where it is called?

Thanks,
Bernard


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



Re: Cake PHP Vs Prado Vs Symfony

2006-11-13 Thread Bert Van den Brande

On 11/13/06, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> I actually feel the opposite :) IMHO CakePHP is better suited for bigger
> projects, but it always comes down as to what developers like really. Just
> two days ago I did a stress testing of an application I built with Cake on
> two small servers: a LAMP on a Pentium 3 GHz, 2 GB RAM and on a WinXP,
> Apache2, PHP 5.1, Mysql on a Pentium Dual 2.6 GHz with 1 GB RAM and I was
> astonished with the great outcome (and believe you me, I was expecting a
> lot.)

Can't wait for the results ...

>
> When I said symfony lures I ment more the target that symfony seems to be
> after, not that it was something negative. When it comes down to
> development, semantics should not be an issue :)
>
> As to your PDF remark well you do have PDF manuals for cake as well. You've
> just gotta look for them:
>
> http://cakeforge.org/projects/cakedocs/
>
> I use this PDF constantly while I'm developing just as you do with
> symfony's.

Pdf is indeed handy, but it's more the Cake content that needs some
polishing imho.

>
> One other thing about Cake is the active involvement of almost all cake's
> developers. How many times can you say you drop in your question on an
> eGroup and get almost immediate answers? Not that often, I imagine. I manage
> a Java Users Group for Latin America and it is not easy to find developers
> willing to help others.

True and that really is a plus, but I also see lots of repeating and
sometimes very, very basic questions ;)

>
> But I do agree with you. There's no black and white on deciding on a
> particular framework. Some people like Symfony better, while others enjoy
> working with CakePHP. It can be a number of things that make you decide on
> one framework over the other, from the most understandable (I need to keep
> supporting a PHP4 environment, or I like better Cake's approach to the MVC
> than that of symfony) to the most unusual ones (Cake just sounds way cooler
> than symfony, or I don't use Cake because I stay away from dairy.)
>

Well, I just like them both :)
So Cake founders, keep up the good 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
-~--~~~~--~~--~--~---



Retrieve URL?

2006-11-13 Thread Bernard Grosperrin


I would like to improve my rather crude login system. For now, after 
login, I redirect the user to '/', or the "Home" page.
I would like to "trap" or retrieve the URL the user intended to go to, 
pass it as parameter to my login function, to redirect to this URL 
instead of Home.
is there a way to do this, or should I write a "checkSession" with 
parameter, which would be the URL from where it is called?

Thanks,
Bernard

--~--~-~--~~~---~--~~
 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: Multi-page form validation

2006-11-13 Thread Ismael S. Kafeltz

I made a javascript to dynamically create *hasmany* relatioships.

For example, i have N e-mails in one view called "Users", in the same
view i add/remove/alter all emails in the same time, not one by one as
i saw somewhere using cake because it doesn't have support for multiple
data, and you must select the Email and alter, select another one and
alter it, and so on.

The question is, how do i validate this dinamic emails.

E-mail me and i will send you the same snippet i sent to Nate (is two
files, html and js), it's an example how i do create and delete datas.


--~--~-~--~~~---~--~~
 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: table associations belongsTo- i don't understand ...

2006-11-13 Thread dme69

SORRY !!!

I was so stupid !
My model wasn't good.

Thanks for your help.
Dominique.


--~--~-~--~~~---~--~~
 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: Multi-page form validation

2006-11-13 Thread devarz


Ismael S. Kafeltz skrev:
> I made a website with 11 steps with some 30 tables
> A little complex, if you need some help email me.
>

Could you share with us the skeleton of your form/validation framework?
It'd be interesting to see how you implement it with cakephp.

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: table associations belongsTo- i don't understand ...

2006-11-13 Thread dme69

I'm going to tell it more simply i think ... I hope ! :)

Table A
- id
- name
- country_id

Table Country
- id
- name

I want, in the add.thtml of Table A, to have a list with all the name
of table Country

My english is like my knowledge of cake : poor :)

Thanks.
Dominique.


--~--~-~--~~~---~--~~
 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: table associations belongsTo- i don't understand ...

2006-11-13 Thread Ismael S. Kafeltz

I am not sure, but if you put this:
$uses = array('Vins', 'bla', 'bla');

Or: $this->Vin->Region->generateList())
should be:
 $this->Region->generateList());  // assure to put: $uses =
array('Region','..','..');
Or it will give "undefined property"


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



table associations belongsTo- i don't understand ...

2006-11-13 Thread dme69

I'm sure my question is very simple but i understand nothing ! :(

I want to have the possibility to select a value in a list from a table
when adding an element :
class VinsController extends AppController
{
var $name = 'Vins';
var $belongsTo = 'Region';

function beforeFilter()
{
$this->checkSession();
}

function index()
   {
$conditions =
"Vin.user_id='".$this->Session->read('User.username')."'";
$this->set('vins', $this->Vin->findAll($conditions,null));
   }

function view($id)
   {
   $this->Vin->id = $id;
   $this->set('data', $this->Vin->read());
   }

function add()
   {
$this->set('regions', $this->Vin->Region->generateList());
$this->set('typedevins', $this->Vin->Typedevin->generateList());
   if (!empty($this->data['Vin']))
   {
$this->data['Vin']['user_id'] =
$this->Session->read('User.username');
   if($this->Vin->save($this->data['Vin']))
   {
$this->redirect('/vins');
/*$this->flash('Votre vin a été 
ajouté.','/vins/');*/
   }
   }
   }


And i'm having the error message : Undefined property: Vin::$Region in
/Applications/MAMP/htdocs/applications/app/controllers/vins_controller.php
on line 26

The error is here but ... $this->set('regions',
$this->Vin->Region->generateList());

Please help me ...
Dominique.

PS : I try to search in manual and in this group but i don't understand
where is my error.


--~--~-~--~~~---~--~~
 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: Getting data from "hasMany" relationship.

2006-11-13 Thread Mikee Freedom

so your associations are as follows

Blog {

hasMany = array(Image);

}

Image {

belongsTo = array(Blog);

}

and your tables represent these associations with the correct foreignKeys?

Can you paste your code in to the pastes bin:

http://www.cakephp.org/pastes/add

and then provide the link.

It might be handy to go through the associations section of the manual
again. Have a look at the additional parameters you can define in the
associations e.g. foreign key.

cheers,
mikee

On 14/11/06, TWIOF <[EMAIL PROTECTED]> wrote:
>
> Cheers Mikee,
>
> doesn't seem to work though, if i change the relationship top hasOne it
> finds it. But I'd like to do it with hasMany
>
>
> >
>

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



Re: Cake PHP Vs Prado Vs Symfony

2006-11-13 Thread mariano.iglesias

I will. Don't have the report with me as I left it on the office. But
will do when I regenerate it after adding more modules to the app.


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



Re: Need freelance help with cakephp project

2006-11-13 Thread mariano.iglesias

Guys shoudn't "I'm interested" kind of messages be private replies to
the sender? This messages don't provide any information to the rest of
the group.

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: Getting data from "hasMany" relationship.

2006-11-13 Thread TWIOF

Cheers Mikee,

doesn't seem to work though, if i change the relationship top hasOne it
finds it. But I'd like to do it with hasMany


--~--~-~--~~~---~--~~
 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: 2 noobie questions

2006-11-13 Thread TWIOF

Woops, replied to wrong post, thick ot what!


--~--~-~--~~~---~--~~
 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: 2 noobie questions

2006-11-13 Thread TWIOF

Cheers Christoph,

doesn't seem to work though, if i change the relationship top hasOne it
finds it. But I'd like to do it with hasMany


--~--~-~--~~~---~--~~
 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: View Caching issues

2006-11-13 Thread Rory

Hi Nate

I tried setting up the actions in $cacheAction as well as just setting
$cacheAction to a scalar value like 1 minute or 1 hour - whihc if
memeory serves, would have made caching apply across the board to all
actions?

I will try pasting the code first thing tomorrow.

Also, I came across a thread from a few months ago that seemed to
suggest that the use of elements and layouts would affect caching. Is
this indeed a factor? The bulk of my  HTML sits in layouts and elements
- would this be causing a problem?

Rory


--~--~-~--~~~---~--~~
 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: Bind parameters in DB layer

2006-11-13 Thread kickdaddy


Bummer.  Prepared statements are a huge factor in increasing
performance of your application (in terms of database performance).

I guess this could open up a larger can of worms, but couldn't
standardizing on PEAR or ADODB, both of which support prepared
statements lead to this being support framework wide (i.e. and dropping
the vendor specific drives under model/dbo)?  I.e. code all of your
internal SQL calls (Model::query, all the scaffolding code) to use the
prepared statement methods of either one of those.  They transparently
handle if the underlying RDBMS supports prepared statements or not
(which most do these days), so it would be no extra code on your end.

I guess I don't personally see the benefit of not standarding on PEAR
or ADODB...(doesn't mean I am right, I just don't see it :)   )

On Nov 13, 10:40 am, "nate" <[EMAIL PROTECTED]> wrote:
> Things like bind parameters and prepared statements are driver-level
> optimizations, which aren't super high priorities; but if you can
> implement them consistently across all drivers, or transparently in
> one, we're all for it.
>
> If you'd like to submit an optimization patch for a particular driver,
> we'd certainly look at implementing it.


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



Re: Bind parameters in DB layer

2006-11-13 Thread nate

Things like bind parameters and prepared statements are driver-level
optimizations, which aren't super high priorities; but if you can
implement them consistently across all drivers, or transparently in
one, we're all for it.

If you'd like to submit an optimization patch for a particular driver,
we'd certainly look at implementing it.


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



Re: View Caching issues

2006-11-13 Thread nate

It could be how you have your URLs set up in $cacheAction.  Paste your
controller and view code to http://bin.cakephp.org/ and post the link
back here so we can see what it is that you're doing.


--~--~-~--~~~---~--~~
 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: generateList()

2006-11-13 Thread Mikee Freedom

Hey Christoph,

I'm pretty sure this topic was covered not long ago. Do a quick search
on the google groups for generateList and you'll find some interesting
conversations.

http://groups.google.com/group/cake-php/search?group=cake-php&q=generateList&qt_g=1&searchnow=Search+this+group

cheers,
mikee

On 14/11/06, Christoph <[EMAIL PROTECTED]> wrote:
>
> So no one knows how/if something like this can be done?  I was hoping
> someone would...
>
> thnx,
> Christoph
>
>
> >
>

--~--~-~--~~~---~--~~
 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: Getting data from "hasMany" relationship.

2006-11-13 Thread Mikee Freedom

Morning TWIOF,

You might want to look at your level of recursion for your blog model.
If the associations are in place correctly you should be able to
retrieve all of the related images when you do a findAll on your blog
model.

try

$this->Blog->recursive = 2;

in your controller or

$recursive = 2;

in the attribute definition portion of your model.

HTH,
mikee

On 14/11/06, TWIOF <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I've got a custom model function that gets titles to blog posts (and
> their "belongs to" data e.g. author). I have related images as
> "hasMany" but can't call them in a simple fashion...
>
> I'm using this in the model:
>
> $fields = array('blog.title', 'blog.date', 'author.name');
> return $this->findAll($conditions, $fields, $order, $limit, null, 0);
>
> This doesn't retrivev data from "hasMany" models, so  then I use
> another function in the Images model to get the relevant images.
>
> Is there a way to do it all in the blogs model? Or have I done
> something wrong?
>
> Thanks in advance
>
> TWIOF
>
>
> >
>

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



2 noobie questions

2006-11-13 Thread Christoph

I'm still trying to figure cake out and I've a few questions, both
about varying degrees of code re-use.  Let me say first that I created
the MVC for all of my database tables using bake.php.  I must say, it
is a *very* handy utility for those just learning.

1) Let's say I have 2 sections of my site.  One is to display the
site's user list and another to display the site's news.  Both sections
are working and has the layout just how I want it.  Yay, go me.  Now I
want to add a 3rd section to my site.  Let's call it "What's New".  On
that page, I want it to show only the last 2 news items and the 5
newest members.  Now, I could create the view for this page by copying
and pasting the code from the view for the other 2 sections (news,
users), but if I make a layout change to one, I have to also make it on
the other.  I'm sure you can see where I'm going with this.  Is it
possible to tell a controller to use multiple views?  It's own and also
any other?

2) When using bake.php, it creates the basic CRUD actions.  Even if you
don't use bake.php, the MVC principle (as it relates to a DB driven
site) encourages that you create your own CRUD actions.  I have a
slight issue with this (in general) and also how bake.php goes about
creating the actions (more specifically).  When implementing the
actions for the "C"reate and "U"pdate actions, it creates 2 separate
methods in the controller.  Why?  They are both essentially performing
the same action.  The only difference is whether or not the form fields
are pre-filled and whether it is an UPDATE or an INSERT query once the
form is posted.  The existence (or not) of the primary key can be used
to control that behavior.  Why have that redundant code; why have 2
methods/actions that look practically identical?

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: generateList()

2006-11-13 Thread Christoph

So no one knows how/if something like this can be done?  I was hoping
someone would...

thnx,
Christoph


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



Getting data from "hasMany" relationship.

2006-11-13 Thread TWIOF

Hi everyone,

I've got a custom model function that gets titles to blog posts (and
their "belongs to" data e.g. author). I have related images as
"hasMany" but can't call them in a simple fashion...

I'm using this in the model:

$fields = array('blog.title', 'blog.date', 'author.name');
return $this->findAll($conditions, $fields, $order, $limit, null, 0);

This doesn't retrivev data from "hasMany" models, so  then I use
another function in the Images model to get the relevant images.

Is there a way to do it all in the blogs model? Or have I done
something wrong?

Thanks in advance

TWIOF


--~--~-~--~~~---~--~~
 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: View Caching issues

2006-11-13 Thread Rory

Hi Todd

Yes - I did forget to mention that - but I have done it - to no effect
:(. I have also set the permissions to 777 on app/tmp - but I have not
seen any results one way or the other.

Rory


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



Bind parameters in DB layer

2006-11-13 Thread kickdaddy

Looking through the cake code and the SQL it generates, I noticed bind
parameters missing.  What is the plan for utilizing bind parameters in
both the scaffold/auto-discover code and in our own SQL calls (like
findBySQL and Model::query)?  Is that coming in 1.2 or 2.0?

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: Need freelance help with cakephp project

2006-11-13 Thread [EMAIL PROTECTED]

Hello, i am very interested in this but can you provide me more info.
about your project?


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



Re: Cake PHP Vs Prado Vs Symfony

2006-11-13 Thread Jon Bennett

> I actually feel the opposite :) IMHO CakePHP is better suited for bigger
> projects, but it always comes down as to what developers like really. Just
> two days ago I did a stress testing of an application I built with Cake on
> two small servers: a LAMP on a Pentium 3 GHz, 2 GB RAM and on a WinXP,
> Apache2, PHP 5.1, Mysql on a Pentium Dual 2.6 GHz with 1 GB RAM and I was
> astonished with the great outcome (and believe you me, I was expecting a
> lot.)

care to share the results?

jb


-- 


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

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



RE: Cake PHP Vs Prado Vs Symfony

2006-11-13 Thread Mariano Iglesias

I actually feel the opposite :) IMHO CakePHP is better suited for bigger
projects, but it always comes down as to what developers like really. Just
two days ago I did a stress testing of an application I built with Cake on
two small servers: a LAMP on a Pentium 3 GHz, 2 GB RAM and on a WinXP,
Apache2, PHP 5.1, Mysql on a Pentium Dual 2.6 GHz with 1 GB RAM and I was
astonished with the great outcome (and believe you me, I was expecting a
lot.)

When I said symfony lures I ment more the target that symfony seems to be
after, not that it was something negative. When it comes down to
development, semantics should not be an issue :)

As to your PDF remark well you do have PDF manuals for cake as well. You've
just gotta look for them:

http://cakeforge.org/projects/cakedocs/

I use this PDF constantly while I'm developing just as you do with
symfony's.

One other thing about Cake is the active involvement of almost all cake's
developers. How many times can you say you drop in your question on an
eGroup and get almost immediate answers? Not that often, I imagine. I manage
a Java Users Group for Latin America and it is not easy to find developers
willing to help others.

But I do agree with you. There's no black and white on deciding on a
particular framework. Some people like Symfony better, while others enjoy
working with CakePHP. It can be a number of things that make you decide on
one framework over the other, from the most understandable (I need to keep
supporting a PHP4 environment, or I like better Cake's approach to the MVC
than that of symfony) to the most unusual ones (Cake just sounds way cooler
than symfony, or I don't use Cake because I stay away from dairy.)

-MI

-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Bert Van den Brande
Enviado el: Lunes, 13 de Noviembre de 2006 03:51 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Cake PHP Vs Prado Vs Symfony


I've been using both Cake and Symfony at the same time, and I think
they are both great frameworks with some up- and downsides attached,
which may not even be downsides or upsides depending on your point of
view.

Typically, it's all a matter of requirements and preferences ... while
I believe it's true that Cake is great for quick development, I feel
more comfortable with Symfony for a bigger project.

Stating that Symfony is trying to 'lure' app developers into using it
seems like sort of a negative remark that it don't deserves, as I do
find for myself that Cake is missing some extensive documentation.
To be practical: when coding in Symfony I have the Symonfy
documentation in .pdf open all the time, and some quick searches
usually lead me to the correct info in a matter of seconds. With Cake,
I need to figure out the correct section of the online manual, and
then most of the time I need to go to the google groups and hope to
find some proper documented answers.

As for the ORM part I am a strong supporter of Propel for years, but I
also see the power of the Cake approach where lots of query results
are at instantly available. One should of course take into
consideration the extra load Propel-usage puts onto your application @
runtime, where on the other hand Cake is very lightweight.

Cake's approach to convention over configuration is very good, and I
also tend to dislike dozens of configuration files all over the place
like you will have with Symfony. On a downside, Cake's documentation
lacks some convention info which often has cost me valuable time
trying to find out the reason for some behavior.

So in the end, as I said, it's all a matter of requirements and
preferences, and deciding what's best for your project ...


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



Delete and HABTM associations

2006-11-13 Thread Gonçalo Marrafa

Hi, bakers.

I've posted this question on the group before but had no conclusive
response.

When i try to delete a record from a model that has a HABTM association
with other model(s), the records in the join table are deleted _after_ the
record in the model. As the records in the join table have foreign key
constraints for the record in the model, when the latter is deleted first
i get constraint violation errors. 

Is this a bug or am i missing something? Right now, for delete to work i
have to delete all the association records in beforeDelete().

Best regards.

-- 
Gonçalo Marrafa <[EMAIL PROTECTED]>

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



Re: View Caching issues

2006-11-13 Thread ToddG

You did enable it in app/config/core.php too right? You didn't
specifically say so...

define('CACHE_CHECK', true);

Also your cached views should be next to your models --
app/tmp/cache/views/*

Make sure that directory is read/writable by your webserver process...


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



View Caching issues

2006-11-13 Thread Rory

Hi All

I have a question with regard to view caching. RTFM, STFW, STFA have
not helped me so far, so I was wodnering if there would be someone who
could put me out f my misery.

I am using Cake 1.1.8 with MySql in a *nix environment. I have enabled
view caching as per the manual (using the helper and $cacheAction) in
the relevant controllers. My reasons for believing that nothing is
working is as follows:

1) With Debug set to two, I can see that the DB is still being queried.
The times for these queries vary with each page load, so I know that I
am not just seeing a "snapshot" of query times when the page was
cached.

2) I can't find where Cake is storing the cached files. It stores the
model caches in app/tmp/cache - would it store the view caches there as
well? Or would they use seperate paths?

Can anybody tell me what I am doing wrong?

Regards

Rory


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



Italian CakePHP Developers?

2006-11-13 Thread Samuele Coppede

There are here italian CakePHP Developers?

if yes contact me at [EMAIL PROTECTED]

bye bye


--~--~-~--~~~---~--~~
 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 freelance help with cakephp project

2006-11-13 Thread Gayathiri

Hi, I am interested in the project on cakephp. I am currently working
on cakephp. my mail id is [EMAIL PROTECTED] you can mail me
anytime for any details.


--~--~-~--~~~---~--~~
 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: Avoiding binary data overwrite when updating model...

2006-11-13 Thread Daniel Jewett

Thank-you Mr. Van den Brande!

On Nov 13, 2006, at 2:39 AM, Bert Van den Brande wrote:

>
> In the fieldlist you can put a list of fields the query is allowed  
> to update.
> So in your case, remove the 'image' field from the whitelist when the
> image data is empty
>
> On 11/13/06, Daniel Jewett <[EMAIL PROTECTED]> wrote:
>>
>> Hello all,
>>
>> I have a form for Model 'Item' that includes a file upload widget to
>> get image data into a database. When I want to edit the data, how can
>> I avoid having the binary data overwritten if the file upload is
>> empty (null)? In other words if I'm not replacing the image I don't
>> want the update to erase it.
>>
>> Looking at:
>> Model::save (
>> $data = null,
>> $validate = true,
>> $fieldList = array()
>> )
>>
>> Thanks,
>> Dan J.


--~--~-~--~~~---~--~~
 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: Default controller?

2006-11-13 Thread kumas

i.e:

  $Route->connect ('/', array('controller'=>'Mycontroller',
'action'=>'myaction'));


--~--~-~--~~~---~--~~
 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: Default controller?

2006-11-13 Thread kumas

Pagescontroller is the default controller. If you want to use your own
controller/action for the default route (/) you should change it in the
app/config/routes.php file.

More info in the Section 3 of configuration chapter of cakephp manual..

http://manual.cakephp.org/chapter/configuration


Christoph yazdı:
> > What's the best way to accomplish this?I'd stick that sort of stuff in 
> > AppController (/app/
> > app_controller.php) as class variables or methods, or in /app/config/
> > bootstrap.php.
>
> What's the controller that's using the view
>
> webroot/views/pages/home.thtml
>
> ?
>
> There are other models/controllers that I would like to use on my home
> page.  News, for example.  Is there any way to do this?  Or am I going
> to have to set up my own HomePageController and set up index.php to
> redirect to /homepage?
> 
> thnx,
> Christoph


--~--~-~--~~~---~--~~
 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 some suggestions for medium sized application

2006-11-13 Thread francky06l

Hi,

I did something similar in concept but completly different purposes. In
your case you need to define what is the central element there, is it
the tank or the microstation ?
All the other entities are actors around the base element.
Now I my application I have 4 differents "roles" for the user, and they
do not see the same things. Apart from the admin role, they all see
views starting from the "base" element.

The essential is to find out what you want to track, what will be kept.
I do not completly understand the "tank" in your schema, is the tank a
kind of "directory of parts", or you want to track each tank
individually ? In this case this would be your "central base" elements,
the microstation will be the "container" of the base, and your "roles"
will have a different "view" of these "containers" ..

Hope this help a bit ..


--~--~-~--~~~---~--~~
 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: A strange but very critical bug in my app using cake ajax

2006-11-13 Thread AD7six

I didn´t say anything about your problem only occuring when you call
the add function in your controller, moreover I have no idea what your
code is doing.

I would advise taking a look at the table before and afterwards, and
based on that if there is a strange delete or update statement in the
SQL (you have set debug to 2 and been looking at the executed sql,
haven't you?) track down the reason. You can figure that out from the
ids of the rows if there has been a delete or an insert.

If you can't find the reason, paste some code in the bin
(http://bin.cakephp.org) the cause is probably due to some
'none-conventional' way of working. Unless you are talking about HABTM
relationships, but without details I'll stop guessing ;).

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.org).

On Nov 9, 8:36 pm, "PD" <[EMAIL PROTECTED]> wrote:
> AD7six,
>
> Thanks for your response. I checked the code. I am still not able to
> solve this. Because this is happening when I edit a category also. If,
> as you said, my existing category is being overwritten, then while
> editing, I should end up in 2 categories with the same name. But what
> happens is that I loose one. And the category I loose is not
> necessarily the one I edited. Usually its not. So what you said would
> only apply to adding a new category.
>
> The category list page is completely Ajax. There is a list of all
> categories on this page. When you click edit on any category, The view
> changes to edit form for that category. Then when you save, the edit
> form disappears and the view mode of that category appears again with
> the changed data. It is during this operation where I loose the
> category.
> 
> Thanks again for your reply.


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