Re: Extra data in HABTM tag set-up

2007-10-08 Thread R. Rajesh Jeba Anbiah
On Oct 9, 1:22 am, Mech7 <[EMAIL PROTECTED]> wrote: > Me neither.. everybody says use with in 1.2 for using the join table > data, but nobody can tell it clear on how it use it :| Except from > selecting on foreign keys in the join table or displaying it in a > view. "with" is unnecessary now

Cake`s unit-tests works very unstable.

2007-10-08 Thread Loci-master
Hello everyone. For the start, I`ll explain what configuration do I use. It`s CakePHP 1.2.0.5427alpha and usual built-in CakePHP Test Suite v 1.2.0.0. The problem is: my test cases work very unstable. It can passes and in the next test-rerun fails with any operations on the test or model. It h

Re: Getting related data

2007-10-08 Thread Adwin Wijaya
so your product should be: Products :id :image_id Images :id :product_id Products --> :hasOne image Images -> :hasOne product if a Image can be used by multiple products then the Images table should : Images :id Products :id :image_id Products hasOne: image Images belongsTo: product CMIIW.

Re: Badword Bahavior

2007-10-08 Thread dardosordi
Yes, just load the model and use it. loadModel('Badwords'); $this->badwords =& new Badwords(); On Oct 8, 5:35 pm, Braindead <[EMAIL PROTECTED]> wrote: > I don't want to use the badword model in my controller. I want to use > it in a behavior. Are there any possibilities? --~--~-~--~

Re: Uploading Large Files

2007-10-08 Thread dardosordi
I think that swfupload is opensource. On Oct 8, 5:52 pm, "Novice Programmer" <[EMAIL PROTECTED]> wrote: > Any one aware of any open-source/free solution since i dont have that much > finances for the project... :(. > > Thanks in Advance. > > On 10/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote

.htaccess anti-hotlink issue

2007-10-08 Thread fael
hello first of all, i'd like to say that this is my first message and that i am a big fan of cakephp, i think it is a great framework and the community is even better. currently i am developing a webapp in which i upload pictures to the / upload folder, in the webroot. i need this pictures being

Re: Use a helper function inside a controller

2007-10-08 Thread francky06l
Well it's not really an MVC behavior, but in cake you can use loadHelper('helpername') in your controller. Then you will access it as in view. hope this helps On Oct 7, 3:04 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi > I have this question. > I have the calendar helper and I want us

Re: How to do mod_rewrite????

2007-10-08 Thread jeffkwiat
Ok, I finally got it...I used the same link val used to get the mod_rewrite working for the CSS on the cakephp page and placed the following into my /etc/apache2/sites-available/default file: AllowOverride All This worked for the cakephp page, but I was still re

How to handle multiple image-upload in the same model / form?

2007-10-08 Thread burzum
My problem is that i have a multipage-report, or better to say one big report (table) with ~500 fields devided into some pages with a list of pages to make it less confusing. Some of the pages contain 1 to 12 images. Now my question or problem: How do i handle them in a good way? Should i use an

Re: How to do mod_rewrite????

2007-10-08 Thread jeffkwiat
Hey guys, I was having the same issue as val with the mod_rewrite not generating the CSS on the Cake Install page. That works now, but I am still getting 404s when I try to go http://localhost/posts/index. Am I pointing to the wrong address, or is it something else. My setup is: Ubuntu Feisty

Re: Eclipse code completion in Views

2007-10-08 Thread schneimi
Yes that would be nice, but i think it's not possible, because these variables are handled by cake. Stu schrieb: > Well, I unfortunately can't get code completion on methods in $form->, > or $html-> in a view (*.ctp file). > > It's no big deal, but it would be very nice. > > On Oct 8, 1:58 pm, sc

Re: Uploading Large Files

2007-10-08 Thread Novice Programmer
Any one aware of any open-source/free solution since i dont have that much finances for the project... :(. Thanks in Advance. On 10/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Exactly what I need. Thanks > > On 7 Oct, 02:39, MicroAngelo <[EMAIL PROTECTED]> wrote: > > Hi Marius, > >

Re: Badword Bahavior

2007-10-08 Thread Braindead
I don't want to use the badword model in my controller. I want to use it in a behavior. Are there any possibilities? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send emai

Re: How to do mod_rewrite????

2007-10-08 Thread val
On ubuntu http://bakery.cakephp.org/articles/view/installing-cakephp-on-ubuntu . For me it worked! On Oct 8, 8:01 pm, "SIXS" <[EMAIL PROTECTED]> wrote: > How do you actually set the mod rewrite. I set it in sthe system httpd.conf, > but I don't see the color in the cakephp page. > Is there anot

Re: Extra data in HABTM tag set-up

2007-10-08 Thread Mech7
Me neither.. everybody says use with in 1.2 for using the join table data, but nobody can tell it clear on how it use it :| Except from selecting on foreign keys in the join table or displaying it in a view. On Oct 6, 1:45 pm, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > On Oct 3, 3:00 am

Re: Eclipse code completion in Views

2007-10-08 Thread Stu
Well, I unfortunately can't get code completion on methods in $form->, or $html-> in a view (*.ctp file). It's no big deal, but it would be very nice. On Oct 8, 1:58 pm, schneimi <[EMAIL PROTECTED]> wrote: > Yes, you are right, the second step is not necessary. > > Stu schrieb: > > > Ah ok, I'd

Re: Badword Bahavior

2007-10-08 Thread djiize
to access another Model from a controller, add this: var $uses = array('Guestbook', 'Badword'); // all models you need that aren't associated with an loaded one and now $this->Badword->find*() magic happens! On 8 oct, 18:46, Zoltan <[EMAIL PROTECTED]> wrote: > That's the way I would do it too :

Re: How to do mod_rewrite????

2007-10-08 Thread Bernardo Vieira
Hi, Make sure all .htaccess files are in place, also, in some cases you have to set RewriteBase to get mod_rewrite to work. schneimi wrote: >Hi, > >not sure what version of Cake you use, but when I installed the latest >stable version of cakePHP, I was also very confused, mod_rewriting was >ob

Re: Extra data in HABTM tag set-up

2007-10-08 Thread Zoltan
Yes, I'm still having problems with saving data: This is what I have so far: WITH association on the model: var $hasAndBelongsToMany = array( 'Tag' => array('className' => 'Tag', 'with' => 'TaggedPlace' ,

Re: Blog Tutorial (Section A.9.)

2007-10-08 Thread val
You could post the code or the steps that reproduce the bug, to give more information (link?..). Well I'm new here, but maybe others know what are you talking about. On Oct 7, 2:26 pm, 2b3 <[EMAIL PROTECTED]> wrote: > Hi all, I'm just starting out and learning here... and I'm stumped... > is this

Re: How to do mod_rewrite????

2007-10-08 Thread schneimi
Hi, not sure what version of Cake you use, but when I installed the latest stable version of cakePHP, I was also very confused, mod_rewriting was obviously working on my apache (tested it seperatly), but no matter what I tried, I didn't come to see any css effects on the cake site. Well I could

How to do mod_rewrite????

2007-10-08 Thread SIXS
How do you actually set the mod rewrite. I set it in sthe system httpd.conf, but I don't see the color in the cakephp page. Is there another issue. I have installed it several times and hve installed it in another system, both XP OS. I am going to install it on a Ubuntu system. Jim --~--~---

Re: Badword Bahavior

2007-10-08 Thread Zoltan
That's the way I would do it too :( I guess there are to solutions - you could make BadWords a component instead of a behavior and use multiple models that way, the other would be to store your bad-words in an array, rather than calling them from the database. You could even move it into the confi

Badword Bahavior

2007-10-08 Thread Braindead
I'm trying to write a badword behavior for my guestbook, where a guestbook entry has to be verified when one or more badwords are detected inside the guestbook entry. My badwords are stored in a database. The problem is how to query the badwords, when the current model is the guestbook? Is the on

Re: Testing Enum Fields

2007-10-08 Thread Daniel Hofstetter
Hi Jérémie, > Nice to read you, i've learned and progressed a lot reading your > blog ! Thanks :) > I'm using SimpleTest ... > > At least how could I bypass this problem for my tests ? > Or define them like strings just for the tests ? I am sorry, but I don't know how you could bypass this pro

Re: Checkboxes instead of multiple select

2007-10-08 Thread R. Rajesh Jeba Anbiah
On Oct 7, 3:00 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > hi Stefan, > > > Is it possible to use checkboxes instead of a multiple select to > > represent data in a many-to-many relation? > > I wrote a helper ages ago that does just that, check > outhttp://cakeforge.org/snippet/detail.php?type

Re: Uploading Large Files

2007-10-08 Thread [EMAIL PROTECTED]
Exactly what I need. Thanks On 7 Oct, 02:39, MicroAngelo <[EMAIL PROTECTED]> wrote: > Hi Marius, > > One of our clients wanted a progress bar, so we used Thin File Upload, > a Java solution that features this and drag-and-drop file support too > (it can be found athttp://upload.thinfile.com- it's

Re: Testing Enum Fields

2007-10-08 Thread Jeremie
Hi, Nice to read you, i've learned and progressed a lot reading your blog ! I'm using SimpleTest ... At least how could I bypass this problem for my tests ? Or define them like strings just for the tests ? And is there a reason cakephp doesn't support enums ? Thanks Jérémie On 8 oct, 16:20,

Re: Eclipse code completion in Views

2007-10-08 Thread schneimi
Yes, you are right, the second step is not necessary. Stu schrieb: > Ah ok, I'd done the first step but not the second step. I'm at work at > the moment, but I'll do the second step when I get home. > > Thanks > > On Oct 7, 5:28 pm, schneimi <[EMAIL PROTECTED]> wrote: > > Hi, > > > > You have to

Re: Testing Enum Fields

2007-10-08 Thread Daniel Hofstetter
Hi Jérémie, > I'm trying CakePHP 1.2 Test Suite today, > withhttp://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1... > andhttp://cakebaker.42dh.com/2006/12/18/testing-with-cakephp-12-a-preview/ > > But when i run my first test, i get an exception for every Enum type > in my DB :

Testing Enum Fields

2007-10-08 Thread Jeremie
Hi, I'm trying CakePHP 1.2 Test Suite today, with http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1-2-test-suite and http://cakebaker.42dh.com/2006/12/18/testing-with-cakephp-12-a-preview/ But when i run my first test, i get an exception for every Enum type in my DB : Except

Re: Using php usort or uksort functions in Cake

2007-10-08 Thread MikeK
Finally got it figured out. Was a naming issue with objects -- need an array with the name of the class, in this case the controller. class MyController extends AppContoller { function mycmp($a, $b) {} function index() { uksort($nbaits, array('MyController','mycmp')); } --~--~-

Re: Useing bake script to create models

2007-10-08 Thread [EMAIL PROTECTED]
hi, i have the same problem. I made a simple test db, table:users id int(10) primary key unsigned autoincrement profile_id int(10) name table profiles id int(10) primary key unsigned auto inc name When i try to bake bake.php doesn't find relations between the two models. I getting mad about thi

Re: Eclipse code completion in Views

2007-10-08 Thread Stu
Ah ok, I'd done the first step but not the second step. I'm at work at the moment, but I'll do the second step when I get home. Thanks On Oct 7, 5:28 pm, schneimi <[EMAIL PROTECTED]> wrote: > Hi, > > You have to do two steps: > > - Add *.thtml to Preferences->General->Content Types->PHP Content

Re: cakePHP friend/buddy system

2007-10-08 Thread avi
Thanks for the reply cakeFreak, I check out all 3 links and I think I understand it. However I cannot seem to get it to save. If I try to add a friend to a user that has an account in the system it doesn't seem to work, it yields a warning. Warning (2): preg_match() [function.preg-match]: Delimit

Re: Getting related data

2007-10-08 Thread andyreimer
Well it seems to work if I switch around the relationship. If Product belongsTo Image, then that image record is available to me based on the presense of the image_id in the product table. It doesn't really make sense to say that the product belongs to the image, but thats just the semantics tha

Re: Getting related data

2007-10-08 Thread dardosordi
I think that you can't map this to any cake relationship (bakers, please correct me if I'm wrong). But you can add a afterFind callback to your model to fetch the image data, or use a custom query and JOIN both tables. If you want to use the automagic on cakephp, I suggest you use a HABTM: produ

Re: Checkboxes instead of multiple select

2007-10-08 Thread tracyfloyd
stefanb: I recently had a similar project and ended up doing this in my view and it seems to be working great so far... obviously you'll need to change your var names accordingly: Categories: value=""> - On Oct 7, 2:55 pm, dardosordi <[EMAIL PROTECTED]> wrote: > Also there are two gr

Re: Need help with ajax->sortable

2007-10-08 Thread Mike Griffin
On 07/10/2007, LW <[EMAIL PROTECTED]> wrote: > > Hi, > > I cant't get this sortable working it seems, maybe someone can give me > a hint: I used this page to get my sortable lists set up: http://dustinweber.com/cakephp/cakephp-sortable-ajax-drag-drops-the-basics/ Instead of putting the images in

customize baked views

2007-10-08 Thread cakeFreak
Hey guys, is there a way to customize the views templates used while baking with the command line feature? Should I edit the views in cake/libs/templates/views? Cheers Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google