Re: Update gone wrong.

2007-10-30 Thread junal
im kinda facing similar problem once i uploaded cake 1.2 pre-beta in the server,. this bellow msg im getting which is really weird... Warning (2): loadcomponent(D:\apache\htdocs\sample\cake\libs\controller \components\session.php) [function.loadcomponent]: failed to open stream: No such file or d

Re: Space before layout content - Resolved

2007-10-30 Thread Wayne Fay
Thanks for following up, Langdon. This is a not-uncommon issue with PHP, unfortunately. I wish there was a simple way to check non-view PHP files for spaces -- anyone have a working regexp for grep or a similar utility? Essentially, any space in any non-view file (outside of tags) should be ident

How to make KeyGenerator in Cake

2007-10-30 Thread a.php.programmer
because some reasons, I can't use auto_increment. so I need a KeyGenerator generate ID. I generate ID in beforeSave function. but if id isn't in model whitelist. save will fail. if id is in model whitelist. when process a update action, this will be a ID sql injection. How to make KeyGenerator

Email Component Minor Fix in 1.2

2007-10-30 Thread MikeK
I use the email component and it was driving me nuts inserting a newline in the front of every email (any 1.2 version including pre beta). I finally traced it to this: file cake/lib/controller/component/email.php on or around line 477: $this->__header .= 'Content-Transfer-Encoding: 7bit' . $this-

Re: Problems setting up phpGACL

