Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Ernesto
already did it. no way.

i'll give it another try.

On 18 Gen, 22:46, euromark  wrote:
> inside the plugin in /webroot/...
>
> @see:http://cakephp.lighthouseapp.com/projects/42648/13-new-features-plugi...
>
> On 18 Jan., 22:07, majna  wrote:
>
>
>
> > In shared plugin (in new plugin webroot folder)?
>
> > On Jan 18, 3:12 pm, Ernesto  wrote:
>
> > > Where should i put my shared Css' and images? (i have a single-core,
> > > multi-app environment). before 1.3Beta i was using an additiona
> > > vendors path but now it isn't working :(
>
> > > PS: link [7] is broken
>
> > > On 18 Gen, 15:04, Celso  wrote:
>
> > > > Is there a approximate date for the final cakephp 1.3 Version?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: how to call Model1->find("all") from Model2 Controller

2010-01-18 Thread Walther
Never use $uses unless you really really really have too. See here:
http://www.pseudocoder.com/archives/2009/04/16/one-more-tip-for-speeding-up-cakephp-apps/

Rather use $this->loadModel or ClassRegistry::init

On Jan 18, 12:34 pm, djogo  wrote:
> Class usercontroller extends appcontroller
> {
>    Var $uses=array( 'Users','Projects');
>
> }
>
> Then you can use
>
> $this->Project->find()
>
> On 17 jan, 08:10, codef0rmer  wrote:
>
> > thx guys. Finally, it worked :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Some questions about ACL

2010-01-18 Thread Joe L
Hi Douglas, I believe by using Groups for authentication is one way to
go with it.

Firstly u could setup the permission for the GROUP as mention in
Cakephp tutorial as below
http://book.cakephp.org/view/648/Setting-up-permissions

Then you can assign the USER(s) to that GROUP.

When it comes to the admin page, you could setup an EDIT page for the
ACL table for modifying the GROUP's permission to access to different
controllers. And also setup an EDIT page USER table for modifying USER
belong to which GROUP.

Does that answer your question?



On Jan 19, 10:03 am, Joe L  wrote:
> Could I clarify, are you asking how to create an admin page to modify
> the user permissions?
>
> On Jan 19, 3:48 am, Douglas Pacheco Cardoso 
> wrote:
>
> > Hi, how are you? I'm a new membership...
>
> > Please, i want to use ACL to do control of permissions on my system.
> > I
> > understand how it works, how to check permissions and more, but i
> > don't know getting to join ideas to create one page for manage of
> > this
> > permissions.
>
> > Example:
> > I want to select the user and set for this user permissions in
> > certain
> > pages. I'll to use groups in the future, but if I have a example,
> > help
> > me much.
>
> > Anybody have some example for me? Don't need source code, only
> > ideas...
>
> > Thank you,
> > Douglas Pacheco Cardoso
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Security component and session timeout

2010-01-18 Thread Stinkbug
Just checking to see if anyone has any recommendations on this before
I start implementing something myself.

