Re: API 1.2 chm or pdf

2008-07-14 Thread Wisnu Manupraba
On Tue, Jul 15, 2008 at 1:23 PM, Duncan <[EMAIL PROTECTED]> wrote:

>
> Try searching in this group, as there used to be one, but I think it's
> outdated, whereas the online API provides code coverage for the recent
> RC2 release.


yup, i need the latest release one

>
>
> On Jul 14, 10:43 pm, "Wisnu Manupraba" <[EMAIL PROTECTED]> wrote:
> > dear,
> >
> > where can I get api 1.2 documentation di chm or pdf format? because i'm
> not
> > online 24 hour a day so that i need offline api documentation
> >
> > thanks
> > --
> > inoex135
> > I'm a newbie who want to be a hackerhttp://inoex135.wordpress.com
> >
>


-- 
inoex135
I'm a newbie who want to be a hacker
http://inoex135.wordpress.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: API 1.2 chm or pdf

2008-07-14 Thread Duncan

Try searching in this group, as there used to be one, but I think it's
outdated, whereas the online API provides code coverage for the recent
RC2 release.

On Jul 14, 10:43 pm, "Wisnu Manupraba" <[EMAIL PROTECTED]> wrote:
> dear,
>
> where can I get api 1.2 documentation di chm or pdf format? because i'm not
> online 24 hour a day so that i need offline api documentation
>
> thanks
> --
> inoex135
> I'm a newbie who want to be a hackerhttp://inoex135.wordpress.com
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



API 1.2 chm or pdf

2008-07-14 Thread Wisnu Manupraba
dear,

where can I get api 1.2 documentation di chm or pdf format? because i'm not
online 24 hour a day so that i need offline api documentation

thanks
-- 
inoex135
I'm a newbie who want to be a hacker
http://inoex135.wordpress.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

So, I basically saved all UTF-8 files without BOM and now things works
beautifully.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

Ok, it looks like this php bug is involved. I have been ignorant about
this totally..

http://bugs.php.net/bug.php?id=22108
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

Well, I might find a light in some direction... the model file was
written and saved in UTF-8 (all else are UTF-8, too, tho) but when I
change this to not UTF-8, it looks working... I feel this very
hairly...

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

Darn, I can't locate what's wrong!

Although I was mostly certain about not having extra space or funky
control code hidden somewhere in the code, I just copied 1.2 RC2 to a
new directory and set up only 3 files for the test - model/controller/
view. And they're like this:

article.php (model):


article_controller.php (controller):
redirect('/articles/index');
}
function index() {
}
}?>

index.ctp (view):
link('GO', '/articles/go'); ?>


Then clicking "GO" from  /articles page still gives me:

Warning (2): Cannot modify header information - headers already sent
by (output started at C:\Program Files\Apache Group\Apache2\htdocs
\caketest\app\controllers\articles_controller.php:1) [CORE\cake\libs
\controller\controller.php, line 577]


Damn, I feel very stupid, I've never had this problem with various 1.1
productions (using lots of redirect) in the last years. There can be
no since white space before or after or ctr code etc since I'm setting
my editor any ctr char visible. I may yet somehow stupid in this less
than 10 lines of total code but do feel something ELSE is the problem.
I'm hosting this on local XP with Apache2.0.59/PHP4.3.4, MySQL4.0.20
if this info helps anything.

Could someone suggest me how I could perhaps locate WHERE this damn
header must have been sent?!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Customizing the output of Form Helpers

2008-07-14 Thread Jonathan Snook

Probably your best bet is to create your own helper that uses the base
elements like $form->text and $form->error. Wrap your own HTML around
those. Take a look at how $form->input does it and model yours around
it.

-Jonathan

On 7/14/08, Tallbrick <[EMAIL PROTECTED]> wrote:
>  I have been hitting Google hard for any tutorials on customizing the
>  output of Cake's form helpers.  Namely adjusting the output of radio
>  and checkbox arrays using the 'automagic' form helpers.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CAKE PHP on BLUEHOST servers

2008-07-14 Thread bingo

Try these two things:
1. deleted all the files in app/tmp folder. Don't delete the folder
structure.
2. Make sure you have correctly set path APP_PATH and CORE_PATH global
variable in app/webroot/index.php file

if both doesn't work, try debugging by putting some echo and die
commands to find how far server request is reaching. Start from app/
index.php or app/webroot/index.php file.





On Jul 14, 10:25 am, JBMGT <[EMAIL PROTECTED]> wrote:
> Gonzalo,
>
> I will get you that information.
> RJ
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



need help with CakePHP + YUI

2008-07-14 Thread bingo

hi all,

Till date, I have used jquery with CakePHP and it was simple
integrating the two as JQuery contains a javascript file. Now I am
planning to move from JQuery to YUI as YUI has both JS and CSS which
makes developing front end easy. But, I am not sure how to integrate
the two as the default file structure of YUI does not confirm to the
file structure of CakePHP for organizing JS, CSS and images.

If you are using YUI with CakePHP, I would be thankful if you can tell
me how did you integrate the two. I am mainly looking for information
on how to take apart YUI files (if it is required) and place them into
JS, CSS, and image folders of CakePHP and ofcourse do that without
breaking YUI :-)






--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Test Suite: parsing a CSV file, where to store file?

2008-07-14 Thread Grant Cox

I do the same, and keep the file in fixtures.  Makes sense to me :)


On Jul 15, 8:33 am, aranworld <[EMAIL PROTECTED]> wrote:
> I need to create a test case for the parsing of a tab delimited file.
> Would it make sense to put the test version of this CSV file in the
> fixtures directory of my test suite?  Or is there a more standard
> place to put a file like this?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-14 Thread villas

Yes sir,  I would volunteer!  To be honest,  I would put myself in the
bottom quartile of Cake skillfullness,  but I reckon I still know
enough to spot abuse and give a timely "thumbs up" to a well-written
article.

I would propose a simple posting to this group would produce many
excellent candidates for such a job and I believe the Cake team would
have no problem choosing the best.  Put us to the test -- collectively
we could have decent Bakery articles approved in hours not weeks!

On Jul 14, 8:01 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 14, 2008 at 2:55 PM, villas <[EMAIL PROTECTED]> wrote:
>
> > That's such a pity if the Bakery wouldn't be supported for such an
> > avoidable reason. Surely the Cake team can just increase the number of
> > trusted Bakery administrators so that there is always someone on
> > 'duty'.  Why not have 20 reviewers,  or more?  It seems so strange in
> > such an active and knowledgeable community to take 2 weeks to approve
> > something.
>
> Does that mean you're volunteering?
>
> --
> Chris Hartjes
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange problem --> Missing table

2008-07-14 Thread Siebren Bakker
@Puneet:
While changing the configuration file will work, you must remember to then
change it back when you are done. The simplest solution, IMHO, is to simply
delete the contents of /app/tmp/cache/model, and then cake will simply
re-build the cache, including the new model, and you're all done!

In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)

On Mon, Jul 14, 2008 at 14:25, puneetratan <[EMAIL PROTECTED]> wrote:

>
> Hello
>
> In the config file of cake php , there is an option for Cake Cache
> true and false, and make it false, and then check
>
> Thanks
> Puneet
>
> On Jul 14, 3:18 pm, Bo ozz <[EMAIL PROTECTED]> wrote:
> > Cake keeps showing me this error message:
> >
> > -
> > Missing Database Table
> >
> > Error: Database table albums for model Album was not found.
> >
> > Notice: If you want to customize this error message, create app/views/
> > errors/missing_table.ctp
> >
> > --
> >
> > Pretty self-explanatory you would say, but the table does exist!!
> >
> > I've tried troubleshooting this, but the following code in my model
> > does show my records in that table:
> >
> > --
> >  >
> > class Album extends AppModel {
> > function Album() {
> > mysql_connect('localhost','***','***');
> > mysql_select_db('***');
> > $result = mysql_query('SELECT * FROM albums');
> > print_r(mysql_fetch_assoc($result));
> > die();
> > }
> > //var $name = 'Album';
> > //var $hasMany = array('Foto');
> >
> > }
> >
> > ?>
> >
> > 
> >
> > Any thoughts??
> >
> > thanks!
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: View Caching with AuthComponent

2008-07-14 Thread the_woodsman

I know that in the cookbook there's some info on marking particular
sections of a view as  " wrote:
> Hi,
>
> I am trying to use CakePHP 1.2rc2 with the Auth Component and View
> caching. I have noticed that if i do not have the view cached
> everything works as normal and a user that is not logged in will get
> redirected to /users/login but if there is a view cached then the
> cached view gets presented and authorization is not performed.
>
> Any ideas on whether this is a feature or if I have broken something?
>
> Thanks
>
> Tristan
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Customizing the output of Form Helpers

2008-07-14 Thread Tallbrick

I have been hitting Google hard for any tutorials on customizing the
output of Cake's form helpers.  Namely adjusting the output of radio
and checkbox arrays using the 'automagic' form helpers.

My current solutions thus far have been a combination of $form-
>input() and CSS to generate the desired output.  However, in my
current project I -unfortunately- cannot use conditional statements/
comments to insert the CSS required for correct display in older
browsers.  So, in my case I need to customize the output of $form-
>input() to wrap each radio/label pair with a  tag.  At the same
time, I could see a similar technique used to output checkbox or radio
arrays into a table, etc...

This type of form customization is not far-fetched and I imagine the
the CakePHP team would have provided a way to accomplish this.  I
could see -maybe- being able to specify a template.ctp file in
$options[] to style the output of my $radioArray.  (Maybe this is a
suggestion for future versions...)

I have not found any useful information so far.  Any help or useful
links is appreciated!!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Test Suite: parsing a CSV file, where to store file?

2008-07-14 Thread aranworld

I need to create a test case for the parsing of a tab delimited file.
Would it make sense to put the test version of this CSV file in the
fixtures directory of my test suite?  Or is there a more standard
place to put a file like this?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread aranworld

The documentation is definitely getting better all the time.  You guys
are doing a great job.

-Aran


On Jul 14, 2:07 pm, John David Anderson <[EMAIL PROTECTED]>
wrote:
> On Jul 14, 2008, at 1:38 PM, Chris Hartjes wrote:
>
>
>
> > On Mon, Jul 14, 2008 at 3:17 PM, puneetratan <[EMAIL PROTECTED]>  
> > wrote:
>
> >> Hello Group,
> >> Can anyone let me know, the use of ACL in cakephp, and howz we can
> >> implement that ?
>
> >http://book.cakephp.org/view/171/access-control-lists
> >http://tinyurl.com/2rfwr
>
> > However, many people have complained that it is not good enough
> > documentation.  Having not done any ACL myself, I cannot confirm that.
>
> fwiw, I just rewrote those sections (in the book) last week.
>
> -- John
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



