Need help with linked tables

2007-01-09 Thread Tony Lambiris

The way my app works is I have three tables: users, systems and games.

users relates to systems
systems relates to games
users does not relate directly to games

When I am in my User controller, I want to be able to issue a command
like this:
$this->User->System->find("ps3")
and have it return a list of games based off PK systems.id (which
equals games.system_id).

In my models (user.php, system.php and game.php), I have the following
(respectively):

class User extends AppModel {
  var $name = 'User';
  var $hasMany = array('System');
}

class System extends AppModel {
  var $name = 'System';
  var $hasMany = array('Game');
  var $belongsTo = array('User');
}

class Game extends AppModel {
  var $name = 'Game';
  var $belongsTo = array('System');
}

When I try to access my User controller, I get the error:

Fatal error: Class 'Game' not found in
/vhosts/site/cake_1.1.12.4205/cake/libs/model/model_php5.php on line
438

Any ideas? Im kinda new to the MVC world, so it's kind of confusing to
me. I read some where scaffolding helps sort these out visually.

TIA.


--~--~-~--~~~---~--~~
 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: IIS Revisited

2007-01-09 Thread UpWorks

So it all works except on form actions

i am getting action="/hard directory on
server/mysite/index?/users/register/

what controls this path in a form action, is it in form.php?


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



Re: Multi-Page Form and mySQL Updates

2007-01-09 Thread devon

Thanks for your good suggestions. The test is on it's 3rd rev and is
where it should be, I think, in terms of layout and simplicity. It's
just volume and time constraints. Students need to finish in 30 mins
and I can't have any tech issues distracting them. I'll look into the
validation you've suggested.

Devon


--~--~-~--~~~---~--~~
 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 and mySQL Updates

2007-01-09 Thread Langdon Stevenson

Hi Devon

I built the validation system myself using one of the advanced 
validation patterns listed in the various Cake blogs.  The bottom line 
though was that when validation ran, it checked to see which screen had 
submitted the information, and only processed validation for that screen 
(no need to validate data from previous screens as it must be good since 
it made it to the database/session).

I can't really give you code examples sorry as it was some time ago that 
I built it and it would take me quite a while to dig it up and work out 
the various parts.

Hope the above is of some use though.

If however your problem is complexity in the page causing the users to 
make mistakes when entering the data, then I would strongly suggest 
revising the page.  Perhaps break it up into more parts, or have a hard 
think about the layout and words that you use.  These things may also 
contribute.

Regards,
Langdon


> If you could point me at the validation scheme you used it would be
> great. The issue here is that there is so much data input required for
> the students that I don't want the interface getting in the way with
> too much validation. I had validation wall to wall, and on the
> walkthrough because of the number of answers required there was a lot
> of red flying. Lot's of room for error and lost time for them. 

--~--~-~--~~~---~--~~
 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 and mySQL Updates

2007-01-09 Thread devon

Hello John

"Why not use the database? " I am using the database, but it creates a
new record each time I submit. Perhaps it's a case of a newbie mySQL
developer in over his head. Your response does seem professorial
though. Am I missing something obvious?

The edit functionality that is part of the crud facility. Updates are a
breeze there, but I am looking for a best practice.

I've seen a few posts re: this type of wizard-like application here and
elswhere , but I've never found any definitive solution in php. Seems
like some sort of session containment object would do it. Thanks for
you reply.

Devon


--~--~-~--~~~---~--~~
 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 and mySQL Updates

2007-01-09 Thread devon

Hi Langdon

If you could point me at the validation scheme you used it would be
great. The issue here is that there is so much data input required for
the students that I don't want the interface getting in the way with
too much validation. I had validation wall to wall, and on the
walkthrough because of the number of answers required there was a lot
of red flying. Lot's of room for error and lost time for them. 

Devon


--~--~-~--~~~---~--~~
 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 table not working!

2007-01-09 Thread dani

Think I might have narrowed it down:

Is it that I can't generate divs dynamically, i.e. using ", when using ajax links???

What's the approach then, when I want multiple "ajax divs" in a foreach
table?

Send the div id:s in a header some way?


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



Re: Simplify foreach() - unpleasant array

2007-01-09 Thread dani

OK, thank you!

Then I see the point ...

On Jan 10, 12:47 am, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> Using $reservation['Reservation']['number'];  is correct.  This is
> because each retrieved row may have associated models - ie
> $reservation['Room'] etc.


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



