Re: Get rid of render time in ajax response

2010-06-10 Thread nurvzy
Set Configure::write('debug', 0); in layouts/ajax.ctp before
content_for_layout.

That way all ajax calls are rendered with debug 0 regardless of the
actual app debug.

HTH,
Nick

On Jun 10, 9:37 pm, Roland Pish  wrote:
> Hi!
>
> I'm doing some ajax calls and I realized that cakephp is appending the
> render time to the ajax response; something like: 
> I set debug to 2 because I'm in the development phase. I assume that
> setting debug to 0 gets rid of the render time, but, keeping the debug
> set to 2 is there some way to get rid of this render time?
>
> Thanks in advance

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

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


Re: URL is showing wrong

2010-06-10 Thread Jeremy Burns | Class Outfit
I just had some problems getting Cake to run on a new MacBook Pro I bought this 
week . I didn't want to install MAMP; I enabled PHP and 
installed MySQL. I went through all the published steps to get Apache to play 
nice, but I was not getting any CSS or images.

I stumbled across this article which contained something that I hadn't thought 
of before, and it suddenly burst into life. It *could* help you?

In my httpd.conf file I had this section:


Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all


...which I thought was enough. Following advice in that article I changed the 
first line to:



...and it all sprang into life (note the */ at the end).

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 11 Jun 2010, at 01:45, Davor Ilic wrote:

> sry for my bad english. i hope you did understand me... also it is hard to 
> understand you what you meen somtimes but google translate helps a little 
> bit. 
> 
> i´ve try to change now something and it didn´t work...  i realy don´t know 
> what i have done to get this issue. but i know that i only create 
> controllers, views and models nothing else... and also chane the route to my 
> path i´d liketo have
> 
> 2010/6/10 Davor Ilic 
> I didn´t turn it off i´ve only changed in the core the Salt security values 
> for sha1 and numbvalues nothing else.
> 
> I´ve tested it. if i use the url like this: http://my.site/clients/add_client 
> it also work. Hm the html->link is only showing like this but htaccess is 
> working well if i try the link it can be that i´ve only have this issue.
> 
> lg,
> 
> Davor 
> 
> 
> 2010/6/9 Dr. Loboto 
> 
> Did you study cakebook link? You need:
> 
> 1) mod_rewrite installed and enabled;
> 2) AllowOverride set to All for your site dir;
> 3) .htaccess files must exist, be valid (unchanged rewrite section
> actually), and be accessible by webserver (on *nix wrong rights
> prevent it).
> 
> Also there can be problem with alias if you use it. And finally you
> can try to point DocumentRoot to app/webroot instead of root folder.
> 
> But I still think that or you have mod_rewrite not working for your
> site OR you turned off pretty URLs in core.php
> 
> On Jun 9, 5:16 pm, Davor Ilic  wrote:
> > it is enabled i also worked with it and cake wouldn´t show me a correct page
> > with this
> >
> > url:http://my.site/*app/webroot/index.php/*clients/add_client
> >
> > it have to be anything else. perhaps it have something to do with the
> > route.php or the .htaccess isn´t done well
> >
> > 2010/6/9 Dr. Loboto 
> >
> >
> >
> > > You need mod_rewrite enabled.
> >
> > >http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess
> >
> > > On Jun 7, 12:40 am, Davor Ilic  wrote:
> > > > Hi,
> >
> > > > my url is this:http://my.site/*app/webroot/index.php/*clients/add_client
> >
> > > > why is it like this it change after time but can´t say i´ve changed
> > > > something.
> >
> > > > i wont to show the link like this with "$html->link()" :
> > >http://my.site/clients/add_client
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com > >  om>For more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
> 
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Forms and Descriptions

2010-06-10 Thread Jeremy Burns | Class Outfit
Just for completeness, there are five options that are potential descriptors:
- label
- before
- between (comes between the label and input)
- separator
- after

http://book.cakephp.org/view/1393/options-before-options-between-options-separator-a

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 23:28, Chris Hanson wrote:

> ye know about label just wasnt sure on after lol thanks :D
> 
> On 10 June 2010 17:15, Flavia Missi  wrote:
>> Hi!
>> 
>> You can define a label for the input too, look like this:
>> 
>> $form->input('input_name', array('label'=>'label name',
>> 'after'=>'description for input'));
>> 
>> Sorry if I wrote something wrong, I'm brazilian! ^^
>> 
>> Hope it helps...
>> 
>> 2010/6/10 phpcoder2...@googlemail.com 
>>> 
>>> cheers Jeremy! you seem to reply to everyone's issues :D lol thanks!
>>> 
>>> On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
>>>  wrote:
 User the 'after' option and then apply css:
 
 echo $this->Form->input(
 'field_name',
 array(
 'after' => 'Your description...'
 )
 );
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.comhttp://www.classoutfit.com
 
 On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
 
 
 
> Hey guys building a form and not sure how to go about adding
> descriptions to each input, from what ive seen there is no description
> option in the $form->input(); does anyone know of a simple way to
> achieve this?
 
> thanks
 
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others with their CakePHP related questions.
 
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this
> group athttp://groups.google.com/group/cake-php?hl=en
>>> 
>>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>>> with their CakePHP related questions.
>>> 
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php?hl=en
>> 
>> 
>> 
>> --
>> Flàvia Missi
>> 
>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>> with their CakePHP related questions.
>> 
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>> 
> 
> 
> 
> -- 
> Kind Regards Chris
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Get rid of render time in ajax response

2010-06-10 Thread Roland Pish
Hi!

I'm doing some ajax calls and I realized that cakephp is appending the
render time to the ajax response; something like: 
I set debug to 2 because I'm in the development phase. I assume that
setting debug to 0 gets rid of the render time, but, keeping the debug
set to 2 is there some way to get rid of this render time?

Thanks in advance

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

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


Re: validation rules

2010-06-10 Thread Dr. Loboto
Of course you get syntax error. Only constants can be used in class
definition.

You can overload model constructor and setup $validate there.

On Jun 11, 8:22 am, Dmitry Shevchenko  wrote:
> Hi
> Did someone tried to create a array for the "inList" validation and
> then use it?
> for example
>  var $test = array('one_day', 'five_days','never');
>
>         var $validate = array(
>                 'ty_id' => array('numeric'),
>                 'date_arr' => array('allowed_data' => array(
>                             'rule' => array('inList',  $test),
>                             'message'    => 'Wrong data',
>                             'allowEmpty' => false)
>                           ),
>                 );
>
> When I'm try to use this construction . I'm getting a syntax error
>
> Thanks

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

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


Re: Speed and performance

2010-06-10 Thread Dr. Loboto
If you think that problem is in models loading, get rid of persistent
associations and create them on the fly. Same for using models in
controllers - empty $uses and $this->loadModel()

On Jun 11, 2:00 am, "Alan Asher"  wrote:
> I am dealing with a site that is probably larger than had originally been
> thought of when the designers made CakePHP.  I have already invested 4
> months in development and now that I have a user base it bogs down a lot
> when about 5 users get on at the same time.  I'm hoping to have thousands of
> users on at the same time.
>
> I have set up cache to cache most of the layout since it doesn't change but
> from day to day or every two minutes.  I'm using file cache and wonder if it
> would help switching to APC.  I have an ubuntu server that I control
> completely and have already taken the initial steps to install APC, but I
> haven't converted my cache config to use it yet.
>
> I see a problem with the amount of recursion in the models classes.  I'm
> using the "contains" on ALL of my queries so that the queries run faster,
> but I think that when cake loads the models and all it's recursions, it
> takes forever since I have 88 tables that all relate to the user some how.
>
> Does anyone have suggestions?
>
> Alan

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

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


Is there something(like a toolkit) to reveal unused variable or method within model in cakephp?

2010-06-10 Thread ytbryan
Is there something(like a toolkit) to reveal unused variable or method
within model in cakephp?

Thanks!

Bryan

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

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


Re: Installing another application inside my CakePHP 1.3 app

2010-06-10 Thread saavedrajj
Hi! Thanks for your reply.

With the domain manager I configured 3 subdomains:
blog  cuponear com => folder: /blog
foro  cuponear com => folder: /foro
openx cuponear com => folder: /openx

Inside each folder (blog, foro, openx) there is a phpinfo.php file for
testing:
blog  cuponear com / phpinfo.php
foro  cuponear com / phpinfo.php
openx cuponear com / phpinfo.php

But a 500 Internal Server Error appears...

***
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, supp...@supportwebsite.com
and inform them of the time the error occurred, and anything you might
have done that may have caused the error.

More information about this error may be available in the server error
log.

***

Any suggestions?


*Remember that I have an godaddy shared linux hosting account


On Jun 10, 2:57 pm, saavedrajj  wrote:
> which one for example?
>
> On Jun 10, 4:28 am, Bharadwaj Parthasarathy 
> wrote:
>
> > This may not be the ideal choice, but consider using a sub domain  
> > [forum.mycakeapp.com] and have it pick up from a separate folder.
>
> > On a totally different note, IMHO godaddy sucks big time. Try getting  
> > a better host, which supports easy domain and sub domain redirection.
>
> > - Bharadwajhttp://webhostingangel.com
>
> > On 10-Jun-10, at 3:20 AM, Jeremy Burns | Class Outfit wrote:
>
> > > The way I have done this in the past is to put the forum folder  
> > > inside webroot and set up a subdomain, pointing the subdomain at the  
> > > webroot/forum folder. It works fine (I have done it with phpBB3).
>
> > > Jeremy Burns
> > > Class Outfit
>
> > > jeremybu...@classoutfit.com
> > >http://www.classoutfit.com
>
> > > On 10 Jun 2010, at 04:24,saavedrajjwrote:
>
> > >> Hi, I have a trouble on my godaddy shared linux hosting account.
>
> > >> I want to install a PHP forum (phpBB3) in a /forum folder *
>
> > >> -app
> > >> -cake
> > >> -forum *
> > >> -plugins
> > >> -vendors
>
> > >> and I want to access this forum using this url:
> > >>http://www.MyCakeApp.com/forum
>
> > >> but, of course, the following error appears:
> > >> Missing Controller
> > >> Error:  ForumController could not be found.
>
> > >> Then I upload the forum folder at
> > >> -app/webroot/forum
> > >> BUT after the installation, these long url appears:
> > >>http://www.MyCakeApp.com/app/webroot/forum/www/index.php
>
> > >> I don't want the "app/webroot" string in the url.
>
> > >> Somody can help me?
>
> > >> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp  
> > >> others with their CakePHP related questions.
>
> > >> You received this message because you are subscribed to the Google  
> > >> Groups "CakePHP" group.
> > >> To post to this group, send email to cake-php@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> cake-php+unsubscr...@googlegroups.com For more options, visit this  
> > >> group athttp://groups.google.com/group/cake-php?hl=en
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp  
> > > others with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google  
> > > Groups "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this  
> > > group athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: Speed and performance

2010-06-10 Thread bdwilton
I'd suggest you look at DebugKit to see if you have a bottle neck 
somewhere in your code.  Also check the performance of your machine, if 
its a virtual box you may be lacking memory or resources.


Brett.


http://wiltonsoftware.com


On 11/06/2010 7:00 a.m., Alan Asher wrote:


I am dealing with a site that is probably larger than had originally 
been thought of when the designers made CakePHP.  I have already 
invested 4 months in development and now that I have a user base it 
bogs down a lot when about 5 users get on at the same time.  I'm 
hoping to have thousands of users on at the same time.


I have set up cache to cache most of the layout since it doesn't 
change but from day to day or every two minutes.  I'm using file cache 
and wonder if it would help switching to APC.  I have an ubuntu server 
that I control completely and have already taken the initial steps to 
install APC, but I haven't converted my cache config to use it yet.


I see a problem with the amount of recursion in the models classes.  
I'm using the "contains" on ALL of my queries so that the queries run 
faster, but I think that when cake loads the models and all it's 
recursions, it takes forever since I have 88 tables that all relate to 
the user some how.


Does anyone have suggestions?

Alan




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

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


