Products HABTM Products

2006-11-27 Thread Soulhuntre
Hey all! Ok I looked everywhere. Now I am confuzzled. I have a simple problem ... I have Products that can have an arbitrary number of other products "Related" to them. I have a "products" table, and a "products_products" table. The products_products table has "product_id" and "related_id" as

RE: beforeFilter Problem

2006-11-27 Thread Mariano Iglesias
That's weird. I had an old version of my app where I needed to access models and I remember having to do: if (!isset($this->Model)) { $this->Model =& new Model(); } Or something. But since I took out the need to have models on beforeFilter() I'm not completely sure if that's what the cas

Re: beforeFilter Problem

2006-11-27 Thread nate
Actually they are. Everything is instantiated in the controller's constructor, except for helpers. --~--~-~--~~~---~--~~ 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@go

RE: beforeFilter Problem

2006-11-27 Thread Mariano Iglesias
I think he meant models. Models aren't instantiated at beforeFilter. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! -Mensaj

Approval process for Bakery articles

2006-11-27 Thread Mariano Iglesias
Guys, Any way we can speed it up? I have two articles pending authorization. Give it one of them was just added, but the other one was added last week. Maybe we can do community voting, kind of like drupal and most other CMS, where when an article receives over N posts it gets published, but als

RE: object-based models

2006-11-27 Thread Mariano Iglesias
I know baby. I was talking more into those coffe talks when you talk about what would be an interesting addition to the language. Like operator overloading. So beautiful... Even people at MS realized this and added it to C#. Damn, damn, double damn. Why can Java have it? Oh well, that's a whole

Re: beforeFilter Problem

2006-11-27 Thread nate
I think you're thinking of the startup callback, which gets called after beforeFilter. --~--~-~--~~~---~--~~ 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.co

Re: object-based models

2006-11-27 Thread nate
It's Java, you *can't* work outside of objects. ;-) --~--~-~--~~~---~--~~ 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, s

Blog tutorial view and edit post error

2006-11-27 Thread jacmgr
I tried back in July and encountered this same problem and gave up on cake. I recently came back and loaded the latest stable version of cake and using the latest pdf manual re-did the BLOG tutorial. On my localhost windows machine running apache/php4 I have these symptoms: Index page displays g

RE: PayPal Direct Payment API Component

2006-11-27 Thread Mariano Iglesias
Sure, no problem. Let's hope the article gets approved soon so you all can take a look at it. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge

Re: PayPal Direct Payment API Component

2006-11-27 Thread Claudio Poli 
whoa Mariano, thanks for that, I will look into it soon :) --~--~-~--~~~---~--~~ 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 g

Re: beforeFilter Problem

2006-11-27 Thread Adrian Godong
Yes, components DO get loaded before CakePHP access beforeFilter. You might haven't add the component to the controller $components variable. On 11/28/06, Synchro <[EMAIL PROTECTED]> wrote: > > > > Adrian Godong wrote: > > Hi, I'm trying to implement some user authentication system, and need to >

CakePHP Screencasts not working

2006-11-27 Thread AC
Hello, I am trying to view the CakePHP screencasts and I am unable to play the blog tutorial. I can forward through it, but I can not actually play it. Also, the sound on the other screencasts do not work. Any tips? Suggestions? Thanks, AC --~--~-~--~~~---~--

Re: Sessions and amfphp

2006-11-27 Thread grandpa
On Nov 27, 5:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have not yet used amf in cake, so I can't offer any specific advice. > But two possible work-a-rounds > > Option 1: Get the record id first (ie. insert a blank record into your > database), then send the record id with th

RE: beforeFilter Problem

2006-11-27 Thread Mariano Iglesias
You CAN use components in beforeFilter: function beforeFilter() { if ($this->Session->check('User')) { echo 'USER is there'; exit; } else { echo 'USER is not there'; exit; } } Try tha

Re: How Can I make my phpmailer component in bakery works?

2006-11-27 Thread ERic ZoU
Thanks. There is A *SPACE* after the ?>. IT works! BUT, someone help me about the content inside. I sent the e-mail sucessful. BUT, it contains nothing. It should be the pro. about the template. I add some testing info. in the email_body_html.thtml and the email_body_plain.thtml BUT there is no

