dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.5 - Minor Release

2007-12-04 Thread Dérico Filho
Olá, Uma versão de correção do dbdesigner2cake está disponível. Aqueles que estiverem usando a versão 1.0.4 são recomendados que atualizem para 1.0.5. Um pequeno erro de uma variável global quase inutilizaou o novo parâmetro --core. Por favor, baixem a nova versão em

Re: I'm having problems with associations...

2007-12-04 Thread Serge Rodovnichenko
1. Add $primaryKey = 'zip'; in Zipcode model. 2. Define 'foreignKey'='zip' in $hasMany association. 3. Your associations should looks like: User belogsTo Zip, Zip hasMany Users. On Dec 4, 9:02 am, Jon Hinson [EMAIL PROTECTED] wrote: Ok, I can't seem to solve this problem for the life of me. I

Error: Cake bake to generate model

2007-12-04 Thread Steveston
I am using the latest pre-beta 1.2.x version. When trying to bake models, get this error: Possible Models based on your current database: 1. CourseComment 2. CourseInstructor 3. Course 4. Instructor 5. Source 6. TextbookComment 7. Textbook 8. User 9. UsersTextbook Enter a number from the list

Re: textarea formating

2007-12-04 Thread grigri
What's wrong with nl2br() ? On Dec 4, 7:47 am, schneimi [EMAIL PROTECTED] wrote: Hi, I think your problem is the '\n', because that way the line feed doesn't get interpreted, try it with \n instead. Best regards, Michael manu schrieb: Hello all, I'm new to cake (and php btw).

Re: textarea formating

2007-12-04 Thread manu
thanks Michael, I could have searched that for ages. and nl2br() is just fine too Best regards Manu On 4 déc, 10:24, grigri [EMAIL PROTECTED] wrote: What's wrong with nl2br() ? On Dec 4, 7:47 am, schneimi [EMAIL PROTECTED] wrote: Hi, I think your problem is the '\n', because that

Re: textarea formating

2007-12-04 Thread manu
Hello Michael, thank you, it works! I could have searched for days to find that! btw I found a function nl2br($body) which does the same thing Best regards Manu On 4 déc, 08:47, schneimi [EMAIL PROTECTED] wrote: Hi, I think your problem is the '\n', because that way the line feed

Re: textarea formating

2007-12-04 Thread manu
Hello Michael, It's perfectly true, '\n' doesn't work it could have taken me days to find that! I also found a php function nl2br($body) which does the same thing thank you all Manu On 4 déc, 08:47, schneimi [EMAIL PROTECTED] wrote: Hi, I think your problem is the '\n', because that way

Re: Dynamic table

2007-12-04 Thread dandreta
Nobody knows any link or example how I can do it? --~--~-~--~~~---~--~~ 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

Re: Error: Cake bake to generate model

2007-12-04 Thread AD7six
On Dec 4, 9:49 am, Steveston [EMAIL PROTECTED] wrote: I am using the latest pre-beta 1.2.x version. When trying to bake models, get this error: Possible Models based on your current database: 1. CourseComment 2. CourseInstructor 3. Course 4. Instructor 5. Source 6. TextbookComment 7.

Re: Dynamic table

2007-12-04 Thread Adam Royle
Ahhh... I think I now understand what you're saying. Initially I thought you meant creating tables in the actual database and I'm sure everyone else thought the same. But re-reading your question I now think you mean *HTML* tables. Is that correct? OK... I would achieve the effect you want

i18n: static language references with __(My lang key, true) in models and controllers

2007-12-04 Thread cakeFreak
Hey guys, is there a way to use i18n style static language references __(My lang key, true) in models and controllers like for example: $test = __(My lang key, true); When I try to do it this way I get a syntax error in my code. cheers Dan

Re: Reuse of code via elements, requestAction etc.

2007-12-04 Thread Adam Royle
Open-ended answer... sorry :) I would say do whatever is easiest and maintainable for *YOU*. There are ways to speed up requestActions inside elements by using caching where possible. Since most applications are different in nature in terms of requirements, one size does not fit all. If you

