Re: HABTM and conditions ?
Thank for your link ! I think it will be helpful for my issue :) Cordially, Neveldo - http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Simple Ajax issue
Thank Axel, this is what I'm looking for ! In fact, I need for one action an normal view and an ajax view ! thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Simple Ajax issue
... but I've now another problem :p Is it possible to load a view which is not the default view of the action ? I try by using $this->view or $this->load->view, but it seems to doesn't work :( thank ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Simple Ajax issue
Ok, I'm sorry ... I just found the $this->params['requested'] method which make what I want :) Codially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Simple Ajax issue
Hi all, I'm trying myself with some ajax ... My problem is simple : I want to insert in a page the rendered view of an action (which contain an ajax pagination). To do that, I use requestAction() method. Right now, it works fine. But I want to use a different layout for the action if it is an ajax request. How can I do that ? Using $this->RequestHandler->isAjax() doesn't let me know if the action was requested normally or by requestAction() ! Thank a lot ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Getting the HTTP host ?
hi all , I would like to know if any view attribute exists to get the HTTP host from an cakephp install ( = http://www.example.com ) ? (I don't find it in the API ...) Or must I simply use $_SERVER['HTTP_HOST'] ? Thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: HABTM and conditions ?
Anybody has a solution ? thank ! Cordially, Neveldo :http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax request loads my default layout !
ok, I found my problem ! In fact, I already load a default admin template in a beforeRender() method in the AppController :p Thank a lot ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
HABTM and conditions ?
Hi all, I've a table which contain some Posts, a table which contain some Tags, and a HABTM relation betwen them ! My willing : find the best way to select all posts that are related to a specific tag. Right now, I select the specific tag in the tag controller, and I get also the related posts thanks to the HABTM relation. It's work fine, but I'm in troubles for setup a pagination now ... Is it possible to select posts from the post controller by adding a condition in my request ? (it will make the pagination much easier, I think). I try to do that : $posts = $this->paginate('Post', array( 'Tag.name' => $name)); but that doesn't work :( thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax request loads my default layout !
Thank for your response. However, the default layout is always loaded despite your beforeFilter :( $this->render('admin_index', 'ajax'); works fine to set the ajax layout but I don't understand why $this->layout don't works ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax request loads my default layout !
Hi all, I've an issue with Ajax requests. I'm trying to add Ajax pagination for some data by following this tutorial : http://bakery.cakephp.org/articles/view/advanced-pagination-1-2. The pagination works fine but cake loads my entire default layout everytime I request a new page ! To resolve it, I add the code bellow in my controller action : if($this->RequestHandler->isAjax()) { $this->render('admin_index', 'ajax'); } and now It load the correct ajax layout but I think I've something wront, no ? thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Turning off automatic escaping
Hmm, it's strange... with me, cakePHP doesn't escape anything when saving in the database. If I want to escape, I use html() method of the sanitize component. For my part, I prefer to save unescaped strings, and escape them when displaying in views. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is there any function to escape strings ?
thank for your response, it's match with my willings :) Cordially, Neveldo : http://www.neveldo.fr On 21 avr, 14:41, grigri <[EMAIL PROTECTED]> wrote: > cake provides a global shortcut function called h() which internally > calls htmlspecialchars() with the charset defined in your config. > There's no actual helper method for this. > > data['Some']['thing']); ?> > > On Apr 21, 1:34 pm, Neveldo <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I would like to escape HTML chars for some titles and paragraphs in my > > view. I don't find any function in the HTML helper ... > > > Is there any function in cakePHP to do that ? > > Or must I simply use the htmlspecialchars() PHP function ? > > > thank a lot ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Is there any function to escape strings ?
Hi all, I would like to escape HTML chars for some titles and paragraphs in my view. I don't find any function in the HTML helper ... Is there any function in cakePHP to do that ? Or must I simply use the htmlspecialchars() PHP function ? thank a lot ! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Best way to use $html->link ?
Hi all, I've an simple question :) Which is the best way to do a link using $html->link : 1) $html->link('Edit your profile', array('controller' => 'users', 'action' => 'profiles_edit') 2) $html->link('Edit your profile', '/users/edit') Is the second way depreciated for 1.2 ? Thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing example ?
Hi all, I'm trying to make my own routes. For instance, my default URL is : /blog/posts/view/id. I would like to route this URL with /blog/read_id.html. Is it possible using a route ? I try to do this : Router::connect( '/read_:id.html', array('controller' => 'posts', 'action' => 'view', 'id' => 'id') ); But it doesn't work :( Could you help me ? Thank ! Cordially, Neveldo - http://www.neveldo.fr --~--~-~--~~~---~--~~ 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: Which is the best way to desactive htmlentities for $html->link
Oh thank ! I would have checked out the API before asking my question ! Thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Which is the best way to desactive htmlentities for $html->link
Hi all, I saw that with the HTML helper, when I create a link by using $html- >link method, it automatically call an htmlentities-like method for the title. But I have some issues for title which are already "entitized". Which is the best way to desactivate it please ? - Is there any param to add to $html->link ? - Modifing directly the html helper ? - Build a custom helper ? - Do an html_entity_decode() on the title before calling $html->link ? - Doing links manually ? Thank a lot ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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: Define the GMT ?
Ok, I think the simpliest way to do this is to define the GMT in the bootstrap file : Configure::write('gmt', 1); We can use it when displaying dates in views to take account of the GMT timezone. resolved :) Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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: Define the GMT ?
Re-hi, I've tried your solution. I'm working on WAMPServer 5. I tried to config the timezone by php.ini or .htaccess but it don't change the date() value or the created date when a insert new data with cake. Can you help me ? thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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: Define the GMT ?
Thank aranworld, I will try this ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Define the GMT ?
Hi all, How we can take account of the timezone GMT ? For example, the fieds created and updated are based on the PHP function time() or the sql function NOW() ? What is the best way to define the timezone in a cakePHP application ? thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 sanitize::escape
Hi, ok, thank for your response. But what is the interest of sanitize::escape in this case ? Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with sanitize::escape
Hi all, I've a little problem with the function sanitize::escape. I've data from a post form and I want to save it in my database. I secure my data like that: uses('sanitize'); $cleaner = new Sanitize(); $cleanedData['Post']['body'] = $cleaner->escape($this->data['Post'] ['body']); My problem is that my data seems to be addslashed two times. So, in my database, it looks like that : \"hello\" word, \n\n I\'ve a little problem Instead of : "hello" word, I've a little problem Could you help me ? (my magic_quote is set to off) thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ 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: Different flash layout for public and admin ?
Hi, Thank for your responses. I think the simpliest way to do this is by using CSS styles :) thank a lot ! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---