Re: Multi-Page Form and mySQL Updates

2007-01-09 Thread Langdon Stevenson

Hi Devon

I had a similar problem with a recent project.  As a result I developed 
a "wizard" much like yours to do the job.

As the user progresses through the wizard the information that they have 
entered is saved progressively.  In some cases I had to build some 
special validation to allow this to work, but on the whole it wasn't too 
bad.

So if you need to be able to maintain the state of the data across 
multiple sessions, the my solution for you would simply be: each time 
the user submits a page, save the record and use progressive validation 
to avoid errors.

Regards,
Langdon


> I have developed a form in Cake which contains several hundred
> questions. It will be used for a certification test when complete. The
> length of the form has required categories separated into 7 individual
> pages.

--~--~-~--~~~---~--~~
 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 and mySQL Updates

2007-01-09 Thread John David Anderson (_psychic_)


On Jan 9, 2007, at 4:09 PM, devon wrote:

>
> I have developed a form in Cake which contains several hundred
> questions. It will be used for a certification test when complete. The
> length of the form has required categories separated into 7 individual
> pages.
>
> Cake's database sessions do a good job maintaining state through to  
> the
> final submit page, but I need to enable the user to save each  
> individal
> page and return later if he/she so requires. The problem is to not
> create a new record for each category saved.

Why not use the database?

> Basically I need update
> capability on top of the normal add functionality in the controller.
> The user needs to be able to login later and return to where they left
> off and continue to completion.
> I've Googled and have not come up with the practical solution I'm
> looking for. I've thought of rerouting the edit mode to suit, or
> perhaps write a component. What is the best practice?

What do you mean "edit mode" and "add functionality" ?

-- 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: Simplify foreach() - unpleasant array

2007-01-09 Thread Grant Cox

Using $reservation['Reservation']['number'];  is correct.  This is
because each retrieved row may have associated models - ie
$reservation['Room'] etc.


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



Ajax in table not working!

2007-01-09 Thread dani

The content of my div just reloads when i press my ajax-link:

$tableData =