On Dec 16 2009, 10:49 pm, Stinkbug  wrote:
> I've been using the security component for quite some time, but there
> is one issue that I've never been able to figure out with it.
>
> When I have a form and the user takes a while to fill it out, it will
> get blackholed.  I'm guesing the security component is using a session
> some how on the form.  It makes the form only good for so many minutes
> (I'm not totally sure how long).  However, adjusting session setting
> in the core doesn't seem to change this.
>
> Can someone explain what's going on and if there is a way to change
> this so that a form can sit there a little longer without getting
> blackholed?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Some questions about ACL

2010-01-18 Thread Joe L
Could I clarify, are you asking how to create an admin page to modify
the user permissions?

On Jan 19, 3:48 am, Douglas Pacheco Cardoso 
wrote:
> Hi, how are you? I'm a new membership...
>
> Please, i want to use ACL to do control of permissions on my system.
> I
> understand how it works, how to check permissions and more, but i
> don't know getting to join ideas to create one page for manage of
> this
> permissions.
>
> Example:
> I want to select the user and set for this user permissions in
> certain
> pages. I'll to use groups in the future, but if I have a example,
> help
> me much.
>
> Anybody have some example for me? Don't need source code, only
> ideas...
>
> Thank you,
> Douglas Pacheco Cardoso
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: How do I see a SQL statement?

2010-01-18 Thread cricket
First, you have an extra brace there. Although that's probably a typo
because you have it in an if block.

Are you sure the model method is visible (ie. it's public)? I've
noticed that when Cake can't find a model method it'll send the name
of the method directly to dboSource, which passes it to the DB as an
SQL statement. It's possible that Cake's virtual modeling (or whatever
it's called) is the culprit. It could be that your SpecialsController
isn't properly seeing the Special model and so is relying on AppModel,
which doesn't know about your method. To tell the truth, I can't
remember quite how that works but I've run into it before.

On Jan 18, 5:10 pm, koala kid  wrote:
> I am getting the SQL error below but its not showing me the actual SQL
> statement that Cake is generating. Is there any way of seeing what it is?
>
> Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check
> the manual that corresponds to your MySQL server version for the right
> syntax to use near 'updateOrder' at line 1
> [CORE/cake/libs/model/datasources/dbo_source.php.
>
> My controller line is:
>
> $this->Special->updateOrder($this->data));
>
> which is calling the updateOrder in my model, which is:
>
> function updateOrder($data){
>
>         $flag = true;
>
>         foreach ($data['Special'] as $key=>$value):
>                 $this->id = $key;
>                 if(!$this->saveField('order', $value['order'])):
>                         $flag = false;
>                 endif;
>         endforeach;
>
>         return $flag;
>     }
>
> My data looks like:
>
> Array
> (
>     [Special] => Array
>         (
>             [1] => Array
>                 (
>                     [order] => 0
>                 )
>
>             [4] => Array
>                 (
>                     [order] => 1
>                 )
>
>         )
>
> )
>
> --
> View this message in 
> context:http://old.nabble.com/How-do-I-see-a-SQL-statement--tp27217643p272176...
> Sent from the CakePHP mailing list archive at Nabble.com.
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: How do I see a SQL statement?

2010-01-18 Thread Wayne Fay
> I am getting the SQL error below but its not showing me the actual SQL
> statement that Cake is generating. Is there any way of seeing what it is?

Turn on debug mode.
http://cake-php.blogspot.com/2006/09/21-things-you-must-know-about-cakephp.html

Wayne
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


How do I see a SQL statement?

2010-01-18 Thread koala kid

I am getting the SQL error below but its not showing me the actual SQL
statement that Cake is generating. Is there any way of seeing what it is?

Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'updateOrder' at line 1
[CORE/cake/libs/model/datasources/dbo_source.php.

My controller line is:

$this->Special->updateOrder($this->data));

which is calling the updateOrder in my model, which is:

function updateOrder($data){

$flag = true;

foreach ($data['Special'] as $key=>$value):
$this->id = $key;
if(!$this->saveField('order', $value['order'])):
$flag = false;
endif;
endforeach;

return $flag;
}

My data looks like: 

Array
(
[Special] => Array
(
[1] => Array
(
[order] => 0
)

[4] => Array
(
[order] => 1
)

)

)

-- 
View this message in context: 
http://old.nabble.com/How-do-I-see-a-SQL-statement--tp27217643p27217643.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP 1.3-beta has landed

2010-01-18 Thread euromark
inside the plugin in /webroot/...

@see:
http://cakephp.lighthouseapp.com/projects/42648/13-new-features-plugin-assets


On 18 Jan., 22:07, majna  wrote:
> In shared plugin (in new plugin webroot folder)?
>
> On Jan 18, 3:12 pm, Ernesto  wrote:
>
> > Where should i put my shared Css' and images? (i have a single-core,
> > multi-app environment). before 1.3Beta i was using an additiona
> > vendors path but now it isn't working :(
>
> > PS: link [7] is broken
>
> > On 18 Gen, 15:04, Celso  wrote:
>
> > > Is there a approximate date for the final cakephp 1.3 Version?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP 1.3-beta has landed

2010-01-18 Thread igotskils
hey i'm  developing a application in cake 1.2.5 and its almost done.
What you guys think should I update now or later ?

On 17 Jan., 05:25, mark_story  wrote:
> The CakePHP development team is happy to announce the release the
> CakePHP 1.3-beta. We've been hard at work implementing new features
> and fixing issues in existing features in the 1.3 branch.  Since 1.3-
> alpha there have been more than 600 commits and more than 43 tickets
> have been closed.  A number of new features have been implemented most
> notably, Model virtualFields[1], changes to the plugin and theme assets
> [2], improvements to TimeHelpers ability to output i18n friendly
> formats, and a refactored test suite harness[3].  When upgrading to
> 1.3-beta it is recommended that you replace app/webroot/test.php with
> the one in the repository and check out the Migration Guide[4] as well
> as the new features guides [5] for changed and new features in 1.3.
>
> In other project news, all the previous stable release points for 1.2
> have been retagged and are available in github.  We've brought on two
> new team members in the past few months as well, both ADmad, and
> jose_zap have joined the CakePHP team and are helping with all aspects
> of the project.  Moving forward with 1.3 we are not planning on adding
> changes that break backwards compatibility.  Any methods currently
> generating errors will be removed in the first Release Candidate. It
> is important that you listen to the warnings, as they will become
> fatal errors in the future.
>
> If you would like to help with the ongoing development of 1.3, you can
> do so in a number of ways. Firstly, filing clear and concise tickets
> for any issues helps get the issues resolved quickly. Secondly, you
> can also contribute by forking the CakePHP project on github and
> implementing fixes, tests cases and features on your forks.  You can
> use pull requests or tickets to notify core team members about your
> changes.
>
> Finally, we'd like to thank you the community for the their greatly
> increased and ongoing support and contributions. Since our move to
> github and lighthouse the volume of community contributions has had a
> dramatic increase, and we'd like to thank the many contributors for
> their help in improving CakePHP.
>
> Download a packaged release [6]
>
> View the changelog [7]
>
> [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features-virtu...
> [2]http://cakephp.lighthouseapp.com/projects/42648/13-new-features-plugi...
> [3]http://cakephp.lighthouseapp.com/projects/42648/1-3-new-features-test...
> [4]http://cakephp.lighthouseapp.com/projects/42648/13-migration-guide
> [5]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> [6]http://github.com/cakephp/cakephp1x/downloads
> [7]http://cakephp.lighthouse.com/projects/42648/changelog-1-3-0-beta
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Disable browser caching in AppController - Save yourself headaches

2010-01-18 Thread euromark
actually this is a function not a variable
but i guess you just forgot the parentheses

so the correct call would be:
$this->disableCache();

and it doesnt matter where you put it
but it makes most sense to put in the end of the beforeRender() method
because you only need it if you actually output something.
otherwise - like on redirects - it is of no use!

mark


On 18 Jan., 20:42, keymaster  wrote:
> While debugging an ajax problem on IE8 which was not happening on
> Firefox, I determined that the different caching policies of browsers
> can cause real headaches sometimes.
>
> While things were working consistently great in Firefox, in IE8 ajax
> was behaving at times very erratic (while other times it behaved
> fine).
>
> Sometimes it would show all the debug info in the ajax request, even
> though I had debug turned off at the server.
>
> Sometimes I would get the entire page layout, even though the layout
> was ajax (ie. blank) at the server.
>
> Sometimes the  wrong content would appear in the ajax request. It
> would say I was logged out, when I wasn't. Or it would show me the
> wrong page.
>
> Server side breakpoints didn't help as I could never get one to be
> hit.
>
>  I had no firebug to see what was going on, after all this is the
> hellhole of MyCrowSoft's Idiotic Emasculation 8.
>
> It sometimes appeared like the app went haywire in Ajax on IE.
> Meanwhile on firefox all was bliss, smooth as silk, no problems, nada.
>
> The solution: $this->disableCache; as the first line in appController.
>
> That prevents browser side caching of html pages.
>
> I'm now tempted to keep that in appController always. I still do
> client side caching of all other assets, but don't see the point in
> cachine html pages.
>
> Can anyone think of any reason why one *wouldn't* want browser side
> caching to be turned off for ajax, or any dynamic html pages where the
> urls are the same but the content is different?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


RE: Capturing Field information before to compute before saving in database

2010-01-18 Thread Dave
Use before Save function in the model
If(!empty($this->data))
{

$this->data['Model']['field1'] =  $this->data['Model']['field1'] * 0.55;
$this->data['Model']['total'] = $this->data['Model']['field1'] + all your
other fields

return true;

}

Something like that

Dave


-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Guran
Sent: January-18-10 5:18 PM
To: CakePHP
Subject: Capturing Field information before to compute before saving in
database

Thanks to all who have taken the time to help out without being
condescending or intimidating. I am a newbee and this help has encouraged me
to keep on learning CakePHP. Once I get good I will help others on this
forum.

Now on my expense submitter i am working on - there are field1, field2, and
field3.Hidden is the 'total' field. The user enters numerical values in
field1, field2, and field3. Before the data is saved into the database
field1 needs to be multiplied with 0.55 and saved back in field1. Then the 3
fields need to be added and saved in the hidden field 'total'.

I am looking for an access point to get to the fields and do my computation
before they are saved into the database. Any suggestions and help is
appreciated.

...guran

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.730 / Virus Database: 270.14.149/2630 - Release Date: 01/18/10
04:05:00

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP 1.3-beta has landed

2010-01-18 Thread majna
In shared plugin (in new plugin webroot folder)?


On Jan 18, 3:12 pm, Ernesto  wrote:
> Where should i put my shared Css' and images? (i have a single-core,
> multi-app environment). before 1.3Beta i was using an additiona
> vendors path but now it isn't working :(
>
> PS: link [7] is broken
>
> On 18 Gen, 15:04, Celso  wrote:
>
> > Is there a approximate date for the final cakephp 1.3 Version?
>
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


odd threaded behaviour

2010-01-18 Thread cricket
I'm having some difficulty understanding how 'fields' is supposed to
work when doing a find('threaded'). The following is a method in my
Comment model. Comment can be associated with either Post or Gallery,
hence the 'model' & 'association_key' fields.

public function threaded($key  = null, $model = null)
{
if (!$key || is_null($model)) return null;

$filters = array(
'conditions' => array(
'Comment.model' => ucfirst($model),
'Comment.association_key' => $key
),
'fields' => array(
'Comment.created',
'Comment.parent_id',
'Comment.lft',
'Comment.rght',
'Comment.model',
'Comment.association_key',
'Comment.user_id',
'Comment.subject',
'Comment.body'
),
'order' => array('Comment.lft' => 'ASC'),
'contain' => array(
'User' => array(
'fields' => array('User.id', 'User.login')
)
)
);

return $this->find('threaded', $filters);
}

When I use it like that, I do not get properly threaded results--
comments that should have children do not.

When I change the fields array (the first one, for Comment) to '*' the
results are properly threaded. However, the User arrays contain all
fields for that model. In the first example, the User results
correctly contain just the id & login fields.

So, am I missing something? Bug?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Capturing Field information before to compute before saving in database

2010-01-18 Thread Mirko Coz
In the controller:
$sum = 0;
$this->data['Modelname']['field1'] *= 0.55 ;
$this->data['Modelname']['hidden'] = $this->data['Modelname']['field1'] +
$this->data['Modelname']['field2'] + $this->data['Modelname']['field3'];

 $this->Modelname->save($this->data) ;


2010/1/18 Guran 

> Thanks to all who have taken the time to help out without being
> condescending or intimidating. I am a newbee and this help has
> encouraged me to keep on learning CakePHP. Once I get good I will help
> others on this forum.
>
> Now on my expense submitter i am working on - there are field1,
> field2, and field3.Hidden is the 'total' field. The user enters
> numerical values in field1, field2, and field3. Before the data is
> saved into the database field1 needs to be multiplied with 0.55 and
> saved back in field1. Then the 3 fields need to be added and saved in
> the hidden field 'total'.
>
> I am looking for an access point to get to the fields and do my
> computation before they are saved into the database. Any suggestions
> and help is appreciated.
>
> ...guran
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>


-- 
Mirko Coz Berrospi
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


CSS and CakePHP

2010-01-18 Thread laceja
I'm very new to CakePHP... this is my first CakePHP program outside of
the tutorials. I'm having a problem using CSS to format a input
fields. For example:

echo $form->input('furnace_name', array('between' => '', 'label' => array('text' => 'Furnace Name:'), 'div'
=> false, 'after' => ''));

creates the proper HTML, but the  doesn't have
any affect. I used the included CSS file from CakePHP, removed all the
"input" class tags and added the "short200" tag, but nothing seems to
work. I did notice the HTML includes an id=furnacename, in this case,
and if I add an id of furnacename to the CSS file, it works. Is there
a way to get the Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Capturing Field information before to compute before saving in database

2010-01-18 Thread Guran
Thanks to all who have taken the time to help out without being
condescending or intimidating. I am a newbee and this help has
encouraged me to keep on learning CakePHP. Once I get good I will help
others on this forum.

Now on my expense submitter i am working on - there are field1,
field2, and field3.Hidden is the 'total' field. The user enters
numerical values in field1, field2, and field3. Before the data is
saved into the database field1 needs to be multiplied with 0.55 and
saved back in field1. Then the 3 fields need to be added and saved in
the hidden field 'total'.

I am looking for an access point to get to the fields and do my
computation before they are saved into the database. Any suggestions
and help is appreciated.

...guran
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Some questions about ACL

2010-01-18 Thread Douglas Pacheco Cardoso
Hi, how are you? I'm a new membership...

Please, i want to use ACL to do control of permissions on my system.
I
understand how it works, how to check permissions and more, but i
don't know getting to join ideas to create one page for manage of
this
permissions.

Example:
I want to select the user and set for this user permissions in
certain
pages. I'll to use groups in the future, but if I have a example,
help
me much.

Anybody have some example for me? Don't need source code, only
ideas...

Thank you,
Douglas Pacheco Cardoso
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Replacing an select/option drop down in views to a specific value.

2010-01-18 Thread Guran
Thanks - that helped
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Disable browser caching in AppController - Save yourself headaches

2010-01-18 Thread keymaster
While debugging an ajax problem on IE8 which was not happening on
Firefox, I determined that the different caching policies of browsers
can cause real headaches sometimes.

While things were working consistently great in Firefox, in IE8 ajax
was behaving at times very erratic (while other times it behaved
fine).

Sometimes it would show all the debug info in the ajax request, even
though I had debug turned off at the server.

Sometimes I would get the entire page layout, even though the layout
was ajax (ie. blank) at the server.

Sometimes the  wrong content would appear in the ajax request. It
would say I was logged out, when I wasn't. Or it would show me the
wrong page.

Server side breakpoints didn't help as I could never get one to be
hit.

 I had no firebug to see what was going on, after all this is the
hellhole of MyCrowSoft's Idiotic Emasculation 8.

It sometimes appeared like the app went haywire in Ajax on IE.
Meanwhile on firefox all was bliss, smooth as silk, no problems, nada.

The solution: $this->disableCache; as the first line in appController.

That prevents browser side caching of html pages.

I'm now tempted to keep that in appController always. I still do
client side caching of all other assets, but don't see the point in
cachine html pages.

Can anyone think of any reason why one *wouldn't* want browser side
caching to be turned off for ajax, or any dynamic html pages where the
urls are the same but the content is different?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Set layout based on admin routing in app_error?

2010-01-18 Thread oleonav
Hello,

I'm trying to change the layout based on the admin routing param
within a custom 404 error function in app_error.php.

1. I can check for the existence of the admin routing param. It is
available via $this->controller->params['admin']
2. Can change it, for example: $this->controller->layout =
'admin.default';

Problem is the normal layout get's rendered. Any suggestion how to
implement this?

Code sample:

class AppError extends ErrorHandler
{
   function error404()
   {

  

  if(array_key_exists('admin',$this->controller->params) && $this-
>controller->params['admin'] == TRUE)
  {
   $this->controller->layout = 'admin.default';
  }

  ...

   }
}

//check...
print_r($this->controller);

Thanks!
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: adding/updating additional fields in HABTM's join table

2010-01-18 Thread Martin Westin

Of-course there is :)

The trick to getting some control over the join table is the "with"
key.
http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
This tells Cake to use your class file for the join model and any
methods and settings in it.

Mariano also has a good write-up of how to get the join table working
as a "real" model.
http://marianoiglesias.com.ar/cakephp/modelizing-habtm-join-tables-in-cakephp-1-2-with-and-auto-with-models/

And finally Teknoid has aa very short and clear post about how to
actually save the extra data.
http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/





On Jan 18, 9:36 am, Ernesto  wrote:
> Hello.
>
> as the title says is there any way to add/update additional fields
> in HABTM's join table?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: My Cake app presented at CES keynote

2010-01-18 Thread Mariano Iglesias
Congratulations! That looks like an impressive piece of work. And you 
are right, this shows everyone that CakePHP is not just about writing 
"standard webapps".


Thanks for sharing, and keep up the good work!

Martin Westin wrote:

I have been working on the same Cake app for the past two years. A lot
of it has been a bit hush hush but last week we were truly "outed" by
Qualcomm.

Check out our 3 min segment from the Keynote:
http://www.greatconnection.se/en/ces

The system transmits medical images from echo machines (ultrasound),
CTs, MRs or any similar digital "x-ray" type device, to any mobile
phone, any email inbox and a few social networking apps. There is a
lot of high-tech stuff going on behind the scenes and CakePHP is at
the core of it all. Not just for the web-interfaces but actually to
drive the whole thing.

Roughly 85% of the code and all the main logic is CakePHP. The rest is
C and Java for certain things that benefit greatly from being
optimized and run as compiled code.

For a Cake app it is kind of an oddball I imagine. I thought it might
be interesting to hear of a Cake app that is not a CMS or a Twitter
mash-up or some other more common type of application.

I also thought this would come to my defence and help explain some of
the more strange questions I have been asking and problems I have been
having. I may not be all crazy... I hope.


Now... how am I going to work up the courage to attempt to migrate
this monster to 1.3? :)
  



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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