Re: create dynamically uses

2006-11-27 Thread Grant Cox
Felix - you are correct. I hadn't actually used loadModel yet, only just heard PhpNut mention it. As I have a lot of instances in my cake app where I occasionally need a bunch of other models, I made a function to instantiate them too. I've got this in my bootstrap.php function attachM

Re: object-based models

2006-11-27 Thread nate
Agile? Uh, have you seen how many native PHP functions there are for manipulating arrays? On top of that, Cake 1.2 has a bunch of additional features for manipulating array data. As far as the code above, can you say "straw man"? http://en.wikipedia.org/wiki/Straw_Man --~--~-~--~

How can I provide multiple routes to the same app?

2006-11-27 Thread Synchro
I have a video CMS app that effectively needs two user interfaces - a regular scaffolding-style user interface, and a simple interface that's used by video player apps. The problem is that the way the video app one needs to work interferes with cake's usual routing. For example, I want to be able

Re: beforeFilter Problem

2006-11-27 Thread Synchro
Adrian Godong wrote: > Hi, I'm trying to implement some user authentication system, and need to > check current user (from session) on every controller call. I've tried > placing a beforeFilter method on AppController, but this method doesn't seem > to be executed. > > When I put the beforeFilter

RE: How do I use 'offset' instead of 'page' in FindAll query?

