beforeSave()

2008-02-25 Thread etapombas
Eu preciso saber qual ação do controlador chamou essa função. Por exemplo $this - action, mas dentro do model não rola esse comando =/ --~--~-~--~~~---~--~~ Você recebeu esta mensagem porque está inscrito no Grupo Cake PHP Português em Grupos do Google. Para

Re: beforeSave()

2008-02-25 Thread Bruno Trazzini
É que assim, eu tenho uma tabela de clientes e outra de filhos Na acao cadastrar eu gravo as 2 informações de uma vez. E no alterar edito apenas as infos do cliente, não mexo em nenhum dos filhos daquele cliente. Dai no modelo eu verifico a acao do controlador, se estiver cadastrando eu

Re: Counting on subselects

2008-02-25 Thread francky06l
I use the finderQuery of the hasMany relation, I call bindModel before paginate. Suppose a Customer has many Contract, in paginate : $finderContract = 'SELECT DISTINCT Contract.customer_id, COUNT(Contract.id) as contractCount '; $finderContract .= 'FROM contracts as Contract ';

Re: Counting on subselects

2008-02-25 Thread AD7six
Adam Royle wrote: If you want to sort on the column as well, I suggest you create a counter cache. Basically, you store the count of subitems in a field in the main table, which is updated on create/update/delete. There is even a behaviour that can do this automatically for you.

Re: Validation criteria alphaNumeric doesn't accept special chars

2008-02-25 Thread avairet
@grigri : I understand your comment. Of course, a regex is not a solution for all alphabets. I thought about locale purpose, because in my case, the regex is simply /[a-z0-9]$/i and the accented characters are validated by Cake! @Samuel : as soons as I have time for that, I will search a

Re: Auth Component (1.2b), writing Auth.redirect to session before it is destroyed

2008-02-25 Thread [EMAIL PROTECTED]
The reason I did not post any code is that it is pretty much straight out of the popular tutorials linked to in Frequent Discussions. It is pretty stripped down now that I have started poking around. No ACL or anything like that. The wrong page is defined as: not the page that AuthComponent is

Re: Model primarykey

2008-02-25 Thread avairet
Yes Mr Yellow, I don't understand why core team always say wontfix?! Because it's an important issue for me and many others developers, because that broke the relational model and theory. Additionally, there is a risk for performances. We are using Cake to improve productivity and repetitive

CakePHP 1.2 Validation on Client Side

2008-02-25 Thread manish
Hi I am using jquery through pquery helper class for my AJAX calls to my forms. I want to apply validation to my form form fields. But I don't need to validate anything from the server side for my fields. So I am looking for some helper or so, through which I could call cakephp builtin

Re: Counting on subselects

2008-02-25 Thread francky06l
Hi AD, I have seen the counterQuery option for hasMany association but do not know much about it .. Do you have some usage sample of this ?? Cheers Franck On Feb 25, 9:29 am, AD7six [EMAIL PROTECTED] wrote: Adam Royle wrote: If you want to sort on the column as well, I suggest you create a

Re: Counting on subselects

2008-02-25 Thread Adam Royle
Ahh awesome, thats good to know! Cheers, Adam On Feb 25, 6:29 pm, AD7six [EMAIL PROTECTED] wrote: Adam Royle wrote: If you want to sort on the column as well, I suggest you create a counter cache. Basically, you store the count of subitems in a field in the main table, which is updated

Re: formHelper-inputs example

2008-02-25 Thread Matias Lespiau
Hi, Hi, I'm trying to use the inputs method to logically group a couple of textfields but I haven't figured out how to specify the legend of the fieldset. For example: ?php echo $form-inputs(array('ftp_user',ftp_password')); ? Creates the fieldset but with a default legend of New

Re: Working out the model name of a controller

2008-02-25 Thread RichardAtHome
Hi Zoe, That's the method I've been using. Not sure if there is a 'better' way, but it 'works' :-) On Feb 23, 10:11 pm, MonkeyGirl [EMAIL PROTECTED] wrote: Hi again! I'm discovering the joys of moving a lot of things from individual controllers to the app_controller. This means I need to be

Cake 1.2 Auth Component Access Denied for Invalid URL's

2008-02-25 Thread BlenderStyle
I'm using the Auth Component (which is freakin' awesome), but I've run into a problem. When a user enters an invalid URL (action doesn't exist), the Auth component is treating it is a denied action. Has anyone else experienced this problem? --~--~-~--~~~---~--~~

