On 16/dic/06, at 08:35, Mariano Iglesias wrote:
> http://bakery.cakephp.org/articles/view/185
btw bakery says invalid article..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this gr
On 16/dic/06, at 08:35, Mariano Iglesias wrote:
> [snip]
> Again, your old way of calling (through arrays) WILL STILL work.
>
> I've just made the change since I wanted to clean up my controller
> code even
> further. So those "two or three logical lines" can turn into "one"
> logical
> line
Thanks mate. I just improved the code even further. Updating your code with
the new version doesn't require you to do any modifications to your existing
expects() call, so it is upgrade safe. The article:
http://bakery.cakephp.org/articles/view/185
Contains the code update and explanation (look
the above explanation are enough I guess just a small adition. the
files in View folder can be shown directly, cake renders them. webroot
is the folder where actually the server lands in.
so basically if you put some file in webroot folder you should be able
to access it typing the url in browser
1. If you are not going to reuse the app or no one other than you is
going to modify the site settings like EMAIL, MAX_ITEMS etc its better
to have a seperate table in DB and MVC for that. And in the controllers
you are going to use those constants, fetch those data in the before
filter of the con
He Jeff,
I can point you in the right direction on a few of these.
Drop downs are generally created using helpers, specifically:
HtmlHelper::selectTag
with 2nd param being:
array $optionElements Array of the OPTION elements (as 'value'=>'Text'
pairs) to be used in the SELECT element
But of
1. app/config/core.php is a good place to define your constants
2. Use beforeScaffold to manipulate your data
3. see 2.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, sen
Sorry, I copied it from my .htaccess
in your case it should be
RewriteCond %{REQUEST_URI} !^/app/webroot/login
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, send email to
If you use the default cake directory structure, add
RewriteCond %{REQUEST_URI} !^/app/webroot/utils
to app/webroot/.htaccess
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this grou
Greetings ladies and gentlemen,
I am trying to put together my very first quasi-real cake app (in that
I'm just using it for the admin side of a site) and so far I've run
into a couple of things that I'd like to do that I can't figure out.
One, I'd like to be able to add new constants. Usually
Hi Chris,
To my knowledge, use of SQL min(members), or any other SQL aggregate
function, will only be stored in index [0] of the results array - I was
looking for something similar in a post named 'Output format of
findAll':
http://groups.google.com/group/cake-php/browse_thread/thread/aa19397789
Make sure you have enabled the rewrite module in your httpd.conf.
\xampp\apache\conf\httpd.conf ... around LINE 118 just delete the #
infront of the line.
That should do it.
- J
On Dec 15, 2:48 pm, "moonraker" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> i'm very interested in cakephp and tried
Okay, my fault, I gave you the wrong syntax. This:
should be:
I'm actually surprised that didn't give you a syntax error, now that I
think about it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" gr
The former group was dead and posts seemed not to find their ways so:
If you're a french speaker and think sometimes easing-up cakephp's group
by asking basic questions (like I might), or adressing cakephp's french
specific issues, in french is a good idea, cakephp-fr is a group for you!
[EMAIL P
Probably tell him: "whatever dude, go learn symfony" ;)
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
-Mensaje original---
I have been playing around a bit more with the mapping. Seems save
works just fine.
Check out http://bin.cakephp.org/saved/1237
This version, I added another property to AppModel to turn the objects
on and off. I notices a problem with generateList() and some other
model methods that expect arrays
On Dec 15, 2006, at 3:48 PM, moonraker wrote:
>
> Hi guys,
>
> i'm very interested in cakephp and tried to get it running on my local
> webserver (a xampp under winxp).
>
> I've putted the cake files under localhost/cake so that for example
> "app" is under localhost/cake/app.
>
>
> Afterwards i
Hi guys,
i'm very interested in cakephp and tried to get it running on my local
webserver (a xampp under winxp).
I've putted the cake files under localhost/cake so that for example
"app" is under localhost/cake/app.
Afterwards i tried to do the "Cake Blog Tutorial" and exactly followed
the tut
Okay maybe you can help me understand that then as well because I don't
think I am understanding that part right. Sorry :( I know you have
helped me out a lot and it doesn't go unappericated trust me I am
greatful for the help but I think this is the part that I been having a
majority of problems
Mariano Iglesias a écrit :
> What about I think Zinedine Zidane was right to head that Italian dude? ;)
Well, the dude said to his hears: "ya mother can't bake!" what would
have you done?! ;-)
BB
--~--~-~--~~~---~--~~
You received this message because you are su
Okay, both the result data and the queries being executed look correct
now. Going based off of that, you should have no trouble fixing the
array index issues in the view.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
fais como vocè quizer rapais!
Ismael S. Kafeltz a écrit :
> Já que tá todo mundo falando uma mistura de línguas, eu acho que vou
> começar a falar em português pra deixar a coisa mais engraçada, que
> tal?
>
>
> >
>
--~--~-~--~~~---~--~~
You received this me
http://api.cakephp.org/classController.html#43aea5e84ef8550cf3ae8a97ca18ec1e
On 12/15/06, Samuel DeVore <[EMAIL PROTECTED]> wrote:
> you know about this right
>
> $this->cleanUpFields();
>
> Sam D
>
> On 12/15/06, Rolo D. Monkey <[EMAIL PROTECTED]> wrote:
> >
> > I have this code in app/app_model
you know about this right
$this->cleanUpFields();
Sam D
On 12/15/06, Rolo D. Monkey <[EMAIL PROTECTED]> wrote:
>
> I have this code in app/app_model.php. It parses the separate date
> fields created by $html->yearOptionTag(), $html->monthOptionTag, etc.
> and formats them to be put in a DATETI
Okay I changed the way I associate the tables in the models. Changed it
to the way you mentioned and I agree simple is just easier ... isn't
that why we have CakePHP? :P
I am using the latest copy of CakePHP on the site.
By doing that right away I saw a change but yet I still get that index
erro
you do need javascript for that.
nothing native in HTML (like maxlength) for a textarea.
On 16/12/06, phpjoy <[EMAIL PROTECTED]> wrote:
>
> hey guys,
>
> how do you limit and check the textareas?
> do you make javascripts for that?
>
> kinda new to cakephp.
>
> yossi
>
>
> >
>
--~--~-~-
Also, here is a fun idea, which can be used for alll models if or
individual models depending on your preference.
http://bin.cakephp.org/saved/700
Remember, all we are really doing here is converting arrays to objects,
so you can access them more easily. The next step is to use these
converted obj
hey guys,
how do you limit and check the textareas?
do you make javascripts for that?
kinda new to cakephp.
yossi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, send ema
I'm having exactly the same problem -- I'm running 1.1.11.4064, and I
have the fixes in from trunk for acl.php and error.php to stop those
errors.
My installation is set up so that multiple apps share a single cake
folder, and I wonder if that's the problem. I'm wondering if acl.php
doesn't deal
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/set.php#L86
--~--~-~--~~~---~--~~
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 unsubscrib
Well, I tend to favor my way of doing it, since Cake will always fill
in the defaults. It's always better to keep things simple, especially
when adding complexity is redundant.
Also, I'm assuming your model file and class names are both singular?
--~--~-~--~~~---~--
I have this code in app/app_model.php. It parses the separate date
fields created by $html->yearOptionTag(), $html->monthOptionTag, etc.
and formats them to be put in a DATETIME column.
It is a problem that comes up often enough that I think it might be
useful to have this somewhere in the core.
hmm I think I have done that.
In my first post I posted this:
Notes Model:
--
var $name = 'Note';
var $belongsTo = array ('Category' => array(
'className' => 'Category',
'conditions' =>'',
'order' =>'',
'foreignKey' => 'category_id')
);
Categ
I don't know this for sure but it would be a place to start.
I would guess that the beforeDelete callback for your Photo Model will
be called even though the records are being deleted as dependent
associations of your Album. I would put your file delete method in
your beforeDelete callback of you
Is the map thing implemented anything like what I submitted befote? Just to
see if I was on the right track or something...
By the way, sounds pretty cool... So should us be expecting a lot of this
handy utilities like Set, Sanitize, etc. etc. etc. ? Sounds freaking
awesome.
-MI
---
What about I think Zinedine Zidane was right to head that Italian dude? ;)
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
-
Did you say something like:
"Now that everyone is speaking a mixture of languages, I will begin to speak
in Portuguese to leave the thing more *complex*, what's up?"
I never learned Portuguese or anything, but I speak Spanish and they say for
Spanish speakers it should be easy to understand, so
Yes, you're missing something fairly important: you didn't actually
associate your models with each other, so Cake has no idea that you
also want Notes when you ask for Categories. Your model classes should
look a little something like the following:
class Category extends AppModel {
var $na
Ok you have no cred! lol http://irc.cakephp.org/ is a web based
one. to play. you might go to the http://cakeforge.org/projects/rdos/
site and make a request to join.
Sam D
On 12/15/06, Rolo D. Monkey <[EMAIL PROTECTED]> wrote:
>
> I know this is going to ruin my geek cred, but despite the f
I know this is going to ruin my geek cred, but despite the fact that I
have been on the net since 1992, I never really used IRC.
Also, I do not have command line access to my server, and from what I
have seen this seems to be the preferred way to access the Bake class.
I am willing to help with
Alrighty, I set DEBUG to 2 and this is what I get
1 SELECT `Category`.`id`, `Category`.`title` FROM `categories` AS
`Category` WHERE (`Category`.`id` = 1) LIMIT 1
I am now getting that error again though @ localhost/categories/view/1:
Notice: Undefined index: title in ...
Notice: Undefined
Okay, since you added this:
This:
link($row['Note']['title'],
'/notes/view/'.$row['Note']['id']) ?>
becomes
link($row['title'], '/notes/view/'.$row['id']) ?>
Also, what version of Cake are you on? Even if if there are no Notes
results, there should still be an empty array nested under Category
There is documentation on the irc in the form of an auto-repsonding
bot named 'gwoo' if the bot is online just say 'gwoo: I have a
question about rdBaker' you have to use those exact words or it will
respond with some snarky sarcastic tones. Ignore the tones and launch
into your questions.
Act
In general CakePHP is a godsend, and I am planning on using it a lot,
but the documentation leaves something to be desired. Is there a way I
can help?
Is there any documentation for rdBaker? After some tweaking, I got it
to work, but the index.thtml is looking for a 'created' field in my
table.
Okay well I did that and it only displays the Category Names now. I did
a pr($data) and it came up with this:
--
Array
(
[Category] => Array
(
[id] => 1
[title] => Test Category
)
)
--
The View now looks like this:
--
I'm using latest cake build, php 4, and the rdSimpleAuth component to
protect different views based on simple groups. I have app installed
in a subdirectory of web site, such as /callcenter
Problem is, I want a valid user to be forwarded to the index view of
certain models, depending on group.
Já que tá todo mundo falando uma mistura de línguas, eu acho que vou
começar a falar em português pra deixar a coisa mais engraçada, que
tal?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To pos
ok je m'en occupe!
--~--~-~--~~~---~--~~
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]
Fo
Oui il est cassé, et il faudrait mieux en recreer un (Cakephp-fr par ex)
Je crois que les nouveaux membres doivent attendre la validation,
mais le fondateur du groupe a pas l'air d'etre là
olivvv
bruno wrote:
> Please do not bother reading if you do not speak frog.
>
> Bonjour,
> j'essaye d
nate a écrit :
> Vive la France!
Nate, actullaly that's all the french you need to be able to post into
the french group ;-)
> Let me be the first to say 'let them eat Cake!' ;-)
Yes! you know we like our food... :-D
--~--~-~--~~~---~--~~
You received this
Vive la France!
Bruno, I have no idea what you said, but the fact that there's a
CakePHP group for French users is freaking awesome.
Let me be the first to say 'let them eat Cake!' ;-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
As far as how the objects are mapped, no, you can't do that stuff quite
yet. (Well, techincally you could. Set::map takes a class name as an
optional second parameter, so you could write a custom model class that
adds the methods you wanted, and map the data to it.) But for right
now, it just m
should be
Then take the ['Note'] part out of the subsequent array references. A
helpful thing to do when coding your views is to put at the bottom of your view, so you can read the structure of the
array as you are designing.
--~--~-~--~~~---~--~~
You receiv
Please do not bother reading if you do not speak frog.
Bonjour,
j'essaye d'envoyer des questions sur Cakephp-fra mais elles ne sembles
pas arriver sur le groupe.
Comme l'activité du groupe semble faible est-il mis au placard?
faut-il en recreer un? est-ce moi qui ais mal configuré qqc?
Merci!
B
> Cake 1.2 has not been officially released yet, but it has a core class
> called Set, which allows you to map query results onto an object. The
> syntax for that is:
>
> $this->set('posts', Set::map($this->Post->findAll()));
This is interesting - does it mean we will be able to do things like
I've done that, this is my onchange code
onchange=\"new Ajax.Updater('rate_groups_div',
'rate_groups/getRateGroups/' + this.value, {evalScripts:true});\"
on top of the re-created element i set up this variables, which works
fine
encode($results);
?>
and the code that should be recreated is the f
Thanks for the reply nate!
hmm, I just tried those, changed it in BOTH controllers and it didn't
work. I get the same error. Do I have to change something in the View
when using that code?
- J
On Dec 14, 9:27 pm, "nate" <[EMAIL PROTECTED]> wrote:
> The problem is here:
>
> function view
On Dec 15, 2006, at 8:52 AM, luis_y27 wrote:
>
> This works perfectly thanks, however for some reason none of my code
> within javascript tags is render with this call. Is there a reason
> for
> that? Thanks in advance.
Make sure the evalScripts option is set to true for any of your calls.
This works perfectly thanks, however for some reason none of my code
within javascript tags is render with this call. Is there a reason for
that? Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
This is a known bug that has been fixed in the trunk.
Either get the cake build from the trunk or fix it manually:
in cake\scripts\acl.php line 93 change:
uses ('object', 'neat_array', 'session', 'security', 'inflector',
'model'.DS.'connection_manager',
to
uses ('object', 'configure', 'neat_arr
Go into app/config/core.php, and turn DEBUG up to 2, so you can see the
actual SQL that's being generated. The next thing after checking the
generated SQL, is to take it and run it inside an SQL client
application, like CocoaMySQL, and see if the results you get are the
same. If they are, then i
If you need an action to switch to rendering an element, just put
something like this in the method:
if ($this->RequestHandler->isAjax()) {
$this->render("../elements/");
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
Cake 1.2 has not been officially released yet, but it has a core class
called Set, which allows you to map query results onto an object. The
syntax for that is:
$this->set('posts', Set::map($this->Post->findAll()));
--~--~-~--~~~---~--~~
You received this messa
After handing out so much help (some good, some bad) I need some help
getting a query to work with the models.
Currently, I have the following two queries using the model:
$start_results = $this->Stat->findAll("Site.category = {$category} AND
Stat.s_date = '{$start_date}'");
$finish_results = $t
I have a similar dilemma. I want to refresh a div section without the
need for a separate view in every directory. There ought to be some way
to refresh the element itself.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Hello all,
It's my first post here. I've been googling for many hours today to
find any clues how to validate form with required selection/choosing
related items and finally written some code by myself.
I'm not really familiar with Cake yet and I don't know if I haven't
affected some of "general
Hi,
I have a model Photalbums and a model Photo's. Photo's have a entry in
the database, but also a imagefile on the filesystem. Photomodel has
his own method delete, which deletes the database entry
(parent::delete) as well as the imagefile.
In photoalbums, the relationship is set to dependent=
I may be out of line here, but why would you want this if Cake already lets
you access it via indexed arrays?
Anyway one thing I can think of is add the following method to your
AppController:
function toObject($array)
{
$result =& new stdClass;
foreach($array as $index => $valu
Hi,
I am a cakephp newbie.
The latest cakephp, windows xp,
When I run php acl.php initdb, the system response is:
Fatal error: Class 'Configure' not found in
C:\apache\Apache2\htdocs\cake\cake\libs\model\datasources\dbo_source.php
on line 84
Can you help me out?
--~--~-~--~~---
Hi All,
How to make findAll() return object?
I write this in my controller:
function listof() {
$this->set('posts', $this->Post->findAll());
}
then I want my "listof" view like this:
TitleBody
title ?>
body ?>
--
Regards,
Ananda Putra
--~--~-~--~~
The following code:
$listFriends = "3,7,146,18,14";
$this->User->findAll("User.active = 1 AND User.id IN ($listFriends)",
null, "lastlogin DESC",null,null,0);
... should return just 5 records from the Users table. However, i get 7
records and for some reason a triplicate of 146.
Can anyone she
71 matches
Mail list logo