Re: find using HABTM relationship

2008-11-25 Thread AD7six
On Nov 25, 1:26 am, pkclarke [EMAIL PROTECTED] wrote: I'm a noob to CakePHP and have an issue with find returning results from tables with a HABTM relationship. I have 2 tables that have a HABTM relationship:  - Site.id  - Site.title  - User.id  - User.name The HABTM join table is:

Re: NotContain?

2008-11-25 Thread Adam Royle
Yes, often I've thought the same as well, however when things change (add an extra model, add some extra fields) you're probably going to have to change this in multiple places. Plus, I've found it better to specify what you want, rather than what you don't want, when things may change in the

Re: Field formatting based on MySQL fields type

2008-11-25 Thread Adam Royle
I do a similar thing in my AppModel. Look at the Model methods and also pr($this) in your AppModel to see what data you can access, etc. You can get all the field names and types easily using $this-schema() or $this-getColumnTypes(). Cheers, Adam On Nov 25, 2:34 am, Ernesto [EMAIL PROTECTED]

how to check the path of your cache view in the source code?

2008-11-25 Thread robert123
hi I have enabled caching, in my testing environment, the cache is working well, and generate the views at tmp/cache/views so i deploy the code in the production server, using the same code, but this time no views are generated at tmp/cache/views I am not sure the reason, anyone can tell me

Re: how to check the path of your cache view in the source code?

2008-11-25 Thread David C. Zentgraf
Have you set the correct permission levels on the tmp directories (web server needs write access)? On 25 Nov 2008, at 17:53, robert123 wrote: hi I have enabled caching, in my testing environment, the cache is working well, and generate the views at tmp/cache/views so i deploy the code

Re: how to check the path of your cache view in the source code?

2008-11-25 Thread robert123
yes, it was set correctly, in the cache folder, files generate for model and persistent folders but cache views are not generate for the view folders On Nov 25, 5:09 pm, David C. Zentgraf [EMAIL PROTECTED] wrote: Have you set the correct permission levels on the tmp directories (web   server

Re: how to check the path of your cache view in the source code?

2008-11-25 Thread Kyo
Did you include the CacheHelper in your $helpers 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 unsubscribe from this group,

Re: find using HABTM relationship

2008-11-25 Thread pkclarke
Thanks to those who tried to help. I was unable to use find to retrieve the data based on the HABTM relationship. I ended up doing manually: -- //lookup User based on email $user = $this-User-find('first', array(

Re: find using HABTM relationship

2008-11-25 Thread [EMAIL PROTECTED]
I think I can explain it a little. It did not work because Cake does not get habtm data all in a single query. The condition you set is used for the initial query (which does not reach the User model). Set debug to 2 and check the sql output. You should see two queries (I think) for any normal

cakephp with postgresql sequence

2008-11-25 Thread ReFeeL
Hi, I read from many posts about cakephp and postgresql sequence. Most of them seems implying that the sequence will be used automatically. One can override the default sequence name by declaring var $sequence = new_sequence; in the model class. However, I'm using postgres 8.3 with the latest

java script query

2008-11-25 Thread nikunj
hi, i want to call controller action when my web browser is call , for that i use javascript like: ?php echo $ajax-Javascript-event('window','unload',$ajax- remoteFunction( array( 'url' = array( 'controller' = 'cart', 'action' = 'check'), 'update' = 'producttitle','position'='replace' ) )); ?

Re: Pagination with containable: Contain has to effect

2008-11-25 Thread Sebastian Veggiani
May be he's using an older version of 1.2. ¿or not? On Nov 24, 9:31 am, Mariano Iglesias [EMAIL PROTECTED] wrote: [2] What do you mean you had the file in the wrong place? Containable is part of the core. Liebermann, Anja Carolin wrote: [2] I have contaninable for all my models But I

Re: Pagination with containable: Contain has to effect

2008-11-25 Thread Sebastian Veggiani
May be he's using an older version of 1.2. ¿or not? On Nov 24, 9:31 am, Mariano Iglesias [EMAIL PROTECTED] wrote: [2] What do you mean you had the file in the wrong place? Containable is part of the core. Liebermann, Anja Carolin wrote: [2] I have contaninable for all my models But I

AW: Pagination with containable: Contain has to effect

2008-11-25 Thread Liebermann, Anja Carolin
Hi Sebastian, The he is a she and had the app_model.php file placed in the wrong folder ;-) Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Sebastian Veggiani Gesendet: Dienstag, 25. November 2008 13:16 An: CakePHP Betreff: Re:

