I am sorry.. I was able to make the validation worked again.
if (empty($this->data))
{
$this->render();
}
else
{
if ($this->Email->save($this->data))
I am using rdBloggery and adding on a few custom pieces to the system
for a fun project to learn cakephp better.
I have a list of users and they are sorting by whichever header I
click on, but I ran into a problem causing me a little grief. I added
a column from my Transaction model to the User l
I've been playing with CakePHP for a few weeks now and just when I
thought I was getting the hang of things, I've run into a problem I
can't quite figure out. I keep getting the following notices whenever
I run the html checkbox helper in Cake 1.1.
Notice: Undefined offset: 1 in C:\Program Files\
maked
On Jul 25, 5:37 pm, apadzik <[EMAIL PROTECTED]> wrote:
> Hi! I'm a beginner in Cake and can't understand one thing, maybe you
> more experienced people will know the solution:-)
> So, I have two tables in db: products (id,name) and productsizes
> (id,product_id,size);
> Two models: Product,
Yes. My index() function is my form and also my validation for the
captcha.
I have tried to add this code..
function index()
{
print_r($this->data);
//echo $_SESSION[CAPTCHA_SESSION_ID]."///";
//Array ( [Email] => Array ( [name] =>
Try using $ajax->submit() instead of $form->submit();
Geoff
--
http://lemoncake.wordpress.com
On Jul 26, 2:05 pm, Michael Augustyniak <[EMAIL PROTECTED]>
wrote:
> Grant Cox wrote:
> > Be more clear with your question - what is the problem, and what do
> > you want to achieve?
>
> > The only thin
Grant Cox wrote:
> Be more clear with your question - what is the problem, and what do
> you want to achieve?
>
> The only think I could see that is wrong, is if you submit an empty
> field, it should still come through to $this->data['User']['nickname'].
>
>
> --~--~-~--~~-
yes, b
Is your index() function the form?
If so, to re-show the form just call render(), or let the execution
fall out the bottom, where render() will be automatically called.
Don't redirect the user - this will cause a whole new page request and
so the existing data is lost.
If your index() is not you
Be more clear with your question - what is the problem, and what do
you want to achieve?
The only think I could see that is wrong, is if you submit an empty
field, it should still come through to $this->data['User']['nickname'].
--~--~-~--~~~---~--~~
You received
It doesn't matter if you do instance the models yourself, but they
don't need to be. The only hazards in this is if a $Model->id is
already set, then a future save (without id field) will perform an
UPDATE, not an INSERT. But if you follow the recommended practice of
calling $Model->create() bef
> Am I missing something simplistic here?
Yes, $this->Product (and $this->Product->User) are instances of your
Model, not controller. While you could use requestAction to call the
other controller, this is slow, and all data functionality like that
really should be in your model anyway.
So, mov
I don't think HABTM saves have changed from 1.1, so you should look at
the manual (Models, "Saving hasAndBelongsToMany Relations"), and
search this group, it has been covered before.
In your case, you will want to save something like:
if (!empty($this->data['Artist']))
{
// move the "genr
I was able to follow this guide from the bakery:
http://bakery.cakephp.org/articles/view/captcha-component-with-phpcaptcha
And was able to install it on my machine, although. Im having troubles
validating the captcha. I mean i don't know if its the right thing to
do.
Ok, so i can now see the ima
You can pass a full path to the HTML helper image function.
echo $html->image( 'http://cakephp.org/img/cake.power.png',
array('alt'=>'CakePHP!') );
On Jul 26, 12:24 pm, Beth <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've got a client who is using Akamai for hosting their images (tons
> of photos). D
Yes, set the last parameter of $html->link() to false, so it doesn't
escape the html of the title (which is your image source).
$thumb_img = $html->image('yourimage.jpg');
echo $html->link( $thumb_img, '/your/link', array(), false, false );
On Jul 26, 12:44 pm, roliver <[EMAIL PROTECTED]> wrot
Hi all,
Is it possible to use $html->link and $html->image together. As in
wrapping html->link around the html->image so that an anchor tag can
be added to the image so the user can click it?
thanks
--~--~-~--~~~---~--~~
You received this message because you ar
Hi,
I've got a client who is using Akamai for hosting their images (tons
of photos). Does anyone have a html helper that supports specifying
the full image src instead of cake's relative path?
Thanks!
--~--~-~--~~~---~--~~
You received this message because you a
I have been racking my brains for a few days on this, I am new to cake
and have been building an experimental application, trying to use as
much of the cake functionality as possible to learn it.
Using cake 1.2
The issue I am having is, I cannot not insert/update to a lookup table
from a HABTM a
Hmm.. Very interesting. I had not seen that before. I might have a
play later on and see if I can get it to work. I'll let you know how
I go.
Geoff
--
http://lemoncake.wordpress.com
On Jul 26, 8:49 am, chewie124 <[EMAIL PROTECTED]> wrote:
> Ahhh... ok. Thanks for the input. I was grepping t
you should use Model::invalidate() in beforeValidate. Otherwise use
beforeSave and return false if you need to stop execution.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group
To join my fellow bakers: I'm very happy to see a major open source CMS
project like Mambo moving to CakePHP. From my point of view this is a
great chance to silence the ones in the PHP community who still think
'frameworks' are trapping you in a box rather then given you this box to
stand upon
My name is Chanh and I am a member of the Mambo Core team.
Look like Mambo on Cake is well receive here!
Thanks for the welcome!
On Jul 25, 4:52 am, Tijs Teulings <[EMAIL PROTECTED]> wrote:
> sweet! and welcome to the community :)
>
> Tijs
>
> On 25-jul-2007, at 13:20, cauld wrote:
>
>
>
> > Th
Ahhh... ok. Thanks for the input. I was grepping thru the
helpers.php library in the cake core, and it looks like in the
setFormTag function , if there's a 3rd level branch,ie FormerEmployer.
2.name, the '2' will get parsed and tagged as the 'modelId'. Seems
like though, the propigation hasn't
You will have to create the inputs the old fashioned way, and create
the empyer records as an array that you can loop over when posted
back.
In the controller function use $this->set('formerEmployers', $this-
>FormerEmployer->findAllByApplicantId($applicant_id));
Then in the view, make sure you
This may have been answered already but the search is for some reason
not working well for me.
My HABTM looks like this:
var $hasAndBelongsToMany = array('parameters' =>
array('className' => 'Wac',
'joinTable' => 'wacs_params',
Hello.
When Model::beforeValidate() returns false, but
Model::validationErrors is empty Model::save() execution continues.
It's a bug?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to th
How do access form data from the fck editor?
When I output $this->data none of the changes to the textarea are
displayed.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, sen
Hi All -
I'm have a job-board app that has a Resume model which hasMany
FormerEmployer models (like for employment history). There's plenty
of discussion on how to save the data on the controller side (at
least, that I've been able to find), but my question is, is how do you
build up the form, so
your welcome (I'm old, not deaf, no need to yell ;)
Sam D
On 7/25/07, starkey <[EMAIL PROTECTED]> wrote:
>
> THANK YOU!
>
>
--
(the old fart) the advice is free, the lack of crankiness will cost you
- its a fine line between a real question and an idiot
http://blog.samdevore.com/archives/2007
THANK YOU!
On Jul 25, 5:00 pm, rtconner <[EMAIL PROTECTED]> wrote:
> I'm not fully sure if it's the best way, but I've always used the
> loadModel function.
>
> On Jul 25, 2:57 pm, starkey <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > How do I access a model that is not associated in any way to
I'm not fully sure if it's the best way, but I've always used the
loadModel function.
On Jul 25, 2:57 pm, starkey <[EMAIL PROTECTED]> wrote:
> Hello,
>
> How do I access a model that is not associated in any way to the
> current model? For example, lets say I'm in FooController and I need
> data
look in http://manual.cakephp.org/chapter/controllers in Variables
(hint word is 'uses')
On 7/25/07, starkey <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> How do I access a model that is not associated in any way to the
> current model? For example, lets say I'm in FooController and I need
> data fr
You could also have a look here:
http://manual.cakephp.org/chapter/scaffolding
--~--~-~--~~~---~--~~
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 unsu
Hi,
declare $uses in your model which shall retrieve data from the other
model:
var $uses = array('Foo', 'Bar');
Regards,
Sascha
Am 25.07.2007 um 22:57 schrieb starkey:
>
> Hello,
>
> How do I access a model that is not associated in any way to the
> current model? For example, lets say I'
Hello,
How do I access a model that is not associated in any way to the
current model? For example, lets say I'm in FooController and I need
data from the Bar table (or save data to it)... without having any
defined association (e.g. belongsTo or hasMany).
Sounds easy but I'm stumbling on it.
Hello all! I'm just starting to jump in to the wide world of CakePHP
(v1.1 to be safe) and have read through the manual (forgot more than I
remember, but it was good to get acquainted), watched the video
tutorials, and am now going through the IBM DeveloperWorks tutorials
"Cook up Web sites fast
Well, I think I'll asume that nobody use requirePost.
My new question is: how could I simulate the requirePost
functionality ?
Thanks in advance
C
On Jul 24, 7:24 pm, Cacho <[EMAIL PROTECTED]> wrote:
> Hi
>
> I've been following tutorials to process my data and saw the
> recommendation to
Use Cake's built in helper
$html->tableCells($data, $oddTrOptions, $evenTrOptions);
http://api.cakephp.org/class_html_helper.html#700103d203caef2891285438b324122b
On Jul 25, 2:19 pm, Mech7 <[EMAIL PROTECTED]> wrote:
> I use something like this..
>
> $article): ?>
> >
>
>
> You basicall
Hi,
The problem is in the way you create your ACO. You can read this
article http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x
for more information on how to create Acos or Aros. I would recommend
that you use the Acl Behavior in your Task Model.
Ketan
StanMoong wrote:
> Hello,
>
I use something like this..
$article): ?>
>
You basically only need 1 class for the even numbers(or uneeven :p)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send
Hello,
I'm trying create a module where users can create tasks. So, for the
add() function in the TasksController, there is this portion of the
code that gives access to the user.
if ($this->Task->save($this->data)) {
$task_id = $this->Task->id;
$task_alias = $task_id.'-'.$this->
Hey Nate,
well I downgraded my prototype version to 1.5.0 with scriptaculous 1.7
While other ajax calls work with IE7, it seems that the paginator
still struggles.
check it out here: http://www.intellighenziaproject.it/
Dan
--~--~-~--~~~---~--~~
You received t
rtanz wrote:
> how can i recreate scaffolding's use of alternating row colour in the
> list views? they seem to disappear when i bake the views
Just do the following, cakephp has a built in function for alternating
color rows, but fails when any advanced displaying is applied. Follow
my form b
problem to pass the data form form
form(array('action' => '/user/register'),
'post',array('update' => 'registerFormDiv'));?>
input('User/nickname', array( 'type' =>
'text')).''.$error->messageFor('User/nickname'); ?>
submit('Register')?>
The problem is that if I leave the field blank
Damn copy&paste... the last lines of the function are missing:
@ignore_user_abort((bool) $this->runtime[$model->name]
['ignoreUserAbort']);
unset($this->runtime[$model->name]['ignoreUserAbort']);
}
On 25 jul, 18:34, Gorka <[EMAIL PROTECTED]> wrote:
> In ca
In case it helps anyone, this is the solution I've come up with.
Please keep in mind that this is my own personal solution and may
conflict with active development by the core team.
On your edit/add views you must use plain html instead of the form
helper, because it won't generate data[Model][Fi
Yep, I got everything sorted out, but not components are not correctly
loaded into the task I have. Everything is working, writing to the
model etc., except for when I try to use the email component, I get an
undefined stdClass::send() error.
I looked at the shell.php and see that there is no opt
On 7/25/07, rtanz <[EMAIL PROTECTED]> wrote:
>
> how can i recreate scaffolding's use of alternating row colour in the
> list views? they seem to disappear when i bake the views
Here's a great idea:
1) create something that uses the scaffolding
2) look in the code to see how it does the alternat
how can i recreate scaffolding's use of alternating row colour in the
list views? they seem to disappear when i bake the views
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group,
On Jul 25, 2007, at 12:51 AM, inVINCable wrote:
>
> Hey guys,
>
> I apologize if this has been answered before, but I could not find it
> anywhere, and have been attempting to get this thing to work for the
> past 3 hours. I am using WAMP 5 and have tried to set up the console
> the way gwoo did
ok thanks :)
--~--~-~--~~~---~--~~
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, send email to [EMAIL PROTECTED]
For more
On Jul 25, 3:53 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> I think maybe you are trying *too* hard. ;)
Any chance of reducing the try factor to 1 thread per topic? The
advice offered to you in one thread doesn't seem to be taken into
account with your replies to the other two.
http://gro
I have a form which gives the ability to add 3 records of the same
model in one go.
--
create('Content');?>
//First record
input('Content.use',array('type' =>
'hidden','value'=>'yes'));
echo $form->input('Content.title',array('error' => array(
'VALID_NOT_EMPTY'
On Jul 25, 3:59 pm, Steven Chan <[EMAIL PROTECTED]> wrote:
> Hehe,
>
> Finally found out what was going on. It seems that I was using a
> Controller::redirect() in the action that I called to render another
> action. Because of this HTTP redirect, Firefox immediately would drop
> the X-Requested
Just use bake to generate your scaffolding view.
On Jul 25, 9:23 pm, rtanz <[EMAIL PROTECTED]> wrote:
> hi im still building my system using scaffolding, was wondering
> whether i could change the fields that are displayed by scaffolding.
> for example i would like to drop the display of the id f
On Jul 25, 4:23 pm, rtanz <[EMAIL PROTECTED]> wrote:
> hi im still building my system using scaffolding, was wondering
> whether i could change the fields that are displayed by scaffolding.
whats the best thing for me to do?
use bake and edit the output.
hth,
AD
--~--~-~--~~---
On Jul 25, 12:21 pm, phpjoy <[EMAIL PROTECTED]> wrote:
> you mean:
> $this->WidgetMenu->bindModel(
> array('hasOne' => array(
> 'ModelName' => array(
> 'className' => 'ModelName',
> )
> ),
> ), true);
> i t
hi im still building my system using scaffolding, was wondering
whether i could change the fields that are displayed by scaffolding.
for example i would like to drop the display of the id field. I know
that scaffolding is supposed to be used in the intial phases only but
i am putting up something
On 7/25/07, inVINCable <[EMAIL PROTECTED]> wrote:
> Could someone please point me in the correct direction on where to go
> from here. (I have watched the screencast several times btw)
>
To my untrained eye, it looks like you have a few problems here:
1) I don't think you've setup the path to th
Hehe,
Finally found out what was going on. It seems that I was using a
Controller::redirect() in the action that I called to render another
action. Because of this HTTP redirect, Firefox immediately would drop
the X-Requested-With header, plus a few others. However, the HTTP
redirect worked with
I should also add that I am just trying to create a simple CRON
script, so maybe what I am trying to do is uncessary?
Sincerely,
inVINCEable
On Jul 24, 11:51 pm, inVINCable <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I apologize if this has been answered before, but I could not find it
> anywhere
On 7/25/07, rtanz <[EMAIL PROTECTED]> wrote:
>
> im still trying to fully understand the concept of models,
> associations and how this relates to my db tables. For example as far
> as I can understand the relationship between modules and roles is
> HABTM but then I cannot do this with the associa
Thank's for answer and tip about the $c_id:)
Ok, but how can I usa that generateList function if I don't have
$product_id parameter?
As I said I want to display all products from categories on one page,
so my display action only handles category_id parameter, not
product_id parameter.
I tried the
im still trying to fully understand the concept of models,
associations and how this relates to my db tables. For example as far
as I can understand the relationship between modules and roles is
HABTM but then I cannot do this with the associations or i cannot
understand how it can be done. Where
Better use this->Box->create() before saving to create a new Model object
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On 7/25/07, Unite <[EMAIL PROTECTED]> wrote:
>
>
> Fixed it. Needed a $this->Box->id= null; in
> if(!empty($temp)) { //incase user skipped that box
> $th
On 7/25/07, rtanz <[EMAIL PROTECTED]> wrote:
> Does the db structure enable me to do these things? thanks
>
What I don't understand is why don't you just try it?
--
Chris Hartjes
Senior Developer
Cake Development Corporation
My motto for 2007: "Just build it, damnit!"
@TheBallpark - http://w
Model objects, from my understanding, are instantiated once, and not
meant to be explicitly instanced by your code, so you could call them
singletons. I'm not sure what you're asking about recycling the object
between contexts... that sounds like a very Java-oriented question. ;)
bingomanatee
In Cake, are model objects supposed to be used like singletons --
stored in the classRegistry and reused between contexts? Is there any
hazards implicit in recycling a single model object between contexts?
--~--~-~--~~~---~--~~
You received this message because yo
Fixed it. Needed a $this->Box->id= null; in
if(!empty($temp)) { //incase user skipped that box
$this->Box->save($temp); //Writes over old data and
pointer doesnt
move
}
On Jul 25, 12:43 pm, Unite <[EMAIL PROTECTED]> wrote:
> Heres the problem. I am filling in forms and sav
$size_list = $this->ProductSize-
>generateList( array('ProductSize.product_id' => $product_id );
But a couple of notes. You can probably get what you want by just
setting
$this->Product->recursive = 1;
before the findAllByCategoryId line.
You can also improve the $c_id= line, to
$c_id = $this->
Heres the problem. I am filling in forms and saving them to a session.
These forms are repeats of themselves so basically in the session a
array of how ever many forms the user made is saved to the session.
Simple terms a session gets saved as a array of a forms data eg:
array(box1,box2,box3.)
When I send a text email from the email component (cakephp 1.2 9 july)
I get on evry line a new empty line.
in my template i got this:
hello this is
a text message
from cakephp
And when i send this email I get this back:
hello this is
a text message
from cakephp
I changed nothing else. Only
The system should work as follows:
A number of modules are created and each module has a review
associated with it
A number of users are created and each user is assigned to one or more
modules. In each of these module he is assigned to, he will be given a
particular role. Each role has a number
I tried a similar approach and most likely will end up using it due to
time constraints for the project. Still, i18n support is a great step
in Cake's maturity road, and I'd love to make it work even if it was
in a not-so-elegant way. In fact, maybe Cake Foundation may study
donation-promoted deve
any help on this? thanks
--~--~-~--~~~---~--~~
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, send email to [EMAIL PROTECTE
thanks i will try your suggestions
On Jul 25, 7:01 am, Sascha Fröhlich <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> triggering is a typical database function,
> seehttp://dev.mysql.com/doc/refman/5.0/en/create-trigger.htmlfor more
> information.
>
> Be
sweet! and welcome to the community :)
Tijs
On 25-jul-2007, at 13:20, cauld wrote:
>
> The installer prototype I wrote for Mambo utilizes 1.1, but I will be
> redoing it with 1.2 soon. Mambo 5 will go with 1.2.
>
> On Jul 25, 2:49 am, "Sascha Fröhlich" <[EMAIL PROTECTED]>
> wrote:
>> Heya,
>>
The installer prototype I wrote for Mambo utilizes 1.1, but I will be
redoing it with 1.2 soon. Mambo 5 will go with 1.2.
On Jul 25, 2:49 am, "Sascha Fröhlich" <[EMAIL PROTECTED]>
wrote:
> Heya,
>
> good news. I wonder whether you will use 1.1 or 1.2 (stable or feature
> rich :-))?
>
> Best rega
Hi! I'm a beginner in Cake and can't understand one thing, maybe you
more experienced people will know the solution:-)
So, I have two tables in db: products (id,name) and productsizes
(id,product_id,size);
Two models: Product, Productsize;
product.php:
class Product extends AppModel
{
var
you mean:
$this->WidgetMenu->bindModel(
array('hasOne' => array(
'ModelName' => array(
'className' => 'ModelName',
)
),
), true);
i tried that, it doesn't work.. i didn't get what's the second
parameter (unle
pr($this->params)
On Jul 25, 7:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> What variables do I use do determine the controller function I am in?
> For instance, I would like to display certain items in the layout
> based upon the controller and function that is being executed.
--
You could try breaking the 900+ users into smaller chunks - e.g. first
sending fifty e-mails, then right after that another fifty, until all
of them have been sent.
On Jul 24, 11:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm trying to set up an automatic newsletter for one of the si
Heya,
good news. I wonder whether you will use 1.1 or 1.2 (stable or feature
rich :-))?
Best regards,
Sascha
2007/7/25, bugfaceuk <[EMAIL PROTECTED]>:
>
> It's almost bizarre, I have just started fiddling with Cake in the
> last week... and look after a Joomla site, and was thinking "the
> reas
> Maybe your server has a limit (to protect themself against spamming)
> with regard to accepted mails sent on a certain time range.
>
> once I noticed that with Swift Mailer (http://www.swiftmailer.org/)
> you can tell him how many e-mails to send before taking a rest, and
> them restart.
>
> che
Maybe your server has a limit (to protect themself against spamming)
with regard to accepted mails sent on a certain time range.
once I noticed that with Swift Mailer (http://www.swiftmailer.org/)
you can tell him how many e-mails to send before taking a rest, and
them restart.
check out this pa
On Jul 25, 8:58 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Can anyone make a suggestion on a different way to go about it so I
> don't have these problems?
I have to solve the same problem.
I would try something like this
1. When sending emails, dont send them directly to the user but
hey guys,
I'm retrieving some data from webservices (YouTube, Flickr) from a
controller. Therefore I have no DB table and no model for that
controller.
In order to use cake built in paginator helper, what should I build, a
kinda Flickr behavior? or a component?
Dan
--~--~-~--~~---
ok, I didn't search the group properly.
The thing I'm requesting seems not to be supported, what people seem
to do instead and which I ended up doing was adding a third class for
association. Meaning instead of having two models with HABTM.
I now have two Models with hasMany (originally HABTM) an
It's almost bizarre, I have just started fiddling with Cake in the
last week... and look after a Joomla site, and was thinking "the
reason I haven't developed shed loads of components is that it needs
to be integrated with Cake, hell even built on it"...
And now Mambo have made this move. I will
What variables do I use do determine the controller function I am in?
For instance, I would like to display certain items in the layout
based upon the controller and function that is being executed.
--~--~-~--~~~---~--~~
You received this message because you are s
I'm trying to set up an automatic newsletter for one of the sites I'm
working on. All the data for the newsletter is in the database for
the site already (i.e. who to send it to and the data to send).
I set up a function to create customized emails for each of the
members using the PHPMailer com
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
triggering is a typical database function, see
http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html for more
information.
Best regards,
Sascha
Chris Hartjes schrieb:
> On 7/24/07, rtanz <[EMAIL PROTECTED]> wrote:
>> hi i have a table cont
92 matches
Mail list logo