Re: Can I run 2 versions of CakePHP within a single project

2010-07-01 Thread Louie Miranda
You mean, run parallel? different subdomain? or folder?
I think, you could do that. Just check for syntax changes from 1.2 to 1.3
though.

Goodluck
--
Louie Miranda
- Email: lmira...@gmail.com
- Web: http://www.louiemiranda.com



On Thu, Jul 1, 2010 at 11:21 PM, WebRia  wrote:

> Yeah I know this might sound weird, but the problem is,
> We built a really large site using Cake 1.2 Beta, and its grown
> significantly over the period of time and and started to slow down.
>
> We've noticed the latest cake 1.3 gives a much better performance,
> however we can't just upgrade the version of cake because many of the
> functions / syntax are deprecated and many pages break.
>
> I was wondering if it was ever possible that we have the new version
> of cake running in a folder called "cake-new' or something and
> selectively recode a few pages to run using cake 1.3 while the rest of
> the site continues to use cake 1.2..
>
> Thanks in Advance.
>
> 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
>

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: Can I run 2 versions of CakePHP within a single project

2010-07-01 Thread nurvzy
Anything is possible.  However, you'll run into major problem early.
The point in which you tell cake where the core files are is before
the router even touches the url/uri (webroot/index.php).   As such,
you're on your own for figuring out what controller/action pair is
being requested and then switch the CORE to you want to use.   Another
issue you'll find is if your SALT, and configuration is different
between cores, Sessions, Cookies, and the like will not be able to
switch from one core to another.   Yet another issue is routing,
routes have been reworked and simplified in 1.3.  A greedy route that
may work in 1.2 will not in 1.3.  Custom prefixes that work in 1.3
won't work in 1.2, etc...   There are also major concerns on how the
session component and session helper do not autoload or autoecho
anymore in 1.3 -- as such you'll have to take that into
consideration.   Caching is another issue that will show its ugly head
down the line.

That said, I advise against it.  You're putting a lot more extra work
into something that if you applied that work into making your app 1.3
compliant you'll be better overall.   The deprecation functions is
nothing a single regex find/replace can't handle, and the benefits of
the new plugin structure in 1.3 is outstanding, not to mention the new
routes, and awesome JsHelper!

At the very least, if you can't upgrade to 1.3 (which is relatively
painless if you follow the migration guide), you can find some extra
performance by just updated your 1.2:Beta core to the latest 1.2
release: 1.2.7.

Hope that helps,
Nick
On Jul 1, 9:21 am, WebRia  wrote:
> Yeah I know this might sound weird, but the problem is,
> We built a really large site using Cake 1.2 Beta, and its grown
> significantly over the period of time and and started to slow down.
>
> We've noticed the latest cake 1.3 gives a much better performance,
> however we can't just upgrade the version of cake because many of the
> functions / syntax are deprecated and many pages break.
>
> I was wondering if it was ever possible that we have the new version
> of cake running in a folder called "cake-new' or something and
> selectively recode a few pages to run using cake 1.3 while the rest of
> the site continues to use cake 1.2..
>
> Thanks in Advance.

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


Using Key Value pairs with Cake

2010-07-01 Thread WebRia
I know Cake does some fantastic automagic as long as the database has
been designed as a proper relational database.

However considering the latest trends in no-Sql and key / Value
storage concepts I was wondering if it would be possible to design a
database using Key/Value pairs and still have it work from CakePHP?

Thanks in Advance

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


Can I run 2 versions of CakePHP within a single project

2010-07-01 Thread WebRia
Yeah I know this might sound weird, but the problem is,
We built a really large site using Cake 1.2 Beta, and its grown
significantly over the period of time and and started to slow down.

We've noticed the latest cake 1.3 gives a much better performance,
however we can't just upgrade the version of cake because many of the
functions / syntax are deprecated and many pages break.

I was wondering if it was ever possible that we have the new version
of cake running in a folder called "cake-new' or something and
selectively recode a few pages to run using cake 1.3 while the rest of
the site continues to use cake 1.2..

Thanks in Advance.

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: Validation - Multiple attempts

2010-07-01 Thread gremlin
Make sure if you are passing id's for edit actions that the edit
action is in the forms action attribute ie
array( 'url'=>array( 'controller'=>'foo', 'action'=>'bar',$foo['Foo']
['id'] ))..

Also, if you use char(36) for id's then you get UUID's - and it would
be really unlikely that a user will guess a correct uuid, although
this isn't a reason not to check the action in the controller for
tampering (Security component etc)

On Jun 13, 11:19 pm, Ed Propsner  wrote:
> Thanks John,  I appreciate it.
>
> Every time an id becomes visible in the url I take precautions (extra code)
> to ensure any other record can't be altered or manipulated by changing the
> id
> through the url.
>
> I never thought about just writing the id temporarily to the session.
> Thanks for the tip, it should work just fine.
>
> - Ed
>
> On Mon, Jun 14, 2010 at 1:55 AM, John Andersen wrote:
>
> > I can't tell you why it happen, but I can tell you how I work with
> > editing an existing record.
>
> > When a record is chosen for editing, I store the record id in the
> > session. Upon saving the record I take the id from the session. I
> > don't rely on the record id being in the url. If I did that, then the
> > user could easily change it upon submitting the form, which would be a
> > bad thing :)
>
> > Hope this helps you on the way,
> >   John
>
> > On Jun 14, 3:34 am, Ed Propsner  wrote:
> > > I notice that when I submit a form to a url such as
>
> > >http://mysite.com/controller/action/25
>
> > > If validation fails on the first attempt the form reloads under the exact
> > > same url and retains all of $this->data
> > > but if the validation fails on subsequent attempts the form reloads
> > > but the record id gets dropped from the url and the only info left in
> > > $this->data is the value
> > > of the submitted form element and that's all.
>
> > > What causes this? Is there a way around it?
>
> > > - Ed
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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

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: cannot save multiple checkboxes

2010-07-01 Thread Davor Ilic
Cool thank you man That´s it :D  ! this is learning by asking with
googlegroup :) thank you very much...
I wouldn´t find it because i did not know which issue i had.

thx

2010/7/1 John Andersen 

