Viva,
eu imagino que mais alguém tenha problemas em usar as inflections
automáticas em conjunto com o scaffolding. Na verdade, o scaffolding
nem é muito importante para o que estou a fazer, e o $irregularPlural
serve para fazer as transformações de nome entre o modelo e o
controlador.
No
I think that
https://trac.cakephp.org/changeset/5248
could be answer for your question.
--~--~-~--~~~---~--~~
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
Hi!
I have a multiple select option where the use can select 1 or more
owners.
I need to query the database based on the owners selected.
There was an article i read
This might be of use - it shows how to create OR conditions
http://groups.google.com/group/cake-php/browse_thread/thread/4c05f96a111f7b33/bf00383ffee075f6?lnk=gstq=findall+%22or%22+%3D%3E+arrayrnum=1#bf00383ffee075f6
On Jun 6, 5:00 pm, hashkash [EMAIL PROTECTED] wrote:
Hi!
I have a
$owners = array('1','2','3')
$equipment = $this-Equipment-findAll( array('Equipment.owner_id'=
$owners) );
This will generate WHERE `Equipment`.`owner_id` IN ('1','2','3') which
sounds like what you want.
--~--~-~--~~~---~--~~
You received this message because
If on windows, right click on the manual, go to properties, find the
unblock button, click on it, say apply, then ok.
Now open the manual again :)
On Jun 6, 6:14 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
I have downloaded the .chm version of the latest documentation,
however it is got
Thanks alot for the help on the OR condtions,but my problem related to
the checking the owners is based on the number of owners the user
selects.I cant code it directly.Its based on user selection.
Any idea?
Thanks!
Kashyap
--~--~-~--~~~---~--~~
You received this
On Jun 6, 9:32 am, hashkash [EMAIL PROTECTED] wrote:
Thanks alot for the help on the OR condtions,but my problem related to
the checking the owners is based on the number of owners the user
selects.I cant code it directly.Its based on user selection.
Any idea?
don't use an OR and read what
$owners = array('1','2','3')
$equipment = $this-Equipment-findAll( array('Equipment.owner_id'=
$owners) );
Correct me if im wrong but from what grant Cox has written I construe
that there are only 3 owners.
In my case he no of owners keep growing as and when they register.
The owners are selected
here is a part of the controller code
http://bin.cakephp.org/view/486635630
--~--~-~--~~~---~--~~
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
Hello,
I have just encountered this problem.
I'm trying to post the form via ajax.
I just can't seem to get around the problem.
I used form-create together with ajax-submit or plain HTML form tag
with ajax-submit or ajax-form all of them fail in the security
component.
What combination should I
On Jun 6, 9:49 am, hashkash [EMAIL PROTECTED] wrote:
$owners = array('1','2','3')
$equipment = $this-Equipment-findAll( array('Equipment.owner_id'=
$owners) );
Correct me if im wrong but from what grant Cox has written I construe
that there are only 3 owners.
mmm k.
In my case he no of
On Jun 6, 6:31 am, Vishal [EMAIL PROTECTED] wrote:
Hi there,
I have been looking for a way to get a list of the available ACO's for
a given ARO/user.
There does not appear to be a simple method of any of the ACL objects
to get the list.
ACL (in general) is not designed for mass querying
Please disregard my previous post. For future reference, the fix is to
specify the foreign key in the model for the table that links to it,
like this:
class Timesheet extends AppModel {
var $belongsTo = array(
'Employee' = array ('className' = 'Employee',
'foreignKey' =
I made my own pages_controller and put it in app/controllers
I Added this to line 78
// DIFFERS from core ---
// hack for trail slash issue
// pr($path);
// exit();
if(count($path 1)) {
I found some tickets on cakephp.org/trac myself. Somebody already had
the same problems.
On 5 jun, 19:37, codingisfun [EMAIL PROTECTED] wrote:
Hi,
I tried to add an article to thebakeryabout Database-errors.
Somehow it went wrong. I am not able to edit my article again.
The id of the
Dear CakePHPers,
I run a badminton club and any badsession can have any user and any
user can take part in any badsession. Hence a HABTM relationship.
I have a HABTM as follows:
badsessions - badsessions_users - users
In the badsessions model I have:
var $hasAndBelongsToMany = array(
Hello all,
I'm just begin using the cakephp.
I'm trying to store 3 variable in session, but only the first one
that can be read.
This is my code:
function log_in()
{
$this-set('error',false);
if($this-data)
{
This is my code:
function log_in()
{
$this-set('error',false);
if($this-data)
{
$results=$this-Login-findByUsername($this-data['Login']
['username']);
if($results
Who still uses safe mode for PHP? In almost 10 years of using PHP
I've never used safe mode. I never saw the point. I'd love to hear a
scenario where safe mode is *required*
On 6/6/07, Romano [EMAIL PROTECTED] wrote:
To reply to my own message, the problem seems to be that the fifth
On 6/6/07, Chris Hartjes [EMAIL PROTECTED] wrote:
scenario where safe mode is *required*
It is used only by hosts who have brains between different anatomical
parts than the ears and unfortunately there are still some around
T
--
OK - just an update.
The problem is not with the form-create + ajax-submit but rather
with the form-XXX_Control.
When producing the security token at least form-textarea is not
hashed correctly.
To get around it I found I can produce a text area using:
echo $form-input('message',array('label' =
Hmm, my host is one of those, I'm afraid. And I've had encounters
with more than one recently. Fixed base_dir is a nice one too! Was
another host where running Cake was hell.
Anyway, never a dull moment ;-)
On 6 jun, 13:57, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
On 6/6/07, Chris Hartjes
Better do like this:
$this-Session-write('user',$this-data['Login']);
then you 'll have whole array in one session variable.
On 6 июн, 18:38, Lemune [EMAIL PROTECTED] wrote:
This is my code:
--~--~-~--~~~---~--~~
You received this message because you are
I was able to create JS only functions for coupling a before BlindUp
and an after BlindDown Effect, but I cannot repeat this process easily
using $ajax-link. The effect in the JS I wrote functions like this:
outEffect = 'BlindUp';
inEffect =
Hey folks,
Asking about it on IRC, and looking on the group I think I have half
got my code working for what I need to to. A bit of background first:
I have added a media player to my site, which is controlled from the
backend and outputs to XSPF for the player.
First off, I have my Track
This is IMHO a total mix up of terms. Yes, MVC preaches that view and
business logic shall be separated for all eternity. But what Craig was
saying is totally valid. You should be able to call methods on your
model. MVC says the business logic should be in the model. Exactly!
He only wants to
I forgot to mention, I have worked out how to access some of the data,
such as when I am adding a new playlist, how to access the tracks
there:
function admin_add() {
if(!empty($this-data)) {
$this-cleanUpFields();
On 6/6/07, unimatrixZxero [EMAIL PROTECTED] wrote:
He only wants to CALL the methods from the view, which is perfectly
fine. This does not contradict MVC in any way. In Ruby on Rails you
can do this. The reason this doesn't work in Cake PHP is simply one of
it's shortcomings. The
Hi all,
I'm experiencing the same problem, no errormessages get displayed,
though $this-User-invalidFields() does contain a few. validateErrors
appears not to work. Could this indeed be caused by PHP4 not passing
vars by reference in the case where my User model is passed to
validateErrors() ? I
I don't understand, which way?
On 4 jun, 18:26, Dan Bair [EMAIL PROTECTED] wrote:
I haven't done that before, but to me, that seems like a very logical
way to do it.
On Jun 4, 7:00 am, gerbenzomp [EMAIL PROTECTED] wrote:
I've started a new project, and in that site everything should
Hello
I have been searching on the cakephp group and on the internet but I
still haven't found a way to display a You have been logged out due
to X minutes due to inactivity message to the user. Please let me
know if anyone has done something similar in Cake. My Session security
is set to low
hi,
Last week was released a nice book covering some PHP Frameworks,
mainly CakePHP, Symphony and Zend and, in a lesser extent, CI and
Prado.
Well written, with good examples, it's intent doesn't seem to cover
all aspects of each framework, but only to show advantages and
problems with each
First try writing a small php script:
create temp.php in your 'DocumentRoot' Directory of your server (check
httpd.conf for this path).
Save following code to temp.php:
?php
if (isset($_SESSION['hello'])){
echo Session Variable Hello is .$_SESSION['hello'];
}
else{
$_SESSION['hello'] =
On Jun 5, 2007, at 10:31 PM, tmac22 wrote:
Where is the $form variable initialized that bake.php references in
add and edit?
It represents a FormHelper instance, which is always available in
views by default (along with the HtmlHelper, or $html).
You can remove or add it by specifying a
I'm also having a problem using 'both'. Text and html separately work
fine. But when I use both, the html part shows this before all other
text in the mail: http://www.w3.org/TR/html4/loose.dtd;.
Could this be related?
Any ideas what goes on?
This is the html test template:
HTML versie:
Hello,
Anybody has any insight into the different type of session storage
(cake vs. php vs. database) when it comes to performance?
I would assume database is slower, but is it significant?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you
On 6/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello,
Anybody has any insight into the different type of session storage
(cake vs. php vs. database) when it comes to performance?
I would assume database is slower, but is it significant?
Why are you worried about session performance?
Why I get SQL error for this code: COUNT(`Model`.`vendor_id`) AS
`Vendor`.`count`?
--~--~-~--~~~---~--~~
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
Ok, right now I'm leaning towards I've found a bug. But we'll see
how this pans out. Lets start here.. a simple quesiton... If this
gets anwered, maybe there are no problems.
What is the correct way to set the default pagination direction and
column using the pagination in Cake 1.2?
(FYI, a
What version of PHP you running this on? You might need to set the
name of your model manually if its PHP 4.
On Jun 6, 11:22 am, Alexey Kuimov [EMAIL PROTECTED] wrote:
Why I get SQL error for this code: COUNT(`Model`.`vendor_id`) AS
`Vendor`.`count`?
My PHP version 4.4. How to set model's name?
On Jun 7, 12:17 am, rtconner [EMAIL PROTECTED] wrote:
What version of PHP you running this on? You might need to set the
name of your model manually if its PHP 4.
On Jun 6, 11:22 am, Alexey Kuimov [EMAIL PROTECTED] wrote:
Why I get SQL error
On 6/6/07, Alexey Kuimov [EMAIL PROTECTED] wrote:
My PHP version 4.4. How to set model's name?
Have you gone through the manual? Information will be in there that
should help you.
--
Chris Hartjes
My motto for 2007: Just build it, damnit!
@TheBallpark -
hi there,
do you know if it is only 1.2 ?
tia
thomas
On Jun 6, 5:54 pm, Tane Piper [EMAIL PROTECTED]
wrote:
Thanks to Gwoo and PHPNut, eventually solved it!
It's the lovely 'with' key, which currently isn't in the manual. Here
is it working:
?php
class Track extends AppModel {
Yea, it is and unfortunatly it's not the end-all solutution to my
problem. I still can't work out how to save the position field from
my array. I'm going to work on it tonight and hopfully post a
solution.
On 6/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hi there,
do you know if it
Just set var $order in the appropriate model and that naturally will
be the default order and direction for pagination as well.
On Jun 6, 11:15 am, rtconner [EMAIL PROTECTED] wrote:
Ok, right now I'm leaning towards I've found a bug. But we'll see
how this pans out. Lets start here.. a simple
I have 2 tables, posts and categories, and 2 models, post and
category.
The posts table has a category_id field that links to the category
table. I've used $belongsTo to link them and it works fine on my
index view.
What I am trying to do is create a form select in my posts add view
that will
Well, we're half way there. It kind of worked, technically the select
worked and selected the data in the correct order.
But the problem is this: The $paginator helper does not recognize the
$order var. So when I call $paginator-sort(), it sorts by its own set
of default criteria. This criteria
On 6/6/07, rtconner [EMAIL PROTECTED] wrote:
Well, we're half way there. It kind of worked, technically the select
worked and selected the data in the correct order.
But the problem is this: The $paginator helper does not recognize the
$order var. So when I call $paginator-sort(), it sorts
AD7Six's Pagination helper for 1.1 looks great. But I'm trying to use
the paginatior which comes embedded in 1.2.
No articles in the bakery foir 1.2. Maybe I'll have to write an intro
to pagination for the bakery or something.
On Jun 6, 1:36 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
On 6/6/07,
To weigh in on this one, presumably this limitation will go away once
Cake starts returning objects instead of arrays, which (last I
checked) was still slated for 2.0? From my point of view it's not a
big deal, it's a nice-to-have rather than a must-have.
Chris is definitely correct - if you
There's no way to do that with the built-in Session component in Cake.
At least, not directly. You'll find that your solution will involve a
User model, and probably some work with the beforeFilter in
AppController. The concept would be to store some form of timestamp in
the session, if it's
I think that this is the downside to Open Source in general. There's
no one there to police any sort of deadline or release schedule.
For example, back in JANUARY I asked this question:
-
That's generally a point made against Open Source -- except that closed
source stuff gets pushed back all the time, and is released very buggy.
In my experience, when there's a bug in Open Source, we can either fix
it or get it fixed within 48 hours -- closed source, we're lucky if our
On 6/6/07, Hanzgroove [EMAIL PROTECTED] wrote:
Add on the lack of documentation, and it makes me wonder if my
donations to the Cake project
are just allowing these guys to procrastinate more. If you're willing
to accept my donations, you should
be equally as ready to accept my criticism.
Hi All,
Sorry to post again about this but a few days have gone by, only got one
reply which didn't quite get me the info I need to move on with a solution.
I'm desperate for some feedback so I'd really appreciate some!
Thanks for your time.
- Gonzalo
On 6/2/07, Gonzalo Servat [EMAIL
On Jun 6, 2007, at 2:03 PM, Hanzgroove wrote:
Sorry to sound like a jerk but I'm sure all the end users of the Cake
framework can relate to the same frustration.
Hey well, the best thing to do with that frustration is make vague
criticisms and baseless demands.
Hell, its obvious we don't
On 6/6/07, Gonzalo Servat [EMAIL PROTECTED] wrote:
Sorry to post again about this but a few days have gone by, only got one
reply which didn't quite get me the info I need to move on with a solution.
Death to post bumpers.
--
Chris Hartjes
My motto for 2007: Just build it, damnit!
On 6/6/07, Chris Hartjes [EMAIL PROTECTED] wrote:
On 6/6/07, Gonzalo Servat [EMAIL PROTECTED] wrote:
Sorry to post again about this but a few days have gone by, only got one
reply which didn't quite get me the info I need to move on with a solution.
Death to post bumpers.
Damn, that
Hi.
First, can anybody recommend a few Websites that explain CakePHP
associations and provide tutorials and examples? I have read the
manual and a couple other Websites, but I am still having problems
understanding the concepts.
Second, I need help with figuring out the association between two
On 6/6/07, peterhf [EMAIL PROTECTED] wrote:
I am developing a community site in which members can upload photos of
themselves for display on their page. My plan is to store the image
files in a database. When a photo is need for display, it is retrieved
from the database and stored in a
On 6/6/07, Wole [EMAIL PROTECTED] wrote:
Second, I need help with figuring out the association between two
models, Team and Game. They are part of a basketball league Website I
am building. I believe the appropriate association between the models
is hasAndBelongsToMany, but I could be
Definitely participate if you have issues with timelines. I just
started using cake like a week ago and have been helping develop some
of the different things within the project. I am by no means a cake
expert (more like a novice) but I think every little bit helps when
people are actually moving
I have been influenced by the argument given a sites such as
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/. There
is a logic to me, that having the image and the data surrounding the
image are in one place, not devided between two places which would
require attention to not
Hi
You can you check to see if the session is valid $this-session-
valid() (i think) if the session is has timed out, it will be
invalid.
Penfold
On 2 Jun, 06:55, uk_maul [EMAIL PROTECTED] wrote:
Hi
I see that my Cake session security default is set to MEDIUM - which
logs out a user after
On 6/6/07, Penfold [EMAIL PROTECTED] wrote:
Hi
You can you check to see if the session is valid $this-session-
valid() (i think) if the session is has timed out, it will be
invalid.
Hi,
I looked into this topic quite a bit as well, as I wanted to display a
similar message to the user. I
Chris,
Thanks for your response. Can you please explain a little more? My
games database has two columns, home and visitor, that specify
the names of the teams that played the game. To do a
Game belongsTo Team
association I need one foreignKey but in this case I have two possible
foreignKeys,
peterhf wrote:
I have been influenced by the argument given a sites such as
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/. There
is a logic to me, that having the image and the data surrounding the
image are in one place, not devided between two places which would
require
I've seen many people post the same concerns/frustrations that I have
in this group and they're always met with the same response:
Why don't you get involved?
How can you get involved if the documentation you're looking for to
learn the subtleties of the framework is non-existent? Do you
Thank you both for your insite and opinions. They are greatly
appreciated.
After struggling for a day with the image-in-the-database paradigm,
I'm going to try the image-in-the-directory paradigm!
Regards,
Peter -
On Jun 6, 2:38 pm, AD7six [EMAIL PROTECTED] wrote:
peterhf wrote:
I have
On Jun 6, 2007, at 3:42 PM, Hanzgroove wrote:
I've seen many people post the same concerns/frustrations that I have
in this group and they're always met with the same response:
Why don't you get involved?
How can you get involved if the documentation you're looking for to
learn the
As far as get involved
I've always gotten the feeling that if I modified the code to cake
that it would not get acepted. So I never bothered. I've seen some
people write wonderful patches and additions, only to see them get
rejected. Right now I've been doing a lot in pagination and there are
Wole,
Understanding the differences between the relation types can be a
little difficult at first. I still struggle with remembering, because
it can make sense semantically either way! :)
My rule of thumb is this:
- If a table record "has" another record, the foreign record points to
this
If you do the image in db first then you can do an easy optimization later
and look really brilliant because it serves them so much faster ;) On the
other hand it is easier to control access to images when they are not just
sitting where apache can toss them on any old image site it wants.
On
Chris I'll admit that the time lines ARE based on my own personal
needs. That was the point of my message. But I'm not alone. Add my
personal needs to the needs of thousands of other programmers who use
the framework professionally, and it becomes justified to at least ask
the question,
Um... accountability? Did you hire the Cake team? Are they responsible
to you in any way?
This is their project that they've chosen to share with people. The
CakePHP developers are not accountable to anybody but themselves.
If you've made decisions that have put you in a bad scenario because
Stop giving BS. Just because you say the thousand other developers doesn't
mean that there are.
Or I could just say You know, there are over 6.5 million developers who
think Hanzgroove is full of BS
See how easy it is to lie?
-MI
I've learned my lesson fellas:
if()
--~--~-~--~~~---~--~~
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
I was trying to do something similar in an application of mine. What
I ended up with came about somewhat accidentally.
A lot of actions in my application require checking different
attributes of the user, so I was grabbing the user by the username to
get the current user by a session variable,
I once wrote a non-cake application with a secure login. As soon as we
went live, the primary user complained that she was unexpectedly
logged out all the time blah, blah, blah. So I wrote a simple java
script timer that displayed a countdown to the next time-out. That way
the user could see
Just to push the other side of the argument a bit, there are some
benefits to the Cake approach that haven´t been mentioned...
Ideally a view should standalone completely, i.e is uncoupled form any
other part of the system, and have no dependencies: that makes it a
lot easier to reuse views in
You guys are absolutely right, they don't owe me or the community
anything. Its been fun trying to play devil's advocate though : )
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this
Would anyone have an example on how this would work with a custom
query? Like the one below maybe? I've been trying to hack around the
pagination to no avail.
$ret = $this-Result-query(SELECT
`res`.`id`,
`res`.`clan_id`,
`res`.`match_time`,
`res`.`deleted`,
`c`.`id`,
`c`.`tag`,
`c`.`name`,
Hello,
I just wanted to let the guys in charge know that the registration for
the bakery has been broken for at least 2 months. Every time I try to
register I get a blank page after I submit the form.
Thanks,
Sebastian
--~--~-~--~~~---~--~~
You received this
Is there a good example of how to upload an image to the server and
serve it up, etc?
thx in advance,
allen
On Jun 6, 2:38 pm, AD7six [EMAIL PROTECTED] wrote:
peterhf wrote:
I have been influenced by the argument given a sites such as
I can't make any articles either.
--~--~-~--~~~---~--~~
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
Hello again, and I'm sorry because i post 2 times with same problem.
for Sergei:
I have tried your suggestion, and this is my code:
$this-Session-write('user',$this-data['Login']);
$level=$this-Session-read('user.login_type_id');
if($level==1)
{
I'm using cakephp 1.1.
yesterday i implemented an ajax search form to cake. but as i type in
the search box, IE came out an error saying, Stack overflow at line:
0.
how can i debug?
the ajax search form: http://www.justkez.com/cakephp-livesearch/
Hello again.
I have tried your suggestion (Ketan Patel), and I don't see the
printout on 2nd visit.
Your suggestion is to fix it in php.ini.
I need help in this matters, because i don't know what is to be fix.
--~--~-~--~~~---~--~~
You received this message
I beleive this would be a javascript problem.
Does it happen in Firefox. If so use Firebug addon to debug it.
Not sure whats available for IE.
On Jun 7, 12:11 pm, jewei [EMAIL PROTECTED] wrote:
I'm using cakephp 1.1.
yesterday i implemented an ajax search form to cake. but as i type in
Dear group member
I am new in CakePHP. So i need a free Cake PHP
tutorial. Please give me any tutorial or link. Thanks for yours help.
Best regard,
Lifo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
91 matches
Mail list logo