I use $this->Model->validate()
The error is not getting o/p to the view
in view i am able to o/p the validationErrors using $form-
>validationErrors
Any help
Model
--
[code]
var $primaryKey = 'uid';
var $validate = array(
'uid' => array(
'alphanumeric' => ar
I solved this one by renaming /cake/libs/controller/app_controller.php
to /cake/libs/controller/app_controller.php1
:(
On Apr 12, 2:51 pm, Bodog <[EMAIL PROTECTED]> wrote:
> Install / Setup / Config were fine. I'm convinced there was a problem
> with that build, since I had changed nothing when I
Thanks for the responses. I found the jquery one(while looking on
google) but was actually talking about the prototype/scriptaculous
one. Are they're any good tutorials that cover this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
Keep the Auth->mapActions like you have it in the beginning and then
do this:
$this->Acl->check('henry', 'Votes', $this->Auth-
>actionMap['restart']);
You are right that you will then be able to leave out the actions from
the aco tree.
-Aran
On May 29, 3:48 pm, mcjustin <[EMAIL PROTECTED]> wro
I am trying to get my head around unit testing controllers in CakePHP
1.2 and I have some questions as the documentation is a little thin on
the ground.
1) When using $this->testAction() does the URL have to be in the
format "/blog/index" or could I use "array('controller' => 'blog',
'action' =>
h, excellent. Thanks for that tip, I had a feeling that there
must be a way to tell cake about the funky primary keys
On May 29, 6:57 pm, Adam Royle <[EMAIL PROTECTED]> wrote:
> Have you told cake about your non-standard primary key? Add em like
> this in your models.
>
> class Booking exten
Thanks for the info!
How would you suggest I map them for the Acl lib to recognize them? I
was using the Auth->actionMap, but the Acl lib doesn't refer to the
Auth lib...
I suppose that my controller code could do the mapping, but I'm
wondering if there's already some wiring for this in the libs
http://cakebaker.42dh.com/2008/02/24/edit-in-place-with-jquery-and-cakephp/
Have fun.
mbavio
On May 29, 5:07 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Thu, May 29, 2008 at 4:03 PM, Kyle Decot <[EMAIL PROTECTED]> wrote:
>
> > I am attempting to build an ajax calendar. Each date will hav
On Thu, May 29, 2008 at 9:38 AM, Frycake <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> I got a strange problem with a function which is called 4 or 6 times
> when I try to reach it trough a standard url :
> http://domain/mycontroller/myfunction.
>
> This behavior happens only with this controller.
Time for a semantic question.
I have a controller for images, which handles the process of uploading
an image to my website.
Information about the image -- caption, filename, etc. -- is stored in
the database with a model named Image.
I have some functions which generate various sized versions
Did you copy the PagesController in your application ? If so, create
the beforeFilter and call parent::beforeFiler ..
hth
On May 29, 10:47 pm, Dan Soendergaard <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I use the AuthComponent on my site for authentication. I've specified
> all of the things
since cake is built in php perhaps this might work for you
http://www.php.net/manual/en/function.fopen.php
in order to get the paths perhaps the CakePHP constants will help you as well
http://manual.cakephp.org/view/120/global-constants-and-functions
good luck
On Thu, May 29, 2008 at 5:08 AM,
This is a case where you should be using:
$this->Acl->check('aro_alias', 'CamelCaseController', 'crud action');
So, in your case, to find out if the logged in user 'henry' should be
able to access /votes/restart, and you have mapped restart to
'update', then you do this:
if( $this->Acl->check('
On Thu, May 29, 2008 at 4:56 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>>
>
> The problem is that it's the same even if debug is off .
> The difference is smaller but Cake 1.1 seems faster than Cake 1.2
>
Ah, you crazy kids and your concerns about the speed of Cake. Back in
my day, we loo
On 29 Mag, 18:12, djiize <[EMAIL PROTECTED]> wrote:
> Don't do benchmark with debug on, it's useless.
> Even if Cake 1.1 is faster than 1.2 with debug on, it won't tell you
> if it's the same when debug is off !
>
The problem is that it's the same even if debug is off .
The difference is smalle
Hi everybody,
I use the AuthComponent on my site for authentication. I've specified
all of the things that it needs to know in the app_controller.php,
where I also set a variable, $user, which contains the object of the
current user. I use this for showing custom menus, log out links etc.
Howeve
and what if you define an alias to your column?
select users.id, users.name, my_custom_function(users.id, 'ABC') AS
custom, users.phone
from users
where users.id > 500;
or better : "AS users.custom"
and another question, do you need to specify "users.id" instead of
just "id" ? In your example, i
On Thu, May 29, 2008 at 4:03 PM, Kyle Decot <[EMAIL PROTECTED]> wrote:
>
> I am attempting to build an ajax calendar. Each date will have a piece
> of information in it, and when you click on that day I need it to
> become an editable field. Does anyone know of any good tutorials for
> something l
I am attempting to build an ajax calendar. Each date will have a piece
of information in it, and when you click on that day I need it to
become an editable field. Does anyone know of any good tutorials for
something like this? Thank you as always.
--~--~-~--~~~---~--~--
On May 29, 6:40 pm, propellorcut <[EMAIL PROTECTED]> wrote:
> I'm trying to find the number of records returned based on a certain
> column having the value 11 or 12. I think I'm writing this correctly,
> but cake doesn't like the fact that I have an OR statement based on 1
> column.
>
> this st
On May 29, 8:53 pm, weckmann <[EMAIL PROTECTED]> wrote:
> That is a small workaround... because then i can get the value
> returned by the function by calling $result[0]
> ['my_custom_function(users'][id] ... and I also have all other values
> before.
>
> But that workaround does not work if you
I might be misunderstanding what you are expecting as a result set,
but you could simply do:
$this->Movement->find('count', array(
'conditions' => array(
'Movement.status'=> array(11,12)
),
'recursive' => -1
));
This would produce the query:
SELECT COUNT(*) AS `count` FROM `mov
That is a small workaround... because then i can get the value
returned by the function by calling $result[0]
['my_custom_function(users'][id] ... and I also have all other values
before.
But that workaround does not work if you need to call more than one
function. It only works if you call just
On May 28, 12:58 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> With debug=2 the queries are exaclty equal except for the DESCRIBE
> operation on the joinTable.
> Perhaps it'is a my feeling.
> Exist a instrument for evalute the time loading of a scripts?
> Is it possible to use eAccelarator
I'm setting the following in one of my controllers' beforeFilter()
function:
Auth->authorize = 'crud'
$this->Auth->mapActions(
array('show'=>'read',
'restart'=>'update',
));
I was planning to check the following i
Hello All,
I got a strange problem with a function which is called 4 or 6 times
when I try to reach it trough a standard url :
http://domain/mycontroller/myfunction.
This behavior happens only with this controller. I looked an other
post on this groups, where people talked about GET and POST met
I'm trying to find the number of records returned based on a certain
column having the value 11 or 12. I think I'm writing this correctly,
but cake doesn't like the fact that I have an OR statement based on 1
column.
this statement:
$outstanding = $this->Movement-
>find('count',array('conditions
Hello all,
I am developing a cake app with 1.2alpha (I am planning to upgrade to
latest SVN soon) and I need some good ideas. Maybe you can help me:
Use Cases:
- I like to be able to connect some data stored in the database
(called "connected data") to any possible URL (controller/action/
param)
Hello all,
Has anyone ever tried to implement _optional_ HTTP authentication?
Typical use case:
- Users provide username and password via form at /users/login.
- Username/password is POSTed to /users/login and user is
authenticated by AuthComponent
- User is then logged in an can access secured
> I'm making an app where I need to be able to have a link that when
> clicked, dims the windows(like lightbox) and then brings up an ajax
> calendar. I know that lightbox is for photos, so does anyone have any
> suggestions on apps that could be used for this?
Kyle, I've used Particletree's "Lig
On Thu, May 29, 2008 at 2:37 PM, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
> On Thu, May 29, 2008 at 1:34 PM, Kyle Decot <[EMAIL PROTECTED]> wrote:
> >
> > Thanks, but I forgot to mention that it has to use prototype/
> > scriptaculous
> > --~--~-~--~~~---~--~~
>
>
On Thu, May 29, 2008 at 1:34 PM, Kyle Decot <[EMAIL PROTECTED]> wrote:
>
> Thanks, but I forgot to mention that it has to use prototype/
> scriptaculous
> --~--~-~--~~~---~--~~
Found the perfect solution for you, the URL is kind of long so I put
it through TinyURL:
Thanks, but I forgot to mention that it has to use prototype/
scriptaculous
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscrib
I figured out best way is to use a debugger to do this debugging...
I'll be monitoring this thread if someone has suggestions about this.
On May 29, 8:02 pm, Primeminister <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to add a comment after each query that is build by cakePHP.
> So when I do $this
Hi,
> I'm making an app where I need to be able to have a link that when
> clicked, dims the windows(like lightbox) and then brings up an ajax
> calendar. I know that lightbox is for photos, so does anyone have any
> suggestions on apps that could be used for this?
There is a thing called Thickb
I'm making an app where I need to be able to have a link that when
clicked, dims the windows(like lightbox) and then brings up an ajax
calendar. I know that lightbox is for photos, so does anyone have any
suggestions on apps that could be used for this?
--~--~-~--~~~---
Don't do benchmark with debug on, it's useless.
Even if Cake 1.1 is faster than 1.2 with debug on, it won't tell you
if it's the same when debug is off !
On 29 mai, 17:31, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On 28 Mag, 19:33, Joel Perras <[EMAIL PROTECTED]> wrote:
>
> > On May 28, 12
What happens if you put the function call last in your query?
On Thu, May 29, 2008 at 9:47 AM, weckmann <[EMAIL PROTECTED]> wrote:
>
> Then $result will hold the array which I showed in my last posting...
> which is quiet useless because users.phone is missing (or anything
> that comes after the
On 28 Mag, 19:33, Joel Perras <[EMAIL PROTECTED]> wrote:
> On May 28, 12:58 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > With debug=2 the queries are exaclty equal except for the DESCRIBE
> > operation on the joinTable.
>
> As I stated previously, when debug = 0 these queries are cac
Ah, thank you Nate! That has worked perfectly.
For anyone else interested:
$options = array('1' => 'One', '2' => 'Two', '3' => 'Three');
print $html -> input('Numbers', array('label' => 'Choose a number',
$options));
On May 29, 3:05 pm, Nate <[EMAIL PROTECTED]> wrote:
> It should not be doing
Hi,
I want to add a comment after each query that is build by cakePHP.
So when I do $this->findAll($conditions) I want it to automagicly be
added with a comment that will show up in my log. Example:
SELECT * FROM posts AS Post WHERE id=12; /* getPost -
posts_controller.php */
The comment is then
Hi
1) If I were you, I wouldn't put data files in the "vendors"
directory, but rather in a subdir in tmp/ (which is, AFAIK, a good
place to put writable files that are protected from direct access from
the web), or in a subdir of webroot/ (if you want to access them from
the web).
2) If I were yo
Hey ajay, why are you not using the File class?
http://api.cakephp.org/class_file.html
What error do you get? What's your code?
On May 29, 12:29 pm, ajay <[EMAIL PROTECTED]> wrote:
> i want to know who can open a txt file using cakephp
>
> i created a class with fucntion to fopen a text file t
It should not be doing an optgroup unless 'options' is a nested array.
On May 29, 9:31 am, kez <[EMAIL PROTECTED]> wrote:
> Hello -
>
> Hunted around quite extensively to find out how to disable option
> grouping with $form -> input().
>
> I am using a hardcoded list of options:
>
> print $form -
If I would get all the record of a model where the SQL condition is
CONCAT('Field1','Field2')
How have I to set the condition on findAll?
$conditions=array("CONCAT(Field1,Field2)"=>"LIKE &.&"); is wrong
What is the correct form?
Many Thanks
--~--~-~--~~~---~--~--
> It sounds to me like you are asking the wrong question - what sql is
> getting executed.
>
> AD
Since I am using the query function of a model the executed SQL is
correct, its just the string that i supply. That is not the problem. I
already used the debug mode to see what gets executed.
The
Hello -
Hunted around quite extensively to find out how to disable option
grouping with $form -> input().
I am using a hardcoded list of options:
print $form -> input('myDropDown', array('options' => array('1', '2',
'3')));
Which is generating the option groupings - which I don't want.
Anyone
no can hlp - no info no code what can say I?
T
On Thu, May 29, 2008 at 3:59 PM, ajay <[EMAIL PROTECTED]> wrote:
>
> i want to know who can open a txt file using cakephp
>
> i created a class with fucntion to fopen a text file that i saved in
> the vendors folder.
>
--
===
i want to know who can open a txt file using cakephp
i created a class with fucntion to fopen a text file that i saved in
the vendors folder.
wen i tried to run as normal php codes, it worked but wen i put the
same code in the cakephp, it says cant find file or directory
ken u plz help
--~--~--
hi, i wanted to know how i can open a file using cake php
for example a txt file located in vendors or in webroot/files
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send em
Hi
The Helper class has some good method for all that :
http://api.cakephp.org/class_helper.html
For exemple $helper->value(), which you can call, in your case, with
$fckeditor->value(), as your helper likely extends the main Helper
class...
I often use $helper->__initInputField('fieldname') als
Ok, can't figure if it's wrong or not, so I'm gonna ask the question
here:
I made a new fckEditor helper to handle some problematic of our own.
The thing it does is that it instantiate an fckEditor named after the
field like any other cake field (data[model][field]).
So we got a display function
Hi
You can use $form->text("Dominio.dominio") to generate a text input.
http://api.cakephp.org/class_form_helper.html#2e026510fd6aa29a72207f1d35b47857
The API docs suggests to provide the Model name together with the
fieldname. This may help Cake to figure the difference between
"Dominio" and "do
Hello,
As I say in the subject, I have a model called "Dominio" with a field
called "dominio", whe I use
input('dominio); ?>
it output a select, and even if i tried to override the type with
input('dominio', array('type' => 'text')); ?>
it still gives me a select.
Is there another way to ove
Hello,
I need to integrate VBulletin with a Cakephp project I am currently
working on. To do this, I tried including the VBulletin global.php
file into the Cakephp bootstrap.php file and am always getting this
error:
Warning: array_keys() [function.array-keys]: The first argument should
be an arr
Hi Sanfly
You must reset the Model on every loop recursion; your save function
would look like this :
foreach($this->data['Booking'] as $theBooking){
$this->Booking->create();
$theBooking['b_created_at'] = date("Y-m-d H:i:s");
$theBooking['b_booking_group_id'] = $booking
Hi Mike
Maybe you could give us bits of your core.php config file.
Make sure also that your tmp directory has the right directory
structure (cache/views cache/persistent and so on, there has been
another thread about it just yesterday).
+
Clément
On Thu, May 29, 2008 at 7:59 AM, Mike <[EMAI
@jaro
Sorry, I meant AppHelper(), not AppModel. Duh! AppHelper::url() is
called by most helper functions that generate urls, including
HtmlHelper::link(). The code is really straightforward:
function url($url = null, $full = false) {
if (is_array($url)) {
if (isset($url['c'])) {
$url
Hi Kyle
I've been writing a calendar helper that might be of use to you. It
isn't ajax, but I had planned to build in ajax support so it wouldn't
be too hard to get it to work. The idea is that you just provide give
the helper an array where the key is the day of the month (e.g. 1 to
31) and it j
On May 28, 1:12 pm, weckmann <[EMAIL PROTECTED]> wrote:
> OK here you are:
>
> From my example above the returned array would look like:
>
> [0]
> [users]
> [id] => 1234
> [name] => Johnson
> [my_custom_function(users]
> [id] => somesamplevalue
> [1].
>
> So,
60 matches
Mail list logo