Re: Mambo on CakePHP brainstorm

2008-11-25 Thread keymaster
Very good advice. Ignore at mambo's peril. On Nov 25, 1:27 am, James K [EMAIL PROTECTED] wrote: Simple - if you're starting from scratch, seriously start over and rethink a lot of the fundamentals. Mambo's idea of what content is and how it should be organized within a CMS is very outdated

get value send by one model

2008-11-25 Thread ammu
I have two models: employee and taskassign. In employee I have a link task assign in which I pass $employee ['Employee']['id'] to the taskassigns/add.. and in add function of tasks_controller we should get the value of $employee['Employee']['id'].and this value should be passed to the foreign

Advanced Routes

2008-11-25 Thread BeroFX
Hi guys! Imagine you have a standard social network with users who can have blogs, pictures and videos. I need to setup my routes like this: http://www.mysite.com/michael -- this is like / users/view/123 http://www.mysite.com/michael/videos/123 -- this would show michaels

Re: Pagination with containable: Contain has to effect

2008-11-25 Thread Sebastian Veggiani
May be he's using an older version of 1.2. ¿or not? On Nov 24, 9:31 am, Mariano Iglesias [EMAIL PROTECTED] wrote: [2] What do you mean you had the file in the wrong place? Containable is part of the core. Liebermann, Anja Carolin wrote: [2] I have contaninable for all my models But I

Re: How should I associate these tables?

2008-11-25 Thread Antônio Marco
Thanks, teknoid! But now I'm having a new problem... My applications uses tables separated in different schemas. These tables are related one each other as shown above. I'm trying the HBTM association between geo.plots and dme.addresses tables. I created the geo.addresses_plots table but when I

Re: How to get code coverage analysis working?

2008-11-25 Thread Defranco
On Nov 19, 10:12 pm, mark_story [EMAIL PROTECTED] wrote: To resurrect this threadcodecoveragewas broken for me on my new computer.  But by changing line 115 of /cake/tests/lib/ code_coverage_manager.php to xdebug_start_code_coverage(XDEBUG_CC_UNUSED); it started to work!  Hope it solves

Re: Pagination with containable: Contain has to effect

2008-11-25 Thread Sebastian Veggiani
Anja, I'm sorry for the mistake. I remember that in first 1.2 versions Containable was a behaviour you had to include manually. Greetings PS: sorry for my poor english :) On Nov 25, 9:23 am, Sebastian Veggiani [EMAIL PROTECTED] wrote: May be he's using an older version of 1.2. ¿or not?

Re: Mambo on CakePHP brainstorm

2008-11-25 Thread andphe
Hi James, On Nov 25, 1:27 am, James K [EMAIL PROTECTED] wrote: Simple - if you're starting from scratch, seriously start over and rethink a lot of the fundamentals. Mambo's idea of what content is and how it should be organized within a CMS is very outdated and short sighted.

Re: Parameter passing in URL

2008-11-25 Thread Daniel Süpke
Hi Mathew, thanks for the help (and sorry for the delay in answering). That's a good idea and I followed your advise, but still one problem persists: If, in step 3 there is something wrong in validation, cake will return to the form again. But now, the ID is no longer in the URL, so there is

AW: Pagination with containable: Contain has to effect

2008-11-25 Thread Liebermann, Anja Carolin
Hi Sebastian, No problem. Yes you still have to include it manually or you include it for all models via an entry in the app_model.php. Which I did, but placed it in a folder where it couldn't be found. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL

Re: A new cakesite...

2008-11-25 Thread BeroFX
A forum, Cake needs a decent forum (www.cakephpforum.net is offline 90% of the time), a knowledge base with snippets and articles.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

A new cakesite...

2008-11-25 Thread Marcus Silva
Hi guys, I am planning on building (maybe) a site for us cakephp users. I would like to know weather it would be a good idea to build such a site and what type of feature you would suggest. The question I ask is this, would you use such a site and what would like to see in it? Any comment

