Re: Browse By Letter (a php question)
SELECT SUBSTR(productname, 0, 1), count(*) FROM products GROUP BY SUBSTR(productname, 0, 1) ORDER BY SUBSTR(productname, 0, 1) If you can create something like that in CakePHP, then you will get each letter, plus the count of poducts. If you don't need the count, just do something like: SELECT DISTINCT SUBSTR(productname, 0, 1) FROM products ORDER BY SUBSTR(productname, 0, 1) Do check that SUBSTR index starts from 0 or one! Enjoy, John On Oct 31, 4:42 am, gimperdan...@gmail.com gimperdan...@gmail.com wrote: I am working on a project where I would like to have a menu to search by Letters. For instance: A | B | C | D |E and so on... However I only want to show the letters that correspond to a product on the database. So if I have product: Apple, and Banana I would show the letters: A | B As of right now, I do it in a really bad way.. I have a loop that goes from A-Z which SELECT COUNTS each letter and throws everything in one array. What's a better way to do that? Instead of have 26 queries? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: Browse By Letter (a php question)
Hi, As of right now, I do it in a really bad way.. I have a loop that goes from A-Z which SELECT COUNTS each letter and throws everything in one array. What's a better way to do that? Instead of have 26 queries? You search for LIKE {letter}%, eg: public function search($letter='a') { $conditions = array('Page.name LIKE'=$letter.'%'); $this-data = $this-Page-find('all', array( 'conditions'=$conditions )); $this-autoRender = 0; } hth Jon -- jon bennett - www.jben.net - blog.jben.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: caching Media View
Setting the 'cache' option will send the Cache-Control: max- age=time, Expires=converted time and Pragma: cache headers. It does not change the response HTTP 1.1 code to 304, nor does it set the If-Modified-Since header. -j. On Oct 31, 2:17 am, tol daviddevr...@gmail.com wrote: Can someone tell me how caching in media views is supposed to work? example: $this-view = 'Media'; $params = array( 'id' = $id, 'cache' = 10, 'download' = false, 'extension' = 'jpg', 'path' = 'restricted' . DS . 'uservideo' . DS ); $this-set($params); Works fine but I get the feeling its not caching. The headers of the images are 200 OK not 304 Am I doing something wrong? Or am I misunderstanding / overlooking something? 'cache'=true does not change anything either... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: Cake Hosting - Who is the best?
The good thing about cake is that it will run anywhere. 99% of the hosts will run cake fine. So it all depends on how much you want to spend on the host. And what site you're running. There are some good cheap shared hosting companies around that will do the trick. Think http://www.hostgator.com/ is still a good one, only costs $5/ month. There are also others like http://www.dreamhost.com/ ($8.95/mo with ssh access) Been running a dedicated server for a couple of years now, so haven't kept up with all the shared hosting companies around On Oct 31, 3:28 am, TimG t...@gurske.com wrote: I am thinking of Linode - they seem awesome. I am a little intimidated about having to install my own LAMP stack though. I see their setup guides - what system should I use though? I've used fedora and cent a while back but I don't know what is the best to use for cake app type hosting. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: Cake Hosting - Who is the best?
hi Tim, I am thinking of Linode - they seem awesome. I am a little intimidated about having to install my own LAMP stack though. I see their setup guides - what system should I use though? I've used fedora and cent a while back but I don't know what is the best to use for cake app type hosting. I use Ubuntu (hardy I think), takes about an hour to get everything installed (quite poss longer first time though), including security stuff like deny hosts. Once it's set up, it's very easy to manage, you just run sudo apt-get update and sudo apt-get upgrade every few weeks to keep security patches in place. Adding a new site is as easy as creating the directories on the server, a vhost file and running sudo a2ensite mydomain.com. I'd recommend not running a mail server though, instead get a free google apps account and run all email via google. hth Jon jon bennett - www.jben.net - blog.jben.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: Cake Hosting - Who is the best?
I've been using http://www.downtownhost.com for years now. I started at shared and slowly progressed up to dedicated. Their customer service is excellent! On Oct 31, 2:10 am, Crazy crazy...@gmail.com wrote: The good thing about cake is that it will run anywhere. 99% of the hosts will run cake fine. So it all depends on how much you want to spend on the host. And what site you're running. There are some good cheap shared hosting companies around that will do the trick. Thinkhttp://www.hostgator.com/is still a good one, only costs $5/ month. There are also others likehttp://www.dreamhost.com/($8.95/mo with ssh access) Been running a dedicated server for a couple of years now, so haven't kept up with all the shared hosting companies around On Oct 31, 3:28 am, TimG t...@gurske.com wrote: I am thinking of Linode - they seem awesome. I am a little intimidated about having to install my own LAMP stack though. I see their setup guides - what system should I use though? I've used fedora and cent a while back but I don't know what is the best to use for cake app type hosting. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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 behaviour doesn't return all data
Yes I try to get all the users of the team with id=4 but I don't get anything. Where do i mistake? On 30 Ott, 20:42, John Andersen j.andersen...@gmail.com wrote: You are using find('first', $options), so you only get one record! And the one record will be the one which has a team with a user! You don't get the team! I am guessing - are you trying to get all the users in the first team for the specified user? Enjoy, John On Oct 30, 6:30 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi I use containable behaviour, but I don't get all data that I have requested My code is : $options['fields'] = array('User.*'); $options['conditions'] = array('User.username' = $user_id); $options['contain'] = array( 'Organization' = array( 'fields'=array('Team.*'), 'User' = array( 'fields' = array('User.*') ) ) ); pr($this-User-find('first',$options)); But I get only : Array ( [User] = Array ( [id] = 1 ... ... ) [Team] = Array ( [0] = Array ( [id] = 4 ... ... [UsersTeams] = Array ( [id] = 1 [user_id] = 1 [team_id] = 4 ) ) ) ) I don't get all users that are inside team Between User and Team there is a hasAndBelongsToMany relation. How can I do to get also all users that are in team? 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: Containable behaviour doesn't return all data
That is not what you are showing with your code. This part sets the condition of a user with an id, not a team with an id. Try to find from the team side, not the user side, if you know the team id! Example: $this-Team-find(...) or if you don't have the Team model in the controller: $this-User-Team-find(...) Enjoy, John On Oct 31, 12:13 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Yes I try to get all the users of the team with id=4 but I don't get anything. Where do i mistake? On 30 Ott, 20:42, John Andersen j.andersen...@gmail.com wrote: You are using find('first', $options), so you only get one record! And the one record will be the one which has a team with a user! You don't get the team! I am guessing - are you trying to get all the users in the first team for the specified user? Enjoy, John On Oct 30, 6:30 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi I use containable behaviour, but I don't get all data that I have requested My code is : $options['fields'] = array('User.*'); $options['conditions'] = array('User.username' = $user_id); $options['contain'] = array( 'Organization' = array( 'fields'=array('Team.*'), 'User' = array( 'fields' = array('User.*') ) ) ); pr($this-User-find('first',$options)); But I get only : Array ( [User] = Array ( [id] = 1 ... ... ) [Team] = Array ( [0] = Array ( [id] = 4 ... ... [UsersTeams] = Array ( [id] = 1 [user_id] = 1 [team_id] = 4 ) ) ) ) I don't get all users that are inside team Between User and Team there is a hasAndBelongsToMany relation. How can I do to get also all users that are in team? 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: Containable behaviour doesn't return all data
I don't know the team_id I kow user_id. I would find all users of all teams which user_id belongs. I ask me if it is possible with only one find operation using contanaible behaviour. On 31 Ott, 11:27, John Andersen j.andersen...@gmail.com wrote: That is not what you are showing with your code. This part sets the condition of a user with an id, not a team with an id. Try to find from the team side, not the user side, if you know the team id! Example: $this-Team-find(...) or if you don't have the Team model in the controller: $this-User-Team-find(...) Enjoy, John On Oct 31, 12:13 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Yes I try to get all the users of the team with id=4 but I don't get anything. Where do i mistake? On 30 Ott, 20:42, John Andersen j.andersen...@gmail.com wrote: You are using find('first', $options), so you only get one record! And the one record will be the one which has a team with a user! You don't get the team! I am guessing - are you trying to get all the users in the first team for the specified user? Enjoy, John On Oct 30, 6:30 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi I use containable behaviour, but I don't get all data that I have requested My code is : $options['fields'] = array('User.*'); $options['conditions'] = array('User.username' = $user_id); $options['contain'] = array( 'Organization' = array( 'fields'=array('Team.*'), 'User' = array( 'fields' = array('User.*') ) ) ); pr($this-User-find('first',$options)); But I get only : Array ( [User] = Array ( [id] = 1 ... ... ) [Team] = Array ( [0] = Array ( [id] = 4 ... ... [UsersTeams] = Array ( [id] = 1 [user_id] = 1 [team_id] = 4 ) ) ) ) I don't get all users that are inside team Between User and Team there is a hasAndBelongsToMany relation. How can I do to get also all users that are in team? 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: How to retrieve validation errors on model save?
If you are correctly validating within the model, add this to your app_model.php file: function validates($options = array()) { // Debug validation $errors = $this-invalidFields($options); if (is_array($errors) !empty($errors)) { $this-log($errors, 'debug'); } // Validate return parent::validates($options); } Afterwards check /app/logs/debug.log for validation errors that might have occured after you trigger a validation (or save) On Oct 29, 10:08 pm, Will Poillion lorew...@gmail.com wrote: Simple question: I'm attempting to save a model, and the data to be saved is not passing the validation rules. How do I retrieve the validation error? if ($this-Ingredient-IngredientImage-save($this-data)) { //success $this-Session-setFlash(__('The Ingredient Image has been saved', true));} else { // retrieve validation error and return to view } Also, am I correct in assuming that setFlash is useless in an ajax call? I know I'm a noob but I'm not sure how I would use the setflash and flash functionality in an ajax call. Any clue as to how to do this would be most appreciated. Thanks! Will --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: Database Design Advice Needed - Multiple Companies having Accounting, Production and CRM components
You have quite an ambitious project. What you are wanting to create is an integrated ERP system. Now you have the individual pieces but want them integrated. Is this system feasible in CakePHP? Absolutely! One database with multiple tables would be fine, IMHO. (Even when developing on a mainframe, in most cases, it is technically one database with thousands of tables...We would segregate the tables into 'libraries' by application but that was mostly for convenience of backup and restore.) However, you have a classic make or buy decision. Making a custom ERP system for your companies is not for the faint of heart. You didn't mention your team of developers and analysts. I came across something yesterday that you may want to consider. This article described an individual that is helping companies like yours: http://www.bloomberg.com/apps/news?pid=20601109sid=arPzMR.hhDq0. Follow the links in the articles to products like Open ERP and you may find that using their products will get you an integrated system you desire, and be up and running making a profit sooner than rolling your own. Yes it is possible to do this in CakePHP. There are other business decisions that come into play also. On Oct 30, 6:15 pm, cakephp user cakephpu...@gmail.com wrote: Good day. Please note that I am not a professional and the software I'm creating is for two small companies i own. Please take it easy on me. My plan is to create a cakephp app which has accounting, production (job tracking) and crm components. I understand it sounds ambitious but I'd like to able to finish this project in the near future. I need your advice on a good database design for this kind of system. I have 2 small businesses which would use this system independently. Each company will have their own customers and database users. The customers tie all of the Accounting, Production and CRM Components together. Companies -- Corresponding Database Users (i.e. Company 1, Company 2) | | Customers | | | | Accounting Production CRM I'd like to know a couple of things. 1. Do you think this kind of system is feasible to do with cakephp and mysql? We are currently using different third party software for these components except the Production system which is done in php. Having no tie-in between the three creates discrepancies. 2. Database Design - Here is where I get stumped. While it's easy to put everything on one database, I am inclined to believe that this isn't in line with good database design practices. I maybe wrong here but please give me your opinion. Single database (with all of the levels in tables) or multiple databases? 3. If I were to use multiple databases, which ones would need their own database? Should all components in the diagram have their own databases or should the databases be on a company level? (i.e. each company has its own mysql database) Since customers tie in the Accounting, Production and CRM components, should it have a separate database as well as these three? Please take it easy on me. I'd really appreciate some advice/feedback on my dilemma. Thank you for your 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 -~--~~~~--~~--~--~---
Basic Authentication System
Hello, Does anyone know of a code snippet for basic user regisration, login, user management, groups, logout with cakephp? I am looking for a foundation to build off of. Thanks in advance. Franc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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 -~--~~~~--~~--~--~---
Auth Help
I have a test app I am building and created a few dummy accounts, added Auth and ACL and everything worked just fine. So I copied app folder and placed them on the live server and dumped the database but now I cant log into any of my test accounts. I created a new user on the testing server and created the exact user (same username and password) on the live server and passwords are different. testpass on dev server = 7340ec38fb72b91e2695e3799faaad15bad95324 testpass on live server = 770a5e89f64d198a61289255b185aa342bc71013 Code is the same, i made no changes. Security salt is the same. Is there something i am missing here that would cause this? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
how to create a new database
hii m a beginner i want help plz tell me how to create a new database and how to connect it to mysql. plz tell thnx \ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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 -~--~~~~--~~--~--~---
Converting Existing Project into Cake PHP
Hello, Im working in a project, in which i have more than 150 Database Tables, and expecting it may grow to 400 Tables in a Year. For this project, i have more than 10 modules and even the modules will grow in a good count. Can i convert this project into Cake PHP. I have just recently going through the Cake PHP, what i studied till now is Table name should be plural, Primary Key - id created modified above two fields to update created time and modified time. But most of my tables are not in plural, and i can overwrite primary key by using $primaryKey in model, but again created and modified are with different names, How can i overwrite them. How to handle above situation. Most Importan Question is Is CakePHP suitable for going with this big project, will it serve well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: how to create a new database
http://book.cakephp.org/view/4/Beginning-With-CakePHP On Sat, Oct 31, 2009 at 2:39 AM, tassi tasvinde...@gmail.com wrote: hii m a beginner i want help plz tell me how to create a new database and how to connect it to mysql. plz tell thnx \ -- 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 -~--~~~~--~~--~--~---
Ajax Pagination - Highlight Sort and Direction
Hi all, I'm using Cakephp v1.25 and I'm trying to find a way to highlight the sort column and direction when using ajax pagination. On a second note, is it possible to collect sort columns and directions so a user can combine them? thanks in advance. Enrique --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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 -~--~~~~--~~--~--~---
star rating system implementation using PROTOTYPE + AJAX.
I'm trying to use the starbox star rating system in my page. As the tutorial on the website suggested I used the saveStar function to call a function in one of my controllers. the controller name is comments and the function name is addRate. the code I have below doesnt work because it is not accessing the comments controller. how do i fix this? function saveStar(event) { new Ajax.Request('comments/addRate', { parameters: event.memo, onComplete: function(xhr) { // optional callback } }); } Also, how do i retrieve the data (event.memo) that is being send to the addRate function? should i use the $this-param['forum']['memo'] ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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 -~--~~~~--~~--~--~---
help with bake
Hi, I'm new to cakephp and I'm trying to bake for the first time (I'm following an example for Golding's book Beginning CakePHP p.65). I choose to bake a controller (the Posts controller) interactively, I include some basic class methods and want to use sessions. I get the following error: PHP Fatal error: Class 'Post' not found in .../cake/cake/console/libs/ tasks/controller.php on line 255 Anybody can help me with that? regards, Patrick CakePHP version 1.2.5 on Windows Vista, Apache server 2.2.9, PHP 5.2.10 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: help with bake
Do you still get the same error after you've also baked your Posts views and model? On Oct 31, 4:30 pm, Patrick agin.patr...@gmail.com wrote: Hi, I'm new to cakephp and I'm trying to bake for the first time (I'm following an example for Golding's book Beginning CakePHP p.65). I choose to bake a controller (the Posts controller) interactively, I include some basic class methods and want to use sessions. I get the following error: PHP Fatal error: Class 'Post' not found in .../cake/cake/console/libs/ tasks/controller.php on line 255 Anybody can help me with that? regards, Patrick CakePHP version 1.2.5 on Windows Vista, Apache server 2.2.9, PHP 5.2.10 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: help with bake
Baking models and views work. After some experimentation, baking controllers seems to work except when I specify 'yes' to the question would you like to include some basic class methods... Thank you for your help Patrick On Oct 31, 1:09 pm, Hols Kay hol...@googlemail.com wrote: Do you still get the same error after you've also baked your Posts views and model? On Oct 31, 4:30 pm, Patrick agin.patr...@gmail.com wrote: Hi, I'm new to cakephp and I'm trying to bake for the first time (I'm following an example for Golding's book Beginning CakePHP p.65). I choose to bake a controller (the Posts controller) interactively, I include some basic class methods and want to use sessions. I get the following error: PHP Fatal error: Class 'Post' not found in .../cake/cake/console/libs/ tasks/controller.php on line 255 Anybody can help me with that? regards, Patrick CakePHP version 1.2.5 on Windows Vista, Apache server 2.2.9, PHP 5.2.10 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: star rating system implementation using PROTOTYPE + AJAX.
I'm having the same problem, as much as i know you have to use the cakephp ajax helper but havn't found out how to retrieve the data in a function. -Armen On Oct 31, 8:58 am, BeerMan garej...@gmail.com wrote: I'm trying to use the starbox star rating system in my page. As the tutorial on the website suggested I used the saveStar function to call a function in one of my controllers. the controller name is comments and the function name is addRate. the code I have below doesnt work because it is not accessing the comments controller. how do i fix this? function saveStar(event) { new Ajax.Request('comments/addRate', { parameters: event.memo, onComplete: function(xhr) { // optional callback } }); } Also, how do i retrieve the data (event.memo) that is being send to the addRate function? should i use the $this-param['forum']['memo'] ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email 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: Cake Hosting - Who is the best?
I had never set up a linux system before I set up my current one. I used the Linode/Slicehost guides and was up and running in a few hours. There are good guides on setting up your own mailserver as well. I set up my mailserver using postfix and simply forward all mail to my main gmail account. I have gmail set up so that when I reply, gmail logs into my site's mailserver to send. Works like a charm. On Oct 31, 3:29 am, Jon Bennett jmbenn...@gmail.com wrote: hi Tim, I am thinking of Linode - they seem awesome. I am a little intimidated about having to install my own LAMP stack though. I see their setup guides - what system should I use though? I've used fedora and cent a while back but I don't know what is the best to use for cake app type hosting. I use Ubuntu (hardy I think), takes about an hour to get everything installed (quite poss longer first time though), including security stuff like deny hosts. Once it's set up, it's very easy to manage, you just run sudo apt-get update and sudo apt-get upgrade every few weeks to keep security patches in place. Adding a new site is as easy as creating the directories on the server, a vhost file and running sudo a2ensite mydomain.com. I'd recommend not running a mail server though, instead get a free google apps account and run all email via google. hth Jon jon bennett -www.jben.net- blog.jben.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 -~--~~~~--~~--~--~---
Sanitize:: clean help
Can someone help me out with this fairly simple question. I am doing: $clean = new Sanitize(); $this-data = $clean-clean($this-data); Now if a user enters quotes brackets or what not it gets converted to lt;scriptgt; which is fine for saving to the db I suppose. But when they go back to edit the entry the input is lt;scriptgt; how can i convert it back to what it was before? So it is readable. I want the data to be safe for the db but also be able to be editable by the end user. I tried echo $form-input(html_entity_decode('description'));but still comes out all mangled Thanks Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Routing Question
I have 2 routes defined for different groups. manage_ and editor_ Now I have a few functions that either group can access so i could easily just change the action name to edit rather than manage_edit and editor_edit but how can i set it up so manage_edit and editor_edit both end up at edit but the user will see manage/edit or editor/edit Thanks Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sanitize:: clean help
Try echo $form-input(description,array(value=html_entity_decode(@ $this-data[Model][description]))); On Oct 31, 5:29 pm, Dave make.cake.b...@gmail.com wrote: Can someone help me out with this fairly simple question. I am doing: $clean = new Sanitize(); $this-data = $clean-clean($this-data); Now if a user enters quotes brackets or what not it gets converted to lt;scriptgt; which is fine for saving to the db I suppose. But when they go back to edit the entry the input is lt;scriptgt; how can i convert it back to what it was before? So it is readable. I want the data to be safe for the db but also be able to be editable by the end user. I tried echo $form-input(html_entity_decode('description'));but still comes out all mangled Thanks Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---