Re: can i use html5 in cakephp?

2010-06-10 Thread Andy Dirnberger
I realize that they've fallen behind, but you originally said 2022,
which is a bit further away than 2012.

On Jun 10, 4:40 pm, calvin  wrote:
> As much as I am grateful for the W3C and believe that an organization
> like theirs is vital to the continued growth of the web, the W3C has
> not had a great track record in keeping to their projected timeline
> for HTML5. And the W3C has long since fallen behind the provisional
> timeline you linked to. For instance, by March 2010, the HTML work
> group still hadn't reached "Last Call", when they were already
> supposed to have reached the Candidate Recommendation 
> stage:http://dev.w3.org/html5/status/2010-03.html
>
> I have more faith in the WHATWG projections for HTML5's completion
> since they're the ones who have to implement it. At this point, the
> Candidate Recommendation stage isn't expected to be reached until
> 2012:http://wiki.whatwg.org/wiki/FAQ#When_will_HTML5_be_finished.3F
>
> On Jun 9, 10:04 pm, Andy Dirnberger  wrote:
>
>
>
> > According to the W3C, they expect to reach the recommendation
> > milestone for HTML5 in Q3 
> > 2010.http://www.w3.org/2007/03/HTML-WG-charter.html#deliverables
>
> > On Jun 9, 11:11 pm, calvin  wrote:
>
> > > You can "use" whatever you want, but HTML5 is nowhere near completion.
> > > It's not even expected to become a W3C recommendation until 2022, and
> > > few browsers besides Chrome and Safari even support half of the
> > > specification.
>
> > > On Jun 9, 6:40 am, ytbryan  wrote:
>
> > > > how do I render html element in cakephp?
>
> > > > Thanks!
>
> > > > /Bryan

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

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


Js Helper Link 'complete' option?

2010-06-10 Thread william ratke


I need to refresh Cufon after loading ajax content with the Js Helper 
link helper. It looks like there's a 'complete' option with the older 
Ajax helper that allows you to execute some script after the ajax 
request is completed, but I don't see any sort of support for that in 
the Js Helper. What's the best way to call something like Cufon.refresh 
after the Js Helper link is finished?


Thanks.

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

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


validation rules

2010-06-10 Thread Dmitry Shevchenko
Hi
Did someone tried to create a array for the "inList" validation and
then use it?
for example
 var $test = array('one_day', 'five_days','never');

var $validate = array(
'ty_id' => array('numeric'),
'date_arr' => array('allowed_data' => array(
'rule' => array('inList',  $test),
'message'=> 'Wrong data',
'allowEmpty' => false)
  ),
);


When I'm try to use this construction . I'm getting a syntax error

Thanks

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

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


Re: URL is showing wrong

2010-06-10 Thread Davor Ilic
sry for my bad english. i hope you did understand me... also it is hard to
understand you what you meen somtimes but google translate helps a little
bit.

i´ve try to change now something and it didn´t work...  i realy don´t know
what i have done to get this issue. but i know that i only create
controllers, views and models nothing else... and also chane the route to my
path i´d liketo have

2010/6/10 Davor Ilic 

> I didn´t turn it off i´ve only changed in the core the Salt security values
> for sha1 and numbvalues nothing else.
>
> I´ve tested it. if i use the url like this:
> http://my.site/clients/add_client
>  it
> also work. Hm the html->link is only showing like this but htaccess is
> working well if i try the link it can be that i´ve only have this issue.
>
> lg,
>
> Davor
>
>
> 2010/6/9 Dr. Loboto 
>
> Did you study cakebook link? You need:
>>
>> 1) mod_rewrite installed and enabled;
>> 2) AllowOverride set to All for your site dir;
>> 3) .htaccess files must exist, be valid (unchanged rewrite section
>> actually), and be accessible by webserver (on *nix wrong rights
>> prevent it).
>>
>> Also there can be problem with alias if you use it. And finally you
>> can try to point DocumentRoot to app/webroot instead of root folder.
>>
>> But I still think that or you have mod_rewrite not working for your
>> site OR you turned off pretty URLs in core.php
>>
>> On Jun 9, 5:16 pm, Davor Ilic  wrote:
>> > it is enabled i also worked with it and cake wouldn´t show me a correct
>> page
>> > with this
>> >
>> > url:http://my.site/*app/webroot/index.php/*clients/add_client
>> >
>> > it have to be anything else. perhaps it have something to do with the
>> > route.php or the .htaccess isn´t done well
>> >
>> > 2010/6/9 Dr. Loboto 
>> >
>> >
>> >
>> > > You need mod_rewrite enabled.
>> >
>> > >http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess
>> >
>> > > On Jun 7, 12:40 am, Davor Ilic  wrote:
>> > > > Hi,
>> >
>> > > > my url is this:
>> http://my.site/*app/webroot/index.php/*clients/add_client
>> >
>> > > > why is it like this it change after time but can´t say i´ve changed
>> > > > something.
>> >
>> > > > i wont to show the link like this with "$html->link()" :
>> > >http://my.site/clients/add_client
>> >
>> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
>> others
>> > > with their CakePHP related questions.
>> >
>> > > You received this message because you are subscribed to the Google
>> Groups
>> > > "CakePHP" group.
>> > > To post to this group, send email to cake-php@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > cake-php+unsubscr...@googlegroups.com
>> For more options, visit this
>> group at
>> > >http://groups.google.com/group/cake-php?hl=en
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>

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

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


Re: Unable to use third-party classes to generate Epub

2010-06-10 Thread euromark
i achieved that by using
http://www.phpclasses.org/browse/package/6110.html
and transforming it into a cake1.3 lib class

maybe you wanna drop me a line
cheers


On 10 Jun., 18:33, Antoine Lassauzay 
wrote:
> Hi everyone,
>
> I'm trying to use a couple of PHP classes in order to generate an
> ebook made of dynamic content. The format is EPUB is basically a zip
> archive containing xml, css, and somes directories. I've found third
> party code that allows me to quickly generate epub on the fly.
>
> The main class is Epub, which uses another one called Zip. These files
> comes from 
> :http://www.phpclasses.org/package/6115-PHP-Create-ebook-in-EPUB-forma...http://www.phpclasses.org/package/6110-PHP-Create-archives-of-compres...
>
> I've successfully tested the example out of my cakephp project, but
> when I integrate those classes and the code of the example into my
> cakephp project, the downloaded epub archive seems to be broken.
>
> All the job is done into a view file, which just imports the vendors
> and executes the example code. No errors are thrown and the file gets
> downloaded, but my ebook reader throws an error and the archive (we
> can replace the .epub extension by .zip) can't be extracted.
>
> Now, my guess would be that for some obscure reason the Zip class
> doesn't word correctly when integrated in cake. Maybe there is a
> conflict with Cake configuration when it is doing the low level job ?
> The code of the Zip class can be found here 
> :http://www.phpclasses.org/browse/file/30893.html
>
> I'm aware that it's hard to help with that but it could ring a bell
> for someone. If you need me to post code or give more explanations,
> just ask.
>
> Thanks a lot,
> Antoine, a convicted new cakephp user

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

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


Path of Slugs in URL (separated with Slashes)

2010-06-10 Thread RobertMeisner
Hello fellow cakers.

How can I solve the following problem.

Let's say you have a model called "Item".
Item has a parent Item and a slug.
I use a slug to Identify Item.
URLs have the form http://domain/items/view/slug

What I want to achieve is: URLs containing parents' slugs .

ie:
http://domain/items/view/parentparentslug/parentslug/slug


I would preffer some Automagic solution, where i can use
$html-> link ('controller' => 'item', 'action' => 'view', 'slug' =>
'my-item-slug'); //without parrents

I thought about overriding AppHelper:: url ();  and calling some
getParentSlugs() function on Item model but as far as i know cake's
Good Practices i shoudnt use Model calls in helpers.

Another idea was to calculate some virtual full_slug field in
afterFind() but i want path-of-slugs to be separated by slashes.


What should be my approach on this one?




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

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


Re: Forms and Descriptions

2010-06-10 Thread Flavia Missi
Hi!

You can define a label for the input too, look like this:

$form->input('input_name', array('label'=>'label name',
'after'=>'description for input'));

Sorry if I wrote something wrong, I'm brazilian! ^^

Hope it helps...

2010/6/10 phpcoder2...@googlemail.com 

> cheers Jeremy! you seem to reply to everyone's issues :D lol thanks!
>
> On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
>  wrote:
> > User the 'after' option and then apply css:
> >
> > echo $this->Form->input(
> > 'field_name',
> > array(
> > 'after' => 'Your description...'
> > )
> > );
> >
> > Jeremy Burns
> > Class Outfit
> >
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
> >
> >
> >
> > > Hey guys building a form and not sure how to go about adding
> > > descriptions to each input, from what ive seen there is no description
> > > option in the $form->input(); does anyone know of a simple way to
> > > achieve this?
> >
> > > thanks
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.comFor
> > >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Flàvia Missi

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

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


best hot photos

2010-06-10 Thread muni
HOT HEROINES PHOTOS

 http://hotheroinesphoto.blogspot.com/
  SEXY SNEHA

 http://hotheroinesphoto.blogspot.com/2010/06/sneha-hot.html
  KOUSHA HOT EXPOSING

 http://hotheroinesphoto.blogspot.com/2010/06/sexy-kousha.html
  PRIYAMANI IN HOT BIKINI

 http://hotheroinesphoto.blogspot.com/2010/06/priyamani-hot.html
  MADHUSHALINI IN HOT DRESS

 http://hotheroinesphoto.blogspot.com/2010/06/blog-post_2972.html
  HOTTEST LIPKISS

 http://hotheroinesphoto.blogspot.com/2010/06/lipkiss-2.html
  NAMITHA IN BATH

 http://hotheroinesphoto.blogspot.com/2010/06/nayagarala-namitha.html

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

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


Re: Speed and performance

2010-06-10 Thread Keve Kutner
Hi!

In one of the projects I worked on, we used cakephp as a dynamic ad server
(reading fresh data from mysql) and it could serve 800.000 hits / day so
cake is not that slow :)

Of course we used memcached and apc.

Thisk

On Jun 10, 2010 9:01 PM, "Alan Asher"  wrote:

 I am dealing with a site that is probably larger than had originally been
thought of when the designers made CakePHP.  I have already invested 4
months in development and now that I have a user base it bogs down a lot
when about 5 users get on at the same time.  I’m hoping to have thousands of
users on at the same time.



I have set up cache to cache most of the layout since it doesn’t change but
from day to day or every two minutes.  I’m using file cache and wonder if it
would help switching to APC.  I have an ubuntu server that I control
completely and have already taken the initial steps to install APC, but I
haven’t converted my cache config to use it yet.



I see a problem with the amount of recursion in the models classes.  I’m
using the “contains” on ALL of my queries so that the queries run faster,
but I think that when cake loads the models and all it’s recursions, it
takes forever since I have 88 tables that all relate to the user some how.



Does anyone have suggestions?



Alan

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

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

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

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


Re: can i use html5 in cakephp?

2010-06-10 Thread Miles J
No CakePHP does not support HTML5. If you want to use HTML5's new form
types, Cake already prebuilds most of those automatically in the same
format, but its not HTML5.

If you want to use new HTML5 tags, theres nothing stopping you.

On Jun 10, 12:45 am, "Karmick Solutions Pvt. Ltd" 
wrote:
> Yes I agree.
>
> On Jun 10, 8:11 am, calvin  wrote:
>
> > You can "use" whatever you want, but HTML5 is nowhere near completion.
> > It's not even expected to become a W3C recommendation until 2022, and
> > few browsers besides Chrome and Safari even support half of the
> > specification.
>
> > On Jun 9, 6:40 am, ytbryan  wrote:
>
> > > how do I render html element in cakephp?
>
> > > Thanks!
>
> > > /Bryan

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

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


Check this plugin and tell me if you like our way

2010-06-10 Thread Steinkel
Hi !

We're working on acl+auth plugin (http://github.com/jedt/spark_plug).