cake core causes error when trying to open cache file

2008-07-14 Thread MarcS

I keep seeing the following error in my error.log file
2008-07-14 15:01:22 Warning: Warning (2): fopen(/home/path/tmp/cache/
persistent/cake_core_default_en_us) [function.fopen]: failed to open stream: No such file or directory in 
>[CORE/cake/libs/file.php, line 146]

and in debug.log

2008-07-14 15:02:47 Notice: Notice (8): unserialize() [function.unserialize]: Error at
offset 0 of 263 bytes in [CORE/cake/li
bs/cache/file.php, line 174]

any idea what causes this?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Authentication: logged user data

2008-07-14 Thread Sam Sherlock
http://book.cakephp.org/view/172/authentication

2008/7/14 Janoma <[EMAIL PROTECTED]>:

>
> Hello,
>
> I have two models: User and News. Each element in the News table has a
> user associated with it (the author). How do I obtain the username of
> the currently logged user? I have tried several things, but I can't
> find where the session info is stored.
>
> Thanks for your help!
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Authentication: logged user data

2008-07-14 Thread Janoma

Hello,

I have two models: User and News. Each element in the News table has a
user associated with it (the author). How do I obtain the username of
the currently logged user? I have tried several things, but I can't
find where the session info is stored.

Thanks for your help!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread John David Anderson


On Jul 14, 2008, at 1:38 PM, Chris Hartjes wrote:

>
> On Mon, Jul 14, 2008 at 3:17 PM, puneetratan <[EMAIL PROTECTED]>  
> wrote:
>>
>> Hello Group,
>> Can anyone let me know, the use of ACL in cakephp, and howz we can
>> implement that ?
>
> http://book.cakephp.org/view/171/access-control-lists
> http://tinyurl.com/2rfwr
>
> However, many people have complained that it is not good enough
> documentation.  Having not done any ACL myself, I cannot confirm that.

fwiw, I just rewrote those sections (in the book) last week.

-- John

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread John David Anderson


On Jul 14, 2008, at 3:01 PM, aranworld wrote:

>
> I prefer using the honor system to ACL myself.  It is much easier to
> set up.

In that case, can I get a login account to your production server? ;)

-- John

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



View Caching with AuthComponent

2008-07-14 Thread tdyer

Hi,

I am trying to use CakePHP 1.2rc2 with the Auth Component and View
caching. I have noticed that if i do not have the view cached
everything works as normal and a user that is not logged in will get
redirected to /users/login but if there is a view cached then the
cached view gets presented and authorization is not performed.

Any ideas on whether this is a feature or if I have broken something?

Thanks

Tristan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread aranworld

I prefer using the honor system to ACL myself.  It is much easier to
set up.

-Aran

On Jul 14, 12:39 pm, John David Anderson <[EMAIL PROTECTED]>
wrote:
> http://book.cakephp.org/view/171/access-control-lists
>
> -- John
>
> On Jul 14, 2008, at 1:17 PM, puneetratan wrote:
>
>
>
> > Hello Group,
> > Can anyone let me know, the use of ACL in cakephp, and howz we can
> > implement that ?
>
> > Thanks
> > puneet
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Db connection with bake?

2008-07-14 Thread Jonathan Snook

It's because the connection manager specifically looks for a $default
property in the DATABASE_CONFIG. Why rename it? (a few classes seem to
be tied specifically to $default so I'd recommend not changing it)

On 7/14/08, Mech7 <[EMAIL PROTECTED]> wrote:
>
>  When i bake (cake bake omg) an app.. it creates a db config like this:
>
>  class DATABASE_CONFIG {
>
> var $omg = array(
> );
>  }
>
>  And i get an error like this:
>
>  Fatal Error (256): ConnectionManager::getDataSource - Non-existent
>  data source default [CORE\cake\libs\model\connection_manager.php, line
>  113]
>
>  When i rename $omg to $default.. it does work... does anybody know
>  what is wrong?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Db connection with bake?

2008-07-14 Thread Mech7

When i bake (cake bake omg) an app.. it creates a db config like this:

class DATABASE_CONFIG {

var $omg = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'omg',
'encoding' => 'utf-8'
);
}

And i get an error like this:

Fatal Error (256): ConnectionManager::getDataSource - Non-existent
data source default [CORE\cake\libs\model\connection_manager.php, line
113]

When i rename $omg to $default.. it does work... does anybody know
what is wrong?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread John David Anderson

http://book.cakephp.org/view/171/access-control-lists

-- John

On Jul 14, 2008, at 1:17 PM, puneetratan wrote:

>
> Hello Group,
> Can anyone let me know, the use of ACL in cakephp, and howz we can
> implement that ?
>
> Thanks
> puneet
>
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 3:17 PM, puneetratan <[EMAIL PROTECTED]> wrote:
>
> Hello Group,
> Can anyone let me know, the use of ACL in cakephp, and howz we can
> implement that ?

http://book.cakephp.org/view/171/access-control-lists
http://tinyurl.com/2rfwr

However, many people have complained that it is not good enough
documentation.  Having not done any ACL myself, I cannot confirm that.

-- 
Chris Hartjes
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: wizard component question

2008-07-14 Thread ianh

I have a fair bit using the olders form wizard component (I think
there are two versions floating around now).

Basically each 'step' in the form has two methods associated with it,
a method to display the page and an optional ,ethod to validate that
specific page. If you return false from the second method then the
form wizard will not progress to the next step in the chain.

So, put your validation tests (not the validate array) in the second
method and return either true (this step is ok and we can continue to
the next step) or false (oops there was an error and we need to do
this step over again).

HTH, Ian

On Jul 14, 6:23 pm, Rich Goldman <[EMAIL PROTECTED]> wrote:
> Hi, does anyone have experience using the wizard component? I'm a little
> mystified by the following sample code from the wizard tutorial:
>
> |    function processStepOne() {
>         # do some validation stuff here
>         return true (or false);
>     }
>
> | What does "do some validation stuff here" mean? Should I put my
> validate array in there? But then I have to return true or false at the
> end of the function... I'm confused.
>
> Also, I can't figure out how to access the form validation errors in the
> view. I don't see anything in the manual about how to do this. Can
> someone point me in the right direction?
>
> Thanks!
> Rich
>
> |
>
> |
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL

2008-07-14 Thread puneetratan

Hello Group,
Can anyone let me know, the use of ACL in cakephp, and howz we can
implement that ?

Thanks
puneet

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake php ajax pagination

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 3:16 PM, puneetratan <[EMAIL PROTECTED]> wrote:
>
> Hello Group,
> I am doing ajax pagination in cake php. but i also have some search
> criterias which  i need on second or third pages also, so that
> condition retains.
>
> right now i am using cake session (storing the condition into session)
> is there any other way to store condition, so that we can get on
> second page.
> Plz let me know

http://book.cakephp.org/view/164/pagination

-- 
Chris Hartjes
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange problem --> Missing table

2008-07-14 Thread puneetratan

Hello

In the config file of cake php , there is an option for Cake Cache
true and false, and make it false, and then check

Thanks
Puneet

On Jul 14, 3:18 pm, Bo ozz <[EMAIL PROTECTED]> wrote:
> Cake keeps showing me this error message:
>
> -
> Missing Database Table
>
> Error: Database table albums for model Album was not found.
>
> Notice: If you want to customize this error message, create app/views/
> errors/missing_table.ctp
>
> --
>
> Pretty self-explanatory you would say, but the table does exist!!
>
> I've tried troubleshooting this, but the following code in my model
> does show my records in that table:
>
> --
> 
> class Album extends AppModel {
>         function Album() {
>                 mysql_connect('localhost','***','***');
>                 mysql_select_db('***');
>                 $result = mysql_query('SELECT * FROM albums');
>                 print_r(mysql_fetch_assoc($result));
>                 die();
>         }
>     //var $name = 'Album';
>         //var $hasMany = array('Foto');
>
> }
>
> ?>
>
> 
>
> Any thoughts??
>
> thanks!

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake php ajax pagination

2008-07-14 Thread puneetratan

Hello Group,
I am doing ajax pagination in cake php. but i also have some search
criterias which  i need on second or third pages also, so that
condition retains.

right now i am using cake session (storing the condition into session)
is there any other way to store condition, so that we can get on
second page.
Plz let me know


Thanks
Puneet

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: wizard component question

2008-07-14 Thread DaveMahon

Wizard Component? That would be a third-party library AFAIK and you'll
need request help from its development community.

If you're using CakePHP 1.2, the FormHelper should display form
validation errors for you.

On Jul 14, 1:23 pm, Rich Goldman <[EMAIL PROTECTED]> wrote:
> Hi, does anyone have experience using the wizard component? I'm a little
> mystified by the following sample code from the wizard tutorial:
>
> |    function processStepOne() {
>         # do some validation stuff here
>         return true (or false);
>     }
>
> | What does "do some validation stuff here" mean? Should I put my
> validate array in there? But then I have to return true or false at the
> end of the function... I'm confused.
>
> Also, I can't figure out how to access the form validation errors in the
> view. I don't see anything in the manual about how to do this. Can
> someone point me in the right direction?
>
> Thanks!
> Rich
>
> |
>
> |
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can't Get Validation to Work

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 3:22 PM, mwcbrent <[EMAIL PROTECTED]> wrote:
>
> I know this is mundane guys but whats up with this, it was a huge
> selling point for me when I was reading how it could work.  Is there a
> resource that could outline the steps here?

http://book.cakephp.org/view/125/data-validation

-- 
Chris Hartjes
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can't Get Validation to Work

2008-07-14 Thread mwcbrent

I know this is mundane guys but whats up with this, it was a huge
selling point for me when I was reading how it could work.  Is there a
resource that could outline the steps here?