2007-10-30 Thread bujanga
Are you using cakephp 1.1? I previously used the phpGACL with success. Since switching to cakephp 1.2, I have migrated to the built-in ACL scheme with a set up similar to what Geoff uses. (http://lemoncake.wordpress.com/2007/07/19/acl-with-groups/) Anyway, take a look at this thread. http://grou

Re: How to render one element several times in the same page without rendering multiple headers/footers ?

2007-10-30 Thread Grant Cox
You will not be able to use the normal method of views and layouts if you want continuous output to the user like that. You will have to simply have echo statements directly from your controller. I think passing an array of results to the view is a better solution. --~--~-~--~~

Re: CSS and Image dir skipping

2007-10-30 Thread Grant Cox
It is only trying to access a Css or Img controller because you have links to missing files - such as /css/some.css . If that file exists in your webroot, then it is immediately returned. If it does not exist, the request is sent through cake, which expects a CssController. So, the problem is t

Re: Space before layout content - Resolved

2007-10-30 Thread Langdon Stevenson
This was caused by a space before the I am developing an action (in a Cake 1.1 app) that outputs xml and have > hit a problem that has been mentioned here before but never resolved. > > I am getting a single space character before the output of the layout > begins. > > I have checked other re

Re: Model not saving HABTM relations -- I'm missing something simple here...

2007-10-30 Thread Deane
Chris: Thanks. What I found was that I needed to pass the entire $this->data structure, rather than just the "User" element. So, not this -- $this->User->save($this->data['User']) -- but this -- $this->User->save($this->data) This seems to have worked. Deane On Oct 30, 3:18 pm, "Chris Har

Re: PDF Creation in Cake 1.2

2007-10-30 Thread kodienz
Jst to confirm a bit more about my database set up. Table clients id name address etc - Table proposals id client_id created -- Table products id product price - Tab

Re: PDF Creation in Cake 1.2

2007-10-30 Thread kodienz
Yes i Agree, I just meant if anyone wanst to take a look at my cake files and database they can email me and ill send it to them. I will indeed post how i got my PDF working once that happend! Thanks Wayne! On Oct 31, 10:37 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > It doesn't make a lot of sen

Re: PDF Creation in Cake 1.2

2007-10-30 Thread Wayne Fay
It doesn't make a lot of sense to have this kind of discussion in a private email thread... It is a lot more helpful to keep these discussion in the public forum, to benefit other current and future users of Cake who want to create PDFs. Wayne On 10/30/07, kodienz <[EMAIL PROTECTED]> wrote: > >

Re: PDF Creation in Cake 1.2

2007-10-30 Thread kodienz
If anyone feels like emailing me: [EMAIL PROTECTED] and help a newbie create a prototype please please feel free!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send emai

Re: SWF files and cakephp

2007-10-30 Thread Wayne Fay
There have been several emails recently about SWF with Cake. Do a search in the Google Group for Flash or SWF, perhaps one of those threads will be of help. Wayne On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi everybody, I have a swf application album working 100%, but when I >

SWF files and cakephp

2007-10-30 Thread [EMAIL PROTECTED]
Hi everybody, I have a swf application album working 100%, but when I try to use it with cakephp I have some problems: I put the file on /webroot/files/ directory, BUT, in the .fla file my designer wrote the paths like "./images". "./foo". I've been trying to change those paths to "/files/foo" an

Re: Model not saving HABTM relations -- I'm missing something simple here...

2007-10-30 Thread Chris Hartjes
On 10/30/07, Deane <[EMAIL PROTECTED]> wrote: > > So, when I save, what should I pass the save() method of the user > model so it gets the inputted Zone associations? > > Deane Hey Deane, Check out the (extremely alpha) Cake 1.2 manual at this link: http://tempdocs.cakephp.org/#TOC78081 that s

Re: Variable error

2007-10-30 Thread MrTufty
Pos, Really, you shouldn't have posted this here as it's a general PHP question, not related to CakePHP at all. But the thing you're doing wrong here is simple. Where you have: echo var1; echo var2; You should have: echo $var1; echo $var2; Variables need to be prefixed with $ wherever they a

Model not saving HABTM relations -- I'm missing something simple here...

2007-10-30 Thread Deane
I cannot get an model with a HABTM relation to another model to save its relation data. I can see *why* this is happening, but I'm not sure how to fix it. Read on, and I'll explain. The models and "User" and "Zone". In my edit view for User, I have this: selectTag("Zone/Zone", $Zones, null, a

Re: PDF Creation in Cake 1.2

2007-10-30 Thread kodienz
Hi there, The PDFs need to be generated when required so im not sure thay way will be ideal Thanks heaps though. Could be useful later! On Oct 31, 4:59 am, francky06l <[EMAIL PROTECTED]> wrote: > I use xfdf files that have an href to a pdf (with form fields) on the > site. The merge is done

Re: PDF Creation in Cake 1.2

2007-10-30 Thread Christophe Cholot
Hi, To generate PDFs, i used the fpdf library. In your vendor directory, create a directory named fpdf and simply drop fpdf classes into it, then, lets say you want to render / download a pdf from your controller : - in views/layouts : create a file 'pdf_layout.php' : - in controllers/orders_c

Variable error

2007-10-30 Thread Pos Weyb
Hi, I am a newbie to PHP. I am working my way through a PHP class on Lynda.com and have run into the following error when trying to define simple variables. I searched the messages for this type of error and I suspect I have an error reporting setting too high??? But I still don't know what to

Dealing with select boxes and languages

2007-10-30 Thread jwerd
I have a quick question on how you deal with select boxes in cake that are dependent of language. As in, my site can support several languages and I need everything to reflect that language so to not cause confusion. But at the same time I want a clean way that works interchangeably with the mo

Re: PDF Creation in Cake 1.2

2007-10-30 Thread Reggie Mason
The bakery articles were for 1.1.x.x For 1.2 you will need to add a variable to the helper classes class PdfHelper { . . . var $helpers = array(); . . . } I hope this helps. -reggie On Oct 30, 6:41 am, kodienz <[EMAIL PROTECTED]> wrote: > Im currently using Version 1.2.0.5427alpha. > > I ha

Re: PDF Creation in Cake 1.2

2007-10-30 Thread francky06l
I use xfdf files that have an href to a pdf (with form fields) on the site. The merge is done in the client browser. On Oct 30, 12:41 pm, kodienz <[EMAIL PROTECTED]> wrote: > Im currently using Version 1.2.0.5427alpha. > > I have tried both of these. > > http://bakery.cakephp.org/articles/view/pd

CSS and Image dir skipping

2007-10-30 Thread Paolo
Hi all! How cani tell cake not to look for img or css controler? I mean, in my website I setup cake in a subdir, where i also added an img folder. How can i tell cake non to try to execute an img controller? Also, I've put a css (cake.custom.css) in the css dir, but while it correctly opens cake.g

Validation Errors in Elements

2007-10-30 Thread Wi1d
I'm working on a project that has a quick contact form that send emails to the site owner. The form is in an element and available to the whole site. I'm using a controller called Mailer to handle this. Mailer has a model to validate both fields, email and message, and uses no tables. If a user f

Re: Validation on NON obligatory fields and allowEmpty

2007-10-30 Thread Wayne Fay
Hey that's quite nice. Thanks for posting it back to the thread, I'll probably use that soon... Wayne On 10/30/07, senser <[EMAIL PROTECTED]> wrote: > > Finally I solved it: > > 'reminder'=>array( 'date'=>array('rule'=>array('date', > 'format'=>'ymd'), 'allowEmpty'=>true, 'required'=>false), >

Re: Baffling error when trying to put ACL check in beforeFilter

2007-10-30 Thread Claudia
In case someone else searches for it: Adding the line $this->Acl->startup($this); before the call to $this->Acl->check seems to work fine. Claudia On Sep 21, 10:03 pm, 2000Man <[EMAIL PROTECTED]> wrote: > What was the final solution to this problem (putting > parent::beforeFilter(); as first lin

Re: PhpGaclComponent -> Can't seem to get working...

2007-10-30 Thread Dan Ballance
btw, this is: cake 1.1.13.4450 PhpGacl 1.0.2b On 30/10/2007, Dan Ballance <[EMAIL PROTECTED]> wrote: > > Hi folks, > > I have been scouring google and this email list for any help with this, > but no joy after several hours. Think I'm going to have to cry for help. > Here goes: > > I have PhpGac

PhpGaclComponent -> Can't seem to get working...

2007-10-30 Thread Dan Ballance
Hi folks, I have been scouring google and this email list for any help with this, but no joy after several hours. Think I'm going to have to cry for help. Here goes: I have PhpGacl successfully installed in my application (ie i can go to /phpgacl/ and access the admin control panel). From there I

Re: Update gone wrong.

2007-10-30 Thread Mech7
mmm strange i tried it and the problem only occurs when the cake dir is outside the app dir.. when the app dir is togheter with the new version of 1.2 it does work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ca

Re: Passing data from app_controller to model

2007-10-30 Thread francky06l
Maybe $this->Model->data['site']... On Oct 30, 1:55 am, Sharkoon <[EMAIL PROTECTED]> wrote: > I want to do some with afterFind(); > > What I want is do a find(); > and then: > > function afterFind($results){ > foreach($results as $result){ > $result['Page']['title'] =

Re: Model used by all controller

2007-10-30 Thread cakeFreak
If you put --- $uses = array( "myglobalmodel"); --- in your AppController, the you can use --- $this->myglobalmodel->BLABLABLA --- in a

Re: Model used by all controller

2007-10-30 Thread Tulio Faria
You could create a component to do this... Inside the controller you load your models using loadModel function. []'s On 30 out, 09:48, Cristian Vrabie <[EMAIL PROTECTED]> wrote: > Hey guys, > I'm in a sittuation where I need all my controllers to use a global > model + their specific models. My

Re: Looking for a Cake 1.2 sample application with ACL and Auth

2007-10-30 Thread Mech7
I thought there where allot of things changed with ACL? On Oct 30, 9:14 am, Adwin Wijaya <[EMAIL PROTECTED]> wrote: > the ACL should be similiar with the 1.1 ;) > you can use IBM tutorial for the ACL. > > On Oct 30, 6:53 am, lemp <[EMAIL PROTECTED]> wrote: > > > In the last few days, I started a

PDF Creation in Cake 1.2

2007-10-30 Thread kodienz
Im currently using Version 1.2.0.5427alpha. I have tried both of these. http://bakery.cakephp.org/articles/view/pdf-helper-using-pdf-php http://bakery.cakephp.org/articles/view/pdf-helper-using-pdf-php Basically I am creating a small quoting application. Where a user simply selects a 'client'

Model used by all controller

2007-10-30 Thread Cristian Vrabie
Hey guys, I'm in a sittuation where I need all my controllers to use a global model + their specific models. My ideea is to add in the AppControler class the $uses = array( "myglobalmodel"); but then i don't know if this will stack with the default controller of every module (for example if i

Re: Strange behavior usage problem

2007-10-30 Thread MoD
On Oct 27, 11:28 am, AD7six <[EMAIL PROTECTED]> wrote: > On Oct 26, 4:03 pm, MoD <[EMAIL PROTECTED]> wrote: > > > > > Hello everyone! > > I'm currently developing a project using CakePHP version 1.2.0.5875 > > pre-beta though I'm also familiarizing myself with it. I used a > > TreeBehavior for c

Re: Empty page response

2007-10-30 Thread Claudia
I fixed this problem on my (local) machine by changing the translation function __ in the basics.php file. The translation function __ uses debug_backtrace() to find out where a translation was called from which can cause problems in combination with the zend optimizer extension. But as all the t

Re: Looking for a Cake 1.2 sample application with ACL and Auth

2007-10-30 Thread Adwin Wijaya
the ACL should be similiar with the 1.1 ;) you can use IBM tutorial for the ACL. On Oct 30, 6:53 am, lemp <[EMAIL PROTECTED]> wrote: > In the last few days, I started a new project with the latest release > of Cake (1.2.0.5875pre-beta) and have spent several hours trying to > wrap my head around

Re: 1.2, AuthComponent: Call to a member function isAuthorized() on a non-object

2007-10-30 Thread a.php.programmer
$this->auth->authorize = 'controller'; On 10月30日, 上午4时09分, "Martin Schapendonk" <[EMAIL PROTECTED]> wrote: > After updating to pre-beta r5875, my app fails after login with: > > Call to a member function isAuthorized() on a non-object in > path\to\cakephp\cake\libs\controller\components\auth.php

Re: converting DB tables from latin to utf-8

2007-10-30 Thread Eduardo Romero
I did this some time ago and worked just fine: [EMAIL PROTECTED] $ iconv -t UTF-8 -f ISO-8859-1 linuxer-latin1.sql - o linuxer-utf.sql -t => to -f => from -o Hope that helps. - Eduardo On Oct 29, 11:31 am, cakeFreak <[EMAIL PROTECTED]> wrote: > Hey guys, > > I need to convert all tables of a

check before routing

2007-10-30 Thread Adwin Wijaya
can we check or format the url before doing the routing ? if we have www.example.com/userid/controllers i want to check first, whether the user exist on the db or not ... if it is exist then it will save the userid on the session tracking and then use the controller but if the userid is not exist