Re: Delete Child Models

2010-03-16 Thread John Andersen
Yes, look at the models deleteAll method at: http://book.cakephp.org/view/692/deleteAll Using your child model, call the deleteAll method with the conditions that all records with the parent id (the A) is to be deleted. Enjoy, John On Mar 17, 6:49 am, guille1983 wrote: > is there a cake magi

Re: multiple many to many tables between the same tables cakePHP

2010-03-16 Thread Mateo San Román
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,

Delete Child Models

2010-03-16 Thread guille1983
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 Q

Re: Problema con safe_mode y creacion directorio/subdirectorios

2010-03-16 Thread Mateo San Román
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 aplicac

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
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,

About Security:cipher and Suhosin patch

2010-03-16 Thread Edgar Valarezo
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

Re: HABTM help

2010-03-16 Thread cricket
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: input('Category', array('type' => 'select', 'multiple' => 'checkbox', 'label'=>'Categories')

Using virtual field with form helper in 1.3

2010-03-16 Thread Maximillian Schwanekamp
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

HABTM help

2010-03-16 Thread Ode
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 thr

Re: Adding a new counter cache

2010-03-16 Thread Brenda
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 = (

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
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

CakePHP & Shindig

2010-03-16 Thread Ma'moon
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 an

Re: Adding a new counter cache

2010-03-16 Thread Brenda
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 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(mode

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
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

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread John Andersen
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

Re: New to CakePHP

2010-03-16 Thread Johnny Ferguson
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 han

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread John Andersen
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 wrote:

Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
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

Re: Problema con safe_mode y creacion directorio/subdirectorios

2010-03-16 Thread andphe
Hola, On Mar 16, 8:10 am, josulin 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

different types of Users

2010-03-16 Thread cricket
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 w

Re: PHP 5.3 open short tag does't working on cakePHP 1.2.6

2010-03-16 Thread cricket
On Mar 16, 11:55 am, Marcelo Andrade 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

Re: PHP 5.3 open short tag does't working on cakePHP 1.2.6

2010-03-16 Thread Marcelo Andrade
On Sun, Mar 14, 2010 at 8:38 PM, anak newbie 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

Re: Kaching: CakePHP Shopping Cart Framework Plugin

2010-03-16 Thread Jamie
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 wrote: > If your looking for a shoppingcart plugin for CakePHP that is > distributed under the MIT License, here you > go...http://code.google.

Re: Data Validation not working

2010-03-16 Thread sooraj francis
actually you havent set the display option to show error in your view file 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 C

multiple many to many tables between the same tables cakePHP

2010-03-16 Thread John Tadros
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

Re: CakeFest IV - America - Help us pick a location!

2010-03-16 Thread piousbox
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 wro

Re: PHP 5.3 open short tag does't working on cakePHP 1.2.6

2010-03-16 Thread piousbox
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

Re: Filter automagic drop down combo box

2010-03-16 Thread Travis
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%3Daps&field-keywords=cakephp&x=0&y=0 but they have mixed reviews, any opinions? Thanks again, Travis On Mar 15, 6:53 pm, "Alan Asher"

Re: store session data and form data to database

2010-03-16 Thread John Andersen
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 wrote: > But I want to insert the session

Re: not working contact grabber in cake

2010-03-16 Thread John Andersen
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 wrote: > hi,

not working contact grabber in cake

2010-03-16 Thread Hitesh Anjara
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/grabb

Re: Concept of seamless registration

2010-03-16 Thread jacmoe
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 use

Re: store session data and form data to database

2010-03-16 Thread stevec
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 wrote: > I do this and it works well. Follow these > instructions:http://book.cakephp.org/view/1310/Sessions > > Jeremy Burns > jeremyb

Problema con safe_mode y creacion directorio/subdirectorios

2010-03-16 Thread josulin
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/ u

Re: New to CakePHP

2010-03-16 Thread John Andersen
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 Ca

Re: store session data and form data to database

2010-03-16 Thread Jeremy Burns
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

Re: Broken URLs prevent app_controllers beforeFilter from executing

2010-03-16 Thread Matthew Dunham
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 wrote: > matthew, you dont use beforeFilter() to pass v

New to CakePHP

2010-03-16 Thread tashi
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://cak

store session data and form data to database

2010-03-16 Thread stevec
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 Goo

.htaccess, possible helpful info for mac users

2010-03-16 Thread dreamingmind
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 FA

Re: Concept of seamless registration

2010-03-16 Thread Yura Linnyk
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 wrote: > @Yura: Dismissing LunarDraco as being 'overly dramatic' when he raises > an extremely important issue shows you're so blinded by how good you

Re: Broken URLs prevent app_controllers beforeFilter from executing

2010-03-16 Thread euromark
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" wrote: > I know the only way - create AppError, define there

Re: Concept of seamless registration

2010-03-16 Thread WebbedIT
@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 att

Re: Adding a new counter cache

2010-03-16 Thread WebbedIT
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 thei

Re: Help a noob with a session(?) issue

2010-03-16 Thread jorgt...@gmail.com
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 wrote: > How are you working on the server?? Did you push the new code with a > ftp programm? Then you override the permissions of

Re: Fatal error: Call to a member function setDate() on a non-object in some_Controller

2010-03-16 Thread John Andersen
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 wrote: > hello, am new to cakephp. > Would really appreciate if anyone could help me out. > > Am just trying to call a model f