Re: Parameter passing in URL

2008-11-25 Thread Daniel Süpke
Hi, thanks for your support. I think Mathew got it pretty good, let's say I want to safe the parameter in the URL for bookmarking. Also, the user can have some tabs open with different IDs (actually, location IDs he can change at any time). Best Regards, Daniel RyOnLife wrote: Daniel,

Yet another auth/ACL or I'm too dumb to undestand cakephp acl

2008-11-25 Thread Ricardo Valfreixo
I simpy can't understant auth/ACL system. I can manage to get my user authenticated (woohooo) but I can't seem to setup properly the ACL system. I want to group up users. That way I can give permissions to a group creating a profile system. I currently have 5 diferent roles: - sysadmin -

Comtain, conditions and pagination: correct syntax for conditions

2008-11-25 Thread Liebermann, Anja Carolin
Hi everybody, I am trying to program a search with contain since nearly a week now and I still don't get it right. What I want to do: Hotel belongsto Hotelmaster (Hotel is a kind of blueprint of Hotelmaster) I search for Hotel and want only to find datasets where the related Hotelmaster

AW: Yet another auth/ACL or I'm too dumb to undestand cakephp acl

2008-11-25 Thread Liebermann, Anja Carolin
Hi Zen, I had the same trouble like you had. So I pass on Dardos good advice: Start with a simple testapplication following this tutorial: http://book.cakephp.org/view/641/Simple-Acl-controlled-Application and do a bit reading here:

Re: Yet another auth/ACL or I'm too dumb to undestand cakephp acl

2008-11-25 Thread Ricardo Valfreixo
I've already stumble upon littlehar tutorials. Regarding the password, I've managed that also. Authentication is working fine now. used the Security::setHash(md5); entry on the app controller. and tha table has a confortable varchar(100) so the lenght of the string will be no problem. Ricardo

Re: A new cakesite...

2008-11-25 Thread Marcus Silva
A forum would be quite good, but I want something better than a forum. Any more suggestions bakers On Nov 25, 1:24 pm, BeroFX [EMAIL PROTECTED] wrote: A forum, Cake needs a decent forum (www.cakephpforum.netis offline 90% of the time), a knowledge base with snippets and articles..

Re: 1 form, multiple actions

2008-11-25 Thread Josey
Brilliant Anja! That logic seems perfect! I'll give it a shot and get back with you on how affective it was for me. Thanks all. On Nov 25, 1:53 am, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: Hi Josey, I had the same problem. I needed two submit buttons with different actions behind

Re: calling exit() after redirect STILL redirects

2008-11-25 Thread mark_story
There is no $this-exit() function. Perhaps you are thinking of $this- _stop()? Also in 1.2 there is no need to manually call exit(). It is called automatically by redirect(). Your redirect call seems suspect as well. I would just use $this- redirect('/users/login'); Of course it is always

Re: Comtain, conditions and pagination: correct syntax for conditions

2008-11-25 Thread grigri
Have you tried just putting the conditions in the paginate call? class HotelsController extends AppController { var $paginate = array( 'Hotel' = array( 'limit' = 10, 'contain' = array( 'Hotelmaster', ... ) ) ); function search() { // Example

CakePHP bbCode Helper

2008-11-25 Thread Amstr
Hello, I've seen some reference to bbCode helper in Cakephp. Even the bakery has this feature. I did track a previous post in the group, but the url it refers to no longer seems valid. Can anyone point me in the right direction? --~--~-~--~~~---~--~~ You received

Re: Advanced Routes

2008-11-25 Thread Graham Weldon
You should be able to do something like: Router::connect('/:username/:controller/:action/*', array(), array('username' = '[a-z0-9]*')) Read through this: http://book.cakephp.org/view/542/Defining-Routes The most relevant examples are down the bottom, but work your way from the top, and try

Re: Field formatting based on MySQL fields type

2008-11-25 Thread Ernesto
Yeah man i almost did it :) here's a snippet, maybe some1 else needs that code in future class AppModel extends Model { function beforeValidate() { foreach ($this-data as $model) { foreach ($model as $fieldname = $value) {

Re: A new cakesite...

2008-11-25 Thread mark_story
Many have tried this and it has not been historically successful. In the land of forums there is this group, as well as many language specific groups. There is also already http://www.cakephpforum.net/ and others. In addition there is the bakery and the cookbook. The cookbook is more

Re: 1 form, multiple actions

2008-11-25 Thread Josey
Anja, wanted to get back with you. I modified my action based upon your recommendation and it worked swimmingly! Thanks for your help. On Nov 25, 1:53 am, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: Hi Josey, I had the same problem. I needed two submit buttons with different actions

Re: 3 ajax selects

2008-11-25 Thread Pyrite
Can you please post your code :) On Nov 23, 10:50 am, haj [EMAIL PROTECTED] wrote: Ok, another attempt to pull some wisdom. observeField is so great, it makes ajax 'just works.' Select A changes the content of select B on the fly beautifully, until I have to add select C. So, select A

