Introduction and System overview

2006-07-31 Thread aw029
Hello, I'am started using cake two weeks ago. I'am very happy, that I found a framework which gives me almost the same possibilities as RoR does, and which is, for the first time, easy to use. I'am very familiar to PHP and OOP and I can almost do erverything I like when I want to write a

datetime strings and using sanitize-cleanArray()

2006-07-31 Thread ianh
Hi all, I need to pass a datetime string from a form to be stored on the database as -MM-DD hh:mm:ss (i.e. datetime format in MySQL). I then put code to clean the $this-data array in the app_model to try to setup automatic cleaning of all saved data. What I found was that because

Re: datetime strings and using sanitize-cleanArray()

2006-07-31 Thread kitten
I then put code to clean the $this-data array in the app_model to try to setup automatic cleaning of all saved data. What I found was that because cleanArray() cleans everything without mercy, including html encoding on everything, it encoded the hyphens in teh datetime format (not the

Re: Switching Layouts

2006-07-31 Thread lorenzo
kdbdallas ha scritto: OK, I am hoping this is my last question, but no promises. :-) How do I tell a view in my controller to use a different layout. In my layouts DIR I have default.thtml and secondary.thtml. What do I put in the controller file to specifiy which layout to use? you can

selected items in HABTM multiple select