--
-MI
*Coding Ninja* @ CRICAVA Technologies 

*Blog*: http://www.marianoiglesias.com.ar
*Twitter*:  http://twitter.com/mgiglesias
*LinkedIn*: http://www.linkedin.com/pub/2/483/B94
*Facebook*: http://www.facebook.com/mariano.iglesias

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Ernesto
Where should i put my shared Css' and images? (i have a single-core,
multi-app environment). before 1.3Beta i was using an additiona
vendors path but now it isn't working :(

PS: link [7] is broken

On 18 Gen, 15:04, Celso  wrote:
> Is there a approximate date for the final cakephp 1.3 Version?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Celso
Is there a approximate date for the final cakephp 1.3 Version?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: My Cake app presented at CES keynote

2010-01-18 Thread Martin Westin
@John
Thanks.

@Chad
"I can't tell what it is exactly"

Boy, do I know that phrase! It is so nice to have it out so I don't
have to mask my code and questions as much.
Let me know when you can tell me more. Your app sounds intriguing.

Martin


On Jan 18, 2:07 pm, Chad Smith  wrote:
> Hey Martin,
>
> Nice job!  I too have a rather large app that we are working on with
> cakePHP driving the whole thing.  I can't tell what it is exactly but
> it will be using a C/C# application to do some of the work as the
> program that assists the program is not written in PHP or Java.  Good
> times though, and it's exciting to be working on it.  Sadly it's a
> side project for our company so we haven't had a lot of time to
> dedicate to it yet.  So I might be asking YOU questions about how to
> interface the two systems together sometime soon!  haha.
>
> Take care and that's really wonderful!  Well done.
> Chad
>
> On Jan 18, 4:23 am, Martin Westin  wrote:
>
>
>
> > I have been working on the same Cake app for the past two years. A lot
> > of it has been a bit hush hush but last week we were truly "outed" by
> > Qualcomm.
>
> > Check out our 3 min segment from the 
> > Keynote:http://www.greatconnection.se/en/ces
>
> > The system transmits medical images from echo machines (ultrasound),
> > CTs, MRs or any similar digital "x-ray" type device, to any mobile
> > phone, any email inbox and a few social networking apps. There is a
> > lot of high-tech stuff going on behind the scenes and CakePHP is at
> > the core of it all. Not just for the web-interfaces but actually to
> > drive the whole thing.
>
> > Roughly 85% of the code and all the main logic is CakePHP. The rest is
> > C and Java for certain things that benefit greatly from being
> > optimized and run as compiled code.
>
> > For a Cake app it is kind of an oddball I imagine. I thought it might
> > be interesting to hear of a Cake app that is not a CMS or a Twitter
> > mash-up or some other more common type of application.
>
> > I also thought this would come to my defence and help explain some of
> > the more strange questions I have been asking and problems I have been
> > having. I may not be all crazy... I hope.
>
> > Now... how am I going to work up the courage to attempt to migrate
> > this monster to 1.3? :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: My Cake app presented at CES keynote

