What version of Cake are you using? findAll() was replaced by
find('all') in 1.2.
From the 1.3 docs:
http://book.cakephp.org/view/1017/Retrieving-Your-Data#find-all-1021
On Jan 6, 7:22 pm, AndreGuerreiro andreadguerre...@gmail.com wrote:
Hi, I got this message
The 'i' means case insensitive, so you don't need the A-Z anymore:
'/^[\-\'\.\sa-z]+$/i'
On Nov 29, 3:54 am, Stephen step...@ninjacodermonkey.co.uk wrote:
My mistake, i goes after the forward slash.
*'rule' = array('custom', '/^[\-\'\.\sa-zA-Z]+$/i'),*
On 29 November 2010 08:53, Stephen
Did you try array(..., 'ClubsPlayer.start_datetime =
CURRENT_TIMESTAMP')?
On Sep 19, 5:38 pm, DerBjörn b.unkh...@googlemail.com wrote:
Hi Zaky,
yes with time() it works like that: ClubsPlayer.start_datetime =' =
date('Y-m-d H:i:s', time()) but i thought there is a easilier way :)
Thanks
What are you using for the log setting in core.php?
On Sep 10, 7:52 am, psybear83 psybea...@gmail.com wrote:
Hi everybody
From Ruby On Rails I'm used that while developing my log files are
full of informations about what pages were rendered etc.
In CakePHP I'm missing this - I don't even
:
as mentioned above i use
define('LOG_ERROR', 2);
On Fri, Sep 10, 2010 at 3:11 PM, Andy Dirnberger
andy.dirnber...@gmail.com wrote:
What are you using for the log setting in core.php?
On Sep 10, 7:52 am, psybear83 psybea...@gmail.com wrote:
Hi everybody
From Ruby On Rails I'm used
Router::connect('/threads/*', array('controller' = 'threads',
'action' = 'index'));
On Aug 30, 7:52 am, Greg Skerman gsker...@gmail.com wrote:
Ok so this should be fairly easy right?
I have a few controllers (forums, threads and posts)
The index of the forums controller shows the list of
There's an error in your syntax. The line should be $filter =
array('Event.postcode' = '4883');
On Aug 2, 11:24 pm, #2Will willjbar...@gmail.com wrote:
Sorry but i seem to be struggling today. Ive got my index page
showing my paginated list and filtering by tag, but what if i want to
add in
Things will be different if you're using Cake 1.3, but it will be
along the lines of:
$this-Html-link($this-Html-image('folio/thumb/' . $feature['Entry']
[0]['image'], array('alt' = __($feature['Portfolio']['title'], true),
'border' = 0)) . 'h3' . $feature['Portfolio']['title'] . '/h3',
URL_HERE,
The 404 page is the same. When an error occurs in production mode, the
site will return a 404 instead of the actual error. That's the only
difference in how 404s are handled.
The difference that may be tripping you up is that when debug is set
to 1+ there is an HTML comment appended to the end of
Sounds like you have private function admin_login() in
UsersController. Try public function admin_login() instead.
On Jun 13, 7:05 pm, Davor Ilic webfa...@gmail.com wrote:
with this i mean this
link:http://groups.google.com/group/cake-php/browse_thread/thread/4a445f48...
2010/6/14 Davor Ilic
According to the W3C, they expect to reach the recommendation
milestone for HTML5 in Q3 2010.
http://www.w3.org/2007/03/HTML-WG-charter.html#deliverables
On Jun 9, 11:11 pm, calvin cal...@rottenrecords.com wrote:
You can use whatever you want, but HTML5 is nowhere near completion.
It's not
I got around this by adding the following to
AppController::beforeRender until I was able to clean up the
controllers.
if (!empty($this-pageTitle)) {
$this-set('title_for_layout', $this-pageTitle);
}
On May 31, 11:27 pm, Miles J mileswjohn...@gmail.com wrote:
This was the one thing I hated
/path.php.
On Jun 1, 11:16 pm, Jeff jhull...@gmail.com wrote:
Hi Andy,
Actually that is my full path. At least when I FTP to my server,
immediately in the root directory / is the app folder. Is there
anything else that could be wrong?
Thanks
On May 12, 9:20 pm, Andy Dirnberger
In your controller, the current prefix is stored in $this-
params['prefix']. It's also available through Router::currentRoute()-
defaults['prefix'].
On May 27, 6:45 pm, aleph1 cubeythero...@gmail.com wrote:
I can't see how to retrieve the current prefix that is being used for
routing purposes.
Does that host have a users folder at ..users?
On May 27, 11:37 am, leo ponton@gmail.com wrote:
I'm having a problem on one of our hostings with case sensitivity.
Strangely, it is only on the 'users' controller.
If I do '..users/login' it doesn't work. If I do '..Users/login' it
does.
This is just a rough idea and will need to be completed (and probably
improved some), but hopefully it can get you started.
In AppModel:
var $schedule_id;
function find($conditions = null, $fields = array(), $order = null,
$recursive = null) {
if (is_array($conditions)) {
if
Do you have a crossdomain.xml file?
On May 17, 8:21 pm, Cycling_Joe joespran...@gmail.com wrote:
Can anyone guide me to what I am doing wrong.
If the www is omitted in my url's it causes my flash files to break.
If I go tohttp://www.mysite.comeverything is fine.
If I go
You may want to take a look at prefix routing (admin routing prior to
1.3) http://book.cakephp.org/view/950/Prefix-Routing.
On May 18, 9:58 am, Andrei Mita andrei.m...@gmail.com wrote:
Thank Renato. Actually I was thinking to develop two separate cake apps: one
to run the website for the
You need to use /the/full/path/to/app/.htpasswd.
On May 12, 11:17 pm, Jeff jhull...@gmail.com wrote:
Hi, I have the following in my /app/webroot/.htaccess file, as well as
a matching .htpasswd file in the correct directory per multiple online
how-to's, but my password protection is not
http://book.cakephp.org/view/1128/debug
On May 10, 9:06 pm, bradmaxs b...@pezzano.com wrote:
Can anyone tell me how to get:
Array
(
[0] = Array
(
[Portfolio] = Array
(
[id] = 1
[user_id] = 0
the automated 'for' attribute for the $this-Html-label.
On Sun, May 9, 2010 at 1:01 AM, Andy Dirnberger
andy.dirnber...@gmail.comwrote:
Labels are supposed to be used with input fields. You should be using
th for table column headers.
On May 8, 4:13 pm, ZAky procsh...@gmail.com
Labels are supposed to be used with input fields. You should be using
th for table column headers.
On May 8, 4:13 pm, ZAky procsh...@gmail.com wrote:
I am trying to omit the auto generated 'for' attribute for
$this-Html-label with no success.
I tried:
Why use the subquery?
SELECT * FROM mytable WHERE some_id = 1 GROUP BY block_id HAVING
MAX(date)
or:
$Model-find('all', array(
'conditions' = array('Model.some_id' = 1),
'group' = ('Model.block_id HAVING MAX(date)'),
);
On May 7, 6:16 am, Eleazar gerrit.kru...@gmail.com wrote:
Hello
for
,
[original table name 2]-values
[1]- etc.
What on earth could cause this? I have no idea where to begin! Why is
the returned array not formatted in the usual way? Why would it work
on the localhost but not on the online server? Any ideas will be
appreciated!
On May 7, 4:08 pm, Andy
I believe the src attribute of any script tag loaded through an Ajax
call is ignored; all JavaScript needs to be included in the original
page load or embedded directly in the response.
On Apr 30, 3:23 am, Vijay k.vidn...@gmail.com wrote:
Thanks for reply andrei.
I am calling the normal
I think mex is talking about dropping WordPress right into the webroot
folder with the ultimate goal being to have http://www.example.com/users
going to UsersController in Cake and http://www.examples.com/some-post/
going to WordPress. The problem is, .htaccess would have no easy way
of knowing
Check the Cookbook http://book.cakephp.org/view/127/One-Rule-Per-Field
On Apr 22, 10:10 am, Angelo angelo.maior...@gmail.com wrote:
Hello,
I juste discover ina blog article that we can use a on value in
$validate array.
Is there somewehere documentation about all value we can put in
My example does not compare field1 and field2 for uniqueness against
each other, it compares field1 and field2 against the database. When
creating a new record, it will check that the combination of
field1+field2 doesn't already exist in the database. When updating a
record it will check that the
Here's a stripped down example of how I do it:
app_model.php
class AppModel extends Model {
...
function isUniqueMulti($data, $fields) {
if (!is_array($fields)) {
$fields = array($fields);
}
foreach ($fields as $key) {
$tmp[$key] = $this-data[$this-name][$key];
Check out JsHelper in 1.3
http://book.cakephp.org/view/1594/Using-a-specific-Javascript-engine
On Apr 19, 10:17 am, Bryan Lim ytbr...@gmail.com wrote:
question as above.
I also want to ask if there's an official jquery helper for cakephp?
The one at the bakery is kinda outdated.
thanks!
Cake doesn't insist on anything. The nature of clicking a submit
button in a form is to submit the form. That means the browser sends
the post/get request to the server and loads the response. If you want
different behavior, you need to catch the submit event through
JavaScript and cancel it.
The
Try $this-Auth-allow('*'). I think the addition of array() is what's
tripping you up.
On Apr 9, 4:48 pm, TobyG toby.i.griffi...@googlemail.com wrote:
Hi there,
Just wondering how to grant access to a plugin page using Auth.
Have tried using...
$this-Auth-allow(array('*'));
in the before
Why are you trying to save to the relationship table? Cake will do
that for you automatically.
What does your view look like (at least the part that creates the
form)? Provided your HABTM is set up correctly in the models and view,
calling $this-Model-save($this-data) in the controller should be
Why not perform your manipulations in afterFind?
http://book.cakephp.org/view/681/afterFind
If you add an 'age' key to the result in the callback (my guess is you
store the date of birth in the database, not the current age), you can
then use $person['Person']['age'] in your view.
On Mar 30,
You need to do two things:
1. Accept all of the parent constructor's parameters
2. Call the parent constructor
function __construct($id = false, $table = null, $ds = null) {
parent::__construct($id, $table, $ds);
...
}
That said, I'm not exactly sure what you're doing with parent::$this-
What happens if you change SisField::$hasMany to var $hasMany =
array('SisQueue');?
pardon for my dumbness but I did not understand what you are asking me
to do...in the model hasMany is already var hasMany=
I'm asking you to change $hasMany from what you have to the shorter
version I
What happens if you change SisField::$hasMany to var $hasMany =
array('SisQueue');?
On Mar 6, 9:02 pm, mathaios mathaio...@gmail.com wrote:
yes Paul this is the problem!
$this-SisField-SisQueue-belongsTo does return an empty array
instead of the real one. Clearly Cake is auto-creating the
What is the actual name of model2 and what is its filename? If the
file isn't being found, model2 is of type AppModel and not model2,
which would explain why you can't access a method defined in model2.
On Mar 4, 12:36 pm, mathaios mathaio...@gmail.com wrote:
Hallo all bakers! I hope someone can
XMLHttpRequest cannot upload files. The two ways to give the
appearance of Ajax are with Flash (e.g., Uploadify, SWFUpload, etc.)
and with an iframe.
Either way, only the data from $_POST ends up in $this-data. To
access any uploaded files, you need to use $_FILES.
Check out the new CakePHP
', array('rows' = '10', 'columns' = '40'));
echo $form-radio('frontpage', array('1'='Yes','0'='No'));
echo $form-end('Save Post');
?
I want to thank everyone who has helped out with my questions.
On Feb 24, 7:21 am, Andy Dirnberger andy.dirnber...@gmail.com wrote:
If you have debug set to 0
and the it does not output any of
the information. If I put ?php echo $post['User']['id']; ? or ?php
echo $post['User']['username']; ? those values will output just fine
but not displayname, what might cause this?
On Feb 23, 8:36 pm, Andy Dirnberger andy.dirnber...@gmail.com wrote:
Did you try
Did you try just using var $belongsTo = array('User');? The values
you are supplying for className and foreignKey should be the defaults.
If you remove the $belongsTo piece, do your posts show up again? If
not, what else did you change? What code do you currently have in your
controller? No
Try $belongsTo instead of $hasOne.
$belongsTo = array('User');
On Feb 22, 7:03 pm, deek derek.bon...@gmail.com wrote:
First of all let me say I'm very new to CakePHP and complex PHP in
general. I based the blog I am working on off the tutorial on the
CakePHP website. I skipped creating ACL
It's still sessions: http://book.cakephp.org/view/173/Sessions
On Feb 22, 9:01 pm, Josh LaMar jola...@umail.iu.edu wrote:
Hi all,
This is my first post. I am new to CakePHP but I have experience
programming in PHP and Python/CGI. Anyways I want to get comfortable
switching over to CakePHP by
44 matches
Mail list logo