"" . $html->input("Reserve/...") .
$ajax->link("Reserve", "/reservations/update_reservation/",
array('update' => 'ajax_reserve$i', 'loading' =>
"Element.hide('ajax_reserve$i')", 'complete'=>"new
Effect.Appear('ajax_reserve$i')")) . "";


echo $html->tableCells($tableData);

Is'nt it possible to have ajax content divs within a td?

A static div with the same link code outside the table works alright!


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



Multi-Page Form and mySQL Updates

2007-01-09 Thread devon

I have developed a form in Cake which contains several hundred
questions. It will be used for a certification test when complete. The
length of the form has required categories separated into 7 individual
pages.

Cake's database sessions do a good job maintaining state through to the
final submit page, but I need to enable the user to save each individal
page and return later if he/she so requires. The problem is to not
create a new record for each category saved. Basically I need update
capability on top of the normal add functionality in the controller.

The user needs to be able to login later and return to where they left
off and continue to completion.
I've Googled and have not come up with the practical solution I'm
looking for. I've thought of rerouting the edit mode to suit, or
perhaps write a component. What is the best practice?

Thanks.

Devon


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



Leading blank in XML

2007-01-09 Thread Preloader

Hello bakers,

I tried Cake's webservices routing. I want to generate XML interfaces
for the use in Flash. I'm using the recent version of CakePHP 1.2 and
the great XML helper for building the output.

And here comes my problem: Cake seems to print out a single leading
blank before the XML declaration, which I get from $xml->header(); I
only figured that out because Firefox didn't recognize the file as
valid XML.

Any hints??

Greetings, 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: Association problem

2007-01-09 Thread John David Anderson (_psychic_)


On Jan 9, 2007, at 12:48 PM, Alessandro Nuzzo wrote:

>
> I have some problems to understand the association.
> For example, I have a model 'User' and model 'Address'.
>
> User:
>  - id
>  - bla bla bla
>  - office_address : int -> address.id
>  - home_address : int -> address.id

Stick this in your model.

var $belongsTo = array('HomeAddress' =>
array('className'  => 'Address',
  'conditions' => '',
  'order'  => '',
  'foreignKey' => 'home_address'
),
   'OfficeAddress' =>
array('className'  => 'Address',
  'conditions' => '',
  'order'  => '',
  'foreignKey' => 'office_address'
)

  );

(This info can be found in http://manual.cakephp.org/chapter/models )

-- 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: Association problem

2007-01-09 Thread Samuel DeVore

Here is an example from a project I have that is similar

Model JobMaterial
var $belongsTo = array(
'Client'=>  
array('className'=>'Client','foreignKey'=>'client_id'),
'Photographer'  =>  
array('className'=>'Client','foreignKey'=>'photographer_id'),
'Billto'=>  
array('className'=>'Client','foreignKey'=>'billto_id'),
);

Model Client

var $hasMany = array(
'JobMaterial_Client'=>  
array('className'=>'JobMaterial',
'foreignKey'=>'client_id'),
'JobMaterial_Photograper'   =>  
array('className'=>'JobMaterial',
'foreignKey'=>'photographer_id'),
'JobMaterial_Billto'=>  
array('className'=>'JobMaterial',
'foreignKey'=>'billto_id'),

);

see if that gives you a hint


On 1/9/07, Alessandro Nuzzo <[EMAIL PROTECTED]> wrote:
>
> I have some problems to understand the association.
> For example, I have a model 'User' and model 'Address'.
>
> User:
>  - id
>  - bla bla bla
>  - office_address : int -> address.id
>  - home_address : int -> address.id
>
> How can I define association between this 2 models?
>
> Thanks a lot!
>
> >
>


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



Simplify foreach() - unpleasant array

2007-01-09 Thread dani

Controller:
$this->set('reservations',$this->Reservation->findAll());

View:
foreach($reservations as $reservation) {
echo $reservation['Reservation']['number'];
}

Can I make this:

echo $reservation['number'] - instead?

I've tried foreach($reservations['Reservation']) but it seems to me I
have to have foreach($reservations[i]['Reservation'])!?

Array
(
[0] => Array
(
[Reservation] => Array
(
[id] => 1
[created] => 2007-01-08
)

)

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



Association problem

2007-01-09 Thread Alessandro Nuzzo

I have some problems to understand the association.
For example, I have a model 'User' and model 'Address'.

User:
 - id
 - bla bla bla
 - office_address : int -> address.id
 - home_address : int -> address.id

How can I define association between this 2 models?

Thanks a lot!

--~--~-~--~~~---~--~~
 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: Objects, Models and Arrays - need a better picture

2007-01-09 Thread mariano.iglesias

Can you just let me be "in the loop"? ;)

Getting a life outside of Cake... oh well, that definitely seems like a
challenge... Take me... I'm on the beach, on my vacation, but while
being there I'm either wearing my Cake cap or my Cake t-shirt... Talk
about evangelization :)

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



How to use the new Cake PHP i18N and l10N

2007-01-09 Thread Sebastian Macias

Can anybody post a short example of this new feature usage?

I found this in the bakery:

"Its mostly automagic, just use the __() method to wrap your static
text. Then put some po in the locale and get jiggy with it. You can see
it in action now[5], the site should display in the language your
browser sends through HTTP_ACCEPT_LANGUAGE if we have the translation.
You can see the current languages we have[6]. If you would like to
translate to a language we do not currently have you can use the
default file[7]"

But I haven't really been able to figure out what I need to do to get
it working.

Thanks,

Sebastian Macias


--~--~-~--~~~---~--~~
 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: More Cake Magic in the future?

2007-01-09 Thread Pablo Viojo
At last you can use Cake in the way you like it. For instance you could use
only the dispatcher and controller functions and work the DB communications
and view generation your own way (even using other tools).

Just my thoughts.

-- 
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net

On 1/9/07, Veloz <[EMAIL PROTECTED]> wrote:
>
>
> That sounds good to me too
>
> I've had the unusual luxury, due to a lull in office work, to compare
> several php frameworks, side by side and pretty in-depth. Ultimately it
> came down to Zend and to Cake.
>
> Honestly our group would have chosen Zend over Cake if Zend had been a
> little further along in its development. Cake is a wonderfully crafted
> tool, but all of us are seasoned developers who could be categorized as
> "once bitten, twice shy" when it comes to software solutions that try
> too hard to "help you" :-)  or that appear to be headed that way in the
> future..
>
> We were drawn to Zend's transparency -  you have to write more code (at
> least for the bootstrap) than you do in Cake, but what you see is
> pretty much what you get - there's very little that happens in the
> framework that you don't specifically ask for in your code.  This is
> not to say that it's not powerful, it's to say that  the "car won't
> move unless you turn the key and put it into gear" lol.
>
> Anyway, I would love to share with a dev discussion list what I think
> are the strengths of both products for the purpose of possibly
> improving Cake.
>
> Michael
>
>
> >
>


