Re: Security Component
sorry man but who told you that security component and AJAX do not work? On Nov 8, 10:18 pm, "Dave Maharaj" wrote: > Ok from what I have read using Security Component with AJAX request will not > work. > > So I never added it to my app_controller, then today I decided lets see what > happens so sure enough my forms all get the security div > > name="_method"> value="6ed5415b7526befab1ec093cac8ccd45255daba7" > name="data[_Token][key]"> > > Now just for fun I tested my forms that use ajax and they all submit fine. > > So what I was reading saying it will not work are they saying it will not > work as in the security feature will not work (it wont secure the forms) or > it will not work as in your forms will never submit? > > Dave Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Difference into Controller::$data and Model::$data
for the controller --- by default, $this->data means the (POST)ed data array, so every FORM field having a name = data[anything here][anything there] will be handled by $this->data array inside the controller... otherwise (in case the name of the FORM field is not data[...]), it willl be handled via $this->params['form']['the name of the FORM field'] inside the controller, and at any time, you can alter/sanitize do what ever you want with this POSTed $data array to prepare it for the model. NOW, update/modify/save operations inside the model may use the prepared $this->data or ANY array of the same form For the model Usually the $data array of the model is accessed/altered inside model callbacks. but since it is public, you can access it from the controller scope, but this is not recommended. --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: JS / CSS Compression
Dear Dave, Cake combines, yes, minifies yes... caches yes... but when you cache the minified|combines|both version of javascript, why don't you cache the gzipped version also? use the magic statement gzencode($content_of_the_dot_js_file,9,FORCE_GZIP); and put what it returns in a .js.gz filename then when you know that the client (web browser) accepts gzip, print the content of the gzipped version not the content of combined| minified one As @Miles told you, you just have to test if the client accepts gzip compression (I think most of the browsers do), and you should be caching also the the gzipped version, so either you print (ass http not as echo) the content of the non gzipped (minified,combined,etc...) version or the gzipped version (which is the usual case) The worst case scenario is when apache allows you to use the htaccess as minimum required by cake so stick to this as much as possible --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Still no answer on how to do this...
Dear Kyle Decot I think whenever you define a route in the routes.php you should not repeat the route parameters in every url you want to show... the shortcut is enough this is first... secondly ->url is for url for hyperlink use ->link On Oct 10, 11:21 pm, Kyle Decot wrote: > Can someone please help me with this? I've tried posting on here and > on the IRC channel and no one can seem to figure this out...it this > just not possible with cake? All I am trying to do is creating a link > using reverse routing and having named params in the URL. > > On Oct 9, 10:38 pm, Kyle Decot wrote: > > > > > I want to set up my website so I can have urls like: > > > sample.com/search/ > > sample.com/search/q:search+terms/ > > sample.com/search/country:us/region:oh/ > > ..etc.. > > > I also want to be able to do reverse routing w/ my links. I have my > > routes.php set up like: > > > Router::connect('/search/*', array('controller' => 'model', 'action' > > => 'index')); > > > and then I print a link like: > > > echo $html->url("search",array > > ("controller"=>"model","action"=>"index","q"=>"search terms go > > here")); > > > but the link comes out as: > > > /model/index/q:search/ > > > What am I doing wrong? I have tried to get an answer to this question > > before but nobody can seem to tell me the correct way of doing this. > > Any help you can give me is EXTREMELY appreciated!- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: What's your advice for implementing multiple languages with CakePHP
always you have to distinguish between static and dynamic data static data are something like the welcome message, the forms error messages, the contact us message/form...etc dynamic data are everything stored in the database that may be in multiple languages I think CakePHP recommends you to use the technique of LC_MESSAGES for the static data and the translate behavior for the dynamic data On Oct 10, 10:10 pm, Miles J wrote: > Well this should help, I suggest you begin here: > > http://book.cakephp.org/view/162/Internationalizing-Your-Application > > On Oct 10, 4:42 am, Shaun wrote: > > > > > I've been working on a project athttp://www.linkbump.comandI would > > like to add a Chinese language version. Users submit videos and news > > much like Digg or Reddit. > > > I would like to keep the English and Chinese content separate, so I > > plan to create separate tables with a cn prefix. For those that have > > experience with this kind of project, do you have any advice?- Hide quoted > > text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: JS / CSS Compression
Dear Dave, What I recommend you is to never rely on apache, do it the cake way...please it is too easy On Oct 9, 5:41 pm, "Dave Maharaj :: WidePixels.com" wrote: > I have the asset helper up and running. Check y-slow and everything gets an > A except > > Grade C on Compress components with gzip > > There are 2 plain text components that should be sent compressed > > * /styles_typography_125509.css > * jquery_jqueryform_ofl_125509.js > > Apache 2.x uses mod_deflate. > > The htaccess is bits from all over from reading so maybe there is a problem > in there somewhere? > > I check the y-slow Statistics: > Empty Cache > HTTP Requests - 14 > Total Weight - 143.9K > > Primed Cache > HTTP Requests - 2 > Total Weight - 2.2K > > Looks like the scripts are not being cached either? > > my /webroot/htaccess: > > > # compress content with type html, text, and css > AddOutputFilterByType > > AddOutputFilterByType DEFLATE text/html text/plain text/xml > > > # properly handle requests coming from behind proxies > Header append Vary User-Agent > > > > > ExpiresActive On > ExpiresByType text/css "access plus 10 years" > ExpiresByType text/js "access plus 10 years" > ExpiresByType text/javascript "access plus 10 years" > ExpiresByType application/x-javascript "access plus 10 years" > ExpiresByType application/javascript "access plus 10 years" > ExpiresByType image/png "access plus 10 years" > ExpiresByType image/gif "access plus 10 years" > ExpiresByType image/jpeg "access plus 10 years" > > > FileETag none > > Not sure why its not zipping these 2. Any ideas or help would be great. > > Thanks > > Dave --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Optimization - Apache Stress Test
Dear TiuTalk First Of All I have to mention that the development environment is not like the production one. So in general MySQL server and Apache server are not on the same machine, although they are usually on the same segment of the network to male two things happen -RTT is minimal between the two machines -Delegation of the internal mysql processing to the CPU of the mysql server machine. Now for your question you web site by default should handle (theoretically) the maximum number of simulatneous connection that apache should handle and if it is web driven (connection to a database) it should handle exactly the maximum number of concurrent connection allowed by the mysql user you use. the question is not about per second... it is about your hosting package and the fine-tuning of the server... cake can not fine tune because it is an upper layer above the hardware...framework not a platform. as for optimizing cakePHP, just google a little bit and you will find a lot of techniques that make you happy --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Jquery noConflict not working
I also have only two libraries in the head section the prototype and the jquery but the former is heading the latter I used the magic noConflict method as you typed in your post everything is ok in my application I am using prototype 1.6.1 jquery 1.3.2 do this procedure on a blank page to see if they are compatible together or try firebug or any debugging technique/extension you know On Oct 7, 10:39 pm, hahmadi82 wrote: > I tried every possible order. Which did not work. I also don't have other > libraries included in the file that would have $. Are there any other > potential solutions? > > > > > > robust solution wrote: > > > I think in your case you should do this > > echo $javascript->link('prototype'); > > echo $javascript->link('jquery', true); > > ... > > var $j = jQuery.noConflict(); > > > so... prototype before jquery... just reverse the order of inclusion > > > On Oct 7, 2:11 am, hahmadi82 wrote: > >> Hi, > >> In my layout default.ctp I'm trying to do: > >> echo $javascript->link('jquery', true); > >> echo $javascript->link('prototype'); > > >> I'm also using jquery and defined: > >> var $j = jQuery.noConflict(); > > >> along with replacing all the $ with $j in my jquery functions. However > >> my > >> jquery UI still doesn't work properly if I try to link prototype. Any > >> ideas > >> why the noConflict is not resolving this issue? > >> -- > >> View this message in > >> context:http://www.nabble.com/Jquery-noConflict-not-working-tp25778058p257780... > >> Sent from the CakePHP mailing list archive at Nabble.com. > > -- > View this message in > context:http://www.nabble.com/Jquery-noConflict-not-working-tp25778058p257930... > Sent from the CakePHP mailing list archive at Nabble.com.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Jquery noConflict not working
I think in your case you should do this echo $javascript->link('prototype'); echo $javascript->link('jquery', true); ... var $j = jQuery.noConflict(); so... prototype before jquery... just reverse the order of inclusion On Oct 7, 2:11 am, hahmadi82 wrote: > Hi, > In my layout default.ctp I'm trying to do: > echo $javascript->link('jquery', true); > echo $javascript->link('prototype'); > > I'm also using jquery and defined: > var $j = jQuery.noConflict(); > > along with replacing all the $ with $j in my jquery functions. However my > jquery UI still doesn't work properly if I try to link prototype. Any ideas > why the noConflict is not resolving this issue? > -- > View this message in > context:http://www.nabble.com/Jquery-noConflict-not-working-tp25778058p257780... > Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: JS/CSS automatic concatenation and compression
Dear mark, You are highlighting the main problem of concatenation. but even a selective concatenation is not very easy. let us take the example of prototype and scriptacuouls, sometimes we need -only prototype -prototype with some scriptaculous files as when building an autocomplete through ajax -prototype with almost all the scriptaculous (maybe except unitest and sound libraries) to use effects and drag drop and sliders on a wow UI page you are right but the decision is not easy. For example If I know that the worst case scenario page will include all the js files of my application and those js after minification and gzipping will have the size of 150k, I will put them into a single file, so the next request for the same page or for another page will be just a verification if something has changed to any of the files since my last request. We should take a decision and it depends on the application. Thank you again for highlight this problem and suggesting a solution but I have another idea, when you javascript files are On Oct 4, 7:22 pm, mark_story wrote: > Concatenating all JS files into one file is not ideal or optimal. Say > for example that you are using jQuery + all of jQuery UI + page > specific Javascript. Since you are gluing all the files together, on > each new page users will need to redownload all of the library code in > addition to the page specific code. A better solution would be to > make separate concatenated files for different types of JS files, this > would allow more effective caching and better reduce the number and > size of HTTP requests. > > -Mark > > On Oct 3, 2:29 am, Davit Barbakadze wrote: > > > > > I wonder whether there already written plugin or component which > > automatically concatenates all js and css files used (separately of > > course), compresses them and places them onto corresponng place in the > > layout? > > > So that in the end, for example, no matter how many js files were > > included, in the header only one, compressed will be referenced, > > holding united info of all those included js files. --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: JS/CSS automatic concatenation and compression
Dear Miles, your post in your blog is he best as a starting point. But, really I prefer to follow the firebug advices where they prefer to minimize the number of style sheets and the number of javascript files, and they also prefer to make gzipped whenever possible (currently most of the browsers accept it and it is easy to do it on the server side), and they prefer to allow browser (which allows caching) to store a cached version, and many other advices yes I code the css and js globally, but unfortunately sometimes I fail to include their links in the head section without doing some hacking/ work around... and everything is fine right now. I founded the problems when linking to javascript/css inside every element in the layout (not the view) and plugins. We should be aware to include the copyright of each individual javascript/css file especially when concatenating the minified javascript files into a single file. On Oct 4, 1:37 am, Miles J wrote: > @robust - Thanks for the link plug :] > > Talking more about your point of "concatenation". I personally am > against it, mainly because certain pages use certain stylesheets. So > if you join all stylesheets into one, some of the stylesheets that > dont belong in a certain page may overwrite CSS that you do not want. > However, that wouldnt happen with JS or if you code CSS to be global. > > On Oct 3, 12:37 pm, robust solution wrote: > > > > > Dear Davit Barbakadze, > > I think none of the suggested solutions for this problem is fair > > enough > > because the solution should do the following > > -all the css links in the head section should be concatenated and > > minified into a single file then gzipped then cached on the server > > -the same for the js links of the head section > > > i prefer that you do this on your own if you have enough time... just > > few hours... you ill learn something new > > you can start with this > > linkhttp://www.milesj.me/blog/read/32/CSSJSAsset-Compression-In-CakePHP- > > Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: JS/CSS automatic concatenation and compression
Dear Davit Barbakadze, I think none of the suggested solutions for this problem is fair enough because the solution should do the following -all the css links in the head section should be concatenated and minified into a single file then gzipped then cached on the server -the same for the js links of the head section i prefer that you do this on your own if you have enough time... just few hours... you ill learn something new you can start with this link http://www.milesj.me/blog/read/32/CSSJSAsset-Compression-In-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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to do ...
Dear Veoempleo, All you have to do is to define a custom routes in the routes.php file in the app/config folder but be aware so that this new custom route dosent overwite any of the the 7 default routes of the core and the custom routes that are already in the routes.php file I recommend you to use this route Router::connect('/:username',array ('controller'=>'an_existing_users_controller_or_a_new_one','action'=>'the_action_that_displays_what_you_want_to_display')); so in the 'an_existing_users_controller_or_a_new_one' controller you define|reuse 'the_action_that_displays_what_you_want_to_display' that recognize the :username slug as $this->params['username'] On Oct 2, 10:43 pm, Veoempleo wrote: > Hi, > > I'd like to have a personal link for everyuser, for example: > > http://mysite.com/presentation/user_xx > > How Could I do that? Do I have to create presentation controller? > > params doesn't catch user_xx whitout ":" symbol, how Could I get > user_xx from controller? > > Thank you very much --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Release: CakePHP 1.2.5
http://bakery.cakephp.org/articles/rss/news On Sep 18, 3:33 pm, Henrik Gemal wrote: > Is there a way to get notified about new CakePHP releases? Like a > CakePHP announe malinglist? > > On Sep 9, 5:54 pm, mark_story wrote: > > > The CakePHP development team is happy to announce CakePHP 1.2.5[1]. > > 1.2.5 is a bug fix release of the latest stable branch. Check the > > changelog[2] for all the changes. > > > CakePHP 1.2.5 Includes almost 40 commits and more than 20 fixes. > > Furthermore, due to popular demand CakePHP 1.2.5 is compatible with > > PHP 5.3 and includes fixes to suppress the deprecation messages. See > > the changelog[2] for a complete list of changes and bugs fixed. > > > The 1.3 branch has seen continued progress and there will be another > > development release sometime soon. If you would like to contribute to > > the development of 1.3 and hasten its arrival, there is a more > > detailed summary of things to do[3] > > > And as always, thank you for helping us make a great framework. > > > [1]http://cakeforge.org/frs/?group_id=23&release_id=449 > > [2]http://code.cakephp.org/wiki/changelog/1_2_x_x > > [3]http://code.cakephp.org/wiki/RFCs/1-3-todo-list --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---