simple image gallery
Hi if you are seeking of a simple image gallery in cake php , below link for you http://www.archirayan.com/simple_image_gallery.php this is image gallery is simple as any guest can upload image so we can say it is as image hosting script also and this is made in cake php freamework Thanks 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: Show text message on Session flash from different element
Hi, I already solved the problem. You'll have to echo the output of $this- Session-flash('auth'); Ex. echo $this-Session-setFlash('auth'); On Mar 16, 12:46 pm, tristan_ph tristanpera...@gmail.com wrote: Now, my next problem is how to display the flash message in the auth session in login page. My login page looks like this: fieldset ?php if ($this-Session-check('Message.auth')) $this-Session-flash('auth'); ? legend?php __('Login');?/legend ?php echo $form-input('username'); echo $form-input('password'); //echo $form-input('remember', array('label' = __('Keep me signed in'), 'type' = 'checkbox')); ? div class=input span?php echo $html-link('Forgot Password?', '#');?/span /div /fieldset I have already change the $session-flash('auth') to $this-Session- flash('auth'). However, its still not displaying. Thanks again. On Mar 16, 1:57 am, tristan_ph tristanpera...@gmail.com wrote: Hi guys, I already solved the problem. It is now replaced by $message variable to display the message on custom element from Session::setFlash method() On Mar 16, 1:46 am, tristan_ph tristanpera...@gmail.com wrote: Hi, I am actually migrating my project to CakePHP 1.3. Before, I was using a custom layout for flash messages. For example. $this-Session-setFlash('some message', 'custom'); Then, I found out that in 1.3 they moved this to elements, so I need to move my app/views/layout/custom.ctp to app/views/elements/ custom.ctp Inside the custom.ctp there were a variable $content_for_layout to display the message that you passed to the first argument of Session::setFlash() method. When I tried to reload the page an error occur says Undefined variable content_for_layout. Do you know how to fix this? Thanks in advance. 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: Fatal error: Call to a member function setDate() on a non-object in some_Controller
Questions! Is your model file named word.php in lower case? Is your controller file named words_controller.php in lower case? Enjoy, John On Mar 15, 8:30 pm, Amish ambarish.sakh...@gmail.com wrote: hello, am new to cakephp. Would really appreciate if anyone could help me out. Am just trying to call a model function from controller, and getting the above error. My model code is, class Word extends AppModel { var $useTable = false; function setDate($date1, $date2) { // some code to get the required date out of it return $date; } Controller code is, class WordsController extends AppController { var $name = 'Words'; function xx(){ $date = $this-Word-setDate(); // code doing some math over the fetched date. } } there is no view file, and the model file is named word.php and controller file is named words.php So, could anyone tell me, why am getting the error for the line, $date = $this-Word-setDate(); Thanks 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: Help a noob with a session(?) issue
The tmp directories aren't affected, I only upload the controllers/ views/layouts that I've modified. The tmp dirs are still chmoded 777. On 15 Mar, 14:25, Julian 86 julianbohnenk...@googlemail.com wrote: How are you working on the server?? Did you push the new code with a ftp programm? Then you override the permissions of the tmp directory... On 15 Mrz., 14:19, jorgt...@gmail.com jorgt...@gmail.com wrote: I keep getting these error messages, they don't show up every time I view a page, but every 20th pageview or so. My tmp and session directory are set chmod 777. I've tried switching the session engine from php to cake's own, but that didn't make a difference. Has anyone come across this before, or has an idea of what I can try to fix it? Here's the error: Warning (2): fopen(/tmp/sess_4bbc6925e4dc2234b2253a5a6d370c27) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] $mode = rb $force = false fopen - [internal], line ?? File::open() - CORE/cake/libs/file.php, line 156 File::read() - CORE/cake/libs/file.php, line 175 FileEngine::clear() - CORE/cake/libs/cache/file.php, line 225 FileEngine::gc() - CORE/cake/libs/cache/file.php, line 109 Cache::engine() - CORE/cake/libs/cache.php, line 160 Cache::config() - CORE/cake/libs/cache.php, line 126 include - APP/config/core.php, line 238 Configure::__loadBootstrap() - CORE/cake/libs/configure.php, line 648 Configure::getInstance() - CORE/cake/libs/configure.php, line 137 include - CORE/cake/bootstrap.php, line 43 [main] - APP/webroot/index.php, line 77 Warning (2): fopen(/tmp/sess_60bc2ba565993335f0ad0be8d63af1eb) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_ac46f56f90566da28651803e9d8f8997) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_da8afc546b848ea90fd55b7f117c0ab6) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_fc0fe5113eb55f71fc9b1eb20de04999) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] ..and so on, this list continues endlessly (until I press stop in the browser) 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: Adding a new counter cache
I would also run a SQl query direct on the database using phpMyAdmin or the CLI UPDATE model_a SET model_a.model_b_count = (SELECT COUNT(model_b.id) FROM model_b WHERE model_b.model_a_id = model_a.id) HTH Paul 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: Concept of seamless registration
@Yura: Dismissing LunarDraco as being 'overly dramatic' when he raises an extremely important issue shows you're so blinded by how good you believe your concept to be that you are ignoring the very opinions you have canvassed from the community. I am a web developer, host and - despite my best attempts to persuade people otherwise - systems support provider and it is scary how many people refuse to heed warnings of phishing attempts via email or have heeded them so much that they are scared to open an email unless they are 150% sure that it's safe and they certainly are not happy to click on links within them. So to introduce an alternative way to login where you rely on receiving a link via email which must be clicked on goes back on the advice that Banks, Ebay, PayPal, Twitter, Facebook etc. now offer increasing the chance that people will begin to fall for phishing attempts on other websites. If you want people to register and login to your site it is for two reasons, one to provide you with valid contact details of your user base that you can then monetize in someway (and valid email is a start - but you really want a name and idea of location too) and two to provide your users with a fast but secure way of gaining access to your site on return visits. Services such as OpenID, Sign in with Twitter and Facebook Connect have decreased the number of usernames and passwords we need to remember whilst reducing the login process to a single click in most cases. Your concept requires the entry of an email address, a login to your webmail or opening of your email client, a download of the emails, find the one needed (if it has arrived or not been lost in the SPAM folder), open it up, then click on the link. And there is also the possibility of a wait until I get back home as I do not have access to webmail or have never remembered my POP3/IMAP password as I always download email into an email client setup by a family member who knows more about computers than me. My verdict, you ARE trying to reinvent the wheel and your concept is not ensuring that it is as round as it gets. In fact by introducing another way to login you are actually muddying the waters even further than they already are as the sooner the internet universally adopts one open login process the better as there will then be no confusion when everyone has one roaming account that they use across the internet. Is this a reason to not try and find a better way to login? No, otherwise innovation fails. But when you do come up with an idea and ask for opinions and all those opinions say your concept is not an improvement, maybe you need to go back to the drawing board. 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: Broken URLs prevent app_controllers beforeFilter from executing
matthew, you dont use beforeFilter() to pass variables to the view especially due to the problem that it is not invoked on errors use beforeRender() for it! this will always be called - not matter what On 16 Mrz., 06:44, Dr. Loboto drlob...@gmail.com wrote: I know the only way - create AppError, define there general error() method and run callbacks explicitly. In case of missing controller| action|view $this-controller variable there will be of class CakeErrorController. If someone know better way - you're welcome. On Mar 16, 12:00 am, Matthew Dunham m...@umpcmedia.com wrote: I'm passing variables into my main layout in the beforeFilter() method using $this-set in my main app_controller, However, if someone visits a broken URL (where you would get a missing controller|action|view message, the beforeFilter doesn't run so bits of the layout are functioning correctly. In debug mode the errors are that the vars are not defined. What can I do about this? Is there a better way for cakephp to handle errors or do I need to pass the data to the layout in another way? 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: Concept of seamless registration
WebbedIT, I really appreciate your input, thank you. I'll go discuss it with myself and add your words to the case. On Mar 16, 11:12 am, WebbedIT p...@webbedit.co.uk wrote: @Yura: Dismissing LunarDraco as being 'overly dramatic' when he raises an extremely important issue shows you're so blinded by how good you believe your concept to be that you are ignoring the very opinions you have canvassed from the community. I am a web developer, host and - despite my best attempts to persuade people otherwise - systems support provider and it is scary how many people refuse to heed warnings of phishing attempts via email or have heeded them so much that they are scared to open an email unless they are 150% sure that it's safe and they certainly are not happy to click on links within them. So to introduce an alternative way to login where you rely on receiving a link via email which must be clicked on goes back on the advice that Banks, Ebay, PayPal, Twitter, Facebook etc. now offer increasing the chance that people will begin to fall for phishing attempts on other websites. If you want people to register and login to your site it is for two reasons, one to provide you with valid contact details of your user base that you can then monetize in someway (and valid email is a start - but you really want a name and idea of location too) and two to provide your users with a fast but secure way of gaining access to your site on return visits. Services such as OpenID, Sign in with Twitter and Facebook Connect have decreased the number of usernames and passwords we need to remember whilst reducing the login process to a single click in most cases. Your concept requires the entry of an email address, a login to your webmail or opening of your email client, a download of the emails, find the one needed (if it has arrived or not been lost in the SPAM folder), open it up, then click on the link. And there is also the possibility of a wait until I get back home as I do not have access to webmail or have never remembered my POP3/IMAP password as I always download email into an email client setup by a family member who knows more about computers than me. My verdict, you ARE trying to reinvent the wheel and your concept is not ensuring that it is as round as it gets. In fact by introducing another way to login you are actually muddying the waters even further than they already are as the sooner the internet universally adopts one open login process the better as there will then be no confusion when everyone has one roaming account that they use across the internet. Is this a reason to not try and find a better way to login? No, otherwise innovation fails. But when you do come up with an idea and ask for opinions and all those opinions say your concept is not an improvement, maybe you need to go back to the drawing board. 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
.htaccess, possible helpful info for mac users
Yep, I had what appears to be the classic problem getting through the blog tutorial on my mac running OSX 10.5.8. 404 Not Found errors rather than proper mapping of the nice url's. Yes, the .htaccess files were in place. Yes AllowOverride was allowed. Yes the mod_rewrite module was installed. IN FACT, I could get rewriting to operate in some test cases. Gave up and enabled the pretty-url feature (or whatever it's called) but it's really not so pretty. Created a VirtualHost for the directory. hmmm... not 100% Tried everything in all sorts of combinations. The baffling thing was the home page sometimes could see it's stylesheet, sometimes not. Sometimes I could actually hit the posts page with cakeblog/index.php/ posts, sometimes not and sometimes with the stylesheet, sometimes not. The paths showed as correct in the home page and correct when I used the console!!! I was not working in my main localhost directory which is in /Library/ WebServer (accessed as http://localhost/), I was in my user local which is in User/username/Sites/ (http://localhost/~username/). In this user directory case, it turns out there is a second .conf file used by apache. My main httpd.conf was in /private/etc/apache2/ httpd.conf. The second user specific one is in /private/etc/apache2/ users/username.conf. Setting AllowOverride for my user directories in the main file had no effect for several. First, the user specific .conf file was set to None for AllowOverride. Once I found and set the user .conf setting, I got permission denied errors! The apache logs were a real help in figuring the final solution. I had to have an index.html file in my /Users/username/Sites folder before the server would identify me and properly use my .conf file. Then I had to add FollowSymLinks to the Options so that the AllowOverride All could be used. My main httpd.conf file really didn't end up needing changes, the re- write module was being loaded already. Here's the username.conf file I used: Directory /Users/dondrake/Sites/ Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all /Directory I've only done the most rudimentary tests so there may be more to the story. However, useful details for specific setups seems a bit thin so I figured Add to the pool, even if it's only a drop. Don Drake 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
store session data and form data to database
I would like store session data (e.g. login id) and form data to database Anyone know how to do this?? Please help me 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
New to CakePHP
Hi I am new to cakePHP and i am really interested to learn. But i am stuck from where to begin! So can any body please send me a CRUD application build in CakePHP with authentication? If possible the admin module to manage the application. Tashi 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: Broken URLs prevent app_controllers beforeFilter from executing
Putting everything in beforeRender sorted it. I will be sure to read up no their differences - the appError mentioned by Dr. Loboto. This was my first post on the group, thanks for making it a successful one :) On Mar 16, 10:54 am, euromark dereurom...@googlemail.com wrote: matthew, you dont use beforeFilter() to pass variables to the view especially due to the problem that it is not invoked on errors use beforeRender() for it! this will always be called - not matter what On 16 Mrz., 06:44, Dr. Loboto drlob...@gmail.com wrote: I know the only way - create AppError, define there general error() method and run callbacks explicitly. In case of missing controller| action|view $this-controller variable there will be of class CakeErrorController. If someone know better way - you're welcome. On Mar 16, 12:00 am, Matthew Dunham m...@umpcmedia.com wrote: I'm passing variables into my main layout in the beforeFilter() method using $this-set in my main app_controller, However, if someone visits a broken URL (where you would get a missing controller|action|view message, the beforeFilter doesn't run so bits of the layout are functioning correctly. In debug mode the errors are that the vars are not defined. What can I do about this? Is there a better way for cakephp to handle errors or do I need to pass the data to the layout in another way? 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: store session data and form data to database
I do this and it works well. Follow these instructions: http://book.cakephp.org/view/1310/Sessions Jeremy Burns jeremybu...@me.com On 16 Mar 2010, at 07:11, stevec wrote: I would like store session data (e.g. login id) and form data to database Anyone know how to do this?? Please help me 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 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: New to CakePHP
You don't want to get your hands dirty with someone elses code! Best way is to start here: http://book.cakephp.org/view/4/Beginning-With-CakePHP and when the installation is ready, continue with this: http://book.cakephp.org/view/218/Tutorials-Examples That will give you a good introduction to CakePHP! Better than a ready- made application that you yourself had not built and felt with your own hands and thoughts :) Enjoy, John On Mar 16, 12:20 pm, tashi dawtas...@gmail.com wrote: Hi I am new to cakePHP and i am really interested to learn. But i am stuck from where to begin! So can any body please send me a CRUD application build in CakePHP with authentication? If possible the admin module to manage the application. Tashi 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
Problema con safe_mode y creacion directorio/subdirectorios
Buenas tardes. Tengo un problema de incompatibilidad entre safe_mode y la creacion de directorios y subdirectorios. Sé que es un problema propio de php, pero no sé si alguien habrá solucionado el problema en alguna aplicación cake. El tema es que tengo que crear una estructura similar a app/tmp/ uploads/directoriogenerico/ dónde los '' serían cada uno de los directorios que voy a ir creando en tiempo de ejecución (con más subdirectorios). El directorio me lo deja crear correctamente, pero como lo crea con usuario apache, posteriormente no me deja crear mas subdirectorios por debajo y por ende, no puedo subir los archivos para almacenarlos en dicho subdirectorio. Creo los directorios/ subdirectorios en una función upload, en la que posteriormente se suben (se deberían subir) los archivos seleccionados. ¿Alguien ha conseguido solucionar un problema similar en una aplicación cake? Otra posibilidad que contemplo es tener que cambiar la programación para utilizar las funciones para ejecutar comandos ftp desde php, pero antes de hacer el cambio en la programación, me gustaría plantear la duda. Muchas gracias y un saludo! 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: store session data and form data to database
But I want to insert the session data (e.g. login id) and the form of web page synchronously after the user login the webpage. On 3月16日, 下午7時40分, Jeremy Burns jeremybu...@me.com wrote: I do this and it works well. Follow these instructions:http://book.cakephp.org/view/1310/Sessions Jeremy Burns jeremybu...@me.com On 16 Mar 2010, at 07:11, stevec wrote: I would like store session data (e.g. login id) and form data to database Anyone know how to do this?? Please help me Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 athttp://groups.google.com/group/cake-php?hl=en 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: Concept of seamless registration
OpenID is not just for a few people: If your users have a Google profile, a Twitter, Facebook, MySpace, Blogger, or a flickr account they can just log into your site. If they're new members of your site, your OpenID component fetches the account information from one of these providers. All your users have to do is paste in their OpenID provider URL (in my case I paste my Google profile link). I think it would be hard to find internet people these days without at least one of the above accounts. :) But, feel free to reinvent, because that would only teach you to recognise the amount of effort it takes to create a scalable and secure system. :) Jacob On Mar 16, 12:06 pm, Yura Linnyk yur...@gmail.com wrote: WebbedIT, I really appreciate your input, thank you. I'll go discuss it with myself and add your words to the case. On Mar 16, 11:12 am, WebbedIT p...@webbedit.co.uk wrote: @Yura: Dismissing LunarDraco as being 'overly dramatic' when he raises an extremely important issue shows you're so blinded by how good you believe your concept to be that you are ignoring the very opinions you have canvassed from the community. I am a web developer, host and - despite my best attempts to persuade people otherwise - systems support provider and it is scary how many people refuse to heed warnings of phishing attempts via email or have heeded them so much that they are scared to open an email unless they are 150% sure that it's safe and they certainly are not happy to click on links within them. So to introduce an alternative way to login where you rely on receiving a link via email which must be clicked on goes back on the advice that Banks, Ebay, PayPal, Twitter, Facebook etc. now offer increasing the chance that people will begin to fall for phishing attempts on other websites. If you want people to register and login to your site it is for two reasons, one to provide you with valid contact details of your user base that you can then monetize in someway (and valid email is a start - but you really want a name and idea of location too) and two to provide your users with a fast but secure way of gaining access to your site on return visits. Services such as OpenID, Sign in with Twitter and Facebook Connect have decreased the number of usernames and passwords we need to remember whilst reducing the login process to a single click in most cases. Your concept requires the entry of an email address, a login to your webmail or opening of your email client, a download of the emails, find the one needed (if it has arrived or not been lost in the SPAM folder), open it up, then click on the link. And there is also the possibility of a wait until I get back home as I do not have access to webmail or have never remembered my POP3/IMAP password as I always download email into an email client setup by a family member who knows more about computers than me. My verdict, you ARE trying to reinvent the wheel and your concept is not ensuring that it is as round as it gets. In fact by introducing another way to login you are actually muddying the waters even further than they already are as the sooner the internet universally adopts one open login process the better as there will then be no confusion when everyone has one roaming account that they use across the internet. Is this a reason to not try and find a better way to login? No, otherwise innovation fails. But when you do come up with an idea and ask for opinions and all those opinions say your concept is not an improvement, maybe you need to go back to the drawing board. 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
not working contact grabber in cake
hi, I have implemented all contact grabber, but i could not success on that. but when i try to submit email and password at that time these all error occurs, i had try my best to solved these errors: Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 155 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 155 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 179 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 179 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 182 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 182 No contacts found so , please help me to solve these errors Hitesh Anjara 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: not working contact grabber in cake
Please provide more information, so that we may better be able to assist you! What does the code look like at lines 155, 179 and 182 in the baseclass.php file? Which version of CakePHP are you using? Which version of PHP are you using? Enjoy, John On Mar 16, 4:18 pm, Hitesh Anjara hitesh.anjara...@gmail.com wrote: hi, I have implemented all contact grabber, but i could not success on that. but when i try to submit email and password at that time these all error occurs, i had try my best to solved these errors: Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 155 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 155 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 179 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 179 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 182 Warning: Call-time pass-by-reference has been deprecated in /var/www/ general/hitesh/grabber/baseclass/baseclass.php on line 182 No contacts found so , please help me to solve these errors Hitesh Anjara 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: store session data and form data to database
Please provide more information! What have you tried yourself (show the code that you have written)? Include which version of CakePHP you are using! Then maybe we may be able to point you in the right direction :) Enjoy, John On Mar 16, 3:34 pm, stevec steve.chau.c...@gmail.com wrote: But I want to insert the session data (e.g. login id) and the form of web page synchronously after the user login the webpage. On 3月16日, 下午7時40分, Jeremy Burns jeremybu...@me.com wrote: I do this and it works well. Follow these instructions:http://book.cakephp.org/view/1310/Sessions Jeremy Burns jeremybu...@me.com On 16 Mar 2010, at 07:11, stevec wrote: I would like store session data (e.g. login id) and form data to database Anyone know how to do this?? Please help me Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 athttp://groups.google.com/group/cake-php?hl=en 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: Filter automagic drop down combo box
Thanks! Again, sort of off topic, but if anyone knows of a good cakephp book, there are a few on amazon http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dapsfield-keywords=cakephpx=0y=0 but they have mixed reviews, any opinions? Thanks again, Travis On Mar 15, 6:53 pm, Alan Asher a...@asteriskpound.com wrote: Change your $this-set('fields',$this-Event-Fields-findAllBySeason('2010')); To say $this-set('fields',$this-Event-Fields-find('list',array('conditions'=ar ray('season'='2010'; Basically findby is a normal sql query and find('list') is a special query that returns an array of key value pairs of id and title Alan -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Travis Sent: Monday, March 15, 2010 11:58 AM To: CakePHP Subject: Filter automagic drop down combo box I am working on a farm management app, and have a quick combo box automagic question. Because fields (a grouping of a crop/acres/harvest yields) vary greatly from year to year, I have decided its best to create a new set of all fields each year. The user needs to be able to create events for a field, when the user creates an event such as a chemical (fertilizer/pesticide/etc) event, they select the field that it should be added to in a automagic combo box. I need to filter the drop down box so that it only shows the fields from the current season. below is my controller code: function addChemical() { if(!empty($this-data)) { if($this-Event-save($this-data)) { $this-Session-setFlash('Event Created'); $this-redirect(array('action'='chemical')); } } $this-set('fields',$this-Event-Fields- findAllBySeason('2010')); $this-set('chemicalChemicals',$this-Event-Chemicals- find('list')); $this-set('chemicalMeasurementsRates',$this-Event- Measurements-find('list')); $this-set('chemicalMeasurementsPers',$this-Event- Measurements2-find('list')); $this-set('chemicalImplements',$this-Event-Implements- find('list')); $this-set('fieldFilter',$this-Session- read('fieldFilter')); } It seems to only return the fields in season 2010, but instead of just giving me the field name like it did when I put in find('list') it populates every field into the drop down which is definitely not what I want. *Note, for now I am using a hard coded date for testing. Also, I was wondering if anyone knew of a good cakephp book? Thanks Travis Marble Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 athttp://groups.google.com/group/cake-php?hl=en 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: PHP 5.3 open short tag does't working on cakePHP 1.2.6
Well first off, the grammar of PHP is unambiguous so you should be able to use a regular expression to convert all the short tags. Here's a linux command to replace one string with another in all text files in a folder grep -rl ‘OLD’ . | xargs sed -i -e ’s/OLD/NEW/’ But you need to modify this to look not only for the opening tag, but for the matching closing tag to make two replacements: ?= and ;? replace with ?php echo( and );? So email me if you chose this route, get stuck but really really need this pattern (because it'll take me some time to write and I don't want to do it if it won't be used). Regarding some other people's suggestions, why wouldn't you use short tags?! Those are awesome, make my views so much cleaner and more readable, and save me finger pain. I believe cakePHP even has a shorthand for echo(), which is e(), because ?php echo( is way too much to write. So, I'll stick with my short tags thank you. Besides, I control my server and my php.ini. _V P.S. Closing tags in PHP files other than views are unnecessary, either. On Mar 16, 3:25 am, anak newbie anaknew...@gmail.com wrote: Thanks Jacob! I see it then i should change all short_open_tags in my many apps and it's meaning pain :) cheers On Mon, 2010-03-15 at 05:05 -0700, jacmoe wrote: I strongly advise not using them! They doesn't make the template more clean - it makes it much harder to spot the PHP code. Allow me to quote from debuggable.com: The first thing I recommend is using the fully qualified syntax (?php ?) for php tags instead of the short one (? ?). Why? Well that's what the CakePHP coding standards recommend you to use, and it makes those statments stand out a little more in your html code. But the main reason still is that the short tags syntax can be turned off via php.ini, so using them makes your app less portable and could cause raw code output incidents. I am not a CakePHP expert, but it sounds right. :) Jacob On Mar 14, 10:26 pm, Miles J mileswjohn...@gmail.com wrote: This isn't a problem with CakePHP. Short tags are an INI setting within your PHP installation. Furthermore short tags are being completely removed or deprecated in future PHP versions, so its just best practice to stop using them. On Mar 14, 4:38 pm, anak newbie anaknew...@gmail.com wrote: Yeap, you're right! but somehow open_short_tag affect in making template more clean i see it's support on another framework and i don't talk about comparing something :D Just an idea On Sun, 2010-03-14 at 03:36 -0700, Miles J wrote: Its only 6 more characters to write ?php echo :P On Mar 14, 1:47 pm, anak newbie anaknew...@gmail.com wrote: Perhaps someday it's can be fixed without open_short_tags enable. IMHO, using open_short_tags giving clear templates code as well . On Sat, 2010-03-13 at 14:36 -0800, Miles J wrote: That's the only way to fix it. Its an ini setting. On Mar 13, 11:07 am, John Andersen j.andersen...@gmail.com wrote: Please apply the solution you already know about, enable the short tags in the php.ini file! There is as far as I know, no other solution ... except for you to go through all your source code and change from the short tag to the ? php tag :) Enjoy, John On Mar 14, 6:36 am, anak newbie anaknew...@gmail.com wrote: Hello all, Today i am upgrading my server to PHP 5.3 and see something trouble. My cakePHP get ugly and i see that open short tags doesn't work. like ?=$post['Post']['title']? I have many open short tags on everywhere. I know solution is to enable open , short tags on php.ini My question can it solved without short tags on php.ini ? Thanks Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpotherswith 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 athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 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 athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with
Re: CakeFest IV - America - Help us pick a location!
I live in Chicago and I naturally recommend my city (because I want to attend). I hope it's beyond doubt that in central US, Chicago should be picked over St. Louis, Indianapolis, Detroit, or any other city. However, I imagine that New York, being a bigger city, would get more votes. Nothing's wrong with NYC and I wouldn't mind flying out there, opportunity permitting. Finally, on the other side of the continent I think the best place is San Francisco, especially if you book the Moscone center. Miami, as nice as it is, is too far and lacks developers community (which means everyone would have to fly there). The most developers in the nation are located in New York and in the Silicon Valley. To overview: the strongest city candidates are New York, Chicago, and San Francisco. I chose Chicago. (For no other reason that I live there.) And if it takes place in NYC, I may come over on a weekend. But San Francisco is too far from me. Hey, if enough people want an event, perhaps you should throw one in each of the three cities? _V On Mar 15, 6:21 pm, Jeffrey Hill jeffrey.r.h...@gmail.com wrote: New York, or somewhere in Florida if it's this fall/winter (Tampa/ Orlando/Miami) 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
multiple many to many tables between the same tables cakePHP
Hello All, I currently have 2 tables: users musics I want to have two different Many To Many relations between them: users_musics_rating which would store the user's rating for a specific music users_musics_privacy which determines which user should see a specific music how can this be done in cakePHP ? as I found in the documentation many to many tables are defined by the name of first table_name of second table So how to hanlde that in my case ? Best Regards John 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: Data Validation not working
actually you havent set the display option to show error in your view file ?php if($form-isFieldError('Inventory.make')) e($form-error('Inventory.make', null, array('class' = 'message'))); hope this solves your problem 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: Kaching: CakePHP Shopping Cart Framework Plugin
Mike - this looks really slick. Awesome work. I'm definitely going to be incorporating this into a couple of upcoming projects. On Mar 15, 6:12 pm, Mike mfrie...@gmail.com wrote: If your looking for a shoppingcart plugin for CakePHP that is distributed under the MIT License, here you go...http://code.google.com/p/kaching-php Kachingis tailored for developers that want full control on building their online store. Kachingprovides the store administration and lots of features (see project page). You build the store's look and feel interacting with our controllers. Hopefully people can find this useful and either contribute features back or at least be able to use it as a starting point for their own online stores. 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: PHP 5.3 open short tag does't working on cakePHP 1.2.6
On Sun, Mar 14, 2010 at 8:38 PM, anak newbie anaknew...@gmail.com wrote: Yeap, you're right! but somehow open_short_tag affect in making template more clean i see it's support on another framework and i don't talk about comparing something :D Just an idea The problem is not only the 6 more chars, but as open short tags are deprecated (and AFAIK will be removed in php 6), if you insist using it, you'll face this kind of problem when deploying you application in other servers. So, it's recommended to always use ?php echo instead of ?=. Atts. -- MARCELO F ANDRADE Belem, Amazonia, Brazil I took the red pill 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: PHP 5.3 open short tag does't working on cakePHP 1.2.6
On Mar 16, 11:55 am, Marcelo Andrade mfandr...@gmail.com wrote: The problem is not only the 6 more chars, but as open short tags are deprecated (and AFAIK will be removed in php 6), if you insist using it, you'll face this kind of problem when deploying you application in other servers. This is the first I've heard that they are deprecated. That bites! I rather prefer them than the alternative. But I agree that they're a Bad Idea for any code that will not be under one's control. I don't use ?, btw. Just ?=. I can't imagine why anyone would use the former, actually. As for complaints about them making it more difficult to see, the problem would be fixed with better syntax highlighting. They appear just fine for me. For anyone who needs to convert to the ugly, full syntax, do not reach for regular expressions. That'll be a pain for anything other than the simplest files. A colleague once did this successfully using the methods described in the comments here: http://stackoverflow.com/questions/684587/batch-script-to-replace-php-short-open-tags-with-php 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
different types of Users
I'm just starting on a site that will have several types of users and am uncertain of the best approach to take. I'd like to hear from others who have done something similar. The site will have the following user types: Administrators Members Affiliates Admins may or not be Members. Affiliates will not be Admins nor Members, but the fields for Affiliates and Members are quite similar. However, they may diverge further down the road. All should be able to log in, so I plan to, at least, have a users table with the passwords. But I'd prefer not to have every possible field stuffed in there and instead use separate models for each type. This seems like a good fit for role-based authentication, using Groups, but I think it would make more sense to have separate Member, Affiliate, and Administrator models. But, in that case, how should I go about registering what a newly- logged-in User is? One idea I had was to include model association_key fields in the users table, then loading the info as needed (because it will be stored Auth's session array). So, how have others approached this? ExtendableBehavior? InheritableBehavior? PolymorphicBehavior? Something else? 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: Problema con safe_mode y creacion directorio/subdirectorios
Hola, On Mar 16, 8:10 am, josulin jos...@gmail.com wrote: ¿Alguien ha conseguido solucionar un problema similar en una aplicación cake? Otra posibilidad que contemplo es tener que cambiar la programación para utilizar las funciones para ejecutar comandos ftp desde php, pero antes de hacer el cambio en la programación, me gustaría plantear la duda. No creo que sea posible pasar por encima del safemode, en caso de poderse hacer sería un problema de seguridad en PHP, francamente yo le recomendaría que busque un nuevo proveedor de hosting que no presente este problema, o que le traslade la duda al soporte técnico. Andrés 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
Validation issues for Contact form (doesn't use database)
Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the nice automatic validation. Here are my files: Contact Model: http://bin.cakephp.org/view/568757600 Contacts Controller: http://bin.cakephp.org/view/1939947381 /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ 526960429 /views/contact/add.ctp:http://bin.cakephp.org/view/378503276 The add() method of my ContactsController will take the data from the form at index.ctp, and if it all validates, send off an e-mail. The else clause near the bottom of the add() method attempts to send the user back to the original form if they made any errors, passing the array of errors so that they can be displayed near the form fields. It doesn't look as though $this-redirect() can pass data to a view, so I'm wondering how I can achieve this. It just seems inefficient to reproduce the form on the add.ctp view. If this is the only option, I'll have to go ahead with it, but if anyone can offer a more elegant solution, I'd be interested to hear of it. Thanks for having a look. If I get this figured out, I'll be sure to write an article on my blog so that complete newbies like myself can figure this out. To me a contact form with validation is extremely basic, and I didn't figure it would be so hard to get this going. I have found articles on how to do this, and although the Contact model has a validation array, the errors aren't automagically popping up on the form, so I need to do it manually somehow. 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: Validation issues for Contact form (doesn't use database)
I would consider the use of an element to hold the contact form. Then have the contact form presented in both views! See http://book.cakephp.org/view/97/Elements for the story on elements :) Later you may consider using an AJAX solution. Enjoy, John On Mar 16, 9:48 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the nice automatic validation. Here are my files: Contact Model:http://bin.cakephp.org/view/568757600 Contacts Controller:http://bin.cakephp.org/view/1939947381 /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ 526960429 /views/contact/add.ctp:http://bin.cakephp.org/view/378503276 The add() method of my ContactsController will take the data from the form at index.ctp, and if it all validates, send off an e-mail. The else clause near the bottom of the add() method attempts to send the user back to the original form if they made any errors, passing the array of errors so that they can be displayed near the form fields. It doesn't look as though $this-redirect() can pass data to a view, so I'm wondering how I can achieve this. It just seems inefficient to reproduce the form on the add.ctp view. If this is the only option, I'll have to go ahead with it, but if anyone can offer a more elegant solution, I'd be interested to hear of it. Thanks for having a look. If I get this figured out, I'll be sure to write an article on my blog so that complete newbies like myself can figure this out. To me a contact form with validation is extremely basic, and I didn't figure it would be so hard to get this going. I have found articles on how to do this, and although the Contact model has a validation array, the errors aren't automagically popping up on the form, so I need to do it manually somehow. 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: New to CakePHP
I accidentally hit reply to author, but for anyone else that visits this thread: Be sure to check out the Auth component: http://book.cakephp.org/view/172/Authentication It's dead simple using this to set up authentication. Coupled with the ACL component, you have an unstoppable force on your hands. On Mar 16, 6:20 am, tashi dawtas...@gmail.com wrote: Hi I am new to cakePHP and i am really interested to learn. But i am stuck from where to begin! So can any body please send me a CRUD application build in CakePHP with authentication? If possible the admin module to manage the application. Tashi 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: Validation issues for Contact form (doesn't use database)
You are welcome! :) Another idea, which I do sometime use, is to let the index method process the contact add request. The way I recognise that the contact add form is the one to process, is that I name each submit buttons specifically after what they do - in the contact add form case, it would be named doAddContact. The name of the submit button can be found as a key in the $this- params array. Just an idea, enjoy, John On Mar 16, 10:27 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Ajax is definitely a working solution, but I'm somewhat leary of requiring users to have javascript enabled (call me a purist :P) An element is definitely a good idea. I'm still wondering if it would be possible to pass data as part of a redirect. I've thought of writing a function to create this functionality, but I'm not sure if it would break the MVC paradigm. Definitely a function I would be interested in knowing about, or seeing in future versions of CakePHP. Thanks for the suggestion, John. On Mar 16, 4:21 pm, John Andersen j.andersen...@gmail.com wrote: I would consider the use of an element to hold the contact form. Then have the contact form presented in both views! Seehttp://book.cakephp.org/view/97/Elementsforthe story on elements :) Later you may consider using an AJAX solution. Enjoy, John On Mar 16, 9:48 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the nice automatic validation. Here are my files: Contact Model:http://bin.cakephp.org/view/568757600 Contacts Controller:http://bin.cakephp.org/view/1939947381 /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ 526960429 /views/contact/add.ctp:http://bin.cakephp.org/view/378503276 The add() method of my ContactsController will take the data from the form at index.ctp, and if it all validates, send off an e-mail. The else clause near the bottom of the add() method attempts to send the user back to the original form if they made any errors, passing the array of errors so that they can be displayed near the form fields. It doesn't look as though $this-redirect() can pass data to a view, so I'm wondering how I can achieve this. It just seems inefficient to reproduce the form on the add.ctp view. If this is the only option, I'll have to go ahead with it, but if anyone can offer a more elegant solution, I'd be interested to hear of it. Thanks for having a look. If I get this figured out, I'll be sure to write an article on my blog so that complete newbies like myself can figure this out. To me a contact form with validation is extremely basic, and I didn't figure it would be so hard to get this going. I have found articles on how to do this, and although the Contact model has a validation array, the errors aren't automagically popping up on the form, so I need to do it manually somehow. 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: Validation issues for Contact form (doesn't use database)
Ajax is definitely a working solution, but I'm somewhat leary of requiring users to have javascript enabled (call me a purist :P) An element is definitely a good idea. I'm still wondering if it would be possible to pass data as part of a redirect. I've thought of writing a function to create this functionality, but I'm not sure if it would break the MVC paradigm. Definitely a function I would be interested in knowing about, or seeing in future versions of CakePHP. Thanks for the suggestion, John. On Mar 16, 4:21 pm, John Andersen j.andersen...@gmail.com wrote: I would consider the use of an element to hold the contact form. Then have the contact form presented in both views! Seehttp://book.cakephp.org/view/97/Elementsfor the story on elements :) Later you may consider using an AJAX solution. Enjoy, John On Mar 16, 9:48 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the nice automatic validation. Here are my files: Contact Model:http://bin.cakephp.org/view/568757600 Contacts Controller:http://bin.cakephp.org/view/1939947381 /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ 526960429 /views/contact/add.ctp:http://bin.cakephp.org/view/378503276 The add() method of my ContactsController will take the data from the form at index.ctp, and if it all validates, send off an e-mail. The else clause near the bottom of the add() method attempts to send the user back to the original form if they made any errors, passing the array of errors so that they can be displayed near the form fields. It doesn't look as though $this-redirect() can pass data to a view, so I'm wondering how I can achieve this. It just seems inefficient to reproduce the form on the add.ctp view. If this is the only option, I'll have to go ahead with it, but if anyone can offer a more elegant solution, I'd be interested to hear of it. Thanks for having a look. If I get this figured out, I'll be sure to write an article on my blog so that complete newbies like myself can figure this out. To me a contact form with validation is extremely basic, and I didn't figure it would be so hard to get this going. I have found articles on how to do this, and although the Contact model has a validation array, the errors aren't automagically popping up on the form, so I need to do it manually somehow. 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: Adding a new counter cache
Thanks everyone. I'll go the SQL route. Just wanted to make sure I wasn't missing something obvious! ...Brenda On Mar 16, 4:28 am, WebbedIT p...@webbedit.co.uk wrote: I would also run a SQl query direct on the database using phpMyAdmin or the CLI UPDATE model_a SET model_a.model_b_count = (SELECT COUNT(model_b.id) FROM model_b WHERE model_b.model_a_id = model_a.id) HTH Paul 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
CakePHP Shindig
Hello Cake Bakers :-) Am planing to build a social application using CakePHP together with apache project Shindig, i tried to read about the integration between both CakePHP and Shindig but couldn't really find any on google nor the cook book, anyone did this before using CakePHP Shindig? if anyone was successfully able to build such an application then it would be so kind of him/her to share his/her knowledge in this matter! Thanks in advance :-) 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: Validation issues for Contact form (doesn't use database)
Having the form submit to the index() function worked brilliantly. To my surprise, this enabled the automagic validation messages! All I have to do now is style the messages with CSS, and I have the trickiest part of my project done. I'll be sure to post a link to the blog post I plan to write on this topic when it's finished. I found plenty of blogs describing what to do generally, but I find they assumed a great deal of familiarity with the framework. Since this is a bit of an odd case, I'd like to create a comprehensive guide. Thanks a bunch, John. On Mar 16, 4:32 pm, John Andersen j.andersen...@gmail.com wrote: You are welcome! :) Another idea, which I do sometime use, is to let the index method process the contact add request. The way I recognise that the contact add form is the one to process, is that I name each submit buttons specifically after what they do - in the contact add form case, it would be named doAddContact. The name of the submit button can be found as a key in the $this- params array. Just an idea, enjoy, John On Mar 16, 10:27 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Ajax is definitely a working solution, but I'm somewhat leary of requiring users to have javascript enabled (call me a purist :P) An element is definitely a good idea. I'm still wondering if it would be possible to pass data as part of a redirect. I've thought of writing a function to create this functionality, but I'm not sure if it would break the MVC paradigm. Definitely a function I would be interested in knowing about, or seeing in future versions of CakePHP. Thanks for the suggestion, John. On Mar 16, 4:21 pm, John Andersen j.andersen...@gmail.com wrote: I would consider the use of an element to hold the contact form. Then have the contact form presented in both views! Seehttp://book.cakephp.org/view/97/Elementsforthestory on elements :) Later you may consider using an AJAX solution. Enjoy, John On Mar 16, 9:48 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the nice automatic validation. Here are my files: Contact Model:http://bin.cakephp.org/view/568757600 Contacts Controller:http://bin.cakephp.org/view/1939947381 /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ 526960429 /views/contact/add.ctp:http://bin.cakephp.org/view/378503276 The add() method of my ContactsController will take the data from the form at index.ctp, and if it all validates, send off an e-mail. The else clause near the bottom of the add() method attempts to send the user back to the original form if they made any errors, passing the array of errors so that they can be displayed near the form fields. It doesn't look as though $this-redirect() can pass data to a view, so I'm wondering how I can achieve this. It just seems inefficient to reproduce the form on the add.ctp view. If this is the only option, I'll have to go ahead with it, but if anyone can offer a more elegant solution, I'd be interested to hear of it. Thanks for having a look. If I get this figured out, I'll be sure to write an article on my blog so that complete newbies like myself can figure this out. To me a contact form with validation is extremely basic, and I didn't figure it would be so hard to get this going. I have found articles on how to do this, and although the Contact model has a validation array, the errors aren't automagically popping up on the form, so I need to do it manually somehow. 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: Adding a new counter cache
Oh, just for grins, decided to try and automate this. I have a Configurations controller where I do some admin stuff for the site, and I added this function: function counterCheck( ) { $counterTemplate = UPDATE :atable AS :amodel SET :counter = ( SELECT COUNT(:model.id) FROM :table AS :model WHERE :model.:foreignkey = :amodel.id ); $updates = array(); $models = Configure::listObjects('model') ; foreach ($models as $model) { $this-loadModel($model); $mainTable = Inflector::tableize($model); if (!empty($this-$model-belongsTo)) { foreach ($this-$model-belongsTo as $assocModel = $def) { if (isset($def['counterCache']) $def['counterCache']) { $assocTable = Inflector::tableize($def['className']); $assocClass = $def['className']; $foreignKey = $def['foreignKey']; $counter = strtolower($model) . '_count'; $query = String::insert($counterTemplate, array( 'table' = $mainTable, 'model' = $model, 'atable' = $assocTable, 'amodel' = $assocModel, 'foreignkey' = $foreignKey, 'counter' = $counter )); $result = $this-Configuration-query($query); $affectedRows = $this-Configuration- getAffectedRows(); $updates[] = array( 'query' = $query, 'affected_rows' = $affectedRows ); } } } } $this-set('updates', $updates); } // end function Counter checks The associated view just dumps the results in a table to display. Seems to work to update the counters. The affectedRows lets me know how many rows had their values changed, meaning something went wrong somewhere in the database. Or, as is more likely the case since I'm still developing this, I need to update the counters because I'm still mucking around in the database some. 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
HABTM help
I am working to build a job board with an admin side for adding jobs and categories, and a front end for browsing and searching. On the admin side I have a form for editing/creating jobs. Each job needs to be able to be assigned to multiple categories. I am assuming the best way to do this is through an HABTM association of the jobs and categories tables. So I have created the categories_jobs table and placed the HABTM associations along with joinTable properties in each of the jobs and categories models respectively. The following information is collected from the form: Title, Description, Location That information needs to be stored in the jobs table. Also, I have multiple checkboxes of categories on the form, these come from the categories table through the HABTM relation. When I try to save using $this-Job-save($this-data) I get an SQL error about saving an array. I need to be able to fill out the job data and then select multiple categories for the job to be associated with. Here is my action in the jobs_controller code: function edit($id=null) { $this-set('category', $this-Job-Category-find('list')); $data = $this-editOrCreate($id); if(!empty($this-data)) { $this-data['Category']['id'] = (array('category_id')); $this-User['User']['admin'] = 1; if($this-Job-saveAll($data)) { $this-Session-setFlash('The job has been saved'); $this- redirect(array('action'='index',null,null,true)); } else { $this-Session-setFlash('The Job could not be saved. Please try again later.'); } } $categories = $this-Job-Category-find('list'); } and here is the view where the data is entered: ?php echo $form-create('Job');? div class=body ? if($editing): ? div class=floatRight ?php echo $html-link('Delete Job', array('action'='delete', $form-value('Job.id')), null, __('Are you sure you want to delete this job?', true).' '. $form-value('Job.name')); ? /div h2Edit Job - ?=$form-value('Job.name')?/h2 ?=$form-input('username',array('type'='hidden'));? ? else: ? h2Create New Job/h2 ? endif; ? ?=$form-input('name', array('autocomplete'='off','label'='Title', 'style'='width: 175px;'));? ?=$form-input('description', array('autocomplete'='off','label'='Description', 'style'='width: 175px;'));? ?=$form-input('location', array('autocomplete'='off', 'label'='Location', 'style'='width: 175px;'));? ?=$form-input('job_id', array('type'='hidden', 'value'='job_id'));? ?=$form-input('category_id',array('options'= $category,'multiple'='checkbox', 'label'='Categories'));? /div ?=$form-save('Job');? ?php echo $form-end();? Any help to overcome this problem would be GREATLY appreciated. I am pretty new at PHP and CakePHP, so if you could be verbose in your reply I would be grateful. 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
Using virtual field with form helper in 1.3
How can I get a model virtual field to show up as the option text in a select generated by the form helper? Do I have to manually iterate? Background... I have a User model identical to the Book example, with a virtual field for name. Relevant snippet: var $virtualFields = array( 'name' = CONCAT(User.first_name, ' ', User.last_name) ); var $hasMany = array( 'Post' = array( 'className' = 'Post', 'foreignKey' = 'user_id', 'dependent' = false ) ); ...and of course my Post model belongsTo User. In posts/add.ctp view, I have a simple form: ?php echo $form-create('Post');? fieldset legend?php __('Add Post');?/legend ?php echo $form-input('user_id'); // ... ? /fieldset ?php echo $form-end('Submit');? Works fine when User.name corresponds to an actual db table, but not when it's a virtual field as I have here. Is it possible to have this show up correctly without an actual name field? 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: HABTM help
It may be a typo, but you're setting a variable $categories, but referencing $category in the view. $this-set('categories', $this-Job-Category-find('list')); And create the checkbox inputs like this: ?= $form-input('Category', array('type' = 'select', 'multiple' = 'checkbox', 'label'='Categories'), $categories); ? Then you should be able to just use save() in the controller. On Mar 16, 1:35 pm, Ode coast...@gmail.com wrote: I am working to build a job board with an admin side for adding jobs and categories, and a front end for browsing and searching. On the admin side I have a form for editing/creating jobs. Each job needs to be able to be assigned to multiple categories. I am assuming the best way to do this is through an HABTM association of the jobs and categories tables. So I have created the categories_jobs table and placed the HABTM associations along with joinTable properties in each of the jobs and categories models respectively. The following information is collected from the form: Title, Description, Location That information needs to be stored in the jobs table. Also, I have multiple checkboxes of categories on the form, these come from the categories table through the HABTM relation. When I try to save using $this-Job-save($this-data) I get an SQL error about saving an array. I need to be able to fill out the job data and then select multiple categories for the job to be associated with. Here is my action in the jobs_controller code: function edit($id=null) { $this-set('category', $this-Job-Category-find('list')); $data = $this-editOrCreate($id); if(!empty($this-data)) { $this-data['Category']['id'] = (array('category_id')); $this-User['User']['admin'] = 1; if($this-Job-saveAll($data)) { $this-Session-setFlash('The job has been saved'); $this-redirect(array('action'='index',null,null,true)); } else { $this-Session-setFlash('The Job could not be saved. Please try again later.'); } } $categories = $this-Job-Category-find('list'); } and here is the view where the data is entered: ?php echo $form-create('Job');? div class=body ? if($editing): ? div class=floatRight ?php echo $html-link('Delete Job', array('action'='delete', $form-value('Job.id')), null, __('Are you sure you want to delete this job?', true).' '. $form-value('Job.name')); ? /div h2Edit Job - ?=$form-value('Job.name')?/h2 ?=$form-input('username',array('type'='hidden'));? ? else: ? h2Create New Job/h2 ? endif; ? ?=$form-input('name', array('autocomplete'='off','label'='Title', 'style'='width: 175px;'));? ?=$form-input('description', array('autocomplete'='off','label'='Description', 'style'='width: 175px;'));? ?=$form-input('location', array('autocomplete'='off', 'label'='Location', 'style'='width: 175px;'));? ?=$form-input('job_id', array('type'='hidden', 'value'='job_id'));? ?=$form-input('category_id',array('options'= $category,'multiple'='checkbox', 'label'='Categories'));? /div ?=$form-save('Job');? ?php echo $form-end();? Any help to overcome this problem would be GREATLY appreciated. I am pretty new at PHP and CakePHP, so if you could be verbose in your reply I would be grateful. 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
About Security:cipher and Suhosin patch
Hi, I was playing with cookies in my CakePHP powered LAMP box with the Suhosin security patch, and I dicovered (better late than never) than Suhosin add a srand() call before any rand(), so decrypt any text with Security:cipher simply doesn't work. Thinking about that, maybe the use of srand() and rand() in cipher method is wrong because is a hack of the waited use (no random number but predictable one), so I rewrite a new cipher method without any random: function cipher($text, $key = '') { $key .= Configure::read('Security.cipherSeed'); $out = ''; $textLength = strlen($text); $keyLength = strlen($key); $k = 0; for ($i = 0; $i $textLength; $i++) { $seed = md5($key . $key[($k++) % $keyLength]); $mask = hexdec($seed[6] . $seed[9]); // :) $out .= chr(ord($text[$i]) ^ $mask); } return $out; } Perhaps it will help to somebody. Regards 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: Validation issues for Contact form (doesn't use database)
Now here's a tricky extension (still determined to avoid AJAX). When my form fails, and validation errors pop up, how could I have the page jump to an anchor link connected to the form? The top section of my page is somewhat large, so I'd like to avoid excessive scrolling with an anchor link. + 1,000,000 bonus points to anyone who can figure this out On Mar 16, 5:07 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Having the form submit to the index() function worked brilliantly. To my surprise, this enabled the automagic validation messages! All I have to do now is style the messages with CSS, and I have the trickiest part of my project done. I'll be sure to post a link to the blog post I plan to write on this topic when it's finished. I found plenty of blogs describing what to do generally, but I find they assumed a great deal of familiarity with the framework. Since this is a bit of an odd case, I'd like to create a comprehensive guide. Thanks a bunch, John. On Mar 16, 4:32 pm, John Andersen j.andersen...@gmail.com wrote: You are welcome! :) Another idea, which I do sometime use, is to let the index method process the contact add request. The way I recognise that the contact add form is the one to process, is that I name each submit buttons specifically after what they do - in the contact add form case, it would be named doAddContact. The name of the submit button can be found as a key in the $this- params array. Just an idea, enjoy, John On Mar 16, 10:27 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Ajax is definitely a working solution, but I'm somewhat leary of requiring users to have javascript enabled (call me a purist :P) An element is definitely a good idea. I'm still wondering if it would be possible to pass data as part of a redirect. I've thought of writing a function to create this functionality, but I'm not sure if it would break the MVC paradigm. Definitely a function I would be interested in knowing about, or seeing in future versions of CakePHP. Thanks for the suggestion, John. On Mar 16, 4:21 pm, John Andersen j.andersen...@gmail.com wrote: I would consider the use of an element to hold the contact form. Then have the contact form presented in both views! Seehttp://book.cakephp.org/view/97/Elementsforthestoryon elements :) Later you may consider using an AJAX solution. Enjoy, John On Mar 16, 9:48 pm, Johnny Ferguson hyperfle...@gmail.com wrote: Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the nice automatic validation. Here are my files: Contact Model:http://bin.cakephp.org/view/568757600 Contacts Controller:http://bin.cakephp.org/view/1939947381 /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ 526960429 /views/contact/add.ctp:http://bin.cakephp.org/view/378503276 The add() method of my ContactsController will take the data from the form at index.ctp, and if it all validates, send off an e-mail. The else clause near the bottom of the add() method attempts to send the user back to the original form if they made any errors, passing the array of errors so that they can be displayed near the form fields. It doesn't look as though $this-redirect() can pass data to a view, so I'm wondering how I can achieve this. It just seems inefficient to reproduce the form on the add.ctp view. If this is the only option, I'll have to go ahead with it, but if anyone can offer a more elegant solution, I'd be interested to hear of it. Thanks for having a look. If I get this figured out, I'll be sure to write an article on my blog so that complete newbies like myself can figure this out. To me a contact form with validation is extremely basic, and I didn't figure it would be so hard to get this going. I have found articles on how to do this, and although the Contact model has a validation array, the errors aren't automagically popping up on the form, so I need to do it manually somehow. 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: Problema con safe_mode y creacion directorio/subdirectorios
Hola, La solución que creo más adecuada para estos casos es gestionar a los archivos mediante una aplicación, es decir, simulando virtualmente los directorios y almacenar estos datos ya sea en un único directorio previamente definido o en la base de datos como BLOBs... de esta manera tu aplicación no tendrá problemas de incompatibilidad, problemas de seguridad o permisos. On 16 mar, 08:10, josulin jos...@gmail.com wrote: Buenas tardes. Tengo un problema de incompatibilidad entre safe_mode y la creacion de directorios y subdirectorios. Sé que es un problema propio de php, pero no sé si alguien habrá solucionado el problema en alguna aplicación cake. El tema es que tengo que crear una estructura similar a app/tmp/ uploads/directoriogenerico/ dónde los '' serían cada uno de los directorios que voy a ir creando en tiempo de ejecución (con más subdirectorios). El directorio me lo deja crear correctamente, pero como lo crea con usuario apache, posteriormente no me deja crear mas subdirectorios por debajo y por ende, no puedo subir los archivos para almacenarlos en dicho subdirectorio. Creo los directorios/ subdirectorios en una función upload, en la que posteriormente se suben (se deberían subir) los archivos seleccionados. ¿Alguien ha conseguido solucionar un problema similar en una aplicación cake? Otra posibilidad que contemplo es tener que cambiar la programación para utilizar las funciones para ejecutar comandos ftp desde php, pero antes de hacer el cambio en la programación, me gustaría plantear la duda. Muchas gracias y un saludo! 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
Delete Child Models
is there a cake magic way to delete all children models of a given model ? I just want to delete childs not the main model. Let me explain it to you Model A has many B, C, D -- hasOne E, F, hasAndBelongsToMany G, H I want to delete B, C, D, E, F, G, H and keep A 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: multiple many to many tables between the same tables cakePHP
Hello, Since you are adding attributes to a relation, it will not be a pure bridge table. You should create a table called Ratings with an attribute and the relations to musics and users tables, so it could have a view where you can add the rating attribute. Same for Privacy table. On 16 mar, 11:02, John Tadros john.tadro...@gmail.com wrote: Hello All, I currently have 2 tables: users musics I want to have two different Many To Many relations between them: users_musics_rating which would store the user's rating for a specific music users_musics_privacy which determines which user should see a specific music how can this be done in cakePHP ? as I found in the documentation many to many tables are defined by the name of first table_name of second table So how to hanlde that in my case ? Best Regards John 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