Re: How to write to_char() function in cakephp

2010-04-26 Thread Narendra Padala
thanks sir

On Mon, Apr 26, 2010 at 10:00 PM, cricket  wrote:

> On Apr 26, 9:44 am, Narendra Padala  wrote:
> > Hi all,
> > I am new to cakephp i have problem like this please help me out sir
> >
> > $currentday = date("w");
> >
> > $rsStoreTime = pg_exec($conn, "SELECT
> > intdaynumber,to_char(dtmopeningtime,'HH24:mi') AS
> > dtmopeningtime,to_char(dtmclosingtime,'HH24:mi') AS dtmclosingtime
> > FROM tblstorehours where intdaynumber = '$currentday'");
> >
> > above query  how can i convert into cakephp
> >
> > and
> >
> > $intCnt = pg_numrows($rsStoreTime);
> >
> > this query also how can i convert into cakephp .
>
> It's a bit tricky to provide an example as your names do not follow
> Cake's convention, so I'll have to assume a few things. First, that
> the model name is StoreHour (maybe you should post the model name and
> its associations).
>
> So, from StoreHoursController:
>
> $rsStoreTime = $this->StoreHour->find(
>'first',
>array(
>'fields' => array(
>'StoreHour.intdaynumber',
> 'to_char(dtmopeningtime,"HH24:mi") AS
> dtmopeningtime',
> 'to_char(dtmclosingtime,"HH24:mi") AS
> dtmclosingtime'
>),
>'conditions' => array(
>'StoreHour.intdaynumber' => date('w')
>)
>)
> );
>
>
> But there's one thing you have to know about Cake. When using
> calculated fields like this, Cake puts the result in a spearate array
> than normal. See this article for a clear explanation as well as a
> quick fix:
>
>
> http://teknoid.wordpress.com/2008/09/29/dealing-with-calculated-fields-in-cakephps-find/
>
> Also, if you're using version 1.3 you should have a look at "virtual
> fields". See here:
>
> http://book.cakephp.org/view/1608/Virtual-fields
>
>
> But you really should re-name things to follow Cake's naming
> conventions, though. It'll save you a lot of trouble in the end.
>
> table: store_hours
>
> fields: day (not reserved in Postgres), opening_time, closing_time
>
> And, while i'm a big fan of using a database's built-in functions (and
> a big fan of PG) I wonder if it's worth doing all this in the query.
> You could simply make the conversion in the view using PHP.
>
> 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


date validation

2010-04-26 Thread Ed Propsner
I'm having a few problems trying to validate a date and I'm not sure what
I'm doing wrong ...

[date] => Array
(
[month] =>
[day] =>
[year] =>
)

 I have the validation rule in the model set up close to the example
in the book.

'dob' => array(
'rule' => 'date',
'message' => 'Some message here.',
'allowEmpty' => false
)

The book says if no keys are supplied the default key that will be
used is 'ymd' ... that's fine.

I'm not concerned about the format, I would just like to ensure the
fields are not empty.

When I submit the form it returns the following complaint:

" preg_match() expects parameter 2 to be string, array given "

What am I messing up this time ?

- Ed

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: Problems with $persistModel and cache

2010-04-26 Thread Miles J
Even more confused as the Weapon model is empty:

class Weapon extends AppModel {

/**
 * Alt DB.
 *
 * @access public
 * @var string
 */
public $useDbConfig = 'sc2a';

}

And the only associations:

'Weapon1' => array(
'className' => 'Weapon',
'foreignKey' => 'weapon1_id'
),
'Weapon2' => array(
'className' => 'Weapon',
'foreignKey' => 'weapon2_id'
),

On Apr 26, 10:19 pm, Jeremy Burns  wrote:
> Have you cleared down the contents of /app/tmp/cache/persist and 
> /app/tmp/cache/models?
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 27 Apr 2010, at 06:13, Miles J wrote:
>
>
>
> > I have been upgradingwww.sc2armory.comto 1.3 and have been having a
> > terrible cache problem. I have many tables with extreme relations to
> > get the game guide working. When I enable $persistModel, all the game
> > pages go to a white page and I get this in my error logs:
>
> > Just a heads up as I dont know how to fix this problem. I had to
> > disable persist for now.
>
> > 2010-04-26 21:49:11 Notice: Notice (8): Model::resetAssociations() [ > href='http://php.net/model.resetassociations'>model.resetassociations > a>]: The script tried to execute a method or access a property of an
> > incomplete object. Please ensure that the class definition
> > "Weapon" of the object you are trying to operate on was
> > loaded _before_ unserialize() gets called or provide a __autoload()
> > function to load the class definition  in [/home/mileswj/cake_1.3/cake/
> > libs/model/model.php, line 2357]
>
> > Im looking into the problem within the Weapon model, but no luck yet.
>
> > 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.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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: Problems with $persistModel and cache

2010-04-26 Thread Miles J
I have to clear those to make the site work.

It seems something is being serialized and cached wrong.

On Apr 26, 10:19 pm, Jeremy Burns  wrote:
> Have you cleared down the contents of /app/tmp/cache/persist and 
> /app/tmp/cache/models?
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 27 Apr 2010, at 06:13, Miles J wrote:
>
>
>
> > I have been upgradingwww.sc2armory.comto 1.3 and have been having a
> > terrible cache problem. I have many tables with extreme relations to
> > get the game guide working. When I enable $persistModel, all the game
> > pages go to a white page and I get this in my error logs:
>
> > Just a heads up as I dont know how to fix this problem. I had to
> > disable persist for now.
>
> > 2010-04-26 21:49:11 Notice: Notice (8): Model::resetAssociations() [ > href='http://php.net/model.resetassociations'>model.resetassociations > a>]: The script tried to execute a method or access a property of an
> > incomplete object. Please ensure that the class definition
> > "Weapon" of the object you are trying to operate on was
> > loaded _before_ unserialize() gets called or provide a __autoload()
> > function to load the class definition  in [/home/mileswj/cake_1.3/cake/
> > libs/model/model.php, line 2357]
>
> > Im looking into the problem within the Weapon model, but no luck yet.
>
> > 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.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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: SQL with Where not exists

2010-04-26 Thread ecommy.com
ok but don't you find it fair to post it here? after all you looked
for help and maybe someone like you will find this post and will see:
"I finally found the solution myself."

On Apr 27, 12:07 am, Luck  wrote:
> Hi,
>
> After many tries, I finally found the solution myself.
> Thanks
>
> On Apr 26, 4:34 pm, Luck  wrote:
>
>
>
> > Hi,
> > I have googled for similar problems and still cannot find a solution
> > on how to build a 'NOT EXISTS' query. I'm newbie to CakePHP.
>
> > I have two simple models: Question and Answer. Question has a hasMany
> > relationship with Answer, as the answers table has a foreign key to
> > questions. Very simple.
>
> > Problem one is, I want to do a find for those queries with no answers,
> > in SQL would be just like this:
>
> > SELECT * FROM questions where not exists (select 1 from anwers where
> > answers.question_id=questions.question_id);
>
> > How do I do this in CakePHP? Is there any way to include other finds
> > in the conditions? I mean not only field matches like the
> > documentation shows.
>
> > The second step is paginate that. How should I alter the current
> > pagination? (currently it paginates all the questions)
> > $this->set('questions',$this->paginate('Question'));
>
> > Thanks
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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: Problems with $persistModel and cache

2010-04-26 Thread Jeremy Burns
Have you cleared down the contents of /app/tmp/cache/persist and 
/app/tmp/cache/models?

Jeremy Burns
jeremybu...@me.com


On 27 Apr 2010, at 06:13, Miles J wrote:

> I have been upgrading www.sc2armory.com to 1.3 and have been having a
> terrible cache problem. I have many tables with extreme relations to
> get the game guide working. When I enable $persistModel, all the game
> pages go to a white page and I get this in my error logs:
> 
> Just a heads up as I dont know how to fix this problem. I had to
> disable persist for now.
> 
> 2010-04-26 21:49:11 Notice: Notice (8): Model::resetAssociations() [ href='http://php.net/model.resetassociations'>model.resetassociations a>]: The script tried to execute a method or access a property of an
> incomplete object. Please ensure that the class definition
> "Weapon" of the object you are trying to operate on was
> loaded _before_ unserialize() gets called or provide a __autoload()
> function to load the class definition  in [/home/mileswj/cake_1.3/cake/
> libs/model/model.php, line 2357]
> 
> Im looking into the problem within the Weapon model, but no luck yet.
> 
> 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


Problems with $persistModel and cache

2010-04-26 Thread Miles J
I have been upgrading www.sc2armory.com to 1.3 and have been having a
terrible cache problem. I have many tables with extreme relations to
get the game guide working. When I enable $persistModel, all the game
pages go to a white page and I get this in my error logs:

Just a heads up as I dont know how to fix this problem. I had to
disable persist for now.

2010-04-26 21:49:11 Notice: Notice (8): Model::resetAssociations() [model.resetassociations]: The script tried to execute a method or access a property of an
incomplete object. Please ensure that the class definition
"Weapon" of the object you are trying to operate on was
loaded _before_ unserialize() gets called or provide a __autoload()
function to load the class definition  in [/home/mileswj/cake_1.3/cake/
libs/model/model.php, line 2357]

Im looking into the problem within the Weapon model, but no luck yet.

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: Dependent models

2010-04-26 Thread Jeremy Burns
I would ALWAYS add database relationships because (i) it will perform a lot 
better (your database does not care or know that you are using Cake) and (ii) 
it is the ultimate safety net against bad deletes and orphan records.

Jeremy Burns
jeremybu...@me.com
On 27 Apr 2010, at 00:03, etipaced wrote:

> Pablo,
> 
> The relationships you create in Cake are handled by setting any of the
> following model properties:
> 
> - hasOne
> - hasMany
> - belongsTo
> - hasAndBelongsToMany
> 
> You are probably familiar with this already if you're using Cake at
> all. The relationships don't require the database tables themselves to
> have foreign key constraints. In fact, in all of my applications, I do
> not have constraints between my database tables in MySQL. In MySQL's
> eyes, all my tables are 100% independent of each other.
> 
> Instead, I relate all my tables together at the application level.
> Specifically, at the model level. This enables me to use all of Cake's
> power such as dependent = true and the delete callbacks.
> 
> By relating your tables together at the model layer in Cake, and
> setting dependent = true (valid for hasOne and hasMany only, btw),
> Cake will automatically find the related records and delete them for
> you even though MySQL does not have these tables connected with a
> foreign key constraint.
> 
> HTH
> 
> - Kevin (etipaced)
> 
> On Apr 10, 9:03 pm, "Pablo Vergara B." 
> wrote:
>> How do you actually can use database CASCADE deleting method when no
>> "real" relations are made into the database diagram? (Because
>> relations are handled internally by cakePHP)
>> 
>> I'm still a novice about cakePHP so I can be wrong... or not. Let's
>> wait for a advanced user to answer both questions :).
>> 
>> Inf fact (if we could) the database engine deleting/updating option
>> (using CASCADE for instance) would be the fastest way to do this.
>> 
>> Greetings and sorry if my english is not too good plz, I'm from a
>> spanish speaking country...
>> 
>> On Apr 10, 12:45 pm, Mateusz Kaczanowski  wrote:
>> 
>>> Hi guys,
>> 
>>> In CakePHP we delete related records by dependency in model. Which way us
>>> better
>> 
>>> 1. Set up CASCADE in innodb mysql database
>>> 2. Usedependentin cakePHP model
>> 
>>> "Better" - I mean faster , safer .
>> 
>>> Thanks for answers
> 
> 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: belongs_to and null values

2010-04-26 Thread dreamingmind
The return of null values as you describe seems reasonable. I don't
see any mention in the find() method of suppressing the return of null
fields. To avoid the mess in your xml how about iterating through your
data array and unset()ing the elements who's values are null?

Don