Yes, another acl+auth plugin. I hate the built-in features because
they are so powerful, so huge and so mumbo-yumbo-aco-aro-ish. Check
out the plugin and tell me what you like (or not) and what you would
like to improve it !!

SparkPlug is simple, it has groups, permissions applied to actions and
controllers and... it works !

Thank you.

(with all respecto to the people and their hard work within cake's
current acl/auth)

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

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


Questions to "Player Transfers"

2010-06-10 Thread DerBjoern
Hi,

i have some beginner's questions (i'm using CakePHP for some days now)
and i want to relate them to a practical example:

I have 3 Tables: Players, Clubs and Clubs_Players

CREATE TABLE IF NOT EXISTS players(
id INT(11) NOT NULL auto_increment,
lastname VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(id));

CREATE TABLE IF NOT EXISTS clubs(
id INT(11) NOT NULL auto_increment,
name VARCHAR(255) NOT NULL UNIQUE,
PRIMARY KEY(id));

CREATE TABLE IF NOT EXISTS clubs_players(
id INT(11) NOT NULL auto_increment,
player_id INT(11) NOT NULL,
from_club_id INT(11) NULL,
to_club_id INT(11) NULL,
from_datetime datetime NOT NULL,
to_datetime datetime NOT NULL default '-12-31 23:59:59',
PRIMARY KEY(id));

I want to create models, controllers and views via console:

1.) Is it right that i cannot add the validation "isUnique" for the
model via console, only manually after?

2.) Which attributes i actually i have to validate? Does it make sense
p.e. to set the rule "numeric" to the id or i have to validate only
attributes that actually would appear in the form for p.e. edit or
add?

3.) Associations: Is it correct that i have to add only one
association to the model ClubPlayers (btw. why it isn't called
ClubsPlayers?) and none to Player or Club, cause a player can exists
without a club and vice versa?

4.) Problem: Table "clubs_players": 2 foreign keys of same table:
"clubs".
I found a solution here: 
http://nsslive.net/2009/07/02/cakephp-models-multiple-columns-to-the-same-table/
but when i am using the auto-generated view (http://localhost/
clubs_players) i am getting following error "Unknown column
'FromClub.club_id' in 'on clause' ". My model looks like that:
[code]
var $belongsTo = array(
'Player' => array(
'className' => 'Player',
'foreignKey' => 'player_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'FromClub' => array(
'className' => 'Club',
'foreignKey' => false,
'conditions' => 'FromClub.club_id = 
ClubsPlayer.from_club_id',
'fields' => '',
'order' => ''
),
'ToClub' => array(
'className' => 'Club',
'foreignKey' => false,
'conditions' => 'ToClub.club_id = 
ClubsPlayer.to_club_id',
'fields' => '',
'order' => ''
)
);
[/code]

Sure i have to modify besided the model the query too, but where i do
that? In the controller? My ClubsPlayersController is still empty or
in views/clubs_players/index.ctp? In the last mentioned i don't see
any possiblities...

Anyway... I hope that somebody can help me :) Thanks a lot! I also
ordered me a CakePHP development book, cause i am quite motivated to
work with this framework!

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

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


Re: can i use html5 in cakephp?

2010-06-10 Thread calvin
As much as I am grateful for the W3C and believe that an organization
like theirs is vital to the continued growth of the web, the W3C has
not had a great track record in keeping to their projected timeline
for HTML5. And the W3C has long since fallen behind the provisional
timeline you linked to. For instance, by March 2010, the HTML work
group still hadn't reached "Last Call", when they were already
supposed to have reached the Candidate Recommendation stage:
http://dev.w3.org/html5/status/2010-03.html

I have more faith in the WHATWG projections for HTML5's completion
since they're the ones who have to implement it. At this point, the
Candidate Recommendation stage isn't expected to be reached until
2012:
http://wiki.whatwg.org/wiki/FAQ#When_will_HTML5_be_finished.3F

On Jun 9, 10:04 pm, Andy Dirnberger  wrote:
> According to the W3C, they expect to reach the recommendation
> milestone for HTML5 in Q3 
> 2010.http://www.w3.org/2007/03/HTML-WG-charter.html#deliverables
>
> On Jun 9, 11:11 pm, calvin  wrote:
>
> > You can "use" whatever you want, but HTML5 is nowhere near completion.
> > It's not even expected to become a W3C recommendation until 2022, and
> > few browsers besides Chrome and Safari even support half of the
> > specification.
>
> > On Jun 9, 6:40 am, ytbryan  wrote:
>
> > > how do I render html element in cakephp?
>
> > > Thanks!
>
> > > /Bryan

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

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


Unable to use third-party classes to generate Epub

2010-06-10 Thread Antoine Lassauzay
Hi everyone,

I'm trying to use a couple of PHP classes in order to generate an
ebook made of dynamic content. The format is EPUB is basically a zip
archive containing xml, css, and somes directories. I've found third
party code that allows me to quickly generate epub on the fly.

The main class is Epub, which uses another one called Zip. These files
comes from :
http://www.phpclasses.org/package/6115-PHP-Create-ebook-in-EPUB-format-for-Apple-iPad-.html
http://www.phpclasses.org/package/6110-PHP-Create-archives-of-compressed-files-in-ZIP-format.html

I've successfully tested the example out of my cakephp project, but
when I integrate those classes and the code of the example into my
cakephp project, the downloaded epub archive seems to be broken.

All the job is done into a view file, which just imports the vendors
and executes the example code. No errors are thrown and the file gets
downloaded, but my ebook reader throws an error and the archive (we
can replace the .epub extension by .zip) can't be extracted.

Now, my guess would be that for some obscure reason the Zip class
doesn't word correctly when integrated in cake. Maybe there is a
conflict with Cake configuration when it is doing the low level job ?
The code of the Zip class can be found here :
http://www.phpclasses.org/browse/file/30893.html

I'm aware that it's hard to help with that but it could ring a bell
for someone. If you need me to post code or give more explanations,
just ask.

Thanks a lot,
Antoine, a convicted new cakephp user

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

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


Re: Speed and performance

2010-06-10 Thread Miles J
How many queries on average are called per page? And what is the
average load time?

I haev thousands of users and a large forum system, and dont really
hit much speed.
Im not using memcache or APC either.

On Jun 10, 12:00 pm, "Alan Asher"  wrote:
> I am dealing with a site that is probably larger than had originally been
> thought of when the designers made CakePHP.  I have already invested 4
> months in development and now that I have a user base it bogs down a lot
> when about 5 users get on at the same time.  I'm hoping to have thousands of
> users on at the same time.
>
> I have set up cache to cache most of the layout since it doesn't change but
> from day to day or every two minutes.  I'm using file cache and wonder if it
> would help switching to APC.  I have an ubuntu server that I control
> completely and have already taken the initial steps to install APC, but I
> haven't converted my cache config to use it yet.
>
> I see a problem with the amount of recursion in the models classes.  I'm
> using the "contains" on ALL of my queries so that the queries run faster,
> but I think that when cake loads the models and all it's recursions, it
> takes forever since I have 88 tables that all relate to the user some how.
>
> Does anyone have suggestions?
>
> Alan

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

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


Re: Deleting from model not working

2010-06-10 Thread WhyNotSmile
Oh, sorry, yes... $friendsarray gets processed; if it's null then the
userid is used to find the record which should be deleted.

So it's:

if(!$friendsarray) {
 $friend = $this->Friend->findByUserId($userid);
 $this->delete($friend['Friend']['id']);
}

On Jun 10, 6:51 pm, cricket  wrote:
> On Jun 10, 11:55 am, WhyNotSmile  wrote:
>
>
>
> > I'm having trouble with using the model to delete a record.  I know I
> > could do it in the controller, but there are various reasons why that
> > would be more awkward, and also I would like to understand why it's
> > not working.
>
> > Here's what I have (not very complex!):
>
> > In friend.php (the model):
>
> > class Friend extends AppModel {
>
> >  var $belongsTo = 'User';
>
> > // Save friends list for given user
> >  function saveFriendsList($friendsarray = null, $userid = null) {
>
> >   ... some processing, checking etc ...
>
> >    $this->delete($friend['Friend']['id']);
>
> >  ... more stuff...
> >  }
>
> > }
>
> Your method param is $friendsarray but you're using $friend. Typo?

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

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


Custom pagination with plain SQL

2010-06-10 Thread Lucca Mordente
Hello there

I have a Search model which uses no database table that makes a
fulltext search in some tables using plain SQL.

How can I paginate the results of a $this->query($plainSQL) call ?

Precisely, how do I implement the paginate() method using query()
instead of find() ?

Thanks!

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

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


Re: Forms and Descriptions

2010-06-10 Thread Chris Hanson
ye know about label just wasnt sure on after lol thanks :D

On 10 June 2010 17:15, Flavia Missi  wrote:
> Hi!
>
> You can define a label for the input too, look like this:
>
> $form->input('input_name', array('label'=>'label name',
> 'after'=>'description for input'));
>
> Sorry if I wrote something wrong, I'm brazilian! ^^
>
> Hope it helps...
>
> 2010/6/10 phpcoder2...@googlemail.com 
>>
>> cheers Jeremy! you seem to reply to everyone's issues :D lol thanks!
>>
>> On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
>>  wrote:
>> > User the 'after' option and then apply css:
>> >
>> > echo $this->Form->input(
>> >         'field_name',
>> >         array(
>> >                 'after' => 'Your description...'
>> >         )
>> > );
>> >
>> > Jeremy Burns
>> > Class Outfit
>> >
>> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>> >
>> > On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
>> >
>> >
>> >
>> > > Hey guys building a form and not sure how to go about adding
>> > > descriptions to each input, from what ive seen there is no description
>> > > option in the $form->input(); does anyone know of a simple way to
>> > > achieve this?
>> >
>> > > thanks
>> >
>> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
>> > > others with their CakePHP related questions.
>> >
>> > > You received this message because you are subscribed to the Google
>> > > Groups "CakePHP" group.
>> > > To post to this group, send email to cake-php@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
>> > > group athttp://groups.google.com/group/cake-php?hl=en
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>
>
>
> --
> Flàvia Missi
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Kind Regards Chris

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

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


Re: IpV6

2010-06-10 Thread euromark
if there are actually two :: in it, yes
see ..."3::8"...


