How to test/simulate sending a form?
Hi, I have a running project with a hand full of different forms the user can fill out. There is only one controller to handle the validation and the processing of the forms depending from its content. As all my forms a are done via ajax requests it looks like this: function index() { if ($this-request-is('ajax')) { if (!empty($this-request-data)) { $this-request-data = Sanitize::clean($this-request-data, array('encode' = false)); $this-Contact-set($this-request-data['Contact']); $this-Contact-Behaviors-attach('Captcha'); if($this-Contact-validates()) { logic here to determine kind of form and content $email = new CakeEmail(); ... all my email settings if($email-send()){ error handler and other stuff My question now is: Can I write a script that is sending once a day a fake form request? How can I send my data as ajax and request-data to pass the validations? It would be so great, if someone could give me an idea how to proceed? Thanks so much in advance! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
How to get Cake to log error?
I've got some exception code as follows: try { if ($this-hashCaptcha(strtolower($this-request-data['User']['code'])) != $this-Session-read('user_captcha_code')) throw new Exception('Incorrect captcha code. Please, try again!'); ... } catch(Exception $e) { $this-Session-setFlash(__($e-getMessage())); } How to get Cake to log the error aswell as display the flash message? I tried: $this-cakeError('AddUserError', array('message' = $e-getMessage())); ... but that just caused Internal Error to be displayed. Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: How to get Cake to log error?
usually logging is enabled when debug mode is not on. try to set debug to 0 and check for log entries then Am Freitag, 9. November 2012 15:13:51 UTC+1 schrieb Daniel: I've got some exception code as follows: try { if ($this-hashCaptcha(strtolower($this-request-data['User']['code'])) != $this-Session-read('user_captcha_code')) throw new Exception('Incorrect captcha code. Please, try again!'); ... } catch(Exception $e) { $this-Session-setFlash(__($e-getMessage())); } How to get Cake to log the error aswell as display the flash message? I tried: $this-cakeError('AddUserError', array('message' = $e-getMessage())); ... but that just caused Internal Error to be displayed. Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
ACL renamed database table
I have followed the Simple Acl controlled Application tutorial and all was working. Then I renamed the database table (which was groups) in to something else (_companyname_groups). Now I have errors saying Cake can't find my groups table, which is logical because I renamed it. I can't, however, find how of where I can say that he has to use the new table name instead. Or do I have to do all the steps again as explained in the tutorial? I hope you guys can help me! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Example with ajax
This doesn't work for Cake 2.x though. Where is the documentation for using jQuery in side of CakePHP 2.x? Any links would be excellent especially if there is official documentation. On Thu, Nov 8, 2012 at 3:39 AM, kani infok...@gmail.com wrote: www.cakephp.4uk.pluse this helper very easy On Tuesday, November 6, 2012 1:39:32 AM UTC+8, Marco.Segura wrote: Hey, someone can help me with a simple example with ajax in cakephp -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: How to place a verification file http://wallshops.com/verify.html
You need to teach CakePHP how. add this to your routes.php file: Router::connect('/pinterest_verify.html', array('controller' = 'pages', 'action' = 'display', 'pinterest_verify')); then go to your site: http://yoursite.com/pinterest_verify.html you'll see an error that says The view for PagesController::display() was not found. so, now go create the view by pasting the contents of the HTML file from pinterest. go back to the site, you should see the content of the pinterest verify, but it will be wrapped in the default layout. then, (assuming you are not using the pages controller for anything else), just hack in this line in the display method to tell it not to use any layout: public function display() { $this-layout=false; HTH On Wednesday, November 7, 2012 11:34:31 PM UTC-5, Justus Kersey wrote: To verify my website on pinterest, I need to place an html file in my root. This is the message I keep getting: Your server responded with a status code of 404 (file not found). We tried to visit the file at http://wallshops.com/pinterest-.html. Where should I place the file, and what do I need to do so that file can be seen by pinterest??? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Installing an existing site locally on MAMP
you may also be running into multicastDNS issues as noted here: http://itand.me/mac-os-x-lion-local-domains-and-etchosts-oh-m On Thursday, November 8, 2012 6:13:58 AM UTC-5, euromark wrote: did you restart MAMP? the help offered by Michael Connors is complete and correct. if you follow it you should be fine Am Donnerstag, 8. November 2012 11:24:24 UTC+1 schrieb Neil Berrow: When I added http://bundle.local it kept going to my root folder /applications/mamp/htdocs, I have other sites set there. Do you think pick somewhere else on my machine? Thanks for your help! On Thursday, November 8, 2012 11:36:16 AM UTC+2, euromark wrote: why are you then still trying to access it via localhost? the url would then be `http://bundle.local/` http://bundle.local/ - which then would correctly call the webroot index.php and dispatch accordingly Am Donnerstag, 8. November 2012 07:19:44 UTC+1 schrieb Neil Berrow: I've gotten this far (see image), here's my conf: VirtualHost * DocumentRoot /Applications/MAMP/htdocs/bundle/app/webroot ServerName bundle.local RewriteEngine on Directory /Applications/MAMP/htdocs/bundle/ AllowOverride All Order deny,allow Allow from All /Directory /VirtualHost Here's my url: http://localhost:/bundle Am I on the right track? Cheers!! On Thursday, November 1, 2012 4:53:13 PM UTC+2, Neil Berrow wrote: Followed these directions but it's not working, it may be the .htaccess file, can you upload a copy so I can see if it is that. Thanks for your help! Neil On Thursday, October 4, 2012 7:31:39 AM UTC+2, Michael Connors wrote: Make a directory somewhere on your drive, say its /user/me/projects/site. Download and unzip cakephp and put its contents in that folder site. open MAMP/conf/apache/httpd.conf add a virtual host at the bottom VirtualHost * DocumentRoot */user/me/projects/site/app/webroot* ServerName *mysite.local* RewriteEngine on Directory */user/me/projects/site/* AllowOverride All Order deny,allow Allow from All /Directory /VirtualHost Open a terminal and edit host file sudo vi /etc/hosts add the line *127.0.0.1 * *mysite.local* Restart MAMP. You should be able to open a browser and go to * http://mysite.local *and use that as a working directory. From there go through the instructions if there are errors, you will most likely have to add .htaccess files. I also highly recommend get a git account somewhere and commit your files to git. On Wednesday, October 3, 2012 5:07:03 AM UTC-4, Neil Berrow wrote: Hi I've searched and searched but all I can find is how to install a Cake environment from scratch locally on a mac. I have an existing site which my developer built for me months ago, I'm no Cakephp programmer but I have basic php skills. Can anyone suggest where I can get info from or if they've been in the same boat? Any help will be much appreciated! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: display by categories from bootstrap
ok cricket,... the problem is solved ,... I have to read from a bootstrap,.. cause my categories setup is from bootstrap, and much easy to setup in bootstrap,... so this is what I have,... in case anyone wonder,... bootstrap: Configure::write('Blog.blog_category', array('select categry', 'realestate', 'autos', 'appliances', 'antique')); and in my conroller: function category($id = null) { if($this-is_user()) { $this-set('user_obj', $user = $this-User-findById($this-user['id'])); } $category = $id; $cat_id = array_search($category, Configure::read('Blog.blog_category')); $this-set('category', $category); $blogs = $this-Blog-find('all', array('conditions' = array('Blog.categories' = $cat_id))); $this-set('blogs', $blogs, $this-paginate()); } ok,... now I'm having a problem with paginator,... but that's later,... ;) thank you for your response cricket,... salute chris On Thursday, November 8, 2012 3:29:56 PM UTC-8, cricket wrote: I don't understand quite what you're trying to do (what is array_search for?) but there's a typo: 'select categry' Instead of hard-coding your categories, why not just get them from the DB? You can always write the list to cache and update it whenever the categories change. On Thu, Nov 8, 2012 at 4:20 PM, Chris chri...@yahoo.com javascript: wrote: hi guys,... I have a problem of displaying blogs by categories,... can someone help me please,... I'm in cake 1.3 have a categories setup in db from bootstrap: Configure::write('Blog.blog_category', array('select categry', 'realestate', 'autos', 'appliances', 'antique')); // etc,... I want to display blogs by categories, and I got to the point of reading category in URL,... but can not display blogs by categories,... here is my controller: function category($id = null) { $category = $id; $conditions = array(array_search('category', Configure::read('Blog.blog_category') )); debug($conditions); $scope = array('Blog.id' = $conditions); $blogs = $this-paginate('Blog', $scope); $this-set('blogs', $blogs); } on debug conditions I'm getting Array ( [0] = ) thank you in advance -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.comjavascript:. To unsubscribe from this group, send email to cake-php+u...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Storing arrays in the database (one field many values)
i need to move selected images to img/gallery/..i could able to select more than one images...instead more images there is only one image uploaded in that folder..is there a way to solve this issue..thanks in advance echo $form-create('Image', array('action' = 'save' ,'type' = 'file','multiple'='multiple')); //echo $form-file('File'); echo $form-file('File', array('type' = 'file','multiple' = 'multiple')); echo $form-hidden(v_id,array (value=$this-data['Image']['v_id'])); echo $form-submit('Upload'); echo $form-end(); -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: How to get Cake to log error?
What I want to know is how to implement my own exceptions whilst keeping cakes exception handling for other exvceptions in the same try block. I can't seem to find any complete information on how this is done. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: form password default value
Ok friends i have solved the problem.Can I ask you why this problem arises? to euromark:I should change the field into the table too because i have users.password column.What I am doing is only an example to see how cakephp works.Thank you for the advice. Il giorno venerdì 9 novembre 2012 01:40:24 UTC+1, euromark ha scritto: and if possible use an alias for your form field password like pwd as well as some kind of pwd_repeat field to confirm the password (since you cant see it very often it is mistyped rendering the registration invalid then by accident): http://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/ Am Freitag, 9. November 2012 00:33:18 UTC+1 schrieb cricket: See here: http://lecterror.com/articles/view/cakephp-password-hash-issue On Thu, Nov 8, 2012 at 4:26 PM, and andreaes...@gmail.com wrote: Hi all, I have a form for registration and i have some rules that the field must respect.If i insert the wrong email format,for example,the form says that it is incorrect.The thing that happen is that the password field is filled with md5 password.I have the following view: pPlease fill out the form below to register an account./p ?php echo $form-create('User',array('action'='register'));? ?php echo $form-input('first_name'); echo $form-input('last_name'); echo $form-input('username',array('after'=$form-error('username_unique','Username esistente.'))); echo $form-input('email',array('after'=$form-error('email_unique','Email esistente'))); echo $form-input('password'); ? ?php echo $form-end('Register');? In the file attached you can see a password that i have nerver inserted.Could you hel me? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.com. To unsubscribe from this group, send email to cake-php+u...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: display by categories from bootstrap
I think Cricket's (extremely valid) point is what happens when you (or one of those pesky users) wants to add another category? For a site that's backed by a database it seems really odd to extract just one small tier of data out of the data layer. Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Nov 2012, at 17:06:19, Chris chris...@yahoo.com wrote: ok cricket,... the problem is solved ,... I have to read from a bootstrap,.. cause my categories setup is from bootstrap, and much easy to setup in bootstrap,... so this is what I have,... in case anyone wonder,... bootstrap: Configure::write('Blog.blog_category', array('select categry', 'realestate', 'autos', 'appliances', 'antique')); and in my conroller: function category($id = null) { if($this-is_user()) { $this-set('user_obj', $user = $this-User-findById($this-user['id'])); } $category = $id; $cat_id = array_search($category, Configure::read('Blog.blog_category')); $this-set('category', $category); $blogs = $this-Blog-find('all', array('conditions' = array('Blog.categories' = $cat_id))); $this-set('blogs', $blogs, $this-paginate()); } ok,... now I'm having a problem with paginator,... but that's later,... ;) thank you for your response cricket,... salute chris On Thursday, November 8, 2012 3:29:56 PM UTC-8, cricket wrote: I don't understand quite what you're trying to do (what is array_search for?) but there's a typo: 'select categry' Instead of hard-coding your categories, why not just get them from the DB? You can always write the list to cache and update it whenever the categories change. On Thu, Nov 8, 2012 at 4:20 PM, Chris chri...@yahoo.com wrote: hi guys,... I have a problem of displaying blogs by categories,... can someone help me please,... I'm in cake 1.3 have a categories setup in db from bootstrap: Configure::write('Blog.blog_category', array('select categry', 'realestate', 'autos', 'appliances', 'antique')); // etc,... I want to display blogs by categories, and I got to the point of reading category in URL,... but can not display blogs by categories,... here is my controller: function category($id = null) { $category = $id; $conditions = array(array_search('category', Configure::read('Blog.blog_category') )); debug($conditions); $scope = array('Blog.id' = $conditions); $blogs = $this-paginate('Blog', $scope); $this-set('blogs', $blogs); } on debug conditions I'm getting Array ( [0] = ) thank you in advance -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.com. To unsubscribe from this group, send email to cake-php+u...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: display by categories from bootstrap
Also, you still have a typo, fwiw. On Fri, Nov 9, 2012 at 12:25 PM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I think Cricket's (extremely valid) point is what happens when you (or one of those pesky users) wants to add another category? For a site that's backed by a database it seems really odd to extract just one small tier of data out of the data layer. Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Nov 2012, at 17:06:19, Chris chris...@yahoo.com wrote: ok cricket,... the problem is solved ,... I have to read from a bootstrap,.. cause my categories setup is from bootstrap, and much easy to setup in bootstrap,... so this is what I have,... in case anyone wonder,... bootstrap: Configure::write('Blog.blog_category', array('select categry', 'realestate', 'autos', 'appliances', 'antique')); and in my conroller: function category($id = null) { if($this-is_user()) { $this-set('user_obj', $user = $this-User-findById($this-user['id'])); } $category = $id; $cat_id = array_search($category, Configure::read('Blog.blog_category')); $this-set('category', $category); $blogs = $this-Blog-find('all', array('conditions' = array('Blog.categories' = $cat_id))); $this-set('blogs', $blogs, $this-paginate()); } ok,... now I'm having a problem with paginator,... but that's later,... ;) thank you for your response cricket,... salute chris On Thursday, November 8, 2012 3:29:56 PM UTC-8, cricket wrote: I don't understand quite what you're trying to do (what is array_search for?) but there's a typo: 'select categry' Instead of hard-coding your categories, why not just get them from the DB? You can always write the list to cache and update it whenever the categories change. On Thu, Nov 8, 2012 at 4:20 PM, Chris chri...@yahoo.com wrote: hi guys,... I have a problem of displaying blogs by categories,... can someone help me please,... I'm in cake 1.3 have a categories setup in db from bootstrap: Configure::write('Blog.blog_category', array('select categry', 'realestate', 'autos', 'appliances', 'antique')); // etc,... I want to display blogs by categories, and I got to the point of reading category in URL,... but can not display blogs by categories,... here is my controller: function category($id = null) { $category = $id; $conditions = array(array_search('category', Configure::read('Blog.blog_category') )); debug($conditions); $scope = array('Blog.id' = $conditions); $blogs = $this-paginate('Blog', $scope); $this-set('blogs', $blogs); } on debug conditions I'm getting Array ( [0] = ) thank you in advance -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.com. To unsubscribe from this group, send email to cake-php+u...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: ACL renamed database table
The table names normally follow from the model names: Group - groups. If you want to do something different you'll need to add a $useTable var at a minimum. Be sure to delete files in tmp/models folder, also. On Fri, Nov 9, 2012 at 10:08 AM, iFemke femkevgem...@gmail.com wrote: I have followed the Simple Acl controlled Application tutorial and all was working. Then I renamed the database table (which was groups) in to something else (_companyname_groups). Now I have errors saying Cake can't find my groups table, which is logical because I renamed it. I can't, however, find how of where I can say that he has to use the new table name instead. Or do I have to do all the steps again as explained in the tutorial? I hope you guys can help me! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: How to place a verification file http://wallshops.com/verify.html
None of that is necessary. Static, non-Cake files can be placed in app/webroot. This is what the mod_rewrite lines in .htaccess are for: if the file doesn't exist, pass the args to app/webroot/index. Otherwise, just serve the file as normal. On Fri, Nov 9, 2012 at 10:20 AM, sophistry phlo...@gmail.com wrote: You need to teach CakePHP how. add this to your routes.php file: Router::connect('/pinterest_verify.html', array('controller' = 'pages', 'action' = 'display', 'pinterest_verify')); then go to your site: http://yoursite.com/pinterest_verify.html you'll see an error that says The view for PagesController::display() was not found. so, now go create the view by pasting the contents of the HTML file from pinterest. go back to the site, you should see the content of the pinterest verify, but it will be wrapped in the default layout. then, (assuming you are not using the pages controller for anything else), just hack in this line in the display method to tell it not to use any layout: public function display() { $this-layout=false; HTH On Wednesday, November 7, 2012 11:34:31 PM UTC-5, Justus Kersey wrote: To verify my website on pinterest, I need to place an html file in my root. This is the message I keep getting: Your server responded with a status code of 404 (file not found). We tried to visit the file at http://wallshops.com/pinterest-.html. Where should I place the file, and what do I need to do so that file can be seen by pinterest??? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: How to place a verification file http://wallshops.com/verify.html
um, yeah, you could do it that way too! ;-) sometimes you can get so wrapped up in cake's snuggly wool that you forget about the real world. one observation about configuring the pages controller to serve this kind of content is that by passing through the cake stack the response can take advantage of cake capabilities. so, in case you have some templating or logging to do, etc... On Friday, November 9, 2012 1:50:03 PM UTC-5, cricket wrote: None of that is necessary. Static, non-Cake files can be placed in app/webroot. This is what the mod_rewrite lines in .htaccess are for: if the file doesn't exist, pass the args to app/webroot/index. Otherwise, just serve the file as normal. On Fri, Nov 9, 2012 at 10:20 AM, sophistry phl...@gmail.com javascript: wrote: You need to teach CakePHP how. add this to your routes.php file: Router::connect('/pinterest_verify.html', array('controller' = 'pages', 'action' = 'display', 'pinterest_verify')); then go to your site: http://yoursite.com/pinterest_verify.html you'll see an error that says The view for PagesController::display() was not found. so, now go create the view by pasting the contents of the HTML file from pinterest. go back to the site, you should see the content of the pinterest verify, but it will be wrapped in the default layout. then, (assuming you are not using the pages controller for anything else), just hack in this line in the display method to tell it not to use any layout: public function display() { $this-layout=false; HTH On Wednesday, November 7, 2012 11:34:31 PM UTC-5, Justus Kersey wrote: To verify my website on pinterest, I need to place an html file in my root. This is the message I keep getting: Your server responded with a status code of 404 (file not found). We tried to visit the file at http://wallshops.com/pinterest-.html. Where should I place the file, and what do I need to do so that file can be seen by pinterest??? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.comjavascript:. To unsubscribe from this group, send email to cake-php+u...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
getting an error on $html-url
hi guys,... can someone help me please,... thanks in advance I'm getting an error when I include $group['Group']['id'] in $html-url ?php echo $html-url('/group_banners/upload/. $group['Group']['id']?PHPSESSID=' . session_id(), true) ? how can I do this? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: form password default value
thats simple: if you post the form it will keep all the values. so the password is (probably hashed in your controller and) returned back to the view. an empty string would also result in a long hash. either way, the password fields should always be empty as default - otherwise you could make them visible input fields right away. Am Freitag, 9. November 2012 18:22:33 UTC+1 schrieb and: Ok friends i have solved the problem.Can I ask you why this problem arises? to euromark:I should change the field into the table too because i have users.password column.What I am doing is only an example to see how cakephp works.Thank you for the advice. Il giorno venerdì 9 novembre 2012 01:40:24 UTC+1, euromark ha scritto: and if possible use an alias for your form field password like pwd as well as some kind of pwd_repeat field to confirm the password (since you cant see it very often it is mistyped rendering the registration invalid then by accident): http://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/ Am Freitag, 9. November 2012 00:33:18 UTC+1 schrieb cricket: See here: http://lecterror.com/articles/view/cakephp-password-hash-issue On Thu, Nov 8, 2012 at 4:26 PM, and andreaes...@gmail.com wrote: Hi all, I have a form for registration and i have some rules that the field must respect.If i insert the wrong email format,for example,the form says that it is incorrect.The thing that happen is that the password field is filled with md5 password.I have the following view: pPlease fill out the form below to register an account./p ?php echo $form-create('User',array('action'='register'));? ?php echo $form-input('first_name'); echo $form-input('last_name'); echo $form-input('username',array('after'=$form-error('username_unique','Username esistente.'))); echo $form-input('email',array('after'=$form-error('email_unique','Email esistente'))); echo $form-input('password'); ? ?php echo $form-end('Register');? In the file attached you can see a password that i have nerver inserted.Could you hel me? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.com. To unsubscribe from this group, send email to cake-php+u...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Example with ajax
It's working perfect for me with 2.2.3. On Friday, November 9, 2012 11:16:21 PM UTC+8, Matthew Kaufman wrote: This doesn't work for Cake 2.x though. Where is the documentation for using jQuery in side of CakePHP 2.x? Any links would be excellent especially if there is official documentation. On Thu, Nov 8, 2012 at 3:39 AM, kani info...@gmail.com javascript:wrote: www.cakephp.4uk.pluse this helper very easy On Tuesday, November 6, 2012 1:39:32 AM UTC+8, Marco.Segura wrote: Hey, someone can help me with a simple example with ajax in cakephp -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.comjavascript: . To unsubscribe from this group, send email to cake-php+u...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Turning off Debugkit debug data in a specific instance
Replace the element method in /DebugKit/View/DebugView.php with the following: /** * Element method, adds comment injection to the features View offers. * * @return void */ public function element($name, $data = array(), $options = array()) { $out = ''; $isHtml = (!isset($this-request-params['ext']) || $this-request-params['ext'] === 'html'); $isAjax = ( ! empty($this-request-params['isAjax'])); if ($isHtml ! $isAjax Configure::read('debug')) { $out .= sprintf(!-- %s - %s --\n, __d('debug_kit', 'Starting to render'), $name); } $out .= parent::element($name, $data, $options); if ($isHtml ! $isAjax Configure::read('debug')) { $out .= sprintf(\n!-- %s - %s --\n, __d('debug_kit', 'Finished'), $name); } return $out; } -- This will turn off the Starting to render comments if the output is not HTML (as it was), is AJAX, or if debug is off. On Tuesday, February 7, 2012 3:45:08 PM UTC-7, Chris Cinelli wrote: I would like to turn off in a specific instruction $this-element(...) the behavior that the DebugKit has to add prepending line with !-- Rendiring xxx -- etc. The result of the element rendering goes in a string that should not have those HTML comments. I would like to be able to keep the debug kit on except in that specific instance. Is there a way to achieve that ? Best, Chris -- --Everything should be made as simple as possible, but not simpler (Albert Einstein) -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: getting an error on $html-url
Use as following. ?php echo $html-url(/group_banners/upload/. $group['Group']['id'] .?PHPSESSID= . session_id(), true) ? On Sat, Nov 10, 2012 at 5:09 AM, Chris chris...@yahoo.com wrote: hi guys,... can someone help me please,... thanks in advance I'm getting an error when I include $group['Group']['id'] in $html-url ?php echo $html-url('/group_banners/upload/. $group['Group']['id']?PHPSESSID=' . session_id(), true) ? how can I do this? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Chetan Varshney Ektanjali Softwares Pvt Ltd -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Problem on view from custom sql
Dear All i have problem for show on viewbecause custom sql this custome sql $querys = select * from registers where id is not null and (phone like '%$q%' ; $querys .= or endyear like '%$q%' ; $querys .= or address like '%$q%'; $querys .= or name like '%$q%' ; $querys .= or studentCode like '%$q%' ) ; $searchs = $this - Register - query($querys); $this - set(compact('searchs')); and view have error : Undefined index: studentCode ?php foreach ($searchs as $register): ? tr td?= $register['studentCode']; ?/td /tr ?php endforeach; ? plz guide me thank you -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.