On Jul 4, 1:58 pm, mwcbrent <[EMAIL PROTECTED]> wrote:
> I seem to be having a problem withvalidation.  Everything works great
> so far but when I have empty fields they still get saved.
>
> Model:
>
> class Girl extends AppModel
>   {
> var $name = 'Girl';
> var $validate = array(
> 'description' => array(
> 'rule' => array('minLength',1)
> )
> );
>
>   }
>
> Controller:
>
> function admin_add()
> {
> if(!empty($this->data)) {
> if($this->Girl->save($this->data)) {
> $this->flash('Girl Has Been 
> Saved.','/admin/girls');
> } else {
> $this->flash("Epic Fail","/admin/girls");
> }
> }
> }
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to start new application with CAKE PHP

2008-07-14 Thread Arak Tai'Roth

If you are truly interested in learning about CakePHP, first place to
start would http://book.cakephp.org

On Jul 14, 7:07 am, Bhaumik Prajapati <[EMAIL PROTECTED]>
wrote:
> Keeo posted how to start new application with CAKE PHP
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prototype

2008-07-14 Thread [EMAIL PROTECTED]

Hi.

I've managed to get the call working with /appname/controller/action
but now I'm getting no response at all. I'm using Javascript's alert
function to see the AJAX response but I'm only getting a "no response
text" :(


On 14 Jul, 19:57, DaveMahon <[EMAIL PROTECTED]> wrote:
> It ought to. What response are you getting?
>
> On Jul 14, 1:37 pm, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Hi all.
>
> > I'm trying to make a simple AJAX call to a controller action using
> > prototype. I'm not using any of the AJAX helper functions because I
> > think any of them can do what I'm trying to do wich is a simple call.
> > My problem is to know what url I have to pass in the url of the
> > Ajax.Request prototype object. It seems an url like /controller/action
> > doesn't do the work. Can anybody help me?
>
> > Thanks.- Ocultar texto citado -
>
> - Mostrar texto citado -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prototype

2008-07-14 Thread schneimi

If you do the call from another controller, you have to use ../
controller/action.

But you can also use the ajax helper for this:

echo $ajax->remoteFunction(array('url' => '../controller/action'));

On 14 Jul., 19:37, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi all.
>
> I'm trying to make a simple AJAX call to a controller action using
> prototype. I'm not using any of the AJAX helper functions because I
> think any of them can do what I'm trying to do wich is a simple call.
> My problem is to know what url I have to pass in the url of the
> Ajax.Request prototype object. It seems an url like /controller/action
> doesn't do the work. Can anybody help me?
>
> Thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-14 Thread Chris Hartjes

On Mon, Jul 14, 2008 at 2:55 PM, villas <[EMAIL PROTECTED]> wrote:
>
> That's such a pity if the Bakery wouldn't be supported for such an
> avoidable reason. Surely the Cake team can just increase the number of
> trusted Bakery administrators so that there is always someone on
> 'duty'.  Why not have 20 reviewers,  or more?  It seems so strange in
> such an active and knowledgeable community to take 2 weeks to approve
> something.

Does that mean you're volunteering?

-- 
Chris Hartjes
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prototype

2008-07-14 Thread DaveMahon

It ought to. What response are you getting?

On Jul 14, 1:37 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi all.
>
> I'm trying to make a simple AJAX call to a controller action using
> prototype. I'm not using any of the AJAX helper functions because I
> think any of them can do what I'm trying to do wich is a simple call.
> My problem is to know what url I have to pass in the url of the
> Ajax.Request prototype object. It seems an url like /controller/action
> doesn't do the work. Can anybody help me?
>
> Thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-14 Thread villas

That's such a pity if the Bakery wouldn't be supported for such an
avoidable reason. Surely the Cake team can just increase the number of
trusted Bakery administrators so that there is always someone on
'duty'.  Why not have 20 reviewers,  or more?  It seems so strange in
such an active and knowledgeable community to take 2 weeks to approve
something.

On Jul 14, 7:22 pm, DanielMedia <[EMAIL PROTECTED]> wrote:
> Wow... 2 weeks? I didn't realize it could take that long. Or that
> editing would make it unpublished again. This was my first time
> submitting an article. Thanks for the info Duncan.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-14 Thread DanielMedia

Wow... 2 weeks? I didn't realize it could take that long. Or that
editing would make it unpublished again. This was my first time
submitting an article. Thanks for the info Duncan.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



hasMany mass editing

2008-07-14 Thread PKirk

Hi guys,
going straight to the question.
I've got, eg., a shelf that hasMany books.
Is there a simple way to edit all the books while editing the shelf?
All I've done is a custom variable in the controller that holds all
the books data,
a loop in the shelf/edit view to print all the input field
and a custom loop to save the data.
It works but seems to me too complicated for Cake.
I'm with the old 1.1, not the shining 1.2

Many thanks for your time,
P.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



wizard component question

2008-07-14 Thread Rich Goldman
Hi, does anyone have experience using the wizard component? I'm a little 
mystified by the following sample code from the wizard tutorial:

|function processStepOne() {
# do some validation stuff here
return true (or false);
}

| What does "do some validation stuff here" mean? Should I put my 
validate array in there? But then I have to return true or false at the 
end of the function... I'm confused.

Also, I can't figure out how to access the form validation errors in the 
view. I don't see anything in the manual about how to do this. Can 
someone point me in the right direction?

Thanks!
Rich

|

|

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-14 Thread Duncan

It can take a while.
I added an article, which took about 2 weeks to get approved, and on
the day it was live a user requested a feature addition.
Unfortunately I didn't know that editing the article would get it
delisted again, so that I'm currently waiting for it to get approved
once again - DOH!

On Jul 14, 10:31 am, DanielMedia <[EMAIL PROTECTED]> wrote:
> Looks like it hasn't been approved yet on the bakery. Hopefully it'll
> go live soon.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Prototype

2008-07-14 Thread [EMAIL PROTECTED]

Hi all.

I'm trying to make a simple AJAX call to a controller action using
prototype. I'm not using any of the AJAX helper functions because I
think any of them can do what I'm trying to do wich is a simple call.
My problem is to know what url I have to pass in the url of the
Ajax.Request prototype object. It seems an url like /controller/action
doesn't do the work. Can anybody help me?

Thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How can i filter Results so that only rows ( Records ) with a especific condition, like Result.is_final=1, are available for select.

2008-07-14 Thread DaveMahon

Probably not. Scaffolding is there to help familiarize the developer
with the data structures and best-practice coding. It is also really
useful for identifying issues with your model relationships before
you've invested large quantities of time and energy in trying to make
them work.

However, it comes with the full intention of dismantling and replacing
the auto-generated code with something more useful and application
specific.

On Jul 14, 11:24 am, PaulMan <[EMAIL PROTECTED]> wrote:
> Thanks Dave an Dardo.
> Just that was such a simple feature, that i was looking to find it
> through scaffold, maybe in future releases???
> But both of you are correct, i will follow your advise.
>
> Once Again,
> Thank You
>
> On Jul 14, 2:19 pm, DaveMahon <[EMAIL PROTECTED]> wrote:
>
> > I think you want to look in the manual under Developing with CakePHP >
> > Models > Retrieving your Data > find.
>
> >http://manual.cakephp.org/view/449/find
>
> > Then look at Developing with CakePHP > Controllers > Controller
> > Methods > Interacting with Views > set
>
> >http://manual.cakephp.org/view/427/set
>
> > You should never edit the actual Cake libraries unless you are
> > developing CakePHP itself.
>
> > On Jul 13, 6:51 pm, PaulMan <[EMAIL PROTECTED]> wrote:
>
> > > Done.. where's how:
> > > New version of: class Event extends AppModel
> > > {
> > >     var $name = 'Event';
> > >         var $displayField= 'description';
> > >         var $belongsTo=array('Pool','Result' => array(
> > >             'className'    => 'Result',
> > >                         'conditions' => 'Result.is_final=1'
> > >         ));
>
> > >  }
>
> > > New Version of scaffold.php on line 311
> > >         foreach ($this->ScaffoldModel->belongsTo as $assocName => 
> > > $assocData)
> > > {
> > >                                 $varName = 
> > > Inflector::variable(Inflector::pluralize(preg_replace('/
> > > _id$/', '', $assocData['foreignKey'])));
> > >                                 $this->controller->set($varName, 
> > > $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
> > >                         }
> > >                         foreach 
> > > ($this->ScaffoldModel->hasAndBelongsToMany as $assocName =>
> > > $assocData) {
> > >                                 $varName = 
> > > Inflector::variable(Inflector::pluralize($assocName));
> > >                                 $this->controller->set($varName, 
> > > $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
> > >                         }
>
> > > this way i can use params defined on var $belongsTo or
> > > hasAndBelongsToMany ...
>
> > > now the problem is... is this going to "f***" all the rest or is a
> > > good hack?
>
> > > On 13 Jul, 17:28, PaulMan <[EMAIL PROTECTED]> wrr ote:
>
> > > > thank's for the quick reply,
> > > > i already had read that articles, but i did no found the solution, the
> > > > problem is on the "Edit" action for events, that's where i want to
> > > > filter results, so that the final user can select a restrict options
> > > > of results.
> > > > Or maybe the solution is there and i'm too "newbie" blind to see, ???
> > > > if this is true  please , sorry.
>
> > > > lets put in another way:
> > > > take a look at the debug query bellow , at Nr 8 i would like to have
> > > > 8       SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > > > `Result` WHERE Result.is_active = 1             7       7       0
>
> > > > so this way on the edit action , Results select box will be only
> > > > populated with Results that are active, not all of them.
>
> > > > since i'm with scaffold , is this possible?
>
> > > > Nr      Query   Error   Affected        Num. rows       Took (ms)
> > > > 1       DESCRIBE `events`               8       8       2
> > > > 2       DESCRIBE `pools`                10      10      2
> > > > 3       DESCRIBE `results`              6       6       2
> > > > 4       DESCRIBE `bets`         6       6       2
> > > > 5       DESCRIBE `users`                10      10      2
> > > > 6       SELECT COUNT(*) AS `count` FROM `events` AS `Event` WHERE
> > > > `Event`.`id` = 1                1       1       1
> > > > 7       SELECT `Event`.`id`, `Event`.`pool_id`, `Event`.`result_id`,
> > > > `Event`.`description`, `Event`.`comment`, `Event`.`date`,
> > > > `Event`.`created`, `Event`.`modified`, `Result`.`id`,
> > > > `Result`.`is_final`, `Result`.`description`, `Result`.`value`,
> > > > `Result`.`created`, `Result`.`modified`, `Pool`.`id`,
> > > > `Pool`.`description`, `Pool`.`comment`, `Pool`.`number`, `Pool`.`open
> > > > date`, `Pool`.`close date`, `Pool`.`active`, `Pool`.`season`,
> > > > `Pool`.`created`, `Pool`.`modified` FROM `events` AS `Event` LEFT JOIN
> > > > `results` AS `Result` ON (`Result`.`is_final`=1 AND
> > > > `Event`.`result_id` = `Result`.`id`) LEFT JOIN `pools` AS `Pool` ON
> > > > (`Event`.`pool_id` = `Pool`.`id`) WHERE `Event`.`id` = 1 LIMIT 1        
> > > >         1       1
> > > > 1
> > > > 8    

Re: phpThumb Helper

2008-07-14 Thread DanielMedia

Looks like it hasn't been approved yet on the bakery. Hopefully it'll
go live soon.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: this->redirect() deletes any variable set by using this->set() method.

2008-07-14 Thread mehodgson

...Code got cut off.

$this->render() to display the alternate view
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: this->redirect() deletes any variable set by using this->set() method.

2008-07-14 Thread mehodgson

If you are setting variables and just need to display an alternate
page based on situational data, you might also be able to use $this-
>render() in your controller to display a different view page.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: MySQL Rand(), best PHP implementation

2008-07-14 Thread AD7six



On Jul 14, 5:29 pm, Spark <[EMAIL PROTECTED]> wrote:
>    As documented in MySQL manual, getting something random on a SQL
> call is dozens, hundreds of times slower than a common 'ORDER BY'.
> They even suggest using the language you are using (php, j2ee, .net)
> to achieve your goal.http://dev.mysql.com/doc/refman/5.0/en/select.html#c2161
>
>    I'd like to know other solutions, inside cakephp, to this problem..
> Which one is *the* solution.. should I care? cache that thing and live
> with it? :)

I use this behavior: 
http://trac.assembla.com/cake-base/browser/branches/sample_app/app/models/behaviors/random.php

Which in principle converts
 ORDER BY RAND()
into
 WHERE Model.afieldnamedrandom > random value ORDER BY (a field
with a random value)

and randomizes the values in afieldnamedrandom once a day.

There's a test case which demonstrates the more 'advanced' use of it:
http://trac.assembla.com/cake-base/browser/branches/sample_app/app/tests/cases/behaviors/random.test.php

hth,

AD

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Saving other fields after validation (working in 1.2 Beta but not in RC2)

2008-07-14 Thread [EMAIL PROTECTED]

Hello

In CakePHP 1.2 beta I do this:
data))
{
$this->Classified->id = $id;
$this->data = $this->Classified->read();
}
else
{
$this->Classified->set($this->data);
if($this->Classified->validates()){
$this->data['Classified']['otherfield'] = 
'test';


if($this->Classified->save($this->data['Classified'])){


}
}
}
}
...
}
?>
And the field 'otherfield' is correctly saved.

With the new CakePHP 1.2 RC2, the 'otherfield' is not saved (see via
debug set to 2) and I have to do this:
data))
{
$this->Classified->id = $id;
$this->data = $this->Classified->read();
}
else
{
$this->data['Classified']['otherfield'] = 'test';

$this->Classified->set($this->data);
if($this->Classified->validates()){


if($this->Classified->save($this->data['Classified'])){


}
}
}
}
...
}
?>
Filling the 'otherfield' before the Model::set()
I dont like this method, because I want validation before filling
other fields, and the set() method is required for validation.

