Re: Helper for Imagemap Links?

2006-05-17 Thread Armando Sosa
try $html->url('controller/action');On 5/17/06, Scott Sharkey <[EMAIL PROTECTED]> wrote: Hi All,Stupid question, but I didn't find it anywhere on the docs.  Is there a helper that will generate the links for inclusion in an imagemap?  Or,alternatively, is there a way to determine the "home page" of

Re: AJAX Forms

2006-05-17 Thread [EMAIL PROTECTED]
I hadn't looked at the manual yet. I suspected using the RequestHandler. The thing is the form does work with javascript disabled. But if you enable Javascript and disable ActiveX in IE it doesn't work. Weird behavior. I will try to rework it from the ground up like you say. Make it work fir

Re: How to Get Javascript Returned Data to Controller for Database Entry?

2006-05-17 Thread Reggie
I'm trying to use Ajax to get that done. I can build a string of name/value pairs that I can pass. What I'd really like to do is somthing like this: $ajax->submit('Submit Changes', array('url'=>'updateMedalOrder(getGroupOrder())', 'update'=>'medaltable')); where getGroupOrder() is the name of

Saving related model data

2006-05-17 Thread Langdon Stevenson
Could someone please confirm for me that when I save a record, I must explicitly save data from any associated models as well? (Meaning that associated models are not automatically saved by Cake) For instance I am working on and in my "Plan" model/controller. On one input screen I add a "Feedb

Helper for Imagemap Links?

2006-05-17 Thread Scott Sharkey
Hi All, Stupid question, but I didn't find it anywhere on the docs. Is there a helper that will generate the links for inclusion in an imagemap? Or, alternatively, is there a way to determine the "home page" of the web site somehow programmatically, so I can build my own paths? Ideally, ther

Re: strage issue: CakeSession lost only in Safari

2006-05-17 Thread Martin
I have tried setting both medium and low with no change. Continuing on the session hacking side of things... I logged the UA string that cakes session uses and the funny thing is that as with all other things I have looked at: Nothing is different between Safari and Firefox. Same output in the lo

Document Management System with CakePHP

2006-05-17 Thread AskPIT
Hi, just want to find out if CakePHP is capable of developing a DMS like "KnowledgeTree"? I am currently evaluating Symfony and CakePHP. I feel CakePHP is more suitable now since they got ACL built-in. Symfony on the other hand, uses configuration files and I dont know if it is possible to do fine

findall-problem with condition on child table

2006-05-17 Thread Andy232
Hi, I have a Model "Media" which hasmany "Files". I wan to to fetch all records with files that are public. So in my mediacontroller I call: $conditions = array("File.public" => "1"); $this->recursive = 5; $this->set('data', $this->Medium->findAll($conditions)); But I get the error: SQL Error i

Building select option list

2006-05-17 Thread Gonçalo Marrafa
Is there a way to build (only) the options list of a select tag, without using the selectTag() method of HTML helper? Like: selectOptions($options) ?> where $options is a $key=>$value array? Thanks in advance. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~--

Re: How to Get Javascript Returned Data to Controller for Database Entry?

2006-05-17 Thread John David Anderson (_psychic_)
Well, you can use GET or POST to send data to your application: GET might be easiest: So [id]:[some_number] Needs to somehow end up as a request to /controller/action?id=some_number And inside the controller, you're data will show up as $this->params['url']['id'] (which would be equal to

Re: Using a Model in a Layout or Helper

2006-05-17 Thread gwoo
put it in your custom AppController --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMA

How to Get Javascript Returned Data to Controller for Database Entry?

2006-05-17 Thread Reggie Johnson
Sorry for the long title, but I wanted to make it would make it easy to search for in the future. I have a view which has a button that calls a javascript function once it's clicked using "onclick=functionFoo". The javascript function manipulates some data and returns an string in the form of [id

Re: strage issue: CakeSession lost only in Safari

2006-05-17 Thread gwoo
what security level are you on in /app/config/core.php? try setting it to medium and see if that helps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@

Re: AJAX Forms

2006-05-17 Thread Olivier percebois-Garve
Have you seen that new (to me) page of the manual: The Request Handler Component http://manual.cakephp.org/chapter/15 [EMAIL PROTECTED] wrote: Okay. I know vBulletin uses AJAX to handle it's Quick Reply forms which are AJAX submitted forms. What I am wanting to know is how they degrade th

Re: Prime form with current DB values?

2006-05-17 Thread GregL
Aha! Thanks for the pointer. Like someone said elsewhere in the group, "so fast, and so right". I've gone through the blog tutorial before, but during my own implementation, I made a goof. I install the current user's ID in the session, and when I want to get the current user for populating the f

Re: AJAX Forms

2006-05-17 Thread Martin
The trick is to make the thing work without javascript first and then make the onClick (and other) handlers replace "normal" browser behavior. In it's simplest form this involves making sure all href values do real html things that work without javascript and then making the onclick for those link

Re: strage issue: CakeSession lost only in Safari

2006-05-17 Thread Martin
OK, thanks. That is good info on where I can look further. The detail I find the most strange is that it is on the page containing the applet that the SID value is empty. This page is loaded from the server before the browser then requests the applet which in turn loads its files. I'll take a lo

Re: Google Web Toolkit - Easy AJAX for CakePHP?

2006-05-17 Thread Jason Lee
On 5/17/06, sudonim <[EMAIL PROTECTED]> wrote: > Im a newcomer to cake and spend way more time than I should reading /. > and digg. There is an article today on slashdot that links to a new > google framework for ajax - http://code.google.com/webtoolkit . How > does something like this fit in to C

Google Web Toolkit - Easy AJAX for CakePHP?

