Hi Group
I'm am trying to build a back-end admin section to a website currently
in development.
I have successfully built user authentication (same as the tutorial in
them manual), and
have built several forms with basic CRUD actions. However, I am now
trying to build a form with
file uploading c
You need to install the test suite, too. You can download it there:
http://cakeforge.org/projects/testsuite/
There is little documentation on the whole testing stuff in cakePHP,
but afaik you just to extract the app folder of the test suite
download into your app folder.
You then have to write tes
I was just wondering if anyone is successfully using cakephp Acl and
the new AuthComponent in 1.2?
If so, could you give us mortals some guidance in setting it up? It
looks as though Acl has changed significantly from 1.1.
Here is some of what I have managed to peace together so far...
//add th
Hi john,
Can you explain why you think it is.
I dont think its HABTM case but I am not sure may be it is.
Thanks
Vishal
On Apr 26, 2:10 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Apr 25, 2007, at 9:42 PM, Vishal wrote:
>
>
>
> > Anyone? Please I need the answer ASAP.
Thanks Samuel...But still I don't get it. Like should I just make it
like subject hasMany PrerrequisiteSubjects and PrerequisiteSubjects
belongsTo subject with subject_id and subject with
prerequisite_subject_id and how I define that the combination of these
id's is primary key. Is it possible by
Hi john,
Can you explain why you think it is.
I dont think its HABTM case but I am not sure may be it is.
Thanks
Vishal
On Apr 26, 2:10 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Apr 25, 2007, at 9:42 PM, Vishal wrote:
>
>
>
> > Anyone? Please I need the answer ASAP
im getting error on my ajax telling "Ajax.Update is not a
constructor"... i dont know what went wrong.
at first this works fine.
here's my code:
template
div('tally')?>
divEnd('tally')?>
remoteTimer(array('url' => '/report/tally/', 'update' =>
On Apr 25, 2007, at 9:42 PM, Vishal wrote:
>
> Anyone? Please I need the answer ASAP.
>
> On Apr 26, 1:36 pm, Vishal <[EMAIL PROTECTED]> wrote:
>> Hi Guys,
>>
>> I am new with CakePHP as everyone is. What I want to know that how to
>> use the associations to handle the Unary M-M relationship. I
if you have your core debug setting to 1 or higher then just put
in it then you can see the structure of the array and if you know how
to loop an array (and a sub array) then you should be able to figure
it out.
On 4/25/07, DenMayer <[EMAIL PROTECTED]> wrote:
>
> I want to create a view that s
If you need answers fast then email lists are not your best bet use
the irc channel info on the project home page
maybe this might get you started
http://pastie.textmate.org/56643
Sam D
On 4/25/07, Vishal <[EMAIL PROTECTED]> wrote:
>
> Anyone? Please I need the answer ASAP.
>
> On Apr 26, 1:36
I want to create a view that shows a model's fields and all of it's
associated model records in the same page. For example, my main model
is Post and it is associated with a Comment model.
How do I create a view that shows all of the Post fields (e.g. author,
date, title, message) and loops thro
Anyone? Please I need the answer ASAP.
On Apr 26, 1:36 pm, Vishal <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> I am new with CakePHP as everyone is. What I want to know that how to
> use the associations to handle the Unary M-M relationship. I am
> working on university database where we have unary
Hi Guys,
I am new with CakePHP as everyone is. What I want to know that how to
use the associations to handle the Unary M-M relationship. I am
working on university database where we have unary M-M relations like
each subject could have (1, M) prerequisites subjects. So it is unary
M-M relation w
Hi, I'm pretty new to Cake PHP. I am making my first app and have a
few tables with crud functionality. I'm looking to add clickable
column titles that will allow me to sort the columns. I'm also looking
for something similar to symfony's filter functionality found on this
pagehttp://www.symfony-p
On Apr 25, 6:01 am, AD7six <[EMAIL PROTECTED]> wrote:
>just the model.
This was the tip that I was looking for.
I also needed to add in routes.php the following includes to
instantiate my model
include("../../cake/libs/model/model.php");
include("../../cake/app_model.php");
include("../models/M
I have a MySQL table with two timestamp fields. modified_time and
created_time
The first, modified_time defaults to CURRENT_TIMESTAMP.
The 2nd, no matter what I try to insert in there using Cake, gets set
to -00-00 00:00:00
The funny thing is that if I use the exact query that Cake Debugge
Can you post an example please? When I do $this->Post->save it only
saves Post info and not related Tags ...
Thanks in advance ..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this gr
How can I get simpletest to work in cakePHP 1.1.14 (not interested in
1.2)? So far I have downloaded the simpletest package into the cake/
vendors folder, and I created a test.php file in app/webroot with the
following code, but it doesn't do anything... Do I need to replace the
require_once lines
Thank you all for the reply. I get it now.
- harsh
On Apr 25, 3:09 pm, "DJ Spark" <[EMAIL PROTECTED]> wrote:
> you probably have already figured it out, but it works like this:
> - if you do not define a model (or an array of models) to your
> controller, cakePHP will automagically guess the
Hi everyone. As you can see by my handles name I am new to cakePHP so
please bear with me. OK I seem to be having problems with the $this-
>Session->setFlash. I basically am following what was recommended in
this link -> http://bakery.cakephp.org/articles/view/flashing-with-cakephp
but
its not
Ok. I'll take a look. Many thanks for your help!
On Apr 25, 11:01 pm, rtconner <[EMAIL PROTECTED]> wrote:
> You are going to need to use an Auth component of some sort. There are
> several available on the bakery. As of yet there is no standard way of
> doing Authentication. I guess look over
> o
you probably have already figured it out, but it works like this:
- if you do not define a model (or an array of models) to your
controller, cakePHP will automagically guess the model name by using
the Singular UpperCamelCase form of your controller name. 'tests' ->
'Test' .
- if you use $use
You are going to need to use an Auth component of some sort. There are
several available on the bakery. As of yet there is no standard way of
doing Authentication. I guess look over
othAuth, dAuth, obAuth, etc and see which one you want to use, and
then I think you can work from there finding out
Sorry - I meant "So how can I read the session data from a layout"?
(NOT from an element)
--~--~-~--~~~---~--~~
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.
Take a look at the constructClasses method
(cake/libs/controller/controller.php) specially the line
$this->{$modelClass} =& $model;
Regards,
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On 4/25/07, cooked <[EMAIL PROTECTED]> wrote:
>
>
> rtconner,
>
> Thanks for your reply. But get_class
Now I'm stopping to think about this a bit more, I've got another
question related to this...
How do you actually check to see whether the user is logged in? I was
thinking of setting something to identify the user as logged in for
that visitor's session (e.g. their user_id) - but so far as I
und
I actually found out about Payflow when I read this email. I did the Direct
Payment API Component for CakePHP, and it works through Direct Payment API.
I haven't looked that much into Payflow.
I'm quite interested since it seems to be a much more viable option when
dealing with large transactions
Oh if you just want it..
you can use:
$this->modelClass
in your controller
On Apr 25, 3:32 pm, rtconner <[EMAIL PROTECTED]> wrote:
> Use get_class to get "TestsControler"
> Chop the word "Controller" off, and then find the singular inflection
> of the word "Tests".
>
> I don't know for sure, bu
Use get_class to get "TestsControler"
Chop the word "Controller" off, and then find the singular inflection
of the word "Tests".
I don't know for sure, but I'm confident the logic is very similar to
that.
On Apr 25, 3:27 pm, cooked <[EMAIL PROTECTED]> wrote:
> rtconner,
>
> Thanks for your rep
rtconner,
Thanks for your reply. But get_class will only get me name of the
class from the actual object. I guess my question
is really basic, though I don't have problem with it I just want to
know it works. Here is an example, this is fundamental
to cakePHP, and I am afraid I might be sounding
Presumably you should be using 'password' instead of 'input' anyway
for the above example?
'password' => ''
I'm using 1.1.14 stable and my standard input fields are coming out
fine... (i.e. with the />) - what code are you using in your view to
generate the offending (non XHTML)?
Damien
--~--
I'm interested in something like this too, and I'm sure there are
plenty of others, so you may consider adding your work to the bakery
if you do find that you need to code something yourself for this... :)
However, this may help?
http://bakery.cakephp.org/articles/view/paypal-direct-payment-api-
I'm probably equally new - so I may be wrong...
However, my understanding is that the controller knows which model to
use by the naming conventions. Other than that, it's set in the $uses
property of the controller (where you can define additional models to
be used in a single controller too if n
I think you can do what you want.
Maybe something like this...
$this->set('categories', $this->paginate('Category',
array('parent_id', $the_parent_id)));
This would select all the categories who parent_id is $the_parent_id.
On Apr 25, 2:02 pm, jteran <[EMAIL PROTECTED]> wrote:
> I'm on the same
I've used Elements in my layouts frequently. There is no reason not to
do it. $this->renderElement(...);
Yes, you can put logic into your layout. Best practices depends on
your system. If you want to redirect them elsewhere, if they are not
logged in I'd think you want to do that in a controller o
I think get_class() might be what you are looking for
php.net/get_class.
On Apr 25, 1:47 pm, cooked <[EMAIL PROTECTED]> wrote:
> I am new to cakePHP and i have things working pretty much, but one
> questions keeps bugging me. How does this work when I do this in the
> Controller
> $this->[MyModel
Hi,
I'm quite new to working with Cake and I'm pretty sure that I'm asking
something obvious - so I'm sorry for that in advance. In my defence,
I've tried checking the manual, API, searching on here etc. and
haven't found the answer to my question (or maybe not understood the
answer to my questio
I am new to cakePHP and i have things working pretty much, but one
questions keeps bugging me. How does this work when I do this in the
Controller
$this->[MyModel]->func();
Which variable in the controller stores the name of the Model. I have
a lot of experience in C++/Java and I haven't seen anyt
I'm on the same problem.
products model HABTM categories, and I want to see from view method on
categories controller all products on that category, paginated.
Currently, I see all of them, but I don't know how to set up the
conditions for pagination.
One idea is to modify the index method on pr
Cake version is 1.1.15.4852 -latest nightly, same problem with 1.1.14
stable
tnx
On Apr 25, 9:00 pm, majna <[EMAIL PROTECTED]> wrote:
> There is page in output (source):
> value="" type="password">
>
> Notice closing tag: without />
>
> In cake\libs\view\helper.php
> "input" is defined like th
There is page in output (source):
Notice closing tag: without />
In cake\libs\view\helper.php
"input" is defined like this:
'input' => '',
So where could be a probelm here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
To force an update.. just set the id of the Model
example:
$this->ContentBlock->id = 3;
$this->ContentBlock->save( $quote );
On Apr 25, 11:21 am, Mike Digital Egg <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> Thanks, that worked, didn't know about that function.
>
> Do you know if there is an equivalent
you can use the following line in your models to stop them from
looking for a database connection:
$useTable = false;
i don't know if there is a way to globally disable the db.
On Apr 25, 12:04 pm, Macon <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm writing a front-end app using Cake relying exc
Hi,
Thanks, that worked, didn't know about that function.
Do you know if there is an equivalent function to force an UPDATE.
Cheers
Mike
On Apr 25, 6:34 pm, rtconner <[EMAIL PROTECTED]> wrote:
> You should make a a practice to call $this->Model->create() before
> every insert.
>
> So in this
Hi everyone,
I have cakePHP 1.1.13.4450 and installed the test suite into my app
folder.
SimpleTest is installed to app/vendors folder.
I have a test case for my interpret model (see APPENDIX for code)
which is correctly shown in the App Test Cases I acces with the
browser (example.org/tests/)
E
> That is in the core code. Since some install of Linux, namely Debian, Ubuntu
> from what I have seen so far, turn off gc for sessions by default and use a
> cron job to clean them up. Since database session handling relies on the
> normal cleanup PHP uses I had to create a workaround at the fram
Hi all,
I'm writing a front-end app using Cake relying exclusively on web
services to access various databases.
So far I'm using a dummy local database which is totally empty and
useless ;)
I would like to know how to disable Cake's database connection check
at startup since I don't need it.
Tha
I'd use beforeRender instead of beforeFilter. I think that is all you
need to change.
On Apr 25, 7:18 am, Mike Williams <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm very new to CakePHP and am having a problem.
>
> I need to provide a list of new stores from my database and make that
> list accessi
You should make a a practice to call $this->Model->create() before
every insert.
So in this example..
$this->ContentBlock->create();
$this->ContentBlock->save( $quote );
...
$this->ContentBlock->create();
$this->ContentBlock->save( $header );
On Apr 25, 10:11 am, Mike Digital Egg <[EMAIL PROTE
What version of Cake?
I just do this in my controller
var $paginate = array('limit' => 5, 'page' => 1);
On Apr 25, 9:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> how to use Controller::paginate() to configure 5 items per page?
>
> and do I need to add some codes in views ?
--~--~-
Hi,
I am having a problem trying to save 2 different values to a single
table, below is the code:
if ( $_POST["data"]["Block"][1] ) {
$quote = array(
'content_id' => $id,
'block_id' => $_POST["data"]["Block"][1]["id"]
);
$this->ContentBlock
> I try to route "/admin/jobs/" to "/admin/jobs/edit/1"
>
> so I do codes like this "Router::connect('/admin/
> jobs/',array('controller' => 'jobs', 'action' => 'admin_edit','1'));"
Router::connect('/admin/jobs/',array('controller' => 'jobs', 'action'
=> 'edit','1', CAKE_ADMIN=>true));
hth
j
-
2007/4/25, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> how to use Controller::paginate() to configure 5 items per page?
function index() {
$this->Participant->recursive = 0;
$criteria=NULL;
$this->_mostra_pagina($criteria);
}
how to use Controller::paginate() to configure 5 items per page?
and do I need to add some codes in views ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to ca
I try to route "/admin/jobs/" to "/admin/jobs/edit/1"
so I do codes like this "Router::connect('/admin/
jobs/',array('controller' => 'jobs', 'action' => 'admin_edit','1'));"
and I won't work cause admin_edit is private method and I just can't
call it from router...
how am I supposed to do ?
-
Yeah.. I now remember that. It's been a while since I haven't put the
semicolons, so I guess I just forgot.
Thanks for the refresher!
Dustin Weber
On Apr 25, 8:37 am, Jeremy Pointer <[EMAIL PROTECTED]> wrote:
> This has nothing to do with cake and everything to do with php
> for e.g. in any
I'm trying to wrap my head around ACL and generally speaking,
authorization, for an application I'm working on using Cake. One of
the requirements is to go beyond securing controllers and actions and
be able to define permissions which depend on the specific data in
question. For example (my apo
Hello,
I'm very new to CakePHP and am having a problem.
I need to provide a list of new stores from my database and make that
list accessible to all pages.
I copied the app_controller.php file into my /app directory and added
the following to the code:
var $uses = array('Bookstore');
fun
This has nothing to do with cake and everything to do with php
for e.g. in any php file the following will work:
but this won't
The parser automatically assumes that if you close the tag
you meant to put a semicolon there.
Dustin Weber wrote:
> Tried searching for this, but it's a tough se
Tried searching for this, but it's a tough search to refine.
Basically, I am simply trying to understand when/if we need semicolons
in a view when using a helper. In fact, I've noticed that I don't
even need the semicolon when just 'echoing' a var in a view, so it
isn't just related to helpers.
thx for the snippets - when i used gedit i had few but was too lazy to
do the rest :) now im using jedit :)
OT- whats the name of the wheather thing on the desktop form you
screenshot ? :) my GF would be gratefull ;)
greets
On Apr 24, 5:59 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> He
On 25 Apr., 14:02, AD7six <[EMAIL PROTECTED]> wrote:
> On 25 abr, 12:28, sucram <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi there!
>
> > I know, I know ... search this group an u will find the solution ...
> > Well, I searched, but I didn't find ...
> > So, maybe u can help me ...
>
> > I try to use
Super it works! Thanks!!!
On 25 apr, 13:34, dardosordi <[EMAIL PROTECTED]> wrote:
> Try this in the controller,
>
> $this->data['Page']['title'] = $this->data['Node']['title']
>
> $this->Node->save($this->data)
> $this->Page->save($this->data)
>
> On Apr 24, 8:29 am, Oneill <[EMAIL PROTECTED]> wr
Try this in the controller,
$this->data['Page']['title'] = $this->data['Node']['title']
$this->Node->save($this->data)
$this->Page->save($this->data)
On Apr 24, 8:29 am, Oneill <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I would like to save one inputfield to two models. But it only works
> when
On 25 abr, 12:28, sucram <[EMAIL PROTECTED]> wrote:
> Hi there!
>
> I know, I know ... search this group an u will find the solution ...
> Well, I searched, but I didn't find ...
> So, maybe u can help me ...
>
> I try to use hasAndBelongsToMany association but I'm stuck with saving
> the data .
Hi there!
I know, I know ... search this group an u will find the solution ...
Well, I searched, but I didn't find ...
So, maybe u can help me ...
I try to use hasAndBelongsToMany association but I'm stuck with saving
the data ...
I've got three tables ...
* locations: id, ...
* staffs: id, ..
I'm trying to create a flexible search form to search a database with
multple hasMany associations.
Here's the models:
Part->hasMany->Mbmodel
Part->hasMany->Signon
Mbmodel->belongsTo->Part
Signon->belongsTo->Part
The Mbmodel table contains field model, Signon table contains
signonstring. I'd li
Ks, thank you for your comment.
I tried the code exposed before and is working quite well to work with
several tables.
The code i'm using is:
-
var $uses = array('Admin','Cat
No, jcsiegrist, no need to set the constant 'CAKE_ADMIN'.
I performed the cpanel without setting it, and is working fine.
Regards,
Rohman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to
On 25 abr, 08:36, Defranco <[EMAIL PROTECTED]> wrote:
> no answers? its so difficulty like that?
>
> /defranco
If you want to put routes in the database, thats one thing, and
googling around I'm sure you'll find some info wrt that.
If you want to access a controller before loading your routes,
Thank you AD, I did something similar, with IF() checking session and
class variables (if they are set).
On 25 апр, 16:33, AD7six <[EMAIL PROTECTED]> wrote:
>
> Probably easiest solved by creating an init method and call it as the
> first line of each method, skipping if it's already been run.
I am dont know if this is the best way to accomplish this but you can
use the requestAction and renderElements to accomplish this.
Create a view - say cpanel/home
This will include elements - userelement, categoryelement,
itemselement
e.g.
renderElement('userelement'); ?>
Create each element i
no answers? its so difficulty like that?
/defranco
--~--~-~--~~~---~--~~
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, se
francky06l, thank you very much for the explanation.
I didn't know 1 controller could use diferent models!! (^-^) that
makes sense (^O^)/
anyway, thank you very much.
Rohman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
The initial binding (ie : defined in model) are reset on your next
call to a controller. In other words, the binding done using
bindModel / unbindModel is valid for the current controller action.
On Apr 23, 5:36 pm, "admin_AT_loveyourdress.com" <[EMAIL PROTECTED]>
wrote:
> If i used the dynamic b
On 25 abr, 08:30, Sergei <[EMAIL PROTECTED]> wrote:
> Have to reply to myself again.
>
> I was using $this->Session->check('User') from __construct function.
> Seems like helpers are not available in helper constructors. But why?
The answer to your question is pretty much IN the question: You
s
Maybe you should have a look at this:
http://bakery.cakephp.org/articles/view/alternative-methods-for-working-with-hasandbelongstomany-associations
Greetings,
René
On Apr 24, 9:23 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Using Cake Version 1.1.13
>
> I have a "group" Model defined as
On 24 abr, 17:42, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> is it or would it be possible to do something like that :
>
> $this->Application->Server-
>
> >findAll(array('Application'=>array('id'=>1)));
>
> In order to find every Server that belongs to the application '1'.
Did you try it
78 matches
Mail list logo