> When you are saving Kattaxonomie in a loop, then you have to use the
> create method first.
> See http://book.cakephp.org/view/1031/Saving-Your-Data
> where you can read about the create method.
> Enjoy,
>John
>
> On Jul 1, 6:49 pm, Davor Ilic  wrote:
> > hi i want to save with the for loop why because i don´t know how to save
> > this in other why to my DB.
> >
> > i save it like this:
> >
> >  for($i=0;$i<$counted_katId;$i++) {
> >
> > $save_product = $this->Kattaxonomie->save($this->Kattaxonomie->set(array(
> >
> > 'kat_id' => $this->data['Kattaxonomie']['kat_id'][$i],
> >
> > 'product_id' => $this->Product->id
> >
> > )));
> >
> > }
> >
> > it works but not well because it saves only the last one...
>
> 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
>

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: Functions in View could not able to load Helpers?

2010-07-01 Thread Nabil Alsharif
Or if you want to be stylish about it make a new helper class with your
function in it and add 'Html' to the $helpers array:

class MyHelper extends AppHelper {
var $helpers = array('Html');

function my_function(){


On Thu, Jul 1, 2010 at 2:04 PM, Miles J  wrote:

> Because $html is not a global variable, its restricted to the scope of
> the view rendering process.
>
> You need to pass it as an argument.
>
> On Jul 1, 4:46 am, saidbakr  wrote:
> > So why global does not work?
> >
> > for example:
> > function foo(){
> > global $html;
> >
> > }
> >
> > On Jul 1, 12:22 pm, "Dr. Loboto"  wrote:
> >
> > > You need to pass these variables into function.
> >
> > > On Jul 1, 2:57 am, saidbakr  wrote:
> >
> > > > Sorry, it was just typing mistake. I already write it with brckets -
> > > > notice the closing bracket -.
> >
> > > > I still don't know how to make Html helper accessible inside the
> > > > function.
> >
> > > > On Jun 30, 7:33 pm, Shaz  wrote:
> >
> > > > > .$html->link[$catName,
> >
> > > > > You're using a square bracket? Should be:
> >
> > > > > .$html->link($catName,
> >
> > > > > On Jun 30, 5:13 pm, saidbakr  wrote:
> >
> > > > > > Hi,
> > > > > > I have a little function in one of my views. This function could
> not
> > > > > > able to use helpers. For example:
> >
> > > > > > //add.ctp
> >
> > > > > > // some html
> > > > > >  > > > > > function printCat(){
> >
> > > > > > echo ''.$html->link[$catName,
> > > > > >
> array('controller'=>'categories','action'=>'view','id'=>$catId)).' > > > > > h1>';
> >
> > > > > > }
> >
> > > > > > ?>
> >
> > > > > > I don't know how could I able to make the html helper accessible
> by
> > > > > > the function?!
>
> 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
>

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: Functions in View could not able to load Helpers?

2010-07-01 Thread Miles J
Because $html is not a global variable, its restricted to the scope of
the view rendering process.

You need to pass it as an argument.

On Jul 1, 4:46 am, saidbakr  wrote:
> So why global does not work?
>
> for example:
> function foo(){
> global $html;
>
> }
>
> On Jul 1, 12:22 pm, "Dr. Loboto"  wrote:
>
> > You need to pass these variables into function.
>
> > On Jul 1, 2:57 am, saidbakr  wrote:
>
> > > Sorry, it was just typing mistake. I already write it with brckets -
> > > notice the closing bracket -.
>
> > > I still don't know how to make Html helper accessible inside the
> > > function.
>
> > > On Jun 30, 7:33 pm, Shaz  wrote:
>
> > > > .$html->link[$catName,
>
> > > > You're using a square bracket? Should be:
>
> > > > .$html->link($catName,
>
> > > > On Jun 30, 5:13 pm, saidbakr  wrote:
>
> > > > > Hi,
> > > > > I have a little function in one of my views. This function could not
> > > > > able to use helpers. For example:
>
> > > > > //add.ctp
>
> > > > > // some html
> > > > >  > > > > function printCat(){
>
> > > > > echo ''.$html->link[$catName,
> > > > > array('controller'=>'categories','action'=>'view','id'=>$catId)).' > > > > h1>';
>
> > > > > }
>
> > > > > ?>
>
> > > > > I don't know how could I able to make the html helper accessible by
> > > > > the function?!

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: cannot save multiple checkboxes

2010-07-01 Thread John Andersen
When you are saving Kattaxonomie in a loop, then you have to use the
create method first.
See http://book.cakephp.org/view/1031/Saving-Your-Data
where you can read about the create method.
Enjoy,
   John

On Jul 1, 6:49 pm, Davor Ilic  wrote:
> hi i want to save with the for loop why because i don´t know how to save
> this in other why to my DB.
>
> i save it like this:
>
>  for($i=0;$i<$counted_katId;$i++) {
>
> $save_product = $this->Kattaxonomie->save($this->Kattaxonomie->set(array(
>
> 'kat_id' => $this->data['Kattaxonomie']['kat_id'][$i],
>
> 'product_id' => $this->Product->id
>
> )));
>
> }
>
> it works but not well because it saves only the last one...

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: Undefined property: QuestionsController::$Session

2010-07-01 Thread rtconner
Probably you have some other error, like a missing database.php file,
or invalid database connection.

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: External script in cakephp

2010-07-01 Thread Nabil Alsharif
http://www.example.com/chat/install.php

On Thu, Jul 1, 2010 at 10:44 AM, Info  wrote:

> Its in there… how do I get to run the install.php?
>
>
>
> *From:* cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] *On
> Behalf Of *Nabil Alsharif
> *Sent:* 1 juillet 2010 10:48
> *To:* cake-php@googlegroups.com
> *Subject:* Re: External script in cakephp
>
>
>
> If you have your cake setup done right you should put it into /app/webroot/
>
> On Wed, Jun 30, 2010 at 9:21 PM, Monnerd  wrote:
>
> Hey there,
>
> I'm trying to install AJAX IM to cake php website...
>
> Installing files to root (public_html/chat) gives me missing
> controller!
>
> Any clue on how to run external script
>
> 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
>
>
>
> 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
>
> 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
>

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: save() omitted

2010-07-01 Thread Andrei Mita
It is solved. When I created my table I defined outcome as tinyint and when
baked, cake made a validation rule to be boolean. I then realized I need at
least 3 values for that field and changed it to float. When trying to update
the record with -1 the validation rule was broken and no update was
performed. It's all fixed now. Thanks.


On Thu, Jul 1, 2010 at 8:29 PM, Edinei L. Cipriani wrote:

> try to do an insert with the data you are testing directly into your
> database, so I noticed you need the user_id and stage_id
>
>
> 2010/7/1 Andrei Mita 
>
> The action is the above one and the model(with validation rules deleted):
>>
>> > class Game extends AppModel {
>> var $name = 'Game';
>>
>> var $belongsTo = array(
>> 'Stage' => array(
>> 'className' => 'Stage',
>> 'foreignKey' => 'stage_id',
>> ),
>> 'User' => array(
>> 'className' => 'User',
>> 'foreignKey' => 'user_id',
>> )
>> );
>>
>> var $hasMany = array(
>> 'Answer' => array(
>> 'className' => 'Answer',
>> 'foreignKey' => 'game_id',
>> 'dependent' => false,
>> )
>> );
>>
>> }
>> ?>
>>
>>
>> On Thu, Jul 1, 2010 at 8:04 PM, Edinei L. Cipriani 
>> wrote:
>>
>>> Em 01/07/10 13:57, Andrei Mita escreveu:
>>>
>>>  I am unbelievably stupid some times. I have lost two days trying to
 figure this one out and it never crossed my mind to check the validation
 rules in the model. And everything was right there in the manual: "If for
 some reason your data isn't saving, be sure to check to see if some
 validation rules aren't being broken."

>>> Please, paste your action and your model, for me.
>>>
>>>
>>> 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
>>>
>>
>>  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
>>
>
>
>
> --
> Edinei L. Cipriani
> Blog: http://phpedinei.wordpress.com
> Twitter: http://www.twitter.com/phpedinei
>
> Desenvolvedor Colégio Trilingue Inovação
> Site: http://www.colegioinovacao.com.br
> Fone 49 84149086
>
> 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
>

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: save() omitted

2010-07-01 Thread Edinei L. Cipriani
try to do an insert with the data you are testing directly into your
database, so I noticed you need the user_id and stage_id


2010/7/1 Andrei Mita 

> The action is the above one and the model(with validation rules deleted):
>
>  class Game extends AppModel {
> var $name = 'Game';
>
> var $belongsTo = array(
> 'Stage' => array(
> 'className' => 'Stage',
> 'foreignKey' => 'stage_id',
> ),
> 'User' => array(
> 'className' => 'User',
> 'foreignKey' => 'user_id',
> )
> );
>
> var $hasMany = array(
> 'Answer' => array(
> 'className' => 'Answer',
> 'foreignKey' => 'game_id',
> 'dependent' => false,
> )
> );
>
> }
> ?>
>
>
> On Thu, Jul 1, 2010 at 8:04 PM, Edinei L. Cipriani wrote:
>
>> Em 01/07/10 13:57, Andrei Mita escreveu:
>>
>>  I am unbelievably stupid some times. I have lost two days trying to
>>> figure this one out and it never crossed my mind to check the validation
>>> rules in the model. And everything was right there in the manual: "If for
>>> some reason your data isn't saving, be sure to check to see if some
>>> validation rules aren't being broken."
>>>
>> Please, paste your action and your model, for me.
>>
>>
>> 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
>>
>
>  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
>



-- 
Edinei L. Cipriani
Blog: http://phpedinei.wordpress.com
Twitter: http://www.twitter.com/phpedinei

Desenvolvedor Colégio Trilingue Inovação
Site: http://www.colegioinovacao.com.br
Fone 49 84149086

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: save() omitted

2010-07-01 Thread Andrei Mita
The action is the above one and the model(with validation rules deleted):

 array(
'className' => 'Stage',
'foreignKey' => 'stage_id',
),
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
)
);

var $hasMany = array(
'Answer' => array(
'className' => 'Answer',
'foreignKey' => 'game_id',
'dependent' => false,
)
);

}
?>


On Thu, Jul 1, 2010 at 8:04 PM, Edinei L. Cipriani wrote:

> Em 01/07/10 13:57, Andrei Mita escreveu:
>
>  I am unbelievably stupid some times. I have lost two days trying to figure
>> this one out and it never crossed my mind to check the validation rules in
>> the model. And everything was right there in the manual: "If for some reason
>> your data isn't saving, be sure to check to see if some validation rules
>> aren't being broken."
>>
> Please, paste your action and your model, for me.
>
>
> 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
>

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: save() omitted

2010-07-01 Thread Edinei L. Cipriani

Em 01/07/10 13:57, Andrei Mita escreveu:
I am unbelievably stupid some times. I have lost two days trying to 
figure this one out and it never crossed my mind to check the 
validation rules in the model. And everything was right there in the 
manual: "If for some reason your data isn't saving, be sure to check 
to see if some validation rules aren't being broken."

Please, paste your action and your model, for me.

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: save() omitted

2010-07-01 Thread Andrei Mita
I am unbelievably stupid some times. I have lost two days trying to figure
this one out and it never crossed my mind to check the validation rules in
the model. And everything was right there in the manual: "If for some reason
your data isn't saving, be sure to check to see if some validation rules
aren't being broken."

Thanks for the help.

On Thu, Jul 1, 2010 at 7:48 PM, Andrei Mita  wrote:

> I believe it's OK
>
> Array
> (
> [Game] => Array
> (
> [id] => 2
> [scored] => 0
> [conceded] => 6
> [correct_answers] => 0
>
> [wrong_answers] => 30
> [time_end] => 2010-07-01 19:47:49
> [outcome] => -1
> )
>
> )
>
>
>
> On Thu, Jul 1, 2010 at 7:41 PM, Edinei L. Cipriani wrote:
>
>>  Em 01/07/10 13:39, Andrei Mita escreveu:
>>
>> Where should I try that? View, controller?
>>
>>
>> Controller.
>>
>>
>> On Thu, Jul 1, 2010 at 7:33 PM, Edinei L. Cipriani 
>> wrote:
>>
>>>  Em 01/07/10 13:24, Andrei Mita escreveu:
>>>
>>> No luck. I don't get it. No errors, nothing. It's as if the query isn't
>>> there. The only thing I get from sql dump is:
>>>
>>>  Try:
>>>
>>> pr($game_final);
>>> die();
>>>
>>> It seems to me that they are accessing the correct action
>>>   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
>>>
>>
>> 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
>>
>>  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
>>
>
>

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


cannot save multiple checkboxes

2010-07-01 Thread Davor Ilic
hi i want to save with the for loop why because i don´t know how to save
this in other why to my DB.

i save it like this:

 for($i=0;$i<$counted_katId;$i++) {

$save_product = $this->Kattaxonomie->save($this->Kattaxonomie->set(array(

'kat_id' => $this->data['Kattaxonomie']['kat_id'][$i],

'product_id' => $this->Product->id

)));

}



it works but not well because it saves only the last one...

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: save() omitted

2010-07-01 Thread Andrei Mita
I believe it's OK

Array
(
[Game] => Array
(
[id] => 2
[scored] => 0
[conceded] => 6
[correct_answers] => 0
[wrong_answers] => 30
[time_end] => 2010-07-01 19:47:49
[outcome] => -1
)

)



On Thu, Jul 1, 2010 at 7:41 PM, Edinei L. Cipriani wrote:

>  Em 01/07/10 13:39, Andrei Mita escreveu:
>
> Where should I try that? View, controller?
>
>
> Controller.
>
>
> On Thu, Jul 1, 2010 at 7:33 PM, Edinei L. Cipriani wrote:
>
>>  Em 01/07/10 13:24, Andrei Mita escreveu:
>>
>> No luck. I don't get it. No errors, nothing. It's as if the query isn't
>> there. The only thing I get from sql dump is:
>>
>>  Try:
>>
>> pr($game_final);
>> die();
>>
>> It seems to me that they are accessing the correct action
>>   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
>>
>
> 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
>
>  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
>

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: save() omitted

2010-07-01 Thread Edinei L. Cipriani

Em 01/07/10 13:39, Andrei Mita escreveu:

Where should I try that? View, controller?


Controller.


On Thu, Jul 1, 2010 at 7:33 PM, Edinei L. Cipriani 
mailto:phpedi...@gmail.com>> wrote:


Em 01/07/10 13:24, Andrei Mita escreveu:

No luck. I don't get it. No errors, nothing. It's as if the query
isn't there. The only thing I get from sql dump is:

Try:

pr($game_final);
die();

It seems to me that they are accessing the correct action
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


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


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: echoing data after retrieving it via "find". cake doesn't echo the actual value, but rather "array"

2010-07-01 Thread Renato de Freitas Freire
I dont know what version you are using...
but in 1.2, i would do like this:

$adressee = $this->User->find('first',array('conditions' =>
array('User.email' =>$user,'fields' => array('username';

try it...


--
Renato de Freitas Freire
ren...@morfer.org


On Thu, Jul 1, 2010 at 12:46 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> The results of the find is an array, so Cake is doing what it's told. You
> will need to do something like:
>
> $this->set('username', $addressee['User']['username']);
>
> That's a guess - to check it, do this just after your find:
>
> die(debug($addressee));
>
> That will print the array returned by the find to screen and you'll be able
> to pick your way through to the right part.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.com
>
> http://www.classoutfit.com
>
> On 1 Jul 2010, at 16:42, Tomfox Wiranata wrote:
>
> > hi everyone,
> >
> > i am about to implement a "forgot password" feature. for that the user
> > has to enter his email adress and then receives his new password. in
> > this email i want to start
> >
> > Hello ,
> >
> > you forgot.bla bla
> >
> > but i am having problems to actually get the username out of my
> > database. it always says "hello array"
> >
> > i am using the "find" function
> >
> > $adressee = $this->User->find(array('User.email' =>$user),
> > array('username'), null, false);
> >
> > to set the placeholder in my email i do this:
> >
> > $this->set('username', $adressee)
> > ...
> > ...
> > $this->Email->send();
> >
> > any idea how i get the actual value out of it?
> >
> > thanks so much
> >
> > 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
>
> 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
>

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: save() omitted

2010-07-01 Thread Andrei Mita
Where should I try that? View, controller?

On Thu, Jul 1, 2010 at 7:33 PM, Edinei L. Cipriani wrote:

>  Em 01/07/10 13:24, Andrei Mita escreveu:
>
> No luck. I don't get it. No errors, nothing. It's as if the query isn't
> there. The only thing I get from sql dump is:
>
> Try:
>
> pr($game_final);
> die();
>
> It seems to me that they are accessing the correct action
>
> 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
>

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: save() omitted

2010-07-01 Thread Edinei L. Cipriani

Em 01/07/10 13:24, Andrei Mita escreveu:
No luck. I don't get it. No errors, nothing. It's as if the query 
isn't there. The only thing I get from sql dump is:

Try:

pr($game_final);
die();

It seems to me that they are accessing the correct action

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: save() omitted

2010-07-01 Thread Andrei Mita
No luck. I don't get it. No errors, nothing. It's as if the query isn't
there. The only thing I get from sql dump is:

SELECT COUNT(*) AS `count` FROM `games` AS `Game` WHERE `Game`.`id` = 1
SELECT COUNT(*) AS `count` FROM `games` AS `Game` WHERE `Game`.`id` = 1


On Thu, Jul 1, 2010 at 7:12 PM, Edinei L. Cipriani 
wrote:
>
> Try:
> $game_final['Game'] = array(
> 'id' => $this->Session->read('Game.game_id'),
> 'scored' => $scored,
> 'conceded' => $conceded,
> 'correct_answers' => $correct_answers,
> 'wrong_answers' => $wrong_answers,
> 'time_end' => date('Y-m-d H:i:s'),
> 'outcome' => $game_outcome);
>
> $this->Game->save($game_final);
> Em 01/07/10 12:51, Andrei Mita escreveu:
>
> I've tried without create, no result.
>
>
> On Thu, Jul 1, 2010 at 6:40 PM, Edinei L. Cipriani 
wrote:
>>
>> If you have id, you do not need to use create ()
>>
>> 2010/7/1 Andrei Mita 
>>>
>>> Hello,
>>>
>>> I have tried many different ways to update a record in one table with no
luck. In one simple function I have 2 save(update) queries. The first one is
always skipped.
>>>
>>> This is the one:
>>>
>>> $game_final = array(
>>> 'id' => $this->Session->read('Game.game_id'),
>>> 'scored' => $scored,
>>> 'conceded' => $conceded,
>>> 'correct_answers' => $correct_answers,
>>> 'wrong_answers' => $wrong_answers,
>>> 'time_end' => date('Y-m-d H:i:s'),
>>> 'outcome' => $game_outcome);
>>>
>>> $this->Game->create();
>>> $this->Game->save($game_final);
>>>
>>> Any help much appreciated.
>>>
>>> Andrei
>>> 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
>>
>>
>>
>> --
>> Edinei L. Cipriani
>> Blog: http://phpedinei.wordpress.com
>> Twitter: http://www.twitter.com/phpedinei
>>
>> Desenvolvedor Colégio Trilingue Inovação
>> Site: http://www.colegioinovacao.com.br
>> Fone 49 84149086
>> 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
>
> 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
>
> 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

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: save() omitted

2010-07-01 Thread Edinei L. Cipriani

Try:
$game_final['Game'] = array(
'id' => $this->Session->read('Game.game_id'),
'scored' => $scored,
'conceded' => $conceded,
'correct_answers' => $correct_answers,
'wrong_answers' => $wrong_answers,
'time_end' => date('Y-m-d H:i:s'),
'outcome' => $game_outcome);

$this->Game->save($game_final);
Em 01/07/10 12:51, Andrei Mita escreveu:

I've tried without create, no result.


On Thu, Jul 1, 2010 at 6:40 PM, Edinei L. Cipriani 
mailto:phpedi...@gmail.com>> wrote:


If you have id, you do not need to use create ()

2010/7/1 Andrei Mita mailto:andrei.m...@gmail.com>>

Hello,

I have tried many different ways to update a record in one
table with no luck. In one simple function I have 2
save(update) queries. The first one is always skipped.

This is the one:

$game_final = array(
'id' => $this->Session->read('Game.game_id'),
'scored' => $scored,
'conceded' => $conceded,
'correct_answers' => $correct_answers,
'wrong_answers' => $wrong_answers,
'time_end' => date('Y-m-d H:i:s'),
'outcome' => $game_outcome);

$this->Game->create();
$this->Game->save($game_final);

Any help much appreciated.

Andrei
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




-- 
Edinei L. Cipriani

Blog: http://phpedinei.wordpress.com
Twitter: http://www.twitter.com/phpedinei

Desenvolvedor Colégio Trilingue Inovação
Site: http://www.colegioinovacao.com.br
Fone 49 84149086

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


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


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: save() omitted

2010-07-01 Thread Andrei Mita
I've tried without create, no result.


On Thu, Jul 1, 2010 at 6:40 PM, Edinei L. Cipriani wrote:

> If you have id, you do not need to use create ()
>
> 2010/7/1 Andrei Mita 
>
>> Hello,
>>
>> I have tried many different ways to update a record in one table with no
>> luck. In one simple function I have 2 save(update) queries. The first one is
>> always skipped.
>>
>> This is the one:
>>
>> $game_final = array(
>> 'id' => $this->Session->read('Game.game_id'),
>> 'scored' => $scored,
>> 'conceded' => $conceded,
>> 'correct_answers' => $correct_answers,
>> 'wrong_answers' => $wrong_answers,
>> 'time_end' => date('Y-m-d H:i:s'),
>> 'outcome' => $game_outcome);
>>
>> $this->Game->create();
>> $this->Game->save($game_final);
>>
>> Any help much appreciated.
>>
>> Andrei
>>
>> 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
>>
>
>
>
> --
> Edinei L. Cipriani
> Blog: http://phpedinei.wordpress.com
> Twitter: http://www.twitter.com/phpedinei
>
> Desenvolvedor Colégio Trilingue Inovação
> Site: http://www.colegioinovacao.com.br
> Fone 49 84149086
>
>  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
>

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: echoing data after retrieving it via "find". cake doesn't echo the actual value, but rather "array"

2010-07-01 Thread Jeremy Burns | Class Outfit
The results of the find is an array, so Cake is doing what it's told. You will 
need to do something like:

$this->set('username', $addressee['User']['username']);

That's a guess - to check it, do this just after your find:

die(debug($addressee));

That will print the array returned by the find to screen and you'll be able to 
pick your way through to the right part.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com

http://www.classoutfit.com

On 1 Jul 2010, at 16:42, Tomfox Wiranata wrote:

> hi everyone,
> 
> i am about to implement a "forgot password" feature. for that the user
> has to enter his email adress and then receives his new password. in
> this email i want to start
> 
> Hello ,
> 
> you forgot.bla bla
> 
> but i am having problems to actually get the username out of my
> database. it always says "hello array"
> 
> i am using the "find" function
> 
> $adressee = $this->User->find(array('User.email' =>$user),
> array('username'), null, false);
> 
> to set the placeholder in my email i do this:
> 
> $this->set('username', $adressee)
> ...
> ...
> $this->Email->send();
> 
> any idea how i get the actual value out of it?
> 
> thanks so much
> 
> 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

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: External script in cakephp

2010-07-01 Thread Info
Its in there. how do I get to run the install.php?

 

From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Nabil Alsharif
Sent: 1 juillet 2010 10:48
To: cake-php@googlegroups.com
Subject: Re: External script in cakephp

 

If you have your cake setup done right you should put it into /app/webroot/

On Wed, Jun 30, 2010 at 9:21 PM, Monnerd  wrote:

Hey there,

I'm trying to install AJAX IM to cake php website...

Installing files to root (public_html/chat) gives me missing
controller!

Any clue on how to run external script

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

 

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

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


echoing data after retrieving it via "find". cake doesn't echo the actual value, but rather "array"

2010-07-01 Thread Tomfox Wiranata
hi everyone,

i am about to implement a "forgot password" feature. for that the user
has to enter his email adress and then receives his new password. in
this email i want to start

Hello ,

you forgot.bla bla

but i am having problems to actually get the username out of my
database. it always says "hello array"

i am using the "find" function

$adressee = $this->User->find(array('User.email' =>$user),
array('username'), null, false);

to set the placeholder in my email i do this:

$this->set('username', $adressee)
...
...
$this->Email->send();

any idea how i get the actual value out of it?

thanks so much

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: save() omitted

2010-07-01 Thread Edinei L. Cipriani
If you have id, you do not need to use create ()

2010/7/1 Andrei Mita 

> Hello,
>
> I have tried many different ways to update a record in one table with no
> luck. In one simple function I have 2 save(update) queries. The first one is
> always skipped.
>
> This is the one:
>
> $game_final = array(
> 'id' => $this->Session->read('Game.game_id'),
> 'scored' => $scored,
> 'conceded' => $conceded,
> 'correct_answers' => $correct_answers,
> 'wrong_answers' => $wrong_answers,
> 'time_end' => date('Y-m-d H:i:s'),
> 'outcome' => $game_outcome);
>
> $this->Game->create();
> $this->Game->save($game_final);
>
> Any help much appreciated.
>
> Andrei
>
> 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
>



-- 
Edinei L. Cipriani
Blog: http://phpedinei.wordpress.com
Twitter: http://www.twitter.com/phpedinei

Desenvolvedor Colégio Trilingue Inovação
Site: http://www.colegioinovacao.com.br
Fone 49 84149086

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


save() omitted

2010-07-01 Thread Andrei Mita
Hello,

I have tried many different ways to update a record in one table with no
luck. In one simple function I have 2 save(update) queries. The first one is
always skipped.

This is the one:

$game_final = array(
'id' => $this->Session->read('Game.game_id'),
'scored' => $scored,
'conceded' => $conceded,
'correct_answers' => $correct_answers,
'wrong_answers' => $wrong_answers,
'time_end' => date('Y-m-d H:i:s'),
'outcome' => $game_outcome);

$this->Game->create();
$this->Game->save($game_final);

Any help much appreciated.

Andrei

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: Fatal error: Class 'I18n' not found in

2010-07-01 Thread Jonas
Okay, for anyone else getting this.

Remember to force your memcached to flush the cache...

http://kevin.vanzonneveld.net/techblog/article/flush_memcached_using_bash/

Thanks :)

/Jonas

On Jul 1, 4:43 pm, Jonas  wrote:
> Hello,
>
> I just tried to re-arrange an old 1.2 CakePHP website when I suddenly
> got this error when I try to access any page at all:
>
> Fatal error: Class 'I18n' not found in /dev/cake/basics.php  on line
> 589
>
> Funny thing is, a totally unrelated site on the same machine also
> gives this error now. All files are present in the cake and app
> directories.
>
> /Jonas

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: External script in cakephp

2010-07-01 Thread Nabil Alsharif
If you have your cake setup done right you should put it into /app/webroot/

On Wed, Jun 30, 2010 at 9:21 PM, Monnerd  wrote:

> Hey there,
>
> I'm trying to install AJAX IM to cake php website...
>
> Installing files to root (public_html/chat) gives me missing
> controller!
>
> Any clue on how to run external script
>
> 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
>

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


Fatal error: Class 'I18n' not found in

2010-07-01 Thread Jonas
Hello,

I just tried to re-arrange an old 1.2 CakePHP website when I suddenly
got this error when I try to access any page at all:

Fatal error: Class 'I18n' not found in /dev/cake/basics.php  on line
589

Funny thing is, a totally unrelated site on the same machine also
gives this error now. All files are present in the cake and app
directories.

/Jonas

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: Undefined property: QuestionsController::$Session

2010-07-01 Thread Teh Treag
You book may be a little old.  As of CakePHP 1.3, the Session
Component is not included for your automatically.  To solve your
problem add the Session Component:

 var $components = array('Auth', 'Cookie', 'Session');

Please check out the migration guide for further information:
http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3

-tehtreag

On Jun 30, 3:59 pm, n4thancake  wrote:
> Hi to all, I'm newer to CakePHP and i'm reading this book 'packt
> publishing cakephp application development'.
> I'm running into a problem where my controllers don't seem to be
> inheriting from my AppController or someone else.
> This is my code
>
> app_controller.php
>  class AppController extends Controller {
>
>         var $helpers = array('Session', 'Form');
>         var $components = array('Auth', 'Cookie');
>
>         function beforeFilter(){
>                 $this->Auth->loginRedirect = array('controller' => 
> 'questions',
> 'action' => 'home');
>                 $this->Auth->logoutRedirect  = array('controller' => 
> 'questions',
> 'action' => 'home');
>                 $this->Auth->allow('signup', 'confirm', 'home', 'show');
>                 $this->Auth->authorize = 'controller';
>                 $this->Auth->userScope = array('User.confirmed' => '1');
>                 $this->set('loggedIn', $this->Auth->user('id'));
>
>                 $this->Auth->autoRedirect = false;
>                 $this->Cookie->name = 'QuickWall';
>
>                 if(!$this->Auth->user('id')) {
>                         $cookie = $this->Cookie->read('User');
>                         if($cookie) {
>                                 $this->Auth->login($cookie);
>                         }
>                 }
>
>         }
>
>         function isAuthorized() {
>                 return true;
>         }
>
> }
>
> ?>
>
> users_controller.php
> ..
>                 if ($this->Email->send()) {
>                         $this->Session->setFlash('Confirmation mail sent. 
> Please
> check your inbox');
>                         $this->redirect(array('controller' => 'questions',
> 'action'=>'home'));
>                         } else {
>                         $this->User->del($this->User->getLastInsertID());
>                                 $this->Session->setFlash('There was a problem 
> sending the
> confirmation mail. Please try again');
>                         }
>                         } else {
>                                 $this->Session->setFlash('There was an error 
> signing up. Please,
> try again.');
>                                 $this->data = null;
>                         }
>                 }
>         }
>
> questions_controller.php
>  class QuestionsController extends AppController {
>
>         var $name = 'Questions';
>
>         function home() {
>
>                 if (!empty($this->data) && $this->Auth->user('id')) {
>                         $this->data['Question']['user_id'] = 
> $this->Auth->user('id');
>                         $this->Question->create();
>                         if ($this->Question->save($this->data)) {
>                                 $this->Session->setFlash('Your Question has 
> been added');
>                                 $this->redirect(array('action'=>'home'), 
> null, true);
>                         } else {
>                                 $this->Session->setFlash('The Question could 
> not be saved. Please,
> try again.');
>                         }
>                 }
>
>                 $this->Question->recursive = 1;
>                 $this->set('questions', $this->Question->find('all'));
>         }
>
> When I try to sign up or to post a question I received this error
>
> Notice (8): Undefined property: QuestionsController::$Session [APP/
> controllers/questions_controller.php, line 12]
> Fatal error: Call to a member function setFlash() on a non-object in /
> web/htdocs/www.endlesslab.org/home/quickwall/app/controllers/
> questions_controller.php on line 12
>
> as you can see inhttp://www.endlesslab.org/quickwall/
>
> Someone can help me please?

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: Functions in View could not able to load Helpers?

2010-07-01 Thread saidbakr
So why global does not work?

for example:
function foo(){
global $html;
}

On Jul 1, 12:22 pm, "Dr. Loboto"  wrote:
> You need to pass these variables into function.
>
> On Jul 1, 2:57 am, saidbakr  wrote:
>
> > Sorry, it was just typing mistake. I already write it with brckets -
> > notice the closing bracket -.
>
> > I still don't know how to make Html helper accessible inside the
> > function.
>
> > On Jun 30, 7:33 pm, Shaz  wrote:
>
> > > .$html->link[$catName,
>
> > > You're using a square bracket? Should be:
>
> > > .$html->link($catName,
>
> > > On Jun 30, 5:13 pm, saidbakr  wrote:
>
> > > > Hi,
> > > > I have a little function in one of my views. This function could not
> > > > able to use helpers. For example:
>
> > > > //add.ctp
>
> > > > // some html
> > > >  > > > function printCat(){
>
> > > > echo ''.$html->link[$catName,
> > > > array('controller'=>'categories','action'=>'view','id'=>$catId)).' > > > h1>';
>
> > > > }
>
> > > > ?>
>
> > > > I don't know how could I able to make the html helper accessible by
> > > > the function?!

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


External script in cakephp

2010-07-01 Thread Monnerd
Hey there,

I'm trying to install AJAX IM to cake php website...

Installing files to root (public_html/chat) gives me missing
controller!

Any clue on how to run external script

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


HTML File With All Elements Defined in default.css

2010-07-01 Thread femasazo
Hello everyone,

I was hoping someone has made an HTML file that uses all of the
elements defined in default.css from which I could create a new
design.

I've made my own css files for cake but only in a rather hacky
haphazard way.

I would like to do a proper layout.

Thanks,
Damon

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


Sessions across multiple apps, same domain

2010-07-01 Thread kevenages
I'm fairly new to cake, but an experienced PHP developer.  I have a
production setup of cake.  It looks as follows:

/home/keven/cake1.3 - This contains the 'spark_plug' plugin, which
handles authentication
/home/keven/app1
/home/keven/app2

Webroot is located here:

/var/www/login
/var/www/contest
/var/www/game

The idea is that a user logs in, then goes to another app where their
login details are supposed to be kept within session data or the $user
object from spark plug plugin.

The problem is that sessions are not being passed app to app.  I've
even tried to set a session explicitly in one app and tried to read it
in another and it is blank. (ie, first app: $_SESSION['try'] = 'this'
-- second app: print $_SESSION['try'];

Any ideas would be greatly appreciated.  Thanks in advance everyone



More about my setup:

Cake 1.3.2
Configure::write('Session.checkAgent', false);
Configure::write('Security.level', 'medium'); *** I've also tried
'low'
Configure::write('Security.salt',
'LKJd2ou43kljLKDJfkljueoiru34asdfk3'); *** this is the same across all
apps

I've read the following articles to no avail:

http://bakery.cakephp.org/articles/view/how-to-bend-cakephp-s-session-handling-to-your-needs
http://www.amityadav.name/cakephp-sharing-sessions-between-apps-on-the-same-domain

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


Undefined property: QuestionsController::$Session

2010-07-01 Thread n4thancake
Hi to all, I'm newer to CakePHP and i'm reading this book 'packt
publishing cakephp application development'.
I'm running into a problem where my controllers don't seem to be
inheriting from my AppController or someone else.
This is my code

app_controller.php
Auth->loginRedirect = array('controller' => 'questions',
'action' => 'home');
$this->Auth->logoutRedirect  = array('controller' => 
'questions',
'action' => 'home');
$this->Auth->allow('signup', 'confirm', 'home', 'show');
$this->Auth->authorize = 'controller';
$this->Auth->userScope = array('User.confirmed' => '1');
$this->set('loggedIn', $this->Auth->user('id'));

$this->Auth->autoRedirect = false;
$this->Cookie->name = 'QuickWall';

if(!$this->Auth->user('id')) {
$cookie = $this->Cookie->read('User');
if($cookie) {
$this->Auth->login($cookie);
}
}

}

function isAuthorized() {
return true;
}

}
?>

users_controller.php
..
if ($this->Email->send()) {
$this->Session->setFlash('Confirmation mail sent. Please
check your inbox');
$this->redirect(array('controller' => 'questions',
'action'=>'home'));
} else {
$this->User->del($this->User->getLastInsertID());
$this->Session->setFlash('There was a problem 
sending the
confirmation mail. Please try again');
}
} else {
$this->Session->setFlash('There was an error 
signing up. Please,
try again.');
$this->data = null;
}
}
}


questions_controller.php
data) && $this->Auth->user('id')) {
$this->data['Question']['user_id'] = 
$this->Auth->user('id');
$this->Question->create();
if ($this->Question->save($this->data)) {
$this->Session->setFlash('Your Question has 
been added');
$this->redirect(array('action'=>'home'), null, 
true);
} else {
$this->Session->setFlash('The Question could 
not be saved. Please,
try again.');
}
}

$this->Question->recursive = 1;
$this->set('questions', $this->Question->find('all'));
}


When I try to sign up or to post a question I received this error

Notice (8): Undefined property: QuestionsController::$Session [APP/
controllers/questions_controller.php, line 12]
Fatal error: Call to a member function setFlash() on a non-object in /
web/htdocs/www.endlesslab.org/home/quickwall/app/controllers/
questions_controller.php on line 12


as you can see in http://www.endlesslab.org/quickwall/

Someone can help me please?

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: Pagination starting at a given page

2010-07-01 Thread Andrei Mita
I noticed that in the API but dind't know for sure. Thanks.

On Tue, Jun 29, 2010 at 5:03 PM, cricket  wrote:

> On Tue, Jun 29, 2010 at 7:47 AM, Andrei Mita 
> wrote:
> > Hello,
> >
> > Here is the situation: I have 1000 users competing in an online game.
> This
> > game has standings. Is it possible to start the pagination at a given
> page?
>
> Use the 'page' key in the $paginate array:
>
> 'page' => whatever
>
> 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
>

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: Need CSV import: best practices?

2010-07-01 Thread euromark
without details we can only speculate

but we all agree that the model should process the imported data
if we open and parse the files the models as well, is not that clear.
maybe its cleaner to to that in the "import" action" and pass the data
to the model.


On 30 Jun., 16:23, Shaz  wrote:
> CakePHP follows the MVC design pattern - most of the heavy lifting
> should be done in the model with the controller just being the
> intermediary between the model and view.
>
> Remember: Fat Model, Skinny 
> Controllerhttp://teknoid.wordpress.com/2009/01/06/another-way-to-think-about-mvc/
>
> On Jun 30, 12:27 pm, Rick Dane  wrote:
>
>
>
> > This should all be in the controller as far as I can tell, cakephp
> > seems to want everything in the control with the model just being
> > representative of the database, so I believe the model wouldn't come
> > into play until you are uploading the csv to the database
>
> > On Jun 30, 2:49 am, euromark  wrote:
>
> > > i would use a library (lib) for cake1.3 (those can then use vendor
> > > files if neccessary)
>
> > > does it have to be in a model? or could that happen in the controller?
>
> > > On 30 Jun., 11:40, Ernesto  wrote:
>
> > > > Hello.
> > > > i need to import data from a CSV file in two of my app's model.
>
> > > > what's the best place to code the import routine?
> > > > - a behavior
> > > > - a vendor class
> > > > - appModel

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: Functions in View could not able to load Helpers?

2010-07-01 Thread Dr. Loboto
You need to pass these variables into function.

On Jul 1, 2:57 am, saidbakr  wrote:
> Sorry, it was just typing mistake. I already write it with brckets -
> notice the closing bracket -.
>
> I still don't know how to make Html helper accessible inside the
> function.
>
> On Jun 30, 7:33 pm, Shaz  wrote:
>
>
>
> > .$html->link[$catName,
>
> > You're using a square bracket? Should be:
>
> > .$html->link($catName,
>
> > On Jun 30, 5:13 pm, saidbakr  wrote:
>
> > > Hi,
> > > I have a little function in one of my views. This function could not
> > > able to use helpers. For example:
>
> > > //add.ctp
>
> > > // some html
> > >  > > function printCat(){
>
> > > echo ''.$html->link[$catName,
> > > array('controller'=>'categories','action'=>'view','id'=>$catId)).' > > h1>';
>
> > > }
>
> > > ?>
>
> > > I don't know how could I able to make the html helper accessible by
> > > the function?!

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: Which is the best hosting server for CakePHP?

2010-07-01 Thread Gonzalo Servat
Another suggestion is www.servint.net. I've been with them for a few years
and they have been pretty good to me.

Cheers
Gonzalo

On Thu, Jul 1, 2010 at 4:52 AM, cricket  wrote:

> On Wed, Jun 30, 2010 at 5:44 AM, jodator  wrote:
> > I have similar thoughts on VPS after switching to one.
> > It's not as easy as shared hosting, but you can find tons of tutorials
> > online.
> >
> > Btw, Big THX for the linode.com link. I was searching a affordable VPS
> > in US and these one is just sweet!
>
> +++ on VPS. I went that route almost ten years ago and can't imagine
> using shared hosting again. Of course, you need to be comfortable
> managing a server but there are a lot of control panels available that
> (more or less) do a half-way decent job. (Personally, I avoid them,
> though) Having a VPS means installing what you need, when you need it,
> without a lot of useless junk that's never used except by someone
> exploiting some security hole. And you can also install Cake globally
> (eg. in /usr/share/php, /var/lib/php, etc.) and create symlinks so as
> to quickly switch between Cake versions.
>
> I'll recommend johncompanies.com, which was one of the first to offer
> VPS in the US. Their support is EXCELLENT. They obviously know what
> they're doing and are prompt (REALLY prompt) and pleasant to deal
> with. They didn't just jump on the VPS bandwagon last month. They also
> run rsync.net for offsite backups.
>
> Also, A2Hosting.com has some pretty decent VPS packages. I've
> currently got 5 servers between those two, running between one and
> eight sites on each. I might check out linode.com, though, for my next
> server (good to spread things around a bit).
>
> 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
>

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: image and a tag problem without mod_rewrite

2010-07-01 Thread AD7six


On Jun 30, 3:45 pm, kaushik  wrote:
> I have developed my site in a server where mod_rewrite and .httaccess
> are available. I used '$this->webroot' variable for a tag and img path
> extensively. But I have to make the live in a server where mod_rewrite
> and .httaccess are not available and the site will be uploaded in a
> subfolder (not in the root folder). Now I am facing very problem in a
> tag path. Because '$this-webroot' is returning 'http://www.mysite.com/
> subfolder/app/webroot/'. It is ok for the img and other supporting
> fiilepath, it is not working for a tag path, because we need 
> "http://www.mysite.com/subfolder/index.php/"; from '$this->webroot", so that
> the a tag links looks like "http://www.mysite.com/subfolder/index.php/
> controller_name/view_name/param/". What is fix for this prob?

To use $html->link, $html->image, $html->etc like all the other cool
kids do.

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: Path for images etc

2010-07-01 Thread AD7six


On Jul 1, 6:19 am, Sanfly  wrote:
> Hi All
>
> It's been a long time since I've written any CakePHP, and even longer
> since Ive had to set up a server.  I know there is an answer to this
> somewhere but I cant for the life of me find it!  Also I have
> previously only used 1.1, and am now using the latest version
>
> On my WAMP server Im using for development, ive "installed" cake in a
> folder called "DSC"
>
> localhost
>     DSC
>         app
>         cake
>         vendors
>         etc...
>
> when I use my html helper in my default.ctp file to insert an image,
> the image does not display
>
> image('layout/dsc_01.png',array('border'=>'0',
> 'width'=>'17', 'height'=>'207')); ?>
>
> the path that comes back is a relative path, and goes too far back
>
>  height="207" alt="" />
>
> the path shouldn't have the DSC

why not - in what way is it wrong/not working.
>
>  alt="" />

cake doesn't work like that. If it did it would mean the image works
only if you're a localhost/DSC/ not localhost/DSC or localhost/DSC/
somethingelse/ etc.
>
> What file do I need to edit to get the relative paths working
> correctly?

You won't ever get relative paths out of cake for assets.

AD

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


Using Js helper on select list

2010-07-01 Thread Jeremy Burns
I have a select list that contains a list of currencies. When the user
changes the currency, I want to use the Js helper to refresh the cart,
which is presented inside a div in the same view. How do I do that?

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