Thanks (again) nate for this opening to the community !
My 2 cents :
-> CakePHP (Several good things have already been said so I kept the
most important to me)
+ No namespaces : CakePHP 2.0 must be PHP5.3+
+ Better plugin management : dependencies management, versions, some
API changes (HTMLHelpe
nobody familar with this? *hope*
On 9 Mai, 09:16, deefens wrote:
> Hi guys,
>
> this is driving me nuts: when i use bindModel() to add a relationship
> on the fly to an certain model, it seems that cake ignores the table
> name specified in the attached model in var $useTable.
>
> Example:
>
>
In my opinion, you let the database do what it does best, managing
data, and that includes all the constraints/rules between entities/
tables. I would never let CakePHP handle my cascade operations!
Example with posts and comments. It is obvious that comments can't
have a life of their own withou
1. PHP 4 Support *let's make CakePHP more fast with full PHP 5
2. Prototype and Scriptlous * it's better using Jquery
3. No CounterCache HABTM
4. Complex and heavy ACL * it's works to me but very hard for newbie
5. Still not effective form helper html
imagine how long code using form helper for
I think I answered my own question.
I was just browing through the Cake bug tracking system and found
this:
https://trac.cakephp.org/changeset/6525
Turns out you have to force Cake to build the paths used in the site
before
you are able to include any of the files. So in order to get those
pat
I just got around to trying to import the session component in my
bootstrap file but I'm getting this error now:
Fatal error: Class 'SessionComponent' not found
It seems like it doesn't know that the session component exists
in /app/config/bootstrap.php
Any ideas how I can include the session c
When building an app is it necessary to define additional PRIMARY KEY ( `id`
) , INDEX keys in the database? Is it best to use the FOREIGN KEY references
with CASCADE and all of that within the database even though Cake can take
care of most of that or just setting the PRIMARY KEY is all that is n
my previous devs had a working website live for us but now the devs
are gone and i've been trying to get this site up
they way they have it weird though.. and i'm just trying to get it to
run on a single server
so maybe someone can help
they have in my /html
app/ dir
which has the app contoll
There are a lot of things to like in cakephp, but if I had to say what
aggravates me the most it's the seemingly wasteful and inefficient SQL
calls that cake makes. The first time I turned on debug = 2 I was
astounded at the close to 100 sql calls on a basic page that 1 or 2
SQL statements should
I got it. Miles, thanks to your reply.
On Mon, May 11, 2009 at 4:52 PM, Miles J wrote:
>
> Theres no such file, its basically saying "Put your own custom
> javascript filter here".
>
> Try this:
> http://www.milesj.me/blog/read/32/cssjsasset-compression-in-cakephp
> >
>
--
Thanks
Joshua
--~-
PHP 4 support.
Real use of plugins that are as easy as drag and drop.
Better bakery, code is cut and pasted, why not support svn or git,
preferably git for all code put on the bakery?
A proper support forum, google groups is great, but the form seems to
be structured in a way that many people fin
Hi
I have a web application with has many services.
Now user has a main page from that he can access to every services.
Now I keep the value of service_id inside the session.
My problem is that the user can have many services opened
simultaneously (every service in a different tab ) so when the
I figured it out. For the recursive delete to work, you have to set
the second parameter of bindModel to true, which makes the binding
still until the end of the request. Otherwise it only sticks for the
next Model operation and then reverts back to not existing before it
gets a chance to do the o
I have found nice example of such a comparison ...
http://book.cakephp.org/revisions/view/551/the-manual
On May 11, 11:07 pm, "toka...@gmail.com" wrote:
> Hi, does anybody know if cake offers some text comparison libraries? I
> need to compare to versions of text and see visualy differences.
Well. If I do one array at a time it works.
For example, doing a saveAll() with the following works.
Array
(
[Ticket] => Array
(
[channel_id] => 2
[event_id] => 1
[row_id] => 1
)
[Price] => Array
(
[0] => Array
Thanks for the reply,
I've misunderstood the concept of model, which is only the schema layer.
I wanted the model to act as controller...
After reviewing the relations, I've added some containable and now I
have acheived the result the proper MVC way.
Flipflops pisze:
> Hi Faza
>
> I don't th
Hi, does anybody know if cake offers some text comparison libraries? I
need to compare to versions of text and see visualy differences. like
with colors emphesized what was added, etc...
I have seen on cake's website some thing like that I guess.
Thanks Tomas
--~--~-~--~~---
Hi Brian,
thanks for your reply.
I tried the jquery tutorial and I like that solution with replacing
href "onfly".
So I believe the jquery will be working but I don't wont to mix to
much frameworks inside my app. I already use prototype.
Thanks for help.
Tomas
On May 4, 6:15 pm, brian wrote:
Wow - so I feel dumb about that mistake! I updated my code and it is
working now. I was going crazy trying to figure that out!
Now I'm having an issue where bindings that are established in the
model are recursively deleting, but bindings I set on the fly in the
controller are not deleting. Here'
Yes its basically cloning, but thats the only way to extend the helper
at the moment without editing the core files. Unless like you stated,
is do some fancy logic in the app helper.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
On Mon, May 11, 2009 at 4:04 PM, brian wrote:
> On Mon, May 11, 2009 at 1:00 PM, jwerd wrote:
>>
>> And this is considered good design in that sense?
>
> As I said, I didn't really understand why you want to render another
> controller's view.
Sorry, I should have clarified that not understandi
On Mon, May 11, 2009 at 1:00 PM, jwerd wrote:
>
> And this is considered good design in that sense?
As I said, I didn't really understand why you want to render another
controller's view. Using render() works but your overall scheme might
not be the best approach.
As Gonzalo mentioned, you migh
You shouldn't have to create a model nor controller for the HABTM
table.
I think that if your Games Model has the relations correctly
specified, should be enough to include genre_id to the array which you
are sending to save method, something like this:
$data = array
(
'Game' => array
Are your relations correctly setted in your models?
Are you doing $this->Ticket->saveAll($data) in TicketsController or
$this->Price->saveAll($data) in PricesController?
Are there no SQL errors in error.log? (if debug is not setted to zero
of course)
--~--~-~--~~~---~--
var $validate = array(
'field1' => array(
'unique' => array(
'rule' => 'isUnique',
'required' => true,
'message' => 'NOT_UNIQUE'
)
),
'field2' => array(
'
I can see you are using ".save_me" as the selector but then your link
should have class="save_me", other wise $('.save_me') wont find any
elements.
Try link('yourtext', '#', array(..., 'class' =>
'save_me')); ?>
To output the controller/action url you can use url
('/controller_name/action_name');
Well, I finally got to grips with containable behavior and have
successfully been able to write my find queries to return just the
information I need.
Now I am trying to take this to the next level and put conditions in
the contain array, but I am running into problems. I have found quite
a few po
I wrote to support to my hosting, this is what they answered:
"I checked the mail logs and it shows that it wasn't authenticated.
Like it either wasn't using the correct username and password or it
didn't like the password possibly for characters I'm not sure, it only
tells me it wasn't authentic
I write to support to my hosting this is what they told:
"I checked the mail logs and it shows that it wasn't authenticated.
Like it either wasn't using the correct username and password or it
didn't like the password possibly for characters I'm not sure, it only
tells me it wasn't authenticated.
On Mon, May 11, 2009 at 2:00 PM, jwerd wrote:
>
> And this is considered good design in that sense?
>
> On May 11, 10:41 am, brian wrote:
> > I'm not sure I follow all that but it seems like what you want to do
> > can be accomplished like so:
> >
> > $this->render('contents_comments/the_view_yo
And this is considered good design in that sense?
On May 11, 10:41 am, brian wrote:
> I'm not sure I follow all that but it seems like what you want to do
> can be accomplished like so:
>
> $this->render('contents_comments/the_view_you_want');
>
> On Mon, May 11, 2009 at 12:14 PM, jwerd wrote:
I have a problem whith Cake PHP generating duplicate mysql queries
when using 'contain' with find().
In the controller:
$data = $this->Client->find('first',aa(
'conditions',aa(
'Client.id',$id
I'm not sure I follow all that but it seems like what you want to do
can be accomplished like so:
$this->render('contents_comments/the_view_you_want');
On Mon, May 11, 2009 at 12:14 PM, jwerd wrote:
>
> I don't know if this is very practical or if it's bad design, but I
> have a scenario where
On Mon, May 11, 2009 at 8:26 AM, Toby wrote:
>
> Thanks for the advice majna.
>
> This leads be to ask whether the array('controller'=>'menus',
> 'action'=>'main') can/should be a private function? And should it
> just return the unmodified response to a find('all') call?
It must be a public me
Ah ok, cheers for all the help!
Toby
brian wrote:
> It appears that there's no built-in way to do that. So, i guess you'll
> need to create a helper of your own for it.
>
> On Mon, May 11, 2009 at 3:19 AM, toby1kenobi wrote:
> >
> > Aha, I see. And *should* I be able to add style tags to my pag
It won't let me edit my post so I'm going to add some more details
below.
Essentially what I'm trying to accomplish (without the use of ugly
iframe hackery) is to be able to (via ajax) use another controller's
view within my video controller that will still apply the model's
validation, etc... I
I don't know if this is very practical or if it's bad design, but I
have a scenario where I need to use another controller's view in a
seperate controller, but I want all the automagicness, all the
formatting, etc...
Basically, I'll give you the real world example:
I have a video display page, a
You can create your own validation method and pass both values to it.
http://book.cakephp.org/view/150/Custom-Validation-Rules
2009/5/11 Alexandre Brasil :
>
> Hi Folks,
>
> Does it possible validate 2 fields with 1 rule in CakePHP?
>
> For instance, I have field1 and filed2 that need to be val
It appears that there's no built-in way to do that. So, i guess you'll
need to create a helper of your own for it.
On Mon, May 11, 2009 at 3:19 AM, toby1kenobi wrote:
>
> Aha, I see. And *should* I be able to add style tags to my page like
> that (see my previous response to your penultimate mes
On Mon, May 11, 2009 at 12:29 PM, Swiftguy121 wrote:
>
> Thanks for responding to my query.
>
> I think im not clear.
>
> Please click on the following link to view the form screenshot.
>
> http://i635.photobucket.com/albums/uu71/swiftguy121/donation.png
>
> Here in this formyou can see Donor
Thanks for responding to my query.
I think im not clear.
Please click on the following link to view the form screenshot.
http://i635.photobucket.com/albums/uu71/swiftguy121/donation.png
Here in this formyou can see Donor,Cause id's (primary keys of the
respective DB tables) drop downs
In
Ahh, I finally figured it out.
I was using a TidyFilter Helper for another view and it was changing
the results of the output! I guess the lesson learned is keep track of
your helpers...
On May 10, 7:48 pm, Aaron Torres wrote:
> Ah, that file path was actually a typo:
>
> app/views/controllerna
What I do is save my messages to an array then do an join and setFlash
to the results of that join.
array_push($messages,'The Rule Exception has been
saved');
$this->Session->setFlash(join('',$messages));
On May 11, 6:10 am, Roman Brunnemann wrote:
> Hi,
>
> short q
Hi Faza
I don't think it is a problem with using ClassRegistry::init inside
another model as do exactly what you are trying to do quite a lot.
(e.g. $link_data = ClassRegistry::init('Link')->get_shared_links();)
Perhaps it is something to do with afterFind() ?
John
On May 11, 12:27 pm, "Faza"
Hi,
short question. I call different methods of a controller on one page
request. Most of the functions should write something to the view. I use
setFlash for this. But it only shows me the message from the last
"setFlash" call. Is there a way to append something to the existing value?
Thanks
Loboto, and how do I indicate action in the URL?
For example, I have a controller named Contact.
Router::connect('/:controller/:action/*');
Am I suppose to replace the above line to my Contact controller?
On 12 mayo, 04:01, "Dr. Loboto" wrote:
> You can try this routes set:
>
> Router::connec
modify core classes = suicide :)
i'll try something else :)
On 11 Mag, 14:30, John Andersen wrote:
> If you are willing, you could just change the formHelper method
> yourself!
> Replace the standard date format with a predefined constant. Thus
> should you later wish to change the format, you
If you are willing, you could just change the formHelper method
yourself!
Replace the standard date format with a predefined constant. Thus
should you later wish to change the format, you just change the
constant only!
Later you could suggest the CakePHP team to introduce the change into
their cod
Thanks for the advice majna.
This leads be to ask whether the array('controller'=>'menus',
'action'=>'main') can/should be a private function? And should it
just return the unmodified response to a find('all') call?
Also, is there a way to clear the cache programmatically, so that when
the menu
Hi, I seem to have the same problem but in a newer version of cake..
I can't use the patch because of the fact it already is a newer
version of cake..
Can anyone help me on this one?
Niels
On 14 apr, 00:07, "Dave Maharaj :: WidePixels.com"
wrote:
> Just not sure why it happened. I tried the tu
Hi, I seem to have the same problem but in a newer version of cake..
I can't use the patch because of the fact it already is a newer
version of cake..
Can anyone help me on this one?
Niels
On 14 apr, 00:07, "Dave Maharaj :: WidePixels.com"
wrote:
> Just not sure why it happened. I tried the tu
@ John
$dateFormat = "DMY" was just an example :)
@ Miles
your solution works properly but that's helper "cloning", not
"extending"... the new helper wouldn't inherit any of parent's
function... i need to re-code them all.
i'm also thinking about future code changes/improvements by cake team.
i
Are you sure?
I know it works in Controller, to use another model,
But I want to query a model from inside another model.
N.B. I've tested $uses in model and it doesn't work.
> you can use : $uses variable for include another model in your current
> model.
>
>
> $uses = array('modelnameA','mod
you can use : $uses variable for include another model in your current
model.
$uses = array('modelnameA','modelnameB');
2009/5/11 Faza
>
> Hi all,
>
> I've run into a weird problem.
>
> I have two models, not directly related, but I need data from model A to
> modify model B find results us
Hi all,
I've run into a weird problem.
I have two models, not directly related, but I need data from model A to
modify model B find results using ModelB::afterFind();
In model B, i use this:
$myModelA = ClassRegistry::init('ModelA');
this returns no error.
but when I do
$values = $myModelA->
Hi people, i am building an app which includes a user and his profile
(which is unique) and i want to put some authentication and
authorization.I updated my old version to new one and i 'd like to ask
which is the best way to make these work.I want a simple auth that
some pages will require login
Hi Folks,
Does it possible validate 2 fields with 1 rule in CakePHP?
For instance, I have field1 and filed2 that need to be validaded as
“isUnique” on the model (because on the database table they are UNIQUE
but not PRIMARY KEY).
I tried some like code below, but no sucess :(
var $validate = a
Changing ['language'] with ['lang'] in your case
On May 11, 7:48 am, Marco wrote:
> On May 10, 10:25 am, Pixelastic wrote:
>
> > I want to keep the :lang parameter in the url for SEO purposes. This
> > way each ressource of my app will have a different url and my pages
> > will be indexed in al
On May 10, 10:25 am, Pixelastic wrote:
> I want to keep the :lang parameter in the url for SEO purposes. This
> way each ressource of my app will have a different url and my pages
> will be indexed in all the available languages (seems logical as their
> content will be different).
>
You don't n
Funny that your example of wanting to force dateTime function to use
'DMY' format as default for the dateFormat, as that is what is defined
as the default format in the class :) ... but I understand it! The
default format is hardcoded in the method definition, thus can't be
changed without overloa
But i want the image to appear instead of link...any ideas?
2009/5/11 arif hossen
> I think it is good solution for your error correction .Please follow this
> code:
>
> link(__('Delete', true), array('action'=>'delete',
> $user['User']['id']), null, sprintf(__('Are you sure you want to delete
How I suggested IS HOW you extend the helper.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email
@ John Andersen:
for ex. force "DMY" as dateFormat in dateTime function
@ Miles J
cloning core helpers doesn't sounds very good to me...
i found an alternative way to "extend" core helpers... but it's not
elegant.
here's the code:
Form-
>function_exists($function)) return call_user_func_arra
> as far as I understood you, cakephp inserts NULL instead of '0' right?
Correct
> Set your database to default '0' as it should work.
It doesn't as MySQL refuses to accept NULL for a NOT NULL field and if
NULL is allowed then it supersedes the default 0 value.
> - If it does not add "function
Could you give example for using prefix routing in language purposes?
On May 10, 10:57 pm, Miles J wrote:
> I would suggest prefix
> routing:http://book.cakephp.org/view/46/Routes-Configuration#Prefix-Routing-544
--~--~-~--~~~---~--~~
You received this message be
...or make use of callback Model::beforeValidate()
"$validate" is PHP class member so it must be constant expression.
(not variable function)
On May 11, 4:17 am, Miles J wrote:
> Well you could place the validation array on the $validate property
> within AppModel.
--~--~-~--~~--
You can try this routes set:
Router::connect('/:controller/:action/*');
Router::connect('/', array('controller' => 'pages', 'action' =>
'display', 'home'));
Router::connect('/(.*)', array('controller' => 'pages', 'action' =>
'display'));
Controllers index actions won't work still, you always nee
Theres no such file, its basically saying "Put your own custom
javascript filter here".
Try this: http://www.milesj.me/blog/read/32/cssjsasset-compression-in-cakephp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"C
Create your own form.php or html.php in your app/views/helper/ folder.
Then just copy and paste the core form/html helper into the one you
created, and then alter it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"C
This is the full validation block, but I did test the function with
only the username validation. It does the same thing. Strange how it
works at home and not on live.
Could it be related to charsets of the database?
--~--~-~--~~~---~--~~
You received this message
Thanks for your reply. I have just tested that, it returns
an array
'username' => 'alphaNumeric',
'passwd' => 'alphaPass',
Does that mean cakephp treated the two as invalid fields?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
What do you mean by default settings?
John
On May 11, 11:26 am, Ernesto wrote:
> Hello.
>
> is there any way to change FormHelper and HtmlHelper default settings??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
What does $userModel->invalidFields(); return?
Enjoy,
John
On May 11, 10:56 am, FANFAN wrote:
> Hello,
>
> I have encountered a strange problem with validation where it works
> when I am testing on my localhost machine but does not work on my live
> server.
>
> The following is what I am tryi
Hello.
is there any way to change FormHelper and HtmlHelper default settings??
--~--~-~--~~~---~--~~
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 unsubs
Hello,
I have encountered a strange problem with validation where it works
when I am testing on my localhost machine but does not work on my live
server.
The following is what I am trying to do.
$params['User']['email'] = $email;
$params['User']['username'] = trim($username);
$params['User']['p
Hi,
just a misspelling, try 'dependent' instead of 'dependant' ;-)
Michael
Jason schrieb:
> I can't figure out what I'm doing wrong here. I'm fairly new to
> CakePHP and have been having a lot of success getting a new app set
> up, but I'm running up against a brick wall trying to get recursive
Aha, I see. And *should* I be able to add style tags to my page like
that (see my previous response to your penultimate message)?
Toby
On May 10, 9:29 pm, brian wrote:
> This is how the style (and script) tags are added to your layout. I
> think Ketan didn't realise that your problem is that y
I can't figure out what I'm doing wrong here. I'm fairly new to
CakePHP and have been having a lot of success getting a new app set
up, but I'm running up against a brick wall trying to get recursive
delete working.
Here is my Account model:
class Account extends AppModel {
var $hasMany
78 matches
Mail list logo