Re: Saving extra fields in HABTM changed in RC4/1.2/1.2.1 ?

2009-03-03 Thread Jne
It is indeed working with this syntax as suggested : Array ( [User] => Array ( [id] => 1 ) [Company] => Array ( [0] => Array ( [company_id] => 68 [is_school] => 0 [

Re: Best Practices Question

2009-03-03 Thread keymaster
Have a look at this: http://groups.google.com/group/cake-php/browse_thread/thread/7638b690ae0545ff/53a804265793ace3?lnk=gst&q=crud# The more I think about it, the more sold I am on grigri's approach in the above thread. --~--~-~--~~~---~--~~ You received this mess

Re: Saving extra fields in HABTM changed in RC4/1.2/1.2.1 ?

2009-03-03 Thread Jne
Hi Matt, sorry I did not replied sooner, but I thought I'd get an email notification... I'll give this a try, but IMHO this is kind of bad move since a $this- >User->find() will draw an array similar to the one I posted. This leads to have a specific form that will match the find syntax. And I

Re: Best Practices Question

2009-03-03 Thread keymaster
I'd define the following basic crud operations operations in appController to work generically independant of controller/model: add(), edit(), del(), view() admin_add(), admin_edit(), admin_del(), admin_view() Then, all your profile controllers would inherit from appController, and: delete_quot

Re: routing rpoblem

2009-03-03 Thread Sensible
Thanks for reply it helps me a lot. But i have another question? Is there any way to remove specific parameters from url. Suppose My Url is : http://www.example.com/category/70/flower.html I want : http://www.example.com/flower.html than how can i do that? Thanks. Waiting for reply. --~--~-

Re: How to Handle Tightly Coupled Database Tables?

2009-03-03 Thread Miles J
Have you tried paginating/searching from the actual HABTM model? In this case your model would be ChildParents. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

Re: How to Handle Tightly Coupled Database Tables?

2009-03-03 Thread Nate
Hi Brian, I hope I can help. On Mar 3, 2:53 pm, bcreeve wrote: > Most often the way Cake handles relationships is very efficient for > getting new development off the ground.  However, I recently have hit > a wall when it comes to handling two or more tables that are tightly > coupled.  By "tig

Re: L18n Showing and editing all available languages at the same time

2009-03-03 Thread Miles J
You would have to store all of this in a database, and use some heavy relations. Why would the use add one for each language? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, s

Re: Cake bake command on Ubuntu 8.04

2009-03-03 Thread James Louie Puro
Adding $PATH environment variable. 1. Open Terminal Window. In the command line, type. sudo gedit /etc/environment File will be opened with a text editor and with a content similar below. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" 2. You need to append the

Re: Hi All :-)

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 10:11 PM, Alfredo Quiroga-Villamil wrote: > > Brian: > > I am hoping you are simply joking here or having a bad day or > something. If you are not, that's not a cool way to reply to a valid > question in my opinion. > Alfredo, did you follow the link in his sig? Anyone who

can't pagination use the group by ?

2009-03-03 Thread Rimoe
hi, I have write a var $paginate = array( 'limit' => 50, 'fields' => array('acc_id', 'count(*) as countnum'), 'order' => array('countnum ' => 'desc'), 'group' => array('acc_id') ); the paginate can't get the paginate's count, can't pagination use the group by ? or how to use

Re: Brain sprain

2009-03-03 Thread brian
Actually, I just realised that you could call $this->setAction('view', $user_id) instead of redirecting. On Tue, Mar 3, 2009 at 11:42 PM, Steven Wright wrote: > > Well the only issue is that the client wants all the data and the add device > on the same view. There will possible be more mini for

L18n Showing and editing all available languages at the same time

2009-03-03 Thread Aurelius
Hi! Is it posible to load and save all available languages at the same time? E.g. I would like to have a settigspage, where the user can edit the page title in every available langiage, should look something like that: English title [textfield] German title [textfield] Spainish title [textfield

RE: Brain sprain

2009-03-03 Thread Steven Wright
Well the only issue is that the client wants all the data and the add device on the same view. There will possible be more mini forms as well. I would prefer to break it up into logical chunks but its not my call. Would AJAX get me out of this? If I only have to update a region of the page its di

Re: cake 1.2 Auth component not logging in

2009-03-03 Thread Miles J
Here you go: http://www.milesj.me/blog/read/3/debugging-the-cakephp-auth-component http://www.milesj.me/blog/read/5/using-cakephps-auth-component --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To po

Re: Find by other than ID

2009-03-03 Thread Miles J
You should do all backend relations using the ID, the slug should only be used in urls/routing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegrou

Find by other than ID

2009-03-03 Thread Dave Maharaj :: WidePixels.com
My USERS in my application all have a unique slug. example profile/johndoe Now when John wants to edit his profile all of his data is found by his ID and not his SLUG. How can I get the ID of John based on his SLUG? Basically use the slug for the URL then in the controller get the USER SLUG and c

Re: Hi All :-)

2009-03-03 Thread Alfredo Quiroga-Villamil
Brian: I am hoping you are simply joking here or having a bad day or something. If you are not, that's not a cool way to reply to a valid question in my opinion. Davide, I am posting here the email I had previously sent you. == PHP (cakephp) o

Re: Hi All :-)

2009-03-03 Thread brian
Do whatever you like, just don't come work with me. What is this, some pathetic cry for help? On Tue, Mar 3, 2009 at 4:53 PM, Ex GAE Developer wrote: > > From GAE, > I'm thinking to come back to PHP + MySQL, is this a good idea? > > Bye > > > -- Ex GAE Developer > http://code.google.com/p/googl

Re: I can't seem to use javascript anywhere.

2009-03-03 Thread brian
Well, my FIRST THOUGHT was to tell you to "write and overbearing controller" but I guess that's completely out of the question. (Overbearing, indeed.) You might best seek help from complete strangers by, at minimum, stating what it is that is not working for you. A plus would to not come off as i

Re: Debug Comment Data in JSON Results

2009-03-03 Thread Alex
Ahh, I see. Didn't think to write the debug configuration based on the request. Annoying though that it appends that right? What practical purpose could it serve? Thank you, Alex On Mar 3, 11:57 am, bcreeve wrote: > What I do is parse .json extensions and return the JSON with > Configure::writ

Re: Best Practices Question

2009-03-03 Thread brian
I'd put as much as possible in its appropriate controller. And as much of the logic in the appropriate model. On Tue, Mar 3, 2009 at 4:47 PM, Dave Maharaj :: WidePixels.com wrote: > I have a controller USERS which displays a users profile. The profile data > is comprised of information from vari

Re: Brain sprain

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 3:55 PM, RhythmicDevil wrote: > > Hi, > I am having a brain sprain. I have a controller Subscribers that has > two actions 'view' and 'add_device'. View is called from the index > page with a Subscriber ID and then shows all the Subscriber's details. > In the 'view' view th

Re: basics.php, Controller Dump, Fatal error: Allowed memory size

2009-03-03 Thread brian
debug 3 produces a ridiculous amount of output. It's best avoided unless you already know what you're looking for because, frankly, there's not likely to be anything in there of use--or, at least, easy to spot--for the most common debugging situations. Better to put, eg. debug($this->params) in yo

basics.php, Controller Dump, Fatal error: Allowed memory size

2009-03-03 Thread Spatical
I am getting the following error when trying to access a couple of my models: Fatal error: Allowed memory size of \cake\basics.php on line 209. It is interesting that it only occurs on a few of my models. It occurs as part of the controller dump (when debugging is set to 3). My quick fi

Re: cake 1.2 Auth component not logging in

2009-03-03 Thread Jorge Horacio Cué Cantú
Are you inserting the first user by hand? Try setting the password to the SH1 of the concatenation of the salt and the password you want: $cipher_password = SHA1( $salt . $plain_password ) 2009/3/3 aka > > Thing is that it does seem to work when my salt is empty... As > mentioned bef

Re: I cannot inherit methods from AppController.

2009-03-03 Thread Miles J
Also your app_controller is in the wrong place, it goes in: app/app_controller.php app/controllers// --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@goog

Re: I can't seem to use javascript anywhere.

2009-03-03 Thread georg
what exactly doesn't work, pls post the html rendered in your browser when you call your script. cakephp doesn't do anything to your javascript On 3 Mrz., 23:55, Turney wrote: > Hello to all, > Is it just me or is using javascript in CakePHP impossible.  Here is > what I'm trying to do and I wil

Re: Ajax requests destroy sessions

2009-03-03 Thread Sidney
Try changing your security level to medium from high. That worked for me and many others. Ajax and sessions are a common problem. On Mar 3, 5:43 am, jc_mich wrote: > Hi > > I'm trying to render an element after an ajax request. After the request is > successfully accepted by the controller the s

I can't seem to use javascript anywhere.

2009-03-03 Thread Turney
Hello to all, Is it just me or is using javascript in CakePHP impossible. Here is what I'm trying to do and I will be a detailed as I can. I have coded in php before and I have used some javascript to produce a Calendar widget on the screen when a user clicks on a image (a mini calendar image).

Re: how to set current time for local computer

2009-03-03 Thread Sidney
Glad you got your solution Vikas. I am trying to design a solution for a broader, similar problem: My site is available globaly, and runs Games according to a date/time schedule (think online Poker). I can record the schedule according to GMT as a base, but I want to show users when the game wil

Hi All :-)

2009-03-03 Thread Ex GAE Developer
>From GAE, I'm thinking to come back to PHP + MySQL, is this a good idea? Bye -- Ex GAE Developer http://code.google.com/p/googleappengine/issues/detail?id=1108 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cak

Re: I cannot inherit methods from AppController.

2009-03-03 Thread darthmalis
U... Nevermind me. I apologize for wasting your time. In all my excitement while learning all of the cool thigs the CakePHP does for automagically, apparently I assumed that it would put my methods between the {} in the class declaration for me. I have been writing Java for a while now and Ecl

Re: Style Submit

2009-03-03 Thread dr. Hannibal Lecter
Send an empty string instead of "Delete" string? On Mar 3, 9:50 pm, WidePixels wrote: > Does anyone know how to style the SUBMIT button when using the AJAX > helper? > > I know how to styles the button, issue is I am using a custom button > in a css sprite (2 states of the button, rest / hover a

Best Practices Question

2009-03-03 Thread Dave Maharaj :: WidePixels.com
I have a controller USERS which displays a users profile. The profile data is comprised of information from various HABTM and hasMany tables in the database (PROFILE, AUTHORS, ARTISTS, QUOTES and so on) The user can edit all of their preferences / info on the profile page using AJAX. All of th

RE: AJAX Delete

2009-03-03 Thread Dave Maharaj :: WidePixels.com
I got it Its was an oversight in my Ajax link... Thanks -Original Message- From: bcreeve [mailto:bcre...@gmail.com] Sent: March-03-09 4:45 PM To: CakePHP Subject: Re: AJAX Delete First, I would move the Configure::write('debug', 0); to within the if block. Then if you hit that U

RE: AJAX Delete

2009-03-03 Thread Dave Maharaj :: WidePixels.com
I moved the Configure::write('debug', 0); inside the if block, still same thing... The items deletes then ERROR: The requested address 'users/delete_quote/(id number trying to delete)' was not found on this server fades in where the item was originally before deletion. Tried: Configure::write

RE: Brain sprain

2009-03-03 Thread Steven Wright
Hi Gonzalo thanks for the answer. Unfortunately I dont think that will work. The Set method will set the value for the current request but when the redirect happens that variable is lost because the redirect is a new request. The only way I can think to do this is to set the variable into the GE

Auth: different redirects based on User level

2009-03-03 Thread Chez17
I am having issues setting up different redirects for a logged in user. Basically, there are two user levels, ADMIN and USER. If a USER logs in I want to redirect them to the a different page than an admin. I have tried using switch statements and tried using the normal $this- >redirect function b

Re: Brain sprain

2009-03-03 Thread Gonzalo Servat
On Tue, Mar 3, 2009 at 6:55 PM, RhythmicDevil wrote: > > [..snip..] > > If the device_id is empty I want to send the user back to the 'view' > view (I have to change that name) populated with the Subscriber's > data. For some reason I cant figure out how to do that in a simple > way. Because each

RE: Errors in expected table names?

2009-03-03 Thread Steven Wright
Your model has to be the singular name of the database table. Db table: airportgroups Model: airportgroup -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Joao Ribeiro da Silva Sent: Tuesday, March 03, 2009 3:48 PM To: CakePHP Subject:

Brain sprain

2009-03-03 Thread RhythmicDevil
Hi, I am having a brain sprain. I have a controller Subscribers that has two actions 'view' and 'add_device'. View is called from the index page with a Subscriber ID and then shows all the Subscriber's details. In the 'view' view there is a form to add a device. This form's action points at 'subsc

RE: Style Submit

2009-03-03 Thread Dave Maharaj :: WidePixels.com
Never mind I found it. link(__('delete',false), '...'', array('update' => '', 'class' => 'delete_btn', 'loading'=> "..", 'loaded'=> "...", 'confirm' => '

Errors in expected table names?

2009-03-03 Thread Joao Ribeiro da Silva
Hi to all: I'm new to Cake but I work with PHP since the beginning, I'm developing a website now using Cake, -Yes a surrender to it's achantments ;P I build all my table models following the instruction on Cake's website. But I'm getting this error. Error: Database table airportgoups for mode

Style Submit

2009-03-03 Thread WidePixels
Does anyone know how to style the SUBMIT button when using the AJAX helper? I know how to styles the button, issue is I am using a custom button in a css sprite (2 states of the button, rest / hover as 1 image) and my button has its own text. So how can I remove the text from the ajax link? I wan

Re: Cake bake command on Ubuntu 8.04

2009-03-03 Thread bcreeve
In a terminal, go to the directory you installed Cake. Then you can do the following commands to run bake: cd cake/console ./cake bake There is bake documentation here: http://book.cakephp.org/view/113/Code-Generation-with-Bake On Mar 3, 10:23 am, Yogesh wrote: > Hi All, > > I have created a

Re: I cannot inherit methods from AppController.

2009-03-03 Thread darthmalis
When I do that Controller::beforeFilter() is called and AppController::beforeFilter() is ignored. By default this is an empty method so nothing happens. If I put something in Controller::beforeFilter() it is executed skippng over AppController::beforeFilter() like it's not there. Maybe My app_con

Re: AJAX Delete

2009-03-03 Thread bcreeve
First, I would move the Configure::write('debug', 0); to within the if block. Then if you hit that URL in your browser you can see any specific errors. On Mar 3, 2:46 pm, "Dave Maharaj :: WidePixels.com" wrote: > I am trying to delete a record using an AJAX link. The entry gets deleted, > effec

Re: Debug Comment Data in JSON Results

2009-03-03 Thread bcreeve
What I do is parse .json extensions and return the JSON with Configure::write('debug', 0); like brian stated. If I want to see what errors I'm getting when things bomb, I can hit the same URL without the extension to return the data as HTML in the default layout while respecting the environment's

How to Handle Tightly Coupled Database Tables?

2009-03-03 Thread bcreeve
Most often the way Cake handles relationships is very efficient for getting new development off the ground. However, I recently have hit a wall when it comes to handling two or more tables that are tightly coupled. By "tightly coupled" I mean the data from multiple tables makes most sense when l

AJAX Delete

2009-03-03 Thread Dave Maharaj :: WidePixels.com
I am trying to delete a record using an AJAX link. The entry gets deleted, effects and all that great stuff but after clicking "delete" I get ERROR: The requested address 'users/delete_quote/(id number trying to delete)' was not found on this server. Now I am deleting the quote from the user

Re: routing rpoblem

2009-03-03 Thread Martin Westin
I think what you want to do is make use of slugs. Your categories are not set by you in development, right? They are editable by whoever administers the application, right? In that case, creating manual routes for each category becomes very messy. I suggest you look at sluggable behavior. http://

Re: Debug Comment Data in JSON Results

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 2:09 PM, Alex wrote: > > I'm using the javascript->object() method to return JSON data for XHR > requests. All works great when the cake debug level is set to 0, but > when higher will append an html style comment to my JSON data like so: > "", indicating the response time

Contain is not working with pagination

2009-03-03 Thread Xoubaman
I'm trying to paginate my robots filtering the data with two named parameters in the url. In the controller I build the paginate var manually (and i think that with no errors), but, when paginating, the contain doesn't work and no data is retrieved. The paginate var, obtained with $this->set('pa

Debug Comment Data in JSON Results

2009-03-03 Thread Alex
I'm using the javascript->object() method to return JSON data for XHR requests. All works great when the cake debug level is set to 0, but when higher will append an html style comment to my JSON data like so: "", indicating the response time of the request. This prohibits the JSON data from being

Re: Help with left join

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 9:35 AM, Henrik Gemal wrote: > > Hi > > I'm having a little problem with converting an old sql request to use > cakephp. > > The sql is: > select name, if(module_id is null,0,1) activated from module left join > active_modules on (id = module_id and res_id = $id) > > I have

Re: Multiple javascripts calls issue

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 11:26 AM, Stu wrote: > > Thanks for the reply Doctor, > > I'm not even sure why I was using both, I didn't know what JQuery was > until last week, nor did prototype was until this morning, hehehe. I think the best advice anyone can give you is to spend some time fiddling w

Re: Error handling in production

2009-03-03 Thread mscdex
On Mar 3, 1:08 pm, Aidan Lister wrote: > Does anyone else have any suggestions? Why not override ErrorHandler's default 'error' function to handle the HTTP errors? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ca

Re: routing rpoblem

2009-03-03 Thread majna
Router::connect('/flower.html', array( 'controller'=>'categories', 'action' => 'categoryindex', 70)); Try now http://www.example.com/flower.html On Mar 3, 3:54 pm, Sensible wrote: > Hi, > > I want help on routing. > > I want my url with .html extension. Is it possible. > > Currently my url :http

Re: Email component with smtp error: 503

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 8:18 AM, remy wrote: > > Hello all, > > I'm trying to get the Email component to work with smtp. I'm using the > right smtpOptions for the server, but I keep receiving the error: 503 > AUTH command used when not advertised > > Can I anyone tell me what I do wrong and what t

Re: One directory for all view files.

2009-03-03 Thread majna
I think that you can put in app_controller beforeRender() { $this->viewPath = ''; or '/' } cake populate viewPath with current controller name like "posts" and search in views/posts/ for files based on action name. Now cake will search view files in VIEW directory and all controller view names m

Re: One directory for all view files.

2009-03-03 Thread brian
On Tue, Mar 3, 2009 at 5:20 AM, lakers fan wrote: > Hello, > Can I create all the view files inside one directory. Right now what I > understood is you got to create a folder named after controller. if I have > many controllers, does it mean that I have to create that many folders for > view

Re: Model Cache and Dynamic Prefix

2009-03-03 Thread majna
"default" *is* database connection config name in Database configuration class (app/config/database.php) If there's another database config it should be used when model is mapped to this one. Cache should be "cake_model_another-connection_posts". On Mar 2, 1:44 am, pâtissier wrote: > Hi... >

Re: Error handling in production

2009-03-03 Thread Aidan Lister
Thanks! I wish I had of thought of that, Hannibal. Does anyone else have any suggestions? Regards, Aidan On Mar 2, 7:50 pm, "dr. Hannibal Lecter" wrote: > I know this may seem like a strange idea, but why not iron out those > notices before going live? > > On Mar 2, 7:52 am, Aidan Lister wr

Re: cake 1.2 Auth component not logging in

2009-03-03 Thread aka
Thing is that it does seem to work when my salt is empty... As mentioned before this is a new installation of both cake and the db. Really maddening!! On 27 feb, 17:00, Xoubaman wrote: > User table got username and password? > > Beforefilter ir correct? > > Do you allow the public actions in yo

Re: undetermined recursion

2009-03-03 Thread mscdex
This probably isn't exactly the answer you were looking for but, maybe you could use the Tree behavior instead? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

Re: HABTM query with conditions - HELP

2009-03-03 Thread foldiman
Thanks. That was it On Mar 3, 12:05 pm, mscdex wrote: > On Mar 3, 10:15 am, foldiman wrote: > > > $params = array( > > 'conditions' => array('Music.inactive' => '0') > > ); > > $this->set('musics', $this->Club->Music->find('list', array > > ($params))); > > > However, the full list of items

Re: customizing foreign key constraint error

2009-03-03 Thread mscdex
On Mar 2, 11:50 pm, krishan wrote: > I need to catch this mysql error in advance > and show a user friendly message for same action. You could create the "onError" function (takes no parameters) in your model, which should get called every time there is a DB error of some kind. Inside that func

Re: HABTM query with conditions - HELP

2009-03-03 Thread mscdex
On Mar 3, 10:15 am, foldiman wrote: > $params = array( > 'conditions' => array('Music.inactive' => '0') > ); > $this->set('musics', $this->Club->Music->find('list', array > ($params))); > > However, the full list of items from the Musics table always appears > when I need only the entries with 'i

Re: Multiple javascripts calls issue

2009-03-03 Thread Stu
Thanks for the reply Doctor, I'm not even sure why I was using both, I didn't know what JQuery was until last week, nor did prototype was until this morning, hehehe. anyways last week I implemented some JQuery U.I. features to my app: http://docs.jquery.com/UI/Accordion and today I wanted to fi

Re: Tool for MYSQL status

2009-03-03 Thread Brendon Kozlowski
MONyog might also be a possibility: http://webyog.com/en/monyog_feature_list.php On Mar 2, 7:03 pm, Tomás Laureano Peralta Tormey wrote: > On Mon, Mar 2, 2009 at 4:50 PM, nicknickoli wrote: > > > Hi Could anyone recommend a visual tool for checking mysql's memory > > health? > >  I use MySQL ad

Re: Multiple javascripts calls issue

2009-03-03 Thread Dr. Loboto
jQuery and prototype CAN work together with two steps: 1. Call jQuery.noConflict() just after jQuery include. 2. Use jQuery(...) instead of $(...) for all jQuery calls. http://docs.jquery.com/Using_jQuery_with_Other_Libraries But the main question is why do you want to use them both? Any of them

Re: Multiple javascripts calls issue

2009-03-03 Thread Stu
So I think I've come to understand that Jquery and prototype will not work together, does anyone know how to recreate Ajax links using J Query? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post

Re: Official Resources gone?

2009-03-03 Thread AD7six
On Mar 3, 1:33 am, "supp...@savant.be" wrote: > On the welcome Page of this group, there is a link to official > resources (within the group). However, clicking the link brings me to > a page saying that access is denied unless I am a manager of the > group. Just wondering what may have been th

Re: Best practise for use XML with XSL

2009-03-03 Thread byqsri
Have someone some documentation or valid link to suggest ot me? On Feb 3, 1:04 pm, "marco.rizze...@gmail.com" wrote: > Hi > I have Cake 1.2 installed. > Now I have some xml view that I would use with someXSL. > What is the best practise to do it? --~--~-~--~~~---~--~-

Cake bake command on Ubuntu 8.04

2009-03-03 Thread Yogesh
Hi All, I have created a database, and I want to run the cake bake command on Ubuntu 8.04 I don't know anything about cake bake command neither on Windows nor on any linux platform Can anyone please help from start to end to run Cake Bake command ? I don't know any anything about this method. T

HABTM query with conditions - HELP

2009-03-03 Thread foldiman
I've successfully setup a HABTM relationship between two models, `Club` and `Music`. When I want to add a new club, I do the following in the Clubs controller: $this->set('musics', $this->Club->Music->find('list')); Like magic my admin_add view for Clubs displays a series of checkboxes with a li

Re: What do you develop in (ide, text editor, etc.)?

2009-03-03 Thread alagar
Eclipse with PDT On Mar 1, 11:35 pm, Samuel DeVore wrote: > a tutu and go go boots > > On Sun, Mar 1, 2009 at 12:34 PM, Tomás Laureano Peralta Tormey > > wrote: > >  Currently using NetBeans 6.5. The hints from this bakery article [1] were > > really useful. > >  Hopefully, better support for C

Re: Accented character in a TextArea

2009-03-03 Thread whitewolf
Thank you very much. It has been the encoding. Good intuition doc. On 3 Mar, 09:55, "dr. Hannibal Lecter" wrote: > Encoding is probably the problem. Try the following: > > http://dsi.vozibrale.com/articles/view/cakephp-character-encoding-spe... > > On Mar 2, 10:47 am, whitewolf wrote: > > > Hi

Email component with smtp error: 503

2009-03-03 Thread remy
Hello all, I'm trying to get the Email component to work with smtp. I'm using the right smtpOptions for the server, but I keep receiving the error: 503 AUTH command used when not advertised Can I anyone tell me what I do wrong and what the error means? I can't find any solution on the cake site

Re: customizing foreign key constraint error

2009-03-03 Thread krishan
On Mar 2, 11:25 pm, mscdex wrote: > I usually do this sort of checking in the model validation or in the > delete controller action before the deletion is attempted. Something > like a find('count') or similar method to to check if the ID of the > record to be deleted exists in a FK in some ot

undetermined recursion

2009-03-03 Thread el_sime
hello, i'm experimenting with models relationships with a blog sample application. Post hasMany Comment and Comment hasMany Comments i.e. replies. In order to retrieve all posts with relative comments and replies to comments i should set $recursive = x, not knowing the depth of the replies. Exampl

Re: Captcha reload problem, works in ff not in IE

2009-03-03 Thread iraj23
lots of thanks for your reply Dr. Loboto i saw over the internet that we can do this with IE7 and Java (blocking CAPTCHA with IE 7) but i did not find it now i need it i want block 1 captcha that means when i reload the image i see again the similar captcha again and again i want this for visi

Re: What do you develop in (ide, text editor, etc.)?

2009-03-03 Thread Cengiz Eselioglu
Aptana Studio + PHP Plugin Preferences->Editor->FileAssociations add *.ctp (PHP + HTML + CSS + JS code style) add *.thtml (PHP + HTML + CSS + JS code style) it's cool editor... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

routing rpoblem

2009-03-03 Thread Sensible
Hi, I want help on routing. I want my url with .html extension. Is it possible. Currently my url : http://www.example.com/Categories/categoryindex/70 Controller:Categories Action: categoryindex category_id: 70 (Which is flower) But i want my url to be look like: http://www.example.com/flowe

Multiple javascripts calls issue

2009-03-03 Thread Stu
Ok, today I have decided to add nice ajax links so that my app seem more clean and friendly. Although I'm experiencing something weird while trying to call my javascripts from my 'default' layout: this is what I do: $javascript->link(array('script1', 'script2', 'script3', 'script4')); script 1

Re: Automatic JavaScript Validation for select box

2009-03-03 Thread Matt Curry
Hey kaushik, I wrote the validation helper that you're using (at least I'm guessing it's the same one). I don't think "allowEmpty" is a rule. If you look at the Cookbook (http://book.cakephp.org/view/134/Built-in-Validation-Rules) it's not listed (although it may just not be updated). I think "

Help with left join

2009-03-03 Thread Henrik Gemal
Hi I'm having a little problem with converting an old sql request to use cakephp. The sql is: select name, if(module_id is null,0,1) activated from module left join active_modules on (id = module_id and res_id = $id) I have something like: var $useTable = "modules"; var $be

Re: Find max(id)

2009-03-03 Thread Adam Royle
Oh right I see what it's doing now. I would say that it's a bug then. CakePHP should not generate invalid SQL queries. Although I'm pretty sure Cake adds the id field to the field list because it is required for recursively finding associated records, it could prob be modified to always add the

Re: Find max(id)

2009-03-03 Thread blake
I don't think its a bug, I think its more of the way Cake generates queries. Even though the Model.id field was not specified in the find (), Cake includes it in the select anyway. MS SQL complains about the GROUP BY when you don't also include Model.id in the group, since it is being selected. I'

Re: file validation

2009-03-03 Thread sijo jose
Well Kaushik I have done my part of validation in controller. The following site would be helpful in that matter http://www.keithmedlin.com/2008/01/cakephp-12-file-upload/ http://cakebaker.wordpress.com/2006/04/15/file-upload-with-cakephp/ http://cakebaker.42dh.com/2006/04/15/file-upload-with-cak

Automatic JavaScript Validation for select box

2009-03-03 Thread kaushik
I am using Automatic JavaScript Validation. For a mandatory select box, i am using the following code: var $validate = array( 'blogCategoryId' => array( 'required' => array('rule' =>array ('allowEmpty',false), 'message'=>'Please select Blog Category.'), ),

search issues for multiple checkboxes

2009-03-03 Thread Maulik
hi to all, how can i perform searching by selecting multiple checkboxes. thanks for reply in advance, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@goog

Re: how to use template in email

2009-03-03 Thread dr. Hannibal Lecter
Here is a simple step by step guide: http://dsi.vozibrale.com/articles/view/using-emailcomponent-in-cakephp-1-2 Hope that helps! On Mar 3, 11:36 am, vikas wrote: > Hello every one.. > > I am trying to use inbuilt email component of cakephp to send email. > > In article given atwww.cakephp.org

how to use template in email

2009-03-03 Thread vikas
Hello every one.. I am trying to use inbuilt email component of cakephp to send email. In article given at www.cakephp.org (http://book.cakephp.org/view/270/Class-Attributes-and-Variables) we can set some values: in that they have given: template- The email element to use for the message

Re: One directory for all view files.

2009-03-03 Thread Adam Royle
Yes, CakePHP has a separate folder for each controllers views, but I would imagine if you had a ton of controllers you might want to separate them anyway? I recommend you stick with the conventions to start with, and further down the track if you still want to change it, you'll find a way. Che

One directory for all view files.

2009-03-03 Thread lakers fan
Hello, Can I create all the view files inside one directory. Right now what I understood is you got to create a folder named after controller. if I have many controllers, does it mean that I have to create that many folders for view files? Thanks, Bharani __

file validation

2009-03-03 Thread kaushik
I want to set a system where file uploading is must and i also want to check the extension of file. Is it possible to arrange the validation from model or I have to check from controller. Can anyone give any idea? --~--~-~--~~~---~--~~ You received this message bec

Re: Accented character in a TextArea

2009-03-03 Thread dr. Hannibal Lecter
Encoding is probably the problem. Try the following: http://dsi.vozibrale.com/articles/view/cakephp-character-encoding-special-characters On Mar 2, 10:47 am, whitewolf wrote: > Hi guys, > I'm new with CakePhp, > I have my first hurdle with my pratical excercise. > When i try to fill one textare

Re: Captcha reload problem, works in ff not in IE

2009-03-03 Thread Dr. Loboto
Add any random URL param to captcha image request. Different URL is the only 100% bullet-proof method to force IE make new request always. On Mar 3, 12:16 am, iraj23 wrote: > Hi > i need this problem that means i want when i reload image(captcha) i will > see the similar image > i want reload on

  1   2   >