Reuse of code via elements, requestAction etc.

2007-12-04 Thread sunertl
I have a question concerning the reusage of code in cakephp. as far as i understood the optimum to reach in mvc-frameworks is that no code is written twice. cake gives me means like elements and requestAction to reach this goal. but: every requestAction results in a new http-request, for

Re: Easy referential data integrity?

2007-12-04 Thread [EMAIL PROTECTED]
awesome, thanks! I can't believe I missed that. On Dec 3, 10:58 pm, Grant Cox [EMAIL PROTECTED] wrote: Set 'dependent'=true in your $hasMany definition. Seehttp://manual.cakephp.org/chapter/modelsfor more details. On Dec 4, 2:56 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm

Re: Reuse of code via elements, requestAction etc.

2007-12-04 Thread AD7six
On Dec 4, 4:17 pm, sunertl [EMAIL PROTECTED] wrote: I have a question concerning the reusage of code in cakephp. as far as i understood the optimum to reach in mvc-frameworks is that no code is written twice. cake gives me means like elements and requestAction to reach this goal. but:

Inline javascript in a view not executed

2007-12-04 Thread [EMAIL PROTECTED]
Hi I have a question I have a index.thml where there are many divs. Then with ajax I substitute one of divs with another view ( view.thtml). In this view I use a javascript function attached to a link. So If I define this function in view.thtml I get an error instead I define the function in

Re: Caching the view of the entry homepage

