Re: CakePHP ACL and paginate
Fow retrive all documents that a user can access and how can I paginate them I should retrieve with some queries all the ids of the documents that a user can access and then do a CakePHP find('all') with an IN condition on all ids. Now for me this is very not efficient and if I have thousands of ids it become impossible to do. I would ask if there is a best practise to do it Many Thanks On Friday, 1 February 2013 18:26:23 UTC+1, André Luis wrote: > > I am not sure, but i think you can do it with Containable behavior or with > joins and conditions > > Em quinta-feira, 31 de janeiro de 2013 14h30min37s UTC-2, byqsri escreveu: >> >> Hi >> I have these Model : >> User (User belongsTo Group) >> Group (Group hasMany User) >> Document >> >> I manage permissions to access to documents with ACL (User and Group like >> Aro and Document like Aco) >> >> Now I have two questions : >> >> 1)How can I retrive all documents that a user can access and how can I >> paginate them? >> >> 2)How can I retrive all users that can access to a certainly document and >> how can I paginate them? >> >> I would find best solutions about these questions (i.e. cn the lowest >> number of not heavy queries) >> >> Many Thnaks >> > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: CakePHP ACL and paginate
Can someone help me about this? Many Thanks On Thursday, 31 January 2013 17:30:37 UTC+1, byqsri wrote: > > Hi > I have these Model : > User (User belongsTo Group) > Group (Group hasMany User) > Document > > I manage permissions to access to documents with ACL (User and Group like > Aro and Document like Aco) > > Now I have two questions : > > 1)How can I retrive all documents that a user can access and how can I > paginate them? > > 2)How can I retrive all users that can access to a certainly document and > how can I paginate them? > > I would find best solutions about these questions (i.e. cn the lowest > number of not heavy queries) > > Many Thnaks > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
CakePHP ACL and paginate
Hi I have these Model : User (User belongsTo Group) Group (Group hasMany User) Document I manage permissions to access to documents with ACL (User and Group like Aro and Document like Aco) Now I have two questions : 1)How can I retrive all documents that a user can access and how can I paginate them? 2)How can I retrive all users that can access to a certainly document and how can I paginate them? I would find best solutions about these questions (i.e. cn the lowest number of not heavy queries) Many Thnaks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Particular find operation to do
Yes the table is indexed correctly. The problem is in the length of the query. On Thursday, 20 December 2012 10:30:46 UTC+1, Jeremy Burns wrote: > > Is the table indexed correctly? > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 20 Dec 2012, at 08:50:19, byqsri > > wrote: > > If the query is too big you can get this error : > *SQL Error:* 1153: Got a packet bigger than 'max_allowed_packet' bytes > > My query is : > SELECT `User`.`id` FROM `users` AS `User` WHERE `User`.`id` NOT IN > (1,2,3,4,5. > > I have testing this query on my sql server and I get the previuos error if > I have 7 'id' in NOT IN conditions. > I can't modify max_allowed_packet in my production server > > I think that it isn't the best solutions > > > On Wednesday, 19 December 2012 18:21:06 UTC+1, byqsri wrote: >> >> Hi >> I'm newbie with cakephp >> I have model User, model Group and model UsersGroup ( an user can belongs >> to many groups and a group can have many users). >> I would ask how in CakePHP can I find all users that not belong to the >> Group group_id (where group_id is a generic int value) >> Many thanks >> > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake...@googlegroups.com > . > To unsubscribe from this group, send email to > cake-php+u...@googlegroups.com . > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Particular find operation to do
If the query is too big you can get this error : *SQL Error:* 1153: Got a packet bigger than 'max_allowed_packet' bytes My query is : SELECT `User`.`id` FROM `users` AS `User` WHERE `User`.`id` NOT IN (1,2,3,4,5. I have testing this query on my sql server and I get the previuos error if I have 7 'id' in NOT IN conditions. I can't modify max_allowed_packet in my production server I think that it isn't the best solutions On Wednesday, 19 December 2012 18:21:06 UTC+1, byqsri wrote: > > Hi > I'm newbie with cakephp > I have model User, model Group and model UsersGroup ( an user can belongs > to many groups and a group can have many users). > I would ask how in CakePHP can I find all users that not belong to the > Group group_id (where group_id is a generic int value) > Many thanks > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Particular find operation to do
If I have a milion of users I can't use a NOT IN condition On Wednesday, 19 December 2012 18:21:06 UTC+1, byqsri wrote: > > Hi > I'm newbie with cakephp > I have model User, model Group and model UsersGroup ( an user can belongs > to many groups and a group can have many users). > I would ask how in CakePHP can I find all users that not belong to the > Group group_id (where group_id is a generic int value) > Many thanks > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Particular find operation to do
Hi I'm newbie with cakephp I have model User, model Group and model UsersGroup ( an user can belongs to many groups and a group can have many users). I would ask how in CakePHP can I find all users that not belong to the Group group_id (where group_id is a generic int value) Many thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Problem with Cake shell
Hi I try to use cake shell but I get an fatal error because in my bootstrap.php I use App:build() and the fatal error tells me that th method App::build is undefined when I run my cake shell instead with a normal web page all works fine Many Thanks Marco -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Media Plugin of David Persson is for cake 1.3 and for cake 2.0?
Hi I would open a discussion between all developers that use cakephp. I think that a frequent problem in development is the File Upload. For Cake 1.3 exists the fantastic Media Plugin of David Persson that for me is it the best plugin about File Upload. But Media Plugin of David Persson hasn't a version for Cake 2.0. My question is : Which is the best plugin to use in Cake 2.0 to manage File Upload? Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Question about caching with Cakephp
I try Cache::delete('*_model2_*'); but it doesn't work Has someone any suggestions about this? Many Thanks On 8 Feb, 09:57, byqsri wrote: > > you could modify this behavior to save in a way that cross-table- > > deletion is easier possible > > for instance saving all involved models in the filename: > > > model1_model2_model3_hashname > > > so if you have changes in model2, you can delete *_model2_* > > that's just an idea. it can get problematic with many models and > > therefore too lang filenames > > This is a good idea > With CakePHP if I call Cache::delete('*_model2_*'); I delete all > keys with _model2_ in name? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: High scalability with CakePHP
Many Thanks for your answers. It seems to me that you have experience with how scale a cakephp system About DB : I have find this to configure Master and Slaves http://bakery.cakephp.org/articles/gman.php/2009/01/20/master-slave-support-also-with-multiple-slave-support. But it seems very simple perhaps there is some hidden complications. Another question about this : What is the best practise to replicate the data instantly from Master to Slaves when there is a write operation? About CakePHP : What is the best practise to deploy the cakephp code updates on many servers instantly? Rsync? Exists a configurable automatic tool to do this? Many Thanks On 8 Feb, 17:05, Justin Edwards wrote: > If your concern is bandwidth, host all of your static files on a CDN. > > If your concern is processing power, distribute your load through many > servers (you can use a load balancer, apache, lighttpd, nginx or cherokee) > and use mysql or a cache backend for your session storage. > > If your concern is database usage (IO), cache most of your data (memcached > would be the best here). You can also use a master and slave database > setup. Make all of your reads from your slave and your writes to your > master. > > If you distribute your load between servers, you will need to make sure > files are synchronized, If you have file upload you need to make sure that > you force users to upload to one server and then rsync your data out from > that server to your others. > > You can also host your data off of an NFS mount so that you don't need to > synchronize your data. > > > > > > > > On Wed, Feb 8, 2012 at 9:03 AM, byqsri wrote: > > Hi > > I have a web application where users can uplaod file,images and work > > with some datas in db > > I use CakePHP ,MySQL,Memcache. > > I have a server with Apache and for the file's uploading ( I use Media > > Plugin of David Persson). > > I have another server with MySQL > > For the moment I have 500 users and all works fine. > > My problem is that in the next months I can have a very fast increment > > of users and this configuration is not sufficient for me. > > I have tried to search on Google about how scaling a web app with > > CakePHP with scaling of MySql and scaling CDN but I didn't find > > anything really concrete I would ask if someone with experience about > > this if he can suggest to me something resources (books,articles,code > > suggestions) ffrom which I can begin to work. > > Many Thanks > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > 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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
High scalability with CakePHP
Hi I have a web application where users can uplaod file,images and work with some datas in db I use CakePHP ,MySQL,Memcache. I have a server with Apache and for the file's uploading ( I use Media Plugin of David Persson). I have another server with MySQL For the moment I have 500 users and all works fine. My problem is that in the next months I can have a very fast increment of users and this configuration is not sufficient for me. I have tried to search on Google about how scaling a web app with CakePHP with scaling of MySql and scaling CDN but I didn't find anything really concrete I would ask if someone with experience about this if he can suggest to me something resources (books,articles,code suggestions) ffrom which I can begin to work. Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Question about caching with Cakephp
> you could modify this behavior to save in a way that cross-table- > deletion is easier possible > for instance saving all involved models in the filename: > > model1_model2_model3_hashname > > so if you have changes in model2, you can delete *_model2_* > that's just an idea. it can get problematic with many models and > therefore too lang filenames > This is a good idea With CakePHP if I call Cache::delete('*_model2_*'); I delete all keys with _model2_ in name? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Question about caching with Cakephp
I don't think that this plugin is useful to do what I want However I must manage the deletion of the cache records in each model after save/edits On 7 Feb, 19:11, 100rk wrote: > Cool approach is this one > > https://github.com/ndejong/CakephpAutocachePlugin -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Question about caching with Cakephp
HI ... I have a set of cached query data that holds info from various Models. So the Blogs “Post” has the cached User, Avatar, Blog and Post Model data. Now how is the best way to delete the cached data across these records? If I edit any of the data(User, Avatar, Blog or Post) that held in the cached data I need to delete the cached record inorder to have it reflect the changes. Is there a simple way / behavior to assist with this? If not you have to manually request to delete the cache records in each model after save / edits? Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
CakePHP Media Plugin of David Persson and CDN
Hi I use the fantastic Media Plugin of David Persson. For now I have all my uploaded files in the same server I would ask if someone uses this plugin with some CDN and how use it with CDN? Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
How access to $this->webroot controller's variable from a model?
Hi I would ask how can I access to "$this->webroot" controller's variable from a model? Many Thanks Marco -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
CakePHP Media Plugin quality of image
Hi I'm using Media Plugin of David Persson (https://github.com/ davidpersson/media) and it is very very useful. I would ask a question that I can't resolve. My question is that when I do a filtering (fitInside) of an upload image Configure::write('Media.filter.image', array( 's' => array('convert' => 'image/jpeg', 'fitInside' => array(124, 81)) ) ); I note that the quality of the filtered image is not good I would ask if there is a method to improve the quality. Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Form Helper error in method year with field with multiple name
If I use echo $form->year('test.0.variables', 2008, 2010); with 3 fields then it works I think that is a bug of cake Can someone help me to control where is the problem? Many Thanks On 5 Ott, 16:08, byqsri wrote: > Can someone give me anu suggestion? > Many thanks > > On 5 Ott, 11:10, byqsri wrote: > > > > > > > > > Hi , I have a problem with the helper Form with the method year when I > > have field with name that are some incapsulated array . > > For example If I write : > > echo $form->year('test.0.variables.test', 2008, 2010); . > > The name of the resulting select is wrong > > instead of data[test][0][variables][test] it is data[NameofModel] > > > The form->select('test.0.variable.test') instead works perfecly > > I use cake 1.2.9 > > Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Form Helper error in method year with field with multiple name
Can someone give me anu suggestion? Many thanks On 5 Ott, 11:10, byqsri wrote: > Hi , I have a problem with the helper Form with the method year when I > have field with name that are some incapsulated array . > For example If I write : > echo $form->year('test.0.variables.test', 2008, 2010); . > The name of the resulting select is wrong > instead of data[test][0][variables][test] it is data[NameofModel] > > The form->select('test.0.variable.test') instead works perfecly > I use cake 1.2.9 > Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Form Helper error in method year with field with multiple name
Hi , I have a problem with the helper Form with the method year when I have field with name that are some incapsulated array . For example If I write : echo $form->year('test.0.variables.test', 2008, 2010); . The name of the resulting select is wrong instead of data[test][0][variables][test] it is data[NameofModel] The form->select('test.0.variable.test') instead works perfecly I use cake 1.2.9 Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Very strange behaviour of CAKEPHP on login
Hi I have my CAKEPHP application ... I have create a demo user and an action in users controller called "demo" to allow access like demo user: function demo { $this->Auth->logout(); $this->data[$this->Auth->fields['username']] = 'demo'; $this->data[$this->Auth->fields['password']] = $this->Auth- >password('demo'); if (!($this->Auth->login($data))) { $this->redirect($this->Auth->loginAction); } else { $this->Session->delete('Auth.redirect'); //print_r($this->Session->read('Auth.User.username'));die(); $this->Auth->loginRedirect = array('admin' => false,'controller' => 'demo', 'action' => 'index'); } } Now in a page of another site I have add a link that redirect to / users/demo of my cake application. But If I click on this link I don't login in cakephp application and I redirect to login page instead that on /demo/index But If i uncomment the line print_r($this->Session- >read('Auth.User.username'));die(); and the I reclick on link I can see that it show the correct username "demo". Can someone help me about this problem? Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Login to a CakePHP application from another site doesn't work
For the thing that I must do I think that is excessive use OAuth or OpenID. Do a simple autologin with javascript I think that is the better solution. Do CakePHP forbid to do a login from a page that isn't the loginAction of Auth component ? On 15 Set, 08:04, Zaky Katalan-Ezra wrote: > Use oauth <http://oauth.net/>, openid <http://openid.net/> ... > > > > > > > > > > On Wed, Sep 14, 2011 at 7:56 PM, byqsri wrote: > > Hi > > I have my web application in CakePHP . > > All works fine. > > Now I would do an autologin in my web application from another site . > > To do this I have done a identical login form in my site and with > > javascrpt I post it to my web application. > > But it doesn't work . With this method I can't login to my web > > application . I always redirect tio login page. > > I have verify that the session is lost between the login and the > > redirect to initial page of my web application. > > Can someone help me about this? > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > 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 > > -- > Regards, > Zaky Katalan-Ezra > QA Administratorwww.IGeneriX.com > Sites.IGeneriX.com > 054-7762312 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Login to a CakePHP application from another site doesn't work
Hi I have my web application in CakePHP . All works fine. Now I would do an autologin in my web application from another site . To do this I have done a identical login form in my site and with javascrpt I post it to my web application. But it doesn't work . With this method I can't login to my web application . I always redirect tio login page. I have verify that the session is lost between the login and the redirect to initial page of my web application. Can someone help me about this? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pagination with POST parameters
My search box is about a field is in a hasMany association of the Model that I use and not a field directly of the Model. Can I use CakeDc Search Plugin also in this case? Many thanks On 8 Giu, 08:27, Ryan Schmidt wrote: > Why not just make the search form GET in the first place? > > On Jun 8, 2011, at 01:00, Walther wrote: > > > > > > > > > What you want is a PRG (Post/Redirect/Get) pattern. Basically the user > > POSTs the search form, your script redirects the user back to the > > referrer page, but with a new GET parameter set to their search > > parameter. > > > Take a look at the CakeDC Search plugin (https://github.com/cakedc/ > > search) it includes all the functionality you want (plus more), is > > free and is amazingly versatile. > > > On Jun 7, 9:37 am, byqsri wrote: > >> Hi > >> I have a search box ( a form with some parameters). > >> To show the results of the search I use the paginator helper. > >> Now my problem is the if I click on "Next" link I lost the parameters > >> search . > >> How can I do to keep the parameters search?How can I do a pagination > >> with POST parameters? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Pagination with POST parameters
Hi I have a search box ( a form with some parameters). To show the results of the search I use the paginator helper. Now my problem is the if I click on "Next" link I lost the parameters search . How can I do to keep the parameters search?How can I do a pagination with POST parameters? Many Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: UE Cookie Directive and CakePHP
I know that Yahoo has already provided an opt-out button from its site to do this. Add this options to CakePHP HTML helper? On 22 Mar, 13:16, AD7six wrote: > On Mar 22, 11:50 am, byqsri wrote: > > > Hi > > I would ask if,when and how CakePHP will be aligned with the > > directive "Cookie Directive" of UE? > > What is it you're expecting cake to do wrt that directive. > > AD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
UE Cookie Directive and CakePHP
Hi I would ask if,when and how CakePHP will be aligned with the directive "Cookie Directive" of UE? Thanks Byqsri -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
CakePHP and ExtJS
Hi Is someone that has integrated ExtJS with CAKEPHP? Many Thanks Marco -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Possible bug relative to use of memcache
Have someone any suggestion about this? On 6 Ott, 23:19, "marco.rizze...@gmail.com" wrote: > Hi > I have installed memcache on my system. > I have setted CakePHP to use memcache. > I have setted the Configure::write('Security.level', 'medium'); > All seems to work but sometimes I lost the session. In particular I > note this when I do a sequence of ajax call. > A simple example to show this error is: > > /*My Controller*/ > > .. > function test($show=0){ > if ($show==1){ > $this->layout='ajax'; > echo ""; > > print_r($this->Session->read($this->Auth->sessionKey)); > echo ""; > die(); > } > } > ... > > /*My Test View*/ > echo $ajax->link( > 'test', > array( 'controller' => 'my_controller', 'action' => 'test','1'), > array( > 'update' => 'test_1', > 'after' => $ajax->remoteFunction( > array( > 'url' => array( > 'controller' => 'my_controller', 'action' => > 'test','1'), > 'update' => 'test_2', > ) > ), > ), > null,false > ); > ?> > > > > I hope someone can help me about this. > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Question about on merge two different Model paginate
And to do pagination? how can I do? Thanks On 1 Ott, 18:46, brian wrote: > On Thu, Oct 1, 2009 at 9:08 AM, byqsri wrote: > > > Can someone help me about this? > > > On 7 Set, 09:13, "marco.rizze...@gmail.com" > > wrote: > >> Hi > >> I have this situation: > >> I have a model Event and a model News , Both models have the field > >> 'created' . > >> Now in my view I would create a single list where there is there are > >> both each others order by created. > >> Example > > >> Event 1 07/09/09 > >> News 1 07/09/09 > >> News 2 06/07/09 > >> .. > >> .. > >> .. > > >> I would manage this list with paginate. > >> Is someone can suggest me a pattern that I can use to do a thing like > >> this? > >> Many thanks > > I'm sure Set class can help with this. I had an idea but it's not > quite there, I think. > > Say these are your data (inner arrays would all contain more key => > val, of course); > > $events = array( > 'Event' => array( > array('created' => '2007-10-02'), > array('created' => '1998-02-03'), > array('created' => '2001-04-30'), > array('created' => '2002-05-23'), > array('created' => '2003-07-21') > ) > ); > $news = array( > 'News' => array( > array('created' => '2003-04-12'), > array('created' => '2003-10-24'), > array('created' => '2000-01-03'), > array('created' => '2000-01-05'), > array('created' => '2000-05-28') > ) > ); > > I'd think that this would do it:. > > $foo = Set::sort( > Set::merge($events, $news), > '{s}.{n}.created', 'desc' > ); > > But that returns an empty array. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about on merge two different Model paginate
Can someone help me about this? On 7 Set, 09:13, "marco.rizze...@gmail.com" wrote: > Hi > I have this situation: > I have a model Event and a model News , Both models have the field > 'created' . > Now in my view I would create a single list where there is there are > both each others order by created. > Example > > Event 1 07/09/09 > News 1 07/09/09 > News 2 06/07/09 > .. > .. > .. > > I would manage this list with paginate. > Is someone can suggest me a pattern that I can use to do a thing like > this? > Many thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How use ACL in a particular situation
Have anybody some idea about this? On 29 Set, 09:32, "marco.rizze...@gmail.com" wrote: > Hi > I have a design question on ACL that I would use in my system. > The problem is my system is a bit different from standard. > I have users that can be belong to many teams. > So a user can belong to two,three,four etc... teams. > Moreover I have to manage the access of users to a document's list. > To do this i would do this with ACL because I have to manage > permissions for access to documents. > M question is how define the ARO tree since I have user that belong to > many teams (sometimes the permissions for access to documents are > defined by teams, exactly If a user belongs to a team that can't read > a document and belongs to a team that can read a document the user can > read the document)? > How is parentNode() function in user model? > Many Thanks > Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question on the method input of Form helper relative to type 'date'
Sorry I have mistaked :-) I would get: . . On 18 Set, 12:05, WebbedIT wrote: > now I've stared at them for 5 mins and I am certain they are > identical :P > > On Sep 17, 8:17 am, byqsri wrote: > > > I get > > > . > > . > > > > Instead of: > > > . > > . > > > > > > You should get: > > > > . > > > . > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP and scalability
My table is about 30 records with only 5 fields It's a jointable of a HABTM relation. But I use this table in some INNER JOIN in some queries that are very slowly. I use memcache. In these cases what is the best practise to consider? On 21 Set, 20:20, "Ma'moon" wrote: > i was successfully able to handle tables with more than 200 records > "yes, above 2 million records!" with CakePHP and with a very acceptable > performance and speed, the first thing that you should be thinking of is > sharding the database into smaller chunks "DBs", second thing is enabling > "memcached" to reduce DB access "specially reducing the master DB hits", > thirdly enable APC or whatever bytecode cacher you might be able to use > "this will gain your web server a very good performance boost", and finally > set the debug level for you cake app to "0" to cache the tables "DESC" > operations. > Taking all the above into consideration CakePHP can be a very powerful > framework to handle huge databases!. > > On Mon, Sep 21, 2009 at 8:50 PM, Miles J wrote: > > > Well how big is your table? I have tables with over 200,000+ rows and > > it works just fine. > > --http://phpirate.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP and scalability
My big problem is that I have some tables there are very and very huge. I have add indexes but the situation is not improved much Is someone can suggest me how can I manage very large table with mysql and CakePHP without scaling mysql? On 21 Set, 17:25, "j0n4s.h4rtm...@googlemail.com" wrote: > In general, besides the noted tips: > - Take a look at lazyloader/lazyloading models > - Do not use Model->recursive > 0, use Containable. You might look > into Translateable as well > - DEBUG sql outputs, see where the heavy load is happening. > > On Sep 21, 9:56 am, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have developed my web application with CakePHP. > > For the moment I use one Apache server and one MySql server. > > Now I have noted that my application is getting slow because the > > numbers of users is increasing. > > So I have decided that is the time to scale my architecture. > > I have tried to find some suggestions on this forum about how scale > > CakePHP but I haven't found anything. > > Can someone help me about this with some example, link, tutorial etc.? > > Many Thanks > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Question on the method input of Form helper relative to type 'date'
I get . . Instead of: . . > You should get: > > . > . > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question on the method input of Form helper relative to type 'date'
I get also the model name . Is it possible to obtain: . . Instead of: . . On 14 Set, 09:38, WebbedIT wrote: > Sure: > > $form->input(StartDate, array('type'=>'date')); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question on the method input of Form helper relative to type 'date'
Please Can you me make an example ? On 12 Set, 09:52, WebbedIT wrote: > Should work without the ModelName if you supply 'type'=>'date' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question on the method input of Form helper relative to type 'date'
Ok ... all is right ... But this 'start_date' field isn't a model's field but a date to do a search. I can use it like a Model.start_date but conceptually this is wrong. On 11 Set, 11:04, WebbedIT wrote: > When you move away from the conventions and things go wrong, it's so > much harder to debug. What does e($form->input > ('ModelName.start_date'); produce? > > It should produce > > . > . > > > I reckon the problem lies somewhere in the fact your resultant code > does not have a ModelName and your field is startDate (which should be > start_date using convention) yet your telling $form->input to use > starDate (missing 't'). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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 with Security component and form submit
The url is the same. With FireFox plugin Tamper Data I get status header "Not Found - 404" On 10 Set, 12:14, Bert Van den Brande wrote: > What's the url of the page with the form, and what's the url of the white > page ? > > Maybe inspect traffic with the FireFox plugin Tamper Data to detect > what's going on ... > > On Thu, Sep 10, 2009 at 11:46 AM, byqsri wrote: > > > I try to set the debug mode to 1 and to 2 but there is no errors > > > On 10 Set, 11:37, Bert Van den Brande wrote: > >> A clean white page suggests an error that can't be shown because you > >> have set the debug level to 0. > > >> Try setting it to 1 or 2 and see if the 'white page' now outputs an > >> error message. > > >> On Thu, Sep 10, 2009 at 11:32 AM, byqsri wrote: > > >> > On 10 Set, 11:16, WebbedIT wrote: > >> >> How do you know if this is a security component issue as the form is > >> >> not being submitted to a Controller/Action to be processed?!? > > >> > Because if I don't use the Security component the form is correctly > >> > submit. > > >> >> What should happen if the form submits to the url /test/? > >> > It doesn't anything.Simply it reloads the page. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with Security component and form submit
I try to set the debug mode to 1 and to 2 but there is no errors On 10 Set, 11:37, Bert Van den Brande wrote: > A clean white page suggests an error that can't be shown because you > have set the debug level to 0. > > Try setting it to 1 or 2 and see if the 'white page' now outputs an > error message. > > On Thu, Sep 10, 2009 at 11:32 AM, byqsri wrote: > > > On 10 Set, 11:16, WebbedIT wrote: > >> How do you know if this is a security component issue as the form is > >> not being submitted to a Controller/Action to be processed?!? > > > Because if I don't use the Security component the form is correctly > > submit. > > >> What should happen if the form submits to the url /test/? > > It doesn't anything.Simply it reloads the page. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with Security component and form submit
On 10 Set, 11:16, WebbedIT wrote: > How do you know if this is a security component issue as the form is > not being submitted to a Controller/Action to be processed?!? > Because if I don't use the Security component the form is correctly submit. > What should happen if the form submits to the url /test/? It doesn't anything.Simply it reloads the page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: OAuth Serving
http://code.42dh.com/oauth/ On 24 Ago, 22:28, eusef wrote: > Hi all, > > Has anyone had any experince with putting together anOAuthserver for > an existing service using a library for PHP or a component for Cake? > > T.I.A. > > Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Error on syntax of localization file default.po
Ok ... thanks But I use a behaviour that validates the extension and return the error message like "The submitted file extension is not permitted, only jpeg,png,gif permitted." where the extension's type can change. In my view I would use a code like: __d('errors',$messageError) because prior I don't know which is the error and which is the field with error . So for use variables inside localization I must change heavily the behaviour and the view? Is there a different solution to do this without to change anything? Thanks On 3 Set, 18:26, Miles J wrote: > Because your doing it wrong. Should be done like so: > > English version: > en/errors.po > > msgid "fileExtRestricted" > msgstr "The submitted file extension is not permitted, only %s > permitted." > > Foreign versions: > sp/errors.po > > msgid "fileExtRestricted" > msgstr "L'estensione del file caricato non è permessa, solo %s sono > permesse." > > All the msgids/slugs must be the same, all that changes is the msgstr. > > So once you have done that, in your view your would do: > > sprintf(__d('errors', 'fileExtRestricted', true), 'jpeg, gif, png'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Searching non existent related models
The solution is: 'User.name' => NULL On 27 Lug, 09:03, byqsri wrote: > It doesnt work. > The resulted query is : > `User`.`name` = 'IS NULL' > > On 27 Lug, 04:30, "Dr. Loboto" wrote: > > > > > Probably something like this: > > > $this->paginate['conditions'] = array( > > 'OR' => array ( > > 'User.name' => 'IS NULL', > > 'Recipe.id' => 'IS NULL' > > ) > > ); > > > On Jul 24, 2:32 am, iFeghali wrote: > > > > Hello All, > > > > Say I have a User hasMany Recipes. Now I want to search for all users > > > with an empty name OR users that doesn't have any recipe. How do I > > > turn that piece of code in what I want: > > > > $this->paginate['conditions'] = array('User.name' => 'IS NULL'); > > > $this->set('users', $this->paginate()); > > > > Can I do that in a single query condition ? > > > > Thank you.- Nascondi testo citato > > > - Mostra testo citato -- Nascondi testo citato > > - Mostra testo citato - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Searching non existent related models
It doesnt work. The resulted query is : `User`.`name` = 'IS NULL' On 27 Lug, 04:30, "Dr. Loboto" wrote: > Probably something like this: > > $this->paginate['conditions'] = array( > 'OR' => array ( > 'User.name' => 'IS NULL', > 'Recipe.id' => 'IS NULL' > ) > ); > > On Jul 24, 2:32 am, iFeghali wrote: > > > > > Hello All, > > > Say I have a User hasMany Recipes. Now I want to search for all users > > with an empty name OR users that doesn't have any recipe. How do I > > turn that piece of code in what I want: > > > $this->paginate['conditions'] = array('User.name' => 'IS NULL'); > > $this->set('users', $this->paginate()); > > > Can I do that in a single query condition ? > > > Thank you.- Nascondi testo citato > > - Mostra testo citato - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Searching non existent related models
I have the same problem. Is there someone than can help? Many Thanks On 23 Lug, 21:32, iFeghali wrote: > Hello All, > > Say I have a User hasMany Recipes. Now I want to search for all users > with an empty name OR users that doesn't have any recipe. How do I > turn that piece of code in what I want: > > $this->paginate['conditions'] = array('User.name' => 'ISNULL'); > $this->set('users', $this->paginate()); > > Can I do that in a single query condition ? > > Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination add parameter to type of find to the url
Is someone can help me about this? On 21 Lug, 16:03, "marco.rizze...@gmail.com" wrote: > Hi > I use pagination in a my view , in the relative action of controller I > use the find('matches') that Nate has shared in bakery. > Now in the view in helper paginator is added a "matches" parameter to > the url. > Is It possible to eliminate this from the url that is created by > pagination helper? > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Containable and Pagination
Sorry But I will get the pagination on the users In the view I must list all users that are in relation with Document with id=$id and I would ,if it is possible using the pagination for paginate the users. On 6 Lug, 21:56, Miles J wrote: > In the controller: > > var $paginate = array( > 'Document' => array( > 'fields' => array('Document.*'), > 'contain'=>array( > 'User'=>array( > 'fields' => array('User.id','User.surname','User.name'), > 'conditions' => array('User.active'=>1) > ) > ) > ) > ) > ); > > $paging = $this->paginate('Document', array('Document.id'=>$id)); > > On Jul 6, 7:37 am, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have a containable model. > > I would apply the pagination on the results inside contain. > > Example: > > > Models : Document hasMany User > > > In documents_controller.php I have this: > > > $document=$this->Document->find('first', > > array( > > 'fields' => array('Document.*'), > > 'conditions' => array('Document.id'=>$id), > > 'contain'=>array( > > 'User'=>array( > > 'fields' => array('User.id','User.surname','User.name'), > > 'conditions' => array('User.active'=>1) > > ) > > ) > > ) > > ); > > > In the view I would get the pagination on the users. > > Is it possible to do this? > > How I set "paginate" to do this? > > Many Thanks > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: BelongsTo Fields Error
No Even if I Try the fields without the table qualifier: 'id,surname,name' I can get username and password. On 2 Lug, 14:48, Rick wrote: > Try the fields without the table qualifier: 'id,surname,name' > > Rick > > On Jul 1, 11:24 am, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have this model: > > > class Document extends AppModel{ > > > var $belongsTo = array( > > 'Author'=>array( > > 'className' => 'User', > > 'conditions' => '', > > 'fields' => > > 'Author.id,Author.surname,Author.name', > > 'dependent' => false, > > 'order' => '', > > 'foreignKey' => 'author' > > ) > > ); > > > } > > > Now in my controller if i do a > > ... > > $options=array( > > 'fields'=> array > > ('Document.id','Author.id','Author.username','Author.password') > > ); > > $this->Document->find('all',$options); > > > I get USERNAME and PASSWORD of the user that is the author of > > document. > > Sorry but this is an error or I mistake? > > I would that only setted fields (in this case > > 'Author.id,Author.surname,Author.name') must be present in belongsTo > > association? > > Marco > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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 with Media Plugin of David Persson
Many Thanks Now it works. I have a question: Can I set the vary validation rules inside the model User inside the association: var $hasOne = array( 'Photo' => array( 'className' => 'Media.Attachment', 'foreignKey' => 'foreign_key', 'conditions' => array('model' => 'User'), 'dependent' => true, ) ); Because I can have different rules in according to which is the attachment to upload Many Thanks On 22 Giu, 18:35, davidpersson wrote: > Have a look at the Attachment Model's validation property. > > To make http transfers work you must explicitly allow all http > transfers by specifying 'http://' in the location validation rule or - > if you only want to allow transfers from certain domains - use 'http:// > example.org' instead. > > var $validate = array( > 'file' => array( > // ... > 'location' => array('rule' => array('checkLocation', array > (MEDIA_TRANSFER, '/tmp/', 'http://'))), > // ... > ) > )); > > On 22 Jun., 12:00, byqsri wrote: > > > This is the $validationErrors: > > > Array > > ( > > [Photo] => Array > > ( > > [file] => location > > ) > > > ) > > > On 20 Giu, 15:36, davidpersson wrote: > > > > Hi Marco, > > > > You did the right thing with changing the format of $this->data, > > > because the hasOne Relationship needs it to be in that format. > > > > What kind of validation error do you get? > > > > -David > > > > On 18 Jun., 12:42, byqsri wrote: > > > > > is here someone can help me? > > > > > On 15 Giu, 16:52, "marco.rizze...@gmail.com" > > > > > wrote: > > > > > Hi > > > > > I try to use MediaPlugin of David Persson. > > > > > I have installed it I config it but when I tr8y test it using > > > > > documentation (http://wiki.github.com/davidpersson/media/attachment- > > > > > model ) but It doesn't work (the plugin doesn't save the attachment). > > > > > My situation is: > > > > > I have User model with : > > > > > > var $hasOne = array( > > > > > 'Photo' => array( > > > > > 'className' => 'Media.Attachment', > > > > > 'foreignKey' => 'foreign_key', > > > > > 'conditions' => array('model' => 'User'), > > > > > 'dependent' => true, > > > > > ) > > > > > ); > > > > > > In my controller I have: > > > > > > $this->data = array( > > > > > 'User' => array( > > > > > 'id' => 1 > > > > > ), > > > > > 'Photo' => array( > > > > > 0 => array('file' => > > > > > 'http://cakephp.org/img/cake-logo.png', > > > > > 'model' => 'User') > > > > > ) > > > > > ); > > > > > > $this->User->saveAll($this->data, array('validate' => > > > > > 'first')); > > > > > > $this->data seems strange if I read from cake documentation > > > > > (http://book.cakephp.org/view/75/Saving-Your-Data) > > > > > But if I set : > > > > > > $this->data = array( > > > > > 'User' => array( > > > > > 'id' => 1 > > > > > ), > > > > > 'Photo' => array( > > > > > 'file' => > > > > > 'http://cakephp.org/img/cake-logo.png', > > > > > 'model' => 'User' > > > > > ) > > > > > ); > > > > > I get an validation error from plugin > > > > > I hope someone can help me > > > > > Many Thanks > > > > > Marco > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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 with Media Plugin of David Persson
This is the $validationErrors: Array ( [Photo] => Array ( [file] => location ) ) On 20 Giu, 15:36, davidpersson wrote: > Hi Marco, > > You did the right thing with changing the format of $this->data, > because the hasOne Relationship needs it to be in that format. > > What kind of validation error do you get? > > -David > > On 18 Jun., 12:42, byqsri wrote: > > > is here someone can help me? > > > On 15 Giu, 16:52, "marco.rizze...@gmail.com" > > > wrote: > > > Hi > > > I try to use MediaPlugin of David Persson. > > > I have installed it I config it but when I tr8y test it using > > > documentation (http://wiki.github.com/davidpersson/media/attachment- > > > model ) but It doesn't work (the plugin doesn't save the attachment). > > > My situation is: > > > I have User model with : > > > > var $hasOne = array( > > > 'Photo' => array( > > > 'className' => 'Media.Attachment', > > > 'foreignKey' => 'foreign_key', > > > 'conditions' => array('model' => 'User'), > > > 'dependent' => true, > > > ) > > > ); > > > > In my controller I have: > > > > $this->data = array( > > > 'User' => array( > > > 'id' => 1 > > > ), > > > 'Photo' => array( > > > 0 => array('file' => > > > 'http://cakephp.org/img/cake-logo.png', > > > 'model' => 'User') > > > ) > > > ); > > > > $this->User->saveAll($this->data, array('validate' => > > > 'first')); > > > > $this->data seems strange if I read from cake documentation > > > (http://book.cakephp.org/view/75/Saving-Your-Data) > > > But if I set : > > > > $this->data = array( > > > 'User' => array( > > > 'id' => 1 > > > ), > > > 'Photo' => array( > > > 'file' => > > > 'http://cakephp.org/img/cake-logo.png', > > > 'model' => 'User' > > > ) > > > ); > > > I get an validation error from plugin > > > I hope someone can help me > > > Many Thanks > > > Marco > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Using external server like static server (for image,css,js and file uploaded by user )
Many thanks for your response. > Do you want that to apply to absolutely any and all assets? I would use this for all css, all js , all static image , all swf and all static content. No link , no form action etc. > > If so you could do something like this (could also do it in controller > afterFilter, or a helper after > render):http://trac.assembla.com/mi/browser/branches/base/controllers/compone... > I try this solution and it works fine for js and images for css I must change the regular expression but It's exaclty what I'm searching. Relative to files uploaded by users. I would also upload them on static server but I would keep the possibility to control the access to them (like Media View). Is it possible to do a thing like this or I am crazy? About this do you know if exists a behaviour for upload that allows me to uploaad file on an external server? Many Thanks Marco > Otherwise, you'd put some logic in your app helper url method (or any > other function common to the bits you want to modify) to inject the > host you want > > hth > > AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with Media Plugin of David Persson
is here someone can help me? On 15 Giu, 16:52, "marco.rizze...@gmail.com" wrote: > Hi > I try to use MediaPlugin of David Persson. > I have installed it I config it but when I tr8y test it using > documentation (http://wiki.github.com/davidpersson/media/attachment- > model ) but It doesn't work (the plugin doesn't save the attachment). > My situation is: > I have User model with : > > var $hasOne = array( > 'Photo' => array( > 'className' => 'Media.Attachment', > 'foreignKey' => 'foreign_key', > 'conditions' => array('model' => 'User'), > 'dependent' => true, > ) > ); > > In my controller I have: > > $this->data = array( > 'User' => array( > 'id' => 1 > ), > 'Photo' => array( > 0 => array('file' => > 'http://cakephp.org/img/cake-logo.png', > 'model' => 'User') > ) > ); > > $this->User->saveAll($this->data, array('validate' => > 'first')); > > $this->data seems strange if I read from cake documentation > (http://book.cakephp.org/view/75/Saving-Your-Data) > But if I set : > > $this->data = array( > 'User' => array( > 'id' => 1 > ), > 'Photo' => array( > 'file' => > 'http://cakephp.org/img/cake-logo.png', > 'model' => 'User' > ) > ); > I get an validation error from plugin > I hope someone can help me > Many Thanks > Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: EAV (Entity-Attribute-Value) Data Model with CakePHP
@Maine: I 'm very interested to understand the EAV plugin but there isn't documentation. Do you have try it?Can you give me an example? Many Thanks On 16 Giu, 12:04, Maine wrote: > Just did this recently. I found the following resources valuable: > - Expandable > Behavior:http://debuggable.com/posts/unlimited-model-fields-expandable-behavio... > - EAV Plugin:http://github.com/morrislaptop/cakephp-eav/tree/master > - Dynamic Data Fields: Practical CakePHP > Projects:http://www.amazon.com/Practical-CakePHP-Projects/dp/143021578X > > Ended up using Expandable Behavior as the simplest solution. The other > options would help storing the data using proper datatypes and > administering "EAV schema". But in my case the amount of data or query > volume didn't really require these. > > On Jun 15, 11:39 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I must use a EAV schema for my web app but I have no idea about how > > realizate this in cake? > > I have a table with entities , a table with atrributes and many table > > with value (one for datetime value,one for varchar value ,one for text > > value etc. ). > > Can someone give me some suggestion about this? > > Many Thanks > > Marco > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Model with Dynamic Data Fields
Ok many thanks that's is clear I have another question Do I keep the values of the fields of all documents in a single table? a table like this: document_id, document_field_id, value I ask this question Because in 'value' I can have a number ,a string, a text ,a datetime I don't know if it's the best On 23 Mag, 15:49, number9 wrote: > If I've understood you correctly each document will have a number > of different fields that would be useful to store in the database, but > all documents are unique. > > The first thing I would do is write down a list of every single > possible field that you would need for these documents. If you think > that some documents will share certain characteristics, you could make > another table and have a few document templates that would fit your > needs. E.g. one template has text, title and attachment, another is > the same but does without the attachment. > > Alternatively you could just create one big table with all of the > possible fields that you drew up and just make them optional. > Obviously you would need some form of validation. You could set them > as NULL in your mysql database (so they allow empty values), then draw > up a validation rule that said documents must have at least 3 fields > (for example). > > On May 23, 1:24 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > My problem is about the project of the models of my web application > > I have a model Document . The problem is that this model must have > > dinamic data fields. > > A document can have like fields : title .text , data > > Another can have : title, number , attachment > > ect... > > This fields can have different type: some can be simple string, other > > can be file , other can be text . > > > Substantially for the moment I have create only the model Document but > > I've no idea how to handle everything else > > I really hope that someone can help me > > Many thanks > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How manage triple relation between Model in CAKEPHP?
I describe you my situation: My model is : Teams, Template and Format The triple relation can be expressed in this way: Each team has access to a set of pairs template-format. A template can be associated with some format. In the table relative to this triple relation I have: id team-id format-id template-id Then I have the models : Team,Format,Template On 16 Mag, 13:54, "j0n4s.h4rtm...@googlemail.com" wrote: > Like this?: > > Message HasOne User (From) > Message HasOne ToUser (To) > Message HasOne CcUser (Copy) > > In message.php: > > var $belongsTo = array( > 'User' => array( > 'className' => 'User', > 'foreignKey' => 'user_id', > 'conditions' => '', > 'fields' => '', > 'order' => '' > ), > 'ToUser' => array( > 'className' => 'User', > 'foreignKey' => 'reciever_user_id', > 'conditions' => '', > 'fields' => '', > 'order' => '' > ), > 'CcUser' => array( > 'className' => 'User', > 'foreignKey' => 'cc_user_id', > 'conditions' => '', > 'fields' => '', > 'order' => '' > ) > ); > > Else, maybe polymorphic behavior might help. Not sure what you want to > achieve. > > On May 15, 6:36 pm, byqsri wrote: > > > I haven't understand . > > Can you make me and example? > > Many Thanks > > > On 15 Mag, 17:56, AD7six wrote: > > > > On May 15, 5:32 pm, "marco.rizze...@gmail.com" > > > > wrote: > > > > Hi > > > > I have three model that have a triple relation between them. > > > > How can I manage this triple relation between Model in CAKEPHP? > > > > via belongsTo, hasMany and a model for each table - the usual way. > > > > hth, > > > > AD > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How manage triple relation between Model in CAKEPHP?
I haven't understand . Can you make me and example? Many Thanks On 15 Mag, 17:56, AD7six wrote: > On May 15, 5:32 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have three model that have a triple relation between them. > > How can I manage this triple relation between Model in CAKEPHP? > > via belongsTo, hasMany and a model for each table - the usual way. > > hth, > > AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Question about how manage particular data in session
I identify the service by url but only at the access point of service but in the subsequent action I can't identify the service by url unless I keep the service_id in the url (for example in GET) but I would like to avoid that otherwise I have to review all code On 15 Mag, 03:40, "Dr. Loboto" wrote: > Service should be identified by URL. Session should only identify > user, regardless of service. > > On May 14, 6:17 pm, byqsri wrote: > > > Why the design of such application > > is wrong initially? > > How can I manage many services from a single portal? > > > On 14 Mag, 10:15, "Dr. Loboto" wrote: > > > > Yes, there are a lot of problems as whole design of such application > > > is wrong initially. > > > > On May 14, 2:25 pm, byqsri wrote: > > > > > And you suppose that in a page I have some simultaneous ajax call? > > > > With this system I lost the right referer whene these ajax calls > > > > happen > > > > > On 14 Mag, 09:21, byqsri wrote: > > > > > > Ok > > > > > But you suppose that user (with page1 and page2 opened) clicks another > > > > > link on page1 that opens page3 how can I to know that page3 is > > > > > relative to the service of page1 (in session I have "page2" => > > > > > $service_id and not "page1" => $service_id ) > > > > > > On 14 Mag, 05:02, "Dr. Loboto" wrote: > > > > > > > Example of this approach: > > > > > > 1. User visit index page and click on some "page1" link. You receive > > > > > > request for that "page1" - you know service_id (for example it is 5) > > > > > > and referer points to "index", so you save initial "page1" => > > > > > > $service_id to session. > > > > > > 2. On that page user follow next link "page2". You receive request > > > > > > for > > > > > > "page2" - referer points to "page1" and you search for this key in > > > > > > session, find there service_id (= 5), remove this record from > > > > > > session > > > > > > and save next one - "page2" => $service_id > > > > > > 3. And so on... > > > > > > 4. User open new index page in other browser window and click on > > > > > > "page10" link. Same situation as in #1, but you save "page10" => > > > > > > $new_service_id (for example, 125) to session and receive new chain > > > > > > to > > > > > > track. > > > > > > > User session in this case contain as much records "url" => > > > > > > service_id > > > > > > as much times he started from index. On each page reload by user you > > > > > > re-write corresponding record in session. > > > > > > > We use this to give user "prev/next" navigation through search > > > > > > results > > > > > > without changing target pages URLs. > > > > > > > On May 13, 6:20 pm, byqsri wrote: > > > > > > > > Sorry but in this way I must keep in session all pages the user > > > > > > > load > > > > > > > with relative service_id? > > > > > > > > On 13 Mag, 05:34, "Dr. Loboto" wrote: > > > > > > > > > You should save service_id in session as associative array: > > > > > > > > current_url => service_id. When your controller/action is > > > > > > > > requested, > > > > > > > > search service_id in session by $this->referer() key. You also > > > > > > > > should > > > > > > > > be always aware that referrer or session will be empty and be > > > > > > > > able to > > > > > > > > act normally in this case too. > > > > > > > > > On May 12, 10:39 pm, byqsri wrote: > > > > > > > > > > On 12 Mag, 17:02, brian wrote: > > > > > > > > > > > On Tue, May 12, 2009 at 4:33 AM, byqsri > > > > > > > > > > wrote: > > > > > > > > > > > > Ok > > > > > > > > > > > But how can I know which service is active in a > > > > > > > > > > > particular moment? > > > > > > > > > > > You could make the service_ids the array keys with a value > > > > > > > > > > of false, > > > > > > > > > > except the active one. > > > > > > > > > > I can't to do this because I can have some controller/action > > > > > > > > > that is > > > > > > > > > requested in many services. > > > > > > > > > I must keep an information of active service in the session > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about how manage particular data in session
Why the design of such application is wrong initially? How can I manage many services from a single portal? On 14 Mag, 10:15, "Dr. Loboto" wrote: > Yes, there are a lot of problems as whole design of such application > is wrong initially. > > On May 14, 2:25 pm, byqsri wrote: > > > And you suppose that in a page I have some simultaneous ajax call? > > With this system I lost the right referer whene these ajax calls > > happen > > > On 14 Mag, 09:21, byqsri wrote: > > > > Ok > > > But you suppose that user (with page1 and page2 opened) clicks another > > > link on page1 that opens page3 how can I to know that page3 is > > > relative to the service of page1 (in session I have "page2" => > > > $service_id and not "page1" => $service_id ) > > > > On 14 Mag, 05:02, "Dr. Loboto" wrote: > > > > > Example of this approach: > > > > 1. User visit index page and click on some "page1" link. You receive > > > > request for that "page1" - you know service_id (for example it is 5) > > > > and referer points to "index", so you save initial "page1" => > > > > $service_id to session. > > > > 2. On that page user follow next link "page2". You receive request for > > > > "page2" - referer points to "page1" and you search for this key in > > > > session, find there service_id (= 5), remove this record from session > > > > and save next one - "page2" => $service_id > > > > 3. And so on... > > > > 4. User open new index page in other browser window and click on > > > > "page10" link. Same situation as in #1, but you save "page10" => > > > > $new_service_id (for example, 125) to session and receive new chain to > > > > track. > > > > > User session in this case contain as much records "url" => service_id > > > > as much times he started from index. On each page reload by user you > > > > re-write corresponding record in session. > > > > > We use this to give user "prev/next" navigation through search results > > > > without changing target pages URLs. > > > > > On May 13, 6:20 pm, byqsri wrote: > > > > > > Sorry but in this way I must keep in session all pages the user load > > > > > with relative service_id? > > > > > > On 13 Mag, 05:34, "Dr. Loboto" wrote: > > > > > > > You should save service_id in session as associative array: > > > > > > current_url => service_id. When your controller/action is requested, > > > > > > search service_id in session by $this->referer() key. You also > > > > > > should > > > > > > be always aware that referrer or session will be empty and be able > > > > > > to > > > > > > act normally in this case too. > > > > > > > On May 12, 10:39 pm, byqsri wrote: > > > > > > > > On 12 Mag, 17:02, brian wrote: > > > > > > > > > On Tue, May 12, 2009 at 4:33 AM, byqsri > > > > > > > > wrote: > > > > > > > > > > Ok > > > > > > > > > But how can I know which service is active in a particular > > > > > > > > > moment? > > > > > > > > > You could make the service_ids the array keys with a value of > > > > > > > > false, > > > > > > > > except the active one. > > > > > > > > I can't to do this because I can have some controller/action that > > > > > > > is > > > > > > > requested in many services. > > > > > > > I must keep an information of active service in the session > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about how manage particular data in session
And you suppose that in a page I have some simultaneous ajax call? With this system I lost the right referer whene these ajax calls happen On 14 Mag, 09:21, byqsri wrote: > Ok > But you suppose that user (with page1 and page2 opened) clicks another > link on page1 that opens page3 how can I to know that page3 is > relative to the service of page1 (in session I have "page2" => > $service_id and not "page1" => $service_id ) > > On 14 Mag, 05:02, "Dr. Loboto" wrote: > > > Example of this approach: > > 1. User visit index page and click on some "page1" link. You receive > > request for that "page1" - you know service_id (for example it is 5) > > and referer points to "index", so you save initial "page1" => > > $service_id to session. > > 2. On that page user follow next link "page2". You receive request for > > "page2" - referer points to "page1" and you search for this key in > > session, find there service_id (= 5), remove this record from session > > and save next one - "page2" => $service_id > > 3. And so on... > > 4. User open new index page in other browser window and click on > > "page10" link. Same situation as in #1, but you save "page10" => > > $new_service_id (for example, 125) to session and receive new chain to > > track. > > > User session in this case contain as much records "url" => service_id > > as much times he started from index. On each page reload by user you > > re-write corresponding record in session. > > > We use this to give user "prev/next" navigation through search results > > without changing target pages URLs. > > > On May 13, 6:20 pm, byqsri wrote: > > > > Sorry but in this way I must keep in session all pages the user load > > > with relative service_id? > > > > On 13 Mag, 05:34, "Dr. Loboto" wrote: > > > > > You should save service_id in session as associative array: > > > > current_url => service_id. When your controller/action is requested, > > > > search service_id in session by $this->referer() key. You also should > > > > be always aware that referrer or session will be empty and be able to > > > > act normally in this case too. > > > > > On May 12, 10:39 pm, byqsri wrote: > > > > > > On 12 Mag, 17:02, brian wrote: > > > > > > > On Tue, May 12, 2009 at 4:33 AM, byqsri > > > > > > wrote: > > > > > > > > Ok > > > > > > > But how can I know which service is active in a particular moment? > > > > > > > You could make the service_ids the array keys with a value of false, > > > > > > except the active one. > > > > > > I can't to do this because I can have some controller/action that is > > > > > requested in many services. > > > > > I must keep an information of active service in the session > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about how manage particular data in session
Ok But you suppose that user (with page1 and page2 opened) clicks another link on page1 that opens page3 how can I to know that page3 is relative to the service of page1 (in session I have "page2" => $service_id and not "page1" => $service_id ) On 14 Mag, 05:02, "Dr. Loboto" wrote: > Example of this approach: > 1. User visit index page and click on some "page1" link. You receive > request for that "page1" - you know service_id (for example it is 5) > and referer points to "index", so you save initial "page1" => > $service_id to session. > 2. On that page user follow next link "page2". You receive request for > "page2" - referer points to "page1" and you search for this key in > session, find there service_id (= 5), remove this record from session > and save next one - "page2" => $service_id > 3. And so on... > 4. User open new index page in other browser window and click on > "page10" link. Same situation as in #1, but you save "page10" => > $new_service_id (for example, 125) to session and receive new chain to > track. > > User session in this case contain as much records "url" => service_id > as much times he started from index. On each page reload by user you > re-write corresponding record in session. > > We use this to give user "prev/next" navigation through search results > without changing target pages URLs. > > On May 13, 6:20 pm, byqsri wrote: > > > Sorry but in this way I must keep in session all pages the user load > > with relative service_id? > > > On 13 Mag, 05:34, "Dr. Loboto" wrote: > > > > You should save service_id in session as associative array: > > > current_url => service_id. When your controller/action is requested, > > > search service_id in session by $this->referer() key. You also should > > > be always aware that referrer or session will be empty and be able to > > > act normally in this case too. > > > > On May 12, 10:39 pm, byqsri wrote: > > > > > On 12 Mag, 17:02, brian wrote: > > > > > > On Tue, May 12, 2009 at 4:33 AM, byqsri > > > > > wrote: > > > > > > > Ok > > > > > > But how can I know which service is active in a particular moment? > > > > > > You could make the service_ids the array keys with a value of false, > > > > > except the active one. > > > > > I can't to do this because I can have some controller/action that is > > > > requested in many services. > > > > I must keep an information of active service in the session > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about how manage particular data in session
Sorry but in this way I must keep in session all pages the user load with relative service_id? On 13 Mag, 05:34, "Dr. Loboto" wrote: > You should save service_id in session as associative array: > current_url => service_id. When your controller/action is requested, > search service_id in session by $this->referer() key. You also should > be always aware that referrer or session will be empty and be able to > act normally in this case too. > > On May 12, 10:39 pm, byqsri wrote: > > > On 12 Mag, 17:02, brian wrote: > > > > On Tue, May 12, 2009 at 4:33 AM, byqsri wrote: > > > > > Ok > > > > But how can I know which service is active in a particular moment? > > > > You could make the service_ids the array keys with a value of false, > > > except the active one. > > > I can't to do this because I can have some controller/action that is > > requested in many services. > > I must keep an information of active service in the session > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about how manage particular data in session
On 12 Mag, 17:02, brian wrote: > On Tue, May 12, 2009 at 4:33 AM, byqsri wrote: > > > Ok > > But how can I know which service is active in a particular moment? > > You could make the service_ids the array keys with a value of false, > except the active one. I can't to do this because I can have some controller/action that is requested in many services. I must keep an information of active service in the session --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Question about how manage particular data in session
Ok But how can I know which service is active in a particular moment? On 12 Mag, 10:04, Miles J wrote: > Well first off you would need to have Security.level medium for ajax > to work. Secondly, you could just store all the service_ids in an > array instead of 1 at a time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Exists a Ticket System made in CakePHP
Ok Is it the OS system integrable with cakephp? More specifically, I want that only registered users can send tickets and that such tickets were associated with the username of the user that sent that. On Apr 21, 12:05 pm, "gaurav.v.sharma" wrote: > (Not related to cakePHP) > I don't know about a ticket system made in cake but you can try out > OSTICKET. It is an open source ticketing system. very nice > software (www.osticket.com). > > On Apr 21, 1:59 pm, "marco.rizze...@gmail.com" > > wrote: > > I have my web application in Cakephp. > > It has his registered users . > > Now I would add a ticket system on my application only for registered > > users. > > I have searched a ticket system made in Cakephp but I haven't found > > anything. > > Is there someone that has found something made in Cakephp? > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Using error message like ALT of an image
Sorry I have found the answer isFieldError(string $fieldName) On Apr 20, 3:35 pm, byqsri wrote: > And if I would that the image is showed only if there is the error? > > On Apr 20, 2:55 pm, "Dr. Loboto" wrote: > > > Try this: > > > echo $html->image( > > 'my_image.gif', > > array( > > 'alt' => $form->error( > > 'Model.field', > > null, > > array('wrap' => false, 'escape' => false) > > ) > > ) > > ); > > > On Apr 20, 5:40 pm, "marco.rizze...@gmail.com" > > > wrote: > > > I would use the error message form a data validation like ALT of an > > > image but I can't to understand ho can I do it? > > > Has somebody a idea to o it? > > > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Using error message like ALT of an image
And if I would that the image is showed only if there is the error? On Apr 20, 2:55 pm, "Dr. Loboto" wrote: > Try this: > > echo $html->image( > 'my_image.gif', > array( > 'alt' => $form->error( > 'Model.field', > null, > array('wrap' => false, 'escape' => false) > ) > ) > ); > > On Apr 20, 5:40 pm, "marco.rizze...@gmail.com" > > wrote: > > I would use the error message form a data validation like ALT of an > > image but I can't to understand ho can I do it? > > Has somebody a idea to o it? > > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakeSession error with memcache
Php is configurated to use memcache to save session. However even if I set Configure::write('Session.save', 'cache'); The problem is the same. Exactly the situation is as follows I start a session inside a action/controller and inside this action/ controller I can read the session(all works fine). If I load another action/controller from the previous action/ controller (for example with a link) I lost the session However I can see that in the last action/controller the session cookie is present and it has the same ID of the cookie of the previous action/controller. The strange thing is that using simple php script to test sessions with memcache all works fine. On Apr 15, 10:34 am, Miles J wrote: > I dont see how memcache has anything to do with this, when the session > save is set to php. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakeSession error with memcache
Sorry but nobody has ever had a problem like this. On Apr 14, 3:12 pm, "marco.rizze...@gmail.com" wrote: > Hi > I try to use memcache for save sessions in a CakePHP application. > I install memcache,all works fine also the php sessions. > Now in my CakePHP application I set in core.php this: > > Configure::write('Session.save', 'php'); > > Now I try to use the Session component in my application but I get > these errors in > > SessionComponent Object > ( > [__active] => 1 > [__started] => 1 > [__bare] => 0 > [valid] => 1 > [error] => Array > ( > [2] => Config doesn't exist > [1] => Session is valid > ) > > ... > ) > > And the session doesn't work > Can someone help me? > Is it something wrong in configuration? > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Memcache and CakePHP Session
Is it someone can help me? On Mar 25, 5:52 pm, "marco.rizze...@gmail.com" wrote: > Hi > I would use Memcache to save the php session. > I have installed memcached on my system and I have configured it. > I have set in php.ini the session's handler to memcache . > I try to use a session in a simple php script and all works fine. > But when I try to use the session in CakePHP the session doesn't > work. > If I set the php session's handler on file the CakePHP session works > if it is set on memcache the CakePHP session doesn't work > In core.php I have: > Configure::write('Session.save', 'php'); > > Am I wrong something? > Can someone with a bit of experience help me? > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sharing CAKEPHP Session with external app on a different virtual host
How have I to configure CAKE to use memcache to save its session? I have set Configure::write('Session.save', 'php'); But I can't to recuperate the session On Mar 24, 11:37 pm, Pablo Viojo wrote: > Memcache or DB are the best options! > Saludos, > > Pablo Viojo > pvi...@gmail.comhttp://pviojo.net > (#260 y creciendo!) > > > Ayudar nos hace felices!http://needish.com -http://helperman.org > > On Tue, Mar 24, 2009 at 6:02 PM, Krzysztof Chudzik < > > chudykr...@poczta.onet.pl> wrote: > > > Maybe you should use memcached. > > see: > >http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memc... > > > On Mar 19, 1:07 pm, "marco.rizze...@gmail.com" > > wrote: > > > My question is this? > > > How can I sharing CAKEPHP Session with external app on a different > > > virtual host? > > > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sharing CAKEPHP Session with external app on a different virtual host
Thanks These articles are very interesting. I try to get the cake session and I noted that only inside webroot i can to do it If I am in a up folder i can't to do it I try to set in bootstrap.php ini_set("session.cookie_domain",'http://localhost'); But I get then in my cake application the session doesn't work. i.e. I star a session in a action in another action I can't read the session. On Mar 19, 3:53 pm, Alfredo Quiroga-Villamil wrote: > There seems to be a couple of links and stuff online that should > hopefully guide you in the right direction. > > Take a look at these and see if they help. > > http://mikekrisher.com/?p=499http://teknoid.wordpress.com/2008/10/05/sharing-cakephp-session-with-...http://www.scribd.com/doc/5542/CakePHP-tutorial-no-4-from-IBM > > Regards, > > Alfredo > > On Thu, Mar 19, 2009 at 10:31 AM, byqsri wrote: > > > Ok thanks. > > I save on DB my session but then how can I do decide which is the > > right session in the external app? > > > On Mar 19, 3:27 pm, Alfredo Quiroga-Villamil > > wrote: > >> One way that might help you accomplish this is by storing them in a DB. > > >> See:http://book.cakephp.org/view/173/Sessions > > >> Regards, > > >> Alfredo > > >> On Thu, Mar 19, 2009 at 8:07 AM, marco.rizze...@gmail.com > > >> wrote: > > >> > My question is this? > >> > How can I sharing CAKEPHP Session with external app on a different > >> > virtual host? > >> > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sharing CAKEPHP Session with external app on a different virtual host
Ok thanks. I save on DB my session but then how can I do decide which is the right session in the external app? On Mar 19, 3:27 pm, Alfredo Quiroga-Villamil wrote: > One way that might help you accomplish this is by storing them in a DB. > > See:http://book.cakephp.org/view/173/Sessions > > Regards, > > Alfredo > > On Thu, Mar 19, 2009 at 8:07 AM, marco.rizze...@gmail.com > > wrote: > > > My question is this? > > How can I sharing CAKEPHP Session with external app on a different > > virtual host? > > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax reload of an element.
Thanks Dave for your answer. I hope to not make a special view to render the element's results. I hope that there is a method to escape this On Mar 15, 8:12 pm, "Dave Maharaj :: WidePixels.com" wrote: > I think I know what you mean. > > What I do (no expert so I may be doing it wrong) but for example > 1. I render element view_posts for the original view of what the visitor > will see. > 2. I have an edit button which calls a form to update the div where > view_posts currently is with a view called edit-post > 3. In edit_post its simply an AJAX form, do what you need to doclick > Save which then in the controller the save function I have > . > $this->set(compact('programs')); > $this->render('/elements/posts/view_posts'); > ... > > So you need 2 views... The pre-edited view, then the edit view or whatever > you need then return back to the original pre-edited view after save with > the new info. > > Hope that helps. > > -Original Message- > From: byqsri [mailto:marco.rizze...@gmail.com] > Sent: March-15-09 3:30 PM > To: CakePHP > Subject: Re: Ajax reload of an element. > > Sorry but perhaps I have not explained well. > I have a div, inside a div I render a element (with params). > I have a link and I would that when I click the link the ajax helper reload > inside the div the element. > > > echo $this->renderElement( > 'postsList', > array(.) > ); > ?> > > link( > .. > array( 'update' => 'posts' ) > ); > ?> > How must I configure the $ajax->link to re-render the Element? > > On Mar 15, 6:41 pm, "dr. Hannibal Lecter" wrote: > > Did you go through the AJAX helper chapter in the good book? > > >http://book.cakephp.org/view/212/Methods > > > On Mar 15, 10:25 am, "marco.rizze...@gmail.com" > > > wrote: > > > Hi > > > I have a page where I have an element (with params) that is a list > > > of items. > > > Now I would that when user click on a certain button the element is > > > reload . > > > I would make this with ajax. > > > How can I do the ajax reload of an element? > > > Many thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax reload of an element.
Sorry but perhaps I have not explained well. I have a div, inside a div I render a element (with params). I have a link and I would that when I click the link the ajax helper reload inside the div the element. renderElement( 'postsList', array(.) ); ?> link( .. array( 'update' => 'posts' ) ); ?> How must I configure the $ajax->link to re-render the Element? On Mar 15, 6:41 pm, "dr. Hannibal Lecter" wrote: > Did you go through the AJAX helper chapter in the good book? > > http://book.cakephp.org/view/212/Methods > > On Mar 15, 10:25 am, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have a page where I have an element (with params) that is a list of > > items. > > Now I would that when user click on a certain button the element is > > reload . > > I would make this with ajax. > > How can I do the ajax reload of an element? > > Many thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Error with use Upload Behaviour of MI-BASE
I have another problem with upload behaviour of MI-BASE. All works fine only that if I set no image to upload I get a validation error: "The submitted file extension is not permitted, only jpeg,jpg,gif,png,bmp permitted." I have set the option 'mustUploadFile' => false but nothing. Can someone tell me how configure in the right way the behaviour? Many thanks On Mar 12, 9:12 am, byqsri wrote: > Yes the error is on the incorrect variable name (should be > $fieldName). > Many thanks > > On Mar 11, 4:08 pm, AD7six wrote: > > > On Mar 11, 11:43 am, "marco.rizze...@gmail.com" > > > wrote: > > > Hi > > > I try to use the upload and image_upload behaviour of MI-BASE project > > > for add field photo to user model > > > My code is: > > > I've been updating the behaviors recently, that looks like an > > incorrect variable name (should be $fieldName). > > > You'd be better off finding me on irc to discuss problems with code > > I've written (that isn't in the core) or for simple (or general) > > errors such as this - investigating/fixing/asking first. > > > Cheers, > > > AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Error with use Upload Behaviour of MI-BASE
Yes the error is on the incorrect variable name (should be $fieldName). Many thanks On Mar 11, 4:08 pm, AD7six wrote: > On Mar 11, 11:43 am, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I try to use the upload and image_upload behaviour of MI-BASE project > > for add field photo to user model > > My code is: > > I've been updating the behaviors recently, that looks like an > incorrect variable name (should be $fieldName). > > You'd be better off finding me on irc to discuss problems with code > I've written (that isn't in the core) or for simple (or general) > errors such as this - investigating/fixing/asking first. > > Cheers, > > AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination with POST data
Apology accepted. I use the grid component with the filter plugin. On Mar 6, 10:12 am, Son Dat Giang wrote: > Oh, yes. I'm sorry if you don't like the way I show my opinion. I have never > heard about ext js before. > I've visited some ext js demo, hmmm... It's realy valueable. > > But, i don't know how to switch cake pagination method from GET to POST. > What situation of extjs are you using ? > > Is there any cakephpers know the code block to change pagination request > from URL to POST method??? > - > Best regards ! > Giang Son Dat > Mobile: +84 988114164 > Email giangson...@gmail.com, giangson...@yahoo.com > > On Fri, Mar 6, 2009 at 12:27 AM, byqsri wrote: > > > Thanks for your "kind" response. > > I think that make search with POST it's not so stupid Infact I have a > > element with EXT js (i think that also Ext js developer team don't > > need to be stupid) that make search with POST of data. > > I hope that if there is the possibility to pass data to pagination > > with POST I can save time. > > > On Mar 6, 4:06 am, Son Dat Giang wrote: > > > I dunno why you want to pass pagination data via POST. POST is not good > > for > > > searching and paginating. Because your result-page can not keep the > > content > > > by URL of itself. > > > So, I think, cakePHP developer team did not support pagination via POST. > > > They don't need to be stupid. > > > > Am I right? > > > - > > > Best regards ! > > > Giang Son Dat > > > Mobile: +84 988114164 > > > Email giangson...@gmail.com, giangson...@yahoo.com > > > > On Thu, Mar 5, 2009 at 7:05 AM, marco.rizze...@gmail.com < > > > > marco.rizze...@gmail.com> wrote: > > > > > I have seen from manual that I can pass arguments to paginator > > > > functions with > > > > > $paginator->options(array('url' => .)); > > > > > Now with this I arguments pass via GET. > > > > How can I do If I would pass arguments via POST. > > > > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: using ajax helper to reload an element
I have similar problem. I have an element inside a view and I would on a click of a button that the element would be reloaded with same params of first render. Can someone suggest me some solution? On Feb 28, 6:49 am, Corey Crawford wrote: > OK, finally getting a chance to look at this again. The biggest > problem I'm having is passing variable information to theelement, so > that it can reduce the scope of what's returned and filter based on a > drop down selection. > > Here's some code snippets: > > http://bin.cakephp.org/view/168041585 > > Basically, I've gotten it to call theelementfrom within a 'refresh' > view, called by the controller. However, Firebug shows *no* data being > sent in theAJAXPOST, so I can't seem to get the data for the formelementthat > changed. The debug log shows no data for $this->data when > logged from the controller (homes). > > The CDATA for theAJAXobserver seems to be setup right: > // > > I tried wrapping it in a FORM tag but that didn't help. Any ideas what > might be going on here? > > Thanks :) > > - Corey Crawford > > On Feb 11, 9:25 am, WebbedIT wrote: > > > As this is anAJAXrequest you are interfacing with the DOM and as > > such it does not matter whether theelementto be updated was built > > with a view orelement. As long as you have the link/observer calling > > a new instance ofajax.updater and have set it to update the required > > elementid then all should be happy. Your refreshSearchElement action > > needs a /home/refresh_search_element.ctp view and if you are using the > > RequestHandler component Cake should do all the rest for you. > > > Have you got FireBug installed? If so what POST and Response data does > > it show for theajaxrequest? > > On Feb 11, 10:32 am, brian wrote: > > > Sorry, I forgot something, actually > > > $this->layout = false; > > $this->set('new_param', $new_param); > > > $this->viewPath = 'elements'; > > > /* > > OR: > > $this->viewPath = 'elements'.DS.'some_other_dir'; > > */ > > > $this->render('search_element_1'); > > > This will force Cake to use only theelementto render the view. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination with POST data
Thanks for your "kind" response. I think that make search with POST it's not so stupid Infact I have a element with EXT js (i think that also Ext js developer team don't need to be stupid) that make search with POST of data. I hope that if there is the possibility to pass data to pagination with POST I can save time. On Mar 6, 4:06 am, Son Dat Giang wrote: > I dunno why you want to pass pagination data via POST. POST is not good for > searching and paginating. Because your result-page can not keep the content > by URL of itself. > So, I think, cakePHP developer team did not support pagination via POST. > They don't need to be stupid. > > Am I right? > - > Best regards ! > Giang Son Dat > Mobile: +84 988114164 > Email giangson...@gmail.com, giangson...@yahoo.com > > On Thu, Mar 5, 2009 at 7:05 AM, marco.rizze...@gmail.com < > > marco.rizze...@gmail.com> wrote: > > > I have seen from manual that I can pass arguments to paginator > > functions with > > > $paginator->options(array('url' => .)); > > > Now with this I arguments pass via GET. > > How can I do If I would pass arguments via POST. > > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Error handling in production
I think that is a very good solution. I don't know if another debug level is necessary since you resolve it in a good way. On Mar 5, 8:35 am, Aidan Lister wrote: > My previous comment was incorrect, you can easily override > ErrorHandler methods by creating app_error.php and AppError extends > ErrorHandler (as per my first comment). > > This is how I have decided to handle production errors now: > > /** > * Handle logging errors in production mode > */ > if (Configure::read() === 0) { > > // Disable the default handling and include logger > define('DISABLE_DEFAULT_ERROR_HANDLING', 1); > uses('cake_log'); > > /** > * A function to directly log errors > * > * @param $errno The error number > * @param $errstr The error description > * @param $errfile The file where the error occured > * @param $errline The line of the file where the error occured > * @return bool Success > */ > function productionError($errno, $errstr, $errfile, $errline) { > if ($errno === 2048) { > return; > } > > $level = LOG_DEBUG; > switch ($errno) { > case E_PARSE: > case E_ERROR: > case E_CORE_ERROR: > case E_COMPILE_ERROR: > case E_USER_ERROR: > $error = 'Fatal Error'; > $level = LOG_ERROR; > break; > case E_WARNING: > case E_USER_WARNING: > case E_COMPILE_WARNING: > case E_RECOVERABLE_ERROR: > $error = 'Warning'; > $level = LOG_WARNING; > break; > case E_NOTICE: > case E_USER_NOTICE: > $error = 'Notice'; > $level = LOG_NOTICE; > break; > default: > return false; > break; > } > > CakeLog::write($level, "{$error} ({$errno}): {$errstr} in > [{$errfile}, line {$errline}]"); > > if ($error == 'Fatal Error') { > die(); > } > return true; > } > > // Use the above handling > set_error_handler('productionError'); > > } > > This code belongs in your bootstrap.php file. > > This is how I am handling custom error pages in production: > function __construct($method, $messages) > { > $methods = array('paypal', 'system', 'payflow', 'cart', > 'generate'); > if (in_array($method, $methods)) { > Configure::write('debug', 1); > } > parent::__construct($method, $messages); > } > ?> > > Ideally cake would support a debug level of between production and > development, this would allow: > - Errors to still be logged in production environments > - Custom error handlers (as raised by cakeError) to be displayed to > the user. > > I have raised an enhancement so the clever folks in the development > team can consider:https://trac.cakephp.org/ticket/6165 > > Regards, > Aidan > > On Mar 4, 9:02 pm, Aidan Lister wrote: > > > Hi, > > > Firstly, there is no mechanism to overriding any of the functions in > > the ErrorHandler class. > > > Secondly, it's completely unnecessary, as you can use either > > _outputMessage() or appError() to achieve the same thing. Neither of > > these lend themselves to a) or b). > > > - Aidan > > > On Mar 4, 5:28 am, mscdex wrote: > > > > On Mar 3, 1:08 pm, Aidan Lister wrote: > > > > > Does anyone else have any suggestions? > > > > Why not override ErrorHandler's default 'error' function to handle the > > > HTTP errors? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, 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: Error handling in production
On Mar 3, 7:28 pm, mscdex wrote: > On Mar 3, 1:08 pm, Aidan Lister wrote: > > > Does anyone else have any suggestions? > > Why not override ErrorHandler's default 'error' function to handle the > HTTP errors? I think that is a important question: Have a system that permits to log errors and notices even if the debug is set to 0. I haven't have experience about CAKEPHP and I don't have suggestion but I'm very intersting about this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Best practise for use XML with XSL
Have someone some documentation or valid link to suggest ot me? On Feb 3, 1:04 pm, "marco.rizze...@gmail.com" wrote: > Hi > I have Cake 1.2 installed. > Now I have some xml view that I would use with someXSL. > What is the best practise to do it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How avoid some filter conditions
I don't explained very well. The POST to my action contain the fields and the conditions on which then I do the filtering. Now in the POST can be all possible fields and all possible conditions but it's not very good for my application and I would that some conditions are prohibited. I ask you how can I do in the best way. On Feb 20, 2:04 pm, "Liebermann, Anja Carolin" wrote: > Sorry i don't understand your problem. Why you don't leave out the field in > the conditions? How do you build your conditions? > > Anja > > -Ursprüngliche Nachricht- > Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag > von marco.rizze...@gmail.com > Gesendet: Freitag, 20. Februar 2009 11:45 > An: CakePHP > Betreff: How avoid some filter conditions > > Hi > I have this situation. > I have create an action in my controller where I can do search on a model > (search on every field of my model). > Now I have that I would that some field must be except from conditions. > Is better if I do the filtering on the conditions on a method of the model > or with a component where I pass the avoid fields to control in conditions? > Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---