Re: passing values when constructing a "new" object from a model

2006-07-18 Thread Langdon Stevenson

Thanks Ad7six.  I am still getting to grips with objects and how to work 
with them in Cake.  My previous Struts experience is clouding things a 
bit for me.

Regards,
Langdon


AD7six wrote:
> Hi Langdon,
> 
> A Model represents a table, or type of object, not an instance of an
> object.
> 
> Most likely: The arguments are not being passed because when the models
> for your controller are created - that's before your Feedback
> controller method has run, and it is created with no arguments.
> 
> Assuming that the purpose was to set some default values, see:
> http://www.cakephp.org/search?q=default+values
> 
> As a side noe: It's not really a good idea to override the constructor
> for any class in cake without calling the parent (Note that due to cake
> wizardry the _construct method works in PHP4)
> 
> HTH,
> 
> AD7six

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



Re: passing values when constructing a "new" object from a model

2006-07-18 Thread AD7six

Hi Langdon,

A Model represents a table, or type of object, not an instance of an
object.

Most likely: The arguments are not being passed because when the models
for your controller are created - that's before your Feedback
controller method has run, and it is created with no arguments.

Assuming that the purpose was to set some default values, see:
http://www.cakephp.org/search?q=default+values

As a side noe: It's not really a good idea to override the constructor
for any class in cake without calling the parent (Note that due to cake
wizardry the _construct method works in PHP4)

HTH,

AD7six


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



Re: Adding new model

2006-07-18 Thread John David Anderson (_psychic_)


On Jul 18, 2006, at 9:38 PM, D Smith wrote:

> I am new to cake php and do not know how to add a new model/controller
> that is not particularly related with some table.For example a search
> module
> which can pick its data from multiple tables.

For models with no tables, stick in:

var $useTable = false;

For controllers with no models, stick in:

var $uses = null;

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



Adding new model

2006-07-18 Thread D Smith

I am new to cake php and do not know how to add a new model/controller
that is not particularly related with some table.For example a search
module
which can pick its data from multiple tables.

Could anyone help me on this topic.

Thanks in advance


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



passing values when constructing a "new" object from a model

2006-07-18 Thread Langdon Stevenson

Hi

I have a model called Commitment with a method called Commitment that 
performs some basic set-up for the new Commitment object.


class Commitment extends AppModel
{
   var $name = 'Commitment'; //for php4
   var $belongsTo = 'Actionplan';

   var $actionplan_id;
   var $action_area;
   var $order;

   function Commitment($actionplanId, $actionArea, $order)
 $this->actionplan_id = $actionplanId;
 $this->action_area = $actionArea;
 $this->order = $order;
   }
}


I expect that I should be able to create a new Commitment object from my 
controller, like this:


class FeedbackController extends AppController
{
   var $name = 'Feedback'; //for php4
   var $uses = array('Commitment');

   function index () {
 $commitment = new Commitment(300, 1, 0);
 print_r($commitment);
   }
}


I am passing the required arguments for the set-up function, however 
when I call feedback/index I get the following errors:

Warning: Missing argument 1 for commitment() in 
/dev/app/models/commitment.php on line 39

Warning: Missing argument 2 for commitment() in 
/dev/app/models/commitment.php on line 39

Warning: Missing argument 3 for commitment() in 
/dev/app/models/commitment.php on line 39


Looking through the Cake code, I can see other instances of "new" being 
used to create objects an including arguments, so I am unsure why it 
won't work in my case.

Can anyone suggest why the arguments aren't being passed successfully to 
the model?

Thanks in advance for any assistance.

Regards,
Langdon

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



Re: Hosting (i.e. Dreamhost)

2006-07-18 Thread Jason Lee

On 7/18/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
> Is anyone else here using Dreamhost to host CakePHP projects?

I currently host three applications on Dreamhost and will probably add
at least 2 or 3 more by the end of the year if development goes as
planned.  Recent hardware debacle notwithstanding, I've been pretty
happy with them.  You can play with the public portion of one of the
apps (I have the same app on two (sub)domains, and a third app on my
family website, which I don't advertise too much publically for
obvious reasons ;) at

http://early.qsbc-ym.org

I'll grant that it's no eBay, but performance has been good enough for
me.  For what that's worth... ;)

-- 
jason lee
http://www.steeplesoft.com
http://blogs.steeplesoft.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
-~--~~~~--~~--~--~---



Hosting (i.e. Dreamhost)

