Do i understand the concept of ajax correctly ?

2008-05-15 Thread salimk786
Hello, I am using jquery and cakephp. I wrote some info on this link. Can you pls tell me if this is the right way to do it ? or if there is a better way ? http://pastebin.com/m247e9d3d Thanks Salim. --~--~-~--~~~---~--~~ You received this message because you

Reverse routing and index action

2008-05-15 Thread Marcelius
Hi Is it possible to make the reverse routing work so that it doesn't add an index action to the url? For example: //In routes.php: Router::connect('/contact/:action/*', array('controller' = 'contacts')); //in some other file: $url = Helper::url(array(controller=contacts)); $url now contains

Re: Reverse routing and index action

2008-05-15 Thread Amit Badkas
On Thu, May 15, 2008 at 12:18 PM, Marcelius [EMAIL PROTECTED] wrote: Hi Is it possible to make the reverse routing work so that it doesn't add an index action to the url? For example: //In routes.php: Router::connect('/contact/:action/*', array('controller' = 'contacts')); - Before

Re: Reverse routing and index action

2008-05-15 Thread Marcelius
Wy is it so damn simple :-p Thanks! Amit Badkas schreef: On Thu, May 15, 2008 at 12:18 PM, Marcelius [EMAIL PROTECTED] wrote: Hi Is it possible to make the reverse routing work so that it doesn't add an index action to the url? For example: //In routes.php:

Form posting with type=get

2008-05-15 Thread Marcelius
Hi! The situation: //in some view I have: ?php echo $form-create(array(controller=search, action=index)); echo $form-input(Region.region_name); echo $form-end(); ? Straight forward, nothing to it... Now I want to post data via GET. Cake doesn't have to worry about handling the 'posted' data

Security::__validatePost blackholes array-fields, is this bug or desired behavior?

2008-05-15 Thread [EMAIL PROTECTED]
The security component validates the allowed fields in a post. What I was wondering is wether it really should validate (and blackhole) fields in fields in fields the way it does at present? Say a model has these fields: User id -int prefs - blob password - varchar In this case the

ACL in oracle?

2008-05-15 Thread Nameroc
I'm trying to use the command cake acl initdb to set up ACL tables in an oracle system, but my queries are returning errors because apparently acos and alias are keywords in oracle. Is there any way I can use acl short of renaming every bad field to something acceptable by oracle?

Re: Ajax form submission

2008-05-15 Thread francky06l
Ajax would have very little differences in your mailing list registration, - some in the (view) submission form - none in model - none in comtroller (maybe the add of request handler) - some helpers such as javascript and ajax I think this is very close to a user registration, and there are

is there a way to know if I'm updating or creating a record inside beforeSave() ?

2008-05-15 Thread MarcS
I'm wondering if there is any way that I can know if I'm updating or deleting when I'm inside the beforeSave function afterSave has the $created parameter. But beforeSave doesn't have this. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: is there a way to know if I'm updating or creating a record inside beforeSave() ?

2008-05-15 Thread Amit Badkas
On Thu, May 15, 2008 at 5:12 PM, MarcS [EMAIL PROTECTED] wrote: I'm wondering if there is any way that I can know if I'm updating or deleting when I'm inside the beforeSave function - If $this-id (in model's beforeSave() callback) is false then you are creating record otherwise it has id of

Re: is there a way to know if I'm updating or creating a record inside beforeSave() ?

2008-05-15 Thread grigri
I'm wondering if there is any way that I can know if I'm updating or deleting when I'm inside the beforeSave function Assuming you meant updating or creating... function beforeSave() { if ($this-exists()) { // It's an update } else { // It's a create } }

Re: is there a way to know if I'm updating or creating a record inside beforeSave() ?

2008-05-15 Thread Marc Schuetze
thanks, I guess I should've come up with that one myself. Stupid question :) On Thu, May 15, 2008 at 1:05 PM, grigri [EMAIL PROTECTED] wrote: I'm wondering if there is any way that I can know if I'm updating or deleting when I'm inside the beforeSave function Assuming you meant updating or

Re: ACL in oracle?

2008-05-15 Thread Sliv
There's an open ticket about this, the guy you want to talk to is phishy (Jeff Loiselle) http://jeff.loiselles.com/wordpress/ : https://trac.cakephp.org/ticket/2024 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: is there a way to know if I'm updating or creating a record inside beforeSave() ?

2008-05-15 Thread grigri
- If $this-id (in model's beforeSave() callback) is false then you are creating record otherwise it has id of record which will be getting updated Although generally true, this is not always the case. If you specify the primary key, but that record does not exist, it will be an insert, but the

Re: Strange query being generated by CakePHP

2008-05-15 Thread TracyB
Alright - I was unable to check this at all last night, so I'll try to answer all the questions in one go here: The $design configuration is: var $design = array( 'persistent' = false, 'driver' = 'adodb', 'connect' = 'mssql',

Re: Strange query being generated by CakePHP

2008-05-15 Thread TracyB
I added that little code snippet to the adodb file, and the query is no longer all screwy :) thanks so much for your help. Tracy On May 14, 6:51 pm, egi [EMAIL PROTECTED] wrote: if you're using adodb for database connection, i have filed the error on

Re: shared servers and absolute paths

2008-05-15 Thread Roon
thanks for your suggestions.. turns out it was an htacces config RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L] --- RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] note the '/' before the index.php On May 14, 9:48 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: did you replace the 'app'

Re: 1.2 Validation Question

2008-05-15 Thread James K
Yup, you've got it right. The only improvement would be that you don't need to give an index for each of the rules under zip. var $validate = array( 'zip' = array( array( 'rule' = array('postal', null, 'us'), 'message' = 'Must be a valid

Re: Routing for plugins: good idea, no implementation

2008-05-15 Thread [EMAIL PROTECTED]
I had a go at altering dispatcher.php to enable this functionality. It is a bit of a mess but it does work for me using naming conventions from the documentation. I have not been able to create a good test- case for it. Also, you would probably need to change little things here and there to

Re: Routing for plugins: good idea, no implementation

2008-05-15 Thread [EMAIL PROTECTED]
After playing around a bit more I'd say my second way would be preferable since it tricks methods like url() to use the pretty controller name. It seems to work fine for me so far. on line 556 I have simply added an elseif. See the ticket or: if (App::import('Controller', $pluginPath .

Re: Wordpress CakePHP

2008-05-15 Thread salimk786
I believe there is already a plugin in wordpress that does this. If not, it wouldn't be too hard to do what you want. On May 15, 3:28 am, Abhimanyu Grover [EMAIL PROTECTED] wrote: Looks like I have to do the same thing in coming days for a new project. On May 12, 4:37 pm, darkblack [EMAIL

Associations and queries using 2 models

2008-05-15 Thread Nicolás Andrade
Hello to all. I would like to share with you a problem I'm having and I need your suggestions. We have the following models: Video, Album, Artist. Video and Album are not relationed using HABTM; but Video hasMany AlbumVideo; AlbumVideo hasMany Albums. AlbumVideo has an Order field to sort

Renamed Controller Issues

2008-05-15 Thread benjam
I have a section of my site called 'Ask Vinny' and I would like the URL to look something like mysite.com/vinny (not mysite.com/vinnies) so I renamed the controller and moved the views into the vinny/ dir, and it works fine, except that when submitting the 'ask question' form ( @ vinny/ask), it

Submitting an ajax form using a drop down list

2008-05-15 Thread Dovdimus Prime
Hi all I've got a ajax-form with buttons on it which submit the form just fine and produce the expected behaviour. I've just added a drop down list (i.e. select element) to the form and tried to get its onchange event to submit the form using: onchange = submit(); However, I find that

Re: Renamed Controller Issues

2008-05-15 Thread Joel Perras
http://book.cakephp.org/view/39/configuration#routes-configuration-46 -Joel. On May 15, 11:18 am, benjam [EMAIL PROTECTED] wrote: I have a section of my site called 'Ask Vinny' and I would like the URL to look something like mysite.com/vinny (not mysite.com/vinnies) so I renamed the

Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
Hi All, I'm building a CakePHP app for tracking clinic patients, their visits, their symptoms and questionnaire answers. The barrier I've encountered is that each patient has many visits AND many symptoms. I want to view the patient record and their aggregate visits and symptoms. I've defined a

Re: Defining more than one hasMany relationship

2008-05-15 Thread Dovdimus Prime
Have you checked that: $patient['M5Symptom'] is the correct way of referencing the array of symptoms within the patients array? I've not checked, but often Cake puts model results in an array like this: Patient array: array([0] = array('M5Symptom' = array of all the symptoms... What I mean

Re: Submitting an ajax form using a drop down list

2008-05-15 Thread francky06l
Maybe you should do an obverseField and use Form.serialize as with parameter? On May 15, 6:15 pm, Dovdimus Prime [EMAIL PROTECTED] wrote: Hi all I've got a ajax-form with buttons on it which submit the form just fine and produce the expected behaviour. I've just added a drop down list

Re: Defining more than one hasMany relationship

2008-05-15 Thread Dovdimus Prime
Yep: 'undefined index' definitely means you're not referencing your part of the patients array properly. The problem may well be nothing to do with the associations in your model. Use print_r to look at the array you're passing into the view. David

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
print_r($patient['M5Symptom']) results in the expected list of symptoms: Array ( [0] = Array ( [id] = 19 [patient_id] = 5007 [symptom] = Stuffy Nose [start_date] = 12/18/2006 [end_date] = 12/21/2006 [severity] =

Re: Defining more than one hasMany relationship

2008-05-15 Thread [EMAIL PROTECTED]
Hi Tony, What do you have in the $patient variable when you debug it? debug($patient) /Martin On May 15, 5:37 pm, Tony Thomas [EMAIL PROTECTED] wrote: Hi All, I'm building a CakePHP app for tracking clinic patients, their visits, their symptoms and questionnaire answers. The barrier I've

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
debug($patient) produces: Array ( [Patient] = Array ( [id] = 5007 [med_hist_id] = 0 [gender] = M [st_of_birth] = [redacted] [st_of_res] = [redacted] [res_length] = 11 yrs [cntry_of_origin] = U.S.

Paginator and subdirectory

2008-05-15 Thread b logica
I'm having some difficulty figuring out how to make pagination links use the path I need. I have a model, Members, for which the index lists all members and requires pagination. However, the client insists on putting this in a directory named membership, the index page of which is actually other

Re: Paginator and subdirectory

2008-05-15 Thread b logica
Yeah, I forgot to mention that I tried: $paginator-next('Next', array('url' =array('/membership/members'))); with similar result. This is really unfortunate :-/ On Thu, May 15, 2008 at 3:30 PM, Nicolás Andrade [EMAIL PROTECTED] wrote: I'm having a similar problem with paginator too. In

Re: Paginator and subdirectory

2008-05-15 Thread Nicolás Andrade
I'm having a similar problem with paginator too. In view, I've : echo $paginator-prev(' Prev', array('url' = array('name' = $SearchFor)), null, array('class'='disabled')); I expect it to link to /admin/artists/page:1/name:SEARCHSTRING but instead of this, it links to:

Class diagram (MVC)

2008-05-15 Thread dandreta
Hi! I am developing my web application with cake, but I need to deliver the diagram of classes of the application with the Model-View- Controller that uses. I have been searching very much but I do not find anything of help. If someone can say me any link or something i will great. Thanks and

Re: Renamed Controller Issues

2008-05-15 Thread benjam
That's a big help, but not enough to fix the issue. In fact just the opposite. I'm not trying to adjust the controller to the URL, I'm trying to adjust the URL in the controller. The issue I'm having is when I tell Cake that I want to use the 'Vinny' Controller, it runs off and grabs

Re: Renamed Controller Issues

2008-05-15 Thread Jonathan Snook
On Thu, May 15, 2008 at 4:00 PM, benjam [EMAIL PROTECTED] wrote: That's a big help, but not enough to fix the issue. In fact just the opposite. I'm not trying to adjust the controller to the URL, I'm trying to adjust the URL in the controller. The issue I'm having is when I tell Cake that

Caching System with Language in the file name

2008-05-15 Thread foxmask
Hi, as CakePHP is able to detect the language of the visitor on the website, i would like to use the cache and put the language in front of the cache filename like this : tmp/cache/views/fre_articles_index.php actually i have tmp/cache/views/_articles_index.php What happens actuallay ? when

Re: Paginator and subdirectory

2008-05-15 Thread Nicolás Andrade
To solve my issue, I've added the following lines: if(strpos($url['action'], Configure::read('Routing.admin') . '_') !== false){ $url['action'] = str_replace(Configure::read('Routing.admin') . '_' , '', $url['action']); } in

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
OK, some additional information. (I apologize, because I think this is getting into PHP territory and may not be specifically related to CakePHP.) If I place debug($patient) before the first foreach loop (for 'Visit'), I get the arrays as below. If I place it after the foreach loop I get the

Re: Class diagram (MVC)

2008-05-15 Thread Marcelius
Just curious, If you've created some app with cake, you could think of a mvc diagram yourself I think :-) Just think of how you work with it... You create a controller that extends from some other class, you can reference a model from that controller (which also extends from some other class),

Data validation problem

2008-05-15 Thread Wojtek
I have a problem with validating data without saveing anything in database. For example this script work good if ($this-Post-save($this-data)) { $this-flash('blabla.','/posts'); } but when I use some my function form is not validating if

Re: Class diagram (MVC)

2008-05-15 Thread Juan Miguel Paredes
On Fri, May 16, 2008 at 3:28 PM, dandreta [EMAIL PROTECTED] wrote: Hi! I am developing my web application with cake, but I need to deliver the diagram of classes of the application with the Model-View- Controller that uses. I have been searching very much but I do not find anything of help.

Re: Paginator and subdirectory

2008-05-15 Thread Chris Hartjes
On Thu, May 15, 2008 at 4:32 PM, Nicolás Andrade [EMAIL PROTECTED] wrote: To solve my issue, I've added the following lines: if(strpos($url['action'], Configure::read('Routing.admin') . '_') !== false){ $url['action'] =

Re: Status Update on Cake 1.2 and Call to Action

2008-05-15 Thread nate
Ping! Thanks to all the people who have helped out so far. Just as a final warning, in less than 48 hours all enhancements for 1.2 will be frozen, and any/all tickets without patches will either be closed or punted on until a future version, which means you probably won't see them in the core

Re: Defining more than one hasMany relationship

2008-05-15 Thread Dovdimus Prime
Are you saying that this foreach loop is modifying the contents of the array? --~--~-~--~~~---~--~~ 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

Re: Defining more than one hasMany relationship

2008-05-15 Thread Tony Thomas
Thanks for all of the help. The tips I got pointed me in the right direction. Once I changed my foreach loops to while (list($key, $value) = each($patient['Visit'])) and while (list($key, $value) = each($patient['M5Symptoms'])) respectively, my data appeared. I figured this out once I realized

Re: Very Big Problem (I think) in HABTM with finderQuery

2008-05-15 Thread [EMAIL PROTECTED]
is there somebody can help me? On 14 Mag, 15:13, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I use cake 1.2 With cake 1.1.13 it works On 14 Mag, 09:37, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I try the blog tutorial in cake and all works fine. Then I have add the model Tag(with its

Re: Renamed Controller Issues

2008-05-15 Thread benjam
Yeah, I tried all of those, and none of them were working for me, but I noticed further down on the page in the link that was supplied by Joel that there was a section called Custom Inflections, and so I edited /config/inflections and added 'vinny' to the $uninflectedPlural var. It works now,

Re: Paginator and subdirectory

2008-05-15 Thread b logica
Speaking of generic, I'm wondering if Nicolás' bug is more of an admin routing one or something specific to pagination/routing. IOW, I still don't know if what I want to do has an existing solution or I need to hack Router as well. For the moment, I'm rolling my own pagination but I'd really

Re: Paginator and subdirectory

2008-05-15 Thread Nicolás Andrade
I would like to see each php code and the resulting HTML link, if possible. It might help us to help you. On Thu, May 15, 2008 at 6:36 PM, b logica [EMAIL PROTECTED] wrote: Speaking of generic, I'm wondering if Nicolás' bug is more of an admin routing one or something specific to

Re: Status Update on Cake 1.2 and Call to Action

2008-05-15 Thread francky06l
Thanks nate for the reminder ... I do my best tomorrow and day after (I am about 8 hours ahead here, but was away before) ... Thanks all core team On May 15, 11:01 pm, nate [EMAIL PROTECTED] wrote: Ping! Thanks to all the people who have helped out so far. Just as a final warning, in less

Re: Paginator and subdirectory

2008-05-15 Thread b logica
There's not much to show. All I want to do is prepend '/membership/' to all members routes. This works fine: Router::connect('/membership/members', array('controller' = 'members', 'action' = 'index')); MembersController: var $paginate = array( 'url' = array('/membership/members'),

Pretty urls not working

2008-05-15 Thread Markitusss
Hi all, I've been trying to run cake on a godaddy hosting service. mod_rewrite is not available, so I set up cake to use its Pretty URLs, by uncommenting the line inside core.php and by deleting .htaccess files. I got the index page to perfectly, with CSS styling and connection to the database,

Re: Caching System with Language in the file name

2008-05-15 Thread francky06l
Well, I have solved this in another way, but depends if you know the languages you are handling .. I mean, I have applications in production, that are supporting up to 3 languages. In such case, it's quite easy, you define 1 cache config per language (ie: en_conf, fre_cong, ru_conf). Then in all

Re: Do i understand the concept of ajax correctly ?

2008-05-15 Thread the_woodsman
I believe you can use the RequestHandler (?) component to automatically check for an AJAX request, and disable layouts based on that, so you can eliminate your $layout=false. Just include the RequestHandler component, and you can also call its isAjax() method to check for yourself. I also think

Newcomer with feedback and question with a concern

2008-05-15 Thread Jason Carlson
Old time programmer (since 1979) and fan of PHP (since '97) who decided to venture out and see what all the fussing over the OS frameworks was all about. I was enticed by a PHP Magazine article on CakePHP and after reading a lot of the pros and cons of different frameworks this seemed like the

Session - security.level=high - clsing browser

2008-05-15 Thread Caroz
Hi all, I have been looking around for a while now without finding a solution to my problem and it is driving me nuts... I have a website build with Cake 1.2... I have somewhere a request that take a bit of time, more than 2 seconds anyway. In addition I have a AJAX periodical observer running.

Re: installing cakephp on a subdomain

2008-05-15 Thread jason m
There are many different server configurations and I too have had problems installing cakephp. I guess the first step would be to see if php is working. You could do that by placing a php file there with the code ?php phpinfo(); ?. That should print out a bunch of your php settings. If you

HABTM 'with' relationship delete() question

2008-05-15 Thread EchoChargen
All - I'm trying to wrap my brain around the HABTM 'with' or 'auto- with' (I've seen this term?) relationship. I think I've got it to a degree, but I need some help. I have the following: Site hasOne Prospectingplaylist (dependent = true) Prospectingplaylist belongsTo Site Prospectingplaylist

Re: Caching System with Language in the file name

2008-05-15 Thread foxmask
Hi Francky, no i dont know it depends on the visitors. but i am always interesting in any idea to reach my goal ;) regards. On 16 mai, 01:41, francky06l [EMAIL PROTECTED] wrote: Well, I have solved this in another way, but depends if you know the languages you are handling .. I mean, I have