Cakephp project deployment
Hi, I am new to cake and want to deploy my project but totally confused please somebody help me. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Validate data md5
Right, but not everyone uses secure connection for user registration, and honestly I can't remember a single site which doesn't clear the password field on registration error. On Jun 5, 3:20 am, calvin cal...@rottenrecords.com wrote: I don't get that. I think that presents a false sense of security. It's best practice to use a secure connection whenever you're transmitting passwords. And if you're handling the request over secure http, then it doesn't matter if you send the password back to the user. On Jun 4, 10:08 am, vekija vedran.konto...@gmail.com wrote: When you have an error on the registration form, it is a best practice to clear the password value and force the user to renter that info. So, in the controller... if($this-User-save($this-data)) { // ... whatever you do after user had registered successfully} else { // ... there was an error $this-data['User']['password'] = null; } V On Jun 4, 4:21 pm, Chrriss polet...@wanadoo.fr wrote: Hi, I have a form to add a user and I use an md5 encryption when I save the password in the database. I use $validate to check if the email address is valid. If it's not, the form shows the data again with the error message but the password is not the right one in this case. It's the hashed password. So when I re-enter a valid email address, the password that is saved in the database is not the one I wanted! How can I do ? Thank you in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP Gigya Social Network Plugin
@Gonzalo: Thanks for taking a look and informing me about that error, will look into that right now :) @nurvzy: Did a bit more digging before I implemented this and seems it costs $15k a year to use this service for profits that cross a certain threshold, and people at drupal are saying that a 1,000 user site would easily surpass that threshold. http://drupal.org/node/769272 I couldn't risk a sudden $15k bill, but will keep it in mind for when LocalCause is in profit as the concept seems excellent. Are you aware of the potential cost implications for your client? Regards, Paul. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Routes File Customization
Hey everyone - We've got a bit of an odd configuration, and I was wondering if anyone had ideas on how we could fix this. We took over hosting of a website this past week that essentially is two sites in one, a bank site and it's parent corp site. The routes.php file is used to determine which 'site' you are on, essentially loading up various pages based on the path. Pretty straightforward. However, what I'm running into is that any root traffic (www.site1.com/ or www.site2.com/) gets redirected to the corp site because of the routes file. You can see how the routes.php file is set up here: * * first the bancorp... */ Router::connect('/', array('controller' = 'pages', 'action' = 'display', 'bancorphome')); Router::connect('/gpb-in-the-news', array('controller' = 'pages', 'action' = 'display', 'bancorpnews')); Router::connect('/board-of-directors', array('controller' = 'pages', 'action' = 'display', 'bancorpofficers')); Router::connect('/contact-us', array('controller' = 'pages', 'action' = 'display', 'bancorpcontact')); Router::connect('/thank-you', array('controller' = 'pages', 'action' = 'display', 'bancorpthankyou')); Router::connect('/faq', array('controller' = 'pages', 'action' = 'display', 'bancorpfaq')); Router::connect('/privacy', array('controller' = 'pages', 'action' = 'display', 'bancorpprivacy')); /** * then the bank ... */ Router::connect('/home', array('controller' = 'pages', 'action' = 'display', 'bankhome')); Router::connect('/our-proposed-bank', array('controller' = 'pages', 'action' = 'display', 'bankhome')); Router::connect('/executive-team', array('controller' = 'pages', 'action' = 'display', 'bankexecutive')); Router::connect('/board_of_directors', array('controller' = 'pages', 'action' = 'display', 'bankboard')); Router::connect('/take-a-tour', array('controller' = 'pages', 'action' = 'display', 'banktakeatour')); Router::connect('/career-opportunities', array('controller' = 'pages', 'action' = 'display', 'bankcareers')); Router::connect('/contact_us', array('controller' = 'pages', 'action' = 'display', 'bankcontact')); Router::connect('/thank_you', array('controller' = 'pages', 'action' = 'display', 'bankthankyou')); Router::connect('/privacy_policy', array('controller' = 'pages', 'action' = 'display', 'bankprivacy')); /** So, any root path gets sent to the bancorp site. Is there any way to differentiate the two sites, so that maybe it looks for the url and redirects to the appropriate home page (aside from splitting the one site into two)? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP Gigya Social Network Plugin
Update: Have sent Gigya an email asking for some sales information as it's no good making a decision based on third party information. Will feedback to you when I have spoken with them. HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: displaying sql query
THanks guys ! print_r works! But i wonder why the return function doesn't work. On Jun 4, 5:51 pm, Dilip Godhani dilip.godh...@gmail.com wrote: try this function getResult() { $result = $this-query(SELECT * FROM `downloads` WHERE `index`=123); print_r($result); } On Fri, Jun 4, 2010 at 3:16 PM, Toby Ashley lowpi...@gmail.com wrote: You never return $result from the getResult function. You need: function getResult() { $result = $this-query(SELECT * FROM `downloads` WHERE `index`=123); return $result; } On Fri, Jun 4, 2010 at 10:40 AM, ytbryan ytbr...@gmail.com wrote: Hi all, Can someone help me with this. I do a query on my database from model. function getResult() { $result = $this-query(SELECT * FROM `downloads` WHERE `index`=123); } I call assign the query result to the view from controller. function index(){ $this-set('result', $this-MosDownload-getResult()); } I call the variable on the view. h2?php echo $result; ?/h2 But the result is not displayed. What is wrong ? Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Dilip Godhani Jr Software Developer, Entourage Solutions e-mail: di...@entouragesolutions.com dilip.godh...@gmail.com Web.:www.entouragesolutions.com m. 9913822582 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: displaying sql query
its return array and u print array in echo ,,echo cnt display arrayy so it is not work. On Fri, Jun 4, 2010 at 3:21 PM, Dilip Godhani dilip.godh...@gmail.comwrote: try this function getResult() { $result = $this-query(SELECT * FROM `downloads` WHERE `index`=123); print_r($result); } On Fri, Jun 4, 2010 at 3:16 PM, Toby Ashley lowpi...@gmail.com wrote: You never return $result from the getResult function. You need: function getResult() { $result = $this-query(SELECT * FROM `downloads` WHERE `index`=123); return $result; } On Fri, Jun 4, 2010 at 10:40 AM, ytbryan ytbr...@gmail.com wrote: Hi all, Can someone help me with this. I do a query on my database from model. function getResult() { $result = $this-query(SELECT * FROM `downloads` WHERE `index`=123); } I call assign the query result to the view from controller. function index(){ $this-set('result', $this-MosDownload-getResult()); } I call the variable on the view. h2?php echo $result; ?/h2 But the result is not displayed. What is wrong ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Dilip Godhani Jr Software Developer, Entourage Solutions e-mail: di...@entouragesolutions.com dilip.godh...@gmail.com Web.: www.entouragesolutions.com m. 9913822582 -- Dilip Godhani Jr Software Developer, Entourage Solutions e-mail: di...@entouragesolutions.com dilip.godh...@gmail.com Web.: www.entouragesolutions.com m. 9913822582 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Find('list') and setting option values
Bingo! Thanks for the help. On May 24, 4:48 am, WebbedIT p...@webbedit.co.uk wrote: Try the following: $states = $this-Location-find('list', array( 'fields' =array('Location.state', 'Location.state'), 'group' = array('Location.state') )); Paul Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
echoing a bigger font
Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
use p id=largeText My Text HERE/p in css p #largeText { font-size: 20px; } and you will get what you are looking for On Sat, Jun 5, 2010 at 8:58 AM, ytbryan ytbr...@gmail.com wrote: Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
nope that doesn't help. note that the text is echo out using ?php echo $variable ? On Jun 5, 9:22 pm, Jonathon Musters luvz2...@gmail.com wrote: use p id=largeText My Text HERE/p in css p #largeText { font-size: 20px; } and you will get what you are looking for On Sat, Jun 5, 2010 at 8:58 AM, ytbryan ytbr...@gmail.com wrote: Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
On Jun 5, 4:15 pm, ytbryan ytbr...@gmail.com wrote: nope that doesn't help. note that the text is echo out using ?php echo $variable ? How about moving your head closer to the screen? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
Well then its time to learn css then to solve this as I gave you the answer On 6/5/10, ytbryan ytbr...@gmail.com wrote: nope that doesn't help. note that the text is echo out using ?php echo $variable ? On Jun 5, 9:22 pm, Jonathon Musters luvz2...@gmail.com wrote: use p id=largeText My Text HERE/p in css p #largeText { font-size: 20px; } and you will get what you are looking for On Sat, Jun 5, 2010 at 8:58 AM, ytbryan ytbr...@gmail.com wrote: Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Saving multiple rows of key-value pairs during a single update?
I have the following in my User model; public $hasMany = array( 'MetaUser' = array( 'className' = 'MetaUser', 'fields' = array( 'meta_key', 'meta_value' ) ) ); ...should I also define a belongsTo relationship from the MetaUser model, or is this necessary when it's being manipulated from the Users controller? On Jun 4, 6:49 pm, calvin cal...@rottenrecords.com wrote: Did you define the relationship between User and MetaUser? i.e. in the User model: $hasMany = array('MetaUser' = array()); Because both, your approach and vekija's, should work. On Jun 4, 9:48 am, mwaterous m...@watero.us wrote: Well my last question here turned out to be between keyboard and chair, so hopefully this isn't quite as silly a question! I am learning Cake and building a custom user authentication system (who isn't?). I am trying to use two separate tables to store data, the User Model table as parent which stores only mission critical data (login, password, email, created, etc), and a MetaUser model table which is built around key value pairs (meta_id, user_id, meta_key, meta_value). Upon registration I have two pieces of meta information I would like to store - the activation code and an optin for receiving communication from site admins. I have built the forms as instructed by the Cake Book in order to use saveAll() in my Register action. The problem is that this results in the following array: Array ( [MetaUser] = Array ( [optin] = 1 [activation_code] = 9c1a26272907d4196a7bf39d [user_id] = 17 ) ) This obviously won't save since there is no optin or activation_code column in the MetaUser table. So I tried creating a beforeSave() under the presumption that if this was a numerical array it might try and add multiple rows on its own; public function beforeSave() { if ( isset( $this-data['MetaUser']['user_id'] ) ) { $userid = $this-data['MetaUser']['user_id']; $new = array(); $i = 0; foreach ( $this-data['MetaUser'] as $k = $v ) { $new[$i]['user_id'] = $user_id; $new[$i]['meta_key'] = $k; $new[$i]['meta_value'] = $v; $i++; } $this-data['MetaUser'] = $new; } return true; } But apparently it doesn't work that way. I'm going to try it next using distinct save()'s for $this-User and $this-MetaUser but am I missing something else that I should be doing instead? I want to create a MetaUser model where I can save each entry (even if multiple are coming from one form) as separate rows based on the key = value pair setup. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
The selector should be changed to p#largeText, no space, and that should work. And don't use font tags or b/i/u tags. On Jun 5, 6:22 am, Jonathon Musters luvz2...@gmail.com wrote: use p id=largeText My Text HERE/p in css p #largeText { font-size: 20px; } and you will get what you are looking for On Sat, Jun 5, 2010 at 8:58 AM, ytbryan ytbr...@gmail.com wrote: Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Find('list') and setting option values
By the way, I did a bit more experimenting with find('list') and automagic selects. Posted my findings here in case anyone else needed them: http://holisticnetworking.net/cake/2010/06/interesting-form-input-behavior-for-selects/ On May 24, 4:48 am, WebbedIT p...@webbedit.co.uk wrote: Try the following: $states = $this-Location-find('list', array( 'fields' =array('Location.state', 'Location.state'), 'group' = array('Location.state') )); Paul Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cakephp project deployment
On Jun 5, 2:43 am, mirfan m.irfa...@gmail.com wrote: Hi, I am new to cake and want to deploy my project but totally confused please somebody help me. It's a bit difficult to help if none of us knows what the trouble is. A little more info is required. Specifically, what have you tried? What problems are you encountering? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Routes File Customization
It's sorta already doing that. If you want the bank homepage then you have to go to site1.com/home or site2.com/home. I don't think the Router is equipped for routing by hostname (could be wrong though). If you absolutely have to have the 2 sites mixed together and have the domains mirror each other, except at document root, then your best bet would be to just use mod_rewrite and add a rule for document root. Otherwise, you'll have to check the hostname in PagesController and serve the correct homepage. Personally, I would just use one domain, making the other domain a redirect, and use prefix routing. For instance: bank.com would be the active domain, with pages like: bank.com/contact-us bank.com/careers bank.com/privacy bank.com/corp would be the prefix for all the bancorp stuff, e.g.: bank.com/corp/contact-us bank.com/corp/careers bank.com/corp/privacy This is much more intuitive to the user, instead of having 2 domains with similarly-named pages like: site#.com/privacy site#.com/privacy_policy site#.com/contact-us site#.com/contact_us On Jun 4, 1:29 pm, GregFL2001 gdelo...@mitcs.com wrote: Hey everyone - We've got a bit of an odd configuration, and I was wondering if anyone had ideas on how we could fix this. We took over hosting of a website this past week that essentially is two sites in one, a bank site and it's parent corp site. The routes.php file is used to determine which 'site' you are on, essentially loading up various pages based on the path. Pretty straightforward. However, what I'm running into is that any root traffic (www.site1.com/orwww.site2.com/) gets redirected to the corp site because of the routes file. You can see how the routes.php file is set up here: * * first the bancorp... */ Router::connect('/', array('controller' = 'pages', 'action' = 'display', 'bancorphome')); Router::connect('/gpb-in-the-news', array('controller' = 'pages', 'action' = 'display', 'bancorpnews')); Router::connect('/board-of-directors', array('controller' = 'pages', 'action' = 'display', 'bancorpofficers')); Router::connect('/contact-us', array('controller' = 'pages', 'action' = 'display', 'bancorpcontact')); Router::connect('/thank-you', array('controller' = 'pages', 'action' = 'display', 'bancorpthankyou')); Router::connect('/faq', array('controller' = 'pages', 'action' = 'display', 'bancorpfaq')); Router::connect('/privacy', array('controller' = 'pages', 'action' = 'display', 'bancorpprivacy')); /** * then the bank ... */ Router::connect('/home', array('controller' = 'pages', 'action' = 'display', 'bankhome')); Router::connect('/our-proposed-bank', array('controller' = 'pages', 'action' = 'display', 'bankhome')); Router::connect('/executive-team', array('controller' = 'pages', 'action' = 'display', 'bankexecutive')); Router::connect('/board_of_directors', array('controller' = 'pages', 'action' = 'display', 'bankboard')); Router::connect('/take-a-tour', array('controller' = 'pages', 'action' = 'display', 'banktakeatour')); Router::connect('/career-opportunities', array('controller' = 'pages', 'action' = 'display', 'bankcareers')); Router::connect('/contact_us', array('controller' = 'pages', 'action' = 'display', 'bankcontact')); Router::connect('/thank_you', array('controller' = 'pages', 'action' = 'display', 'bankthankyou')); Router::connect('/privacy_policy', array('controller' = 'pages', 'action' = 'display', 'bankprivacy')); /** So, any root path gets sent to the bancorp site. Is there any way to differentiate the two sites, so that maybe it looks for the url and redirects to the appropriate home page (aside from splitting the one site into two)? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
Well yes but this goes back to an understanding of CSS and the types of elements they are.. On Sat, Jun 5, 2010 at 1:08 PM, calvin cal...@rottenrecords.com wrote: The selector should be changed to p#largeText, no space, and that should work. And don't use font tags or b/i/u tags. On Jun 5, 6:22 am, Jonathon Musters luvz2...@gmail.com wrote: use p id=largeText My Text HERE/p in css p #largeText { font-size: 20px; } and you will get what you are looking for On Sat, Jun 5, 2010 at 8:58 AM, ytbryan ytbr...@gmail.com wrote: Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Login - Header location Error
Hi, I just started using cakephp today and i received the same errors as above. Solution: You only need to change the core.php file in line 203 and line 208. Also make sure the keys are different from debugger.php line 684. If the key is same triger the errors. Bluedoy Support www.bluedoy.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Saving multiple rows of key-value pairs during a single update?
Vekija's method works where mine seems to fail horribly. This has become more of an exploration in Cake than a necessity now, but I'm trying to understand why this particular saveAll() is failing; using the hidden input in combination with the regular input I can effectively save as many rows as I would like to from any given form. However when I try to compensate for the possibility of an associative index appearing in $this-data['MetaUser'] it's failing to insert the rows every time. For example, in my view I have; echo $form-input( 'MetaUser.activation', array( 'type' = 'checkbox', 'label' = 'blah blah blah' ) ); echo $form-input( 'MetaUser.0.meta_key', array( 'type' = 'hidden', 'value' = 'optin' ) ); echo $form-input( 'MetaUser.0.meta_value', array( 'type' = 'checkbox', 'label' = 'I want to receive newsletters and updates via email.' ) ); ...and for clarity it does work fine if I remove the first input, but nevertheless and I'm not sure why, I wanted to write some code to handle this situation transparently. So I wrote a beforeSave() callback in my MetaUser model that looks for such occurrences and fixes them (and then returns true, so that's not the issue). Here is the array at the start of my beforeSave() method; Array ( [MetaUser] = Array ( [activation] = 1 [0] = Array ( [meta_key] = optin [meta_value] = 1 [user_id] = 12 ) ) ) And here it is at the end, right before the return statement; Array ( [MetaUser] = Array ( [0] = Array ( [meta_key] = optin [meta_value] = 1 [user_id] = 12 ) [1] = Array ( [meta_key] = activation [meta_value] = 1 [user_id] = 12 ) ) ) So the array I'm building *looks* like it should work, but after logging the queries and reviewing everything it seems that it doesn't even try to insert the data. It does the first insert, gets the auto_increment value and commits. On Jun 5, 9:32 am, mwaterous m...@watero.us wrote: I have the following in my User model; public $hasMany = array( 'MetaUser' = array( 'className' = 'MetaUser', 'fields' = array( 'meta_key', 'meta_value' ) ) ); ...should I also define a belongsTo relationship from the MetaUser model, or is this necessary when it's being manipulated from the Users controller? On Jun 4, 6:49 pm, calvin cal...@rottenrecords.com wrote: Did you define the relationship between User and MetaUser? i.e. in the User model: $hasMany = array('MetaUser' = array()); Because both, your approach and vekija's, should work. On Jun 4, 9:48 am, mwaterous m...@watero.us wrote: Well my last question here turned out to be between keyboard and chair, so hopefully this isn't quite as silly a question! I am learning Cake and building a custom user authentication system (who isn't?). I am trying to use two separate tables to store data, the User Model table as parent which stores only mission critical data (login, password, email, created, etc), and a MetaUser model table which is built around key value pairs (meta_id, user_id, meta_key, meta_value). Upon registration I have two pieces of meta information I would like to store - the activation code and an optin for receiving communication from site admins. I have built the forms as instructed by the Cake Book in order to use saveAll() in my Register action. The problem is that this results in the following array: Array ( [MetaUser] = Array ( [optin] = 1 [activation_code] = 9c1a26272907d4196a7bf39d [user_id] = 17 ) ) This obviously won't save since there is no optin or activation_code column in the MetaUser table. So I tried creating a beforeSave() under the presumption that if this was a numerical array it might try and add multiple rows on its own; public function beforeSave() { if ( isset( $this-data['MetaUser']['user_id'] ) ) { $userid = $this-data['MetaUser']['user_id']; $new = array(); $i = 0; foreach ( $this-data['MetaUser'] as $k = $v ) { $new[$i]['user_id'] = $user_id; $new[$i]['meta_key'] = $k; $new[$i]['meta_value'] = $v; $i++; } $this-data['MetaUser'] = $new; } return true; } But apparently it doesn't work that way. I'm going to try it next using distinct save()'s for $this-User and
Re: Query question(s)
Perhaps I'm over-complicating this but I'm still having some problems with building my query. I'm looking to do something like: $array = array (A, B, C, D, E); $list = implode( ',' , $array); 'conditions' = array( 'SomeCol.contents' = array($list) ) The problem I'm running into is that $array can contain any number and combination of values (A, C, E), (A, B), (E) ... etc. And 'SomeCol.contents' can also contain any number and combination of values stored as a comma separated string. (it was originally stored as a serialized array). I need the query to return a result if 'SomeCol.contents' and $array have any one of their values in common. I was thinking along the lines of : 'conditions' = array( 'SomeCol.contents LIKE' = '%'.$array[0].'%' OR 'SomeCol.contents LIKE' = '%'.$array[1].'%' etc, etc // this way should include any record in the result that shares a value with $array but I assume I would run into an issue with an undefined index by not knowing how many values $array contains. (I do know it has the potential to store a max of 7 values) I had this all worked out with conventional PHP but now I need to use Paginate and containable with this query as well as a bunch of other conditions (with a set value) and I'm confusing myself more than anything else which isn't a real stretch for me to begin with 8-). Any suggestions are appreciated. Thanks. - Ed On Fri, Jun 4, 2010 at 11:54 PM, Ed Propsner crotchf...@gmail.com wrote: Thanks Calvin, point well taken. I'll just stick with GET like I always have for searches. I tweaked the routing and got things cleaned up a bit so I guess I'm okay with it. I'm not quite sure what I was expecting in the first place? 8-) The search uses a lot of checkboxes and results in something like http://mysite.com/search/results/value1=0value1=1value2=0value2=1. I can't seem to clean it up any more when submitting with GET, or am I still missing something? Anyhow, at least it's working the way that I want it to. I'm still having some issues with query so I'll quit fussing with the url for now. - Ed On Fri, Jun 4, 2010 at 10:15 PM, calvin cal...@rottenrecords.com wrote: POST requests are generally not cached, but you can force it to be cached using the Cache-Control and Expires headers. However, I've never tried this so I don't know if the browser will still show the form submission dialog (it may need to resend the form data to check to see if the document has changed since last requested). It probably won't, but I would still strongly advise against this. A search request is generally an idempotent operation (multiple requests do not have any side-effects), which is precisely what the GET request is designed for. There's no reason to use POST in this case. Cake has a perfectly good way of hiding ugly URL-encoding using its REST-style routing patterns, e.g.: http://yoursite.com/pages/search/foo/bar/foo2/bar2/... You can also use named parameters to make the search URL more readable, e.g.: http://yoursite.com/products/search/q:paegan/artist:acid+bath/category:t-shirt Unless you have a ton of search options, I see no reason to use POST. And even if you use POST and generate shorter/cleaner URL--what's the point? What will that clean URL achieve? The user can't bookmark it. They can't link a friend to it. They can't do anything with it. A happy compromise would be to do what a lot of forums do, and cache each search server-side. Then when the user performs a search (with either POST or GET), they get redirected to the cached search result, which might be something like: http://yoursite.com/search/paegan+terrorism+tactics/f83e3a4b389c6b That will decrease your server load, allow you to use a POST form, and still allow the user to bookmark/link the search results (at least for a time). On Jun 4, 10:40 am, Ed Propsner crotchf...@gmail.com wrote: I was checking out the book on complex queries and not really finding what I'm looking for. I'm trying to create a query that covers both a basic and advanced search. The form may be submitting all or just some of the options available on the page depending on what the user chooses. Once the form has been submitted clicking any one of the query results would navigate the user away from the 'results page'. To avoid getting hit with the form submission dialogue when the users clicks the back button to return to the search results page and to cover the 'conditional query' ... I used to use a combo of $_GET and if(isset. ie: $query= SELECT something FROM somewhere WHERE etc. etc. etc. AND ; if (isset($_GET['some_value']) $_GET['some_value'] != '' ) { $value = $_GET['some_value']; $query .= AND something = '.addslashes($value).'; }
Re: Saving multiple rows of key-value pairs during a single update?
Had a similar issue recently when I was trying to save related data array with associative indexes. Since saveAll() won't work with such indexes I had to convert those to the numeric so I put the code in beforeSave() callback. It didn't work. But when I put the code in the controller just before the saveAll() call everything worked just fine. In my case it was a single line of code so I thought it wouldn't hurt to much if it was there, so I didn't investigated further. On Jun 5, 10:24 pm, mwaterous m...@watero.us wrote: Vekija's method works where mine seems to fail horribly. This has become more of an exploration in Cake than a necessity now, but I'm trying to understand why this particular saveAll() is failing; using the hidden input in combination with the regular input I can effectively save as many rows as I would like to from any given form. However when I try to compensate for the possibility of an associative index appearing in $this-data['MetaUser'] it's failing to insert the rows every time. For example, in my view I have; echo $form-input( 'MetaUser.activation', array( 'type' = 'checkbox', 'label' = 'blah blah blah' ) ); echo $form-input( 'MetaUser.0.meta_key', array( 'type' = 'hidden', 'value' = 'optin' ) ); echo $form-input( 'MetaUser.0.meta_value', array( 'type' = 'checkbox', 'label' = 'I want to receive newsletters and updates via email.' ) ); ...and for clarity it does work fine if I remove the first input, but nevertheless and I'm not sure why, I wanted to write some code to handle this situation transparently. So I wrote a beforeSave() callback in my MetaUser model that looks for such occurrences and fixes them (and then returns true, so that's not the issue). Here is the array at the start of my beforeSave() method; Array ( [MetaUser] = Array ( [activation] = 1 [0] = Array ( [meta_key] = optin [meta_value] = 1 [user_id] = 12 ) ) ) And here it is at the end, right before the return statement; Array ( [MetaUser] = Array ( [0] = Array ( [meta_key] = optin [meta_value] = 1 [user_id] = 12 ) [1] = Array ( [meta_key] = activation [meta_value] = 1 [user_id] = 12 ) ) ) So the array I'm building *looks* like it should work, but after logging the queries and reviewing everything it seems that it doesn't even try to insert the data. It does the first insert, gets the auto_increment value and commits. On Jun 5, 9:32 am, mwaterous m...@watero.us wrote: I have the following in my User model; public $hasMany = array( 'MetaUser' = array( 'className' = 'MetaUser', 'fields' = array( 'meta_key', 'meta_value' ) ) ); ...should I also define a belongsTo relationship from the MetaUser model, or is this necessary when it's being manipulated from the Users controller? On Jun 4, 6:49 pm, calvin cal...@rottenrecords.com wrote: Did you define the relationship between User and MetaUser? i.e. in the User model: $hasMany = array('MetaUser' = array()); Because both, your approach and vekija's, should work. On Jun 4, 9:48 am, mwaterous m...@watero.us wrote: Well my last question here turned out to be between keyboard and chair, so hopefully this isn't quite as silly a question! I am learning Cake and building a custom user authentication system (who isn't?). I am trying to use two separate tables to store data, the User Model table as parent which stores only mission critical data (login, password, email, created, etc), and a MetaUser model table which is built around key value pairs (meta_id, user_id, meta_key, meta_value). Upon registration I have two pieces of meta information I would like to store - the activation code and an optin for receiving communication from site admins. I have built the forms as instructed by the Cake Book in order to use saveAll() in my Register action. The problem is that this results in the following array: Array ( [MetaUser] = Array ( [optin] = 1 [activation_code] = 9c1a26272907d4196a7bf39d [user_id] = 17 ) ) This obviously won't save since there is no optin or activation_code column in the MetaUser table. So I tried creating a beforeSave() under the presumption that if this was a numerical array it might try and add multiple rows on its own; public function beforeSave() { if ( isset( $this-data['MetaUser']['user_id'] ) ) {
Total count of posts?
Hi, How could I set dynamic data in the layout? In other word, I need to place the total count of posts in the layout footer. My application has posts controller and post model. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Total count of posts?
Hello, in the controller: $this-set('postcount', $this-Post-find('count')); in the view: ?php echo $postcount; ? Andras On Jun 5, 2010, at 6:34 PM, saidbakr wrote: Hi, How could I set dynamic data in the layout? In other word, I need to place the total count of posts in the layout footer. My application has posts controller and post model. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Saving multiple rows of key-value pairs during a single update?
I'll give that a try and see how it works out - it would be nice to figure out what exactly about the manipulation during the model's beforeSave callback is causing the issue so that I could understand the process better, but until I've worked with Cake for a little while longer I think it'll be easier just to get things working first. On Jun 5, 2:39 pm, vekija vedran.konto...@gmail.com wrote: Had a similar issue recently when I was trying to save related data array with associative indexes. Since saveAll() won't work with such indexes I had to convert those to the numeric so I put the code in beforeSave() callback. It didn't work. But when I put the code in the controller just before the saveAll() call everything worked just fine. In my case it was a single line of code so I thought it wouldn't hurt to much if it was there, so I didn't investigated further. On Jun 5, 10:24 pm, mwaterous m...@watero.us wrote: Vekija's method works where mine seems to fail horribly. This has become more of an exploration in Cake than a necessity now, but I'm trying to understand why this particular saveAll() is failing; using the hidden input in combination with the regular input I can effectively save as many rows as I would like to from any given form. However when I try to compensate for the possibility of an associative index appearing in $this-data['MetaUser'] it's failing to insert the rows every time. For example, in my view I have; echo $form-input( 'MetaUser.activation', array( 'type' = 'checkbox', 'label' = 'blah blah blah' ) ); echo $form-input( 'MetaUser.0.meta_key', array( 'type' = 'hidden', 'value' = 'optin' ) ); echo $form-input( 'MetaUser.0.meta_value', array( 'type' = 'checkbox', 'label' = 'I want to receive newsletters and updates via email.' ) ); ...and for clarity it does work fine if I remove the first input, but nevertheless and I'm not sure why, I wanted to write some code to handle this situation transparently. So I wrote a beforeSave() callback in my MetaUser model that looks for such occurrences and fixes them (and then returns true, so that's not the issue). Here is the array at the start of my beforeSave() method; Array ( [MetaUser] = Array ( [activation] = 1 [0] = Array ( [meta_key] = optin [meta_value] = 1 [user_id] = 12 ) ) ) And here it is at the end, right before the return statement; Array ( [MetaUser] = Array ( [0] = Array ( [meta_key] = optin [meta_value] = 1 [user_id] = 12 ) [1] = Array ( [meta_key] = activation [meta_value] = 1 [user_id] = 12 ) ) ) So the array I'm building *looks* like it should work, but after logging the queries and reviewing everything it seems that it doesn't even try to insert the data. It does the first insert, gets the auto_increment value and commits. On Jun 5, 9:32 am, mwaterous m...@watero.us wrote: I have the following in my User model; public $hasMany = array( 'MetaUser' = array( 'className' = 'MetaUser', 'fields' = array( 'meta_key', 'meta_value' ) ) ); ...should I also define a belongsTo relationship from the MetaUser model, or is this necessary when it's being manipulated from the Users controller? On Jun 4, 6:49 pm, calvin cal...@rottenrecords.com wrote: Did you define the relationship between User and MetaUser? i.e. in the User model: $hasMany = array('MetaUser' = array()); Because both, your approach and vekija's, should work. On Jun 4, 9:48 am, mwaterous m...@watero.us wrote: Well my last question here turned out to be between keyboard and chair, so hopefully this isn't quite as silly a question! I am learning Cake and building a custom user authentication system (who isn't?). I am trying to use two separate tables to store data, the User Model table as parent which stores only mission critical data (login, password, email, created, etc), and a MetaUser model table which is built around key value pairs (meta_id, user_id, meta_key, meta_value). Upon registration I have two pieces of meta information I would like to store - the activation code and an optin for receiving communication from site admins. I have built the forms as instructed by the Cake Book in order to use saveAll() in my Register action. The problem is that this results in the following array: Array ( [MetaUser] = Array (
Re: CakePHP Gigya Social Network Plugin
This plugin has apparently reached the ears of Gigya, and has produced a little buzz. I actually got a phone call from the president of gigya. He was impressed with the plugin and wanted to talk about my impressions of Gigya. We spoke for a while, and we ended up talking about pricing as I mentioned there is no price table on the website which makes it hard to recommend at times. He was receptive and hinted at a free plan that would be limited to api calls per day (ballpark 1000 per day). At the end of the call he mentioned there will be a published pricing table that will include the free plan when its available. Something to keep in mind. On Jun 5, 4:57 am, WebbedIT p...@webbedit.co.uk wrote: Update: Have sent Gigya an email asking for some sales information as it's no good making a decision based on third party information. Will feedback to you when I have spoken with them. HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: echoing a bigger font
Great! Thanks Calvin for pointing that out to me. Thanks Jonathon. I will read up on CSS. On Jun 6, 2:45 am, Jonathon Musters luvz2...@gmail.com wrote: Well yes but this goes back to an understanding of CSS and the types of elements they are.. On Sat, Jun 5, 2010 at 1:08 PM, calvin cal...@rottenrecords.com wrote: The selector should be changed to p#largeText, no space, and that should work. And don't use font tags or b/i/u tags. On Jun 5, 6:22 am, Jonathon Musters luvz2...@gmail.com wrote: use p id=largeText My Text HERE/p in css p #largeText { font-size: 20px; } and you will get what you are looking for On Sat, Jun 5, 2010 at 8:58 AM, ytbryan ytbr...@gmail.com wrote: Hi all, If i am printing out a variable $result like the below in my view font?php $result; ?/font How can I make the printed value appear bigger? I tried to surround the value with font size or control the css. But it don't help. Thanks! Bryan Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Strange form helper output I can't understand: divs after input
On Tue, May 18, 2010 at 8:48 PM, madcousinphil_ madcousinp...@gmail.com wrote: (..) 1st Question: What is with the very first input before the opening of the form? I don't think it is hurting, but why is it there? Look at the opening form tag Cake creates for you. Where the information about the method the form uses came from? The default method is post. That hidden field is only a control field Cake uses to retain this information internally in the views and in the rendered html code. 2nd question: You can see that the div which is supposed to be wrapping the input is actually output after the input, and is empty. eg: input type=submit value=Save Category / div class=submit/ div This is a problem for me because I would like to use this to style the label and input field. I can't understand what I did wrong. Has this happened to anyone before? How can I make it wrap the input like this div class=submitinput type=submit value=Save Category // div I'm not sure, but I think this additional div is used for validation messages. You can omit it this way echo $form-input('name', array('div' = false)); Best regards. -- MARCELO F ANDRADE Belem, Amazonia, Brazil I took the red pill Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: User errors and fat model, skinny controller
On Mon, May 17, 2010 at 8:27 PM, calvin cal...@rottenrecords.com wrote: (..) The essence of the problem is that the upload() method in your model is returning a boolean value while, in fact, it can sinalize more than just two opposite situations. A better solution would be return some kind of status code or even throw exceptions for each expected situation in your case. Best regards. -- MARCELO F ANDRADE Belem, Amazonia, Brazil I took the red pill Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en