2006-07-18 Thread John Zimmerman [gmail]
I have recently consolidated a bunch of the websites I have been working on to Dreamhost, mainly because I originally planned to port some of them to Rails before I came across CakePHP.Dreamhost has been giving me headaches reguarding phpMyAdmin crapping out, their own control panel being unresponsive, email being significantly delayed, email being rejected when sent through their SMTP server, and most importantly MySQL performance is intermittently horrible.  Sometimes the database connection or lack there of causes a site to stop loading completely.
Anyway, I have two questionsIs anyone else here using Dreamhost to host CakePHP projects?What would you recommend for a web host if you do not use Dreamhost?My main reason for going with dreamhost was Rails support and shell access via SSH.  I also like their ability to host many domains under one login.  Rails support is no longer a necessity.
One shared setup I am looking at is http://www.resellerzoom.com/ which is the reseller portion of hostingzoom.  Any one have experience with them?Any information is appreciated.


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


Re: search functionality for whole website

2006-07-18 Thread bingo

Thanks

Got working with the above approach.

Regards,


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



Re: Time Zone ?

2006-07-18 Thread ryanb006

I've used this before (example is US Central Time) in my own
applications, not in Cake PHP.



Ryan


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



Re: Automatically Select Option in Edit Function

2006-07-18 Thread BlenderStyle

Ah, I found my problem. I was doing this:
$html->selectTag('/User/locked', $locked_options, null, null, null,
false);

I should have done this:
$html->selectTag('User/locked', $locked_options, null, null, null,
false);

The forward slash in the field name was messing me up. Thanks for your
help.


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



Re: search functionality for whole website

2006-07-18 Thread gwoo

class SearchController extends AppController {

var $name = 'Search';
var $uses = array('Model1','Model2','Model3');

function results() {

$results = array();
$conditions = $this->params['url']['searchfieldname'];
$results[] = $this->Model1->findAll($conditions);
$results[] = $this->Model2->findAll($conditions);
$results[] = $this->Model3->findAll($conditions);

$this->set('results', $results);
 }

}

hows that look?

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



search functionality for whole website

2006-07-18 Thread bingo

hi,

I am new to CakePHP and wondering where the function such as "search"
should be implemented. I have 5 tables and want to use single search
box. On submit it should call the search function which basically call
appropriate search function for 5 tables and display the results in a
view.

Regards


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



Re: Automatically Select Option in Edit Function

2006-07-18 Thread Grant Cox

So, you want to pre-populate the selectBox with the existing Model
value?  This depends on how you are getting your User data from your
controller.  If you have

$user = $this->User->read( null, $user_id );
$this->set( 'user', $user );

Then in your view you want:

selectTag('User/locked', array('y'=>'Yes',
'n'=>'No'), $user['User']['locked'], null, null, false); ?>


However, I personally think it is better to let Cake automatically
prepopulate, and it does this from the $this->data array.  So, in your
controller have:

$user = $this->User->read( null, $user_id );
$this->data = $user;

And in your view just have:

selectTag('User/locked', array('y'=>'Yes',
'n'=>'No'), null, null, null, false); ?>


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread AD7six

Looks quite recursive to me ;)

http://groups.google.com/group/cake-php/browse_frm/thread/017b0e9ed9574bc5/9b8bc6e5005bf57d#9b8bc6e5005bf57d

cheers,

AD7six


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



Re: requestAction() causing infinite loop in AppController->beforeFilter()

2006-07-18 Thread AD7six

Hi Devo,

The reqestAction will be run for all controllers, including the login
controller within the requestAction call, hence the loop.

You need only introduce some logic to break the chain e.g. define the
beforeFilter in your login controller and DON'T call the parent.

HTH,

AD7six


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



Best approach for MCV

2006-07-18 Thread Mini Mouse

Greetings and salutations.

I'm trying to find the best approach for this.

I've got the following models:
 User (defines what a user is)
  Has a Group.id
 Group
 Account
 Department
 DepartmentMember
  has a User.id (user_id)
  has a Department.id (department_id)


To add a user (I used bake for this) I go to User/add and add a user
(In there I can select which group the User belongs to)
Then to associate a User to a Department I go to DepartmentMember/add
and select the User, and select the Department.

How can I change the process from User/Add and DepartmentMember/add to
something that would lump the two processes together. Where I ask for
new user information and addition to that select a Department and then
when the user hits Save, it happily saves user informaiton to Users
table and Department choice to DepartmentMember (user_id, and
department_id).


I know if I were to do it without cake I could ask for all the needed
information create a query to ask for Departments, ask for Groups, and
then add the user, get the user's id and then stuff something in to
DepartmentMembers.

Is this possible right out of the can or do I need to create custom
functionality for this?

I keep looking at DepartmentMember and think that if I tell its
controller to add User, and maybe Group the magic will sort of happen.
Am I right in thinking that?

Any guidance is greatly appreaciated.

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



Delete, hasOne and dependent

2006-07-18 Thread Gonçalo Marrafa

Hi.

The hasOne association has 'dependent' flag that, if set to true, deletes
the associated model when the current one is deleted. The problem is that,
normally, the associated model/table will have a foreign key constraint to
the model/table being deleted. Since the current model is deleted first
Cake aborts with an constraint violation error.