--~--~-~--~~~---~--~~
 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: when hasone association is used, find() returns nothing

2007-01-09 Thread anselm

>
> class User extends AppModel {
> var $name = 'User';
> }
>
> class Review extends AppModel {
> var $name = 'Review';
>
> var $hasOne = array('User' =>
> array('className' => 'User',
> 'conditions' => '',
> 'order' => '',
> 'dependent' => false,
> 'foreignKey' => 'user_id'
> )
> );

I don't know if this is your problem, but it looks like you should be
using 'belongsTo' instead of 'hasOne'. If a review has one user, then
the user should have a field 'review_id'. What you want to say is that
the review belongs to a user (ie. review has a 'user_id') field.

To remember this, think in terms of 'hasMany' -- if a review has many
users, then the review would need many 'user_id' fields -- which
doesn't work, therefore the field has to be in User (review_id).
'hasOne' is just a special case of 'hasMany'.

Hope this makes sense,
Anselm


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



limit() function for mssql

2007-01-09 Thread DJ Spark
 Does somebody knows how to use that limit() function to MSSQL , or if it
should already work in cake1.1.12 ?
 Any findAll() with  Limit is not executed, because it includes the string
LIMIT , not the TOP statement. I checked the adodb code, and it seems to be
implemented (with that goofyLimit = true).
 Ideas ?

 My DB config is like this:

var $default = array('driver' => 'adodb',
'connect' => 'mssql',
'host' => 'HAL\SQLEXPRESS',
'login' => 'sistema',
'password' => 'xxx',
'database' => 'SiteTac',
'prefix' => '');


 Also, the manual lacks examples of using other DBs , as shown here in the
old wiki page:
 http://tinyurl.com/yy2wtj


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


--~--~-~--~~~---~--~~
 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: More Cake Magic in the future?

2007-01-09 Thread Dr. Tarique Sani

On 1/9/07, Veloz <[EMAIL PROTECTED]> wrote:
> Anyway, I would love to share with a dev discussion list what I think
> are the strengths of both products for the purpose of possibly
> improving Cake.

This list, I would say, is pretty much a dev list if the above is what
you want to discuss. Would love to hear your opinions.

Do I hear a nay!

Cheers
Tarique

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

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



Re: Performing controller operations in a view

2007-01-09 Thread anselm

Hi :)

> Currently I'm using the index action of a Jobs controller to list all
> jobs and send it to the index view. The view file then does a quick
> foreach() and prints out some data.
> I need to perform a fairly complex
> operation on one column for each row, which involves data from another
> controller.

You can call controllers using requestAction (see
http://manual.cakephp.org/chapter/controllers ) from wherever you are.
However, people will generally discourage this practice since views are
about how your data is displayed to the user (see the MVC pattern here
http://manual.cakephp.org/chapter/basic_concepts ) and shouldn't need
to know how your application works.

As such people generally try to minize the logic in their views. Of
course some things are done in the views - converting the format of a
date, for instance. In CakePHP this is typically done using helpers
(see http://manual.cakephp.org/chapter/helpers ).

I do not know what you are trying to achieve -- though if you need to
call another controller, I assume this operation is outside of the
scope of a view, and I suggest you pre-process your array in the
controller before sending it to the view. If you think your operation
is within the scope of the view, then create a helper to factor the
operation away, and use 'requestAction' to call your other controller.

Anselm


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



Re: SlideShowPro Director now baked w/ CakePHP

2007-01-09 Thread Toby Parent

BRAD!!! I didn't realize you were here!! WOO-HOO!! The train-wreck of 
two of my favorite web utilities: CakePHP AND SlideShowPro!! I love this 
idea.

Regards,
  - Tobias Parent
 http://www.tobytheballoonguy.com/


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



Re: More Cake Magic in the future?

2007-01-09 Thread Larry E. Masters aka PhpNut
On 1/9/07, Veloz <[EMAIL PROTECTED]> wrote:

> We were drawn to Zend's transparency -  you have to write more code (at
> least for the bootstrap) than you do in Cake, but what you see is
> pretty much what you get - there's very little that happens in the
> framework that you don't specifically ask for in your code.  This is
> not to say that it's not powerful, it's to say that  the "car won't
> move unless you turn the key and put it into gear" lol.


Why build the car before you can put a key in it to drive?
Cake is like car you would order, you just have to choose if you want the
options!

-- 
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access  public
*/


--~--~-~--~~~---~--~~
 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: More Cake Magic in the future?

2007-01-09 Thread Veloz

That sounds good to me too

I've had the unusual luxury, due to a lull in office work, to compare
several php frameworks, side by side and pretty in-depth. Ultimately it
came down to Zend and to Cake.

Honestly our group would have chosen Zend over Cake if Zend had been a
little further along in its development. Cake is a wonderfully crafted
tool, but all of us are seasoned developers who could be categorized as
"once bitten, twice shy" when it comes to software solutions that try
too hard to "help you" :-)  or that appear to be headed that way in the
future..

We were drawn to Zend's transparency -  you have to write more code (at
least for the bootstrap) than you do in Cake, but what you see is
pretty much what you get - there's very little that happens in the
framework that you don't specifically ask for in your code.  This is
not to say that it's not powerful, it's to say that  the "car won't
move unless you turn the key and put it into gear" lol.