2006-07-31 Thread Olivier Percebois-Garve
Is there an elegant way to build the list of selected items to feed the $html-selectTag() in a HABTM relation ??I ended with for instance: $materials_selected_designations = array(); for($i=0; $i sizeof($this-params['data']['Material']); $i++){

cheeseCake Photoblog V1.0 Beta 2 released

2006-07-31 Thread Dr. Tarique Sani [EMAIL PROTECTED]
After a few bug fixes in the tagging system we are proud to release Beta 2 of the cheeseCake Photoblog V1.0 No new features were added (hey its a Beta! ) I would like to thank Vladislav Sournine for all the work he did on hunting the bugs down Download from:

Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan
Does anyone have any complete examples? I just can't seem to get this thing working. I'd also like to pass in the minChar variable - any chance of doing this? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: cheeseCake Photoblog V1.0 Beta 2 released

2006-07-31 Thread Chris Lamb
Tarique, Demo is at http://sanisoft-demo.com/cheesecake/ Looks nice! On a related note, we may be running out of 'cake' words for cake projects, so people should reserve them ASAP: [EMAIL PROTECTED]:~$ perl -ne print if /cake[^\'s]/ /usr/share/dict/words cake caked cheesecake coffeecake

Re: datetime strings and using sanitize-cleanArray()

2006-07-31 Thread Chris Lamb
On Mon, 31 Jul 2006 02:34:29 -0700 AD7six [EMAIL PROTECTED] wrote: Why use sanitize at all? Data sent to the DB get´s escaped anyway, so it´s not exactly necessary. I thought the intention of the sanitize class was for example, so you could still escape your custom sql queries easily. Well,

Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan
OK, I commented out the check for isAjax in the component and got it working - not sure why it's not Ajax but it is so it works. I'd still like to set the minChar, though - any thoughts? Thanks... --~--~-~--~~~---~--~~ You received this message because you are

Integrating Cake phpBB sessions

2006-07-31 Thread ax0rz
Hey! I'm having major trouble integrating the sessions between Cake phpBB2. 1) My phpBB2 installation is in /app/webroot/phpBB. 2) The DocumentRoot in httpd.conf is set to /app/webroot. I've tried accessing $_SESSION directly in /phpBB/login.php (ie- when the user logs in successfully,

Get a controller method from template

2006-07-31 Thread alepane
I have to get in a template some code generated from a controller (Lavoro). I have write: pspan class=dicituraCliente :/span ?php echo $this-controller-Lavoro-getLavoro(); ?/p But php return an error : Fatal error: Call to a member function on a non-object in

DBO MetaType Error

2006-07-31 Thread Dave Rogers
I am attempting to upgrade to the newest version of CakePHP from a beta version. I am using Oracle using dbo. When I run any route, I get the error: Fatal error: Call to a member function MetaType() on a non-object in ...\cake\libs\model\dbo\dbo_adodb.php on line 298 Does this ring a bell to

Re: Switching Layouts

2006-07-31 Thread nate
Actually it'd be more like this: if ($this-Session-check('layout')) { $this-layout = $this-Session-read('layout'); } but that's controller code. You should, however, still be able to use $this-layout in your view templates. --~--~-~--~~~---~--~~ You

Re: Integrating Cake phpBB sessions

2006-07-31 Thread nate
Either make sure you're setting session.auto_start in php.ini, or you're calling session_start( ) before trying to access $_SESSION. Also, Cake will only use $_SESSION to store session data if CAKE_SESSION_SAVE is set to 'php' in app/config/core.php.

Re: AJAX Autocomplete silently failing

2006-07-31 Thread nate
http://api.cakephp.org/class_ajax_helper.html#023c127898fec19debbb715010383935 You should be able to pass 'minChar' in the $options array. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to

Re: DBO MetaType Error

2006-07-31 Thread nate
Do you have ADOdb installed in /vendors? --~--~-~--~~~---~--~~ 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

Re: Big problems with cake getting confused between different DBs

2006-07-31 Thread [EMAIL PROTECTED]
Good advice. I'll try it. Thank you! --~--~-~--~~~---~--~~ 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

Re: Switching Layouts

2006-07-31 Thread lorenzo
nate ha scritto: but that's controller code. You should, however, still be able to use $this-layout in your view templates. Sure ... but is better in controller than in view ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Get a controller method from template

2006-07-31 Thread John David Anderson (_psychic_)
On Jul 31, 2006, at 9:06 AM, alepane wrote: I have to get in a template some code generated from a controller (Lavoro). I have write: pspan class=dicituraCliente :/span ?php echo $this-controller-Lavoro-getLavoro(); ?/p But php return an error : Fatal error: Call to a member function on

Re: DBO MetaType Error

2006-07-31 Thread Dave Rogers
nate wrote: Do you have ADOdb installed in /vendors? Yes. I have ADOdb installed in /vendors. It was working before I tried upgrading. Does the upgrade need to be a certain revision level? --Dave --~--~-~--~~~---~--~~ You received this message

Re: associations: SELECTs correctly but doesn't UPDATE

2006-07-31 Thread vtbludgeon
Grant Cox wrote: What you are doing (the commented out line) is a good way to do it.[...] Great. I just wanted to make sure I wasn't doing something wrong. The only thing to improve it would be to manually run the Judge-validates($this-data) and User-validates($this-data), before attempting

Validator and scaffolding

2006-07-31 Thread V
Hello! I have read in a post about the Validator script at http://www.webtest.wvu.edu/users/cbscharf/validator/, and given that I had some problems with the wiki's advanced validation w/ params (http://wiki.cakephp.org/tutorials:advanced_validation:advance_validation_with_parameters), I thought

hierarchical controllers

2006-07-31 Thread Neves
Hi, Is possible to have hierarchical controllers like: /admin/blog/edit/1 where admin is a folder with others controllers related do the admin of the site. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: hierarchical controllers

2006-07-31 Thread Samuel DeVore
There is an admin routing feature you might want to look at http://manual.cakephp.org/chapter/4 in section 4 It's a different way to do what you might be thinking about. And no I do not believe that there is builtin support for hierarchical controllers Sam D On 7/31/06, Neves [EMAIL

Re: hierarchical controllers

2006-07-31 Thread AD7six
Plugins are an easy way to organize things too, a plugin is a mini, self contained app see http://manual.cakephp.org/chapter/13 Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: strange helper behaviour in element

2006-07-31 Thread Ben Durbin
Scope confusion? The following works: ?php function printUpDown($html_helper) { echo $html_helper-image('up.gif'); echo $html_helper-image('down.gif'); } ? p?php printUpDown($html) ?/p Geoff wrote: When i use the html helper in an element it works fine if it is called directly. If,

findAllByFieldName in a manyToMany relation

2006-07-31 Thread [EMAIL PROTECTED]
Hi everyone, I'm trying to do something like this: findAllByFieldName(), in a relation hasAndBelongsToMany, so I don't have a field to look for, do you know which method should I use to do this? Thanks in advance. --~--~-~--~~~---~--~~ You received this message

Re: findAllByFieldName in a manyToMany relation

2006-07-31 Thread John David Anderson
On Jul 31, 2006, at 2:37 PM, [EMAIL PROTECTED] wrote: Hi everyone, I'm trying to do something like this: findAllByFieldName(), in a relation hasAndBelongsToMany, so I don't have a field to look for, do you know which method should I use to do this? Give us a more concrete example - what

Re: findAllByFieldName in a manyToMany relation

2006-07-31 Thread John David Anderson (_psychic_)
On Jul 31, 2006, at 2:53 PM, [EMAIL PROTECTED] wrote: OK, I have Post and Category, they both hasAndBelongsToMany each other, how can I get all posts in one category, $this-Category-find('id = '.$id); and all categories inone Post, $this-Post-find('id = '.$id); that's the question

Character sets

2006-07-31 Thread [EMAIL PROTECTED]
I have posted and readed many times about character encoding. But most of the times the responses are incomplete and confusing is there a good tutorial for this. I have made a simple script with cakephp the index.thtml view is like this ? echo Año, canción ? and the output is: A?o, canci?n I

Re: Character sets

2006-07-31 Thread John David Anderson (_psychic_)
But there is only one problem when I use the ajax autocomplete it still uses UTF8 for encoding my query string to the database and I can't make querys with characters like (Ñ,ñ..etc). Can someone give a GOOD explenantion about character encoding. Using which browser(s)? -- John

Re: Character sets

2006-07-31 Thread AD7six
How about this, If the encoding for your files == charset meta tag in html == database encoding Then you won't get any pr?blems. If you are not using UTF-8 you will get pr?blems with AJAX updates if you use UTF-8 database connection you need to execute set names 'UTF8' as your first mysql

Re: Character sets

2006-07-31 Thread AD7six
The bom got cleaned, so I'll give it another try If you get the text  being output you have BOMs at the If you get the text ï » ¿ without the spaces output to screen.. you have BOMs.. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Character sets

2006-07-31 Thread Chris Lamb
Hi, Firstly, ISO8859-1 (or Latin-1) has rather limited character set[1] and you should consider sticking with Unicode (in your case UTF-8) Can someone give a GOOD explenantion about character encoding. The eminent Joel Spolsky gives an excellent guide[1] to character encodings from the

Will Sanitize-cleanArray protect against XSS attacks?

2006-07-31 Thread Eric Farraro
I've been reading about all types of security vulnerabilities common in online applications, and realized that my application had some rather large XSS holes. I found that using the Sanitize function 'cleanArray' did a nice job in removing all? of the vulnerabilities, but I am curious whether it

ACL and Multiple Groups

2006-07-31 Thread etaham
I was looking throught the ACL documentation and became very interested in using it. My question is as follows: Is there a way for a user to be part of multiple groups? for example, if i have a user named john, i want him to be in both the UsersA and UsersB group. PageA which allows UsersA

Re: ACL and Multiple Groups

2006-07-31 Thread nate
Is there a way for a user to be part of multiple groups? Yes and no. ARO's and ACO's are organized in a tree-based fashion, so if a node is a child of another node, it inherits that node's permissions as well as the permissions of any node which the parent node is a child of. However, the

Associated Model SELECT statements

2006-07-31 Thread teken894
A voting system: Model Ballot: hasMany Options,Votes Model Option: belongsTo Ballot Model Vote: belongsTo Ballot Model User: hasMany Votes ^^Im sort of new to MVC, hopefully those associations are OK! Now: some controller code for viewing a ballot: I tried: $this-Ballot-id =

Re: Character sets

2006-07-31 Thread [EMAIL PROTECTED]
Thanx for the help given with the theme. --~--~-~--~~~---~--~~ 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

Re: Associated Model SELECT statements

2006-07-31 Thread teken894
Oh yea, one more question When I do $this-Ballot-id = $someID; $this-Ballot-read(); I get a huge array with ['Ballot'], ['Options'], and Say I wanted to return only the (['Ballot'] and ['Options']) or (['Ballot'] and ['Votes']), Is there a method/way that

Re: Associated Model SELECT statements

2006-07-31 Thread Eric Farraro
Regarding your section question, and pulling only certain information... Check out: http://api.cakephp.org/class_model.html#c2d8fb14f5398c85452d978bd013436f, which is the API page for FindAll(). One of the parameters is 'fields', where you can specify fields returned. I'm not certain, but you

Re: Associated Model SELECT statements

2006-07-31 Thread teken894
I'm not certain, but you might be able to specify something like: array('ballots.*', 'options.*') That doesn't work. I think that's for returing one field from the model that the controller is associated with. I want something very similar by to get a particular from a associated Model,

Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan
Hey Nate - when I pass in minChar, it adds it to the text field and not the Ajax call: echo $ajax-autocomplete('Entity/name','/entities',array('size'='40','minChar'='4')) produces: input name=data[Entity][name] size=40 minChar=4 id=EntityName autocomplete=off value= type=text / div

I don't want to associations in every queries, how?

2006-07-31 Thread Daniel King
There are some associations in my app. But I don't need to use it every time. What should I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: AJAX Autocomplete silently failing

2006-07-31 Thread nate
Sorry, it should actually be 'minChars', not 'minChar'. That's why the key wasn't being recognized by AjaxHelper. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: I don't want to associations in every queries, how?

2006-07-31 Thread Ryan K
Could you be more specific when you say... 'You don't need to use it every time?' Are you saying you don't want the query to run everytime? (aka, enable some type of caching) _RK Daniel King wrote: There are some associations in my app. But I don't need to use it every time. What should I

Re: I don't want to associations in every queries, how?

2006-07-31 Thread John David Anderson (_psychic_)
On Jul 31, 2006, at 6:57 PM, Daniel King wrote: There are some associations in my app. But I don't need to use it every time. What should I do? Set the recursive var to 0 before making find calls. $this-ModelName-recursive = 0; $this-ModelName-find(); -- John

Re: I don't want to associations in every queries, how?

2006-07-31 Thread nate
http://api.cakephp.org/class_model.html#c2d8fb14f5398c85452d978bd013436f See the $recursive parameter. You can set it to 0 to disable hasMany and hasAndBelongsToMany associations, or -1 to disable all associations. --~--~-~--~~~---~--~~ You received this

Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan
Thanks Nate - that was it - the thing works brilliantly now. And now for something completely different: I used CSS to set a max-height and overflow:auto for the returned list, so if the results are lengthy, I get a scrollable list. Of course, IE (pre-7) does not recognize max-height but

ajax-link -- unable to get it working

2006-07-31 Thread bingo
Hello all, I am trying to update the content of a div (details) based on the article title that was clicked. Below is my code for the view (test.thtml) and the generated code. The problem is that when I click on article title, nothing happens. Even the controller function specified in the