On 10 Jun., 22:29, Emanuele Gringeri  wrote:
> is |2001:db8:85a3::8a2e:370:7334|, invalid?
>
> On 06/10/10 16:16, euromark wrote:
>
>
>
> > it still returns false?
> > i guess the ip you process is invalid then...
>
> > On 10 Jun., 16:16, emanuele  wrote:
>
> >> Thanks Dude. even though Validation::ip return always false. May be the
> >> regexp dosen't complain every possible ipv6 format..
>
> >> On Wed, Jun 9, 2010 at 5:50 PM, euromark  
> >> wrote:
>
> >>> im sry
> >>> the validation array is too flat (i just copied it)
>
> >>> var $validate  = array(
> >>>            'ip' => array(
> >>>                      'validIp' => array(
> >>>                            'rule' => 'ip',
> >>>                            'message' => 'Please supply a valid IP v4/
> >>> v6
> >>> address.'
> >>>                        )
> >>>            )
> >>> );
>
> >>> if "ip" is your ip field
> >>> "validIp" is the name for the rule, you can name it whatever you want
>
> >>> you only need this one rule!
> >>> as i mentioned before, ip already validates BOTH
> >>> it doesnt make sense to split em up in your case
> >>> you will only make it fail every time - because it cant be both at the
> >>> same time (only either one)
>
> >>> On 9 Jun., 14:26, emanuele  wrote:
>
>  good hint. Just following the book I ve the following rules in the model
>   var $validate  = array(
>              'ipV4Address' => array(
>                              'rule' => 'ip',
>                              'message' => 'Please supply a valid IP v4
>  address.'
>              ),
>              'ipV6Address' => array(
>                              'rule' => 'validateIpV6Address',
>                              'message' => 'Please supply a valid IP v6
>  address'
>              ),
>              'identifier' => array(
>                              'rule' => 'alphaNumeric',
>                              'message' => 'Please provide a valid
>
> >>> identifier'
>
>              )
>
>      );
>
>      function validateIpV6Address($ip) {
>          return Validation::ip($ip, 'IPv6');
>      }
>
>  $ip contains a valid ipV6 address but false is always returned. What's
>
> >>> wrong
>
>  with my code?
>
>  thanks in advance
>
>  On Wed, Jun 9, 2010 at 1:24 PM, euromark 
>
> >>> wrote:
>
> >http://book.cakephp.org/view/142/ip
> > is a little bit outdated
>
> > "ip" does validate BOTH by default!
>
> > var $validate = array(
> >    'clientip' => array(
> >        'rule' => 'ip',
> >        'message' => 'Please supply a valid IP address.'
> >    )
> > );
>
> > but Validation::ip($check, 'ipv6') wou
>
> > On 9 Jun., 12:50, emanuele  wrote:
>
> >> Hello fellows, is there any chance to validate an IP v6? Can u please
>
> > give
>
> >> some hint?
> >> thanks in advance
>
> >> --
> >> Emanuele Gringeri
> >> Computer Engineer
> >> University of Pisa
> >> Be my mirror, my sword and shield
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
>
> >>> others
>
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google
>
> >>> Groups
>
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com
>
> >>> For more options, visit this
> >>> group at
>
> >http://groups.google.com/group/cake-php?hl=en
>
>  --
>  Emanuele Gringeri
>  Computer Engineer
>  University of Pisa
>  Be my mirror, my sword and shield
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> >>> with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups
> >>> "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscr...@googlegroups.comFor
> >>>  more options, visit this group at
> >>>http://groups.google.com/group/cake-php?hl=en
>
> >> --
> >> Emanuele Gringeri
> >> Computer Engineer
> >> University of Pisa
> >> Be my mirror, my sword and shield
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> --
> Emanuele Gringeri
> Computer Engineer
> University of Pisa
> Be my mirror, my sword and shield

Check out the new CakePHP Questions site 

Speed and performance

2010-06-10 Thread Alan Asher
I am dealing with a site that is probably larger than had originally been
thought of when the designers made CakePHP.  I have already invested 4
months in development and now that I have a user base it bogs down a lot
when about 5 users get on at the same time.  I'm hoping to have thousands of
users on at the same time.

 

I have set up cache to cache most of the layout since it doesn't change but
from day to day or every two minutes.  I'm using file cache and wonder if it
would help switching to APC.  I have an ubuntu server that I control
completely and have already taken the initial steps to install APC, but I
haven't converted my cache config to use it yet.

 

I see a problem with the amount of recursion in the models classes.  I'm
using the "contains" on ALL of my queries so that the queries run faster,
but I think that when cake loads the models and all it's recursions, it
takes forever since I have 88 tables that all relate to the user some how.

 

Does anyone have suggestions?

 

Alan

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

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


Re: Installing another application inside my CakePHP 1.3 app

2010-06-10 Thread saavedrajj
which one for example?


On Jun 10, 4:28 am, Bharadwaj Parthasarathy 
wrote:
> This may not be the ideal choice, but consider using a sub domain  
> [forum.mycakeapp.com] and have it pick up from a separate folder.
>
> On a totally different note, IMHO godaddy sucks big time. Try getting  
> a better host, which supports easy domain and sub domain redirection.
>
> - Bharadwajhttp://webhostingangel.com
>
> On 10-Jun-10, at 3:20 AM, Jeremy Burns | Class Outfit wrote:
>
> > The way I have done this in the past is to put the forum folder  
> > inside webroot and set up a subdomain, pointing the subdomain at the  
> > webroot/forum folder. It works fine (I have done it with phpBB3).
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.com
> >http://www.classoutfit.com
>
> > On 10 Jun 2010, at 04:24,saavedrajjwrote:
>
> >> Hi, I have a trouble on my godaddy shared linux hosting account.
>
> >> I want to install a PHP forum (phpBB3) in a /forum folder *
>
> >> -app
> >> -cake
> >> -forum *
> >> -plugins
> >> -vendors
>
> >> and I want to access this forum using this url:
> >>http://www.MyCakeApp.com/forum
>
> >> but, of course, the following error appears:
> >> Missing Controller
> >> Error:  ForumController could not be found.
>
> >> Then I upload the forum folder at
> >> -app/webroot/forum
> >> BUT after the installation, these long url appears:
> >>http://www.MyCakeApp.com/app/webroot/forum/www/index.php
>
> >> I don't want the "app/webroot" string in the url.
>
> >> Somody can help me?
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help  
> >> others with their CakePHP related questions.
>
> >> You received this message because you are subscribed to the Google  
> >> Groups "CakePHP" group.
> >> To post to this group, send email to cake-php@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this  
> >> group athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help  
> > others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google  
> > Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this  
> > group athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: IpV6

2010-06-10 Thread Emanuele Gringeri
is |2001:db8:85a3::8a2e:370:7334|, invalid?

On 06/10/10 16:16, euromark wrote:
> it still returns false?
> i guess the ip you process is invalid then...
>
>
> On 10 Jun., 16:16, emanuele  wrote:
>   
>> Thanks Dude. even though Validation::ip return always false. May be the
>> regexp dosen't complain every possible ipv6 format..
>>
>>
>>
>> On Wed, Jun 9, 2010 at 5:50 PM, euromark  wrote:
>> 
>>> im sry
>>> the validation array is too flat (i just copied it)
>>>   
>> 
>>> var $validate  = array(
>>>'ip' => array(
>>>  'validIp' => array(
>>>'rule' => 'ip',
>>>'message' => 'Please supply a valid IP v4/
>>> v6
>>> address.'
>>>)
>>>)
>>> );
>>>   
>> 
>>> if "ip" is your ip field
>>> "validIp" is the name for the rule, you can name it whatever you want
>>>   
>> 
>>> you only need this one rule!
>>> as i mentioned before, ip already validates BOTH
>>> it doesnt make sense to split em up in your case
>>> you will only make it fail every time - because it cant be both at the
>>> same time (only either one)
>>>   
>> 
>>> On 9 Jun., 14:26, emanuele  wrote:
>>>   
 good hint. Just following the book I ve the following rules in the model
  var $validate  = array(
 'ipV4Address' => array(
 'rule' => 'ip',
 'message' => 'Please supply a valid IP v4
 address.'
 ),
 'ipV6Address' => array(
 'rule' => 'validateIpV6Address',
 'message' => 'Please supply a valid IP v6
 address'
 ),
 'identifier' => array(
 'rule' => 'alphaNumeric',
 'message' => 'Please provide a valid
 
>>> identifier'
>>>   
 )
 
>> 
 );
 
>> 
 function validateIpV6Address($ip) {
 return Validation::ip($ip, 'IPv6');
 }
 
>> 
 $ip contains a valid ipV6 address but false is always returned. What's
 
>>> wrong
>>>   
 with my code?
 
>> 
 thanks in advance
 
>> 
 On Wed, Jun 9, 2010 at 1:24 PM, euromark 
 
>>> wrote:
>>>   
> http://book.cakephp.org/view/142/ip
> is a little bit outdated
>   
>> 
> "ip" does validate BOTH by default!
>   
>> 
> var $validate = array(
>'clientip' => array(
>'rule' => 'ip',
>'message' => 'Please supply a valid IP address.'
>)
> );
>   
>> 
> but Validation::ip($check, 'ipv6') wou
>   
>> 
> On 9 Jun., 12:50, emanuele  wrote:
>   
>> Hello fellows, is there any chance to validate an IP v6? Can u please
>> 
> give
>   
>> some hint?
>> thanks in advance
>> 
>> 
>> --
>> Emanuele Gringeri
>> Computer Engineer
>> University of Pisa
>> Be my mirror, my sword and shield
>> 
>> 
> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
>   
>>> others
>>>   
> with their CakePHP related questions.
>   
>> 
> You received this message because you are subscribed to the Google
>   
>>> Groups
>>>   
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com
>   
>>> For more options, visit this
>>> group at
>>>   
> http://groups.google.com/group/cake-php?hl=en
>   
>> 
 --
 Emanuele Gringeri
 Computer Engineer
 University of Pisa
 Be my mirror, my sword and shield
 
>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
>>> with their CakePHP related questions.
>>>   
>> 
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>   
>> --
>> Emanuele Gringeri
>> Computer Engineer
>> University of Pisa
>> Be my mirror, my sword and shield
>> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send 

Re: Deleting from model not working

2010-06-10 Thread cricket
On Jun 10, 11:55 am, WhyNotSmile  wrote:
> I'm having trouble with using the model to delete a record.  I know I
> could do it in the controller, but there are various reasons why that
> would be more awkward, and also I would like to understand why it's
> not working.
>
> Here's what I have (not very complex!):
>
> In friend.php (the model):
>
> class Friend extends AppModel {
>
>  var $belongsTo = 'User';
>
> // Save friends list for given user
>  function saveFriendsList($friendsarray = null, $userid = null) {
>
>   ... some processing, checking etc ...
>
>    $this->delete($friend['Friend']['id']);
>
>  ... more stuff...
>  }
>
> }
>

Your method param is $friendsarray but you're using $friend. Typo?

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

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


Re: Autocomplete is not working

2010-06-10 Thread cricket
On Jun 10, 3:20 am, Vijay  wrote:
> Hello All,
>
> I am using the cakephp ajax autocomplete, but it is not giving me any
> response back.
>
> I tried with the other ajax methods like observerfield it is working
> fine. But when i try with the autocomplete it calls the function but
> returns with blank response. I am using prototype & jquery in this
> application. I applied jquery no-conflict for all the methods that are
> related with the jquery.

I recommend you use one or the other. Otherwise, you're loading a lot
of overlapping functionality.

> Can anybody give me an idea why this is happening. I read some where
> that autocomplete will not work if we are using both jquery &
> prototype together.So i tried by removing all the jquery files &
> functions i used, but no luck.
>
> It is still giving me error. Also the error is "element is undefined
> in controls.js line no. 175"

This is a javascript problem. Install FireBug in Firefox to debug.
You'll need to know, first off, if there's even a request being sent
to the server. (ie. Is the error being thrown before anything is sent
or after the response comes back?)

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

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


Re: Getting additional Tag details with HABTM

2010-06-10 Thread cricket
On Jun 9, 3:45 pm, Matthew Dunham  wrote:
> Ok my models are as follows:
>
> Product HABTM Tags (with products_tags table)
> Tag belongsTo TagGroup
>
> Can some help me work out the following problem I'm having: How can I
> get all tags for a certain product ID, along with their Tag Group?

If you're not already, use ContainableBehavior. Personally, I include
it in my AppModel as I use it quite a lot. A basic example:

$data = $this->Product->find(
'first',
'conditions' => array(
'Product.id' => $id
),
'fields' => array(...),
'contain' => array(
'Tag' => array(
'TagGroup'
)
)
);

Also, if you want to fetch all products by a particular tag, have a
look at this article by Nate:
http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find

I'm not sure how you would incorporate this to get the TagGroup,
though, but I'd guess that could be done.

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

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


Re: Forms and Descriptions

2010-06-10 Thread phpcoder2...@googlemail.com
ye i thought about that, but thought there may be a cake wayoh
well lol thanks for the help :D

On Jun 10, 5:14 pm, Jeremy Burns | Class Outfit
 wrote:
> Wild stab without thinking, researching or testing...
>
> I think you could do:
>
> 'after' => 'My description...'
>
> ...and then style span.description.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 10 Jun 2010, at 17:00, phpcoder2...@googlemail.com wrote:
>
>
>
> > is there a way to wrap class around, like after_class? thanks
>
> > On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
> >  wrote:
> >> User the 'after' option and then apply css:
>
> >> echo $this->Form->input(
> >>         'field_name',
> >>         array(
> >>                 'after' => 'Your description...'
> >>         )
> >> );
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
>
> >>> Hey guys building a form and not sure how to go about adding
> >>> descriptions to each input, from what ive seen there is no description
> >>> option in the $form->input(); does anyone know of a simple way to
> >>> achieve this?
>
> >>> thanks
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> >>> with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >>> athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: components

