Customize Cakephp Pagination Url
I have a problem with custom URLs and CakePHP pagination. The URL to my news page is www.site.de/de/news Via CakePHP routing, it goes to the News controller and index action. CakePHP pagination now generates these kind of URLs: www.site.de/news/index/page:2 The link works - but due to SEO reasons I want the URL to have the same base as before - like this: www.site.de/de/news/page:2 After reading the documentation I added the following line to change the URL structure of the pagination links: $paginator-options(array('url' = '/de/news')); Unfortunately, the result is this: www.site.de/de/news/index/de/news/page:2 What do I have to change, to tell CakePHP's pagination to only use / de/news as link base -- or just use the current URL as base and only add page:2 at the end? Thanks for your help! -- 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: Problem with Ajax Pagination
in ur controller u can use: if($this-request-is('ajax')){ $this-render('ajax_view'); // had to be in the views folder for the controller u r using } dont include the box u r updating the the ajax view, and keep out of that box the links of the paginator helper. -- 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: Problem with Ajax Pagination
What should I put in the 'ajax_view.ctp'? -- 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: Change model alias when using plugin models
public $uses = array(); public function beforefilter() { parent::beforeFilter(); $this-CoolModel = ClassRegistry::init(array( 'class' = 'MyPlugin.MyPluginCoolModel', 'alias' = 'CoolModel', )); } Short version is $this-CoolModel = ClassRegistry::init('MyPlugin.MyPluginCoolModel'); but 'alias' (name, used in the registry) could be useful for future calls ClassRegistry::init('CoolModel') -- 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: Problem with Ajax Pagination
Hello My problem is how to impliment placeholder in cakephp 2.0 -- 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: Change model alias when using plugin models
Hello My problem is how to impliment placeholder in cakephp 2.0 -- 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
Is there anyone localizing the Cookbook View page to pt_BR? (cos' We're!)
Me and some friends are about to finish the first View page section localization of CakePHP Cookbook to pt_BR. Is there another way to know if there is somebody doing the same, instead of only asking at the group? (to avoid repeated work or to notice everyone) For the record: we've already forked the main project. https://github.com/colares/docs/tree/pt-view-localization All the best! -- Thiago Colares @thicolares https://twitter.com/#!/thicolares apimenti.com.br 71 3334-5034 -- 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: Server Move: Catch old details page url and forward to cake style url
Please help!! -- 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: Server Move: Catch old details page url and forward to cake style url
On Mon, May 14, 2012 at 1:08 PM, heohni heidi.anselstet...@consultingteam.de wrote: If I try this: (from the 2.0 book) Router::redirect( '/details*', array('controller' = 'qrcode', 'action' = 'redirect', array('persist' = true) )); I get this message: The requested address '/details.php?id=4863' was not found on this server. What is wrong with my Router? Are you trying to access /details.php?id=4863 as the url? That's not how cake works. Try going to /details or /details/4863 and see what happens then. Mike. -- 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 1.3 charting functions
Hello everybody, I'm developing a web site with cakephp 1.3, and I need to use charting functions, which one do you recommend me? I need to display a lot of data (different kind of charts and different lenght of time) -- 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 do you set the physical (pixel) width of an input field?
How do you set the physical (pixel) width of an input field? For example I have an input field as follows: echo $this-Form-input('username'); ... say I want it to be 120 pixels on screen. How do I do this? Do I use a div? 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: cakephp 1.3 charting functions
I went through this a while back and settled on Google charts. They're excellent, fairly easy to implement and free. https://developers.google.com/chart/, https://developers.google.com/chart/interactive/docs/gallery and https://developers.google.com/chart/interactive/docs/quick_start. Jeremy Burns Class Outfit http://www.classoutfit.com On 15 May 2012, at 13:07:23, David wrote: Hello everybody, I'm developing a web site with cakephp 1.3, and I need to use charting functions, which one do you recommend me? I need to display a lot of data (different kind of charts and different lenght of time) -- 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 -- 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: The length parameter is not working for some input fields
Daniel, Check your HTML 4 spec. The attribute you want is maxlength (not length). I have made the same mistake before :-) Ken -- 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: Events, multiple listeners, and return data
Yes, it certainly helps to understand your reasoning. On May 14, 9:50 pm, José Lorenzo jose@gmail.com wrote: If you think about it, collecting return values is actually the edge case: A save operation has a single result wich is data to be saved A redirect operation has a single result, the URL to redirect to A dispatching operation has a single response value as result There a very few cases where collecting the result is desired, an it is often the consequence of a wrong software design. If you want to collect return, pass an object as parameter and have listeners modify this object at will. An example of this type of callbacks is JavaScript, an events language, wich usually don't take in account result values for events but 'false'. If you want to alter any result you should be modifying an object. I hope my answer helps understand the resonance we had for making the event system work this way. -- 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: cakephp 1.3 charting functions
Ok. I will check it. Now I'm checking cakephp-fusion-charts and open- flash-chart, do you know them? Thanks, David On May 15, 2:31 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I went through this a while back and settled on Google charts. They're excellent, fairly easy to implement and free.https://developers.google.com/chart/,https://developers.google.com/chart/interactive/docs/galleryandhttps://developers.google.com/chart/interactive/docs/quick_start. Jeremy Burns Class Outfit http://www.classoutfit.com On 15 May 2012, at 13:07:23, David wrote: Hello everybody, I'm developing a web site with cakephp 1.3, and I need to use charting functions, which one do you recommend me? I need to display a lot of data (different kind of charts and different lenght of time) -- Our newest site for the community: CakePHP Video Tutorialshttp://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
Re: cakephp 1.3 charting functions
They are both Flash, which is limiting for iPhone et all. The Google charts are Java based. Jeremy Burns Class Outfit http://www.classoutfit.com On 15 May 2012, at 15:01:01, David wrote: Ok. I will check it. Now I'm checking cakephp-fusion-charts and open- flash-chart, do you know them? Thanks, David On May 15, 2:31 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I went through this a while back and settled on Google charts. They're excellent, fairly easy to implement and free.https://developers.google.com/chart/,https://developers.google.com/chart/interactive/docs/galleryandhttps://developers.google.com/chart/interactive/docs/quick_start. Jeremy Burns Class Outfit http://www.classoutfit.com On 15 May 2012, at 13:07:23, David wrote: Hello everybody, I'm developing a web site with cakephp 1.3, and I need to use charting functions, which one do you recommend me? I need to display a lot of data (different kind of charts and different lenght of time) -- Our newest site for the community: CakePHP Video Tutorialshttp://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 -- 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
Should the model or controller be responsible for sending emails?
In wich layer do you commonly implement (use the CakeMail object) to sen emails? By the way, we have been implementing applications with fat model, instead of fat controller. We believe this way the code is really more reusable. We've also read some Mark's (Story) posts that initially encouraged us to do this and now we feel that the code is better. -- 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
Many-to-many ACL
Hi. I need users to belong to more than one role. Like Can-do-this, Can-do-that, etc. I think a many-to-many relationship fits this need. Like this (in pseudo-sql) table users: id int primary key; name varchar; table roles: id int primary key; name varchar; table roles_users: id int primary key; user_id foreign key users(id); role_id foreign key roles(id); So each user can have multiple roles listed in roles_users. I looked at the ACL tutorial: http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html but it only makes use of a single group_id. Cake's Auth subsystem looks fine to me. Can I use it with multiple roles described above? 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: Many-to-many ACL
http://www.dereuromark.de/2011/12/18/tinyauth-the-fastest-and-easiest-authorization-for-cake2/ To DB https://github.com/justinledwards/tinyauthdb/blob/2.1/app/Controller/Component/Auth/TinyAuthorize.php On Tue, May 15, 2012 at 1:47 PM, rihad ri...@mail.ru wrote: Hi. I need users to belong to more than one role. Like Can-do-this, Can-do-that, etc. I think a many-to-many relationship fits this need. Like this (in pseudo-sql) table users: id int primary key; name varchar; table roles: id int primary key; name varchar; table roles_users: id int primary key; user_id foreign key users(id); role_id foreign key roles(id); So each user can have multiple roles listed in roles_users. I looked at the ACL tutorial: http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html but it only makes use of a single group_id. Cake's Auth subsystem looks fine to me. Can I use it with multiple roles described above? 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 -- 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: How do you set the physical (pixel) width of an input field?
Why don't you use CSS? 2012/5/15 Daniel danwgr...@gmail.com: How do you set the physical (pixel) width of an input field? For example I have an input field as follows: echo $this-Form-input('username'); ... say I want it to be 120 pixels on screen. How do I do this? Do I use a div? 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 -- Pozdrawiam Dominik Gajewski -- 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: cakePHP Data into Google Charts
Hi phpMagpie - I followed your directions and I have my array formatted correctly as you described above in array named $chartData. I tried doing this: var data = google.visualization.arrayToDataTable([.join(',', $chartData).]); But chart doesn't graph at all...Is there something I'm doing wrong? On Friday, March 30, 2012 9:57:50 AM UTC-5, phpMagpie wrote: I've outputted some charts (combocharts - near identical to column chart) using the visualization api and got the model to output an array like: Array ( [labels] = Array ( [0] = Age [1] = Clients [2] = Not Offered [3] = Accepted Offer [4] = Declined Offer ) [16] = Array ( [0] = 16 [1] = 10 [2] = 7 [3] = 5 [4] = 0 ) [17] = Array ( [0] = 17 [1] = 27 [2] = 22 [3] = 13 [4] = 4 ) [18] = Array ( [0] = 18 [1] = 13 [2] = 8 [3] = 7 [4] = 2 ) [19] = Array ( [0] = 19 [1] = 12 [2] = 6 [3] = 6 [4] = 1 ) [20] = Array ( [0] = 20 [1] = 8 [2] = 2 [3] = 6 [4] = 0 ) [21] = Array ( [0] = 21 [1] = 7 [2] = 4 [3] = 3 [4] = 0 ) ) I then ran this through the following foreach($arrayFromModel AS $row) { $chartData[] = json_encode($row); } and ended up with: Array ( [0] = [Age,Clients,Not Offered,Accepted Offer,Declined Offer] [1] = [16,10,7,5,0] [2] = [17,27,22,13,4] [3] = [18,13,8,7,2] [4] = [19,12,6,6,1] [5] = [20,8,2,6,0] [6] = [21,7,4,3,0] ) With an array of this type you use the following google function to get your data table: var data = google.visualization.arrayToDataTable([.join(',', $chartData).]); Hope this is of some help, phpMagpie -- 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: How do you set the physical (pixel) width of an input field?
Well I do it like this, in my exemple: td style=width: 365px?php echo $post['Area']['Descricao']; ?/td I guess in your case would be something like: $this-Form-input('username', array('width'='365px')) 2012/5/15 Daniel danwgr...@gmail.com How do you set the physical (pixel) width of an input field? For example I have an input field as follows: echo $this-Form-input('username'); ... say I want it to be 120 pixels on screen. How do I do this? Do I use a div? 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 -- 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: How do you set the physical (pixel) width of an input field?
Recommend you use CSS for this. Attach a class to the input code: echo $this-Form-input('username', array('class'='username')); css: input.username { width: 120px; } On Tuesday, May 15, 2012 7:31:02 AM UTC-5, Daniel wrote: How do you set the physical (pixel) width of an input field? For example I have an input field as follows: echo $this-Form-input('username'); ... say I want it to be 120 pixels on screen. How do I do this? Do I use a div? 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: Inheritance?
I'm looking at the InheritableBehavior but I can't find any place explaining how I have to design the database (ie. type field). How did you solve that? Thanks! Andrés El martes, 15 de mayo de 2012 01:54:31 UTC-3, José Lorenzo escribió: I'm going to answer with a recommendation a professor said to me in college: if you have a people table in your database, you are doing it wrong. I'm not going to argue against your design, there are valid cases for modeling inerrancy in relational databases. Please have a look at InheritableBehavior in github.com/CakeDC/utils I have used it in the past in some apps. -- 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: Inheritance?
Could you please explain more in detail what the professor meant? On Tuesday, May 15, 2012 5:54:31 AM UTC+1, José Lorenzo wrote: I'm going to answer with a recommendation a professor said to me in college: if you have a people table in your database, you are doing it wrong. I'm not going to argue against your design, there are valid cases for modeling inerrancy in relational databases. Please have a look at InheritableBehavior in github.com/CakeDC/utils I have used it in the past in some apps. -- 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