Re: Remote developer contract using cakephp for our site
Perry [EMAIL PROTECTED] wrote: Are there any things to be concerned about in making sure we get a deliverable for our web site that can be extended by others? [...] Developer documentation IMO: README, Changelog, INSTALL as a minimum. If possible, a backup of their revision control repository. If you don't do that, a new developer may need to recreate them, which will cost and is never quite as good. I don't know about cakephp on MacOS X. Hope that helps, -- MJ Ray [EMAIL PROTECTED] www.ttllp.co.uk +44(0)844 4437 237 Webmaster since 1994, programmer, statistician, writer, more. Turo Technology LLP, reg'd in England+Wales, number OC303457 Reg. Office: 36 Orchard Cl., Kewstoke, Somerset, GB-BS22 9XY --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Webservices and parseExtensions: migrating from 1.1 to 1.2
On Jun 15, 9:02 pm, Conners [EMAIL PROTECTED] wrote: snip I don't like extensions. The main reason that I'm happy with a LAMP setup with mod_rewrite and cakephp is that I have eliminated file extensions and improved the organisation of the sites I produce with my cake projects. You may feel it petty but I believe it quite sensible to offer alternative content through a URI scheme likehttp://example.com/rss/controller/(action) and I really would prefer to keep it that way. snip IIRC, someone here snapped me to learn HTTP for the samething. -- ?php echo 'Just another PHP saint'; ? Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: html-submit() does not exists?
Ah thanks that works.. but then why can you decide the location for textareae error messages but not for input boxes? And also why does it genereate extra html instead of only the message? Would it not be more customizable if you can write your own html in the view? On 16 jun, 00:21, gwoo [EMAIL PROTECTED] wrote: @Mech7 You are using the helper incorrectly. if you use $form-input() then you add the option for the error message. if you are using the individual form helper methods like textarea echo $form-textarea('field'); echo $form-error('field', 'Error in field'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Edit changes to add function when validation errors are found
Strange things happen when using multiple validations rules in cake 1.2. in combination with an edit action When requesting a edit action for example admin/pages/edit/3 - in the view admin_edit.ctp the helper $form-create('Page'); does output the required form tag form id=PageEditForm method=post action=/admin/pages/edit/3 Then the magic happens. If validation fails the helper $form- create('Page'); does create form id=PageAddForm method=post action=/admin/pages/add/ So action is changed to an add action. I have searched the Bugs listed on Trac for this issue and found some matches. None with the solution... The code of the model 'Page' looks like this: - class Page extends AppModel{ var $name = 'Page'; var $validate = array( 'title_internal'= array( 'length'= array('rule' = array('minLength', 5)), 'unique'= array('rule' = 'isUnique', 'field' = 'title_internal') ) ); function isUnique($value, $params) { $db = $this-name . '.' . $params['field']; $id = $this-name . '.id'; if($this-id == null ) { return(!$this-hasAny(array($db = $value ) )); } else { return(!$this-hasAny(array($db = $value, $id = '!='.$this- id ) ) ); } } } - The code for my controller edit function is: function admin_edit($id = null){ if(empty($this-data)){ $this-Page-id = $id; $this-data = $this-Page-read(); $this-set('page',$this-data); } else{ if($this-Page-save($this-data['Page'])){ $this-flash('Your page has been updated','/admin/pages'); } } } Any help concerning this issue would be appreciated! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Customizing HTML Tags
You can either extend the core HtmlHelper and overload the tags property, or you could copy the html helper from cake core into you app folder and edit the tags in there. On Jun 15, 9:42 pm, rtconner [EMAIL PROTECTED] wrote: Maybe some of you old school cakers might know this one. I was just reading some older Cake articles. It seems there used to be this thing where you could create a tags.ini.php file and customize your HTML tags. Does this feature still exist in any fashion? I can't find a tags.ini.php file at all. It would be great to be able to format some of the HTML the way our designers like it as a default behavior. Just curious. Thanks, Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with saving form data... from tutorial...
Your complete function will look like this. ?php function done($id = null) { $this-Task-id = $id; if(this-Task-saveField('done', 1)) { $this-set('data', $this-Task-findAll()); $this-render('done', 'ajax'); } } ? Regards Raffi Hovhannesian On Jun 15, 2:27 am, LoinSees [EMAIL PROTECTED] wrote: Hello, I have been trying to do this tutorial for a while, but keep failing (http://grahambird.co.uk/cake/tutorials/ajax.php) I have managed to identify the problem thought... it does not save to the database once you click the checkbox. Here is a small part of tasks_controller.php: function done($id = null) { // move task from todo to done $this-Task-id = $id; $this-params['data']['Task']['done'] = 1; if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll()); $this-render('done', 'ajax'); } } Can someone tell me what is wrong here? Thanks, Loin Sees. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Commented Version of CakePHP Manual
Hello Everyone, I've made available at my site a free-to-comment version of CakePHP Manual... Please, feel free to access it. http://www.cirello.org/cakephp-manual/ Uldérico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with saving form data... from tutorial...
I think your code should look something like this. function done($id = null) { $this-Task-id = $id; $this-Task-saveField('done', 1); } Please reply if you tried it and didn't work. Regards Raffi Hovhannesian On Jun 16, 12:52 am, LoinSees [EMAIL PROTECTED] wrote: Nope... still not working sorry On Jun 15, 12:54 am, metasan [EMAIL PROTECTED] wrote: Hi, i checked your code, and i think the error is at that line : $this-Task-id = $id; Task is a model so you should read it first. Plus you make Task-id, this is wrong if you want the task id you should do $this-Task['id'] = $id; after reading the Task table. Let me know the result. Regards, metasan http://www.piegteam.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Error in de bakery with commenting..
When i press login i get this: Not found Het gevraagde adres ajax/ is niet gevonden op deze server. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Wrong fieldset type for MySQL SET datatype. Workaround?
Hi all, I've been using the Form helper within a form creator helper that I've put together, and using the Form helper's fieldset data that contains the field type details. This has worked great, but I've just found that whilst the enum types are reported correctly, the SET type just shows as type text. E.g. MySQL describe (partial): | period | enum('hour','day','week','month','year') | | types | set('A','B','C','D') | Form helper fieldset data: Array ( // other stuff [period] = enum('hour','day','week','month','year') [types] = text ) I haven't explored yet, but it seems at first glance as if Cake isn't handling the SET datatype when analysing the schemas. Just wondered whether anyone come across this and made a workaround, or am I missing something and is there another route to getting the correct type without running an explain query directly? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Wrong fieldset type for MySQL SET datatype. Workaround?
After checking the dbo files, set is indeed missing for the mysql and mysqli drivers so a simple patch is to add if (strpos($col, 'set') !== false) { return set($vals); } or similar after the enum case and then all works well. Not sure if there's a reason why it wasn't there, but I suspect just an oversight. Cheers Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to automatically update a div via AJAX
Hello guys, I'm trying to update a div automatically every time a controller is loaded using AJAX helper, I already update it using $ajax-link and $ajax-submit, but it requires a click from user, so I'm wondering if there's is a way to update a div once a controller action is called via url, for example: /controller/view/something Any help is welcome, thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
populate form contents ajax
?php echo $ajax-form(array('action'=$html-url('edit')))? div id=editAll style=display:noneLoading..?php echo $html- image('spinner.gif',array('alt'='Saving..','id'='editAllimg'))? /div ?php print $ajax-submit('Load Post', array('url' = 'editAll/','update'='posts','frequency'='2','loading'=Element.show('editAll');,'loaded'=Element.hide('editAll');));? I have a view for add post , but i have text input for edit post . if i type a post id in the edit post and give read.. the form contents should be populated via ajax ? my doubt is i know how to save data (add or edit) via ajax by sending data to the controller but how to get back data from the controller and populate form contents ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Apache dies when redirecting using controller-redirect()
Btw i see that issue was fixed in march already.. I also have unloaded Zend Optimizer and eAccelerator, increased memory to 128 mb but it still dies on many occassions :( On 11 jun, 06:51, Eugene Bolshakov [EMAIL PROTECTED] wrote: I'm not sure if this is related to the problem, but I've finally found out the reason forapachecrashes for me. The reason is a bug in zend optimizer and after upgrade it began to work OK.http://www.zend.com/forums/index.php?t=msggoto=7323S=f987dc025b5261... My problem was that on some php errors (undefined variable in template for example)apachedied. The reason is debug_backtrace() which is clled in cakephp error handler that causedapachecrush because of zend optimizer bug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with saving form data... from tutorial...
Nope... still not working... PS. you forgot the $ in: if(this-Task-saveField('done', 1)) Should be: if($this-Task-saveField('done', 1)) I changed it but it still didnt work... On Jun 16, 8:01 am, aerosmith [EMAIL PROTECTED] wrote: Your complete function will look like this. ?php function done($id = null) { $this-Task-id = $id; if(this-Task-saveField('done', 1)) { $this-set('data', $this-Task-findAll()); $this-render('done', 'ajax'); } } ? Regards Raffi Hovhannesian On Jun 15, 2:27 am, LoinSees [EMAIL PROTECTED] wrote: Hello, I have been trying to do this tutorial for a while, but keep failing (http://grahambird.co.uk/cake/tutorials/ajax.php) I have managed to identify the problem thought... it does not save to the database once you click the checkbox. Here is a small part of tasks_controller.php: function done($id = null) { // move task from todo to done $this-Task-id = $id; $this-params['data']['Task']['done'] = 1; if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll()); $this-render('done', 'ajax'); } } Can someone tell me what is wrong here? Thanks, Loin Sees. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to automatically update a div via AJAX
Mayve you can use the periodical updater. I know that does really match what you are asking but maybe you can find a way (session) to know what to update ? Also you could have a special layout for this controller / views that would contain a remote call every time it shows up .. Even the default layout could do it by checking the $this-name. On Jun 16, 8:40 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello guys, I'm trying to update a div automatically every time a controller is loaded using AJAX helper, I already update it using $ajax-link and $ajax-submit, but it requires a click from user, so I'm wondering if there's is a way to update a div once a controller action is called via url, for example: /controller/view/something Any help is welcome, thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: populate form contents ajax
for the controller aspect it does not change anything posting data using ajax or not. The data posted are accessible in the same way ($this-params['data']['Controller'] .. for example). The same approach for the rendering. Now everything resides into which parts of the view you update with you ajax call (basically doing ajax will not affect your controller code). The difference wiht ajax resides into the view (thtml ot tcp). On Jun 16, 8:47 pm, varunkrish [EMAIL PROTECTED] wrote: ?php echo $ajax-form(array('action'=$html-url('edit')))? div id=editAll style=display:noneLoading..?php echo $html-image('spinner.gif',array('alt'='Saving..','id'='editAllimg'))? /div ?php print $ajax-submit('Load Post', array('url' = 'editAll/','update'='posts','frequency'='2','loading'=Element.show('editAll');,'loaded'=Element.hide('editAll');));? I have a view for add post , but i have text input for edit post . if i type a post id in the edit post and give read.. the form contents should be populated via ajax ? my doubt is i know how to save data (add or edit) via ajax by sending data to the controller but how to get back data from the controller and populate form contents ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: populate form contents ajax
One more thing, with ajax you very often need to set the parameter update of link, submit, remote_function etc ... This update whould match the div you will update into the view. Your rendering view would be enclosed into $ajax-div('updatedivname') / $ajax- divEnd(...) On Jun 17, 12:35 am, francky06l [EMAIL PROTECTED] wrote: for the controller aspect it does not change anything posting data using ajax or not. The data posted are accessible in the same way ($this-params['data']['Controller'] .. for example). The same approach for the rendering. Now everything resides into which parts of the view you update with you ajax call (basically doing ajax will not affect your controller code). The difference wiht ajax resides into the view (thtml ot tcp). On Jun 16, 8:47 pm, varunkrish [EMAIL PROTECTED] wrote: ?php echo $ajax-form(array('action'=$html-url('edit')))? div id=editAll style=display:noneLoading..?php echo $html-image('spinner.gif',array('alt'='Saving..','id'='editAllimg'))? /div ?php print $ajax-submit('Load Post', array('url' = 'editAll/','update'='posts','frequency'='2','loading'=Element.show('editAll');,'loaded'=Element.hide('editAll');));? I have a view for add post , but i have text input for edit post . if i type a post id in the edit post and give read.. the form contents should be populated via ajax ? my doubt is i know how to save data (add or edit) via ajax by sending data to the controller but how to get back data from the controller and populate form contents ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Commented Version of CakePHP Manual
nice addition, just a shame comments aren't available on manual.cakephp.org it seems that your version of the manual deserves it's own domain btw :-) out of curiosity, how will you keep the manual updated properly, and still maintain the comments properly? On 6/16/07, Dérico Filho [EMAIL PROTECTED] wrote: Hello Everyone, I've made available at my site a free-to-comment version of CakePHP Manual... Please, feel free to access it. http://www.cirello.org/cakephp-manual/ Uldérico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---