2010-06-10 Thread emanuele
thanks dude. it works. damn it.
On Thu, Jun 10, 2010 at 6:17 PM, euromark wrote:

> its
>
> var $components = array('Session');
>
> and everything works fine (cake1.3)
>
>
> On 10 Jun., 17:27, emanuele  wrote:
> > For instance:
> >
> > class AppController extends Controller {
> > var $components = array('Cookie', 'Email');
> > ...
> >
> > }
> >
> > class DummiesController extends AppController {
> > var $components = 'Session';
> >
> > function beforeFilter() {
> >  parent::beforeFilter();
> >
> > }
> >
> > 
> >
> > }
> >
> > On Thu, Jun 10, 2010 at 5:22 PM, John Andersen  >wrote:
> >
> >
> >
> > > Please show the code on how you define the components in both the
> > > AppController and in a Controller in which you have this issue!
> > > Enjoy,
> > >   John
> >
> > > On Jun 10, 4:55 pm, emanuele  wrote:
> > > > yes It is. But I dunno why the behaviour is different. In my app it's
> > > like
> > > > the override of components happens and
> > > > only the 'local' components it is available. What's do u think about?
> >
> > > > thanks in advance.
> >
> > > [snip]
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > --
> > Emanuele Gringeri
> > Computer Engineer
> > University of Pisa
> > Be my mirror, my sword and shield
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



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

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

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


Re: components

2010-06-10 Thread euromark
its

var $components = array('Session');

and everything works fine (cake1.3)


On 10 Jun., 17:27, emanuele  wrote:
> For instance:
>
> class AppController extends Controller {
> var $components = array('Cookie', 'Email');
> ...
>
> }
>
> class DummiesController extends AppController {
> var $components = 'Session';
>
> function beforeFilter() {
>          parent::beforeFilter();
>
> }
>
> 
>
> }
>
> On Thu, Jun 10, 2010 at 5:22 PM, John Andersen wrote:
>
>
>
> > Please show the code on how you define the components in both the
> > AppController and in a Controller in which you have this issue!
> > Enjoy,
> >   John
>
> > On Jun 10, 4:55 pm, emanuele  wrote:
> > > yes It is. But I dunno why the behaviour is different. In my app it's
> > like
> > > the override of components happens and
> > > only the 'local' components it is available. What's do u think about?
>
> > > thanks in advance.
>
> > [snip]
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> Emanuele Gringeri
> Computer Engineer
> University of Pisa
> Be my mirror, my sword and shield

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

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


Re: IpV6

2010-06-10 Thread euromark
it still returns false?
i guess the ip you process is invalid then...


On 10 Jun., 16:16, emanuele  wrote:
> Thanks Dude. even though Validation::ip return always false. May be the
> regexp dosen't complain every possible ipv6 format..
>
>
>
> On Wed, Jun 9, 2010 at 5:50 PM, euromark  wrote:
> > im sry
> > the validation array is too flat (i just copied it)
>
> > var $validate  = array(
> >            'ip' => array(
> >                      'validIp' => array(
> >                            'rule' => 'ip',
> >                            'message' => 'Please supply a valid IP v4/
> > v6
> > address.'
> >                        )
> >            )
> > );
>
> > if "ip" is your ip field
> > "validIp" is the name for the rule, you can name it whatever you want
>
> > you only need this one rule!
> > as i mentioned before, ip already validates BOTH
> > it doesnt make sense to split em up in your case
> > you will only make it fail every time - because it cant be both at the
> > same time (only either one)
>
> > On 9 Jun., 14:26, emanuele  wrote:
> > > good hint. Just following the book I ve the following rules in the model
> > >  var $validate  = array(
> > >             'ipV4Address' => array(
> > >                             'rule' => 'ip',
> > >                             'message' => 'Please supply a valid IP v4
> > > address.'
> > >             ),
> > >             'ipV6Address' => array(
> > >                             'rule' => 'validateIpV6Address',
> > >                             'message' => 'Please supply a valid IP v6
> > > address'
> > >             ),
> > >             'identifier' => array(
> > >                             'rule' => 'alphaNumeric',
> > >                             'message' => 'Please provide a valid
> > identifier'
> > >             )
>
> > >     );
>
> > >     function validateIpV6Address($ip) {
> > >         return Validation::ip($ip, 'IPv6');
> > >     }
>
> > > $ip contains a valid ipV6 address but false is always returned. What's
> > wrong
> > > with my code?
>
> > > thanks in advance
>
> > > On Wed, Jun 9, 2010 at 1:24 PM, euromark 
> > wrote:
> > > >http://book.cakephp.org/view/142/ip
> > > > is a little bit outdated
>
> > > > "ip" does validate BOTH by default!
>
> > > > var $validate = array(
> > > >    'clientip' => array(
> > > >        'rule' => 'ip',
> > > >        'message' => 'Please supply a valid IP address.'
> > > >    )
> > > > );
>
> > > > but Validation::ip($check, 'ipv6') wou
>
> > > > On 9 Jun., 12:50, emanuele  wrote:
> > > > > Hello fellows, is there any chance to validate an IP v6? Can u please
> > > > give
> > > > > some hint?
> > > > > thanks in advance
>
> > > > > --
> > > > > Emanuele Gringeri
> > > > > Computer Engineer
> > > > > University of Pisa
> > > > > Be my mirror, my sword and shield
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com
> > For more options, visit this
> > group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > > --
> > > Emanuele Gringeri
> > > Computer Engineer
> > > University of Pisa
> > > Be my mirror, my sword and shield
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> Emanuele Gringeri
> Computer Engineer
> University of Pisa
> Be my mirror, my sword and shield

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

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


Re: Forms and Descriptions

2010-06-10 Thread Jeremy Burns | Class Outfit
Wild stab without thinking, researching or testing...

I think you could do:

'after' => 'My description...'

...and then style span.description.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 17:00, phpcoder2...@googlemail.com wrote:

> is there a way to wrap class around, like after_class? thanks
> 
> On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
>  wrote:
>> User the 'after' option and then apply css:
>> 
>> echo $this->Form->input(
>> 'field_name',
>> array(
>> 'after' => 'Your description...'
>> )
>> );
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>> 
>> On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
>> 
>> 
>> 
>>> Hey guys building a form and not sure how to go about adding
>>> descriptions to each input, from what ive seen there is no description
>>> option in the $form->input(); does anyone know of a simple way to
>>> achieve this?
>> 
>>> thanks
>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
>>> with their CakePHP related questions.
>> 
>>> You received this message because you are subscribed to the Google Groups 
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>>> athttp://groups.google.com/group/cake-php?hl=en
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Forms and Descriptions

2010-06-10 Thread phpcoder2...@googlemail.com
is there a way to wrap class around, like after_class? thanks

On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
 wrote:
> User the 'after' option and then apply css:
>
> echo $this->Form->input(
>         'field_name',
>         array(
>                 'after' => 'Your description...'
>         )
> );
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
>
>
>
> > Hey guys building a form and not sure how to go about adding
> > descriptions to each input, from what ive seen there is no description
> > option in the $form->input(); does anyone know of a simple way to
> > achieve this?
>
> > thanks
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: no flash messages in the login page using cake 1.3

2010-06-10 Thread vekija
In your login view add