On Apr 26, 8:28 am, hugom  wrote:
> Hi! I'm having some strange behavior and I want to know if this is the
> expected behavior, it's a bug or something else.
>
> I have a model A related with belongs_to with model B. When I do a
> find('all'), some A models have null the foreign key related with
> table B, and this is the result:
>
> Some model A register:
> array(
>     'model A' => array('field1modelA' => 'value', etc.,
> 'foreignKeyWithModelB' => null),
>     'model B' => 'field1MOdelB'=>null, 'field2ModelB' => null, etc.,
> all nulls)
> );
>
> What I want:
> array('model A' => array('field1modelA' => 'value', etc.,
> 'foreignKeyWithModelB' => null);
>
> I don't want an extra array if the related table register does not
> exists :S I use this with xml helper and i get something ugly like:
>
> 
> 
> 
>
> That is ok when foreignKeyWithModelB is not null, but when is null
> there's no related data and I dont want to show something like a model
> with all null. There's a way to avoid this?
>
> 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.com For more options, visit this group 
> athttp://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: Calling actions inside a controller

2010-04-26 Thread Eric Anderson
Thank you both so much! I really appreciate it.

Eric

On Apr 26, 1:06 am, Jeremy Burns  wrote:
> Good point.. As far as I know, the key difference is:
>
> $this->functionName() is used to call another function that ought to return a 
> value back to the calling function.
> $this->setAction() effectively terminates the calling action and starts the 
> called action, which then (probably) renders a view.
>
> Or at least that's how I use them.
>
> Jeremy Burns
> jeremybu...@me.com
> (Skype) +44 208 123 3822 (jeremy_burns)
> (m) +44 7973 481949
> (h) +44 208 530 7573
>
> On 26 Apr 2010, at 08:00, Miles J wrote:
>
>
>
> > Or you can use $this->setAction().
>
> > On Apr 25, 10:54 pm, Jeremy Burns  wrote:
> >> $this->functionName();
>
> >> Jeremy Burns
> >> jeremybu...@me.com
>
> >> On 25 Apr 2010, at 23:40, Eric Anderson wrote:
>
> >>> Hi everyone,
>
> >>> I was unable to find the answer to this question in the 1.2.x
> >>> documentation or in this group (although I have a feeling it must have
> >>> already been answered somewhere).
>
> >>> How do I properly call another action of the controller inside another
> >>> action? All within the same controller. I just need to call one
> >>> controller action inside of another. I know it's simple, but I can't
> >>> seem to figure it out.
>
> >>> Thanks!
>
> >>> Eric
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> >>> athttp://groups.google.com/group/cake-php?hl=en
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> >> athttp://groups.google.com/group/cake-php?hl=en
>
> > 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.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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: Plugin and css links

2010-04-26 Thread Sam Sherlock
replace {PluginName} with your plugin name :)


background: url({PluginName}/img/bg.gif);

or

background: url(../img/bg.gif);

plugin webroots serve files from example.com/{PluginName}/(css|js|img)/

you can speed up the serving of these files by copying them from the plugin
webroot dir into a dir within webroot named {PluginName}

hth - S




On 27 April 2010 02:37, Ziki  wrote:

> yes, but when I have in my css file something like this:
>
> background: url(/img/bg.gif);
>
> that can not be loaded from plugin img directory, problem is just
> links in css files.
>
> On 27 tra, 03:23, jacmoe  wrote:
> > Treat the plugin/webroot the same as app/webroot:
> > Images in img, css in css, javascript in js, etc.
> >
> > Did you put them in the 'img' directory ?
> >
> > On Apr 27, 12:21 am, Ziki  wrote:
> >
> > > Hi,
> >
> > > I have images in img folder in webroot of my plugin, but images aren't
> > > load when links from css file also in plugin. This is problem when
> > > making theme. I must put img in default img folder of site, not under
> > > plugin webroot folder.
> >
> > > Is there solution?
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 athttp://
> groups.google.com/group/cake-php?hl=en
> >
> > 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 athttp://
> 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: Plugin and css links

2010-04-26 Thread Ziki
yes, but when I have in my css file something like this:

background: url(/img/bg.gif);

that can not be loaded from plugin img directory, problem is just
links in css files.

On 27 tra, 03:23, jacmoe  wrote:
> Treat the plugin/webroot the same as app/webroot:
> Images in img, css in css, javascript in js, etc.
>
> Did you put them in the 'img' directory ?
>
> On Apr 27, 12:21 am, Ziki  wrote:
>
> > Hi,
>
> > I have images in img folder in webroot of my plugin, but images aren't
> > load when links from css file also in plugin. This is problem when
> > making theme. I must put img in default img folder of site, not under
> > plugin webroot folder.
>
> > Is there solution?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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: automagic select boxes for "belongsto" relations

2010-04-26 Thread dreamingmind
$this->Artist->find('list') is going get you part of the way there.
find('list') will use id for the array index (and the select value
attribute). It will want to default to the field 'name' or 'title' for
the value. This can be changed as you can see in the documentation for
find(). Getting the names concatenated is a bit trickier. I'm still
working it out myself but I'm 90% sure it's possible.

Though you can (incredibly) do this:

$this->Artist->find(
   'all',
   array(
 'fields' => array(
"concat(Artist.first_name,' ',Artist.last_name) as name"
 )
   )
);

to retrieve your concatenated name.

You can also specify the two fields to use in find('list') in the same
array(fields(array()) structure. However I haven't been successful in
getting a concatenation in the 'list' variant. It seems possible
though. Probably I just keep making errors in my code.

Don


On Apr 26, 7:02 am, mrnnn  wrote:
> hi all!
>
> i'm merely beginning with cakephp and i've tried the two examples and
> all worked fine.
>
> but now i'm trying to convert my own sql scheme to a cake application
> using the bake all command.
>
> in short, the fields that matter:
>
> artitsts {
>  auto_increment int id
>  first_name varchar(100)
>  last_name varchar(100)
>
> }
>
> work {
>  auto_increment id
>  int artist_id
>
> }
>
> basically, what i'd like is that, when editing/adding a work, you'd
> get a select box to select the artist. now, when i bake, it either:
> -gives me no select box, just an input field
> -sometimes i get to select the artist id
>
> what i want: a select box with a combination of the first and last
> name.
>
> is there magic to this or should i just do it manually? fill an array
> in the controller, push it to the view and then make a $form->select
> element? or is there a way to obtain the behaviour of the example,
> where creating a user shows a select box for the group, even though
> the view says $form->input?
>
> the only difference i see so far is that the group name is unique.
> should i make my lastname column unique maybe? or can i make the
> combination unique? that probably won't work, will it?
>
> or is it the name of the column? does cakephp automatically pick the
> "name" field if present?
>
> thanks!
>
> 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.com For more options, visit this group 
> athttp://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: Plugin and css links

2010-04-26 Thread jacmoe
Treat the plugin/webroot the same as app/webroot:
Images in img, css in css, javascript in js, etc.

Did you put them in the 'img' directory ?

On Apr 27, 12:21 am, Ziki  wrote:
> Hi,
>
> I have images in img folder in webroot of my plugin, but images aren't
> load when links from css file also in plugin. This is problem when
> making theme. I must put img in default img folder of site, not under
> plugin webroot folder.
>
> Is there solution?
>
> 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.com For more options, visit this group 
> athttp://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: Dependent models

2010-04-26 Thread etipaced
Pablo,

The relationships you create in Cake are handled by setting any of the
following model properties:

- hasOne
- hasMany
- belongsTo
- hasAndBelongsToMany

You are probably familiar with this already if you're using Cake at
all. The relationships don't require the database tables themselves to
have foreign key constraints. In fact, in all of my applications, I do
not have constraints between my database tables in MySQL. In MySQL's
eyes, all my tables are 100% independent of each other.

Instead, I relate all my tables together at the application level.
Specifically, at the model level. This enables me to use all of Cake's
power such as dependent = true and the delete callbacks.

By relating your tables together at the model layer in Cake, and
setting dependent = true (valid for hasOne and hasMany only, btw),
Cake will automatically find the related records and delete them for
you even though MySQL does not have these tables connected with a
foreign key constraint.

HTH

- Kevin (etipaced)

On Apr 10, 9:03 pm, "Pablo Vergara B." 
wrote:
> How do you actually can use database CASCADE deleting method when no
> "real" relations are made into the database diagram? (Because
> relations are handled internally by cakePHP)
>
> I'm still a novice about cakePHP so I can be wrong... or not. Let's
> wait for a advanced user to answer both questions :).
>
> Inf fact (if we could) the database engine deleting/updating option
> (using CASCADE for instance) would be the fastest way to do this.
>
> Greetings and sorry if my english is not too good plz, I'm from a
> spanish speaking country...
>
> On Apr 10, 12:45 pm, Mateusz Kaczanowski  wrote:
>
> > Hi guys,
>
> > In CakePHP we delete related records by dependency in model. Which way us
> > better
>
> > 1. Set up CASCADE in innodb mysql database
> > 2. Usedependentin cakePHP model
>
> > "Better" - I mean faster , safer .
>
> > Thanks for answers

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: hI friends