2010-01-18 Thread Chad Smith
Hey Martin,

Nice job!  I too have a rather large app that we are working on with
cakePHP driving the whole thing.  I can't tell what it is exactly but
it will be using a C/C# application to do some of the work as the
program that assists the program is not written in PHP or Java.  Good
times though, and it's exciting to be working on it.  Sadly it's a
side project for our company so we haven't had a lot of time to
dedicate to it yet.  So I might be asking YOU questions about how to
interface the two systems together sometime soon!  haha.

Take care and that's really wonderful!  Well done.
Chad

On Jan 18, 4:23 am, Martin Westin  wrote:
> I have been working on the same Cake app for the past two years. A lot
> of it has been a bit hush hush but last week we were truly "outed" by
> Qualcomm.
>
> Check out our 3 min segment from the 
> Keynote:http://www.greatconnection.se/en/ces
>
> The system transmits medical images from echo machines (ultrasound),
> CTs, MRs or any similar digital "x-ray" type device, to any mobile
> phone, any email inbox and a few social networking apps. There is a
> lot of high-tech stuff going on behind the scenes and CakePHP is at
> the core of it all. Not just for the web-interfaces but actually to
> drive the whole thing.
>
> Roughly 85% of the code and all the main logic is CakePHP. The rest is
> C and Java for certain things that benefit greatly from being
> optimized and run as compiled code.
>
> For a Cake app it is kind of an oddball I imagine. I thought it might
> be interesting to hear of a Cake app that is not a CMS or a Twitter
> mash-up or some other more common type of application.
>
> I also thought this would come to my defence and help explain some of
> the more strange questions I have been asking and problems I have been
> having. I may not be all crazy... I hope.
>
> Now... how am I going to work up the courage to attempt to migrate
> this monster to 1.3? :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: cinema