echo $session->flash('auth);


On Jun 10, 5:29 pm, Windex  wrote:
> Well, I guess I figured it out... not entirely sure what I did but the
> last thing was to adjust the debug level up and down and then back to
> where it was when I started having the problem.  =\
>
> On Jun 8, 8:20 pm, Windex  wrote:
>
>
>
> > Did you ever figure this out?  I'm running into the same issue but its
> > occurring with ALL flash messages.  Nothing I do seems to cause any
> > message to be output.
>
> > My debug level is 0 (read that anything higher will suppress the flash
> > output), my controllers are partly customs and partly the default add/
> > edit/etc actions with the cake generate flash messages.  I'm using
> > $this->Session->setFlash() in controllers and in my layout i'm using
> > $this->Session->flash(); and $this->Session->flash('auth').
> > $session["messages"] never seems to have anything in it and I'm not
> > getting any error messages.
>
> > On May 30, 6:25 pm, dtemes  wrote:
>
> > > Hi All, I am testing cake 1.3 in a new application I am building and I
> > > have a weird behaviour: No flash messages are shown in the login page.
> > > I am using Auth and ACL, and the session component and helpers are
> > > already in my app_controller.
>
> > > Seems like a new session is created everytime the user hits the login
> > > action of my users controller. I have some login in the login action
> > > to save the user IP address and log the access. any hints?
>
> > > Thanks in advance

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

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


Re: Forms and Descriptions

2010-06-10 Thread phpcoder2...@googlemail.com
cheers Jeremy! you seem to reply to everyone's issues :D lol thanks!

On Jun 10, 4:56 pm, Jeremy Burns | Class Outfit
 wrote:
> User the 'after' option and then apply css:
>
> echo $this->Form->input(
>         'field_name',
>         array(
>                 'after' => 'Your description...'
>         )
> );
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:
>
>
>
> > Hey guys building a form and not sure how to go about adding
> > descriptions to each input, from what ive seen there is no description
> > option in the $form->input(); does anyone know of a simple way to
> > achieve this?
>
> > thanks
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

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

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


Deleting from model not working

2010-06-10 Thread WhyNotSmile
I'm having trouble with using the model to delete a record.  I know I
could do it in the controller, but there are various reasons why that
would be more awkward, and also I would like to understand why it's
not working.

Here's what I have (not very complex!):

In friend.php (the model):

class Friend extends AppModel {

 var $belongsTo = 'User';

// Save friends list for given user
 function saveFriendsList($friendsarray = null, $userid = null) {

  ... some processing, checking etc ...

   $this->delete($friend['Friend']['id']);

 ... more stuff...
 }

}

I have debugged $friend immediately before the delete line, and it
looks ok - definitely exists and so on.

Am I doing something wrong, or is this something I'm not supposed to
be doing at all?

Thanks!

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

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


Re: Forms and Descriptions

2010-06-10 Thread Jeremy Burns | Class Outfit
User the 'after' option and then apply css:

echo $this->Form->input(
'field_name',
array(
'after' => 'Your description...'
)
);

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 16:46, phpcoder2...@googlemail.com wrote:

> Hey guys building a form and not sure how to go about adding
> descriptions to each input, from what ive seen there is no description
> option in the $form->input(); does anyone know of a simple way to
> achieve this?
> 
> thanks
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Forms and Descriptions

2010-06-10 Thread phpcoder2...@googlemail.com
Hey guys building a form and not sure how to go about adding
descriptions to each input, from what ive seen there is no description
option in the $form->input(); does anyone know of a simple way to
achieve this?

thanks

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

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


Re: General development with MVC and Cake in particular

2010-06-10 Thread Windex
> And creating a multi-step action in Cake is no different from
> creating one in a non-Cake app.
Except for all the cake specific ways to accomplish those tasks.


>
> What's wrong with just redirecting the user to the next action/form
> instead of index at the end of each action? If you need to add a back
> button, then just add a link in the view as shown in the cookbook
> section on the Html Helper.

These kind of examples are what the OP i think was referring to.
Theres the standard no framework way of redirecting, theres the ugly
hacks using cake specific functions, then there is the correct cake
method.

> If you need to store persistent data, then
> just use session variables like you would in any other application.
> There's nothing here that a little common sense and basic web
> development knowledge can't solve. I don't think it's reasonable to
> expect the Cookbook to hold your hand and walk you through every
> possible programming scenario that you might encounter in your web
> development.

No but expanding on all those methods specific to cake used to
accomplish such tasks isn't asking to much
>
> If you want web development tutorials on how to solve real-world
> programming problems, then try devshed.com. It has a lot of general
> PHP (and other languages) development tutorials on all kinds of real-
> world web development problems, like implementing different types of
> session management systems, how to implement a search engine, etc.
>
I think its clear from this post you have missed the point and you
should have just said something like 'lrn2webdesign' it would have
provided just as much information and saved you some time.

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

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


Re: no flash messages in the login page using cake 1.3

2010-06-10 Thread Windex
Well, I guess I figured it out... not entirely sure what I did but the
last thing was to adjust the debug level up and down and then back to
where it was when I started having the problem.  =\

On Jun 8, 8:20 pm, Windex  wrote:
> Did you ever figure this out?  I'm running into the same issue but its
> occurring with ALL flash messages.  Nothing I do seems to cause any
> message to be output.
>
> My debug level is 0 (read that anything higher will suppress the flash
> output), my controllers are partly customs and partly the default add/
> edit/etc actions with the cake generate flash messages.  I'm using
> $this->Session->setFlash() in controllers and in my layout i'm using
> $this->Session->flash(); and $this->Session->flash('auth').
> $session["messages"] never seems to have anything in it and I'm not
> getting any error messages.
>
> On May 30, 6:25 pm, dtemes  wrote:
>
> > Hi All, I am testing cake 1.3 in a new application I am building and I
> > have a weird behaviour: No flash messages are shown in the login page.
> > I am using Auth and ACL, and the session component and helpers are
> > already in my app_controller.
>
> > Seems like a new session is created everytime the user hits the login
> > action of my users controller. I have some login in the login action
> > to save the user IP address and log the access. any hints?
>
> > Thanks in advance

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

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


Re: components

2010-06-10 Thread emanuele
For instance:

class AppController extends Controller {
var $components = array('Cookie', 'Email');
...
}

class DummiesController extends AppController {
var $components = 'Session';

function beforeFilter() {
 parent::beforeFilter();
}


}

On Thu, Jun 10, 2010 at 5:22 PM, John Andersen wrote:

> Please show the code on how you define the components in both the
> AppController and in a Controller in which you have this issue!
> Enjoy,
>   John
>
> On Jun 10, 4:55 pm, emanuele  wrote:
> > yes It is. But I dunno why the behaviour is different. In my app it's
> like
> > the override of components happens and
> > only the 'local' components it is available. What's do u think about?
> >
> > thanks in advance.
> >
> [snip]
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



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

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

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


Re: components

2010-06-10 Thread John Andersen
Please show the code on how you define the components in both the
AppController and in a Controller in which you have this issue!
Enjoy,
   John

On Jun 10, 4:55 pm, emanuele  wrote:
> yes It is. But I dunno why the behaviour is different. In my app it's like
> the override of components happens and
> only the 'local' components it is available. What's do u think about?
>
> thanks in advance.
>
[snip]

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

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


Re: Login and Registration form on same page/view

2010-06-10 Thread Andrei Mita
I did that but I'm having problems with data validation and form processing.
I have my forms in pages/welcome.ctp, the controller is UsersController and
data validation in UserModel.

After submiting the form, I get redirected to /users/register but I don't
have that view. How cand I get it to send me back to pages/welcome.ctp and
display the error massages?


On Thu, Jun 10, 2010 at 5:10 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> You set the 'action' of each form to as appropriate:
> http://book.cakephp.org/view/1384/Creating-Forms
>
> Jeremy Burns
> *Class Outfit*
> *
> *
> jeremybu...@classoutfit.com 
> http://www.classoutfit.com
>
> On 10 Jun 2010, at 14:58, Andrei Mita wrote:
>
> Hello,
>
> How can I set up two forms that perform two separate actions from a single
> page/view?
>
> For instance, the 'welcome.ctp' page has two forms: register and login. How
> can I get them to work with actions within UsersController?
>
> Thanks,
> Andrei
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: IpV6

2010-06-10 Thread emanuele
Thanks Dude. even though Validation::ip return always false. May be the
regexp dosen't complain every possible ipv6 format..

On Wed, Jun 9, 2010 at 5:50 PM, euromark  wrote:

> im sry
> the validation array is too flat (i just copied it)
>
> var $validate  = array(
>'ip' => array(
>  'validIp' => array(
>'rule' => 'ip',
>'message' => 'Please supply a valid IP v4/
> v6
> address.'
>)
>)
> );
>
> if "ip" is your ip field
> "validIp" is the name for the rule, you can name it whatever you want
>
> you only need this one rule!
> as i mentioned before, ip already validates BOTH
> it doesnt make sense to split em up in your case
> you will only make it fail every time - because it cant be both at the
> same time (only either one)
>
>
> On 9 Jun., 14:26, emanuele  wrote:
> > good hint. Just following the book I ve the following rules in the model
> >  var $validate  = array(
> > 'ipV4Address' => array(
> > 'rule' => 'ip',
> > 'message' => 'Please supply a valid IP v4
> > address.'
> > ),
> > 'ipV6Address' => array(
> > 'rule' => 'validateIpV6Address',
> > 'message' => 'Please supply a valid IP v6
> > address'
> > ),
> > 'identifier' => array(
> > 'rule' => 'alphaNumeric',
> > 'message' => 'Please provide a valid
> identifier'
> > )
> >
> > );
> >
> > function validateIpV6Address($ip) {
> > return Validation::ip($ip, 'IPv6');
> > }
> >
> > $ip contains a valid ipV6 address but false is always returned. What's
> wrong
> > with my code?
> >
> > thanks in advance
> >
> >
> >
> >
> >
> > On Wed, Jun 9, 2010 at 1:24 PM, euromark 
> wrote:
> > >http://book.cakephp.org/view/142/ip
> > > is a little bit outdated
> >
> > > "ip" does validate BOTH by default!
> >
> > > var $validate = array(
> > >'clientip' => array(
> > >'rule' => 'ip',
> > >'message' => 'Please supply a valid IP address.'
> > >)
> > > );
> >
> > > but Validation::ip($check, 'ipv6') wou
> >
> > > On 9 Jun., 12:50, emanuele  wrote:
> > > > Hello fellows, is there any chance to validate an IP v6? Can u please
> > > give
> > > > some hint?
> > > > thanks in advance
> >
> > > > --
> > > > Emanuele Gringeri
> > > > Computer Engineer
> > > > University of Pisa
> > > > Be my mirror, my sword and shield
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > --
> > Emanuele Gringeri
> > Computer Engineer
> > University of Pisa
> > Be my mirror, my sword and shield
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



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

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

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


Session in constructClasses()

2010-06-10 Thread Yuri Poll
Hello,

I'm trying to Configure::write('companyDB', $value) in app_controller
in constructClasses(). The $value is stored in Session, but I can not
access Session from this function. I need to set the companyDB
variable to change the connection for another DB later.

Can please someone advise on what I can do here?

Thank you!

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

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


Re: can i use html5 in cakephp?

2010-06-10 Thread Karmick Solutions Pvt. Ltd
Yes I agree.

On Jun 10, 8:11 am, calvin  wrote:
> You can "use" whatever you want, but HTML5 is nowhere near completion.
> It's not even expected to become a W3C recommendation until 2022, and
> few browsers besides Chrome and Safari even support half of the
> specification.
>
> On Jun 9, 6:40 am, ytbryan  wrote:
>
> > how do I render html element in cakephp?
>
> > Thanks!
>
> > /Bryan

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

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


How to add new language codes in the L10n::__l10nMap/L10n::__l10nCatalog

2010-06-10 Thread bhupinderchd
How can I add a new language code in the L10n::__l10nMap/
L10n::__l10nCatalog

I am going to create a multi-lingual application. In the
L10n::__l10nMap, I could not find ISO code for Swahili and other
languages  that are not present in the L10n::__l10nMap and/or
L10n::__l10nCatalog.

My question is how can I add new locale configurations to the L10n?

apologies for bad english.

Thanks & Regards,
Bhupinder

Bhupinder Singh

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

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


Re: Login and Registration form on same page/view

2010-06-10 Thread Jeremy Burns | Class Outfit
You set the 'action' of each form to as appropriate: 
http://book.cakephp.org/view/1384/Creating-Forms

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 14:58, Andrei Mita wrote:

> Hello,
> 
> How can I set up two forms that perform two separate actions from a single 
> page/view?
> 
> For instance, the 'welcome.ctp' page has two forms: register and login. How 
> can I get them to work with actions within UsersController?
> 
> Thanks,
> Andrei
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


using the auth information outside of cakephp

2010-06-10 Thread mrnnn
A rather unusual question maybe, but I'd like to use cake's auth in a
seperate php file. I tried checking what's in the session, but that
one seems to be empty?

Here's what i want to do: I have a simple file manager and when the
user is logged in (no matter what group, so basically i only need a
yes/no answer, doesn't matter who), he should be allowed to see the
entire file structure. if not, only a part.

important to notice i guess: file manager and cakephp site run on the
same domain (and same subdomain).

I've tried using the cookie and session components in cakephp and then
printing the $_SESSION (after a session_start() of course) and
$_COOKIE arrays, but those seemed empty except for a CAKEPHP value.

Any help appreciated!

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

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


Login and Registration form on same page/view

2010-06-10 Thread Andrei Mita
Hello,

How can I set up two forms that perform two separate actions from a single
page/view?

For instance, the 'welcome.ctp' page has two forms: register and login. How
can I get them to work with actions within UsersController?

Thanks,
Andrei

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

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


Re: components

2010-06-10 Thread emanuele
yes It is. But I dunno why the behaviour is different. In my app it's like
the override of components happens and
only the 'local' components it is available. What's do u think about?

thanks in advance.

On Thu, Jun 10, 2010 at 3:48 PM, John Andersen wrote:

> I am not sure what you asked for, but I will give it a try anyway :)
>
> If you define a component in the AppController, then the component
> will be available for all Controllers.
> If you define a component in a specific Controller, then the component
> will only be available in that Controller. The components defined in
> the AppController will also be available to the Controller.
>
> Was this what you were asking for?
> Enjoy,
>   John
>
>
> On Jun 10, 4:39 pm, emanuele  wrote:
> > Hello fellows,
> > I want to share same components between controllers and I want some local
> to
> > single controller.  If I re-define $components locally to the controller,
> > cake performs the override or the "array_merge" of the global and local
> > components variable?
> >
> > thanks in advance
> >
> > --
> > Emanuele Gringeri
> > Computer Engineer
> > University of Pisa
> > Be my mirror, my sword and shield
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



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

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

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


Re: Autocomplete is not working

2010-06-10 Thread John Andersen
Please provide more information!
1) Provide the code for the controller method that will deliver the
data.
2) Provide the code for the view that will return the delivered data.
3) Provide the code for the view in which the autocomplete is
required.

Enjoy,
   John

On Jun 10, 10:20 am, Vijay  wrote:
> Hello All,
>
> I am using the cakephp ajax autocomplete, but it is not giving me any
> response back.
>
> I tried with the other ajax methods like observerfield it is working
> fine. But when i try with the autocomplete it calls the function but
> returns with blank response. I am using prototype & jquery in this
> application. I applied jquery no-conflict for all the methods that are
> related with the jquery.
>
> Can anybody give me an idea why this is happening. I read some where
> that autocomplete will not work if we are using both jquery &
> prototype together.So i tried by removing all the jquery files &
> functions i used, but no luck.
>
> It is still giving me error. Also the error is "element is undefined
> in controls.js line no. 175"

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

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


Re: components

2010-06-10 Thread John Andersen
I am not sure what you asked for, but I will give it a try anyway :)

If you define a component in the AppController, then the component
will be available for all Controllers.
If you define a component in a specific Controller, then the component
will only be available in that Controller. The components defined in
the AppController will also be available to the Controller.

Was this what you were asking for?
Enjoy,
   John


On Jun 10, 4:39 pm, emanuele  wrote:
> Hello fellows,
> I want to share same components between controllers and I want some local to
> single controller.  If I re-define $components locally to the controller,
> cake performs the override or the "array_merge" of the global and local
> components variable?
>
> thanks in advance
>
> --
> Emanuele Gringeri
> Computer Engineer
> University of Pisa
> Be my mirror, my sword and shield

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

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


components

2010-06-10 Thread emanuele
Hello fellows,
I want to share same components between controllers and I want some local to
single controller.  If I re-define $components locally to the controller,
cake performs the override or the "array_merge" of the global and local
components variable?