$form-dateTime using minYear/maxYear problem

2008-02-25 Thread Mouse[ON]
Hi guys, Anyone tried using echo $form-dateTime(Model.field, 'YMD', NONE, null, array('minYear'=1900, 'maxYear'=date('Ymd')), false); ?? because i don't know maybe its just for me but if i add minYear and/or maxYear in options array and try to load web page my server just eats all memory in

Re: CakePHP v1.2 stable enough for production?

2008-02-25 Thread RichardAtHome
I've been using 1.2 in production for some time now :-) On Feb 23, 8:42 pm, Greg Baker [EMAIL PROTECTED] wrote: I know its beta.. But I'm wondering if people are using 1.2 in production environments? --~--~-~--~~~---~--~~ You received this message because you

Content Modules? How to do that?

2008-02-25 Thread NilsR
Hi all :) I'm currently working on a CMS-Like webapp. You're able to add an arbitary amount of content-elements to a page - which are sortable. Everyhtings workin fine. Now i want these content-elements to be some sort of modules. So that i can have several different content-element- types like

Rendering only the view/element without layout

2008-02-25 Thread Novice Programmer
Hello guys, This might be a very specific/naive question. Please bear with me... Actually what i am doing is poritng our existing application based on a template engine to Cake. In our application We used to show a javascript window in which a form is shown. This form is a separeate html window.

Re: Rendering only the view/element without layout

