Re: serving javascript instead of html

2006-10-17 Thread Rodrigo Tassinari
SoCalCakeBaker wrote: > Hi Rodrego, > > It doesn't look like you called render() in your controller action... > Thanks SoCalCakeBaker, a simple $this->render() at the end of the action seems to have solved the problem! I'll try some more tests, but I think that solved it... Thanks! --~--~-

Re: serving javascript instead of html

2006-10-17 Thread SoCalCakeBaker
Hi Rodrego, It doesn't look like you called render() in your controller action... B. On Oct 17, 1:05 pm, "Rodrigo Tassinari" <[EMAIL PROTECTED]> wrote: > You're right Chris, here's my code, hope you guys spot something I'm > doing wrong. > > This is the regular PHP file, which works fine: > > l

Re: Is Model::findCount supposed to work?!?!?!?!

2006-10-17 Thread SoCalCakeBaker
Well - sounds like the CakePHP team has this under control. :) Where in the 1.2 branch can I see how you guys did this? B. On Oct 17, 12:10 pm, "nate" <[EMAIL PROTECTED]> wrote: > You *can* do pagination (almost) completely in the model, but when you > see how it is implemented in 1.2, you'll

Re: Pagination not advancing results

2006-10-17 Thread AD7six
You are probably not passing the var $page to your find list($order,$limit,$page) = $this->Pagination->init(); $this->data = $this->Course->findAll(null, null, $order, $limit, $page); HTH, AD7six --~--~-~--~~~---~--~~ You received this message because you are s

Re: Pagination not advancing results

2006-10-17 Thread LikeSoy
I mean that the same five (or 20, 30, etc.) results are displayed whether you are on page one or page 101. So this is page 2: -- id vcourse_prefix course_title 1 CLA Classical Mythology 2 AST Descriptive Astronomy 3 E

Re: serving javascript instead of html

2006-10-17 Thread Rodrigo Tassinari
You're right Chris, here's my code, hope you guys spot something I'm doing wrong. This is the regular PHP file, which works fine: links.php \");\n"; echo " document.write(\"\");\n"; echo "document.write(\"Usando o Google Adsense para gerar recursos para o seu projeto livre | BR-Linux.org\")

drag id in dropRemote

2006-10-17 Thread naryga
I have a div with id="albumCover". I'm using $ajax->dropRemote() to turn it into a drop zone that calls a Controller method. It only responds when an image with the class="draggers" is dropped on it. I've got that part down just fine. My problem is that the method it is calling needs to know so

Re: serving javascript instead of html