How can I fill the other fields to save them after validation? (in
beforeSave?)
What changed about this in RC2?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to do two deep sorting on paginator?

2008-07-14 Thread leo

I want to sort on a two deep related table.

I have immoble [n:1] zona [n:1] localitat

>From the immobles controller, in the view I can do:
$paginator->sort(__('LOCALITAT_ID_GI_IMMOBLES',true), 'Zona.nom')

But what I want to do is:
$paginator->sort(__('LOCALITAT_ID_GI_IMMOBLES',true),
'Zona.Localitat.nom')

TIA
Leo


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread RichardAtHome

Back again...

Added the following to the save block of my edit function:

$this->Session->write("Auth", $this->data);

($this->data is provided by the User edit form)

Which fixed the problem but with a minor issue (which I can live with
for now).



On Jul 14, 2:57 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
> Thanks for the feedback everyone. I'll give it a try today and post
> back my results :-)
>
> On Jul 14, 1:33 pm, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
>
> > >  Anyone know how to refresh the user record? Is it simply a case of
> > >  setting the Auth Session User var?
>
> > Looking at the Auth source, it populates the key 'Auth.' .
> > $this->userModel, or Auth.User by default. You may want to try just
> > doing $this->Auth->login() again from the edit page (be sure to pass
> > it the username and (hashed?) password).
>
> > -js
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: MySQL Rand(), best PHP implementation

2008-07-14 Thread grigri

From an SQL point of view, this seems to be the best all-purpose
solution (for me) :

http://edrackham.com/featured/get-random-row-with-mysql-without-order-by-rand/

I haven't tried doing it in cake yet though

hth
grigri

On Jul 14, 4:29 pm, Spark <[EMAIL PROTECTED]> wrote:
>    As documented in MySQL manual, getting something random on a SQL
> call is dozens, hundreds of times slower than a common 'ORDER BY'.
> They even suggest using the language you are using (php, j2ee, .net)
> to achieve your goal.http://dev.mysql.com/doc/refman/5.0/en/select.html#c2161
>
>    I'd like to know other solutions, inside cakephp, to this problem..
> Which one is *the* solution.. should I care? cache that thing and live
> with it? :)
>
>   Spark
>
> --
> [livesets]http://djspark.com.br/
> [web]http://sydi.net
> [filmes]http://melhoresfilmes.com.br
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



MySQL Rand(), best PHP implementation

2008-07-14 Thread Spark

   As documented in MySQL manual, getting something random on a SQL
call is dozens, hundreds of times slower than a common 'ORDER BY'.
They even suggest using the language you are using (php, j2ee, .net)
to achieve your goal.
http://dev.mysql.com/doc/refman/5.0/en/select.html#c2161

   I'd like to know other solutions, inside cakephp, to this problem..
Which one is *the* solution.. should I care? cache that thing and live
with it? :)


  Spark


-- 
[livesets] http://djspark.com.br/
[web] http://sydi.net
[filmes] http://melhoresfilmes.com.br

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How can i filter Results so that only rows ( Records ) with a especific condition, like Result.is_final=1, are available for select.

2008-07-14 Thread PaulMan

Thanks Dave an Dardo.
Just that was such a simple feature, that i was looking to find it
through scaffold, maybe in future releases???
But both of you are correct, i will follow your advise.

Once Again,
Thank You