Anyway, I would love to share with a dev discussion list what I think
are the strengths of both products for the purpose of possibly
improving Cake.

Michael


--~--~-~--~~~---~--~~
 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: Rock the vote!

2007-01-09 Thread CraZyLeGs

I want a pony!


--~--~-~--~~~---~--~~
 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: More Cake Magic in the future?

2007-01-09 Thread Veloz

That's a good point, Nate, thanks for reminding me of that.

And once the assumptions/auto-magic of methods like "create()" and
"input()" are documented we will all probably feel a little better
about using them.

I am still new to Cake and when I see snippets of Cake code where the
framework is checking for things like fields named "id", and creating
hidden fields on your behalf (something to do with primary keys I
guess) my reaction is "what the heck?"  This reluctance would probably
decrease if I had something closer to a bigger picture of all the magic
that is possible/normal/conventional in Cake..  

Michael


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



othAuth component v0.5.2 and Stable: 1.1.12.4205 go it?

2007-01-09 Thread Petr Vytlačil

Hi,
I want use othAuth component v0.5.2 in Stable: 1.1.12.4205. I test it
but it isnt go. It done redirect when i login. All is good setting,
models, controller, an component, database model.

Befor I use othAuth c. v0.5.2 and older 1.1... cake its go good. But
now with new versions its dont go.

Anybody who have similar problem?


--~--~-~--~~~---~--~~
 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: UTF8, MySQL, and JSON?

2007-01-09 Thread bernardo

You may need to add the parameters to the constructor like

function __construct($id = false, $table = null, $ds = null) {
$this->execute("SET NAMES 'utf8'");
parent::__construct($id, $table, $ds);

Also note that enconding support is already there in 1.2, so you can
just go ahead and modify the core and add  the line $this->execute("SET
NAMES 'utf8'") in dbo_mysql.php. Then when you upgrade to 1.2 you will
just need to add the encoding to the database configuration.


--~--~-~--~~~---~--~~
 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: Admin Controller

2007-01-09 Thread Tijs Teulings


I think there is no magic to auto identify all the available admin actions.
What you are talking about would be kind of neat though...

Tijs


PaulV wrote:
> 
> 
> Hi,
> 
> Having added CAKE_ADMIN functions to several controllers, I would like
> to add an action somewhere so that I can go to the URL /admin/ and get
> an interface screen containing all the various admin actions I can
> call.
> 
> Is there a prefered place to put this admin action (do I have to create
> an admin controller and add a new route)?
> 
> i.e.. $Route->connect('/admin', array('controller' => 'administrators',
> 'action' => 'index'))
> 
>  class AdministratorsController extends AppController {
> 
>  var $name = 'Administrators';
>  function index()
>  }
> }
> 
> Is there a way of automatically finding all the available admin actions
> and their respective controllers short of reading all the php files in
> and searching for the CAKE_ADMIN string in function definitions or do I
> have to manually pick out the available methods and define the action
> effectively statically?
> 
>Paul
> 
> 
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Admin-Controller-tf2944794.html#a8236935
Sent from the CakePHP mailing list archive at Nabble.com.


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



Re: Rock the vote!

2007-01-09 Thread Felix Geisendörfer
Am I the only one how thinks the Symfony framework 
 is not spelled "Sympony"? Maybe the 
framework is not as popular as CakePHP (according to this vote), but I 
think they are well known enough so that polls should at least spell 
their name properly ...

-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


[EMAIL PROTECTED] wrote:
> Well the poll has ended :)
> http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26752,nodeid,5.html
>
> quote:
> 'CakePHP' has beaten all its competitors with a majority of 78.5%
> votes taking home the title of the best PHP MVC Framework. Next in line
> is 'Sympony' with 10.9 %votes.WACT, Achievo, PHPonTrax was last on
> the list as three of them garnered a dismal 0.0% votes each.
>
> The poll question for this week is Benefits of phpbb SEO Master Include.
>
>
> >
>
>   