2010-04-26 Thread Don Drake
I didn't go through ALL that code, but it seems that if you pulled
collections of child nodes  (http://www.w3schools.com/jsref/dom_obj_all.asp)
rather than getting
>   var child=listElement.firstChild;
and trying to iterate over siblings, you might be able to simplify your code
a great deal and make it easier to get it operating.

The logic of starting with firstChild as the beginning of your iteration
seems very dodgy.

Don

On Mon, Apr 26, 2010 at 9:15 AM, cricket  wrote:

> You probably won't get much response here if all you have to say is
> that something is "not working properly" and then post a lot of
> javascript code. Are you sure this is even a CakePHP issue?
>
> On Apr 26, 2:53 am, rakeshyadav rakeshyadav
>  wrote:
> > Hi all,
> >
> >  I am using javascript in my cake view page and trying to call
> that
> > functions they are not working properly please help me.
> >
> >  my code is
> > 
> > 
> >
> > 
> > window.onload = makeCollapsible;
> >
> > /* CLOSED_IMAGE - the image to be displayed when the sublists are
> closed
> >  * OPEN_IMAGE   - the image to be displayed when the sublists are
> opened
> >  */
> > CLOSED_IMAGE='img/plus.jpg';
> > image('plus.jpg');
> >  ?>
> > OPEN_IMAGE='img/minus.jpg';
> >
> > /* makeCollapsible - makes a list have collapsible sublists
> >  *
> >  * listElement - the element representing the list to make
> collapsible
> >  */
> > function makeCollapsible(){
> >
> >   listElement = document.getElementById('computers');
> >
> >   // removed list item bullets and the sapce they occupy
> >   listElement.style.listStyle='none';
> >   listElement.style.marginLeft='0';
> >   listElement.style.paddingLeft='0';
> >
> >   // loop over all child elements of the list
> >   var child=listElement.firstChild;
> >   while (child!=null){
> >
> > // only process li elements (and not text elements)
> > if (child.nodeType==1){
> >
> >   // build a list of child ol and ul elements and hide them
> >   var list=new Array();
> >   var grandchild=child.firstChild;
> >   while (grandchild!=null){
> > if (grandchild.tagName=='OL' || grandchild.tagName=='UL'){
> >   grandchild.style.display='none';
> >   list.push(grandchild);
> > }
> > grandchild=grandchild.nextSibling;
> >   }
> >
> >   // add toggle buttons
> >   var node=document.createElement('img');
> >   node.setAttribute('src',CLOSED_IMAGE);
> >   node.setAttribute('class','collapsibleClosed');
> >   node.onclick=createToggleFunction(node,list);
> >   child.insertBefore(node,child.firstChild);
> >
> > }
> >
> > child=child.nextSibling;
> >   }
> >
> > }
> >
> > /* createToggleFunction - returns a function that toggles the sublist
> > display
> >  *
> >  * toggleElement  - the element representing the toggle gadget
> >  * sublistElement - an array of elements representing the sublists
> that
> > should
> >  *  be opened or closed when the toggle gadget is
> > clicked
> >  */
> > function createToggleFunction(toggleElement,sublistElements){
> >
> >   return function(){
> >
> > // toggle status of toggle gadget
> > if (toggleElement.getAttribute('class')=='collapsibleClosed'){
> >   toggleElement.setAttribute('class','collapsibleOpen');
> >   toggleElement.setAttribute('src',OPEN_IMAGE);
> > }else{
> >   toggleElement.setAttribute('class','collapsibleClosed');
> >   toggleElement.setAttribute('src',CLOSED_IMAGE);
> > }
> >
> > // toggle display of sublists
> > for (var i=0;i >   sublistElements[i].style.display=
> >   (sublistElements[i].style.display=='block')?'none':'block';
> > }
> >
> >   }
> >
> > }
> >
> > function edit_store(sel_stores, grp_name, grp_id)
> > {
> > document.getElementById('selected_stores').value = sel_stores;
> > document.getElementById('group_name').value = grp_name;
> > document.getElementById('sgid').value = grp_id;
> >
> > document.getElementById('idd').value = '153';
> > document.getElementById('store_grid').submit();
> > }
> > 
> >
> > 
> > function create_new_group()
> > {
> > document.getElementById('idd').value = '153';
> > document.getElementById('store_grid').submit();}
> >
> > 
> >
> >  
> > link('Gauteng
> > Division', '#',
> >
> array(
> >
> > 'class'=>'url2_font',
> >
> > 'font-fomily'=>'Verdena',
> >
> > 'onclick'=>'edit_store('3_4_',
> >
> > 'Gauteng Division', '3'));
> >?>
> >
> > 
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.org

Re: Release: CakePHP 1.3.0

2010-04-26 Thread Christian Leskowsky
Very cool. I'd heard of debug kit before but hadn't gotten around to
actually trying it. I'll make the time... :-]

On Mon, Apr 26, 2010 at 4:07 PM, Sam Sherlock wrote:

> loads of great stuff and exciting new prospects
>
> @Christian
> I found it to be a breeze using the migration guide I was able to zip
> though my app finding things detailed in the guide and make changes
>
> http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
>
> as
> for performance if you have debugkit installed then you can use its
> benchmark shell for before/after stats
> - S
>
>
>
>
> On 26 April 2010 17:58, Miles J  wrote:
>
>> I upgraded www.sc2armory.com to the new 1.3 stable :]
>>
>> On Apr 26, 9:27 am, Christian Leskowsky
>>  wrote:
>> > This looks like a great release.
>> >
>> > Q for ya: I didn't notice any performance-related above or in the
>> manual.
>> > Have you guys done any internal benchmarking on 1.3? I'd be interested
>> to
>> > hear how it compares to 1.2.x in terms of bootstrappnig cakephp and # of
>> > required files for said process using a "hello, world" type example app.
>> :-]
>> >
>> > Thanks again guys.
>> >
>> > 2010/4/26 Dérico Filho 
>> >
>> >
>> >
>> > > Now I am preparing to upgrade and merge into my own branch of
>> > > CakePHP.
>> >
>> > > Well done guys!
>> >
>> > > On Apr 25, 2:02 am, Graham Weldon  wrote:
>> > > > Announcing CakePHP 1.3.0 Stable
>> >
>> > > > The CakePHP development team presents CakePHP 1.3.0. After a solid
>> > > > release candidate cycle, we're happy to announce the release of the
>> > > > next version of CakePHP stable. This next instalment of the CakePHP
>> > > > line brings a myriad of enhancements, fixes and structural changes
>> to
>> > > > the framework designed to ease your development experience and
>> extend
>> > > > the capabilities of CakePHP.
>> >
>> > > > The documentation accompanying CakePHP 1.3 far exceeds any previous
>> > > > release. The development, enhancement and change process has been
>> > > > meticulously documented to ensure a seamless upgrade path is
>> available
>> > > > from CakePHP 1.2.x. While most applications will be able to make
>> this
>> > > > transition with minimal changes, those that need migration will find
>> > > > the process far easier than previous releases. A summary of CakePHP
>> > > > 1.3 [1] is available as well as a comprehensive migration guide [2]
>> > > > and a full list of new features [3].
>> >
>> > > > The API [4] has been updated to the 1.3.0 release version to
>> correctly
>> > > > reflect the changes in documentation and code. The CakePHP Cookbook
>> > > > has its own 1.3.x branch for documentation [5], which has been
>> updated
>> > > > in numerous sections to reflect the changes and updates within this
>> > > > new release. The cookbook is heavily driven by user submissions. If
>> > > > you see an issue within the cookbook, or feel that a section could
>> be
>> > > > extended or added to, please feel free to submit a change.
>> >
>> > > > This release comprises 39 commits and 20 tickets closed.
>> >
>> > > > As we push forward, the development teams efforts will be focused on
>> > > > CakePHP 2.0 and beyond. Soon a roadmap, release plan, and associated
>> > > > documentation, API and change details will be made available.
>> CakePHP
>> > > > 1.3 will be updated as necessary to correct issues if they arise,
>> > > > enhancements are being pushed over to 2.0 as we push forward with
>> > > > development.
>> >
>> > > > We'd like to thank everyone that submitted bug reports, pull
>> requests,
>> > > > documentation updates, API changes, helped out in the IRC channel
>> and
>> > > > everyone that continues to contribute, promote and use the CakePHP
>> > > > framework.
>> >
>> > > > Download the release [6]
>> > > > View the changelog [7]
>> >
>> > > > [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
>> > > > [2]
>> http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
>> > > > [3]http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3
>> > > > [4]http://api13.cakephp.org
>> > > > [5]http://book.cakephp.org/view/875/x1-3-Collection
>> > > > [6]http://github.com/cakephp/cakephp1x/downloads
>> > > > [7]http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0
>> >
>> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
>> 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 athttp://
>> > > groups.google.com/group/cake-php?hl=en
>> >
>> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
>> others
>> > > with their CakePHP related questions

belongs_to and null values

2010-04-26 Thread hugom
Hi! I'm having some strange behavior and I want to know if this is the
expected behavior, it's a bug or something else.

I have a model A related with belongs_to with model B. When I do a
find('all'), some A models have null the foreign key related with
table B, and this is the result:

Some model A register:
array(
'model A' => array('field1modelA' => 'value', etc.,
'foreignKeyWithModelB' => null),
'model B' => 'field1MOdelB'=>null, 'field2ModelB' => null, etc.,
all nulls)
);

What I want:
array('model A' => array('field1modelA' => 'value', etc.,
'foreignKeyWithModelB' => null);

I don't want an extra array if the related table register does not
exists :S I use this with xml helper and i get something ugly like:





That is ok when foreignKeyWithModelB is not null, but when is null
there's no related data and I dont want to show something like a model
with all null. There's a way to avoid this?

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


automagic select boxes for "belongsto" relations

2010-04-26 Thread mrnnn
hi all!

i'm merely beginning with cakephp and i've tried the two examples and
all worked fine.

but now i'm trying to convert my own sql scheme to a cake application
using the bake all command.

in short, the fields that matter:

artitsts {
 auto_increment int id
 first_name varchar(100)
 last_name varchar(100)
}

work {
 auto_increment id
 int artist_id
}

basically, what i'd like is that, when editing/adding a work, you'd
get a select box to select the artist. now, when i bake, it either:
-gives me no select box, just an input field
-sometimes i get to select the artist id

what i want: a select box with a combination of the first and last
name.

is there magic to this or should i just do it manually? fill an array
in the controller, push it to the view and then make a $form->select
element? or is there a way to obtain the behaviour of the example,
where creating a user shows a select box for the group, even though
the view says $form->input?

the only difference i see so far is that the group name is unique.
should i make my lastname column unique maybe? or can i make the
combination unique? that probably won't work, will it?

or is it the name of the column? does cakephp automatically pick the
"name" field if present?

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


Plugin and css links

2010-04-26 Thread Ziki
Hi,

I have images in img folder in webroot of my plugin, but images aren't
load when links from css file also in plugin. This is problem when
making theme. I must put img in default img folder of site, not under
plugin webroot folder.

Is there solution?

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: SQL with Where not exists

2010-04-26 Thread Luck
Hi,

After many tries, I finally found the solution myself.
Thanks


On Apr 26, 4:34 pm, Luck  wrote:
> Hi,
> I have googled for similar problems and still cannot find a solution
> on how to build a 'NOT EXISTS' query. I'm newbie to CakePHP.
>
> I have two simple models: Question and Answer. Question has a hasMany
> relationship with Answer, as the answers table has a foreign key to
> questions. Very simple.
>
> Problem one is, I want to do a find for those queries with no answers,
> in SQL would be just like this:
>
> SELECT * FROM questions where not exists (select 1 from anwers where
> answers.question_id=questions.question_id);
>
> How do I do this in CakePHP? Is there any way to include other finds
> in the conditions? I mean not only field matches like the
> documentation shows.
>
> The second step is paginate that. How should I alter the current
> pagination? (currently it paginates all the questions)
> $this->set('questions',$this->paginate('Question'));
>
> Thanks
>
> 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.com For more options, visit this group 
> athttp://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: Release: CakePHP 1.3.0

2010-04-26 Thread Sam Sherlock
loads of great stuff and exciting new prospects

@Christian
I found it to be a breeze using the migration guide I was able to zip though
my app finding things detailed in the guide and make changes

http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3

as for
performance if you have debugkit installed then you can use its benchmark
shell for before/after stats
- S



On 26 April 2010 17:58, Miles J  wrote:

> I upgraded www.sc2armory.com to the new 1.3 stable :]
>
> On Apr 26, 9:27 am, Christian Leskowsky
>  wrote:
> > This looks like a great release.
> >
> > Q for ya: I didn't notice any performance-related above or in the manual.
> > Have you guys done any internal benchmarking on 1.3? I'd be interested to
> > hear how it compares to 1.2.x in terms of bootstrappnig cakephp and # of
> > required files for said process using a "hello, world" type example app.
> :-]
> >
> > Thanks again guys.
> >
> > 2010/4/26 Dérico Filho 
> >
> >
> >
> > > Now I am preparing to upgrade and merge into my own branch of
> > > CakePHP.
> >
> > > Well done guys!
> >
> > > On Apr 25, 2:02 am, Graham Weldon  wrote:
> > > > Announcing CakePHP 1.3.0 Stable
> >
> > > > The CakePHP development team presents CakePHP 1.3.0. After a solid
> > > > release candidate cycle, we're happy to announce the release of the
> > > > next version of CakePHP stable. This next instalment of the CakePHP
> > > > line brings a myriad of enhancements, fixes and structural changes to
> > > > the framework designed to ease your development experience and extend
> > > > the capabilities of CakePHP.
> >
> > > > The documentation accompanying CakePHP 1.3 far exceeds any previous
> > > > release. The development, enhancement and change process has been
> > > > meticulously documented to ensure a seamless upgrade path is
> available
> > > > from CakePHP 1.2.x. While most applications will be able to make this
> > > > transition with minimal changes, those that need migration will find
> > > > the process far easier than previous releases. A summary of CakePHP
> > > > 1.3 [1] is available as well as a comprehensive migration guide [2]
> > > > and a full list of new features [3].
> >
> > > > The API [4] has been updated to the 1.3.0 release version to
> correctly
> > > > reflect the changes in documentation and code. The CakePHP Cookbook
> > > > has its own 1.3.x branch for documentation [5], which has been
> updated
> > > > in numerous sections to reflect the changes and updates within this
> > > > new release. The cookbook is heavily driven by user submissions. If
> > > > you see an issue within the cookbook, or feel that a section could be
> > > > extended or added to, please feel free to submit a change.
> >
> > > > This release comprises 39 commits and 20 tickets closed.
> >
> > > > As we push forward, the development teams efforts will be focused on
> > > > CakePHP 2.0 and beyond. Soon a roadmap, release plan, and associated
> > > > documentation, API and change details will be made available. CakePHP
> > > > 1.3 will be updated as necessary to correct issues if they arise,
> > > > enhancements are being pushed over to 2.0 as we push forward with
> > > > development.
> >
> > > > We'd like to thank everyone that submitted bug reports, pull
> requests,
> > > > documentation updates, API changes, helped out in the IRC channel and
> > > > everyone that continues to contribute, promote and use the CakePHP
> > > > framework.
> >
> > > > Download the release [6]
> > > > View the changelog [7]
> >
> > > > [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> > > > [2]
> http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
> > > > [3]http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3
> > > > [4]http://api13.cakephp.org
> > > > [5]http://book.cakephp.org/view/875/x1-3-Collection
> > > > [6]http://github.com/cakephp/cakephp1x/downloads
> > > > [7]http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> 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 athttp://
> > > groups.google.com/group/cake-php?hl=en
> >
> > > 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.com
> >For
> more options, visit this group at
>

SQL with Where not exists

2010-04-26 Thread Luck
Hi,
I have googled for similar problems and still cannot find a solution
on how to build a 'NOT EXISTS' query. I'm newbie to CakePHP.

I have two simple models: Question and Answer. Question has a hasMany
relationship with Answer, as the answers table has a foreign key to
questions. Very simple.

Problem one is, I want to do a find for those queries with no answers,
in SQL would be just like this:

SELECT * FROM questions where not exists (select 1 from anwers where
answers.question_id=questions.question_id);

How do I do this in CakePHP? Is there any way to include other finds
in the conditions? I mean not only field matches like the
documentation shows.

The second step is paginate that. How should I alter the current
pagination? (currently it paginates all the questions)
$this->set('questions',$this->paginate('Question'));

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: Release: CakePHP 1.3.0

2010-04-26 Thread Christian Leskowsky
How straightforward was the upgrade? :-]