2006-11-27 Thread Mariano Iglesias
Then what was it? -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! -Mensaje original- De: cake-php@googlegroups.com [mail

Re: How do I use 'offset' instead of 'page' in FindAll query?

2006-11-27 Thread nate
Yes, I know. That wasn't what I was referring to. Mariano Iglesias wrote: > That's why if you look at it I'm calling the ceil() function. > > -MI > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de [EMAIL PROTECTED] > Enviado el: Lunes, 27 de N

Re: How Can I make my phpmailer component in bakery works?

2006-11-27 Thread Grant Cox
Make sure you don't have any whitespace (ie a new line) after the closing php tag, in the components/email.php file. I'm not sure why it would say the message has been sent, I haven't used that component. --~--~-~--~~~---~--~~ You received this message because y

Re: Download as CSV

2006-11-27 Thread Matt Adams
Jeff wrote: > Hi, > I would like to download all my table data as a CSV file. > How to do that using cake? Please help > Thanks in advance. You're likely going to want to look at iterating over your data set if it's of any large size (1000's of records or more). Cheers, Matt -- BASIC: A pro

Re: Bug Reporting + Contrib...

2006-11-27 Thread Ryders
Great! I will! Cheers Daniel! --~--~-~--~~~---~--~~ 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 [EMAIL P

Re: Active Resource Implementation

2006-11-27 Thread Pablo Viojo
Yes I know, forget the "pattern" term. On 11/27/06, nate <[EMAIL PROTECTED]> wrote: > > > Pablo, there is no software design pattern called ActiveResource. > ActiveResource is an ActiveRecord-like implementation for accessing > resources over HTTP. > > > > > -- Pablo Viojo [EMAIL PROTECTED] htt

RE: Active Resource Implementation

2006-11-27 Thread Mariano Iglesias
Oh well. So I was right in the end ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! -Mensaje original- De: cake-php@go

Re: Associations and Scaffolding

2006-11-27 Thread Dave Barter
Chris I whoeheartedly agree with the FAQ point. In fact, I am writing down all of the stuff I have not found in the manual and will submit it as sugested changes or FAQs. Please be assured that I have read every inch of the manual, but it did not cover the two issues/solutions I have raised abov

RE: Active Resource Implementation

2006-11-27 Thread Mariano Iglesias
Sorry, my bad :-) Maybe I've put another issue on the table with my mistake ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON!

RE: object-based models

2006-11-27 Thread Mariano Iglesias
There are so many developers thinking of arrays as a TABU. Some people still don't get it: use your language of choice for what it is good for. Don't push stuff your language was not designed to handle. Like when you talk to java developers (I've been developing java for 9 years now) most of the

Re: Active Resource Implementation

2006-11-27 Thread nate
Pablo, there is no software design pattern called ActiveResource. ActiveResource is an ActiveRecord-like implementation for accessing resources over HTTP. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP"

Re: object-based models

2006-11-27 Thread John David Anderson (_psychic_)
On Nov 27, 2006, at 1:19 PM, Evan wrote: > > i've read some posts here about object-based models in cakephp being > released for v2.0. it's great that the cakephp developers are trying > to do this. to be honest, i really hate the array-based model in v1.x > right now. it's just not as agile

object-based models

2006-11-27 Thread Evan
i've read some posts here about object-based models in cakephp being released for v2.0. it's great that the cakephp developers are trying to do this. to be honest, i really hate the array-based model in v1.x right now. it's just not as agile and not as dry/yagni as i thought cake was. imagine

Re: hierarchical path

2006-11-27 Thread nate
Try this: http://api.cakephp.org/class_model.html#181aefe1bf7efe1504692c485c83caa8 Or, you can read up on self-joins: http://groups.google.com/group/cake-php/search?group=cake-php&q=self+joins&qt_g=1&searchnow=Search+this+group --~--~-~--~~~---~--~~ You received

Re: Column names truncated

2006-11-27 Thread nate
This is an MSSQL-specific issue that was fixed a couple of releases ago. Please pick up the latest version from CakeForge. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, s

Re: Associations and Scaffolding

2006-11-27 Thread Chris Hartjes
On 11/27/06, Christoph <[EMAIL PROTECTED]> wrote: > > You might want to try using the bake.php utility. It's use was > invaluable to me to get my feet wet and everything up and running > quickly. > Perhaps this isn't a valid observation, but I have seen more problems coming out of people using b

RE: Active Resource Implementation

2006-11-27 Thread Christian Winther [cwi.dk]
Ah okay, i know of that pattern very well, thanks J From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mariano Iglesias Sent: 27. november 2006 19:07 To: cake-php@googlegroups.com Subject: RE: Active Resource Implementation He meant Active Record Pattern:

Re: Associations and Scaffolding

2006-11-27 Thread Christoph
> So, according to me I have done everything right and I go to:- > http://www./Addresses and can enter and list addresses. > Brilliant! > BUT, if I go to http://www./Customers/edit/, I cannot see the > association with Addresses which should have been picked up > automatically by the Foreign Key (

Re: Does cake protect against SQL hacks automatically?

2006-11-27 Thread nate
http://groups.google.com/group/cake-php/search?group=cake-php&q=sql+injection&qt_g=1&searchnow=Search+this+group --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email t

Re: how to echo [returns] in cake

2006-11-27 Thread gabordemeter
Thanks John! nl2br() works great! On Nov 27, 11:52 am, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Nov 27, 2006, at 9:34 AM, gabordemeter wrote: > > > > > > > Hi! I'll give an example to illustrate my problem: > > > I have a form which, among other fields, contains a texta

Re: ajax autoComplete example

2006-11-27 Thread Christoph
> Christoph a scris: > > Except I tried that. I've even tried following the bakery article that > > is based on that. But nothing I do seems to get it to work. See my > > post here: > > http://groups.google.com/group/cake-php/browse_frm/thread/ea0519608cc51b74/?hl=en# > > that still hasn't been

Re: Session problems

2006-11-27 Thread jmassi
SOLVED Finally i found the mistake. For some reason I have comented a line in session.php cake's libs folder and I didn't remeber until now that I decided to look line by line this script. Thanks for your time and responses. --~--~-~--~~~---~--~~ You

Re: Active Resource Implementation

2006-11-27 Thread Pablo Viojo
Mariano, I'n not asking about Active Record Pattern but Active Resource as presented by David Heinemeier at the RailsConf. More information can be found at [1],[2] and [3] Regards, -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net [1] http://tom.counsell.org/view/EarlyExperiencesWithActiveRe

Re: Data not saving

2006-11-27 Thread joel
Okay, well, I spent an hour "debugging" this problem, only to finally look more closely at my address bar and realize I was still on the development server! Thanks anyway... :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

hierarchical path

2006-11-27 Thread Gregory Stewart
Hi, I have a table called 'categories' with id and parent_id, linking to itself. In my view I want to show the full path of the current category, for example if you are in the category called 'Apple': Groceries > Fruit > Apple I guess I would take the current id and work my way up the hierarchi

Re: Errant IIS Installation

2006-11-27 Thread nate
I can test on IIS5, and everything seems to work okay, but I don't have a copy of IIS6 handy. I contacted a guy I know at Microsoft about getting one, so we'll see what he has to say. In the meantime, if you want to donate to the Foundation so we can buy it, that would be highly awesome of you.

Re: DB Migrations

2006-11-27 Thread Sonic Baker
Thanks Joel. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more

RE: Active Resource Implementation

2006-11-27 Thread Mariano Iglesias
He meant Active Record Pattern: http://en.wikipedia.org/wiki/Active_Record Active record is an approach to reading data from a database. A row in a database table or view is wrapped into a class, thus an object instance is tied to a single row in t

Re: Convert all files de UTF-8

2006-11-27 Thread francky06l
This editor allow you to save UTF-* with or without BOM : http://www.wolosoft.com/en/superedi/ On Nov 24, 5:34 pm, "AD7six" <[EMAIL PROTECTED]> wrote: > Hi Maxmil, > > http://groups-beta.google.com/group/cake-php/browse_frm/thread/28f129... > > errors that say "output started ... .php:1" almost c

RE: How do I use 'offset' instead of 'page' in FindAll query?

2006-11-27 Thread Mariano Iglesias
That's why if you look at it I'm calling the ceil() function. -MI -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de [EMAIL PROTECTED] Enviado el: Lunes, 27 de Noviembre de 2006 06:10 a.m. Para: Cake PHP Asunto: Re: How do I use 'offset' instead of 'p

RE: Active Resource Implementation

2006-11-27 Thread Christian Winther [cwi.dk]
Can you guide me to some information regarding Active Resource Pattern – couldn’t find anything on google looking like it From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Felix Geisendörfer Sent: 27. november 2006 17:25 To: cake-php@googlegroups.com Subject: Re: Active Res

Re: How do I use 'offset' instead of 'page' in FindAll query?

2006-11-27 Thread nate
Well yeah, i'm not sure how you would deal with a fraction of a database record... It also assumes that $offset is evenly divisible by $limit. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To p

Re: Does cake protect against SQL hacks automatically?

2006-11-27 Thread Larry E. Masters aka PhpNut
Cake handles it automatically -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Data not saving

2006-11-27 Thread John David Anderson (_psychic_)
On Nov 27, 2006, at 9:51 AM, joel wrote: > > So, the strangest thing is happening, and I don't know what else to > do. > On my development server, I am able to submit a form, and it's saving > to the database. But when I deploy it to the production server, it > does everything as though it D

Data not saving

2006-11-27 Thread joel
So, the strangest thing is happening, and I don't know what else to do. On my development server, I am able to submit a form, and it's saving to the database. But when I deploy it to the production server, it does everything as though it DID save the data, but it actually doesn't. I mean, it's

Does cake protect against SQL hacks automatically?

2006-11-27 Thread [EMAIL PROTECTED]
Hi, Does cake protect against things like SQL Injection hacks automatically, or should I still call addslashes, nl2br, and mysql_real_escape.. on all data going through $this->Model->save Thanks Guy --~--~-~--~~~---~--~~ You received this message because

Re: how to echo [returns] in cake

2006-11-27 Thread John David Anderson (_psychic_)
On Nov 27, 2006, at 9:34 AM, gabordemeter wrote: > > Hi! I'll give an example to illustrate my problem: > > I have a form which, among other fields, contains a textarea. > > In the textarea area I write the following: > > - abc > > - cde > > > Basically I first write the string "- abc", then I h

how to echo [returns] in cake

2006-11-27 Thread gabordemeter
Hi! I'll give an example to illustrate my problem: I have a form which, among other fields, contains a textarea. In the textarea area I write the following: - abc - cde Basically I first write the string "- abc", then I hit [return] twice and then write the string "- cde". After I save my f

Re: Session problems

2006-11-27 Thread jmassi
Thanks for the responses, PHP sessions are working fine I have made a test and everithing its ok. The code for the test is: --- session1.php --- session2.php I've also tried to put CAKE_SESSION_SAVE in cake mode but still not working. Thanks. --~--~-~--~~~---~-