Re: Before render being called twice?

2009-10-21 Thread jacmoe
I am not a CakePhp expert, but if one or more controllers have this: function beforeRender() { parent::beforeRender(); } then it will be calling AppController::beforeRender (one more time). :) On Oct 21, 4:22 pm, "euromark (munich)" wrote: > i used to have this problem as well >

Re: Error on a fresh install

2009-10-21 Thread jacmoe
In CakePhp, database tables are plural. So create a table called posts, a controller called PostsController (posts_controller.php) and a model called Post (post.php). Read up on CakePhp naming conventions in the Cake book. :) No need to create routes for that. Controllers and tables are plural, mo

Paginator helper in Cake 1.3

2009-10-21 Thread jacmoe
I just tried to upgrade my existing Cake app from 1.2 to 1.3. And my Ajax powered paginator stopped working. :( I load the 'Js' helper in my AppController, before the Paginator helper. I have echo $this->Html->script(array('https://ajax.googleapis.com/ajax/libs/ jquery/1.3.2/jquery.min.js',

Re: Cakephp auth component allow problem

2009-10-21 Thread Zahidur Rahman
hmm it's working if i use array. I am using version 1.2 I hope my query was confusing for u. say i want to give access for controller articles and action detail for every one but say for controller posts and action detail i want to restrict for registered user only. then what i have to do ?? Than

Re: Cakephp auth component allow problem

2009-10-21 Thread
Might you not need to use array, just write like blow: $this->Auth->allow('register', 'confirm', 'forget', 'activate','reset', 'login','logout'); Try it^^! On 10月22日, 上午10時04分, Zahidur Rahman wrote: > Hi , > How it is possible for me to allow plugins , controllers wise action > permission in c

Cakephp auth component allow problem

2009-10-21 Thread Zahidur Rahman
Hi , How it is possible for me to allow plugins , controllers wise action permission in cakephp auth allow method.. $this->Auth->allow(array('register', 'confirm', 'forget', 'activate','reset', 'login','logout')); Thanks in advance --~--~-~--~~~---~--~~ You recei

Re: Error on a fresh install

2009-10-21 Thread Dr. Loboto
Route is useless. Model filename should be post.php On Oct 21, 6:09 pm, Vincent wrote: > Ok. > > I configured a MySQL DB and created a table 'post'. > > Added in app/routes.php: > Router::connect('/posts/', array('controller' => 'posts')); > > Created app/controllers/posts_controller.php > clas

Email/IMAP data source

2009-10-21 Thread td-nathan
I need to process an email inbox, monitor it for messages with a particular subject line. If it finds a match I need to get the body content, manipulate, and insert into a database. Ideally would mark the message as read and move it to another IMAP folder as well. I'm poking around PHP document

Re: creating layout with multiple view

2009-10-21 Thread j0n4s.h4rtm...@googlemail.com
for my layout building (same layout, some variations) i use the magic "require" php command ;), no need for elements there imho. On Oct 20, 6:33 pm, kamiseq wrote: > ok, Ill try that as well, thanks > > On 20 Paź, 15:16, m-e- wrote: > > > On 20 oct, 14:42, kamiseq wrote: > > > > ok but you thi

Re: MAMP + CakePHP issues

2009-10-21 Thread fahd
Thanks for the answers. I tried upgrading my CakePHP core to the latest 1.2.5 - but the problem didn't go away. The MySQL on MAMP (5.1.37) seems to be more up- to-date than my host MediaTemples (5.1.26-rc) ... which is concerning. On Sep 25, 11:09 am, Martin Westin wrote: > On 1 I second the op

has many validation

2009-10-21 Thread kangur91
Hello, I've got table with Fields "Name" and "file_id" If I add data to the table, should execute validation. And not add to the table if this 2 fields will repeat. Anyone knows how make this way validation(two fields together)??? --~--~-~--~~~---~--~~ You receive

Question Concerning Nested Relationships

2009-10-21 Thread Andrew
I've got a Post model set up that has a BelongsTo relationship to a Group model. This Group is related by HABTM to 1+ Media models. The Post model has other BelongsTo and HABTM relationships to other classes. What I'd like to do is in the Post model retrieve the Media models related to it throug

Re: submit throttling?

2009-10-21 Thread calzone
Yes, that should work well. thanks On Oct 21, 3:24 am, Dave wrote: > This may not be the best solution, but I've seen this implemented > before with an IP's table.  You could probably modify the afterSave in > the app_controller to insert an entry with ip address, action, and a > timestamp, the

Is Ajax request

2009-10-21 Thread Dave Maharaj :: WidePixels.com
I have this function where its first called normally by a link (http request). Once loaded the pagination links are done via Ajax. I have 'all', 'new', 'archive' links which all get called to paginate the result using Ajax and jquery. Problem is when i go to posts/index it works fine, click 'all'

Re: E-mail validation without model

2009-10-21 Thread robustsolution
Dear Céryl, I use this whenever someone registers (to create a new account) or uses a contact us form for feedbacks App::import('Core', array('Validation')); if(Validation::email($email, true)) { /* it verifies $email synrax it verifies availability of the host (after the @) */ } have a nice baki

Re: Before render being called twice?

2009-10-21 Thread euromark (munich)
i used to have this problem as well with almost all before/after functions dunno what causes this On 21 Okt., 15:10, Aivaras wrote: > Hey, > > we can't unless you provide us more details. > > Aivaras > > On Wed, Oct 21, 2009 at 16:09, Amit Rawat wrote: > > Hello friends, > > >  I am having a

Pages Controller

2009-10-21 Thread Dave Maharaj :: WidePixels.com
I have my site index www.site/ go to Router::connect('/', array( 'controller' => 'pages', 'action' => 'display', 'home')); How can I set it to check if logged in to redirect somewhere, define template layout and general function stuff? Do you make a normal func

Setting cookie for cached pages?

2009-10-21 Thread Kana
I need to set a cookie every time a page is opened. When a page is not cached, this is no problem. But for cached pages this is. What must I do to be able to a cookie as soon as I open a cached file? Kana --~--~-~--~~~---~--~~ You received this message because yo

Re: Before render being called twice?

2009-10-21 Thread Aivaras
Hey, we can't unless you provide us more details. Aivaras On Wed, Oct 21, 2009 at 16:09, Amit Rawat wrote: > Hello friends, > > I am having a problem my before render function in app controller is being > called twice. can anyone tell me why is this happening? > > > > --~--~-~--~---

Before render being called twice?

2009-10-21 Thread Amit Rawat
Hello friends, I am having a problem my before render function in app controller is being called twice. can anyone tell me why is this happening? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To p

Re: Error on a fresh install

2009-10-21 Thread Vincent
Ok, I found the problem, its du to my apache conf, I made an error with rewrite_mod directives. On 21 oct, 13:09, Vincent wrote: > Ok. > > I configured a MySQL DB and created a table 'post'. > > Added in app/routes.php: > Router::connect('/posts/', array('controller' => 'posts')); > > Created ap

Re: Using Components (or whole Controllers) in a cake-shell

2009-10-21 Thread leberle
Solved :) For some reason the initialization of the component failed, even if the controllers constructClasses() is called... solved by: $this->Orders = new OrdersController(); $this->Orders->constructClasses(); $this->Orders->OrderProcess->initialize(&$this->Orders); :) On 21 Okt., 12:44, leb