2006-05-17 Thread sudonim
Im a newcomer to cake and spend way more time than I should reading /. and digg. There is an article today on slashdot that links to a new google framework for ajax - http://code.google.com/webtoolkit . How does something like this fit in to CakePHP? Is this a great way to handle building AJAX int

Re: HABTM and join-table selections

2006-05-17 Thread DJ Spark
found a typo: 'associationForeignKey'=> 't_objecti_id', that key doesn't exist, right ? spark! On 5/17/06, Kenn <[EMAIL PROTECTED]> wrote: > > Hi all, I'm using Cake with PHP5 for two weeks now and i find it useful > but I have a problem : > I have three tables which are : > > - t_

Using a Model in a Layout or Helper

2006-05-17 Thread [EMAIL PROTECTED]
Hi There, is it possible to use a Model in a Helper or somehow in a Layout(which would not be very elegant) without putting it into $uses in each controller? I need this for a shopping cart which is being displayed on each page, no matter which controller is being used. -Tobi --~--~

Re: Some errors with scaffolding

2006-05-17 Thread davide
davide wrote: > What can I do? Should I have to open a bug? Can someone try to verify if > he has the same error? Problem solved. I've removed mysql, apache2, php and installed xampp for windows in the version 1.4.16. What is drastically changed is the php version: from 4.3.10 to 5.0.5. Thanks a

Re: hasMany and displaying in a view

2006-05-17 Thread Chris
What I ended up with was pretty close to what you proposed: foreach( $data['User'] as $user ) { echo $html->link( $user['username'], "/users/view/{$user['id']}" ) . ""; } With CakePHP it always seems like the solution is simpler than I think it will be. --~--~-~--~~~

Re: strage issue: CakeSession lost only in Safari

2006-05-17 Thread Federico
> The strange problem is that my Cake application looses its session > (effectively logs the user out) on "pages" where a java applet is > embeded... but only in Safari AFAIKT Hi Martin, I think that this is due to the fact that Safari sends a certain UserAgent header when requesting "regular"

Re: hasMany and displaying in a view

2006-05-17 Thread Chris
Your'e right, debug() immediately showed one error. No users showing up yet but this is definitely a step closer - thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, sen

Inflections with scaffold

2006-05-17 Thread Gonçalo Marrafa
Hi. I'm trying to use scaffold with non english controller and model names. My problem right now is that the scaffold class can't find the correct model for my controller. I've tried the controller's $uses var with no luck! Then i looked at inflector.php. I guess i can specify in the rules to ma

HABTM and join-table selections

2006-05-17 Thread Kenn
Hi all, I'm using Cake with PHP5 for two weeks now and i find it useful but I have a problem : I have three tables which are : - t_rules(t_rule_id, desc) which contains some general coding rules - t_objectives (t_objective_id, desc) which contains objectives of rules - t_ruleobjectives (t_rule_id

Re: Prime form with current DB values?

2006-05-17 Thread AD7six
Hi GregL, Assuming you are using the html helper: It´s all in the name of the input field name ;) have a look at http://wiki.cakephp.org/tutorials:blog_tutorial_-_1#edit_a_post, the form field names are called with "ModelName/FieldName" as the first parameter, the html helper is populated with

Re: Automatically generating 's?

2006-05-17 Thread AD7six
Great comments Siegried & brandbags, Personally I avoid tables like the plague, and welcome a css solution, espeically one as simple in principle as using floats, and which can be seen to look pretty damn good. :) AD7six --~--~-~--~~~---~--~~ You received this

Re: Ajax Sortable Tutorial?

2006-05-17 Thread Jon Bennett
> Thanks, that did it. I appreciate the help. no problem, perhaps you can now help me :) How are you manipulating the data once you've re-ordered it? I'm currently calling a javascript function from the onclick tag of a href: create playlist function doUpate () { // al

Re: hasMany and displaying in a view

2006-05-17 Thread Martin
Your best friend will soon become the debug() function. I use it all the time to find out how my data has been generated by cake. hasMany relationships are generated so that each "Country" also has an array of "User" containing its associated users. You don't have to make any special requests for

Re: Cache work?

2006-05-17 Thread [EMAIL PROTECTED]
I find error... ;-) First of all, of couse, error in my brain ;-) Second - in manual: '$cacheAction variable should be set to an array that contains the actions you want to be cached" It's not correct. NOT ACTIONS, but URLS! I trying to make cache work, but forget, about routes setting... "/",

Re: Some errors with scaffolding

2006-05-17 Thread davide
davide wrote: > - > Notice: Undefined property: primaryKey in > H:\www\multi-cake\cake\libs\view\templates\scaffolds\list.thtml on line 113 > > Notice: Undefined index: in > H:\www\multi-cake\cake\libs\view\templates\scaffolds\list.thtml on line 113 > View > Notice: Undefined property: primary

hasMany and displaying in a view

2006-05-17 Thread Chris
I just started using CakePHP and I'm a bit confused by how one would view a hasMany relationship. I have a model for Country and a model for User. Country hasMany Users, User belongsTo Country. In the view for the country I want to display all the users in that country - how do I access the User

strage issue: CakeSession lost only in Safari

2006-05-17 Thread Martin
Hi, I have been banging my head up against this problem for days now and I am not getting any wiser. I hope some one here has any ideas. The strange problem is that my Cake application looses its session (effectively logs the user out) on "pages" where a java applet is embeded... but only in Safa

Re: Automatically generating 's?

2006-05-17 Thread Siegfried Hirsch
2006/5/17, roberts.sean <[EMAIL PROTECTED]>: > > Ah HA, brilliant. I knew there was a better way of doing this. Thanks! I have used divs for the grid on http://seconds11.com. Every image div has its only width and heigth and this is inserted in a surrounding div, with the max width of the small