thanks in advance

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

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

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


RE: controller and view extention problem.

2010-06-10 Thread hengki
Have u try to configure the route, / direct to your index.php???

marzuki
-Original Message-
From: fadhli -
Sent:  09:06:2010 10:44:08 am
Subject:  controller and view extention problem.

hi everyone.

i'm new in cakephp and i want to know how to make
http://www.example.com/home/index.php in cakePHP.
controller without 's' (home not homes) and to view page i must use php
(index.php not index.ctp) extextion.

sorry. i'm not good in english.

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

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

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

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


Re: PHPmyAdmin utf-8_general_ci problem

2010-06-10 Thread saidbakr
I get it from the collation values in PHPMyAdmin and I used it
previously in other web application - not using Cake - and worked
fine.

However, I tried your advice "utf8" only in database.php of cake and
it is worked fine. Thank you!

On Jun 10, 2:24 am, euromark  wrote:
> where did you get that from?
> its "just"
>
> 'encoding' => 'utf8'
>
> On 9 Jun., 23:18, saidbakr  wrote:
>
> > Hello,
>
> > I set my database config as follows:
>
> > var $default = array(
> >                 'driver' => 'mysql',
> >                 'persistent' => false,
> >                 'host' => 'localhost',
> >                 'login' => 'root',
> >                 'password' => 'pward',
> >                 'database' => 'site',
> >                 'encoding' => 'utf8_general_ci'
> >         );
>
> > The database collation is set to utf8_general_ci too. Everything is
> > displayed correctly on the application. However, when I try to view my
> > database records through PHPMyAdmin, I find any Arabic string value in
> > unreadable demonstration some thing like سعيد بكر
>
> > I need to know how to fix this?!

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

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


Re: Need advice for storing copies of data

2010-06-10 Thread Zaky Katalan-Ezra
Its a common issue usually with entities that should be print and any
further printing should be exactly like the original printing,  like
invoices, orders etc.

One way to do it is to add all the relevant data to the orders table.
You can add it in one column and add details like "address{city street ...};
copun{...}" and later parse the string or create a column for each value.

Another technique is to add start and end date to address, copun ect and in
new row enter only start date.
Updating the data of this row will create a new row with the
current_timestamp start date, duplicate all other data from the current row
and add the current date to the previous row end date.
This way the row with no end date is your current data row.
Its actually a common versioning mechanism that in use not only for this
case.

Now, when you want to view an old order you retrieve the row that was the
current address row when the order row was created.

I prefer the second approach if I reference the address in many tables and
the first approach if I use it only in one table.


On Thu, Jun 10, 2010 at 12:32 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> I would add some fields to the order table that record the product price,
> for sure. Then you can just change the product price in the products table
> and it will won't affect order history but will reflect in new orders. Same
> is probably true of coupon data, but that depends what info is stored there.
> If it is a discount (say 10%) and you think the coupon discount might vary
> in future, I'd store the coupon_id in the order table and extend the order
> fields to include net price, discount and gross price. This has an added
> advantage that you can query, sum and report on this data without having to
> do any joins or calculations.
>
> Addresses is a different issue because you presumably have to allow for (i)
> changing an address because it is incorrect (say wrong house number) and
> (ii) moving address, which means adding a new address. In this case I'd
> allow many addresses per customer and record the address_id the order is
> sent to. Your challenge will be making the user interface easy; are you
> updating this address or changing it - that language could get confusing.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.com
> http://www.classoutfit.com
>
> On 10 Jun 2010, at 10:17, keymaster wrote:
>
> > Our orders need to maintain information about the addresses orders
> > were delivered to, the coupons used, the price of the individual
> > products at the time the order was placed, etc.
> >
> > I have Product, Coupon and Address models which store all the
> > respective info.
> >
> > Once an order is placed, I need to “freeze a copy" of the Product/
> > Coupon/Address info, in order to associate it with the order, so that
> > forever into the future we can always know what the info was which
> > made up the order, at the time the order was placed.
> >
> > This is so that if later on a user changes his address, or the prices
> > of the products change, the order information will continue to reflect
> > the actual info at the time the order was placed.
> >
> > Where should I store the copied info?
> >
> > 1. In the same Product/Coupon/Address tables, and point the copied
> > records to the Order (ie. add a foreign key to Order, which is null
> > except for those records which belong to an Order). This creates a
> > wrinkle when listing the coupons on the system for the administrator -
> > we'd have to filter out the copies assigned to orders, and just list
> > the originals. It's also an issue if I want the model to prevent
> > duplicate coupon names.
> >
> > or,
> >
> > 2. Create new tables: OrderProduct/OrderCoupon/OrderAddress and  copy
> > all the info from the original Product/Coupon/Address tables into the
> > new tables, after the order is placed. (but then we have duplicate
> > tables, models, validation rules, associations, tables, etc.)
> >
> > From a data modelling perspective, what is the best way to deal with
> > this?
> >
> > Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
> >
> > You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/gro

Re: Need advice for storing copies of data

2010-06-10 Thread Jeremy Burns | Class Outfit
I would add some fields to the order table that record the product price, for 
sure. Then you can just change the product price in the products table and it 
will won't affect order history but will reflect in new orders. Same is 
probably true of coupon data, but that depends what info is stored there. If it 
is a discount (say 10%) and you think the coupon discount might vary in future, 
I'd store the coupon_id in the order table and extend the order fields to 
include net price, discount and gross price. This has an added advantage that 
you can query, sum and report on this data without having to do any joins or 
calculations.

Addresses is a different issue because you presumably have to allow for (i) 
changing an address because it is incorrect (say wrong house number) and (ii) 
moving address, which means adding a new address. In this case I'd allow many 
addresses per customer and record the address_id the order is sent to. Your 
challenge will be making the user interface easy; are you updating this address 
or changing it - that language could get confusing.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 10:17, keymaster wrote:

> Our orders need to maintain information about the addresses orders
> were delivered to, the coupons used, the price of the individual
> products at the time the order was placed, etc.
> 
> I have Product, Coupon and Address models which store all the
> respective info.
> 
> Once an order is placed, I need to “freeze a copy" of the Product/
> Coupon/Address info, in order to associate it with the order, so that
> forever into the future we can always know what the info was which
> made up the order, at the time the order was placed.
> 
> This is so that if later on a user changes his address, or the prices
> of the products change, the order information will continue to reflect
> the actual info at the time the order was placed.
> 
> Where should I store the copied info?
> 
> 1. In the same Product/Coupon/Address tables, and point the copied
> records to the Order (ie. add a foreign key to Order, which is null
> except for those records which belong to an Order). This creates a
> wrinkle when listing the coupons on the system for the administrator -
> we'd have to filter out the copies assigned to orders, and just list
> the originals. It's also an issue if I want the model to prevent
> duplicate coupon names.
> 
> or,
> 
> 2. Create new tables: OrderProduct/OrderCoupon/OrderAddress and  copy
> all the info from the original Product/Coupon/Address tables into the
> new tables, after the order is placed. (but then we have duplicate
> tables, models, validation rules, associations, tables, etc.)
> 
> From a data modelling perspective, what is the best way to deal with
> this?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Need advice for storing copies of data

2010-06-10 Thread keymaster
Our orders need to maintain information about the addresses orders
were delivered to, the coupons used, the price of the individual
products at the time the order was placed, etc.

I have Product, Coupon and Address models which store all the
respective info.

Once an order is placed, I need to “freeze a copy" of the Product/
Coupon/Address info, in order to associate it with the order, so that
forever into the future we can always know what the info was which
made up the order, at the time the order was placed.

This is so that if later on a user changes his address, or the prices
of the products change, the order information will continue to reflect
the actual info at the time the order was placed.

Where should I store the copied info?

1. In the same Product/Coupon/Address tables, and point the copied
records to the Order (ie. add a foreign key to Order, which is null
except for those records which belong to an Order). This creates a
wrinkle when listing the coupons on the system for the administrator -
we'd have to filter out the copies assigned to orders, and just list
the originals. It's also an issue if I want the model to prevent
duplicate coupon names.

or,

2. Create new tables: OrderProduct/OrderCoupon/OrderAddress and  copy
all the info from the original Product/Coupon/Address tables into the
new tables, after the order is placed. (but then we have duplicate
tables, models, validation rules, associations, tables, etc.)

>From a data modelling perspective, what is the best way to deal with
this?

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

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


Re: URL is showing wrong

2010-06-10 Thread Davor Ilic
I didn´t turn it off i´ve only changed in the core the Salt security values
for sha1 and numbvalues nothing else.

I´ve tested it. if i use the url like this:
http://my.site/clients/add_client
it
also work. Hm the html->link is only showing like this but htaccess is
working well if i try the link it can be that i´ve only have this issue.

lg,

Davor


2010/6/9 Dr. Loboto 

> Did you study cakebook link? You need:
>
> 1) mod_rewrite installed and enabled;
> 2) AllowOverride set to All for your site dir;
> 3) .htaccess files must exist, be valid (unchanged rewrite section
> actually), and be accessible by webserver (on *nix wrong rights
> prevent it).
>
> Also there can be problem with alias if you use it. And finally you
> can try to point DocumentRoot to app/webroot instead of root folder.
>
> But I still think that or you have mod_rewrite not working for your
> site OR you turned off pretty URLs in core.php
>
> On Jun 9, 5:16 pm, Davor Ilic  wrote:
> > it is enabled i also worked with it and cake wouldn´t show me a correct
> page
> > with this
> >
> > url:http://my.site/*app/webroot/index.php/*clients/add_client
> >
> > it have to be anything else. perhaps it have something to do with the
> > route.php or the .htaccess isn´t done well
> >
> > 2010/6/9 Dr. Loboto 
> >
> >
> >
> > > You need mod_rewrite enabled.
> >
> > >http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess
> >
> > > On Jun 7, 12:40 am, Davor Ilic  wrote:
> > > > Hi,
> >
> > > > my url is this:
> http://my.site/*app/webroot/index.php/*clients/add_client
> >
> > > > why is it like this it change after time but can´t say i´ve changed
> > > > something.
> >
> > > > i wont to show the link like this with "$html->link()" :
> > >http://my.site/clients/add_client
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: Installing another application inside my CakePHP 1.3 app

2010-06-10 Thread Bharadwaj Parthasarathy


This may not be the ideal choice, but consider using a sub domain  
[forum.mycakeapp.com] and have it pick up from a separate folder.


On a totally different note, IMHO godaddy sucks big time. Try getting  
a better host, which supports easy domain and sub domain redirection.


- Bharadwaj
http://webhostingangel.com

On 10-Jun-10, at 3:20 AM, Jeremy Burns | Class Outfit wrote:

The way I have done this in the past is to put the forum folder  
inside webroot and set up a subdomain, pointing the subdomain at the  
webroot/forum folder. It works fine (I have done it with phpBB3).


Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 04:24, saavedrajj wrote:


Hi, I have a trouble on my godaddy shared linux hosting account.

I want to install a PHP forum (phpBB3) in a /forum folder *

-app
-cake
-forum *
-plugins
-vendors

and I want to access this forum using this url:
http://www.MyCakeApp.com/forum

but, of course, the following error appears:
Missing Controller
Error:  ForumController could not be found.

Then I upload the forum folder at
-app/webroot/forum
BUT after the installation, these long url appears:
http://www.MyCakeApp.com/app/webroot/forum/www/index.php

I don't want the "app/webroot" string in the url.

Somody can help me?

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


You received this message because you are subscribed to the Google  
Groups "CakePHP" group.

To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this  
group at http://groups.google.com/group/cake-php?hl=en


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


You received this message because you are subscribed to the Google  
Groups "CakePHP" group.

To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this  
group at http://groups.google.com/group/cake-php?hl=en


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

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


Re: Installing another application inside my CakePHP 1.3 app