I can delete the associated model first in beforeDelete() but i think that
should be done automatically by Cake or maybe i'm missing something.

What do you guys think?

Thanks in advance.

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



Re: overwrite save function of model

2006-07-18 Thread Larry E. Masters aka PhpNut
Sonic, Why on earth would you have composite keys in your database tables? There is absolutely no reason from them.And Tony Marston is the last person I would be reading for advice on how to do anything related to application development, aside from the point he has been developing 1st 2nd 3rd 4th 5th and so on generation applications and make sure to mention it in every post he has ever commented on in numerous forums. His advice and techniques have been ridiculed to death so I would remove that URL from your book marks
Take that from the Cake Master himself, Composite keys are insane and not needed!-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut
* @access  public*/On 7/18/06, Sonic Baker <[EMAIL PROTECTED]> wrote:
I'm also concerned about having to use an 'id' field as a primary key
to every table. Now bare in mind that I am just a mere mortal and cower
in the shadows of the real cakePHP masters but I have beef with that
fact that I can't have a primary key which consists of more than one
field. However, this is the only real beef I have with cake and apart
from this I think cake is the new "Sliced Bread".

Here's an article which played a big part in my concerns about having an 'id' field in every table:
http://www.tonymarston.net/php-mysql/technicalkeys.html


If you have a read of the above and tell me why it's not a concern then
I'd be very open to taking my beef out of the equation and becoming a
cakePHP vegetarian.

Cheers,

Psychie





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


Re: Automatically Select Option in Edit Function

2006-07-18 Thread BlenderStyle

I understand how to use $html->selectTag pretty well. I was wondering
if there was an effective way of setting the selected option in
selectTag based on the item you're editing.

So a user can have two options for status, for example, active or
locked. If the user is locked I want my $html->selectTag to
automatically select 'locked'. Can I use $data in my view to see what
the original status is (pulled from the database)?


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



Re: Time Zone ?

2006-07-18 Thread Chris Lamb

Oh dear, crossed posts..
 
> I have some basics going for timezones like this, but maybe somebody
> has a more robust solution?

Pear::Date? [1]

Chris

[1] http://pear.php.net/package/Date

-- 
 Chris Lamb, Cambridgeshire, UK  [EMAIL PROTECTED]
  WWW: www.chris-lamb.co.uk GPG: 0x634F9A20


signature.asc
Description: PGP signature


File Access: Closing Resources

2006-07-18 Thread Jeff

When I'm finished using the File Class, do I need to close the file I'm
working with, or does cake do that for me?  Reason, I ask, is because I
don't see a function to close.  This question also applies to other
classes that access resources that I need to close.


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



File Access: Closing Resources

2006-07-18 Thread [EMAIL PROTECTED]

When I'm finished using the File Class, do I need to close the file I'm
working with, or does cake do that for me?  Reason, I ask, is because I
don't see a function to close.  This question also applies to other
classes that access resources that I need to close.


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



Re: Time Zone ?

2006-07-18 Thread Chris Lamb

Andy, 

Cake's 'created' and 'modified' magic uses the PHP date() function. The
Best Practice for dates is to store all dates interally in UTC/GMT, and
apply an offset on viewing. If you would prefer not to do this, check
out:

http://uk2.php.net/manual/en/function.date-default-timezone-set.php
or
http://uk2.php.net/manual/en/function.setlocale.php

Regards,

Chris


On Tue, 18 Jul 2006 14:01:32 -0700
"seefai" <[EMAIL PROTECTED]> wrote:

> 
> Hi brother,
> 
> I am Andy from Malaysia and just a begineer to cakePHP.
> 
> I having a problem that when i try to save a Created/Modified date (By
> Cake's Default) in to the database, i will get 8 hours delay of the
> time, can i know how to solve it
> 
> Thanks
> 
> Best wishes,
> 
> Andy
> 
> 
> --~--~-~--~~~---~--~~
> You received this message because you are subscribed to the Google
> Groups "Cake PHP" group. To post to this group, send email to
> cake-php@googlegroups.com To unsubscribe from this group, send email
> to [EMAIL PROTECTED] For more options, visit this
> group at http://groups.google.com/group/cake-php
> -~--~~~~--~~--~--~---
> 


-- 
 Chris Lamb, Cambridgeshire, UK  [EMAIL PROTECTED]
  WWW: www.chris-lamb.co.uk GPG: 0x634F9A20


signature.asc
Description: PGP signature


Re: Time Zone ?

2006-07-18 Thread John Zimmerman [gmail]
Do you know if your server's time is UTC?One way you can do it is log all times as UTC and then only convert them to local time upon display based on either a user's timezone or a timzone variable set in your cake app.
I have some basics going for timezones like this, but maybe somebody has a more robust solution?On 7/18/06, seefai <
[EMAIL PROTECTED]> wrote:Hi brother,I am Andy from Malaysia and just a begineer to cakePHP.
I having a problem that when i try to save a Created/Modified date (ByCake's Default) in to the database, i will get 8 hours delay of thetime, can i know how to solve itThanksBest wishes,
Andy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Time Zone ?

2006-07-18 Thread seefai

Hi brother,

I am Andy from Malaysia and just a begineer to cakePHP.

I having a problem that when i try to save a Created/Modified date (By
Cake's Default) in to the database, i will get 8 hours delay of the
time, can i know how to solve it

Thanks

Best wishes,

Andy


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



requestAction() causing infinite loop in AppController->beforeFilter()

2006-07-18 Thread Devo

After seeing some excellent posts here on the group, I've attempted to
implement some basic authentication into my CakePHP instance by
overriding the AppController class.  (I don't have any roles, but I do
need basic authentication.)  My beforeFilter() method works just fine
until I add the requestAction() method.  After that my browser times
out to a white screen as if a loop was cut off.  Here's the class:

class AppController extends Controller
{
  function beforeFilter()
  {
if ( ( !$this->requestAction ( '/login/isLoggedIn' ) ) && (
$this->action != 'login' ) )
{
  $this->redirect('/user/login');
}
  }
}

I've tried making another model/method ('equipment/getEquipmentList')
and pointing the requestAction() at it, but it looped the same way.

I'm not sure that I'm architectually doing this the best.  I have a
login controller/model that is going to call my LdapUser
controller/model and will set the necessary session variables.  Is
there a standard way of performing authentication different from what
I'm doing?

Thanks,

Devo


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



Re: loading gif after ajax link

2006-07-18 Thread markiemark

stefano,

i should have checked the wiki better before, but thanks for the
answer, it works!

Mark


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



Re: Automatically Select Option in Edit Function

2006-07-18 Thread ShepherdWeb

$html->selectTag('Person/ismarried', array('y'=>'Yes', 'n'=>'No'), 'n',
null, null, false);

from: http://wiki.cakephp.org/docs:helpers:html

I hope this 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
-~--~~~~--~~--~--~---



Re: Automatically Select Option in Edit Function

2006-07-18 Thread ShepherdWeb

reference:
http://api.cakephp.org/class_html_helper.html#4fe0e8fb8cfbc05348e90218830d49cc


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



Automatically Select Option in Edit Function

2006-07-18 Thread BlenderStyle

I have an edit function (method) in my UsersController and a view to go
with it. In my edit view I have a form to edit the user with a
drop-down menu ($html->selectTag) for one of the fields. All the boxes
($html->inputTag) have the data inserted but I can't figure out how to
automatically select (selected) the appropriate option in the select
tag. How can this be done?


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



Wiki: Image_gallery_2

2006-07-18 Thread saavedrajj

I tried to do this example

http://wiki.cakephp.org/tutorials:image_gallery_2

but doens't work... anyway, there's another example for making
an image gallery on CakePHP?


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



Re: Page in a page

2006-07-18 Thread ShepherdWeb

Please start a new thread when beginning a new topic.


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



Re: more than one kind of relationship between the same two tables?

2006-07-18 Thread John David Anderson (_psychic_)


On Jul 18, 2006, at 10:35 AM, calzone wrote:

>
> Hi John, I tried your second approach but got a very large number of
> notices.  I could turn these off of course, but I'd rather not them be
> generated in the first place if I can avoid it.

Might help to include them here. :)

> In my case, I have a member model and a character model.  The member
> model has a primary_chracter_id while every character has a member_id.
> The idea being that a member can have many characters, but has one
> special character.

I might key it different then.

Member hasMany Character (so there needs to be a Character.member_id  
field).
Member hasOne Character (so there needs to be a  
Character.special_member_id field).

 array('className' => 'Member'));
var $hasOne = array('SpecialCharacter' => array('className' =  
'Member', 'foreignKey' => 'special_member_id'));
}
?>

Totally off the cuff, but that should get you pretty close...

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



Re: more than one kind of relationship between the same two tables?

2006-07-18 Thread calzone

Hi John, I tried your second approach but got a very large number of
notices.  I could turn these off of course, but I'd rather not them be
generated in the first place if I can avoid it.

In my case, I have a member model and a character model.  The member
model has a primary_chracter_id while every character has a member_id.
The idea being that a member can have many characters, but has one
special character.

Failing setting up both belongsTo and hasMany in this case, I was
resigned to creating a flag in the character table for 'primary.'  But
I'd really prefer to track this information from the member table.


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



Re: more than one kind of relationship between the same two tables?

2006-07-18 Thread John David Anderson (_psychic_)


On Jul 18, 2006, at 10:21 AM, calzone wrote:

>
> Can someone direct me to documentation about how to set up multiple
> different relationships between the same two models?

If they are the same type of relationship, just add another  
assocation to the array. If I have two belongsTo relationships, I  
just add it in:

var $belongsTo = array(
'firstOne' => array('className' => 'model'),
'secondOne' => array('className' => 'model')
)

If a model has two different assocations, you just define both vars:

var $belongsTo = array(
'firstOne' => array('className' => 'model')
);
var $hasMany = array(
'anotherOne' => array('className' => 'model')
);

-- John

>
> For instance, Fred is a Sales Rep for ACME Parts, his clients include
> ABC Auto, Repair 123, and many other companies.  Fred belongsTo ACME
> but hasMany clients, all of which are company entities.
>
> Another example could be that Fred belongsTo one supervisor and
> belongsTo one doctor, and hasOne partner.  Obviously, if Fred himself
> if a supervisor, it could be said that he hasMany reports.  In these
> examples, the two tables are the same.
>
> Regardless, there could be many other cases where there are multiple
> kinds of relationships set up going in both directions between the  
> same
> two models.  I wasn't sure how to search for this material, either  
> here
> or in the wiki, so I'm hoping someone who knows can tell me where to
> find out.
>
> 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
-~--~~~~--~~--~--~---



Re: Page in a page

2006-07-18 Thread aj2k8

OMG thank you that made my life sooo much easier i'm new to cake and
wel didn' really know about that. Cool! Now can someone plz help me
make active radio buttons that change the element displayed on clicking
them preferably without using javascript?
ty


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



more than one kind of relationship between the same two tables?

2006-07-18 Thread calzone

Can someone direct me to documentation about how to set up multiple
different relationships between the same two models?

For instance, Fred is a Sales Rep for ACME Parts, his clients include
ABC Auto, Repair 123, and many other companies.  Fred belongsTo ACME
but hasMany clients, all of which are company entities.

Another example could be that Fred belongsTo one supervisor and
belongsTo one doctor, and hasOne partner.  Obviously, if Fred himself
if a supervisor, it could be said that he hasMany reports.  In these
examples, the two tables are the same.

Regardless, there could be many other cases where there are multiple
kinds of relationships set up going in both directions between the same
two models.  I wasn't sure how to search for this material, either here
or in the wiki, so I'm hoping someone who knows can tell me where to
find out.

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



Re: Access to Classes

2006-07-18 Thread [EMAIL PROTECTED]

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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman

uh .. i think no recursive ... but ?

My appController have a function beforefilter() which call
requestAction :

 $this->array =
$this->requestAction('/ssites/getSites',Array("return"=>true));

And in my controller SsitesController i have :

function getSites(){
$this->Ssite->recursive=0;
$this->set('ssites',$this->Ssite->findAll(null,'ssite_id'));
}

This is recursive ? i think no :/ An idea?


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



Re: Access to Classes

2006-07-18 Thread John David Anderson (_psychic_)


On Jul 18, 2006, at 9:31 AM, [EMAIL PROTECTED] wrote:

>
> I'm new to Cake, and am wondering how I access the pre-defined classes
> in the cake structure.  I understand how to implement components, and
> helpers.  Is there a special way at including certain classes such as
> the File, NeatString, or NeatArray classes.

The uses() function will automatically include CakePHP libraries for  
you.

uses('sanitize', 'neat_array', 'neat_string');

After using uses(), you can create new instantiations of the objects.

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



Access to Classes

2006-07-18 Thread [EMAIL PROTECTED]

I'm new to Cake, and am wondering how I access the pre-defined classes
in the cake structure.  I understand how to implement components, and
helpers.  Is there a special way at including certain classes such as
the File, NeatString, or NeatArray classes.

I was trying to create a 'new' object from the class, but it's not
finding it.  Maybe cake does that for me?  

Thanks,

Jeff


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



Re: Search engine

2006-07-18 Thread KorKi

ok, it works... partly

i know where is pace of ths and the rest but it doesn't search  and
doesn't show me the result.


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



Re: Page in a page

2006-07-18 Thread gwoo

I suggest using elements.

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



Re: Search engine

2006-07-18 Thread Matt

I just copied the example in the manual.


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



Re: Search engine

2006-07-18 Thread gwoo

Matt, you dont have to write so much SQL.

> class Post extends AppModel
> {
> var $name = 'Post';
>
> function posterFirstName($poster_id)
> {
> $ret = $this->Post->findByPoster_id($poster_id, 'first_name');
> $firstName = $ret[0]['first_name'];
> return $firstName;
> }
> }


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



Page in a page

2006-07-18 Thread aj2k8

Here's what my current view looks like:







radio('Datas/dispWut',array(1=>'Search',2=>'Experiments',3=>'Protocols',4=>'Projects',5=>'Samples',6=>'Reagents'),'',array('value' => 2));
echo $this->controller->data['dispWut'];
?>