On Mon, Apr 26, 2010 at 12:58 PM, Miles J  wrote:

> I upgraded www.sc2armory.com to the new 1.3 stable :]
>
> On Apr 26, 9:27 am, Christian Leskowsky
>  wrote:
> > This looks like a great release.
> >
> > Q for ya: I didn't notice any performance-related above or in the manual.
> > Have you guys done any internal benchmarking on 1.3? I'd be interested to
> > hear how it compares to 1.2.x in terms of bootstrappnig cakephp and # of
> > required files for said process using a "hello, world" type example app.
> :-]
> >
> > Thanks again guys.
> >
> > 2010/4/26 Dérico Filho 
> >
> >
> >
> > > Now I am preparing to upgrade and merge into my own branch of
> > > CakePHP.
> >
> > > Well done guys!
> >
> > > On Apr 25, 2:02 am, Graham Weldon  wrote:
> > > > Announcing CakePHP 1.3.0 Stable
> >
> > > > The CakePHP development team presents CakePHP 1.3.0. After a solid
> > > > release candidate cycle, we're happy to announce the release of the
> > > > next version of CakePHP stable. This next instalment of the CakePHP
> > > > line brings a myriad of enhancements, fixes and structural changes to
> > > > the framework designed to ease your development experience and extend
> > > > the capabilities of CakePHP.
> >
> > > > The documentation accompanying CakePHP 1.3 far exceeds any previous
> > > > release. The development, enhancement and change process has been
> > > > meticulously documented to ensure a seamless upgrade path is
> available
> > > > from CakePHP 1.2.x. While most applications will be able to make this
> > > > transition with minimal changes, those that need migration will find
> > > > the process far easier than previous releases. A summary of CakePHP
> > > > 1.3 [1] is available as well as a comprehensive migration guide [2]
> > > > and a full list of new features [3].
> >
> > > > The API [4] has been updated to the 1.3.0 release version to
> correctly
> > > > reflect the changes in documentation and code. The CakePHP Cookbook
> > > > has its own 1.3.x branch for documentation [5], which has been
> updated
> > > > in numerous sections to reflect the changes and updates within this
> > > > new release. The cookbook is heavily driven by user submissions. If
> > > > you see an issue within the cookbook, or feel that a section could be
> > > > extended or added to, please feel free to submit a change.
> >
> > > > This release comprises 39 commits and 20 tickets closed.
> >
> > > > As we push forward, the development teams efforts will be focused on
> > > > CakePHP 2.0 and beyond. Soon a roadmap, release plan, and associated
> > > > documentation, API and change details will be made available. CakePHP
> > > > 1.3 will be updated as necessary to correct issues if they arise,
> > > > enhancements are being pushed over to 2.0 as we push forward with
> > > > development.
> >
> > > > We'd like to thank everyone that submitted bug reports, pull
> requests,
> > > > documentation updates, API changes, helped out in the IRC channel and
> > > > everyone that continues to contribute, promote and use the CakePHP
> > > > framework.
> >
> > > > Download the release [6]
> > > > View the changelog [7]
> >
> > > > [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> > > > [2]
> http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
> > > > [3]http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3
> > > > [4]http://api13.cakephp.org
> > > > [5]http://book.cakephp.org/view/875/x1-3-Collection
> > > > [6]http://github.com/cakephp/cakephp1x/downloads
> > > > [7]http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> 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 athttp://
> > > groups.google.com/group/cake-php?hl=en
> >
> > > 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.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > --
> > -
> >
> > "You can't reason people out of a position they didn't use reason to get
> > into."
> >
> > Christian Leskowsky
> >
> > 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" 

Re: virtual fields in conditions

2010-04-26 Thread Matthew Powell
> As for using virtual fields in conditions, I've come to the conclusion
> that the current version of Cake does not handle them.

Works here.

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: User creation issue.

2010-04-26 Thread mau
What I'm trying to do, is from a logged user (admin, who has all the
permissions), save a new user, in the adminusers controller:   $this-
>User->save($this->data);

 But I realize that after submit the data from the form in the view,
when I debug($this->Auth->user()) it's blank, the current logged users
is deleted.




On Apr 26, 1:07 pm, cricket  wrote:
> On Apr 26, 9:14 am, mau  wrote:
>
>
>
> > Hi guys, thanks for your answers.
>
> > Sorry, I didn't explained it well.
>
> >  The situation is that I've builded an action in the user controller,
> > to let the admin users add manually users to the table. For this
> > purpose I've create a form in the view, which sends the data to an
> > action in the users controller to save the data to the users table:
>
> >  All I do in this action is save the data to the users table, after
> > this, it seems to happens like a sign up action, when the user create
> > an account, send the data to the table, and after this is logged in.
>
> >  I'm  using the Auth and Acl components.
>
> >  Is more clear now? Any help is welcome.
>
> Not much clearer, no. Are you saying that the admin user is now
> literally logged in as the new user? Perhaps you should post the
> controller action.
>
> 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.com For more options, visit this group 
> athttp://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


Select box instead of input text in ACL tutorial

2010-04-26 Thread Andrei Mita
Hello,

I have the groups and users tables from the ACL tutorial but profiles
instead of posts. When I try to add a user or a profile, I get an input text
for the $belongsTo relation. How can I change that to a select box?

The views are baked and the relations are:

   - Group hasMany User
   - User belongsTo Group
   - User hasOne Profile
   - Profile belongsTo User


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: multi language website(help me)

2010-04-26 Thread Zaky Katalan-Ezra
ead this
http://groups.google.com/group/cake-php/browse_thread/thread/f8c98544bd6352ee/8e43b549197028ee?hl=en&lnk=gst&q=poedit+zaky#8e43b549197028ee

And every thing about .po, .mo, gettext, poedit in cake group

If you need to support right to left languages, its an issue by it self so
write another question.

I never created sites in German or French which require longer labels in
about 20%, from what I heard,  but in that case I would think about using
different themes for these languages.

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: Vendors and Controller

2010-04-26 Thread Emanuele Gringeri
what's the difference between a component and a vendor?
> If you're going to do that you should of written a component instead
>
> On Apr 26, 8:17 am, emanuele  wrote:
>   
>> ok thank u
>>
>> On Mon, Apr 26, 2010 at 4:59 PM, euromark wrote:
>>
>>
>>
>> 
>>> thats not how your vendors are supposed to work
>>> you usually pass them the data manually
>>>   
>> 
>>> like $MyVendorClassObject->doSomething($this->data)
>>>   
>> 
>>> On 26 Apr., 12:58, emanuele  wrote:
>>>   
 Hi guys, is there any chance to access the Controller->data array from
 a Vendors Class?
 I ve written my own class and I want to access some $variable defined
 at the controlloer/model layers.
 thanks in advance.
 
>> 
 Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 athttp://
 
>>> groups.google.com/group/cake-php?hl=en
>>>   
>> 
>>> 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
>>>   
>> --
>> Emanuele Gringeri
>> Computer Engineer
>> University of Pisa
>> Be my mirror, my sword and shield
>>
>> 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.com For more options, visit this group 
>> athttp://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
>   


-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

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: Vendors and Controller

2010-04-26 Thread thatsgreat2345
If you're going to do that you should of written a component instead

On Apr 26, 8:17 am, emanuele  wrote:
> ok thank u
>
> On Mon, Apr 26, 2010 at 4:59 PM, euromark wrote:
>
>
>
> > thats not how your vendors are supposed to work
> > you usually pass them the data manually
>
> > like $MyVendorClassObject->doSomething($this->data)
>
> > On 26 Apr., 12:58, emanuele  wrote:
> > > Hi guys, is there any chance to access the Controller->data array from
> > > a Vendors Class?
> > > I ve written my own class and I want to access some $variable defined
> > > at the controlloer/model layers.
> > > thanks in advance.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > 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
>
> --
> Emanuele Gringeri
> Computer Engineer
> University of Pisa
> Be my mirror, my sword and shield
>
> 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.com For more options, visit this group 
> athttp://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: Bakery...arrogance or plain lack of attention

2010-04-26 Thread jacmoe
I think Graham referred to whatever Bakery replaces the current one as
the Bakery 2 - I don't think there's any in development.
They are focusing all their efforts on Cakephp 1.3 and onwards.

However..
I see that José Gonzales is busy doing work on a Bakery fork..
I wonder what he's up to? :)

On Apr 26, 5:55 pm, calvin  wrote:
> @Jacob:
> Ah, I did misunderstand. I apologize. Maybe I will fork the code and
> make a merge request to fix the blank e-mails problem. Though I wasn't
> aware that Bakery 2.0 was in development. I may try to help with that
> instead.
>
> On Apr 25, 5:49 pm, jacmoe  wrote:
>
>
>
>
>
> > I think you misunderstand:
> > When you make a fork of a project on Github, you can make merge
> > requests back.
> > Which means that if you're unsatisfied with the Bakery (as software),
> > just fork it, fix it, and make a merge request.
> > Even for small fixes, doesn't matter.
> > I am sure Graham and Mark and the rest of the CakePHP team would
> > appreciate that. :)
>
> > That's what I mean by forking.
>
> > Cheers
>
> > Jacob
>
> > On Apr 26, 2:04 am, calvin  wrote:
>
> > > I haven't published anything on the Bakery except for comments, so I
> > > can't comment on the process. However, I will note that the software
> > > is pretty screwed up. All my article reply notifications are blank e-
> > > mails--not even a link to the comment/article. I personally hate it
> > > when people send me e-mails or make forum posts where they don't write
> > > anything in the message body and just use the subject-line as the
> > > message. And I think this, along with dead links in the Cookbook, both
> > > make Cake look very unprofessional.
>
> > > But I don't think just forking the Bakery is a solution. Cake needs a
> > > centralized/official article/plugins repository. There are just a few
> > > things that need to be fixed is all. Even if someone were to fork the
> > > Bakery, it would not be as successful/useful. The Bakery is only so
> > > useful today because lots of people know about and use it--it's linked
> > > to right from the CakePHP homepage. So this "if you don't like it,
> > > just fork it" attitude is not appropriate. It's similar to the
> > > attitude that, if you find Cake's documentation lacking, you should
> > > write it yourself. FOSS is about cooperation and free exchange of
> > > ideas and information. It's not an excuse to deflect all criticism or
> > > pin all responsibilities on the user/critic.
>
> > > And a person does not need to have contributed to Cake's source code
> > > to level a valid criticism.
>
> > > On Apr 25, 2:46 pm, jacmoe  wrote:
>
> > > > That doesn't give you carte blanche to be arrogant, does it?
>
> > > > What have you done for CakePHP if I may ask? :)
>
> > > > A couple of weeks ago I posted this 
> > > > topic:http://groups.google.com/group/cake-php/browse_thread/thread/e3a1f469...
> > > > With the title 'Let's get rid of The Bakery'.
>
> > > > I volunteered as a moderator, but there's still lots of things to do.
> > > > And the software itself needs some fixing.
>
> > > > Feel free to fork it.
>
> > > > I would probably delete the article as well, if there haven't been any
> > > > response in three months - I don't know what article it was, since I
> > > > concentrate on removing spam rather than approving articles.
> > > > Due to my newness to CakePHP mostly.
>
> > > > So: what have you done for CakePHP ? :D
>
> > > > Cheers
>
> > > > Jacob
>
> > > > On Apr 25, 11:42 am, Jayesh Wadhwani  wrote:
>
> > > > > The Bakery is supposed to be a place where cakePHP developers exchange
> > > > > ideas which in turn enhances the framework.
>
> > > > > I recently published a helper and it languished for pending review for
> > > > > weeks on end. I visited the IRC and other than rude and arrogant
> > > > > answers there was not much help.
>
> > > > > I did not receive any emails as to why there was a delay.
>
> > > > > Today I log in and see this message.. "This article has been deleted
> > > > > and is not available for publication. Review The Bakery Publishing
> > > > > Guidelines to understand why this article was deleted."
>
> > > > > Brilliant reviewer! Don't you think it would be a better to tell me
> > > > > what is the exact problem so that I can correct it. According to
> > > > > guidelines I do get 60 days. Right!
>
> > > > > So, what is it? The reviewers just do not care, are plain lazy or just
> > > > > purely arrogant.
>
> > > > > If cakePHP has grown to such as level that it cannot handle the bakery
> > > > > and breeds arrogance then I suggest that you get rid of it.
>
> > > > > Check out the new CakePHP Questions 
> > > > > sitehttp://cakeqs.organdhelpotherswiththeir 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+un

