How to test/simulate sending a form?

2012-11-09 Thread heohni
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

How to get Cake to log error?

2012-11-09 Thread 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) {

Re: How to get Cake to log error?

2012-11-09 Thread euromark
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']))

ACL renamed database table

2012-11-09 Thread iFemke
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,

Re: Example with ajax

2012-11-09 Thread Matthew Kaufman
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

Re: How to place a verification file http://wallshops.com/verify.html

2012-11-09 Thread sophistry
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

Re: Installing an existing site locally on MAMP

2012-11-09 Thread sophistry
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

Re: display by categories from bootstrap

2012-11-09 Thread Chris
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',

Re: Storing arrays in the database (one field many values)

2012-11-09 Thread karthi
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' =

Re: How to get Cake to log error?

2012-11-09 Thread Daniel
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

Re: form password default value

2012-11-09 Thread 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

Re: display by categories from bootstrap

2012-11-09 Thread Jeremy Burns | Class Outfit
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

Re: display by categories from bootstrap

2012-11-09 Thread lowpass
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

Re: ACL renamed database table

2012-11-09 Thread lowpass
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

Re: How to place a verification file http://wallshops.com/verify.html

2012-11-09 Thread lowpass
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

Re: How to place a verification file http://wallshops.com/verify.html

2012-11-09 Thread sophistry
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

getting an error on $html-url

2012-11-09 Thread Chris
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

Re: form password default value

2012-11-09 Thread euromark
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

Re: Example with ajax

2012-11-09 Thread kani
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

Re: Turning off Debugkit debug data in a specific instance

2012-11-09 Thread Benjam Welker
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 =

Re: getting an error on $html-url

2012-11-09 Thread Chetan Varshney
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

Problem on view from custom sql

2012-11-09 Thread suttipong Pratum
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%';