render('index2',null,'views/users/'.$content_of_frame.'.thtml');
?>







But the prblem is when I change the layout parameter for the render
function, it affects both the inline bage and the global page. On
another note the action index2 is not being performed on page load for
some reason.

Also i'm having trouble making dynamic radio buttions if someone could
help me with that.


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



Re: Search engine

2006-07-18 Thread Matt

You'd use it by creating a function in your model that makes a custom
SQL call eg

class Post extends AppModel
{
var $name = 'Post';

function posterFirstName()
{
$ret = $this->query("SELECT first_name FROM posters_table
 WHERE poster_id = 1");
$firstName = $ret[0]['first_name'];
return $firstName;
}
}


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



Re: creating helpers

2006-07-18 Thread joe

hehehe,

i had accidentally used the same variable name twice...woops...


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



Search engine

2006-07-18 Thread KorKi

I'm looking for a search engine for my cake
i found this:
http://groups.google.com/group/cake-php/browse_thread/thread/5a632568d39faae7/7d5d65a0f0202b1d?q=search&rnum=6

But i have no idea how to place it in my app. Can somebody help me? or
you've got other ideas for the search engine? 

please help...


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



AJAX "with' option

2006-07-18 Thread Matt

I am having trouble to get AJAX read the value a field by specifying
the "with" option. Below is the code in question:-






Topic Title 

Topic Text


link('Preview', "http://www.google.com/";, array('url'
=> 'post_preview', 'update' => 'preview', 'with' => 'posty')); ?>




Now what should happen is when the user clicks on the preview link, it
passes the current value of the textarea to the controller which then
returns a preview in the relevant div. However this isn't working as
according to the Firefox Javascript error log "Posty is not defined".

I've done some reading up on the Prototype library's Ajax.Updater class
and think problem is the "with" parameter isn't serializing the values
like the manual suggests:
http://www.sergiopereira.com/articles/prototype.js.html#UsingAjaxUpdater

As far as I can tell all the "with" parameter does is set the value of
"parameters" in the Ajax.Updater call, so the data still needs to be
extracted and serialized from the field.


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



Re: PagesController switching layouts

2006-07-18 Thread saavedrajj

thanks for the replys, for static pages I used AD7six example


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



Re: Best practices on upgrading

2006-07-18 Thread Jeroen Janssen

Hi,

I'm using a local svk mirror setup and 'merge' back CakePHP changes
into my own project.

You all use a version control when developing your website(s)... right?
---
Jeroen Janssen


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread Felix Geisendörfer




Just a guess, but are your requestAction calls recursive? Means the
function you request by requestAction requests itself by
requestAction again? This would make up for weird behavior I'm sure ; ).

--
http://www.thinkingphp.org
http://www.fg-webdesign.de


reyman schrieb:

  YAHHH thanks ...

BUT, second problem ... Apache crash with requestAction(...) !!

I have already test a requestAction call in an Component ... same crash
with Apache ... grr o_O

There are a problem with these method and Apache/2.0.58 (Win32)
PHP/4.4.2 win98 ?

The error :

APACHE a causé une défaillance de pile dans le module PHP4TS.DLL à
015f:0089ddf7.




  


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





Re: creating helpers

2006-07-18 Thread joe

i've done a little tinkering and i've noticed something strange.

my helper (app/views/helpers/language.php):
http://cakephp.org/pastes/show/246a27e939ee93fd4e8f1944ec3f9df4

works if when i call it from a controller like this:
var $helpers = array('Language');
...
function test(){}

and in my view:
getLanguages(); ?>

but, strangely, when i call a view from another controller as an ajax
element of another controller:
div('calendarDiv');?>
requestAction('events/miniMonth', array('return')); ?>
divEnd('calendarDiv'); ?>

(mini_month.thtml has getLanguages(); ?> in it)

i get an error: Call to a member function on a non-object

any thoughts?


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman

YAHHH thanks ...

BUT, second problem ... Apache crash with requestAction(...) !!

I have already test a requestAction call in an Component ... same crash
with Apache ... grr o_O

There are a problem with these method and Apache/2.0.58 (Win32)
PHP/4.4.2 win98 ?

The error :

APACHE a causé une défaillance de pile dans le module PHP4TS.DLL à
015f:0089ddf7.


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread AD7six

Ooo this is going to be painful ;)

A parse error means there is something fundamentally wrong with the way
you have written the code - it isn´t a problem that this object
doesn´t have that method etc.

You can´t do this:
var $array = $this->requestAction('/ssites/getSites');

What you _might_ be wanting to do is
///
var $array = NULL; // a place holder. give it a better name!

