Hi,
I don't know if this is of any help to anyone but... if you followed Ch. 13 and the chat plugin section recently you may have noticed that the latest version of the chat plugin now uses jQuery and not Prototype.
For anyone who might be interested the includes for the js libraries naturally have to be changed for the chat plugin, upload and comments sections to work properly; so in default.ctp instead of the line from the book:
if(isset($javascript)):
echo ($this->params['controller'] == 'posts' && $this->params['action'] == 'add' ? $javascript->link(array('jquery.js','jquery.form.js')) : $javascript->link('prototype.js'));
endif;
you can put the following call to a jquery no conflict function:
if(isset($javascript)):
echo $javascript->link('prototype.js');
echo $javascript->link(array('jquery.js','jquery.form.js'));
// call jquery no conflict func - from now on all '$' calls refer to prototype and jquery must be referenced directly with 'jQuery' replacing '$'
echo "<script> jQuery.noConflict(); </script>";
endif;
only as my comments above point out, you now have to amend the references to jQuery in the file upload section as follows in you posts add.ctp:
e($form->button('UploadText',array('onClick'=>'jQuery(\'#postAddForm\').ajaxSubmit({target: \'#postTextUpload\',url:\''.$html->url('/posts/text').'\'});return false;')));
I hope this is of use to someone.
Cheers.