2008-02-25 Thread manish
Hi Novice, If I understand your requirement correctly, I think this is a very common requirement with baking. What you have to do is to define a new layout with no headers, footers or so(means no other content than what you want to be displayed on the new opened window and in the body of this

Re: Working out the model name of a controller

2008-02-25 Thread grigri
I think you're looking for $controller-modelClass It defaults to either the first uses() model, or Inflector::classify($controllerName) On Feb 25, 10:15 am, RichardAtHome [EMAIL PROTECTED] wrote: Hi Zoe, That's the method I've been using. Not sure if there is a 'better' way, but it 'works'

Re: Rendering only the view/element without layout

2008-02-25 Thread Novice Programmer
Hello Manish, you got the problem correctly but i think i missed one clause in the statement. If the javascript is disabled then this custom window wont open up and the whole layout would be displayed(with headers and footers of course). In legacy how we used to achive this was to pull this form

Re: ACL explained for 1.2?

2008-02-25 Thread leo
Thanks. The lemoncake was one of the links I found wanting. I'll work through your tips when I move back onto this portion of the development. Thanks again. On Feb 21, 6:00 pm, aranworld [EMAIL PROTECTED] wrote: For starters, you need to get familiar with the Cake console ACL manager. That

Front-end model

2008-02-25 Thread Darkman_dd
Hello, i have a question: i have a model named admin where the admins of the site can write an article, edit it, delete it etc. It's assosiated with model section so every article must belong to a section. How can i make a model articles that doesn't have a database connected to it but it can

how to add a controller function to approve comments??

2008-02-25 Thread jelmer
I'm working on a basic website based on cakephp and already have comments working, I added a field to the database which defaults to 0, which means the comment has not been approved yet, so I've added a moderate function to the comments controller showing all the comments which haven't been

Model Assosiations

2008-02-25 Thread Darkman_dd
Hello, i have a question: i have a model named admin where the admins of the site can write an article, edit it, delete it etc. It's assosiated with model section so every article must belong to a section. How can i make a model articles that doesn't have a database connected to it but it can

Model Association

2008-02-25 Thread Darkman_dd
Hello, i have a question: i have a model named admin where the admins of the site can write an article, edit it, delete it etc. It's assosiated with model section so every article must belong to a section. How can i make a model articles that doesn't have a database connected to it but it can

Re: Model Assosiations

2008-02-25 Thread Darkman_dd
Because my real question (before starting coding) isn't clear in the above message, here it is: I just want to have a model to publish the articles (which are written in admin model and have an association with the section model) to the frontpage so visitors can view them there. I'm trying to do

Question about multple check box

2008-02-25 Thread Reny
Hi all, I have an HABTM relation beetween Users table and Categories table: I have a joint table utenti_has_category and I have set well the relation in my User model. In my view I display well with echo $form-input('Categories', array('options' = $categories, 'multiple' = 'checkbox')); a

Re: Is it possible to validate a file upload?

2008-02-25 Thread Blackymetal
The file validation is not implemented yet, i had to write the code (works for me) and uploaded it to trac.cakephp.org, This is the ticket https://trac.cakephp.org/ticket/4170 On Jan 11, 12:41 am, Louie Miranda [EMAIL PROTECTED] wrote: I just want to be able to validate a file upload, but

Re: how to add a controller function to approve comments??

2008-02-25 Thread the_woodsman
The simplest way is to have the approve method, when called: - perform the DB update, - set a flash message, - redirect back to the originating page (the refferer, usually available in a controller via the referrer() method). You should also make the links mini forms that do HTTP POST requests

[4 cakephp developer] Cakephp 1.2 beta issue

2008-02-25 Thread Reny
hi all, I have some issue about cakephp 1.2 beta. I'm working on field date and time and I had problem that I have solved about date, time and localization 1) I have a date field in my db about a birthdate (in italian 'nascita') of an user. In form registration I have: ?php echo

Re: SQLite

2008-02-25 Thread Thiago Paes
Hi Yocto, a few months ago, i write a little and simple app using Cake and Javascript to list the countries. A link for download is in my personal site ( http://www.thiagopaes.com.br/files/mundo.tar.gz) Use and read the code, it is simple to understand. I hope that helps, Thiago --- On Sun,

Re: Model primarykey

2008-02-25 Thread nate
On Feb 13, 8:25 am, avairet [EMAIL PROTECTED] wrote: Only one thing: a Primary Key is not equal to Unique not null index! That's exactly what I've been saying from the beginning. The difference is, one is an application key which has meaning within the context of the application itself, and

Re: CakePHP 1.2 Validation on Client Side

2008-02-25 Thread MattC
Check out: http://www.pseudocoder.com/archives/2008/02/17/automagic-javascript-validation-helper-beta/ It uses jQuery, but not AJAX. Instead it converts the validation rules to JavaScript (where possible). -Matt www.pseudocoder.com On Feb 25, 4:09 am, manish [EMAIL PROTECTED] wrote: Hi I

Re: Model primarykey

2008-02-25 Thread nate
On Feb 25, 4:07 am, avairet [EMAIL PROTECTED] wrote: Yes Mr Yellow, I don't understand why core team always say wontfix?! Because it's an important issue for me and many others developers, I hope you now understand from my comments above that whether or not it's an issue for you personally is

Re: Model primarykey

2008-02-25 Thread nate
On Feb 24, 8:13 pm, Mr-Yellow [EMAIL PROTECTED] wrote: The responses to tickets relating to this issue in trac usually have wontfix and a short non-explainatory note basically saying piss off and stop asking you don't need this, we know best. Well, I'm really sorry you read such a demeaning

WTF!!!! Deleted tickets

2008-02-25 Thread Mr-Yellow
Are we missing out on a bunch of bugs in Cake due to poor management of tickets? This here is a confirmed bug. I have posted the fix. The ticket gets deleted with no resolution? I'm GOBSMACKED Well if anyone wants patches for broken bits of CakePHP, I'll post them here from now-on rather

Re: Model primarykey

2008-02-25 Thread Mr-Yellow
So all the threads asking why you can't do compound primary keys are just my imagination then... Cool good to know I'm delusional. -Ben On Feb 26, 12:42 am, nate [EMAIL PROTECTED] wrote: On Feb 25, 4:07 am, avairet [EMAIL PROTECTED] wrote: Yes Mr Yellow, I don't understand why core team

Re: Model primarykey

2008-02-25 Thread Mr-Yellow
Um.. I fixed some bugs today and provided the patch. The ticket was deleted. So much for open source. -Ben On Feb 26, 12:37 am, nate [EMAIL PROTECTED] wrote: On Feb 24, 8:13 pm, Mr-Yellow [EMAIL PROTECTED] wrote: The responses to tickets relating to this issue in trac usually

Re: WTF!!!! Deleted tickets

2008-02-25 Thread Mr-Yellow
For those that want working code for HABTM using with and a $primaryKey specified key name. Here is the patch for your model.php https://trac.cakephp.org/ticket/4219 -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Model primarykey

2008-02-25 Thread Baz
You guys freak me out. I know that CakePHP is a great framework, but if this compound primary key is really that important to you, maybe you should get on the Ruby train. If the framework does not fit your needs, find one that does. I don't see what the big issue is. It's an incovinience. And

Re: Cake Blog Tutorial

2008-02-25 Thread Samuel DeVore
http://book.cakephp.org/view/66/models#automagic-model-fields-68 if they exist they are managed by cakephp On Mon, Feb 25, 2008 at 12:29 AM, Kishor [EMAIL PROTECTED] wrote: Hi friends I've implemented cake blog tutorial from cake manual and it's work perfect.But i'm confuse how cake model

Re: WTF!!!! Deleted tickets

2008-02-25 Thread nate
On Feb 25, 9:03 am, Mr-Yellow [EMAIL PROTECTED] wrote: Am I wrong? Is that just the status that has been deleted? Man that's some bad wording there if it is. Right, because needmoreinfo could be interpreted as anything other than need more info. If it is, I'm sorry, just used to seeing

Re: WTF!!!! Deleted tickets

2008-02-25 Thread Larry E. Masters aka PhpNut
Ben, Ok you need to chill out, it is obvious you are a little upset because we are not implementing every idea that you consider to be important in this framework. Your ticket was not deleted, it was closed as need more information. Pay attention to us if you expect us to pay attention to you.

Re: Model primarykey

2008-02-25 Thread Larry E. Masters aka PhpNut
This ticket? https://trac.cakephp.org/ticket/4219 For your information that ticket is not deleted, it was closed as need more information. Nate did the right thing by closing the ticket as needmoreinfo: This isn't really enough information to reproduce the issue. Please attach all relevant model

Re: Model primarykey

2008-02-25 Thread DragonI
I'm with you, we have some production tables that use compound keys. The app is like 5 years old! Oh well, if we ever convert this over, there's this small thing called SQL we'll be using ;) Anyway, it's good to find this out now. On Feb 13, 9:58 am, avairet [EMAIL PROTECTED] wrote: I have

Re: Email Component not working..

2008-02-25 Thread Samuel DeVore
Just to check, are you using cake 1.1 or 1.2 the email component is only in 1.2 you can check the VERSION.txt file in your cake core or look in the cake folder and make sure that libs/controller/components/email.php exists Sam D On Sun, Feb 24, 2008 at 6:58 PM, Affinity Skateboards [EMAIL

Re: WTF!!!! Deleted tickets

2008-02-25 Thread Mr-Yellow
Am I wrong? Is that just the status that has been deleted? Man that's some bad wording there if it is. If it is, I'm sorry, just used to seeing every issue for everything I need to develop enterprise systems in Cake is set to wontfix. -Ben On Feb 26, 1:00 am, Mr-Yellow [EMAIL PROTECTED]

Re: Auth Component (1.2b), writing Auth.redirect to session before it is destroyed

2008-02-25 Thread Baz
Much better :) I've also experienced problems with sessions expiring with Auth: http://groups.google.com/group/cake-php/browse_thread/thread/91c716ad396513e1/2c744b3bedde6781?lnk=gstq=session+expire+auth#2c744b3bedde6781 Bottom line, there's not much that can be done. Apparently, the session

Re: Cake Blog Tutorial

2008-02-25 Thread Kishor
Thank you very much Samuel. On Feb 25, 7:06 pm, Samuel DeVore [EMAIL PROTECTED] wrote: http://book.cakephp.org/view/66/models#automagic-model-fields-68 if they exist they are managed by cakephp On Mon, Feb 25, 2008 at 12:29 AM, Kishor [EMAIL PROTECTED] wrote: Hi friends I've

Too much automagic??

2008-02-25 Thread Ithaka
Hi, I'm currently building a App for my work and in the layout we have our login information instead of having a seperate page to do it. The problem i found, and have been trying to fix, is that when i go into some of the pages, like edit the posts section and i am not logged in, cakephp will

Re: Model primarykey

2008-02-25 Thread Baz
Now I'm no hardcore PHP developer, but based on things I've seen in CakePHP and from my previous experience with compound primary keys, I can only imagine how difficult this is to implement *correctly*. Everyone is bitching like 3 year olds. CakePHP should support this, well it doesn't, suck it

Re: Model primarykey

2008-02-25 Thread nate
On Feb 25, 9:23 am, DragonI [EMAIL PROTECTED] wrote: I'm with you, we have some production tables that use compound keys. The app is like 5 years old! Oh well, if we ever convert this over, there's this small thing called SQL we'll be using ;) Exactly. There's nothing preventing you from

Re: Model primarykey

2008-02-25 Thread nate
Baz, slight correction: RoR itself does *not* support composite primary keys. Composite primary key support is available in Rails through an *unsupported* third-party plugin. On Feb 25, 9:59 am, Baz [EMAIL PROTECTED] wrote: Now I'm no hardcore PHP developer, but based on things I've seen in

Re: Auth Component (1.2b), writing Auth.redirect to session before it is destroyed

2008-02-25 Thread [EMAIL PROTECTED]
Thanks for your reply. Your other thread was an interesting read. I would still like to call this a faulty behavior (does not make any sense to me) but the problem is probably more in when the actual sessons are dumped and recreated than with Auth itself. Possible it works this way to be

Re: Too much automagic??

2008-02-25 Thread rtconner
If you are putting things into $this-data - yeah that is where cakes magic is. Cake has claimed the variable data as it's own. If you don't like the automagic, then just dont use $this-data. Code like that below works very well for me, when I dont want to use the automated for filling. $user =

Re: ACL permissions and inheritance

2008-02-25 Thread aranworld
I am using the Acl component using Auth under actions mode, so I'm not sure if this will help. At the very least, it might be helpful to know that I have been able to setup something like what you wanted. Here is how I did it. Under actions mode, I have the following: Acos: - Posts

Re: count

2008-02-25 Thread rtconner
What version of cake. I think you are going to have to use the 'with' association. $this-Tag-(WithModel)-findCount(array('tag_id'=$tag_id)); On Feb 25, 8:35 am, roryy [EMAIL PROTECTED] wrote: hi I have a question about counting fields. I have these tables: tags, posts and posts_tags, does

Re: more fields in list function

2008-02-25 Thread aniston
this helped me too ! thanks grigri PS: If you have some time quote this simple example in http://book.cakephp.org/ , I'm too new entry to explain the example. On Feb 11, 10:41 am, grigri [EMAIL PROTECTED] wrote: find('list') only works with simple fields, you won't be able to do this.

Re: WTF!!!! Deleted tickets

2008-02-25 Thread aranworld
Also, there is ABSOLUTELY nothing preventing you from implementing your own patch. It is possible that the usage you have in mind is too specific to your situation to be worth patching the entire framework for. In this case, they won't add the feature, and you will just have to maintain that

Re: Auth Component (1.2b), writing Auth.redirect to session before it is destroyed

2008-02-25 Thread [EMAIL PROTECTED]
OK, I had a go at bending Auth to my will. http://bin.cakephp.org/saved/29102 The tweaks (two of them) are in the startup method. lines 301-305 and 316-320. To make it work you will also need an altered version of requestAction. Put this in app_controller.php or be brave and hack it into

Re: Auth Component (1.2b), writing Auth.redirect to session before it is destroyed

2008-02-25 Thread [EMAIL PROTECTED]
Oh, I forgot. There is one small down-side. There is no Flash message at the login screen with 'authError'. It is the same request so not really possible I think? Not a problem for me really but I thought I should mention it. --~--~-~--~~~---~--~~ You received

Re: Model primarykey

2008-02-25 Thread avairet
That's exactly what I've been saying from the beginning. The difference is, one is an application key which has meaning within the context of the application itself, and one is a business key which satisfies some business requirement. OK Nate, but a mapping layer must reconciliate logic and

Re: Auth Component (1.2b), writing Auth.redirect to session before it is destroyed

2008-02-25 Thread [EMAIL PROTECTED]
And why I do not need authError on the login screen is simply that it is the login screen... I can inform the user in other ways. If they are not allowed but not asked to login (low perms for example) that is when the Flash is more useful to me. sorry for the 97 consecutive posts. On Feb 25,

Custom Auth Login Problem

2008-02-25 Thread BravoFoxtrot
Hi, I've created an Ldap component that connects to an Active directory server to do authentication. The ldap componet works well and I'm using it for a number of applications. I created a custom authentication component (MyAuth) that overrides the isAuthorized and hashPasswords function.

Re: Eclipse 3.3.1 and Cake PHP 1.2

2008-02-25 Thread Technoguru
Hi All, I did complete the Setup to use the phpeditor for .thtml and .ctp. Cake is listed in my include paths folder. As for the outline, I opened it in a controller, and it only shows the controller, and the functions in the controller. Am I supposed to see a list of the core classes

Re: Simple 1.2 Ajax Form?

2008-02-25 Thread [EMAIL PROTECTED]
Anyone know what this error is? On Feb 21, 1:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Not in uses... var $components = array('Email', 'RequestHandler'); var $helpers = array('Ajax'); I tried adding to uses as this... var $uses = array('MailingList', 'RequestHandler');

Pagination with Bindable Behavior

2008-02-25 Thread mbavio
Hi everybody, Is there any way to make the Bindable Behavior work with pagination in Cake 1.2? Thanks, Martin B --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Autocomplete

2008-02-25 Thread manuj
I have folowed all the instruction in tempdocs for making autocomplete I get console error Ajax.Autocompleter is not a constructor and in html autocomplete = off thanks in advance for help --~--~-~--~~~---~--~~ You received this message because you are

Re: Too much automagic??

2008-02-25 Thread Ithaka
Hey thanks, I figured out a way to get rid of the values, i simply put value = in the options array and it works, but thank you for your help. I will keep your code snippet in mind if something should araise later on. On Feb 25, 10:58 am, rtconner [EMAIL PROTECTED] wrote: If you are putting

Custon Query In View?

2008-02-25 Thread Darkman_dd
Hello. The code below is in my index View. I use it to place into a table all the articles (from all sections) of my database. How can i alter it to show only articles from a specific section (e.g. section_id=1)? $i = 0; foreach ($articles as $article): $class = null; if ($i++ % 2 == 0)

Re: Simple 1.2 Ajax Form?

2008-02-25 Thread b logica
It should be in $components, not $uses. On Mon, Feb 25, 2008 at 12:17 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Anyone know what this error is? On Feb 21, 1:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Not in uses... var $components = array('Email', 'RequestHandler');

Re: Custon Query In View?

2008-02-25 Thread b logica
$i = 0; foreach ($articles as $article): if ($article['Article']['section_id'] != 1) continue; $class = null; if ($i++ % 2 == 0) { $class = ' class=altrow'; } But it'd be better to filter on section_id in the controller to begin with. FWIW, I prefer to do row-striping like so:

Re: Simple 1.2 Ajax Form?

2008-02-25 Thread [EMAIL PROTECTED]
Anyone know why I get Error: Database table request_handlers for model RequestHandler was not found. with RequestHandler in $components? On Feb 25, 10:10 am, b logica [EMAIL PROTECTED] wrote: It should be in $components, not $uses. On Mon, Feb 25, 2008 at 12:17 PM, [EMAIL PROTECTED] [EMAIL

Re: Simple 1.2 Ajax Form?

2008-02-25 Thread nate
Probably because you created a model called RequestHandler, which you should delete. And/or, you added RequestHandler to your $uses array, which you should remove. On Feb 25, 2:13 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Anyone know why I get Error:  Database table request_handlers for

Re: Model primarykey

2008-02-25 Thread nate
On Feb 25, 12:08 pm, avairet [EMAIL PROTECTED] wrote: - I'm using CakePHP even if I must rewrite a lot of my tables and relations in my database schemas, because like you say it has many other useful functionnalities! Great, I hope you find that it's worth it. - I'm not enough master with

Re: Model primarykey

2008-02-25 Thread Baz
ThanX nate for the clarification about RoR. Now, with that said and avairet's comment, why hasn't this hurt RoR's recognition? There has been and always will be a compromise between efficiency/performance and ease of development/productivity. It's a never ending struggle. Yep, a DBA will argue

Re: Simple 1.2 Ajax Form?

2008-02-25 Thread [EMAIL PROTECTED]
OK. Thanks. I removed RequestHandler from $uses, but now I get this error... Call to undefined method RequestHandlerComponent::setAjax() On Feb 25, 11:23 am, nate [EMAIL PROTECTED] wrote: Probably because you created a model called RequestHandler, which you should delete. And/or, you added

Re: how to add a controller function to approve comments??

2008-02-25 Thread jelmer
Thank you, I've managed to make it work using the code below: function approve($id) { $this-Comment-id = $id; if($this-Comment-saveField('visible',1)) $this-flash('This comment has been approved','/comments/

Table-less model associations

2008-02-25 Thread Bob Mattax
I have a situation where I'm interacting w/ an API where I have to use some webservices to access data from a User and Account table. I've figured out for the most part how to handle the models just by themselves, but am looking for information on whether I will be able to take advantage of

Re: Error with Microsoft SQL Serveur

2008-02-25 Thread [EMAIL PROTECTED]
On 25 fév, 10:42, Stege [EMAIL PROTECTED] wrote: I don't understand the default database to 'master' for the login... And how do you import a mysql database into microsoft sql server? thanks in advance Open the MSSQL Enterprise Manager, connect to your database. Under 'Security'

Re: i18n: static language references with __(My lang key, true) in models and controllers

2008-02-25 Thread Davy
I prefer overloading the __construct method. So I get something like this ?php class Category extends AppModel { var $name = 'Category'; var $useTable = 'categories'; //override construct method for translation function

Accessing Cake Sessions from outside

2008-02-25 Thread S.P.
Hi there, I have searched several discussions here but did not find a solution which works for me. I am saving cake's sessions in a database. How can I access them from outside? I can't reproduce the value of the matching ID-field in the database. Greetings!

Re: Probably a simple question on table relationships

2008-02-25 Thread Vitved
Thanks for the pr(); tip. Made me get a grip on the whole relationship thing. My dogsizes were actually hasMany and my races were belongsTo, not the other way around as I started out. I think I get the concept now. Thanks for the nudge! Also, some really nice association info in the cookbook.

Re: i18n: static language references with __(My lang key, true) in models and controllers

2008-02-25 Thread Davy
I prefer to overload the __construct method and get something like... code ?php class Category extends AppModel { var $name = 'Category'; var $useTable = 'categories'; //override construct method for translation function

Accessing Cake Sessions from outside

2008-02-25 Thread S.P.
Hi there, I have searched severall discussions here but did not find a solution which fits. I am saving cake's sessions in a database. How can I access them from outside? Greetings! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: fread errors with 1.2 beta and php 4.3.2

2008-02-25 Thread lototou
Hi, I'm experiencing the same issue - did you ever get this solved? How was you switch to php5? Smooth? I'm currently getting a blank page! I'm not even getting errors with debug set to 2! On Feb 13, 9:37 am, oceanguy [EMAIL PROTECTED] wrote: On Jan 24, 9:28 am, Chris Hartjes [EMAIL

Re: Table-less model associations

2008-02-25 Thread John David Anderson (_psychic_)
On Feb 25, 2008, at 12:07 PM, Bob Mattax wrote: I have a situation where I'm interacting w/ an API where I have to use some webservices to access data from a User and Account table. I've figured out for the most part how to handle the models just by themselves, but am looking for

Re: how to add a controller function to approve comments??

2008-02-25 Thread the_woodsman
Sorry, I should have been clearer - I'm just referring to you using a HTTP GET request to call the approve function, rather than a POST using a html form. It's no big deal :) Also, fyi, you can also use the Session component to redirect to a pge and have the flash message appear on that page,

Checkbox with array ( Cakephp 1.2 )

2008-02-25 Thread foxmask
Hello, i would like to use the form help to migrate this : lilabelinput type=checkbox name=p_fids[] value=?php echo $forum['Forums']['id']? class=checkbox ?php echo $options ? /? php echo $forum['Forums']['forum_name']; ?/label/li where $options is the result of if (

Re: $form-dateTime using minYear/maxYear problem

2008-02-25 Thread Dardo Sordi Bogado
try with 'maxYear' = date('Y'); On Mon, Feb 25, 2008 at 8:01 AM, Mouse[ON] [EMAIL PROTECTED] wrote: Hi guys, Anyone tried using echo $form-dateTime(Model.field, 'YMD', NONE, null, array('minYear'=1900, 'maxYear'=date('Ymd')), false); ?? because i don't know maybe its just for me but

Using Auth with passwords in a related table

2008-02-25 Thread Jeff Lee
I have my tables setup as follows: Users id username Passwords id password user_id modified I would like to use the Auth component to authenticate with this setup. I've been through the docs but haven't seen anything that helps me. I can add users and the like (i.e., my relationships and

Loading a Model from a Behavior

2008-02-25 Thread boyracerr
This seems like something which is very very obvious, but I'm really not having any luck finding the solution. I'm trying to implement a Behavior for permissions checking in my application. As such, I want to make the Permission model available within the Permission_Checker behaviour. Because

Re: Loading a Model from a Behavior

2008-02-25 Thread nate
Try App::import(Model, Permission); On Feb 25, 5:21 pm, boyracerr [EMAIL PROTECTED] wrote: This seems like something which is very very obvious, but I'm really not having any luck finding the solution. I'm trying to implement a Behavior for permissions checking in my application. As such, I

Session and cake

2008-02-25 Thread Paolo
Hi all! I created a simple user authentication form, using session. The user must insert name and password and then if these correspond to a know combination the user is logged in. To check if a user is logged I used cake session. Everything woeked fine until I tried to use php sesison in another

Javascript function in a rendered ajax view

2008-02-25 Thread francky06l
Hi all, I am messing around for a while trying to set a javascript function in a view rendered with ajax call. I have played around with the cacheEvents, codeBlock (inline, allowCache) etc... but can't find a way to have this function inline for the view (I can make it inline for a specific

Re: Custon Query In View?

2008-02-25 Thread the_woodsman
But it'd be better to filter on section_id in the controller to begin with . Indeed, this much logic in the view - even if it is presentation logic, more or less - is clearly undesirable! Imho, Darkman, it'd be better to change this ASAP so that index takes an optional parameter for the

Re: Loading a Model from a Behavior

2008-02-25 Thread boyracerr
Thanks; I've tried that before, but I get: Fatal error: Class 'App' not found I've had to rely on loadModel() elsewhere for the same reason. Is this a problem with my setup? On Feb 26, 12:28 am, nate [EMAIL PROTECTED] wrote: Try App::import(Model, Permission); On Feb 25, 5:21 pm,

Re: WTF!!!! Deleted tickets

2008-02-25 Thread Mr-Yellow
Yeah I did jump the gun, think trac needs some different less negative descriptions for things, like wontfix could be something less negative and more open to suggestion. While resolution deleted is ok as a description of what's happening in the backend, but cleared or something might save some

generatetreelist

2008-02-25 Thread Mech7
Does anybody have any examples on how to use this function? I only get a flat list back always? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Using Auth with passwords in a related table

2008-02-25 Thread francky06l
I do not think Auth can cope with username and password in different model. Solution is either to set a password in User or to make the login yourself and just pass the user id to the Auth login function (Auth will use the id to find the user, not the password). hth On Feb 25, 10:32 pm, Jeff

  1   2   >