2006-10-17 Thread Chris Hartjes
On 10/17/06, Rodrigo Tassinari <[EMAIL PROTECTED]> wrote: > > I tested both suggestions: using the ajax layout ($this->layout = > 'ajax' ) and changing the the header to header("Content-type: > text/javascript");. Both did not work. :( > > I know this is happening because of something to do with C

Re: serving javascript instead of html

2006-10-17 Thread Rodrigo Tassinari
I tested both suggestions: using the ajax layout ($this->layout = 'ajax' ) and changing the the header to header("Content-type: text/javascript");. Both did not work. :( I know this is happening because of something to do with CakePHP, because it works if I just use a regular php file to output t

Re: Re: Re: making controller methods private?

2006-10-17 Thread Samuel DeVore
yea try it On 10/17/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 10/17/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > > > no but it does make it private 'like' in cakephp in that it can not be > > called with the /controller/method from the browser. > > Hey Sam, > > Is this actually a fe

Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread brandags
Great! Thanks for your help. I'll continue to consider ACL. But since I want (non-techy) end-users to be able to manage permissions for those in their hierarchy, I don't want them to be confused with having to grant access to particlar controllers or function names (actions), etc. So in this sys

Re: Re: making controller methods private?

2006-10-17 Thread Chris Hartjes
On 10/17/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > no but it does make it private 'like' in cakephp in that it can not be > called with the /controller/method from the browser. Hey Sam, Is this actually a feature in CakePHP that it won't let object methods that start with an underscore be

Re: Re: making controller methods private?

2006-10-17 Thread Samuel DeVore
no but it does make it private 'like' in cakephp in that it can not be called with the /controller/method from the browser. On 10/17/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Just preceed the function name with a underscore.

Re: How to distinguish empty recordset from error in findAll()

2006-10-17 Thread nate
We're trying to get a dev version out in the next couple weeks. --~--~-~--~~~---~--~~ 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 th

Re: Is Model::findCount supposed to work?!?!?!?!

2006-10-17 Thread nate
You *can* do pagination (almost) completely in the model, but when you see how it is implemented in 1.2, you'll realize why that's an astoundingly bad idea. Also, "decorating" data is a task reserved for the View, and putting View logic in the Model violates the most basic principles of MVC and i

Re: making controller methods private?

2006-10-17 Thread Chris Hartjes
On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Just preceed the function name with a underscore. > /me counts to five before replying to avoid getting labeled as angry or uncaring Please note, the following rant is based on PHP, not Cake Adding an underscore to a function name DO

Re: making controller methods private?

2006-10-17 Thread nate
The ability to call base class methods directly has already been removed. Just grab the latest Cake version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to ca

Re: 1 of 3 input fields have to be filled - validate

2006-10-17 Thread Mikee Freedom
hey again Felix, hard to say what it could be without seeing the code, but have you remembered to include your loadValidation() in your model? and to call it prior to validation? this could be the problem. also, looking at your code above, unless you had global variables turned on, i don't know

Re: CakePHP.org and IE 7

2006-10-17 Thread nate
Clearly the ideal solution would be to forgo the use of Internet Explorer altogether... --~--~-~--~~~---~--~~ 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: serving javascript instead of html

2006-10-17 Thread nate
It might be because your header is wrong. header("Content-type: application/x-javascript" ); should be header("Content-type: text/javascript"); to match the type of the requested content. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: serving javascript instead of html

2006-10-17 Thread Chris Hartjes
On 10/17/06, Rodrigo Tassinari <[EMAIL PROTECTED]> wrote: > > Hello all, > > I need to serve Javascript as the output of one action, instead of > regurlar HTML. The purpose is that i want to be able to call this > action from other pages outsite cake (in another domain) like so: > > http://mysite/

serving javascript instead of html

2006-10-17 Thread Rodrigo Tassinari
Hello all, I need to serve Javascript as the output of one action, instead of regurlar HTML. The purpose is that i want to be able to call this action from other pages outsite cake (in another domain) like so: http://mysite/controller/action"; type="text/javascript"> So the output of my act

Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread AD7six
The only time an app controller instance is ever created is when you have an error ;). But is that really relavent, from yoru first message: you have code in your app controller referring to accessExceptions The error message doesn't refer to your users controller your pages controller (the on in

Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread brandags
Absolutely. But when does Cake ever create an Animal alone? Doesn't it always create a Dog, which is an animal? Or in Cake terms: When do we ever have just an App? Won't it always be a user? Does Cake ever create an AppController by itself? Isn't it instead creating a UserController which extends

serving javascript instead of html

2006-10-17 Thread Rodrigo Tassinari
Hello all, I need to serve Javascript as the output of one action, instead of regurlar HTML. The purpose is that i want to be able to call this action from other pages outsite cake (in another domain) like so: http://mysite/controller/action"; type="text/javascript"> So the output of my act

Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread Trevor Burton
if the UserController extends AppController then (essentially) when you create an instance of the UserController class it contains all the members of the AppController Class as well as what's defined in UserController. They're created effectively as a single object. So, by putting something in User

CakeBot on #cakephp

2006-10-17 Thread John David Anderson (_psychic_)
Quick FYI: You can ask her to point you to the pastebin using "~bin" or "~paste". If you want someone else to paste something you can "~tell nickName about bin", or "~tell nickName about paste". Doing this autofills your IRC nick in a form field for the paste. Instead of copying and pastin

Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread brandags
Alright. That makes sense. But since the Users controller extends the App controller, if I go to a page like: /users/add Shouldn't that be creating a User object rather than an App object? So that when the beforeFilter runs, it's running through the User object? For example, if I put the beforeFil

Re: ajax to update form fields?

2006-10-17 Thread francky06l
Well it's what I mean by "ajaxifying" the "select" trough the onChange ... Now just have to choose among solutions :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send e

Re: Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread D.Pape
hi. you can´t access the variables of the user controller in your app controller!! app controller is the base class of user controller, so you can access methods and variables of the app controller in your user controller, but the app controller don´t know the user controller!! --~--~-

Accessing variable in child class from app_controller's beforeFilter

2006-10-17 Thread brandags
I'm setting a few variables in my UserController that I want to access in my AppController (in the beforeFilter). But I'm getting this error: Notice: Undefined property: PagesController::$accessExceptions in C:\websites\klickfile.com\app\app_controller.php on line 67 I get the same error with the

Re: Convincing my company to use Cake

2006-10-17 Thread MrTufty
Ok. I believe the IonCube tools allow for copyright notices to be left unencoded anyway, I'd have to check the documentation to be sure but I'm sure it mentioned something along those lines. On Oct 17, 3:51 pm, "nate" <[EMAIL PROTECTED]> wrote: > I'll ask gwoo to weigh in here, since he's the IP

Re: Convincing my company to use Cake

2006-10-17 Thread nate
I'll ask gwoo to weigh in here, since he's the IP attorney, but I'm pretty sure the only stipulations with the MIT License are with regard to the copyright notice. So if you wanted to go to the trouble, you could remove the copyright from the files, encode them, then add the copyright back at the

Re: Session and sessionid

2006-10-17 Thread [EMAIL PROTECTED]
So, now i figured out how to handle sessions. And it is extremely simple! For all those, who are also thinking about using sessions, here is what I did: In the core.php in the /app/config folder I've set the following line to tmp, because I want cake to store the data in the tmp folder de

Re: Convincing my company to use Cake

2006-10-17 Thread bbuchs
IANAL, but I think that the no encryption/modification restrictions apply to an application that you're either selling or giving away. If you supply your client with an un-modified Cake Core, you've lived up to the license. Anything they do after that is for their own use. There's nothing stoppin

Re: Convincing my company to use Cake

2006-10-17 Thread MrTufty
You're telling me... I've been pushing the need since I started here to finish up a couple of other projects that are nearly ready to go online... trouble is this client takes up so much of our time, with us being only a small team, that we don't really get chance to tackle anything else. I'll be

Re: Convincing my company to use Cake

2006-10-17 Thread Chris Hartjes
On 10/17/06, MJ Ray <[EMAIL PROTECTED]> wrote: > > MrTufty <[EMAIL PROTECTED]> wrote: [...] > > We're in a position with one of our clients where we simply can't trust > > them not to tamper with the code we've written for them. This would be > > ok, but anything that goes wrong with it they blame

Re: Convincing my company to use Cake

2006-10-17 Thread MrTufty
Sadly, not my decision to make... although that checksum idea might not be a bad one for future reference, I'll put that forward to the directors. I don't think we'll be dumping them though, they really are our main client at the moment and their business is worth a huge amount. Plus they'd probab

Re: Convincing my company to use Cake

2006-10-17 Thread MJ Ray
MrTufty <[EMAIL PROTECTED]> wrote: [...] > We're in a position with one of our clients where we simply can't trust > them not to tamper with the code we've written for them. This would be > ok, but anything that goes wrong with it they blame us for even when > it's their fault. [...] Why not chec

Re: Convincing my company to use Cake

2006-10-17 Thread Chris Hartjes
On 10/17/06, MrTufty <[EMAIL PROTECTED]> wrote: > > This might unfortunately be a sticking point. > > We're in a position with one of our clients where we simply can't trust > them not to tamper with the code we've written for them. This would be > ok, but anything that goes wrong with it they bla

Re: ajax to update form fields?

2006-10-17 Thread MrTufty
This wouldn't strictly speaking be Ajax, at least not the way I would do it. I'd trap the onchange event in the select tag: Then have some javascript code to automatically select the other options. You COULD do it with Ajax (and this just occurred to me while writing this post) by putti

Re: ajax to update form fields?

2006-10-17 Thread francky06l
You have to attach a remote_url to the onSelect event. There was a tuto about Ajax with check boxes, basically it's the same approach. When selecting a value, you would call an action using Ajax and will update the div's that contains the fields. --~--~-~--~~~---~--~-

Re: Convincing my company to use Cake

2006-10-17 Thread MrTufty
This might unfortunately be a sticking point. We're in a position with one of our clients where we simply can't trust them not to tamper with the code we've written for them. This would be ok, but anything that goes wrong with it they blame us for even when it's their fault. So, we use IonCube En

Re: Convincing my company to use Cake

2006-10-17 Thread jitka
[EMAIL PROTECTED] wrote: > you can sell your cake-based apps for money, but you are not allowed to > encrypt/remove copyright/... from the cake files. ...even from files from 'app' directory, which is quite annoying as it (besides other things) little bit complicate auto generated documentation

Re: Convincing my company to use Cake

2006-10-17 Thread MrTufty
Luckily, I've been using Cake myself for the past couple of months - so I'm about as much as we're likely to need for the moment :) The other options are: keep doing things the same way they've always been done here (we have a function library, but the functions it includes are pretty specific to

Re: Convincing my company to use Cake

2006-10-17 Thread sicapitan
You can use Cake, AND Smarty! What are your other options to be honest? Write it all from scratch? Use another framework? Don't forget open source means community, and the Cake community is growing rapidly, so most problems you'll encounter others have encountered. Cake is also growing rapidly

Re: 1 of 3 input fields have to be filled - validate

2006-10-17 Thread [EMAIL PROTECTED]
But now I get the error: "Warning: Delimiter must not be alphanumeric or backslash in app/app_model.php on line 82". In other topics I've read that maybe the function for the validation is not recognized. But in my example there is no chance of spelling it wrong (the example from my the post befor

Re: Convincing my company to use Cake

2006-10-17 Thread [EMAIL PROTECTED]
you can sell your cake-based apps for money, but you are not allowed to encrypt/remove copyright/... from the cake files. if your company doesnt know what the benefits of a framework are, i wonder what kind of management is leading that company. I can't imagine any software company *not* using a

Re: Session and sessionid

2006-10-17 Thread [EMAIL PROTECTED]
Hi Dieter, 30 Minutes is more than enough. It only needs to be saved in the session. So, then I will try to figure out, how $session->write works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. T

Re: Session and sessionid

2006-10-17 Thread [EMAIL PROTECTED]
how long does that data need to stay in the database? only during the session? (like 30, 45 minutes, whatever?) then you could just save it all save it in the session ($session->write()) if longer then that, i would just create a user_id field in the datatable to store the user_id. --~--~--

Convincing my company to use Cake

2006-10-17 Thread MrTufty
Hi guys, I'm working as a web developer now, and I've been trying to convince the directors of the company that using some open-source libraries to build our sites would be a good move. I've almost managed to convince them that having a template engine is a good idea - with demonstrations of what

Re: How to distinguish empty recordset from error in findAll()

2006-10-17 Thread milicic.marko
YEah ! This will be cool feature in cake 1.2 Nate, can you tell us when we can expect 1.2 to be published? tnx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, s

Re: 1 of 3 input fields have to be filled - validate

2006-10-17 Thread [EMAIL PROTECTED]
OK, I figured that one out. I simply forgot to write the "" tags in the error.php file. Stupid mistake... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-p

Re: 1 of 3 input fields have to be filled - validate

2006-10-17 Thread [EMAIL PROTECTED]
Thanks for the links. I have followed this tutorial step by step, but somehow there is a error in my validation rules: My model: var $validate = array( 'email1' => array('enteredAdress','Enter at least one contact'), 'email2' => array('enteredAdress','Enter at least one contact'

Re: 2 forms and 1 submit button

2006-10-17 Thread [EMAIL PROTECTED]
Thanks, I will give it a try! --~--~-~--~~~---~--~~ 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 PRO

Re: Session and sessionid

2006-10-17 Thread [EMAIL PROTECTED]
Thanks so far for the answers! I have an index-page with a form. The user enters data and saves it to the database (data-table). The data-table has a "data_id" as key. Now I would like to save this actual data_id for the user. So the user can go to different pages and when he comes back to the in

Re: Session and sessionid

2006-10-17 Thread [EMAIL PROTECTED]
sessions are given an id automatically by the php engine, you don't need to do anything manually for that. same about the handling, it's all automatically. you can basically just use the session without doing any checking on your own, you can trust php for that. (it's not perfectly secure, but it

Re: ajax observeField on a select

2006-10-17 Thread Steniskis
Not yet, thank you Léo, I will. Have a nice day Sten --~--~-~--~~~---~--~~ 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