2010-01-18 Thread Chad Smith
Clearly an attempt to get some link juice out of Google.  Already
reported the message as Spam, and we should see it removed soon.

Next time, find other sources to use when trying to advertise your
site.

On Jan 18, 4:33 am, ananthi g  wrote:
> Features movies, videos, news and gossip, celebs, reviews, and photos
> from Bollywood.
>
> more info ;http://123maza.com/25/resman456/..
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


[Media Plugin] $medium->link("css/test") not working

2010-01-18 Thread Deine Mutter
hey,
i'm trying to set up my cake app in order to work together with
davidpersson's media plugin. I included the plugin in my config/
bootstrap.php and included the medium.helper in my app_controller
$helpers. So far so good.
As adviced in the plugin's configuration manual i migrated by media
files (js, img, css) from webroot to webroot/media/static.

As expected these files are currently not found anymore by the $html
helper anymore. I tried to correct this mistake by replacing my $html-
>css / $html->image and $javascript->link includes with $medium->link
('css/test') / $medium->link('js/...') etc. However that show's no
result.

I guess I'm doing sth horribly wrong here, but i just don't find out
what :)

A quick help would be very much appreciated!

thx
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: saveAll() producing Fatal Error

2010-01-18 Thread MrDevin
So, It is now monday morning, I ma back at work and implemented your
solution and it worked immediately.