function beforeFilter ()
{
 $this->array = $this->requestAction('/ssites/getSites',
Array("return"=>true); // this line will set the result of
requestAction to the variable 'array'. Note the return value
parent::beforeFilter();
}
\\\

I hope I got the syntax right - if not it should be very easy to fix
(use the cakesearch).

HTH,

AD7six


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman

And my cake version is :

///
//
+---+
//
// + $Id: VERSION.txt 3178 2006-06-24 21:29:42Z phpnut $
// + Last Modified: $Date: 2006-06-24 16:29:42 -0500 (Sat, 24 Jun 2006)
$
// + Modified By: $LastChangedBy: phpnut $
//
+---+
//
///

1.1.6.3178


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman

thx for help :)

>> Apache/2.0.58 (Win32) PHP/4.4.2
>> Windows 98

> No modification to cake folder
> http://www.cakephp.org/pastes/show/4843231acb4b5f19ddc0625c08310804

! Error !
Parse error: parse error, unexpected T_VARIABLE in
C:\TRAVAUX\SITE\aiec\app\app_controller.php on line 44

Thx all :)
Sebastien


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



Re: loading gif after ajax link

2006-07-18 Thread stefano

Mark,
you can put in your view something like this:
imageTag('loading.gif','Loading...',array('id'=>'spinning_image','style'=>'display:none')))
?>
Note the "id" set to "spinning image" end the style set to
"display:none" so the image is not displayed as default

Then your ajax link can be:
$ajax_link_options = array('complete'=>..., 'update'=>...,
'loading'=>"Element.show('spinning_image');")

e($ajax->link('Click here!', '/controller/action/', $ajax_link_options,
null,false));

note the 'loading' option in $ajax_link_options
you can see the avaiable options in the API at
http://api.cakephp.org/class_ajax_helper.html#e9b39f961e4c9fd0c8a09b41532b6125

stefano


markiemark wrote:
> Hi every one,
>
> I have got a short question. Is it possible to show a spinning gif when
> clicking on a $ajax->link in cakephp  when al the data in the targetdiv
> is loading. this is very usefull with slow connections or a lot of
> images being loaded in the div.
>
> hope anyone knows the answer and can tell me how to do this.
> 
> cheers,
> 
> mark


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



Re: overwrite save function of model

2006-07-18 Thread Sonic Baker
I'm also concerned about having to use an 'id' field as a primary key
to every table. Now bare in mind that I am just a mere mortal and cower
in the shadows of the real cakePHP masters but I have beef with that
fact that I can't have a primary key which consists of more than one
field. However, this is the only real beef I have with cake and apart
from this I think cake is the new "Sliced Bread".

Here's an article which played a big part in my concerns about having an 'id' field in every table:
http://www.tonymarston.net/php-mysql/technicalkeys.html

If you have a read of the above and tell me why it's not a concern then
I'd be very open to taking my beef out of the equation and becoming a
cakePHP vegetarian.

Cheers,

Psychie


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


Re: cheeseCake Photoblog V1.0 Beta 1 released

2006-07-18 Thread naryga

I tried downloading the package, but all I get is an empty tar file.


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



Changing include_path conflicts with CakePHP

2006-07-18 Thread Matt

I'm in the process of porting a site to CakePHP, so far so good,
however I've run into some problems with manually installed PEAR
libraries used by a component.

The PEAR libraries are installed in a sub-directory of components
called MailSystem and used by the component with the statement:-

require_once("MailSystem/Mail.php");
require_once('MailSystem/Mail/mime.php');

However the libaries have their own require statements which cause the
whole thing to fall apart.

Warning: main(Mail/mimePart.php): failed to open stream: No such file
or directory in
/home/bob/public_html/beta/app/controllers/components/MailSystem/Mail/mime.php
on line 39

Fatal error: main(): Failed opening required 'Mail/mimePart.php'
(include_path='.:/usr/lib/php:/usr/local/lib/php:/home/chalky/public_html/beta:/home/chalky/public_html/beta/app/')
in
/home/chalky/public_html/beta/app/controllers/components/MailSystem/Mail/mime.php
on line 39

Obviously I need to change the include_path to include those PEAR
libraries, however doing so in the component breaks CakePHP - so where
in the code should I do 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
-~--~~~~--~~--~--~---



loading gif after ajax link

2006-07-18 Thread markiemark

Hi every one,

I have got a short question. Is it possible to show a spinning gif when
clicking on a $ajax->link in cakephp  when al the data in the targetdiv
is loading. this is very usefull with slow connections or a lot of
images being loaded in the div.

hope anyone knows the answer and can tell me how to do this.

cheers,

mark


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



Re: Best practices on upgrading

2006-07-18 Thread AD7six

See gwoo's comment here:
http://groups.google.com/group/cake-php/browse_thread/thread/a75537de22b36985/db971fa5d70e9ac5?q=ad7six+config&lnk=gst&rnum=14#db971fa5d70e9ac5