On Jul 14, 2:19 pm, DaveMahon <[EMAIL PROTECTED]> wrote:
> I think you want to look in the manual under Developing with CakePHP >
> Models > Retrieving your Data > find.
>
> http://manual.cakephp.org/view/449/find
>
> Then look at Developing with CakePHP > Controllers > Controller
> Methods > Interacting with Views > set
>
> http://manual.cakephp.org/view/427/set
>
> You should never edit the actual Cake libraries unless you are
> developing CakePHP itself.
>
> On Jul 13, 6:51 pm, PaulMan <[EMAIL PROTECTED]> wrote:
>
> > Done.. where's how:
> > New version of: class Event extends AppModel
> > {
> > var $name = 'Event';
> > var $displayField= 'description';
> > var $belongsTo=array('Pool','Result' => array(
> > 'className'=> 'Result',
> > 'conditions' => 'Result.is_final=1'
> > ));
>
> >  }
>
> > New Version of scaffold.php on line 311
> > foreach ($this->ScaffoldModel->belongsTo as $assocName => 
> > $assocData)
> > {
> > $varName = 
> > Inflector::variable(Inflector::pluralize(preg_replace('/
> > _id$/', '', $assocData['foreignKey'])));
> > $this->controller->set($varName, 
> > $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
> > }
> > foreach ($this->ScaffoldModel->hasAndBelongsToMany 
> > as $assocName =>
> > $assocData) {
> > $varName = 
> > Inflector::variable(Inflector::pluralize($assocName));
> > $this->controller->set($varName, 
> > $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
> > }
>
> > this way i can use params defined on var $belongsTo or
> > hasAndBelongsToMany ...
>
> > now the problem is... is this going to "f***" all the rest or is a
> > good hack?
>
> > On 13 Jul, 17:28, PaulMan <[EMAIL PROTECTED]> wrr ote:
>
> > > thank's for the quick reply,
> > > i already had read that articles, but i did no found the solution, the
> > > problem is on the "Edit" action for events, that's where i want to
> > > filter results, so that the final user can select a restrict options
> > > of results.
> > > Or maybe the solution is there and i'm too "newbie" blind to see, ???
> > > if this is true  please , sorry.
>
> > > lets put in another way:
> > > take a look at the debug query bellow , at Nr 8 i would like to have
> > > 8   SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > > `Result` WHERE Result.is_active = 1 7   7   0
>
> > > so this way on the edit action , Results select box will be only
> > > populated with Results that are active, not all of them.
>
> > > since i'm with scaffold , is this possible?
>
> > > Nr  Query   Error   AffectedNum. rows   Took (ms)
> > > 1   DESCRIBE `events`   8   8   2
> > > 2   DESCRIBE `pools`10  10  2
> > > 3   DESCRIBE `results`  6   6   2
> > > 4   DESCRIBE `bets` 6   6   2
> > > 5   DESCRIBE `users`10  10  2
> > > 6   SELECT COUNT(*) AS `count` FROM `events` AS `Event` WHERE
> > > `Event`.`id` = 11   1   1
> > > 7   SELECT `Event`.`id`, `Event`.`pool_id`, `Event`.`result_id`,
> > > `Event`.`description`, `Event`.`comment`, `Event`.`date`,
> > > `Event`.`created`, `Event`.`modified`, `Result`.`id`,
> > > `Result`.`is_final`, `Result`.`description`, `Result`.`value`,
> > > `Result`.`created`, `Result`.`modified`, `Pool`.`id`,
> > > `Pool`.`description`, `Pool`.`comment`, `Pool`.`number`, `Pool`.`open
> > > date`, `Pool`.`close date`, `Pool`.`active`, `Pool`.`season`,
> > > `Pool`.`created`, `Pool`.`modified` FROM `events` AS `Event` LEFT JOIN
> > > `results` AS `Result` ON (`Result`.`is_final`=1 AND
> > > `Event`.`result_id` = `Result`.`id`) LEFT JOIN `pools` AS `Pool` ON
> > > (`Event`.`pool_id` = `Pool`.`id`) WHERE `Event`.`id` = 1 LIMIT 1  
> > >   1   1
> > > 1
> > > 8   SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > > `Result` WHERE 1 = 17   7   0
> > > 9   SELECT `Pool`.`id`, `Pool`.`description` FROM `pools` AS `Pool`
> > > WHERE 1 = 1
>
> > > On 13 Jul, 16:36, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
>
> > > > Perhaps you should start reading 
> > > > here:http://book.cakephp.org/view/78/associations-linking-models-toandget
> > > > a grasp of models relations and how to specify conditions. Then you
> > > > can use bakehttp://book.cakephp.org/view/113/code-generation-with-bake
> > > > to materialize the scaffold code and start coding the application
> > > > logic
>

Re: How can i filter Results so that only rows ( Records ) with a especific condition, like Result.is_final=1, are available for select.

2008-07-14 Thread PaulMan

Thanks Dave an Dardo.
Just that was such a simple feature, that i was looking to find it
through scaffold, maybe in future releases???
But both of you are correct, i will follow your advise.

Once Again,
Thank You

On Jul 14, 2:19 pm, DaveMahon <[EMAIL PROTECTED]> wrote:
> I think you want to look in the manual under Developing with CakePHP >
> Models > Retrieving your Data > find.
>
> http://manual.cakephp.org/view/449/find
>
> Then look at Developing with CakePHP > Controllers > Controller
> Methods > Interacting with Views > set
>
> http://manual.cakephp.org/view/427/set
>
> You should never edit the actual Cake libraries unless you are
> developing CakePHP itself.
>
> On Jul 13, 6:51 pm, PaulMan <[EMAIL PROTECTED]> wrote:
>
> > Done.. where's how:
> > New version of: class Event extends AppModel
> > {
> > var $name = 'Event';
> > var $displayField= 'description';
> > var $belongsTo=array('Pool','Result' => array(
> > 'className'=> 'Result',
> > 'conditions' => 'Result.is_final=1'
> > ));
>
> >  }
>
> > New Version of scaffold.php on line 311
> > foreach ($this->ScaffoldModel->belongsTo as $assocName => 
> > $assocData)
> > {
> > $varName = 
> > Inflector::variable(Inflector::pluralize(preg_replace('/
> > _id$/', '', $assocData['foreignKey'])));
> > $this->controller->set($varName, 
> > $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
> > }
> > foreach ($this->ScaffoldModel->hasAndBelongsToMany 
> > as $assocName =>
> > $assocData) {
> > $varName = 
> > Inflector::variable(Inflector::pluralize($assocName));
> > $this->controller->set($varName, 
> > $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
> > }
>
> > this way i can use params defined on var $belongsTo or
> > hasAndBelongsToMany ...
>
> > now the problem is... is this going to "f***" all the rest or is a
> > good hack?
>
> > On 13 Jul, 17:28, PaulMan <[EMAIL PROTECTED]> wrr ote:
>
> > > thank's for the quick reply,
> > > i already had read that articles, but i did no found the solution, the
> > > problem is on the "Edit" action for events, that's where i want to
> > > filter results, so that the final user can select a restrict options
> > > of results.
> > > Or maybe the solution is there and i'm too "newbie" blind to see, ???
> > > if this is true  please , sorry.
>
> > > lets put in another way:
> > > take a look at the debug query bellow , at Nr 8 i would like to have
> > > 8   SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > > `Result` WHERE Result.is_active = 1 7   7   0
>
> > > so this way on the edit action , Results select box will be only
> > > populated with Results that are active, not all of them.
>
> > > since i'm with scaffold , is this possible?
>
> > > Nr  Query   Error   AffectedNum. rows   Took (ms)
> > > 1   DESCRIBE `events`   8   8   2
> > > 2   DESCRIBE `pools`10  10  2
> > > 3   DESCRIBE `results`  6   6   2
> > > 4   DESCRIBE `bets` 6   6   2
> > > 5   DESCRIBE `users`10  10  2
> > > 6   SELECT COUNT(*) AS `count` FROM `events` AS `Event` WHERE
> > > `Event`.`id` = 11   1   1
> > > 7   SELECT `Event`.`id`, `Event`.`pool_id`, `Event`.`result_id`,
> > > `Event`.`description`, `Event`.`comment`, `Event`.`date`,
> > > `Event`.`created`, `Event`.`modified`, `Result`.`id`,
> > > `Result`.`is_final`, `Result`.`description`, `Result`.`value`,
> > > `Result`.`created`, `Result`.`modified`, `Pool`.`id`,
> > > `Pool`.`description`, `Pool`.`comment`, `Pool`.`number`, `Pool`.`open
> > > date`, `Pool`.`close date`, `Pool`.`active`, `Pool`.`season`,
> > > `Pool`.`created`, `Pool`.`modified` FROM `events` AS `Event` LEFT JOIN
> > > `results` AS `Result` ON (`Result`.`is_final`=1 AND
> > > `Event`.`result_id` = `Result`.`id`) LEFT JOIN `pools` AS `Pool` ON
> > > (`Event`.`pool_id` = `Pool`.`id`) WHERE `Event`.`id` = 1 LIMIT 1  
> > >   1   1
> > > 1
> > > 8   SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > > `Result` WHERE 1 = 17   7   0
> > > 9   SELECT `Pool`.`id`, `Pool`.`description` FROM `pools` AS `Pool`
> > > WHERE 1 = 1
>
> > > On 13 Jul, 16:36, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
>
> > > > Perhaps you should start reading 
> > > > here:http://book.cakephp.org/view/78/associations-linking-models-toandget
> > > > a grasp of models relations and how to specify conditions. Then you
> > > > can use bakehttp://book.cakephp.org/view/113/code-generation-with-bake
> > > > to materialize the scaffold code and start coding the application
> > > > logic
>
>

Re: Basic help with render() function

2008-07-14 Thread Sir Tabs

Thanks Mark. The feedback is most helpful.

-John

On Jul 11, 12:26 pm, mark_story <[EMAIL PROTECTED]> wrote:
> On Jul 10, 12:52 pm, Sir Tabs <[EMAIL PROTECTED]> wrote:
>
> > Now I think I have the feel for the process: each action that is
> > called attempts, through automagic, torenderthe screen with it's
> > particular view file. If I use Ajax to call the particular action, and
> > use the 'update' option and specify a DOM item, then the action will
> >renderit's view code inside of this DOM item.
>
> > Is this best practice? Should I be worried that I'm essentially
> > inserting one view inside of another?
>
> I think it is a fine option.  Furthermore without javascript the form
> will submit to that page, and a full page will be rendered.
>
> As far as best practice when using cake, this is a perfectly suitable
> solution.  You are still keeping the separation of Models, View and
> Controllers.  Furthermore you are keeping each action separate, and
> focused.  Seems like a good solution to me.
>
> -Mark
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Good practice - Ajax action views?

2008-07-14 Thread Sir Tabs

Just a few follow-up questions.

> In case of ajax, a view can be considered as an element since there is
> no layout in it..

So, it's considered an "element" because of how it acts, but I should
still make a view file inside of my /views/action folder? As in, "/
views/action/ajaxUpdate.ctp"?

> Now, if you observe every single field on the form and make a server
> call everytine, it might get slow. Why not submit the complete form,
> validate all and render the form again (if error), you could also use
> javascript validation .. ?

The default behavior of cake's built-in validation system is just
this, right? It takes the submitted information, checks for errors,
and then refreshes the page with error messages if there were errors?

While I don't mind this system (it's quick, and built-in), I've always
liked the slick feel of pages that will tell you if entered incorrect
information while you are typing. I realize that this comes at a
server cost, but this is a fairly limited web app (used by two people
- for now).

> The basic of ajax is to update the Dom document using javascript. I
> have tried once to make an application 100% ajax, and it's a mistake..
> The dom somehow becomes heavier and slower .. So, a good complete HTML
> "refreshes and cleans" everything.
> If the ajax call updates the complete view except the layout, then
> better using classic html.

My ajax just updates a div next to an individual field, and not the
entire page. Also, from reading the documentation on ajax-
>observeField(), it seems that this method only gets called every
"interval" seconds AFTER the it detects that the field has been
changed. I would take this to mean that the method isn't constantly
calling the server.

Thanks for the response. I appreciate the feedback.
-John
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cake naming conventions

2008-07-14 Thread Sai Krishna

Really thanks Amit, validation works now

On Jul 14, 5:37 pm, "Amit Badkas" <[EMAIL PROTECTED]> wrote:
> 2008/7/14 Sai Krishna <[EMAIL PROTECTED]>:
>
>
>
> > Hi,
>
> > I've a small query. When I've a database table called
> > application_tools, how do I name cake controller, model files and
> > their respective classes. I tried most of naming permutation and
> > combinations, but I failed while doing cake model validation
>
> - The controller's name should be ApplicationToolsController (filename
> app/controllers/application_tools_controller.php) and the model's name
> should be ApplicationTool (filename app/models/application_tool.php)
>
> --
> Amit
>
> http://amitrb.wordpress.com/http://coppermine-gallery.net/http://cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CAKE PHP on BLUEHOST servers

2008-07-14 Thread JBMGT

Gonzalo,

I will get you that information.
RJ

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: overloading the HtmHelper

2008-07-14 Thread Jon Bennett

hi korcs,

> I would like to overload the 'selectTag' Method of the HtmlHelper with
> 1.1xx version of Cake.
>
> Does anyone have some elegant solution for this problem?
>
> My idea was to create a new helper that inherits from the HtmlHelper
> class, but actually I just want to change one function of the
> HtmlHelper without changing '/cake/libs'...

I would create a new helper that uses the Html helper, it's the
easiest route to take:

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

function selectTag()
{

}
}

hth

jon

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread RichardAtHome

Thanks for the feedback everyone. I'll give it a try today and post
back my results :-)

On Jul 14, 1:33 pm, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
> >  Anyone know how to refresh the user record? Is it simply a case of
> >  setting the Auth Session User var?
>
> Looking at the Auth source, it populates the key 'Auth.' .
> $this->userModel, or Auth.User by default. You may want to try just
> doing $this->Auth->login() again from the edit page (be sure to pass
> it the username and (hashed?) password).
>
> -js
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



overloading the HtmHelper

2008-07-14 Thread korcs

Hi Bakers,

I would like to overload the 'selectTag' Method of the HtmlHelper with
1.1xx version of Cake.

Does anyone have some elegant solution for this problem?

My idea was to create a new helper that inherits from the HtmlHelper
class, but actually I just want to change one function of the
HtmlHelper without changing '/cake/libs'...

Best

korcs
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: transaction

2008-07-14 Thread [EMAIL PROTECTED]

Check your table type?  See here: 
http://groups.google.com/group/cake-php/msg/58a5cf2597ba

On Jul 14, 12:59 am, . <[EMAIL PROTECTED]> wrote:
> i am using mysql
>
> On Sun, Jul 13, 2008 at 9:06 AM, Marcin Domanski <[EMAIL PROTECTED]> wrote:
>
> > Maybe your database doesnt support transactions ?
> > --
> > Marcin Domanski
> >http://kabturek.info
>
> > On Sun, Jul 13, 2008 at 10:39 AM, . <[EMAIL PROTECTED]> wrote:
> > > I have the following transaction, but even on errors, it does not
> > rollback.
> > > Why?
>
> > > $this->List->begin();
> > > $this->List->create();
> > > $this->data['List']['id']=1;
> > > ... do so more set up
> > > $this->List->save($this->data)
>
> > > if (...is okay...)
> > >     $this->List->commit();
> > > else
> > >     $this->List->rollback();
>
> > > do i have the right syntax? I manually force the $this->List->rollback()
> > to
> > > execute, but  I still see the record in the database. Why?
>
> > > Thanks
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to start new application with CAKE PHP

2008-07-14 Thread Bhaumik Prajapati

Keeo posted how to start new application with CAKE PHP

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with cake 1.2

2008-07-14 Thread Fahad

is your 'tmp' folder set to writable?

--
Fahad
http://frinity.blogspot.com

On Jul 14, 8:59 am, Tiago Curcio <[EMAIL PROTECTED]> wrote:
> I've intall cake1.2 but a error message appear:
>
> Notice (8): unserialize() [function.unserialize]: Argument is not a
> string [CORE/cake/libs/cache/file.php, line 184]
>
> Does some one know why?
>
> visit my url to see the problem:http://www.tiagocurcio.com/cake/
>
> thank's
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How can i filter Results so that only rows ( Records ) with a especific condition, like Result.is_final=1, are available for select.

2008-07-14 Thread DaveMahon

I think you want to look in the manual under Developing with CakePHP >
Models > Retrieving your Data > find.

http://manual.cakephp.org/view/449/find

Then look at Developing with CakePHP > Controllers > Controller
Methods > Interacting with Views > set

http://manual.cakephp.org/view/427/set

You should never edit the actual Cake libraries unless you are
developing CakePHP itself.

On Jul 13, 6:51 pm, PaulMan <[EMAIL PROTECTED]> wrote:
> Done.. where's how:
> New version of: class Event extends AppModel
> {
>     var $name = 'Event';
>         var $displayField= 'description';
>         var $belongsTo=array('Pool','Result' => array(
>             'className'    => 'Result',
>                         'conditions' => 'Result.is_final=1'
>         ));
>
>  }
>
> New Version of scaffold.php on line 311
>         foreach ($this->ScaffoldModel->belongsTo as $assocName => $assocData)
> {
>                                 $varName = 
> Inflector::variable(Inflector::pluralize(preg_replace('/
> _id$/', '', $assocData['foreignKey'])));
>                                 $this->controller->set($varName, 
> $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
>                         }
>                         foreach ($this->ScaffoldModel->hasAndBelongsToMany as 
> $assocName =>
> $assocData) {
>                                 $varName = 
> Inflector::variable(Inflector::pluralize($assocName));
>                                 $this->controller->set($varName, 
> $this->ScaffoldModel->{$assocName}->find('list',$assocData));
>
>                         }
>
> this way i can use params defined on var $belongsTo or
> hasAndBelongsToMany ...
>
> now the problem is... is this going to "f***" all the rest or is a
> good hack?
>
> On 13 Jul, 17:28, PaulMan <[EMAIL PROTECTED]> wrr ote:
>
> > thank's for the quick reply,
> > i already had read that articles, but i did no found the solution, the
> > problem is on the "Edit" action for events, that's where i want to
> > filter results, so that the final user can select a restrict options
> > of results.
> > Or maybe the solution is there and i'm too "newbie" blind to see, ???
> > if this is true  please , sorry.
>
> > lets put in another way:
> > take a look at the debug query bellow , at Nr 8 i would like to have
> > 8       SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > `Result` WHERE Result.is_active = 1             7       7       0
>
> > so this way on the edit action , Results select box will be only
> > populated with Results that are active, not all of them.
>
> > since i'm with scaffold , is this possible?
>
> > Nr      Query   Error   Affected        Num. rows       Took (ms)
> > 1       DESCRIBE `events`               8       8       2
> > 2       DESCRIBE `pools`                10      10      2
> > 3       DESCRIBE `results`              6       6       2
> > 4       DESCRIBE `bets`         6       6       2
> > 5       DESCRIBE `users`                10      10      2
> > 6       SELECT COUNT(*) AS `count` FROM `events` AS `Event` WHERE
> > `Event`.`id` = 1                1       1       1
> > 7       SELECT `Event`.`id`, `Event`.`pool_id`, `Event`.`result_id`,
> > `Event`.`description`, `Event`.`comment`, `Event`.`date`,
> > `Event`.`created`, `Event`.`modified`, `Result`.`id`,
> > `Result`.`is_final`, `Result`.`description`, `Result`.`value`,
> > `Result`.`created`, `Result`.`modified`, `Pool`.`id`,
> > `Pool`.`description`, `Pool`.`comment`, `Pool`.`number`, `Pool`.`open
> > date`, `Pool`.`close date`, `Pool`.`active`, `Pool`.`season`,
> > `Pool`.`created`, `Pool`.`modified` FROM `events` AS `Event` LEFT JOIN
> > `results` AS `Result` ON (`Result`.`is_final`=1 AND
> > `Event`.`result_id` = `Result`.`id`) LEFT JOIN `pools` AS `Pool` ON
> > (`Event`.`pool_id` = `Pool`.`id`) WHERE `Event`.`id` = 1 LIMIT 1            
> >     1       1
> > 1
> > 8       SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
> > `Result` WHERE 1 = 1            7       7       0
> > 9       SELECT `Pool`.`id`, `Pool`.`description` FROM `pools` AS `Pool`
> > WHERE 1 = 1
>
> > On 13 Jul, 16:36, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
>
> > > Perhaps you should start reading 
> > > here:http://book.cakephp.org/view/78/associations-linking-models-toandget
> > > a grasp of models relations and how to specify conditions. Then you
> > > can use bakehttp://book.cakephp.org/view/113/code-generation-with-bake
> > > to materialize the scaffold code and start coding the application
> > > logic
>
> > > On Sun, Jul 13, 2008 at 12:18 PM, PaulMan <[EMAIL PROTECTED]> wrote:
>
> > > > Hello Everyone,
> > > > Using Scaffold,
> > > > I Have a Model "Event" that belongsTo Result.
> > > > The Problem is when i edit an Event How can i filter Results so that
> > > > only rows ( Records ) with a especific condition, like
> > > > Result.is_final=1, are available for select.
>
> > > > class EventsController extends AppController {
> > > > var $name = 'Events';

Re: cake naming conventions

2008-07-14 Thread Amit Badkas
2008/7/14 Sai Krishna <[EMAIL PROTECTED]>:

>
> Hi,
>
> I've a small query. When I've a database table called
> application_tools, how do I name cake controller, model files and
> their respective classes. I tried most of naming permutation and
> combinations, but I failed while doing cake model validation
>
- The controller's name should be ApplicationToolsController (filename
app/controllers/application_tools_controller.php) and the model's name
should be ApplicationTool (filename app/models/application_tool.php)


-- 
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread Jonathan Snook

>  Anyone know how to refresh the user record? Is it simply a case of
>  setting the Auth Session User var?

Looking at the Auth source, it populates the key 'Auth.' .
$this->userModel, or Auth.User by default. You may want to try just
doing $this->Auth->login() again from the edit page (be sure to pass
it the username and (hashed?) password).

-js

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: this->redirect() deletes any variable set by using this->set() method.

2008-07-14 Thread RichardAtHome

...or put them in a session variable

On Jul 14, 9:57 am, CrazyDave <[EMAIL PROTECTED]> wrote:
> Keep in mind that when you redirect in PHP think of this as a new
> request and separate process.  As soon as you redirect you're exiting.
>
> Anything you want from this->set() you need to either pass or pass
> relevant information to do the $this->set() on the destination
> controller / action.
>
> On Jul 14, 12:20 am, Inam <[EMAIL PROTECTED]> wrote:
>
> > Hi everybody ..
> > I am using cakephp 1.1.19 currently . The problem i m having if i set
> > some variable using this->set() and then redirect to some page, the
> > variable is not available there. So what i want is to send some data
> > back to the redirected page. IN java this was achieved by
> > RequestDispacher which filled http response. Kindly guide me how to
> > achive the desired functionality in cakephp
> > Thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



cake naming conventions

2008-07-14 Thread Sai Krishna

Hi,

I've a small query. When I've a database table called
application_tools, how do I name cake controller, model files and
their respective classes. I tried most of naming permutation and
combinations, but I failed while doing cake model validation

Thank You
Sai Krishna



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: database convention

2008-07-14 Thread Dardo Sordi Bogado

> Thanks. I definitely want to go down the 'less cumbersome' road.

You're welcome. And then Cake is definetively what you're looking for.

> On Jul 14, 1:43 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
>> > Absolute noob here. I have a question about cakePhp database
>> > convention. From my understanding of the manual, every table requires
>> > a single attribute primary key.
>>
>> > So, in a table where you might normally have a composite key with two
>> > attributes, you should add an 'artificial identifier' as a single-
>> > attribute primary key for each tuple, and use that rather than the
>> > composite key.
>>
>> > Firstly, have I got that right?
>>
>> Yes, you got that right. For some people it sounds dirty but it
>> simplifies things a lot.
>>
>> > Secondly, do people tend to use AUTO INCREMENT a lot to implement such
>> > functionality in their databases?
>>
>> And yes again for the same reason. But it's no mandatory, you can set
>> the keys on your own and make your development more cumbersome.
>>
>> Also UUIDS are supported (and are great) as primary keys, you can set
>> the primary key to be char(36) and cake will take care of 
>> it:http://book.cakephp.org/complete/3/the-manual
>>
>>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How can i filter Results so that only rows ( Records ) with a especific condition, like Result.is_final=1, are available for select.

2008-07-14 Thread Dardo Sordi Bogado

Please, stop using scaffold for a real project and don't hack the core.

Scaffold is meant to be a helper for rapid prototyping, but when
you're done with that fase you need to build the real thing. Use the
bake shell to get controllers and views equivalent to those of the
scaffold and start editing those files.

On Sun, Jul 13, 2008 at 7:51 PM, PaulMan <[EMAIL PROTECTED]> wrote:
>
> Done.. where's how:
> New version of: class Event extends AppModel
> {
>var $name = 'Event';
>var $displayField= 'description';
>var $belongsTo=array('Pool','Result' => array(
>'className'=> 'Result',
>'conditions' => 'Result.is_final=1'
>));
>
>  }
>
> New Version of scaffold.php on line 311
>foreach ($this->ScaffoldModel->belongsTo as $assocName => $assocData)
> {
>$varName = 
> Inflector::variable(Inflector::pluralize(preg_replace('/
> _id$/', '', $assocData['foreignKey'])));
>$this->controller->set($varName, 
> $this->ScaffoldModel-
>>{$assocName}->find('list',$assocData));
>}
>foreach ($this->ScaffoldModel->hasAndBelongsToMany as 
> $assocName =>
> $assocData) {
>$varName = 
> Inflector::variable(Inflector::pluralize($assocName));
>$this->controller->set($varName, 
> $this->ScaffoldModel-
>>{$assocName}->find('list',$assocData));
>}
>
> this way i can use params defined on var $belongsTo or
> hasAndBelongsToMany ...
>
> now the problem is... is this going to "f***" all the rest or is a
> good hack?
>
> On 13 Jul, 17:28, PaulMan <[EMAIL PROTECTED]> wrr ote:
>> thank's for the quick reply,
>> i already had read that articles, but i did no found the solution, the
>> problem is on the "Edit" action for events, that's where i want to
>> filter results, so that the final user can select a restrict options
>> of results.
>> Or maybe the solution is there and i'm too "newbie" blind to see, ???
>> if this is true  please , sorry.
>>
>> lets put in another way:
>> take a look at the debug query bellow , at Nr 8 i would like to have
>> 8   SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
>> `Result` WHERE Result.is_active = 1 7   7   0
>>
>> so this way on the edit action , Results select box will be only
>> populated with Results that are active, not all of them.
>>
>> since i'm with scaffold , is this possible?
>>
>> Nr  Query   Error   AffectedNum. rows   Took (ms)
>> 1   DESCRIBE `events`   8   8   2
>> 2   DESCRIBE `pools`10  10  2
>> 3   DESCRIBE `results`  6   6   2
>> 4   DESCRIBE `bets` 6   6   2
>> 5   DESCRIBE `users`10  10  2
>> 6   SELECT COUNT(*) AS `count` FROM `events` AS `Event` WHERE
>> `Event`.`id` = 11   1   1
>> 7   SELECT `Event`.`id`, `Event`.`pool_id`, `Event`.`result_id`,
>> `Event`.`description`, `Event`.`comment`, `Event`.`date`,
>> `Event`.`created`, `Event`.`modified`, `Result`.`id`,
>> `Result`.`is_final`, `Result`.`description`, `Result`.`value`,
>> `Result`.`created`, `Result`.`modified`, `Pool`.`id`,
>> `Pool`.`description`, `Pool`.`comment`, `Pool`.`number`, `Pool`.`open
>> date`, `Pool`.`close date`, `Pool`.`active`, `Pool`.`season`,
>> `Pool`.`created`, `Pool`.`modified` FROM `events` AS `Event` LEFT JOIN
>> `results` AS `Result` ON (`Result`.`is_final`=1 AND
>> `Event`.`result_id` = `Result`.`id`) LEFT JOIN `pools` AS `Pool` ON
>> (`Event`.`pool_id` = `Pool`.`id`) WHERE `Event`.`id` = 1 LIMIT 1 
>>1   1
>> 1
>> 8   SELECT `Result`.`id`, `Result`.`description` FROM `results` AS
>> `Result` WHERE 1 = 17   7   0
>> 9   SELECT `Pool`.`id`, `Pool`.`description` FROM `pools` AS `Pool`
>> WHERE 1 = 1
>>
>> On 13 Jul, 16:36, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
>>
>> > Perhaps you should start reading 
>> > here:http://book.cakephp.org/view/78/associations-linking-models-toandget
>> > a grasp of models relations and how to specify conditions. Then you
>> > can use bakehttp://book.cakephp.org/view/113/code-generation-with-bake
>> > to materialize the scaffold code and start coding the application
>> > logic
>>
>> > On Sun, Jul 13, 2008 at 12:18 PM, PaulMan <[EMAIL PROTECTED]> wrote:
>>
>> > > Hello Everyone,
>> > > Using Scaffold,
>> > > I Have a Model "Event" that belongsTo Result.
>> > > The Problem is when i edit an Event How can i filter Results so that
>> > > only rows ( Records ) with a especific condition, like
>> > > Result.is_final=1, are available for select.
>>
>> > > class EventsController extends AppController {
>> > > var $name = 'Events';
>> > > var $components=array("auth");
>> > >  var $scaffold;
>> > > }
>>
>> > > class Event extends AppModel
>> > > {

Re: phpThumb Helper

2008-07-14 Thread the_woodsman

Sounds awesome - you sure that link works?

On Jul 14, 12:56 am, DanielMedia <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Just added an article to the bakery. Its a phpThumb helper with cache
> support for 1.2:
>
> http://bakery.cakephp.org/articles/view/phpthumb-helper-2
>
> Hope someone finds some use in it.
>
> - Dan
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with layout error message

2008-07-14 Thread .
It seems to happen in IE7, but not Firefox. hmm..

On Mon, Jul 14, 2008 at 3:41 AM, . <[EMAIL PROTECTED]> wrote:

> i seem to be getting this same error message every now and then. Even on my
> live test server... Anyone has seen this error? Array.ctp view cannot be
> found?
>
>
> On Fri, Jul 11, 2008 at 1:44 AM, Marc MENDEZ <[EMAIL PROTECTED]>
> wrote:
>
>>
>> Absolutely no idea, and it may be hard to find why since this kind of
>> behavior is difficult to reproduce
>>
>> Happy it works again !
>>
>>
>> . a écrit :
>> > I just restarted the Apache server and mysql server, and it worked! I
>> > am still curious why this though. Any ideas? I am using XAMPP.
>> >
>> > On Fri, Jul 11, 2008 at 1:12 AM, . <[EMAIL PROTECTED]
>> > > wrote:
>> >
>> > This seems to happen in all of my controllers where the view has a
>> > form submit. after I submit the form (any form) i get this error.
>> >
>> >
>> > On Fri, Jul 11, 2008 at 1:07 AM, . <[EMAIL PROTECTED]
>> > > wrote:
>> >
>> > Hi
>> >
>> > I do not have a var $layout or any setLayout in the controller.
>> >
>> > The wierd thing is this was working just yesterday...
>> >
>> >
>> >
>> > On Fri, Jul 11, 2008 at 1:00 AM, Marc MENDEZ
>> > <[EMAIL PROTECTED] >
>> > wrote:
>> >
>> >
>> > Hi,
>> >
>> > Look in the controller containing the action which raised
>> > this error, if
>> > you don't use a $layout variable or call setLayout() ?
>> >
>> >
>> >
>> > . a écrit :
>> > > I am not referring to any Array.ctp whatsoever. Why do I
>> > get this
>> > > error? Thanks
>> > >
>> > > On Fri, Jul 11, 2008 at 12:42 AM, . <[EMAIL PROTECTED]
>> > 
>>  > > >>
>> wrote:
>> > >
>> > > I need help with this error message please. I do not
>> > have any
>> > > Array.ctp layout file. Why am I getting this all of
>> > a sudden?
>> > >
>> > >
>> > >
>> > > Missing Layout
>> > >
>> > > *Error: *The layout file
>> > > /C:\xampp\htdocs\app\views\layouts\Array.ctp/ can
>> > not be found or
>> > > does not exist.
>> > >
>> > > *Error: *Confirm you have created the file:
>> > > /C:\xampp\htdocs\app\views\layouts\Array.ctp/
>> > >
>> > > *Notice: *If you want to customize this error
>> > message, create
>> > > app\views\errors\missing_layout.ctp
>> > >
>> > >
>> > >
>> > > >
>> >
>> >
>> >
>> >
>> >
>> >
>> > >
>>
>>
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with layout error message

2008-07-14 Thread .
i seem to be getting this same error message every now and then. Even on my
live test server... Anyone has seen this error? Array.ctp view cannot be
found?

On Fri, Jul 11, 2008 at 1:44 AM, Marc MENDEZ <[EMAIL PROTECTED]>
wrote:

>
> Absolutely no idea, and it may be hard to find why since this kind of
> behavior is difficult to reproduce
>
> Happy it works again !
>
>
> . a écrit :
> > I just restarted the Apache server and mysql server, and it worked! I
> > am still curious why this though. Any ideas? I am using XAMPP.
> >
> > On Fri, Jul 11, 2008 at 1:12 AM, . <[EMAIL PROTECTED]
> > > wrote:
> >
> > This seems to happen in all of my controllers where the view has a
> > form submit. after I submit the form (any form) i get this error.
> >
> >
> > On Fri, Jul 11, 2008 at 1:07 AM, . <[EMAIL PROTECTED]
> > > wrote:
> >
> > Hi
> >
> > I do not have a var $layout or any setLayout in the controller.
> >
> > The wierd thing is this was working just yesterday...
> >
> >
> >
> > On Fri, Jul 11, 2008 at 1:00 AM, Marc MENDEZ
> > <[EMAIL PROTECTED] >
> > wrote:
> >
> >
> > Hi,
> >
> > Look in the controller containing the action which raised
> > this error, if
> > you don't use a $layout variable or call setLayout() ?
> >
> >
> >
> > . a écrit :
> > > I am not referring to any Array.ctp whatsoever. Why do I
> > get this
> > > error? Thanks
> > >
> > > On Fri, Jul 11, 2008 at 12:42 AM, . <[EMAIL PROTECTED]
> > 
>  > > >>
> wrote:
> > >
> > > I need help with this error message please. I do not
> > have any
> > > Array.ctp layout file. Why am I getting this all of
> > a sudden?
> > >
> > >
> > >
> > > Missing Layout
> > >
> > > *Error: *The layout file
> > > /C:\xampp\htdocs\app\views\layouts\Array.ctp/ can
> > not be found or
> > > does not exist.
> > >
> > > *Error: *Confirm you have created the file:
> > > /C:\xampp\htdocs\app\views\layouts\Array.ctp/
> > >
> > > *Notice: *If you want to customize this error
> > message, create
> > > app\views\errors\missing_layout.ctp
> > >
> > >
> > >
> > > >
> >
> >
> >
> >
> >
> >
> > >
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange problem --> Missing table

2008-07-14 Thread Bo ozz

Never mind... the database structure was cached, clearing the cache
solved the problem!

On 14 jul, 12:18, Bo ozz <[EMAIL PROTECTED]> wrote:
> Cake keeps showing me this error message:
>
> -
> Missing Database Table
>
> Error: Database table albums for model Album was not found.
>
> Notice: If you want to customize this error message, create app/views/
> errors/missing_table.ctp
>
> --
>
> Pretty self-explanatory you would say, but the table does exist!!
>
> I've tried troubleshooting this, but the following code in my model
> does show my records in that table:
>
> --
> 
> class Album extends AppModel {
>         function Album() {
>                 mysql_connect('localhost','***','***');
>                 mysql_select_db('***');
>                 $result = mysql_query('SELECT * FROM albums');
>                 print_r(mysql_fetch_assoc($result));
>                 die();
>         }
>     //var $name = 'Album';
>         //var $hasMany = array('Foto');
>
> }
>
> ?>
>
> 
>
> Any thoughts??
>
> thanks!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



strange problem --> Missing table

2008-07-14 Thread Bo ozz

Cake keeps showing me this error message:

-
Missing Database Table

Error: Database table albums for model Album was not found.

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

--

Pretty self-explanatory you would say, but the table does exist!!

I've tried troubleshooting this, but the following code in my model
does show my records in that table:

--




Any thoughts??

thanks!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Long load time

2008-07-14 Thread TomT

Sorry for the late reaction.
It occurs when i haven't used the application for a couple of hours
Debuglevel was 2, but also with a debuglevel of 0 the long loadtime
occours.
Yes i think all the default folders are present:
cache
logs
sessions
tests

It is writable

On 4 jul, 14:52, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> When does this occur? After the cake update?
>
> What is the debug level of your app?
>
> Do you have all the default folders present in the ~/app/temp folder?
> Is it world-writable?
>
> Ah, questions.. :-)
>
> On Jul 4, 10:21 am,TomT<[EMAIL PROTECTED]> wrote:
>
>
>
> > When create a simple controller with one method and a view with the
> > text "test" and go to the URL it takes 4 seconds for cakephp to
> > respond and to show the output.
> > When I press refresh it takes 0.2 seconds.
>
> > The webservers load is around the 0.2
>
> > Why does is takes so long ?- Tekst uit oorspronkelijk bericht niet 
> > weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread AD7six



On Jul 14, 11:12 am, RichardAtHome <[EMAIL PROTECTED]> wrote:
> Yes, but that 1% where it IS needed is critical ;-)

Why build something into a framework that does nothing (except soak up
cycles) 99% of the time - and only might, for a few users, be useful.

Why not try debug ($this->Session->read('Auth')); die; Quickly
followed by some user read/session write action.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread RichardAtHome

Yes, but that 1% where it IS needed is critical ;-)

I agree that a refresh method would be useful, and if present would
allow me to add it to the App Controller to get the effect I'm after.
That way everyone is happy :-)

Anyone know how to refresh the user record? Is it simply a case of
setting the Auth Session User var?

On Jul 14, 9:58 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 14, 10:24 am, RichardAtHome <[EMAIL PROTECTED]> wrote:
>
> > How can this be the preferred behaviour?
>
> > What do you do if you get a 'bad' user? Even if you delete his user
> > record you are helpless to stop him until he voluntarily logs out!
>
> > Or, what if you have a regular user who needs his 'role' changing?
>
> > Granted, profile edits and changes in roles are required less often,
> > but the security issue alone is enough to warant a refresh on every
> > page. A quick read of the database is hardly going to kill the system.
>
> And is, as Jonathan Snook pointed out, needless 99% of the time.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: method to re-fetch page from server

2008-07-14 Thread CrazyDave

Checkout the $this->disableCache(); in your controllers.

See 
http://api.cakephp.org/class_controller.html#6d3203caba0410d7f86e1740c12dfe40
and http://api.cakephp.org/libs_2controller_2controller_8php-source.html#l00771

On Jul 14, 8:02 am, . <[EMAIL PROTECTED]> wrote:
> anyone have any idea how facebook handles their back button/ forward button/
> refresh? the pages are always re-fetched from the server. I have tried the
> following but doesn't work. how would you clear the post data ? is there a
> way to do this in cake or in php in general?
>
>  
>  
>  
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread AD7six



On Jul 14, 10:24 am, RichardAtHome <[EMAIL PROTECTED]> wrote:
> How can this be the preferred behaviour?
>
> What do you do if you get a 'bad' user? Even if you delete his user
> record you are helpless to stop him until he voluntarily logs out!
>
> Or, what if you have a regular user who needs his 'role' changing?
>
> Granted, profile edits and changes in roles are required less often,
> but the security issue alone is enough to warant a refresh on every
> page. A quick read of the database is hardly going to kill the system.

And is, as Jonathan Snook pointed out, needless 99% of the time.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: this->redirect() deletes any variable set by using this->set() method.

2008-07-14 Thread CrazyDave

Keep in mind that when you redirect in PHP think of this as a new
request and separate process.  As soon as you redirect you're exiting.

Anything you want from this->set() you need to either pass or pass
relevant information to do the $this->set() on the destination
controller / action.

On Jul 14, 12:20 am, Inam <[EMAIL PROTECTED]> wrote:
> Hi everybody ..
> I am using cakephp 1.1.19 currently . The problem i m having if i set
> some variable using this->set() and then redirect to some page, the
> variable is not available there. So what i want is to send some data
> back to the redirected page. IN java this was achieved by
> RequestDispacher which filled http response. Kindly guide me how to
> achive the desired functionality in cakephp
> Thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL with multi-group membership?

2008-07-14 Thread CrazyDave

Hi,

I want to use the ACL component in CakePHP and have got things up and
running thanks to some blog posts by Mark Story and LemonCake.  I do
have a query about the ACL and if it's capable of users belong to
multiple groups?

I found two previous posts on the subject:

http://groups.google.com/group/cake-php/browse_thread/thread/2c219ca590789960/e13d168d0f86b49b?lnk=gst&q=ACL+multiple&rnum=1#e13d168d0f86b49b

http://groups.google.com/group/cake-php/browse_thread/thread/633e56e4a79c31fd

Both state that this isn't possible with CakePHP's ACL, has this
changed or will this ever change?

For example (taken from phpgacl) something like this where Han is a
member of two groups.

Default: DENY ALL
  Millennium Falcon Passengers
|-Crew [ALLOW: ALL]
| |-Han
| |-Chewie [DENY: Engines]
|-Passengers [ALLOW: Lounge]
| |-Jedi [ALLOW: Cockpit]
| | |-Obi-wan
| | |-Luke [ALLOW: Guns]
| |-R2D2
| |-C3PO
|-Engineers [ALLOW: Engines, Guns]
  |-Han
  |-R2D2

Thanks,
Dave
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->Auth->user not refreshing after edit

2008-07-14 Thread RichardAtHome

How can this be the preferred behaviour?

What do you do if you get a 'bad' user? Even if you delete his user
record you are helpless to stop him until he voluntarily logs out!

Or, what if you have a regular user who needs his 'role' changing?

Granted, profile edits and changes in roles are required less often,
but the security issue alone is enough to warant a refresh on every
page. A quick read of the database is hardly going to kill the system.

On Jul 14, 2:50 am, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
> On 7/13/08, RichardAtHome <[EMAIL PROTECTED]> wrote:
>
> >  It looks like the Users model is only being read once at login and the
> >  details stored in a session (not checked the cake code, but that would
> >  match the behaviour I am experiencing).
>
> >  Basically, the edit is working (ie, database gets updated), but the
> >  $this->Auth->user() isn't.
>
> I contend that this is the preferred behaviour. Refreshing the user
> object stored in the session is unnecessary on 99% of the page views
> (I suspect most users don't edit their profiles on a regular basis).
>
> I suspect that it's just a simple storing of the current user in the
> session (in Session->read('User')) but it'd be nice to have an
> Auth->refreshSession() method that would refresh the current user in
> the session. Maybe submit a ticket for that...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to access other models from non parent controller

2008-07-14 Thread duRqoo

Well usually in controller you work only with default model for the
controller binded by conventions and its related models, but  in some
situation you would like to create a dummy controller which is not
using any model, or attach a non-related models for using in the
controller. There is where a $uses variable comes handy.

d.

On 14. Júl, 03:18 h., ビシャルfrom Nepal <[EMAIL PROTECTED]> wrote:
> Thank You very much for your help. It really worked for me. Anyways I
> was thinking why was cakephp using this $uses when other similar
> frameworks like Rails doesnt impose such syntax.
>
> On Jul 13, 3:18 am, duRqoo <[EMAIL PROTECTED]> wrote:
>
> > Hey,
>
> > you need to tell C1 to use M2 model using the $uses public attribute
> > of controller, which is an array of class names of models that a
> > certain controller will use. So in this case just add var $uses =
> > array('M2'); to your C1 controller.
>
> > If Models are somehow related to each other you dont need to include
> > them using $uses variable, just touch the related model through
> > default controller model. Like $this->M1->M2->find(...);
>
> > Hope that helps.
> > d.
>
> > On 12. Júl, 05:08 h., ビシャルfrom Nepal <[EMAIL PROTECTED]> wrote:
>
> > > Suppose we have two controllers C1 and C2, Similarly M2 is the
> > > corresponding models to controller C2.Controller C1 is not using any
> > > models. How should I fetch table rows from M2 remaining in controller
> > > C1.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with cake 1.2

2008-07-14 Thread Tiago Curcio

I've intall cake1.2 but a error message appear:

Notice (8): unserialize() [function.unserialize]: Argument is not a
string [CORE/cake/libs/cache/file.php, line 184]

Does some one know why?

visit my url to see the problem:
http://www.tiagocurcio.com/cake/


thank's

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



this->redirect() deletes any variable set by using this->set() method.

2008-07-14 Thread Inam

Hi everybody ..
I am using cakephp 1.1.19 currently . The problem i m having if i set
some variable using this->set() and then redirect to some page, the
variable is not available there. So what i want is to send some data
back to the redirected page. IN java this was achieved by
RequestDispacher which filled http response. Kindly guide me how to
achive the desired functionality in cakephp
Thanks.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to access other models from non parent controller

2008-07-14 Thread ビシャルfrom Nepal

Thank You very much for your help. It really worked for me. Anyways I
was thinking why was cakephp using this $uses when other similar
frameworks like Rails doesnt impose such syntax.

On Jul 13, 3:18 am, duRqoo <[EMAIL PROTECTED]> wrote:
> Hey,
>
> you need to tell C1 to use M2 model using the $uses public attribute
> of controller, which is an array of class names of models that a
> certain controller will use. So in this case just add var $uses =
> array('M2'); to your C1 controller.
>
> If Models are somehow related to each other you dont need to include
> them using $uses variable, just touch the related model through
> default controller model. Like $this->M1->M2->find(...);
>
> Hope that helps.
> d.
>
> On 12. Júl, 05:08 h., ビシャルfrom Nepal <[EMAIL PROTECTED]> wrote:
>
> > Suppose we have two controllers C1 and C2, Similarly M2 is the
> > corresponding models to controller C2.Controller C1 is not using any
> > models. How should I fetch table rows from M2 remaining in controller
> > C1.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



method to re-fetch page from server

2008-07-14 Thread .
anyone have any idea how facebook handles their back button/ forward button/
refresh? the pages are always re-fetched from the server. I have tried the
following but doesn't work. how would you clear the post data ? is there a
way to do this in cake or in php in general?

 
 
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---