--~--~-~--~~~---~--~~
 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: Rock the vote!

2007-01-09 Thread [EMAIL PROTECTED]

Well the poll has ended :)
http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26752,nodeid,5.html

quote:
'CakePHP' has beaten all its competitors with a majority of 78.5%
votes taking home the title of the best PHP MVC Framework. Next in line
is 'Sympony' with 10.9 %votes.WACT, Achievo, PHPonTrax was last on
the list as three of them garnered a dismal 0.0% votes each.

The poll question for this week is Benefits of phpbb SEO Master Include.


--~--~-~--~~~---~--~~
 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: More Cake Magic in the future?

2007-01-09 Thread teemow

people choose cake cause they feel comfy with the conventions and the
framework does a lot of good work for lazy developers. But maybe it
would be nice to have a dev discussion list to have a larger base of
developers talking about future magic and/or more convinient solutions
for the whole 'user' base. this doesn't mean i don't feel comfy with
1.2... i just think there are some people who would like to share their
knowledge with cake's core team.

i personally read this list only as a digest, but i would like to have
a dev discussion list with less but more advanced topics about cake
development.


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



Admin Controller

2007-01-09 Thread PaulV

Hi,

Having added CAKE_ADMIN functions to several controllers, I would like
to add an action somewhere so that I can go to the URL /admin/ and get
an interface screen containing all the various admin actions I can
call.

Is there a prefered place to put this admin action (do I have to create
an admin controller and add a new route)?

i.e.. $Route->connect('/admin', array('controller' => 'administrators',
'action' => 'index'))

 class AdministratorsController extends AppController {

 var $name = 'Administrators';
 function index()
 }
}

Is there a way of automatically finding all the available admin actions
and their respective controllers short of reading all the php files in
and searching for the CAKE_ADMIN string in function definitions or do I
have to manually pick out the available methods and define the action
effectively statically?

   Paul


--~--~-~--~~~---~--~~
 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: Container for models,controllers,... -> "extensions"

2007-01-09 Thread [EMAIL PROTECTED]

okay after giving it some rest and thinking about it some more, i think
i've come up with a solution that adds *no overhead at all*

The principle is this: in app/config/core.php or in bootstrap.php the
user could put something like this:
$extensions = array('DAuth','CoolCake'));

This means cake knows there will/should exist app/extensions/d_auth and
app/extensions/cool_cake directories.

If this variable is empty, an empty array or non existing then cake
knows there are no extensions.

Now we create the convention that every class inside an extension has
to be named like this:
Controller.
For example CoolCakeUsersController extends AppController if your
extension is called CoolCake.
there is offcourse the risk that the user might have a
CoolCakeUsersController in hir normal app, but i consider it the
responsability of the programmer of the app and of the extensions to
choose decent names for their classes.

So with a little php code cake can check whether the requested class
starts
with the name of an extension, *and* has a name after that, so it can
be sure about the directory in which, and the file that it has to open.
It doesn't have to *search* in directories.  So actually this is even
more performant than specifying additional directories with
$controllerPaths and the likes.

The only potential problem is having twice the same name for a class,
but that problem would be the same when you just "merge in" code into
your app.  It's the responsability of the 3rd party distributor to
choose pretty unique names.  (and extensions will usually have a pretty
unique name anyway, since they are in fact some library that is able to
perform a special function -> a good name can be choosen)

the mechanism i explained would ofcourse also i apply to
models,components,helpers,...


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