Starting from a clean install and applying changes is less of a
headache than trying to fix the (potential) errors from missing config
files/constants.

Cheers,

AD7six


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



Re: help me out in ajax php framework

2006-07-18 Thread AD7six


Felix Geisendörfer wrote:
> But please, don't expect that you can simply drop an email like this in
> 5-10 groups and get people to write up detailed comparisons for you.

Especially by hijacking someone elses thread ;)

AD7six


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



Re: Best practices on upgrading

2006-07-18 Thread Felix Geisendörfer




Depending on the version you upgrade from it might also be good to
replace app/webroot/index.php with the new one
and to check whether new definitions have been added to
app/config/core.php which you can do best by reading through
the change logs.

Best Regards,
Felix Geisendörfer
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



roliver schrieb:

  What is the best way to upgrade cake? I'm working on an application and
I want to upgrade to the latest stable release.  But, I don't want to
overwrite any of my layouts, configs etc.  Could some one point me to a
doc that details upgrade procedures?

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





Re: help me out in ajax php framework

2006-07-18 Thread Felix Geisendörfer




Hi Umang,

you are posting to the google group of cakephp, what do you expect?
These days 'ajax' covers 
such a broad range of libraries, approaches and requirements, so that I
wouldn't go so far to say
one framework is the "best" for everything you might come across.
CakePHP integrates really
nicely with prototype, scriptacolous & co, and I found it very
straight forward to use. But seriously,
it's much more about your skills in web standards and _javascript_ then
about the framework you use.

If you want to do serious planning, go and get a copy of the 2-3 major
php frameworks
(cake, zend, symfonie, + ...) and do some wire framing and testing with
them. Besides
that there are lot's of articles that are trying to compare php/ajax
framworks which you
can read as well.

But please, don't expect that you can simply drop an email like this in
5-10 groups and
get people to write up detailed comparisons for you. That's just not
how it works, and you
will get better results trying to spend some of your own time
researching the topic.

Good luck and best regards,
Felix Geisendörfer
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



Umang schrieb:

  hi,

can any one tell me which framework is best for developing ajax web
application in php,mysql.
which framework is best..

thanks in advance

Umang




  


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





Re: Best practices on upgrading

2006-07-18 Thread Daniel Hofstetter

Just replace the cake folder with the new version.

-- 
Daniel Hofstetter
http://cakebaker.wordpress.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
-~--~~~~--~~--~--~---



help me out in ajax php framework

2006-07-18 Thread Umang

hi,

can any one tell me which framework is best for developing ajax web
application in php,mysql.
which framework is best..

thanks in advance

Umang


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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread AD7six

Hi reyman,

What version (build number) of cake are you using
have you made any modifications to the cake folder
what is the code for your app_controller (all of it)
what url are you testing with
what is/are the exact error message(s) you are seeing

- use the paste bin (http://www.cakephp.org/pastes/add) for the code
and the error, and reply with the url. Should be easy to diagnose then.

Your appController class does extend the Controller class... right?

Cheers,

AD7six


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



Inheriting other models (again)

2006-07-18 Thread Gonçalo Marrafa

Hi.

In a recent thread i started (sorry about the missing link) i discussed
having a model inherit other model other than AppModel. The problem was i
couldn't be sure the other model was loaded at the time.

AD7six suggested (thanks) creating a model outside models path and
explicitly including it in the child class definition file. Although that
approach works it also has a problem: i can't use the base model normally!

Looking at the code i found out an easy solution: in loadModel() change
require calls with require_once calls. With that simple change, i could
just do a loadModel(BaseModel) in the child class definition file and that
would make sure the model was loaded.

Master bakers, what do you think?

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



Best practices on upgrading

2006-07-18 Thread roliver

What is the best way to upgrade cake? I'm working on an application and
I want to upgrade to the latest stable release.  But, I don't want to
overwrite any of my layouts, configs etc.  Could some one point me to a
doc that details upgrade procedures?

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



Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman

thx for answer ...

nate wrote:
> Are you new to Cake, or to object-oriented development in general?
> When I say that AppController *extends* Controller, that means that
> AppController inherits all of Controller's properties and methods, not
> that the base Controller object is a property of AppController.
>
> Likewise with Controller and Object.  Long story short, you should just
> be able to do $this->requestAction inside of AppController itself.

Yes but no ... Sorry but in my AppController $this->requestAction( ...
) is unavailable ... same things for $this->log ... etc and other
method of class Object :/

Im not newbie on object oriented development but in object oriented
developement on PHP yes 


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



Re: cheeseCake Photoblog V1.0 Beta 1 released

2006-07-18 Thread teemow

just to let you know. there is already a python project called
cheesecake:
http://pycheesecake.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
-~--~~~~--~~--~--~---