2007-12-04 Thread MattC
This bug is probably the most frustrating thing about Cake for me. I had been using the fix described in the ticket (http:// trac.cakephp.org/ticket/1349). I rolled the change into a patch that matches the latest SVN and is slightly more configurable then the original fix. It's attached to the

Return Helper Output as variable (not echo)

2007-12-04 Thread Mike Digital Egg
Hi, I need to take some output from a helper and put it into a variable rather than echoing it to screen, is this possible with Cake 1.2? eg. Helper Function: links.php [code] function return_link() { $output = $this-Ajax-link(__('return_link',true),'/

Re: Return Helper Output as variable (not echo)

2007-12-04 Thread Dardo Sordi Bogado
If you look at it: http://api.cakephp.org/1.2/ajax_8php-source.html , the link method returns the output, it doesn't print. On Dec 4, 2007 1:37 PM, Mike Digital Egg [EMAIL PROTECTED] wrote: Hi, I need to take some output from a helper and put it into a variable rather than echoing it to

Re: Xml layout name

2007-12-04 Thread Andreas
I used this one and it works. $this-layoutPath = 'xml'; $this-layout = 'default'; I'm wondering though why have they even bothered putting them into a folder in the first place? Thanks for the help! On Dec 4, 2:10 am, snowdog [EMAIL PROTECTED] wrote: Or you can set

Re: Return Helper Output as variable (not echo)

2007-12-04 Thread Mike Digital Egg
Hi Dordo, You are right that the ajax-link method does not echo the result, but if you put it within a custom helper method it does. Not sure why but I just took it out of the helper and put it directly in the view and it has worked. I will try and work out why it doesn't work in the helper when

German user group?

2007-12-04 Thread powtac
Is there a german speaking cakePHP user group / forum? --~--~-~--~~~---~--~~ 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,

Stop Users From Going Back After Logout

2007-12-04 Thread Joyce
Hi, I have question regarding how to prevent users from going back to the application after they have logout. Below is my index and logout for userscontroller: function index() { $this-checkSession(); if ($this-Session-check('user')) {

Re: Inline javascript in a view not executed

2007-12-04 Thread Christophe Cholot
On Dec 4, 5:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have a question I have a index.thml where there are many divs. Then with ajax I substitute one of divs with another view ( view.thtml). In this view I use a javascript function attached to a link. So If I define this

Re: Stop Users From Going Back After Logout

2007-12-04 Thread Chris Hartjes
On Dec 4, 2007 12:49 PM, Joyce [EMAIL PROTECTED] wrote: Hi, I have question regarding how to prevent users from going back to the application after they have logout. I suggest you use the Auth component if you are using CakePHP 1.2. Since I'm a shameless self-promotor, there are two

Re: Error: Cake bake to generate model

2007-12-04 Thread Steveston
On Dec 4, 4:26 am, AD7six [EMAIL PROTECTED] wrote: On Dec 4, 9:49 am, Steveston [EMAIL PROTECTED] wrote: I am using the latest pre-beta 1.2.x version. When trying to bake models, get this error: Possible Models based on your current database: 1. CourseComment 2. CourseInstructor

Re: Stop Users From Going Back After Logout

2007-12-04 Thread kiger
Why does it matter? If you delete the session storing the user data, then pressing back might bring him to a blank page, but who cares? On Dec 4, 12:49 pm, Joyce [EMAIL PROTECTED] wrote: Hi, I have question regarding how to prevent users from going back to the application after they have

Re: Stop Users From Going Back After Logout

2007-12-04 Thread Joyce
The thing is that it is not a blank page. It contains the value of whatever details that is seen as per when he logged in. On Dec 5, 2:15 am, kiger [EMAIL PROTECTED] wrote: Why does it matter? If you delete the session storing the user data, then pressing back might bring him to a blank page,

Re: Stop Users From Going Back After Logout

2007-12-04 Thread Joyce
Thanks Chris, I will look through your tutorials. I am using CakePHP 1.1, can that work? On Dec 5, 2:11 am, Chris Hartjes [EMAIL PROTECTED] wrote: On Dec 4, 2007 12:49 PM, Joyce [EMAIL PROTECTED] wrote: Hi, I have question regarding how to prevent users from going back to the

Re: Stop Users From Going Back After Logout

2007-12-04 Thread Chris Hartjes
On Dec 4, 2007 1:26 PM, Joyce [EMAIL PROTECTED] wrote: Thanks Chris, I will look through your tutorials. I am using CakePHP 1.1, can that work? The Auth component is not available in 1.2, but I believe you can use the Security component to do similar things. -- Chris Hartjes My motto for

Re: German user group?

2007-12-04 Thread Daniel Hofstetter
Hi Powtac, Is there a german speaking cakePHP user group / forum? http://groups.google.com/group/cakephp-de -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: Stop Users From Going Back After Logout

2007-12-04 Thread Joyce
I see. Hopefully I can get what you mean by that. I will give it a shot. Thanks. On Dec 5, 2:31 am, Chris Hartjes [EMAIL PROTECTED] wrote: On Dec 4, 2007 1:26 PM, Joyce [EMAIL PROTECTED] wrote: Thanks Chris, I will look through your tutorials. I am using CakePHP 1.1, can that work?

Re: Caching the view of the entry homepage

2007-12-04 Thread Dave J
Thanks for the replies. I ended up settling for the redirect option for the short term fix. @Adam: Neat workaround, wish I thought about it earlier... just not the right time to start splitting down the homepage into elements right now :-) @Matt: I can understand your pain, especially the

Creating and persisting objects independent of the controller

2007-12-04 Thread Deane
If I want to create an object, set some properties, and save it, can I do this in my controller: $MyObject = new ThingaMajig(); $MyObject-some_property = some value; $MyObject-save() This object has nothing to do with my controller. This just needs to happen in one of the methods. We've tried

Re: bake newbie problem with configuration

2007-12-04 Thread Phil
directories are /webroot/cake/app /webroot/cake/cake/console user phil from dir /webroot/cake/app calling ../cake/console/cake bake user PATH /usr/local/bin:/usr/bin:/bin:/usr/games 1.2.0.5875 pre-beta the response is ../cake/console/ Hello Phil Fatal Error: cannot redeclare class Class

Re: Creating and persisting objects independent of the controller

2007-12-04 Thread Chris Hartjes
On Dec 4, 2007 3:53 PM, Deane [EMAIL PROTECTED] wrote: We've tried this, and Cake seems to ignore it. It runs through the code (code on either side of it runs), but this code does not result in any SQL or any database record. Forgive my ignorance, but what do you mean by 'Cake seems to

Do you hardcode your menu links?

2007-12-04 Thread Arne-Kolja Bachstein
Hi there, I've got a quite generic question... do you usually hardcode your menu links [in your views] when developing something with cake, or do you implement something like link management models or something? What's the usual way here in your opinion? Greetings Arne

Re: Stop Users From Going Back After Logout

2007-12-04 Thread Grant Cox
What kiger was getting at is that the user can only see what is in their browser's cache - which is what they were allowed to see a second ago anyway... They won't be able to click any links, or perform any actions. But regardless, what you really want is browser history management. Search

Re: Do you hardcode your menu links?

2007-12-04 Thread kristofer
I usually pull in an element to handle dynamic navigation. On Dec 4, 4:46 pm, Arne-Kolja Bachstein [EMAIL PROTECTED] wrote: Hi there, I've got a quite generic question... do you usually hardcode your menu links [in your views] when developing something with cake, or do you implement

Re: Do you hardcode your menu links?

2007-12-04 Thread DragonI
I store menu and submenu links in a config file as an array which is loaded and cached in beforeRender in app_controller. I have my own menu helper which displays the menu in an element $config['mainMenu'] = array( 1 = array( 'title' = 'Home', 'url' = '/', 'desc' =

Re: i18n: static language references with __(My lang key, true) in models and controllers

2007-12-04 Thread cakeFreak
Well sorry, this works in controllers. I had problems using it in a validation rule inside models. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

CLOB in cakephp 1.2

2007-12-04 Thread sanderken
Hello everybody. After a long quest on the internet and through the cakephp API, I can't find a solution to my problem . Here goes: Cakephp is working great with my oracle database. Now I want to store messages 4000 chars (VARCHAR2). So I want to go with a CLOB. When I fill the data straight

Re: Function to ignore an element of an array

2007-12-04 Thread Adam Royle
I would use a single query and some array functions. This is off the cuff (untested) but should work as far as I can tell. Might do it slightly differently if you need the id of the User as well to do further processing, but you should be able to figure out the rest yourself. $input_usernames =

Re: Function to ignore an element of an array

2007-12-04 Thread Adam Royle
One more thing, if you're not going to use a regular expression to split a string, you should just use: $input_usernames = explode(,, $data['Mail']['receiver_username']); Cheers, Adam On Dec 5, 3:38 pm, Adam Royle [EMAIL PROTECTED] wrote: I would use a single query and some array functions.

limit of 200 items in new array???

2007-12-04 Thread phalvrson
This is probably mostly a PHP question, but I will ask it here in case there is some hidden CakePHP interaction that I am not aware of. I have a model called Product and I have a view where I list all of the products. Each product has a quantity that I want to be update- able from the list -

Re: limit of 200 items in new array???

2007-12-04 Thread Adam Royle
Sounds strange that there would be such a limit. Do some debugging (in bootstrap and your controller) to figure out where things start to go astray. Adam On Dec 5, 3:48 pm, phalvrson [EMAIL PROTECTED] wrote: This is probably mostly a PHP question, but I will ask it here in case there is some

Looking for german freelancers or even better a company

2007-12-04 Thread burzum
Hello, ive posted this already in the german group but i dont think that all german developers read this group, so ive decided to post this here again. I have a project that i want to give away because of the size and the law-traps for me as a single person and my small business. The client

Saving Date and Time NOT in the Model/Database (cleanUpFields not working)

2007-12-04 Thread Baz
OK, I've banged my head against the wall a million times. This is my problem: I got date and time fields which I need. They are not associated with the model or database. I call them like so: echo $form-input('from', array('label' = 'From', 'type' = 'date', 'div' = 'date'));