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
>
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
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',
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
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
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
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
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
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
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
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
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
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
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'
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
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
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
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
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?
>
> >
>
--~--~-~--~---
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
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
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
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
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
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
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
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?
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
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()) {
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
"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:
>
>
>
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
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
33 matches
Mail list logo