thanks again.
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Calling controller functions from external OR webroot files

2010-01-18 Thread John Andersen
Maybe you could ask LunarDraco about this, as he seems to have done
something similar or something that may help you, see thread:
http://groups.google.com/group/cake-php/browse_thread/thread/074cfa5a883df881

[snippet]
> > CakeBaker: any chance you've got plans to update your Component?

> No, there are no plans to integrate support for RPX into the OpenID
> component, because support for a proprietary API doesn't fit to the
> current functionality of the OpenID component. I think it is better to
> put the RPX functionality into its own component.

After I sent the message to the group I implemented RPXnow last night
and I agree with you completely in this doesn't belong or fit well
with your component.
Actually I'm not sure it even requires its own component. There is so
very little code to make it work and to integrate it into your
existing users I think a clean example would be more useful.
[/snippet]

Enjoy,
   John

On Jan 18, 12:01 pm, Laurent Kretz  wrote:
> Hi all,
>
> Noob (conceptual) question here: I'm implementing RPX on my app.
> The workflow is this:
> - user clicks on "sign in" from an element in the header
> - RPX does its magic and callbacks a script on my site
> - this script checks if the user exists in my db, if not redirects to
> a "complete your profile" page, otherwise to the homepage with the
> user logged in.
>
> So basically, I have:
> - an element that displays the sign in link or the logged on user
> info,
> - the rpx callback script
> - a standard profile page.
>
> My question is about the script: I thought i would put the script in a
> view file that corresponds to a controller rpx function.
> example.com/user/rpx
>
> Is that the right way to go or should i place the script in the
> webroot (example.com/rpx.php) ? If so, how can I call functions from
> the users_controller ?
>
> Thx !
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: My Cake app presented at CES keynote

2010-01-18 Thread John Andersen
Congratulations Martin!
Way to go!!
   John

On Jan 18, 11:23 am, Martin Westin  wrote:
> I have been working on the same Cake app for the past two years. A lot
> of it has been a bit hush hush but last week we were truly "outed" by
> Qualcomm.
>
> Check out our 3 min segment from the 
> Keynote:http://www.greatconnection.se/en/ces
>
> The system transmits medical images from echo machines (ultrasound),
> CTs, MRs or any similar digital "x-ray" type device, to any mobile
> phone, any email inbox and a few social networking apps. There is a
> lot of high-tech stuff going on behind the scenes and CakePHP is at
> the core of it all. Not just for the web-interfaces but actually to
> drive the whole thing.
>
> Roughly 85% of the code and all the main logic is CakePHP. The rest is
> C and Java for certain things that benefit greatly from being
> optimized and run as compiled code.
>
> For a Cake app it is kind of an oddball I imagine. I thought it might
> be interesting to hear of a Cake app that is not a CMS or a Twitter
> mash-up or some other more common type of application.
>
> I also thought this would come to my defence and help explain some of
> the more strange questions I have been asking and problems I have been
> having. I may not be all crazy... I hope.
>
> Now... how am I going to work up the courage to attempt to migrate
> this monster to 1.3? :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: how to call Model1->find("all") from Model2 Controller

2010-01-18 Thread djogo
Class usercontroller extends appcontroller
{
   Var $uses=array( 'Users','Projects');
}

Then you can use

$this->Project->find()



On 17 jan, 08:10, codef0rmer  wrote:
> thx guys. Finally, it worked :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: how to execute this query with cakephp

2010-01-18 Thread djogo
When you run a query like this, you're violating MVC practise. I'd
rather

$x = $model->find()
$x['Model']['field']++
$model->save($x)