Re: Release: CakePHP 1.3.0

2010-04-26 Thread Miles J
I upgraded www.sc2armory.com to the new 1.3 stable :]

On Apr 26, 9:27 am, Christian Leskowsky
 wrote:
> This looks like a great release.
>
> Q for ya: I didn't notice any performance-related above or in the manual.
> Have you guys done any internal benchmarking on 1.3? I'd be interested to
> hear how it compares to 1.2.x in terms of bootstrappnig cakephp and # of
> required files for said process using a "hello, world" type example app. :-]
>
> Thanks again guys.
>
> 2010/4/26 Dérico Filho 
>
>
>
> > Now I am preparing to upgrade and merge into my own branch of
> > CakePHP.
>
> > Well done guys!
>
> > On Apr 25, 2:02 am, Graham Weldon  wrote:
> > > Announcing CakePHP 1.3.0 Stable
>
> > > The CakePHP development team presents CakePHP 1.3.0. After a solid
> > > release candidate cycle, we're happy to announce the release of the
> > > next version of CakePHP stable. This next instalment of the CakePHP
> > > line brings a myriad of enhancements, fixes and structural changes to
> > > the framework designed to ease your development experience and extend
> > > the capabilities of CakePHP.
>
> > > The documentation accompanying CakePHP 1.3 far exceeds any previous
> > > release. The development, enhancement and change process has been
> > > meticulously documented to ensure a seamless upgrade path is available
> > > from CakePHP 1.2.x. While most applications will be able to make this
> > > transition with minimal changes, those that need migration will find
> > > the process far easier than previous releases. A summary of CakePHP
> > > 1.3 [1] is available as well as a comprehensive migration guide [2]
> > > and a full list of new features [3].
>
> > > The API [4] has been updated to the 1.3.0 release version to correctly
> > > reflect the changes in documentation and code. The CakePHP Cookbook
> > > has its own 1.3.x branch for documentation [5], which has been updated
> > > in numerous sections to reflect the changes and updates within this
> > > new release. The cookbook is heavily driven by user submissions. If
> > > you see an issue within the cookbook, or feel that a section could be
> > > extended or added to, please feel free to submit a change.
>
> > > This release comprises 39 commits and 20 tickets closed.
>
> > > As we push forward, the development teams efforts will be focused on
> > > CakePHP 2.0 and beyond. Soon a roadmap, release plan, and associated
> > > documentation, API and change details will be made available. CakePHP
> > > 1.3 will be updated as necessary to correct issues if they arise,
> > > enhancements are being pushed over to 2.0 as we push forward with
> > > development.
>
> > > We'd like to thank everyone that submitted bug reports, pull requests,
> > > documentation updates, API changes, helped out in the IRC channel and
> > > everyone that continues to contribute, promote and use the CakePHP
> > > framework.
>
> > > Download the release [6]
> > > View the changelog [7]
>
> > > [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> > > [2]http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
> > > [3]http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3
> > > [4]http://api13.cakephp.org
> > > [5]http://book.cakephp.org/view/875/x1-3-Collection
> > > [6]http://github.com/cakephp/cakephp1x/downloads
> > > [7]http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > 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
>
> --
> -
>
> "You can't reason people out of a position they didn't use reason to get
> into."
>
> Christian Leskowsky
>
> 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.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

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

Re: How to write to_char() function in cakephp

2010-04-26 Thread cricket
On Apr 26, 9:44 am, Narendra Padala  wrote:
> Hi all,
> I am new to cakephp i have problem like this please help me out sir
>
> $currentday = date("w");
>
> $rsStoreTime = pg_exec($conn, "SELECT
> intdaynumber,to_char(dtmopeningtime,'HH24:mi') AS
> dtmopeningtime,to_char(dtmclosingtime,'HH24:mi') AS dtmclosingtime
> FROM tblstorehours where intdaynumber = '$currentday'");
>
> above query  how can i convert into cakephp
>
> and
>
> $intCnt = pg_numrows($rsStoreTime);
>
> this query also how can i convert into cakephp .

It's a bit tricky to provide an example as your names do not follow
Cake's convention, so I'll have to assume a few things. First, that
the model name is StoreHour (maybe you should post the model name and
its associations).

So, from StoreHoursController:

$rsStoreTime = $this->StoreHour->find(
'first',
array(
'fields' => array(
'StoreHour.intdaynumber',
'to_char(dtmopeningtime,"HH24:mi") AS dtmopeningtime',
'to_char(dtmclosingtime,"HH24:mi") AS dtmclosingtime'
),
'conditions' => array(
'StoreHour.intdaynumber' => date('w')
)
)
);


But there's one thing you have to know about Cake. When using
calculated fields like this, Cake puts the result in a spearate array
than normal. See this article for a clear explanation as well as a
quick fix:

http://teknoid.wordpress.com/2008/09/29/dealing-with-calculated-fields-in-cakephps-find/

Also, if you're using version 1.3 you should have a look at "virtual
fields". See here:

http://book.cakephp.org/view/1608/Virtual-fields


But you really should re-name things to follow Cake's naming
conventions, though. It'll save you a lot of trouble in the end.

table: store_hours

fields: day (not reserved in Postgres), opening_time, closing_time

And, while i'm a big fan of using a database's built-in functions (and
a big fan of PG) I wonder if it's worth doing all this in the query.
You could simply make the conversion in the view using PHP.

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: Release: CakePHP 1.3.0

2010-04-26 Thread Christian Leskowsky
This looks like a great release.

Q for ya: I didn't notice any performance-related above or in the manual.
Have you guys done any internal benchmarking on 1.3? I'd be interested to
hear how it compares to 1.2.x in terms of bootstrappnig cakephp and # of
required files for said process using a "hello, world" type example app. :-]

Thanks again guys.

2010/4/26 Dérico Filho 

> Now I am preparing to upgrade and merge into my own branch of
> CakePHP.
>
> Well done guys!
>
>
> On Apr 25, 2:02 am, Graham Weldon  wrote:
> > Announcing CakePHP 1.3.0 Stable
> >
> > The CakePHP development team presents CakePHP 1.3.0. After a solid
> > release candidate cycle, we're happy to announce the release of the
> > next version of CakePHP stable. This next instalment of the CakePHP
> > line brings a myriad of enhancements, fixes and structural changes to
> > the framework designed to ease your development experience and extend
> > the capabilities of CakePHP.
> >
> > The documentation accompanying CakePHP 1.3 far exceeds any previous
> > release. The development, enhancement and change process has been
> > meticulously documented to ensure a seamless upgrade path is available
> > from CakePHP 1.2.x. While most applications will be able to make this
> > transition with minimal changes, those that need migration will find
> > the process far easier than previous releases. A summary of CakePHP
> > 1.3 [1] is available as well as a comprehensive migration guide [2]
> > and a full list of new features [3].
> >
> > The API [4] has been updated to the 1.3.0 release version to correctly
> > reflect the changes in documentation and code. The CakePHP Cookbook
> > has its own 1.3.x branch for documentation [5], which has been updated
> > in numerous sections to reflect the changes and updates within this
> > new release. The cookbook is heavily driven by user submissions. If
> > you see an issue within the cookbook, or feel that a section could be
> > extended or added to, please feel free to submit a change.
> >
> > This release comprises 39 commits and 20 tickets closed.
> >
> > As we push forward, the development teams efforts will be focused on
> > CakePHP 2.0 and beyond. Soon a roadmap, release plan, and associated
> > documentation, API and change details will be made available. CakePHP
> > 1.3 will be updated as necessary to correct issues if they arise,
> > enhancements are being pushed over to 2.0 as we push forward with
> > development.
> >
> > We'd like to thank everyone that submitted bug reports, pull requests,
> > documentation updates, API changes, helped out in the IRC channel and
> > everyone that continues to contribute, promote and use the CakePHP
> > framework.
> >
> > Download the release [6]
> > View the changelog [7]
> >
> > [1]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> > [2]http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
> > [3]http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3
> > [4]http://api13.cakephp.org
> > [5]http://book.cakephp.org/view/875/x1-3-Collection
> > [6]http://github.com/cakephp/cakephp1x/downloads
> > [7]http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0
> >
> > 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 athttp://
> 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
>



-- 
-

"You can't reason people out of a position they didn't use reason to get
into."

Christian Leskowsky

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 output UTF-8 sign?

2010-04-26 Thread sebb86
Hmm, should it be easy to reset the sort direction?
I don't know at which position in the source code, i have to reset it.

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: virtual fields in conditions

2010-04-26 Thread Martin Radosta

2 others work around:
- create a view
- select from a subquery instead quering directly to the table.

Hope this helps.

MARTIN



On 04/26/2010 01:05 PM, jharris wrote:

Okay, so I figured out why I can't reference the alias in the WHERE
conditions: it's just a MySQL restriction.

As for using virtual fields in conditions, I've come to the conclusion
that the current version of Cake does not handle them.

Hope this information is helpful to someone.

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: hI friends

2010-04-26 Thread cricket
You probably won't get much response here if all you have to say is
that something is "not working properly" and then post a lot of
javascript code. Are you sure this is even a CakePHP issue?

On Apr 26, 2:53 am, rakeshyadav rakeshyadav
 wrote:
> Hi all,
>
>          I am using javascript in my cake view page and trying to call that
> functions they are not working properly please help me.
>
>  my code is
> 
> 
>
> 
>     window.onload = makeCollapsible;
>
>     /* CLOSED_IMAGE - the image to be displayed when the sublists are closed
>      * OPEN_IMAGE   - the image to be displayed when the sublists are opened
>      */
>     CLOSED_IMAGE='img/plus.jpg';
>     image('plus.jpg');
>  ?>
>     OPEN_IMAGE='img/minus.jpg';
>
>     /* makeCollapsible - makes a list have collapsible sublists
>      *
>      * listElement - the element representing the list to make collapsible
>      */
>     function makeCollapsible(){
>
>       listElement = document.getElementById('computers');
>
>       // removed list item bullets and the sapce they occupy
>       listElement.style.listStyle='none';
>       listElement.style.marginLeft='0';
>       listElement.style.paddingLeft='0';
>
>       // loop over all child elements of the list
>       var child=listElement.firstChild;
>       while (child!=null){
>
>         // only process li elements (and not text elements)
>         if (child.nodeType==1){
>
>           // build a list of child ol and ul elements and hide them
>           var list=new Array();
>           var grandchild=child.firstChild;
>           while (grandchild!=null){
>             if (grandchild.tagName=='OL' || grandchild.tagName=='UL'){
>               grandchild.style.display='none';
>               list.push(grandchild);
>             }
>             grandchild=grandchild.nextSibling;
>           }
>
>           // add toggle buttons
>           var node=document.createElement('img');
>           node.setAttribute('src',CLOSED_IMAGE);
>           node.setAttribute('class','collapsibleClosed');
>           node.onclick=createToggleFunction(node,list);
>           child.insertBefore(node,child.firstChild);
>
>         }
>
>         child=child.nextSibling;
>       }
>
>     }
>
>     /* createToggleFunction - returns a function that toggles the sublist
> display
>      *
>      * toggleElement  - the element representing the toggle gadget
>      * sublistElement - an array of elements representing the sublists that
> should
>      *                  be opened or closed when the toggle gadget is
> clicked
>      */
>     function createToggleFunction(toggleElement,sublistElements){
>
>       return function(){
>
>         // toggle status of toggle gadget
>         if (toggleElement.getAttribute('class')=='collapsibleClosed'){
>           toggleElement.setAttribute('class','collapsibleOpen');
>           toggleElement.setAttribute('src',OPEN_IMAGE);
>         }else{
>           toggleElement.setAttribute('class','collapsibleClosed');
>           toggleElement.setAttribute('src',CLOSED_IMAGE);
>         }
>
>         // toggle display of sublists
>         for (var i=0;i           sublistElements[i].style.display=
>               (sublistElements[i].style.display=='block')?'none':'block';
>         }
>
>       }
>
>     }
>
>     function edit_store(sel_stores, grp_name, grp_id)
>     {
>         document.getElementById('selected_stores').value = sel_stores;
>         document.getElementById('group_name').value = grp_name;
>         document.getElementById('sgid').value = grp_id;
>
>         document.getElementById('idd').value = '153';
>         document.getElementById('store_grid').submit();
>     }
>     
>
> 
> function create_new_group()
> {
>     document.getElementById('idd').value = '153';
>     document.getElementById('store_grid').submit();}
>
> 
>
>  
>                                     link('Gauteng
> Division', '#',
>                                                                       array(
>
> 'class'=>'url2_font',
>
> 'font-fomily'=>'Verdena',
>
> 'onclick'=>'edit_store('3_4_',
>
> 'Gauteng Division', '3'));
>                                        ?>
>
>                                 
>
> 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.com For more options, visit this group 
> athttp://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 e

Re: Getting viewVars set in a controller when using Mock objects during testing

2010-04-26 Thread calvin
Thanks for that snippet. I've been looking for a way to grab view
variables from outside of the view as well. I was trying to figure out
how the form helper does it (the way select options are automagically
pulled from $$associatedModelName) but wasn't able to find the code
where it's done. ClassRegistry is the best way to do this inside of a
helper as well, right?


On Apr 25, 3:31 pm, jacmoe  wrote:
> Here's how I do this:
>         $view =& ClassRegistry::getObject('view');
>         $some_view_var = isset($view->viewVars['var']
> ['another_var']) ? $view->viewVars['var']['another_var'] : null;
> I am aware that it is against CakePHP coding conventions to use the
> tertiary conditional operator, but I don't care. :P
>
> Cheers
>
> Jacob
>
> On Apr 25, 4:08 pm, wratke  wrote:
>
>
>
> > I'm wondering if there's any way to get the viewVars when unit testing
> > a
> > controller without using the testAction. I've taken a look at the
> > testAction function in the Cake code and see how it gets the View
> > object
> > and then dumps and returns the viewVars, but as far as I can tell
> > there
> > isn't any way to do something similar without using the testAction
> > function. Is there something in Cake that allows you to access the
> > viewVars that I'm missing? Or should I be dumping the viewVars from
> > the
> > View object manually in my tests? I'm excited to start testing my
> > controllers with Mock objects, but without having access to the
> > viewVars
> > set in the controller I'm finding it difficult to make any assertions
> > in
> > my tests to make sure things are being set properly.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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: multi language website(help me)

2010-04-26 Thread cricket
On Apr 26, 9:02 am, hoss7  wrote:
> i need create multi language  website with cake , i am new in cake, i
> need some best idea or tutorial step by step.

Search online for "cakephp I18N", "cakephp L10N", "cakephp multi-
language", etc. There are several articles out there discussing this.
Just keep in mind when the article was written. Anything more than a
couple of years old is likely out of date.

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: User creation issue.

2010-04-26 Thread cricket
On Apr 26, 9:14 am, mau  wrote:
> Hi guys, thanks for your answers.
>
> Sorry, I didn't explained it well.
>
>  The situation is that I've builded an action in the user controller,
> to let the admin users add manually users to the table. For this
> purpose I've create a form in the view, which sends the data to an
> action in the users controller to save the data to the users table:
>
>  All I do in this action is save the data to the users table, after
> this, it seems to happens like a sign up action, when the user create
> an account, send the data to the table, and after this is logged in.
>
>  I'm  using the Auth and Acl components.
>
>  Is more clear now? Any help is welcome.

Not much clearer, no. Are you saying that the admin user is now
literally logged in as the new user? Perhaps you should post the
controller 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: virtual fields in conditions

2010-04-26 Thread jharris
Okay, so I figured out why I can't reference the alias in the WHERE
conditions: it's just a MySQL restriction.

As for using virtual fields in conditions, I've come to the conclusion
that the current version of Cake does not handle them.

Hope this information is helpful to someone.

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: Bakery...arrogance or plain lack of attention

2010-04-26 Thread calvin
@Jacob:
Ah, I did misunderstand. I apologize. Maybe I will fork the code and
make a merge request to fix the blank e-mails problem. Though I wasn't
aware that Bakery 2.0 was in development. I may try to help with that
instead.

On Apr 25, 5:49 pm, jacmoe  wrote:
> I think you misunderstand:
> When you make a fork of a project on Github, you can make merge
> requests back.
> Which means that if you're unsatisfied with the Bakery (as software),
> just fork it, fix it, and make a merge request.
> Even for small fixes, doesn't matter.
> I am sure Graham and Mark and the rest of the CakePHP team would
> appreciate that. :)
>
> That's what I mean by forking.
>
> Cheers
>
> Jacob
>
> On Apr 26, 2:04 am, calvin  wrote:
>
>
>
> > I haven't published anything on the Bakery except for comments, so I
> > can't comment on the process. However, I will note that the software
> > is pretty screwed up. All my article reply notifications are blank e-
> > mails--not even a link to the comment/article. I personally hate it
> > when people send me e-mails or make forum posts where they don't write
> > anything in the message body and just use the subject-line as the
> > message. And I think this, along with dead links in the Cookbook, both
> > make Cake look very unprofessional.
>
> > But I don't think just forking the Bakery is a solution. Cake needs a
> > centralized/official article/plugins repository. There are just a few
> > things that need to be fixed is all. Even if someone were to fork the
> > Bakery, it would not be as successful/useful. The Bakery is only so
> > useful today because lots of people know about and use it--it's linked
> > to right from the CakePHP homepage. So this "if you don't like it,
> > just fork it" attitude is not appropriate. It's similar to the
> > attitude that, if you find Cake's documentation lacking, you should
> > write it yourself. FOSS is about cooperation and free exchange of
> > ideas and information. It's not an excuse to deflect all criticism or
> > pin all responsibilities on the user/critic.
>
> > And a person does not need to have contributed to Cake's source code
> > to level a valid criticism.
>
> > On Apr 25, 2:46 pm, jacmoe  wrote:
>
> > > That doesn't give you carte blanche to be arrogant, does it?
>
> > > What have you done for CakePHP if I may ask? :)
>
> > > A couple of weeks ago I posted this 
> > > topic:http://groups.google.com/group/cake-php/browse_thread/thread/e3a1f469...
> > > With the title 'Let's get rid of The Bakery'.
>
> > > I volunteered as a moderator, but there's still lots of things to do.
> > > And the software itself needs some fixing.
>
> > > Feel free to fork it.
>
> > > I would probably delete the article as well, if there haven't been any
> > > response in three months - I don't know what article it was, since I
> > > concentrate on removing spam rather than approving articles.
> > > Due to my newness to CakePHP mostly.
>
> > > So: what have you done for CakePHP ? :D
>
> > > Cheers
>
> > > Jacob
>
> > > On Apr 25, 11:42 am, Jayesh Wadhwani  wrote:
>
> > > > The Bakery is supposed to be a place where cakePHP developers exchange
> > > > ideas which in turn enhances the framework.
>
> > > > I recently published a helper and it languished for pending review for
> > > > weeks on end. I visited the IRC and other than rude and arrogant
> > > > answers there was not much help.
>
> > > > I did not receive any emails as to why there was a delay.
>
> > > > Today I log in and see this message.. "This article has been deleted
> > > > and is not available for publication. Review The Bakery Publishing
> > > > Guidelines to understand why this article was deleted."
>
> > > > Brilliant reviewer! Don't you think it would be a better to tell me
> > > > what is the exact problem so that I can correct it. According to
> > > > guidelines I do get 60 days. Right!
>
> > > > So, what is it? The reviewers just do not care, are plain lazy or just
> > > > purely arrogant.
>
> > > > If cakePHP has grown to such as level that it cannot handle the bakery
> > > > and breeds arrogance then I suggest that you get rid of it.
>
> > > > Check out the new CakePHP Questions 
> > > > sitehttp://cakeqs.organdhelpotherswith 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 athttp://groups.google.com/group/cake-php?hl=en
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > 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..