2010-06-10 Thread Jeremy Burns | Class Outfit
The way I have done this in the past is to put the forum folder inside webroot 
and set up a subdomain, pointing the subdomain at the webroot/forum folder. It 
works fine (I have done it with phpBB3).

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 10 Jun 2010, at 04:24, saavedrajj wrote:

> Hi, I have a trouble on my godaddy shared linux hosting account.
> 
> I want to install a PHP forum (phpBB3) in a /forum folder *
> 
> -app
> -cake
> -forum *
> -plugins
> -vendors
> 
> and I want to access this forum using this url:
> http://www.MyCakeApp.com/forum
> 
> but, of course, the following error appears:
> Missing Controller
> Error:  ForumController could not be found.
> 
> Then I upload the forum folder at
> -app/webroot/forum
> BUT after the installation, these long url appears:
> http://www.MyCakeApp.com/app/webroot/forum/www/index.php
> 
> I don't want the "app/webroot" string in the url.
> 
> Somody can help me?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Query question(s)

2010-06-10 Thread Ed Propsner
@John:

I "think" I'm able to wrap my head around the concept. My project is
extremely search heavy and if I'm following you correctly I can see a few
distinct advantages to your system. What I like the most is being able to
keep a history of searches within the session. I see a catastrophe just
waiting to happen 8-) but I'd like to have a go at it on a smaller scale
with one of my simpler searches and expand from there if all goes well. I
don't want to bite off more than I can chew so for now I'll tackle one
experiment at a time and thanks to Calvin this bitwise thing is working out
rather well and I'm close to wrapping it up. If it's okay with you I might
have a few other questions to throw at ya' when I'm ready to start (I'll
start a new post when the time comes).

- Ed

On Thu, Jun 10, 2010 at 3:34 AM, John Andersen wrote:

> I am using the DB to store the search criteria and the result. Not
> that the result creates more information, it creates only
> relationships between the stored search criteria and the existing
> records in other tables.
>
> The search is currently only based on one subject, either Article,
> Blog, Ebook, or Author, but can easily be expanded to search through
> all of the subjects.
>
> The Enquiry model stores the search criteria, thus getting an ID. The
> model has a HABTM relationship with the above subject models. The
> Enquiry model passes on the search criteria with the ID to the
> relevant subject model, which then executes the search within its
> records. The subject model passes on the resulting subject ids to the
> HABTM model, which stores the result.
>
> The Enquiry model ID is then passed back to the controller, which uses
> paginate to show the result.
>
> A short version of the ER diagram can be seen here:
> http://jaa.myftp.org:28880/examples/enquiry
>
> The way I have implemented this, also allows me to keep a history of
> search within the session. The history is also presented to the user,
> thus allowing the user to go back to previous results.
>
> Hope the above explanation is usefull to you :)
> Enjoy,
>   John
>
>
> On Jun 10, 10:04 am, Ed Propsner  wrote:
> [snip part for Calvin]
> > @John:
> >
> > Are you using the db to cache your search results on the server side? I
> > learned some hard lessons in the past and need to cut down the load
> wherever
> > I can. Is there any specific advantages to setting up your search the way
> > you have it?
> >
> > - Ed
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: problem in inserting data into PostgresSql

2010-06-10 Thread WebbedIT
Good luck with trying to develop a web application without rights to
modify the database schema!  Certainly not a project I would take on.

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

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


Re: Query question(s)

2010-06-10 Thread John Andersen
I am using the DB to store the search criteria and the result. Not
that the result creates more information, it creates only
relationships between the stored search criteria and the existing
records in other tables.

The search is currently only based on one subject, either Article,
Blog, Ebook, or Author, but can easily be expanded to search through
all of the subjects.

The Enquiry model stores the search criteria, thus getting an ID. The
model has a HABTM relationship with the above subject models. The
Enquiry model passes on the search criteria with the ID to the
relevant subject model, which then executes the search within its
records. The subject model passes on the resulting subject ids to the
HABTM model, which stores the result.

The Enquiry model ID is then passed back to the controller, which uses
paginate to show the result.

A short version of the ER diagram can be seen here:
http://jaa.myftp.org:28880/examples/enquiry

The way I have implemented this, also allows me to keep a history of
search within the session. The history is also presented to the user,
thus allowing the user to go back to previous results.

Hope the above explanation is usefull to you :)
Enjoy,
   John


On Jun 10, 10:04 am, Ed Propsner  wrote:
[snip part for Calvin]
> @John:
>
> Are you using the db to cache your search results on the server side? I
> learned some hard lessons in the past and need to cut down the load wherever
> I can. Is there any specific advantages to setting up your search the way
> you have it?
>
> - Ed

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

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


Autocomplete is not working

2010-06-10 Thread Vijay
Hello All,

I am using the cakephp ajax autocomplete, but it is not giving me any
response back.

I tried with the other ajax methods like observerfield it is working
fine. But when i try with the autocomplete it calls the function but
returns with blank response. I am using prototype & jquery in this
application. I applied jquery no-conflict for all the methods that are
related with the jquery.

Can anybody give me an idea why this is happening. I read some where
that autocomplete will not work if we are using both jquery &
prototype together.So i tried by removing all the jquery files &
functions i used, but no luck.

It is still giving me error. Also the error is "element is undefined
in controls.js line no. 175"

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

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


Re: Query question(s)

2010-06-10 Thread Ed Propsner
So I was a tad mistaken in my last post, displaying the tinyint data in user
profiles didn't cut down on the code, it added a touch more but that's okay,
it works just fine.

ie.

// SEEKING DATA
$values = array(1,2,4,8,16,32,64);
$storedValue = $user['Seeking']['seeking'];
$seeking = array();

if($values[0] & $storedValue){ array_push($seeking, 'Friends'); }
if($values[1] & $storedValue){ array_push($seeking, 'Someone to hang out
with'); }
if($values[2] & $storedValue){ array_push($seeking, 'Dating'); }
if($values[3] & $storedValue){ array_push($seeking, 'Serious relationship');
}
if($values[4] & $storedValue){ array_push($seeking, 'Someone to talk to /
email'); }
if($values[5] & $storedValue){ array_push($seeking, 'Intimate encounter');
}
if($values[6] & $storedValue){ array_push($seeking, 'Other'); }

$lookingFor = $text->toList($seeking, ',');

Seems okay, no? It works.

I ran a few "non-query" test cases and it seemed as though I was able to
find the intersecting bits without it having to be an exact match ... so far
so good.

The problem I'm running into is getting the query to accept the operator
without it throwing an error. I tried a few different ways but nothing seems
to work.

'conditions' => array(
 'Seeking.seeking &' => $seeking,  // <-- ??
 'Seeking.orientation' => $orientation,
 'User.gender' => $gender,
 'User.age BETWEEN ? AND ?' => array($minAge, $maxAge),
 'User.country' => $country,
 'User.region' => $region
 ),
@John:

Are you using the db to cache your search results on the server side? I
learned some hard lessons in the past and need to cut down the load wherever
I can. Is there any specific advantages to setting up your search the way
you have it?

- Ed

On Wed, Jun 9, 2010 at 8:09 PM, Ed Propsner  wrote:

> @Calvin:
>
> I have very little experience with bitwise operations but if the concept
> was totally escaping me and you saw this don't ever be hesitant to tell me
> I'm being a dummy. I have no reservations with diving into a tutorial and
> picking up on something new. I never expect the answer but will always
> appreciate you pointing me in the right direction where i can play around,
> experiment, and hopefully come up with a somewhat feasible solution on my
> own.
>
> I found a tutorial on bitwise operations and realized I was WAY far off
> from anything you were suggesting. You were right on the mark! (you the
> man!) I'll stop being cryptic and let you know I'm working on a makeover for
> a social networking site for singles. I'll never claim to know everything
> (even common sense things) I should know to make this all work but  what I
> do appreciate is people like you taking the time to point me in the right
> direction (and don''t forget John Anderson or Jeremy Burns) they have been
> instrumental in keeping me  on a direct path with Cake conventions. (I still
> have a few questions for you John but I'll get back to you) . Anyhow there
> was a time when I thought I was king $hit on turd island with conventional
> PHP but Cake has totally knocked the wind out of my sails but I'm totally
> addicted and can't see doing it any other way at this point (thank you guys
> for all your help ).
>
> Just displaying the data using tinyint cut my code down drastically. I
> haven't implemented the search yet and while I have a busy night in front of
> me (Stanley Cup finals and all) I'll start the search tomorrow and let you
> know how I make out. I'm not expecting any problems. Where have bitwise
> operations been all this time? I'll throw all my code at you sometime
> tomorrow. 8-)
>
> Cya  Then
>
> - Ed
>
> So ... being a complete idiot on bitwise operations I took the tutorial
> and O' my God, Thanks Calvin!
> .
>
>
> On Wed, Jun 9, 2010 at 4:20 PM, calvin  wrote:
>
>> Manipulating bit fields can be confusing at times (e.g. on Monday it
>> took me a while to realize the query in my original post didn't do
>> what I thought it would), and there's usually more than one way to do
>> it. But, basically, the way I approached it was to group all of the OR
>> conditions together and treat them collectively as another AND
>> condition (so the search has to match all of the ANDs, and at least
>> one of the ORs). That may not be what you want for your search, but it
>> demonstrates how you'd evaluate  AND & OR conditions.
>>
>> So taking your example of a record that has the bitfield value of 3,
>> if you want to do a purely OR search for Videos(1) or Photos(4) or
>> Text(8), you'd only use the first half the query I wrote:
>>
>> Model.type & $orOptions > 0
>>
>> So the database engine would evaluate:
>>
>> 3 & 13 > 0
>>
>> The bit fields in big-endian notation would be:
>> 0011 (3)
>> 1101 (13)
>>
>> So the result is 0001 because both the search params and the record
>> field have the bit for "Video" set. And since 1 > 0, that record would
>> be returned as a match.
>>
>> To perform the same search using AND, you'd simply check to see if 3 &
>> 13 = 13, which it obviously do

Re: can i use html5 in cakephp?

2010-06-10 Thread Sam Sherlock
Paul Irish has this repo on github (which uses modernizr that addresses
issues with browsers that don't support new stuff)
http://github.com/paulirish/frontend-pro-template




> Modernizr: a JavaScript library allowing you to use CSS3 & HTML5


>while maintaining control over unsupported browsers


http://www.modernizr.com/
http://caniuse.com/ - html5 readiness in tabular form
http://html5doctor.com/how-to-get-html5-working-in-ie-and-firefox-2/

Mark-story.com is HTML5 (cakephp)

I have been thinking that making a html5helper that extends the htmlhelper
is the way to go;

a tentative attempt works without error (but I only added support for
article tag so far; that and the doctype)

or would it be better to update the html helper and place it in
app/views/helpers?

- S





On 10 June 2010 06:08, Jeremy Burns  wrote:

I want to adopt HTML 5 - but I worry about backwards compatibility - again.
> Anyone got any good resources on safe degredation?
>
> Jeremy Burns
> jeremybu...@me.com
>
>
>
> On 10 Jun 2010, at 06:04, Andy Dirnberger wrote:
>
>
> > According to the W3C, they expect to reach the recommendation
>
> > milestone for HTML5 in Q3 2010.
> http://www.w3.org/2007/03/HTML-WG-charter.html#deliverables
>
> >
>
> > On Jun 9, 11:11 pm, calvin  wrote:
>
> >> You can "use" whatever you want, but HTML5 is nowhere near completion.
>
> >> It's not even expected to become a W3C recommendation until 2022, and
>
> >> few browsers besides Chrome and Safari even support half of the
>
> >> specification.
>
> >>
>
> >> On Jun 9, 6:40 am, ytbryan  wrote:
>
> >>
>
> >>
>
> >>
>
> >>> how do I render html element in cakephp?
>
> >>
>
> >>> Thanks!
>
> >>
>
> >>> /Bryan
>
> >
>
> > Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> >
>
> > You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
>
> > To post to this group, send email to cake-php@googlegroups.com
>
> > To unsubscribe from this group, send email to
>
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
>
> To post to this group, send email to cake-php@googlegroups.com
>
> To unsubscribe from this group, send email to
>
>  
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>

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

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