To keep things were they're supposed to be, otherwise sometimes
queries are at the model, sometimes at controller, next thing you know
you're writing stored procedures; and that's a nightmare. Of course,
sometimes you need speed, so I'd
Write a method like wyrihaximus did.

On 18 jan, 07:55, WyriHaximus  wrote:
> Afaik not thats why I wrote this function for in my appModel a while
> ago:http://bin.cakephp.org/view/429049354
>
> On Jan 18, 2:52 am, Saleh Souzanchi  wrote:
>
> > Is there another way?
>
> > On Jan 18, 4:46 am, Jon Bennett  wrote:
>
> > > > how to execute this query with cakephp :
>
> > > > update table_name set hit = hit+1
>
> > > $this->Table->query('update table set hit = hit+1);
>
> > > j
>
> > > --
> > > jon bennett -www.jben.net-blog.jben.net
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Calling controller functions from external OR webroot files

2010-01-18 Thread Laurent Kretz
Hi all,

Noob (conceptual) question here: I'm implementing RPX on my app.
The workflow is this:
- user clicks on "sign in" from an element in the header
- RPX does its magic and callbacks a script on my site
- this script checks if the user exists in my db, if not redirects to
a "complete your profile" page, otherwise to the homepage with the
user logged in.

So basically, I have:
- an element that displays the sign in link or the logged on user
info,
- the rpx callback script
- a standard profile page.

My question is about the script: I thought i would put the script in a
view file that corresponds to a controller rpx function.
example.com/user/rpx

Is that the right way to go or should i place the script in the
webroot (example.com/rpx.php) ? If so, how can I call functions from
the users_controller ?

Thx !
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: how to execute this query with cakephp

2010-01-18 Thread WyriHaximus
Afaik not thats why I wrote this function for in my appModel a while
ago: http://bin.cakephp.org/view/429049354

On Jan 18, 2:52 am, Saleh Souzanchi  wrote:
> Is there another way?
>
> On Jan 18, 4:46 am, Jon Bennett  wrote:
>
> > > how to execute this query with cakephp :
>
> > > update table_name set hit = hit+1
>
> > $this->Table->query('update table set hit = hit+1);
>
> > j
>
> > --
> > jon bennett -www.jben.net-blog.jben.net
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


shared CSS and Imgs in CakePHP 1.3 Beta

2010-01-18 Thread Ernesto
Hello.

every app on my server is using some shared css or images.
those files are stored in
localhost/shared_items/vendors/css
or
localhost/shared_items/vendors/images
every app has the additional vendors path defined in bootstrap.php

this morging i migrated from 1.3 Alpha to 1.3 Beta

now... where should i put those files?

i'm not using themes.
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


cinema

2010-01-18 Thread ananthi g

Features movies, videos, news and gossip, celebs, reviews, and photos
from Bollywood.



more info ;http://123maza.com/25/resman456/..
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


My Cake app presented at CES keynote

2010-01-18 Thread Martin Westin
I have been working on the same Cake app for the past two years. A lot
of it has been a bit hush hush but last week we were truly "outed" by
Qualcomm.

Check out our 3 min segment from the Keynote:
http://www.greatconnection.se/en/ces

The system transmits medical images from echo machines (ultrasound),
CTs, MRs or any similar digital "x-ray" type device, to any mobile
phone, any email inbox and a few social networking apps. There is a
lot of high-tech stuff going on behind the scenes and CakePHP is at
the core of it all. Not just for the web-interfaces but actually to
drive the whole thing.

Roughly 85% of the code and all the main logic is CakePHP. The rest is
C and Java for certain things that benefit greatly from being
optimized and run as compiled code.

For a Cake app it is kind of an oddball I imagine. I thought it might
be interesting to hear of a Cake app that is not a CMS or a Twitter
mash-up or some other more common type of application.

I also thought this would come to my defence and help explain some of
the more strange questions I have been asking and problems I have been
having. I may not be all crazy... I hope.


Now... how am I going to work up the courage to attempt to migrate
this monster to 1.3? :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: weird bug with database field called "date" for a normal date (yyyy-mm-dd)

2010-01-18 Thread John Andersen
Sorry, I only meant that your issue was something similar, not the
same :)
Good luck hunting it down,
   John

On Jan 17, 11:56 pm, euromark  wrote:
> darn
> i was too quick
>
> after removing the model "Date" and all related models the same
> problem still occured
> so it must be something else
> maybe some conflict with the php date() function?
>
> the above link about "data" cant be the solution because this person
> had a conflict with
> $model->data
>
> in my case
> $model->date does not exist, though
>
> On 17 Jan., 20:11, John Andersen  wrote:
>
> > Your issue may be related to the one that was discussed 
> > in:http://groups.google.com/group/cake-php/browse_thread/thread/759c93f0...
>
> > There it was a table named "data" that gave problems!
> > Your using of "date" may give issues of the same kind - kind of
> > reserved word :)
> > Enjoy,
> >    John
>
> > On Jan 16, 6:02 pm, euromark  wrote:
>
> > > Baked in my current app, the field called "date" results in the
> > > following array:
>
> > > Array
> > > (
> > >     [Ride] => Array
> > >         (
> > >             [id] =>
> > >             [datetime] => Array
> > >                 (
> > >                     [day] =>
> > >                     [month] =>
> > >                     [year] =>
> > >                 )
> > >             [event_date] => Array
> > >                 (
> > >                     [day] =>
> > >                     [month] =>
> > >                     [year] =>
> > >                 )
> > >         )
> > >     [date] => Array
> > >         (
> > >             [date] => Array
> > >                 (
> > >                     [day] =>
> > >                     [month] =>
> > >                     [year] =>
> > >                 )
>
> > >         )
> > > )
>
> > > as you can see, datetime and event_date etc (added for debugging) dont
> > > get mixed up here
>
> > > the form is as simple as possible:
>
> > >                 echo $this->Form->input('date');
> > >                 echo $this->Form->input('datetime');
> > >                 echo $this->Form->input('event_date');
>
> > > but even modifying does not change anything:
>
> > >                 echo $this->Form->input('date', array
> > > ('type'=>'date','dateFormat'=>'DMY','empty'=>'--'));
> > >                 echo $this->Form->input('datetime', array
> > > ('type'=>'date','dateFormat'=>'DMY','empty'=>'--'));
> > >                 echo $this->Form->input('event_date', array
> > > ('type'=>'date','dateFormat'=>'DMY','empty'=>'--'));
>
> > > and the weirdest thing:
> > > creating a totally new app on the same level as my current up (using
> > > the same 1.3 HEAD core files) with the same view, controller and model
> > > does it correctly:
>
> > > Array
> > > (
> > >     [Ride] => Array
> > >         (
> > >             [date] => Array
> > >                 (
> > >                     [day] =>
> > >                     [month] =>
> > >                     [year] =>
> > >                 )
> > >                 
> > >         )
>
> > > )
>
> > > there is no beforeFilter() in the controller doing anything out of the
> > > ordinary
> > > no beforeValidate() in the model
>
> > > the debug output above is from right at the beginning of beforeFilter
> > > () in the app_controller
> > > so there is not much that could have happened before - except for the
> > > bootstrapping process
> > > which does not do anything else than in the new freshly created
> > > project.
>
> > > so how can this happen? what did i miss?...
> > > anybody an idea where i could take a look at?
> > > i am running out of ideas - thank you
>
> > > the alternative would be to just rename the field
> > > but there has to be a logical explanation for this :) somwhere
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Foreach loop help