url problem(help me)

2010-04-26 Thread hoss7
i have create my first with cakephp,but i hve litle problem:
i have copy cake in "hh" folder when i user this url
"http://localhost/hh/"; i see this error:
 Error:  HhController could not be found.

Error: Create the class HhController below in file: app\controllers
\hh_controller.php



Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp

but when i use some controll name in url"http://localhost/hh/home";
i dont see this error.
i want when i upload all source in my host,whene user come to my
website see
some default page like home page when user come to my website like
www.example.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: Vendors and Controller

2010-04-26 Thread emanuele
ok thank u

On Mon, Apr 26, 2010 at 4:59 PM, euromark wrote:

> thats not how your vendors are supposed to work
> you usually pass them the data manually
>
> like $MyVendorClassObject->doSomething($this->data)
>
>
> On 26 Apr., 12:58, emanuele  wrote:
> > Hi guys, is there any chance to access the Controller->data array from
> > a Vendors Class?
> > I ve written my own class and I want to access some $variable defined
> > at the controlloer/model layers.
> > thanks in advance.
> >
> > 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 athttp://
> 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
>



-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

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: Vendors and Controller

2010-04-26 Thread euromark
thats not how your vendors are supposed to work
you usually pass them the data manually

like $MyVendorClassObject->doSomething($this->data)


On 26 Apr., 12:58, emanuele  wrote:
> Hi guys, is there any chance to access the Controller->data array from
> a Vendors Class?
> I ve written my own class and I want to access some $variable defined
> at the controlloer/model layers.
> thanks in advance.
>
> 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.com For more options, visit this group 
> athttp://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: How to output UTF-8 sign?

2010-04-26 Thread John Andersen
As soon as you want to sort more than only one column, then you have
to reset the sort direction for the other columns, when you choose
another to sort by. That is a task I will leave up to you :)
Enjoy,
   John

On Apr 26, 12:24 pm, sebb86  wrote:
> Thank you for making an example!
> But in my case, i have more than one column to make sortable. In your
> example, when i click on one table header to sort, all table headers
> show the same arrow, what is wrong :/
>
[snip]

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


Containable pagination query

2010-04-26 Thread Bryan Paddock
Hey all,

I've almost reached the end of application and this last little bit is
really getting to me!

Can anyone shed some light?

Models:
Submission hasMany Judging which belongsTo Judge (and submission)

The submissions are entries submitted by students.
Judgings stores each judges scores they have entered for each submission.
(score_originality, score_overall, score_objective, score_technical)
Judges stores each judges info.

Submission table contains a semifinalist tinyint.
Judging contains a disqualified tinyint.

What I'm trying to do is perform a query to fetch all the submissions and
the total score as well as the number of judges that judged that submission.

Then I also need to fetch the top25/top50/top100 scoring submissions as well
as the number of judges+total score.

I've tried every combination of containable I can think of but I'm about to
pull my hair out here...

thanks guys!

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


Shell: Email component breaks HTML template

2010-04-26 Thread weckmann
Hi,

I am using the email component for sending (themed) HTML emails...

This works fine as long as I am doing this in "normal" web application
mode.

But when I am doing the very same thing inside a Cake Shell task, my
template somehow gets messed up.

Two problems occur:

1. More than 70 characters without a blank inbetween get splitted by a
line-break, which can break the HTML if the line-break comes at an
unfortunate place..

2. When I am html-coding an email link like mailto:i...@aaa.com";>, it removes the part:
"to:i...@aaa.com">"... leaving the HTML broken again...


The strange thing is that this only happens when using a shell...
The very same template using the same email component (Cake core)
works fine in normal web applications.


Any help?
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


Vendors and Controller

2010-04-26 Thread emanuele
Hi guys, is there any chance to access the Controller->data array from
a Vendors Class?
I ve written my own class and I want to access some $variable defined
at the controlloer/model layers.
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


Generate Model classes with ORM Designer for CakePHP

2010-04-26 Thread Frantisek Troster
Hi,