Re: how to check the path of your cache view in the source code?

2008-11-25 Thread robert123
yes, it was included, as mentioned it was working in testing server, but not in production environment with the same code, i suspect somehow the path to write the cache file to tmp/cache/views was not set correctly, but i dont know where to find it in the cakephp source code On Nov 25, 5:54 pm,

Re: 1 form, multiple actions

2008-11-25 Thread Josey
I hear you there, this group has saved me hours of extra debugging. I dance when I'm able to contribute something back. On Nov 25, 8:54 am, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: Hi Josey, You are welcome! I am happy to contribute something here, after I am getting so much here

AW: 1 form, multiple actions

2008-11-25 Thread Liebermann, Anja Carolin
Hi Josey, You are welcome! I am happy to contribute something here, after I am getting so much here myself! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Josey Gesendet: Dienstag, 25. November 2008 15:28 An: CakePHP Betreff: Re:

Re: Parameter passing in URL

2008-11-25 Thread Mathew
Hi Daniel, You need to then add the ID as a hidden input for the form. This way the value of the ID is included in the posted data, and any validation attempts. After a successful form entry the controllers action would perform a redirect to insert the ID back into the URL. function post() {

Re: How should I associate these tables?

2008-11-25 Thread teknoid
I assume in that case you'll need to create a model for your join table (which is otherwise created for you)... and specify which schema (db) it uses. Otherwise, if you can, move them all to the same schema. On Nov 25, 7:55 am, Antônio Marco [EMAIL PROTECTED] wrote: Thanks, teknoid! But now

Re: A new cakesite...

2008-11-25 Thread validkeys
Many people learn by example. I have learned quite a lot (not just about cake) but about PHP by seeing what other people have done. A great resource would be something like a quiz site, where there is a new question each day: 1. Program this and people could upload their solutions. That could

Re: A new cakesite...

2008-11-25 Thread Marcus Silva
I am thinking something along those lines. Got some good, concepts already. More suggestions please... On Nov 25, 3:53 pm, validkeys [EMAIL PROTECTED] wrote: Many people learn by example. I have learned quite a lot (not just about cake) but about PHP by seeing what other people have done. A

Re: Mambo on CakePHP brainstorm

2008-11-25 Thread Nate
Based on your stated goals, the two suggestions I would add are: (1) Develop as many of Mambo's features as possible as extensions. This will not only make the CMS itself as flexible as possible (and the CMS's extension API as robust as possible), but it will also help you 'feel the pain' of

AW: Comtain, conditions and pagination: correct syntax for conditions

2008-11-25 Thread Liebermann, Anja Carolin
Hi grigri, Thank you for your enlighenting answer. It helped my further understanding of cake and I found what bugged it (see down below). What I need is what your second select example does e.g.: SELECT Hotel . * , Hotelmaster . * FROM hotels AS Hotel LEFT JOIN hotelmasters AS Hotelmaster ON

Re: A new cakesite...

2008-11-25 Thread dr. Hannibal Lecter
I've suggested something a while ago for the cookbook, a HOWTO section, but it was rejected. Maybe that would go well with the quiz concept? On Nov 25, 5:09 pm, Marcus Silva [EMAIL PROTECTED] wrote: I am thinking something along those lines. Got some good, concepts already. More suggestions

Help with cake and soundmanager2

2008-11-25 Thread farfignugin
I'm putting together a cake app with an inline mp3 player using soundmanager2 similar to this demo: http://www.schillmania.com/projects/soundmanager2/demo/page-player/ . I'm using ?php echo $scripts_for_layout; ? to get the soundmanager2 javascripts into the head, and everything works fine when