2010-01-18 Thread John Andersen
Hi Dave,

If I understand your issue correctly, then the following should help
you on the way:

[pseudo code]
$maxIndex = count($properties) - 1;
$skipIndex = 3;

for{ $idx = 0; $idx <= $maxIndex; $idx + $skipIndex ) {
echo 
echo $properties[$idx] data
if ( $idx+1 <= $maxIndex ) { echo $properties[$idx+1] ...; }
if ( $idx+2 <= $maxIndex ) { echo $properties[$idx+2] ...; }
echo 
}
[/pseudo code]

Enjoy,
   John

On Jan 18, 2:18 am, Dave  wrote:
> No go. Did not work at all. Will keep trying
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


adding/updating additional fields in HABTM's join table

2010-01-18 Thread Ernesto
Hello.

as the title says is there any way to add/update additional fields
in HABTM's join table?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Ernesto
Virtual Fields = /love @ Cake's dev team :P

On 17 Gen, 05:25, mark_story  wrote:
> The CakePHP development team is happy to announce the release the
> CakePHP 1.3-beta. We've been hard at work implementing new features
> and fixing issues in existing features in the 1.3 branch.  Since 1.3-
> alpha there have been more than 600 commits and more than 43 tickets
> have been closed.  A number of new features have been implemented most
> notably, Model virtualFields[1], changes to the plugin and theme assets
> [2], improvements to TimeHelpers ability to output i18n friendly
> formats, and a refactored test suite harness[3].  When upgrading to
> 1.3-beta it is recommended that you replace app/webroot/test.php with
> the one in the repository and check out the Migration Guide[4] as well
> as the new features guides [5] for changed and new features in 1.3.
>
> In other project news, all the previous stable release points for 1.2
> have been retagged and are available in github.  We've brought on two
> new team members in the past few months as well, both ADmad, and
> jose_zap have joined the CakePHP team and are helping with all aspects
> of the project.  Moving forward with 1.3 we are not planning on adding
> changes that break backwards compatibility.  Any methods currently
> generating errors will be removed in the first Release Candidate. It
> is important that you listen to the warnings, as they will become
> fatal errors in the future.
>
> If you would like to help with the ongoing development of 1.3, you can
> do so in a number of ways. Firstly, filing clear and concise tickets
> for any issues helps get the issues resolved quickly. Secondly, you
> can also contribute by forking the CakePHP project on github and
> implementing fixes, tests cases and features on your forks.  You can
> use pull requests or tickets to notify core team members about your
> changes.
>
> Finally, we'd like to thank you the community for the their greatly
> increased and ongoing support and contributions. Since our move to
> github and lighthouse the volume of community contributions has had a
> dramatic increase, and we'd like to thank the many contributors for
> their help in improving CakePHP.
>
> Download a packaged release [6]
>
> View the changelog [7]
>
> [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features-virtu...
> [2]http://cakephp.lighthouseapp.com/projects/42648/13-new-features-plugi...
> [3]http://cakephp.lighthouseapp.com/projects/42648/1-3-new-features-test...
> [4]http://cakephp.lighthouseapp.com/projects/42648/13-migration-guide
> [5]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> [6]http://github.com/cakephp/cakephp1x/downloads
> [7]http://cakephp.lighthouse.com/projects/42648/changelog-1-3-0-beta
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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