we would like to announce CakePHP support in ORM Designer. ORM
Designer is a tool for visual database modeling with full support of
ORM frameworks. This means you can design your database and define ORM
properties at the same time. Database model is exported into PHP
classes. You can also import your existing model from MySQL Workbench
and DBDesigner fabForce.

You can download ORM Designer beta at 
http://www.orm-designer.com/download-orm-designer,
documentation and more information can be found at 
http://www.orm-designer.com/cakephp.
If you find ORM Designer helpful you can buy the license with 10%
discount using coupon CAKEPHPMEMBER.

We would appreciate your feedback and possible feature requests. Feel
free to contact us at supp...@orm-designer.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


hI friends

2010-04-26 Thread rakeshyadav rakeshyadav
Hi all,

 I am using javascript in my cake view page and trying to call that
functions they are not working properly please help me.

 my code is




window.onload = makeCollapsible;

/* CLOSED_IMAGE - the image to be displayed when the sublists are closed
 * OPEN_IMAGE   - the image to be displayed when the sublists are opened
 */
CLOSED_IMAGE='img/plus.jpg';
image('plus.jpg');
 ?>
OPEN_IMAGE='img/minus.jpg';

/* makeCollapsible - makes a list have collapsible sublists
 *
 * listElement - the element representing the list to make collapsible
 */
function makeCollapsible(){

  listElement = document.getElementById('computers');

  // removed list item bullets and the sapce they occupy
  listElement.style.listStyle='none';
  listElement.style.marginLeft='0';
  listElement.style.paddingLeft='0';

  // loop over all child elements of the list
  var child=listElement.firstChild;
  while (child!=null){

// only process li elements (and not text elements)
if (child.nodeType==1){

  // build a list of child ol and ul elements and hide them
  var list=new Array();
  var grandchild=child.firstChild;
  while (grandchild!=null){
if (grandchild.tagName=='OL' || grandchild.tagName=='UL'){
  grandchild.style.display='none';
  list.push(grandchild);
}
grandchild=grandchild.nextSibling;
  }

  // add toggle buttons
  var node=document.createElement('img');
  node.setAttribute('src',CLOSED_IMAGE);
  node.setAttribute('class','collapsibleClosed');
  node.onclick=createToggleFunction(node,list);
  child.insertBefore(node,child.firstChild);

}

child=child.nextSibling;
  }

}

/* createToggleFunction - returns a function that toggles the sublist
display
 *
 * toggleElement  - the element representing the toggle gadget
 * sublistElement - an array of elements representing the sublists that
should
 *  be opened or closed when the toggle gadget is
clicked
 */
function createToggleFunction(toggleElement,sublistElements){

  return function(){

// toggle status of toggle gadget
if (toggleElement.getAttribute('class')=='collapsibleClosed'){
  toggleElement.setAttribute('class','collapsibleOpen');
  toggleElement.setAttribute('src',OPEN_IMAGE);
}else{
  toggleElement.setAttribute('class','collapsibleClosed');
  toggleElement.setAttribute('src',CLOSED_IMAGE);
}

// toggle display of sublists
for (var i=0;i'url2_font',

'font-fomily'=>'Verdena',

'onclick'=>'edit_store('3_4_',

'Gauteng Division', '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


How to write to_char() function in cakephp

2010-04-26 Thread Narendra Padala
Hi all,
I am new to cakephp i have problem like this please help me out sir



$currentday = date("w");



$rsStoreTime = pg_exec($conn, "SELECT
intdaynumber,to_char(dtmopeningtime,'HH24:mi') AS
dtmopeningtime,to_char(dtmclosingtime,'HH24:mi') AS dtmclosingtime
FROM tblstorehours where intdaynumber = '$currentday'");

above query  how can i convert into cakephp

and

$intCnt = pg_numrows($rsStoreTime);


this query also how can i convert into cakephp .

Sir any one please help me out sir, 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: User creation issue.

2010-04-26 Thread mau
Hi guys, thanks for your answers.

Sorry, I didn't explained it well.

 The situation is that I've builded an action in the user controller,
to let the admin users add manually users to the table. For this
purpose I've create a form in the view, which sends the data to an
action in the users controller to save the data to the users table:

 All I do in this action is save the data to the users table, after
this, it seems to happens like a sign up action, when the user create
an account, send the data to the table, and after this is logged in.

 I'm  using the Auth and Acl components.

 Is more clear now? Any help is welcome.

 Thanks in advance





On Apr 23, 11:07 pm, "Alan Asher"  wrote:
> Ya.. totally, let's see some code.  It sounds like you're using some out of
> the box code and never took out $this->Auth->login($this->data);  
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
>
> Of cricket
> Sent: Friday, April 23, 2010 6:16 PM
> To: CakePHP
> Subject: Re: User creation issue.
>
> On Apr 23, 3:47 pm, mau  wrote:
> > Hi everybody!
>
> >  I'm trying to build a user control panel for administrators, to add
> > users, modify, give permissions, etc.
>
> >  My problem is that when I try to save a new user to the user tables,
> > it seems that cake is login the new user.
>
> >  Is there any way to avoid that cakePHP, when I save a new user to the
> > users table, not login the new user?
>
> What do you mean by, "login the new user"? Your administrator becomes
> the new user?
>
> How are you saving this data?
>
> 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.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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


multi language website(help me)

2010-04-26 Thread hoss7
i need create multi language  website with cake , i am new in cake, i
need some best idea or tutorial step by step.

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: site in multi language

2010-04-26 Thread adeveloper guy
Thanks Zaky

On Mon, Apr 26, 2010 at 5:09 PM, Zaky Katalan-Ezra wrote:

> About GUI translation:
> All you need to consider from day one is to put the text you want to
> display to the user in the gettext function.
> In cake its __().
>
>
> There is also a database data translation feature which I never
> implemented.
>
>

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: site in multi language

2010-04-26 Thread Zaky Katalan-Ezra
About GUI translation:
All you need to consider from day one is to put the text you want to display
to the user in the gettext function.
In cake its __().


There is also a database data translation feature which I never implemented.

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.2.6 - problem with displaying form error messages

2010-04-26 Thread Anna P
Hello. What do you mean by manually?

I don't want to save data to database with just checking if data is
not empty. I want to validate entered data and display errors before
saving to database table.

As I wrote, in model I supply which fields I want to validate - I
supply rule for field and message which should be displayed if field
hasn't been filled out correctly.

In controller I use $this->User->set($this->data) and $this->User-
>validates() to check if supplied data is valid.
If it's not valid, I use $this->validateErrors($this->User) to display
error messages.

The problem is, $form->error('field') doesn't display error message
from $validate variable. Validation function creates the div "error-
message" for message, but the div is empty.
If I use $form->error('field','Some message') - message is displayed.
But I don't want to enter messages text in the view. I rather keep
that in user.php model in $validate variable. But this way, message is
not displayed and I don't know why.

I even changed the version of CakePHP from 1.2.6 to 1.2.5, but it
still doesn't show error messages, which is really weird, cause I use
this solution in every project and in every project on 1.2.5 it always
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


site in multi language

2010-04-26 Thread adeveloper guy
hi,

i am new to cakePHP and also new to the multilingual sites.
need to understand, if my plan is to serve a site in a language apart
from English, should I take care from day 1 ?
or is it fine to develop the whole site in english and then think and
make changes as per the new international language ?

dev

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: transform query result to populate dropdown?

2010-04-26 Thread Zaky Katalan-Ezra
Show your result array and the desired array.

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: Bakery...arrogance or plain lack of attention

2010-04-26 Thread Graham Weldon
Excellent thoughts there keymaster.

Although i loathe Joomla, that site looks fairly well organised, categorised
for easy browsing, and its overall a great resource for people looking to
extend their Joomla installation. Last I checked, Mariano was working on a
CakePHP project that would serve as a central repository for plugins for
CakePHP. Sounds like it might be time to check back in with him to see how
things are going.

I agree that the demands on the community have exceeded the services
provided by the initial bakery, and the efforts that went into the
development of the bakery were truly awesome to have serviced the community
for so long. Sounds like its time to get some community feedback to flesh
out the details of what people are looking for in Bakery 2.0, and get a bit
of a nudge along on the plugin hosting side of things.

Thanks again for the feedback.

If anyone wants to list features, and a brief description of functionality
for those features, please go ahead. I'll be monitoring this, and making
sure notes are published for those interested in developing the bakery.

* News feed / submissions
  Official news from the CakePHP development team and Cake Software
Foundation.

* User Articles and code
  User submitted content with articles and code dumps

* Comments
  User contributed moderation (suggest a comment is spam) of comments.

* Plugin Listing / Catalogue
  Centralised authority for listing and organising publicly available
plugins for CakePHP


While these features may not be jammed into one single site. The purpose is
to identify need, address said need, and provide a cakephp hosted solution
as a central authority for user content and information.

Cheers,
Graham Weldon (aka. Predominant)



On Mon, Apr 26, 2010 at 6:52 PM, keymaster  wrote:

> I understand outsourcing the SCM to github, the tickets to Lighthouse,
> the forum to Google Groups, and using cakePHP.org as the glue which
> ties everything together. To me that is absolutely the right way to
> go, as it frees up manpower to develop framework code.
>
> Perhaps we need a better way of tracking all the excellent code
> contributions available.
>
> At one time, the old cakeForge served as a central repository for all
> plugins, components, etc., so, if you wanted something, you knew that
> was the place to look.
>
> Now, where should we look... Bakery? Github? CakeDC site? People's
> Blogs? Google Code? Cakeforge?  SourceForge? Google the web? All of
> the above?
>
> Until Bakery v2.0 is out, perhaps a very simple, immediate start might
> be to just  link to http://cakepackages.com/ from cakePHP.org, and
> promote the idea of people "registering their contributions" with
> cakepackages.com.
>
> I think ideally, in the longer terms we might want to head towards
> something more like Joomla's extensions site (http://
> extensions.Joomla.org). Where code contributions are broken down by
> functional categories. The code might be hosted elsewhere, but the
> writeup is there, the comments and reviews of the code are there, and
> the links to all the tickets, source code, demos etc. is there too.
>
> In any case, the cake project and community has outgrown the current
> bakery. That is not a bad thing, it's a good thing. We just need a
> sensible next step.
>
> Thoughts?
>
>
> On Apr 26, 11:00 am, Martin Westin  wrote:
> > I have a few articles published in the Bakery. This does not make me
> > an authority on the subject but Since my first one was back in 2007 (I
> > think), before it was even called the Bakery, I do have some
> > experience of it over a pretty long time.
> >
> > My personal set of guidelines for writing articles are:
> > - Write and edit, preview and check... a lot.
> > - Only publish once. Don't ever edit a published post unless you are
> > at gunpoint.
> > - Instead post additions or edits as author comments.
> > - Keep the rss feed of comments to each of your articles in your feed
> > reader.
> > - Respond to real comments and delete spam comments. (I only delete
> > spam I am certain of)
> >
> > I have developed some of this due to the sometimes very slow
> > moderation process. A spell-correction once lingered for many weeks.
> > This is of-course frustrating. But, if everyone took great care to
> > check their articles before publishing their content I believe the
> > process would be significantly quicker.
> > Other points in my list are there to improve the quality of the
> > article and to take on a small part of the burden of comment
> > moderation. By keeping track of comments and responding to them you
> > improve the quality of your article and the Bakery as a whole. Even if
> > it is just a tiny improvement, it is something everyone can do. No
> > forking required. ;)
> >
> > I believe that the main problems that need to be addressed in the
> > software are related to spam. It if not perfect in most other
> > respects, few things are, but the spam comments are the most urgent
> > problem. They also t

Re: How to output UTF-8 sign?

2010-04-26 Thread sebb86
Thank you for making an example!
But in my case, i have more than one column to make sortable. In your
example, when i click on one table header to sort, all table headers
show the same arrow, what is wrong :/

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


transform query result to populate dropdown?

2010-04-26 Thread mivogt-LU
Hi there,

as I have some trouble to manage the find() for my wishes, I did a
working sql expression and checked id using $debug.
Sadly the resultset is an array but not assotiativ as it needs to be
used to populate input dropdownbox.

My SQL is:
$Q_Zimmer="
SELECT id
FROM lodgings AS Zimmer
WHERE Zimmer.id NOT IN
(SELECT ls.id from   booking_positions AS bs,  lodgings AS ls
WHERE bs.lodging_id = ls.id
AND
bs.AnreiseDatum>='2010-05-25 12:00:00'
AND
bs.AbreiseDatum<='2010-05-30 12:00:00'
)";

$db=& ConnectionManager::getdataSource('default');
$dataZimmer=$db->query($Q_Zimmer);

This results me all the lodgings I want to get but is not able to be
used to fill the $lodgings as a find() would.

May somebody in here please help me
either to transfer the result to an useable arry
or
to recode my sql to be a find().

After looking the cakebook and having a view tryouts with no success
on it ... I ask ...

TIA

Michael

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: Bakery...arrogance or plain lack of attention

2010-04-26 Thread keymaster
I understand outsourcing the SCM to github, the tickets to Lighthouse,
the forum to Google Groups, and using cakePHP.org as the glue which
ties everything together. To me that is absolutely the right way to
go, as it frees up manpower to develop framework code.

Perhaps we need a better way of tracking all the excellent code
contributions available.

At one time, the old cakeForge served as a central repository for all
plugins, components, etc., so, if you wanted something, you knew that
was the place to look.

Now, where should we look... Bakery? Github? CakeDC site? People's
Blogs? Google Code? Cakeforge?  SourceForge? Google the web? All of
the above?

Until Bakery v2.0 is out, perhaps a very simple, immediate start might
be to just  link to http://cakepackages.com/ from cakePHP.org, and
promote the idea of people "registering their contributions" with
cakepackages.com.

I think ideally, in the longer terms we might want to head towards
something more like Joomla's extensions site (http://
extensions.Joomla.org). Where code contributions are broken down by
functional categories. The code might be hosted elsewhere, but the
writeup is there, the comments and reviews of the code are there, and
the links to all the tickets, source code, demos etc. is there too.

In any case, the cake project and community has outgrown the current
bakery. That is not a bad thing, it's a good thing. We just need a
sensible next step.

Thoughts?


On Apr 26, 11:00 am, Martin Westin  wrote:
> I have a few articles published in the Bakery. This does not make me
> an authority on the subject but Since my first one was back in 2007 (I
> think), before it was even called the Bakery, I do have some
> experience of it over a pretty long time.
>
> My personal set of guidelines for writing articles are:
> - Write and edit, preview and check... a lot.
> - Only publish once. Don't ever edit a published post unless you are
> at gunpoint.
> - Instead post additions or edits as author comments.
> - Keep the rss feed of comments to each of your articles in your feed
> reader.
> - Respond to real comments and delete spam comments. (I only delete
> spam I am certain of)
>
> I have developed some of this due to the sometimes very slow
> moderation process. A spell-correction once lingered for many weeks.
> This is of-course frustrating. But, if everyone took great care to
> check their articles before publishing their content I believe the
> process would be significantly quicker.
> Other points in my list are there to improve the quality of the
> article and to take on a small part of the burden of comment
> moderation. By keeping track of comments and responding to them you
> improve the quality of your article and the Bakery as a whole. Even if
> it is just a tiny improvement, it is something everyone can do. No
> forking required. ;)
>
> I believe that the main problems that need to be addressed in the
> software are related to spam. It if not perfect in most other
> respects, few things are, but the spam comments are the most urgent
> problem. They also take up a lot of time, I imagine.
> (There is also the thing where an author can't delete his/her own
> articles.)
>
> The other frustrations I have experience from time to time are
> probably more due to human resources, or a shortage thereof. It is
> important to point out that the people involved are NOT the problem...
> the rest of us, not involved, are so to speak.
> I am sure that with more insight one could see ways of improving the
> software that would streamline the work of moderators.
>
> /Martin
>
> On Apr 26, 3:10 am, Graham Weldon  wrote:
>
>
>
> > Most definitely. We're keeping pretty busy with work on the core at the
> > moment, with releases for 1.2.7 and 1.3.0 out recently, we have a fair load
> > of work ahead to push through on CakePHP 2.0.
>
> > If anyone has an interest in developing and working on the bakery, we would
> > very much welcome it.
>
> > Cheers,
> > Graham Weldon (aka. Predominant)
>
> > On Mon, Apr 26, 2010 at 10:49 AM, jacmoe  wrote:
> > > I think you misunderstand:
> > > When you make a fork of a project on Github, you can make merge
> > > requests back.
> > > Which means that if you're unsatisfied with the Bakery (as software),
> > > just fork it, fix it, and make a merge request.
> > > Even for small fixes, doesn't matter.
> > > I am sure Graham and Mark and the rest of the CakePHP team would
> > > appreciate that. :)
>
> > > That's what I mean by forking.
>
> > > Cheers
>
> > > Jacob
>
> > > On Apr 26, 2:04 am, calvin  wrote:
> > > > I haven't published anything on the Bakery except for comments, so I
> > > > can't comment on the process. However, I will note that the software
> > > > is pretty screwed up. All my article reply notifications are blank e-
> > > > mails--not even a link to the comment/article. I personally hate it
> > > > when people send me e-mails or make forum posts where they don't write
> > > > anything in the message body and just