Re: Comtain, conditions and pagination: correct syntax for conditions

2008-11-25 Thread grigri
What about this: $paramhotel['Hotelmaster.name LIKE ?'] = array('%'.trim($this-data ['Hotel']['name']).'%'); Should work correctly, put the right quotes in the right places and escape what is necessary. hth grigri On Nov 25, 4:39 pm, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: Hi

Re: java script query

2008-11-25 Thread brian
Because the script is no longer running after the window is unloaded. On Tue, Nov 25, 2008 at 5:03 AM, nikunj [EMAIL PROTECTED] wrote: hi, i want to call controller action when my web browser is call , for that i use javascript like: ?php echo

Re: cakephp with postgresql sequence

2008-11-25 Thread brian
You don't need to supply a value for the sequence in the insert. Postgres will take care of that if the table is set up correctly with one column as SERIAL type. Can you show the table creation code? Or, if you can access the database through a terminal in psql, show the output of: \d

Re: A new cakesite...

2008-11-25 Thread AD7six
On Nov 25, 5:44 pm, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: I've suggested something a while ago for the cookbook, a HOWTO section, but it was rejected. Maybe that would go well with the quiz concept? I think I rejected that submission (before the change log existed?). The thing is

Validate before controller

2008-11-25 Thread Razvan Pat
Hello everyone, I've just started developing a website with CakePHP and already hit a bump. I don't understand why validation is done only when saving the data to the database. This is a very bad thing because: - you work with possible invalid data in the controller (let's say your making a

paid consultancy/development/advice

2008-11-25 Thread stewsnooze
Hi, I'm interested in finding out whether we could get someone from the community to help on an existing application an agency built for us which we want to extend and also run well. The help could range from advice, code review, development to turnkey Obviously we'd pay. Stew

Re: A new cakesite...

2008-11-25 Thread stewsnooze
I think we should look at Drupal as it's on fire at the moment and it's community is very powerful and empowered by the community tools. The Groups.drupal.org site matches people across sectors and interests with each other and allows them to discuss Drupal in their particular domains. I would

Router and Pagination

2008-11-25 Thread Vincenzo Morgante
I'm novice. I have read all about route and pagination. I Have 2 simple(?) case about it. In my home page i have a product list. Generated link of HTMLHelper pagination was http://mysite/page:2 (where 2 is a page n°2) but clicking on it don't work properly (error 404). If I manually digit

Re: Validate before controller

2008-11-25 Thread thatsgreat2345
http://book.cakephp.org/view/410/Validating-Data-from-the-Controller On Nov 25, 8:23 am, Razvan Pat [EMAIL PROTECTED] wrote: Hello everyone, I've just started developing a website with CakePHP and already hit a bump. I don't understand why validation is done only when saving the data to

Re: A new cakesite...

2008-11-25 Thread Marcus Silva
More suggestion please... Groups, Forums they all already exist. There is no point in re- inventing something that already exists. more suggestions please ... On Nov 25, 3:35 pm, stewsnooze [EMAIL PROTECTED] wrote: I think we should look at Drupal as it's on fire at the moment and it's

Re: Mambo on CakePHP brainstorm

2008-11-25 Thread andphe
Hi Nate, On Nov 25, 11:20 am, Nate [EMAIL PROTECTED] wrote: Based on your stated goals, the two suggestions I would add are: (1) Develop as many of Mambo's features as possible as extensions. This will not only make the CMS itself as flexible as possible (and the CMS's extension API as

Re: Help with cake and soundmanager2

2008-11-25 Thread Jay Reeder
We're using Soundmanager2 in a Cake app w/ajax and it's working fine. Do you have debugging turned on? There are a number of things that could be causing your issue. Try turning on debugging and also try turning off .useHighPerformance in the soundmanager2.js file (it creates problems with some

Re: Mambo on CakePHP brainstorm

2008-11-25 Thread MattC
I second what Nate said, especially #2. It would be awesome if Mambo was both a full standalone CMS, but also a plugin that could be dropped into any Cake app to provide CMS functionality. -Matt http://www.pseudocoder.com On Nov 25, 1:55 pm, andphe [EMAIL PROTECTED] wrote: Hi Nate, On Nov

Re: Mambo on CakePHP brainstorm

2008-11-25 Thread Jay Reeder
Would it be feasible to merge one of the existing Cake CMS projects into this new effort to provide a head-start? On Tue, Nov 25, 2008 at 2:12 PM, MattC [EMAIL PROTECTED] wrote: I second what Nate said, especially #2. It would be awesome if Mambo was both a full standalone CMS, but also a

Validation Question/Form Question

2008-11-25 Thread rgreenphotodesign
I find myself a little stumped on this one, maybe some can offer some insight. I need a donate form that will be sent via SSL to our merchant processing facility. I need a set of radio buttons that have a suggested donation amount (accomplished using form-radio('Amount', array('1000.00'

He everyone

2008-11-25 Thread ayomacro
Hi everyone, I just started CakePHP and it's awesome to see the mechanism of MVC in a whole new way. Compare to Zend it's simpler for newbies. I'm writing my blog application which is almost finished so I can paste it on the website for other people to see the complete CakePHP Blog 2 application

Re: Help with cake and soundmanager2: SOLUTION

2008-11-25 Thread Drew Pearson
So I found out what was causing the problem, but I'm not sure why. Maybe someone can help me with that. Basically it was the navigation links I had in the default layout. I had ? echo $html-link('All Songs', '/songs/'); ? instead of ? echo $html-link('All Songs', '/songs'); ? I was trying

autocomplete multiple rows

2008-11-25 Thread scs
Is there anyway to have autocomplete work with multiple rows in the same view. --~--~-~--~~~---~--~~ 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: He everyone

2008-11-25 Thread validkeys
hasManyAndBelongsTo should hasAndBelongsToMany On Nov 25, 3:21 pm, ayomacro [EMAIL PROTECTED] wrote: Hi everyone, I just started CakePHP and it's awesome to see the mechanism of MVC in a whole new way. Compare to Zend it's simpler for newbies. I'm writing my blog application which is almost

Re: Validation Question/Form Question

2008-11-25 Thread teknoid
first you need allowEmpty = true for your radio buttons then, you simply need a custom validation rule for the 'other' field 'other = array('rule'=array('checkOther')); function checkOther() { if(///check if radio buttons are empty 'other' is not decimal///) { return false; } return

$html-link() on button

2008-11-25 Thread Diego Villar
Hi guys, how to use the helper $html-link() in a href button? I try to use links such as buttons: input type = 'button' value = 'Link' onClick = location.href ( '? php echo $html-link(What is this?) ?') any ideas? --~--~-~--~~~---~--~~ You received this message

Re: 3 ajax selects

2008-11-25 Thread haj
The basisc select A - select B part is pretty much like: http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax/ My question is if anyone tried to do select A both controls select B and C at a time. In my project I'm resorting to hide select C via Javascript when select

Re: He everyone

2008-11-25 Thread ayomacro
that's a typo, i meant $hasAndBelongsToMany On Nov 25, 3:56 pm, validkeys [EMAIL PROTECTED] wrote: hasManyAndBelongsTo should hasAndBelongsToMany On Nov 25, 3:21 pm, ayomacro [EMAIL PROTECTED] wrote: Hi everyone, I just started CakePHP and it's awesome to see the mechanism of MVC in a

CakePHP Unit Test Model Woes :(

2008-11-25 Thread pragna
I've been struggling for a couple of days now to build a very simple 'model' unit test. CakePHPs Convention over Configuration should help me out here and so should the Cookbook. With Unit Tests though, it's quite hard to uncover the what the conventions are. The filename conventions described

Re: CakePHP Unit Test Model Woes :(

2008-11-25 Thread MattC
This may or may not fix your problem but: 1) You test db should be empty. The framework will automatically create/drop the tables for each test. 2) You don't need to call loadFixtures at the start of each test. 3) I don't think you need to App::import your model if you use ClassRegistry::init.

Re: $html-link() on button

2008-11-25 Thread grigri
I think you want something like this: button onclick=location.href='?php echo $html-url('/controller/ action'); ?';Click me/button hth grigri On Nov 25, 9:03 pm, Diego Villar [EMAIL PROTECTED] wrote: Hi guys, how to use the helper $html-link() in a href button? I try to use links such as

RSS Feed ... what method is called by index.rss

2008-11-25 Thread aranworld
I am finding the manual entry on generating RSS Feeds really helpful except for one minor detail. http://book.cakephp.org/view/483/Creating-an-RSS-feed-with-the-RssHelper When someone requests posts/index.rss , what controller method is actually called? Is Posts::index() called? Where should

Re: sorting table by colum for cake 1.1.19

2008-11-25 Thread Mona
Anyone? --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to [EMAIL PROTECTED] For more options,

Re: Javascript Ajax methods not working

2008-11-25 Thread ianemv
I have similar problem, mine's work well in ff3,opera and IE without a problem but not on ff2. really weird. On Nov 6, 5:11 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: do you have any example code that we can look at, ive just gone through a session where i have had to work with ajax in

Re: CakePHP Unit Test Model Woes :(

2008-11-25 Thread pragna
Hi Matt, Thanks but I'm still not quite there. I have tried variations on most of these calls already. My test database is not empty - it has a users table but there are no records in the table. I get Error: Database table users for model User was not found if I have no users table in the

Multiple table access from within a model

2008-11-25 Thread Jason
I have the following tables, events +-id +-offering_id ... offerings +-id +-program_id +-start_date ... programs +-id +-name ... One program could have many offerings, but each offering is tied to one program. I have the $belongsTo and $hasMany set up via Bake. I would like to regularly be

Re: Multiple table access from within a model

2008-11-25 Thread Kyo
Use the Containable behavior http://book.cakephp.org/view/474/Containable --~--~-~--~~~---~--~~ 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 unsubscribe

multiple [controllerName].po files + normal core.po?

2008-11-25 Thread Mark (Germany)
Several posts and blogs have been made to similar topics they usually end up with use eather core.po OR multiple controllerName.po etc the way cake works is: - if it finds a domain.po, use it, abort - if not, try to find core.po, use it, abort well, is there (without the need to hack into

Re: bug? or whats the matter with date fields?

2008-11-25 Thread Mark (Germany)
only thing i can say, is that villas and Dardo Sordi Bogado were right there was no documentation on that, but now i know that it is better to avoid such naming conflicts anyway, if i ever publish a cake Look-Out-list, this will definitly be on it i still do not know what xavier wanted to tell

connecting the many to many dots - going from table1 - table1_table2 - table 2

2008-11-25 Thread kai
I realize my question leans more towards learning php than it does the cakephp framework but it's a little of both and i'm trying to learn both so I hope someone is willing to help. I have three tables: categories, categories_listings, and listings. i have a form that lists categories with check

Re: connecting the many to many dots - going from table1 - table1_table2 - table 2

2008-11-25 Thread Kyo
You can retrieve data from a HABTM relationship either by modelizing the join table or using 'with' key of the model association. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Re: RSS Feed ... what method is called by index.rss

2008-11-25 Thread aranworld
Well, I realize it is a pretty dumb question. Obviously, the index() method is called when index.rss is accessed. I guess my real question is ... what if the logic behind index.rss is different from the logic behind index ... as I'm sure it usually is on websites. For example, what if my

ACO/ARO in index functions

2008-11-25 Thread white devil
hi, is there is an easy way to filter object data in the controller for index pages before its sent to the view, based on an aro, without quering the aro/aco tables directly? cheers/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: RSS Feed ... what method is called by index.rss

2008-11-25 Thread David C. Zentgraf
I guess the idea is that the index page and the index RSS feed should very much contain the same data, only in a different output format (layout/view). You can use a paginate() call even for the RSS feed, as you usually only want the last x entries in the feed, not the whole database. You

Re: validation

2008-11-25 Thread sun
hello anja, your valaidation logic is very helpful to me... i want to ask another one doubt to u , in ur example u given three text fields are validated in built in method.. i am asking abt how to validate the file field. example( upload file filed). If i try to validate ,

Re: RSS Feed ... what method is called by index.rss

2008-11-25 Thread aranworld
Thank you for the help. You are right that the primary customization I was interested in was to have a different number of entries used in the website index vs. the rss index. Just in case anyone else has the same question, here is what I am now doing: --- // this goes into my