Re: Error on a fresh install

2009-10-21 Thread Vincent
Ok. I configured a MySQL DB and created a table 'post'. Added in app/routes.php: Router::connect('/posts/', array('controller' => 'posts')); Created app/controllers/posts_controller.php set('posts', $this->Post->find('all');); } ?> Created app/models/posts.php Created app/views/posts/index

Using Components (or whole Controllers) in a cake-shell

2009-10-21 Thread leberle
Hi, i'm currently working on a cake-shell cron, and i got some trouble using one of the components from my App. I need to use a method from a component that is usally used in my Orders-Controller, i tried: - App::import('Component','OrderProcess'); class OrdersCronShell exte

Re: submit throttling?

2009-10-21 Thread Dave
This may not be the best solution, but I've seen this implemented before with an IP's table. You could probably modify the afterSave in the app_controller to insert an entry with ip address, action, and a timestamp, then modify the beforeSave to query this table based on your criteria (X entries

Re: Your opinions about a Super Cake application library

2009-10-21 Thread AD7six
On 21 oct, 06:19, CapeTownGuy wrote: > To the cake reader... > > What do you think of creating a super cake installation somewhere that > can be downloaded but that has all kinds of pre installed controllers, > views, models, components, helpers, vendors etc (and comprehensive > schema to suppo

Re: Bug report: CakePHP saving twice

2009-10-21 Thread AD7six
On 21 oct, 07:59, "Ma'moon" wrote: > You may want to open a ticket @https://trac.cakephp.org/stating the steps > to reproduce your claims so that the core DEVs may review it and fix it. That's pretty bad advice - why should cake devs bother filtering through user-land problems of this nature?

Re: Bug report: CakePHP saving twice

2009-10-21 Thread AD7six
On 21 oct, 06:32, Rawna wrote: > I just found out that CakePHP saving twice when I have warnings (as I > saw it in debug.log) > E.g. I have $this->Model->save() in my controller > > And I have this in my default.ctp template: > > > I think CakePHP is going through the controller action again w

Re: E-mail validation without model

2009-10-21 Thread Céryl
Jup that was the way to go! Mind you I was not against using a model, just didn't had one... So I made a mail-model, and it validates email (and subject and text not being empty)... I now use it on different places in my site via: $this->Mail->set( $this->data ); if ($this->Mail->validates()) {

Re: Object not found

2009-10-21 Thread Dr. Loboto
Do not use IBM tutorial. It is extremely outdated and bad initially. Try "official" tutorials instead: http://book.cakephp.org/view/218/Tutorials-Examples On Oct 21, 7:46 am, QJ wrote: > I just started using CakePHP using this tutorial from IBM... > > I have the cake directory in localhost/cake

Re: Bug report: CakePHP saving twice

2009-10-21 Thread Dr. Loboto
"Going twice" may occur because of requestAction somewhere. On Oct 21, 11:32 am, Rawna wrote: > I just found out that CakePHP saving twice when I have warnings (as I > saw it in debug.log) > E.g. I have $this->Model->save() in my controller > > And I have this in my default.ctp template: > > >

HABTM extra-field and form syntax

2009-10-21 Thread emmexx
I read the many posts and articles on HABTM and extra-field but my problem is a little bit more difficult (to me) than the simple examples I found there. I'd like to implement a system to evaluate some parameter. The parameter has a model and is HABTM with the main model. In the HABTM table I add

Pagination with hasMany association

2009-10-21 Thread Fabian
I have two table: Contestant and Votes Contestant hasMany Votes I've tried doing a count(Vote.id) as Votes so I can place it on the recordset and just paginate them but I have no idea where to place it. I did it on the fields array but it give me the total count of votes regardless of the contes