Re: Bakery...arrogance or plain lack of attention

2010-04-26 Thread Martin Westin
I have a few articles published in the Bakery. This does not make me
an authority on the subject but Since my first one was back in 2007 (I
think), before it was even called the Bakery, I do have some
experience of it over a pretty long time.

My personal set of guidelines for writing articles are:
- Write and edit, preview and check... a lot.
- Only publish once. Don't ever edit a published post unless you are
at gunpoint.
- Instead post additions or edits as author comments.
- Keep the rss feed of comments to each of your articles in your feed
reader.
- Respond to real comments and delete spam comments. (I only delete
spam I am certain of)

I have developed some of this due to the sometimes very slow
moderation process. A spell-correction once lingered for many weeks.
This is of-course frustrating. But, if everyone took great care to
check their articles before publishing their content I believe the
process would be significantly quicker.
Other points in my list are there to improve the quality of the
article and to take on a small part of the burden of comment
moderation. By keeping track of comments and responding to them you
improve the quality of your article and the Bakery as a whole. Even if
it is just a tiny improvement, it is something everyone can do. No
forking required. ;)

I believe that the main problems that need to be addressed in the
software are related to spam. It if not perfect in most other
respects, few things are, but the spam comments are the most urgent
problem. They also take up a lot of time, I imagine.
(There is also the thing where an author can't delete his/her own
articles.)

The other frustrations I have experience from time to time are
probably more due to human resources, or a shortage thereof. It is
important to point out that the people involved are NOT the problem...
the rest of us, not involved, are so to speak.
I am sure that with more insight one could see ways of improving the
software that would streamline the work of moderators.


/Martin



On Apr 26, 3:10 am, Graham Weldon  wrote:
> Most definitely. We're keeping pretty busy with work on the core at the
> moment, with releases for 1.2.7 and 1.3.0 out recently, we have a fair load
> of work ahead to push through on CakePHP 2.0.
>
> If anyone has an interest in developing and working on the bakery, we would
> very much welcome it.
>
> Cheers,
> Graham Weldon (aka. Predominant)
>
>
>
>
>
> On Mon, Apr 26, 2010 at 10:49 AM, jacmoe  wrote:
> > I think you misunderstand:
> > When you make a fork of a project on Github, you can make merge
> > requests back.
> > Which means that if you're unsatisfied with the Bakery (as software),
> > just fork it, fix it, and make a merge request.
> > Even for small fixes, doesn't matter.
> > I am sure Graham and Mark and the rest of the CakePHP team would
> > appreciate that. :)
>
> > That's what I mean by forking.
>
> > Cheers
>
> > Jacob
>
> > On Apr 26, 2:04 am, calvin  wrote:
> > > I haven't published anything on the Bakery except for comments, so I
> > > can't comment on the process. However, I will note that the software
> > > is pretty screwed up. All my article reply notifications are blank e-
> > > mails--not even a link to the comment/article. I personally hate it
> > > when people send me e-mails or make forum posts where they don't write
> > > anything in the message body and just use the subject-line as the
> > > message. And I think this, along with dead links in the Cookbook, both
> > > make Cake look very unprofessional.
>
> > > But I don't think just forking the Bakery is a solution. Cake needs a
> > > centralized/official article/plugins repository. There are just a few
> > > things that need to be fixed is all. Even if someone were to fork the
> > > Bakery, it would not be as successful/useful. The Bakery is only so
> > > useful today because lots of people know about and use it--it's linked
> > > to right from the CakePHP homepage. So this "if you don't like it,
> > > just fork it" attitude is not appropriate. It's similar to the
> > > attitude that, if you find Cake's documentation lacking, you should
> > > write it yourself. FOSS is about cooperation and free exchange of
> > > ideas and information. It's not an excuse to deflect all criticism or
> > > pin all responsibilities on the user/critic.
>
> > > And a person does not need to have contributed to Cake's source code
> > > to level a valid criticism.
>
> > > On Apr 25, 2:46 pm, jacmoe  wrote:
>
> > > > That doesn't give you carte blanche to be arrogant, does it?
>
> > > > What have you done for CakePHP if I may ask? :)
>
> > > > A couple of weeks ago I posted this topic:
> >http://groups.google.com/group/cake-php/browse_thread/thread/e3a1f469...
> > > > With the title 'Let's get rid of The Bakery'.
>
> > > > I volunteered as a moderator, but there's still lots of things to do.
> > > > And the software itself needs some fixing.
>
> > > > Feel free to fork it.
>
> > > > I would probably delete the article as w

Re: doing complex sql using query or find? outpit with tablecell()?

2010-04-26 Thread WebbedIT
For reports it does make sense to create a modelless controller.  All
calls to retrieve model data should be done within a controller and
passed to the view using $this->set(), so so far you are doing
everything correct.

I personally use ClassRegistry::init('ModelName')->find(); when
calling functions from models which are not associated with my
controller and if I am not mistaken calling this twice still only
calls one instance of the model.  This way your not calling ALL models
when you may only be using one or two of the models for the report you
are showing.

But remember once you have called ClassRegistry::init('ModelName')-
>find(); you can also use ClassRegistry::init('ModelName')-
>AssociatedModel->find(); or use containable etc to pull the data in
from other models.

I'm still on Cake 1.2.6 as 75% of the way through a big project, but
itching to move to 1.3 especially now we have a stable release.

HTH

Paul

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 actions inside a controller

2010-04-26 Thread Jeremy Burns
Good point.. As far as I know, the key difference is:

$this->functionName() is used to call another function that ought to return a 
value back to the calling function.
$this->setAction() effectively terminates the calling action and starts the 
called action, which then (probably) renders a view.

Or at least that's how I use them.

Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 26 Apr 2010, at 08:00, Miles J wrote:

> Or you can use $this->setAction().
> 
> On Apr 25, 10:54 pm, Jeremy Burns  wrote:
>> $this->functionName();
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> On 25 Apr 2010, at 23:40, Eric Anderson wrote:
>> 
>> 
>> 
>>> Hi everyone,
>> 
>>> I was unable to find the answer to this question in the 1.2.x
>>> documentation or in this group (although I have a feeling it must have
>>> already been answered somewhere).
>> 
>>> How do I properly call another action of the controller inside another
>>> action? All within the same controller. I just need to call one
>>> controller action inside of another. I know it's simple, but I can't
>>> seem to figure it out.
>> 
>>> Thanks!
>> 
>>> Eric
>> 
>>> 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.com For more options, visit this group 
>>> athttp://groups.google.com/group/cake-php?hl=en
>> 
>> 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.com For more options, visit this group 
>> athttp://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: Calling actions inside a controller

2010-04-26 Thread Miles J
Or you can use $this->setAction().

On Apr 25, 10:54 pm, Jeremy Burns  wrote:
> $this->functionName();
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 25 Apr 2010, at 23:40, Eric Anderson wrote:
>
>
>
> > Hi everyone,
>
> > I was unable to find the answer to this question in the 1.2.x
> > documentation or in this group (although I have a feeling it must have
> > already been answered somewhere).
>
> > How do I properly call another action of the controller inside another
> > action? All within the same controller. I just need to call one
> > controller action inside of another. I know it's simple, but I can't
> > seem to figure it out.
>
> > Thanks!
>
> > Eric
>
> > 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.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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.com For more options, visit this group 
> athttp://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