Hi All,
I've been following lately, and I must say I'm very pleased with the
framework. Currently, I'm having a different project where there
should be many to many relationships between 3 tables.
This particular situation is for user management purposes. The User
role /group will depend
Thanks for your replies guys.
I had managed to track down the guidelines at gnu.org but the other
ones were new to me.
/Martin
On Aug 15, 1:23 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > But how much real text should I put in each string? I could just as
> > easily translate:
> > "Y
Hello!
This is my first messa ge here.
Sorry my bad english, i'm from brazil
Scenario:
Category hasMany Products
Products belongsTo Category
category table:
`id` int(10) unsigned NOT NULL auto_increment,
`nome` varchar(255) collate utf8_unicode_ci default NULL,
`created` datetime default
Would it be possible for someone to post a short example? I've been
struggling with formatting a form layout all day.
thank you,
peterm
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to th
Sorry, ignore me. I hadn't used $this->User->read() before trying to
save and this was causing the problem.
On Aug 19, 12:47 am, martinp <[EMAIL PROTECTED]> wrote:
> Hi - Been staring at this for a few hours now and can't see what the
> problem is.. maybe someone can help?
>
> Somehow my validati
That worked perfectly... that's it- Cake makes this stuff way too
easy :)
Thanks,
Zoltan
On Aug 18, 6:50 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Aug 19, 12:31 am, Zoltan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi
>
> > I'm trying to figure out the syntax for creating an array in the
> > proper f
Marcus J. Ertl schrieb:
Hi again!
> I'm afraid, this is poor application design on my side too. :-(
>
OK, I took a look into this! It was bad design on my side! :-(
I've startet with more then 60 queries, taking about 30 seconds! :-(
After taking the check outside the loop, I'm down to 24
Hi all cake bakers,
I'm using the 1.2RC and I followed the field naming convention here to
get array of data for a field name:
http://book.cakephp.org/view/547/field-naming-convention
Here is my code to create input fields:
input('MyModel.myField.1');?>
input('MyModel.myField.2');?>
But when it
On Aug 19, 12:31 am, Zoltan <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm trying to figure out the syntax for creating an array in the
> proper format for grouping by as the old generateList method did (but
> using 1.2's find() instead)
>
> This is the array I have:
> Array
> (
> [0] => Array
>
@Mark,
Kalt suggestion is goof for an element. You could also user an helper
and caching. The helper would check the cached file, if not there or
expired your helper can do a requestAction and cache the results for
future calls.
I use this quite a lot for fetching data for select for example (lik
Hi - Been staring at this for a few hours now and can't see what the
problem is.. maybe someone can help?
Somehow my validationErrors are getting lost on their way from the
controller to the view.
I have a simple form:
echo $form->create('Users.User', array('url' =>
$thi
Take a look at the "requestAction" method.
And instead of a helper, I think you'd better use an element.
On 19 août, 00:06, "Mark (Germany)" <[EMAIL PROTECTED]>
wrote:
> I have a helper which needs the "codecats" table data (20-40 rows)
> everywhere where it is used.
> i sure could ask for it in
mark_story schrieb:
Hi Mark!
> Tiggr: How many queries is ACL component doing. Normally for a single
> check it is ~6 db calls. If you are doing more than one acl check per-
> page you should be caching the results, so you can use them over
> again. But caching is not part of the core ACL compo
php -m gives me the following :
[PHP Modules]
ctype
curl
date
dom
exif
filter
ftp
hash
iconv
json
ldap
libxml
mbstring
mysql
mysqli
odbc
openssl
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zlib
[Zend Modules]
an
Hi
I'm trying to figure out the syntax for creating an array in the
proper format for grouping by as the old generateList method did (but
using 1.2's find() instead)
This is the array I have:
Array
(
[0] => Array
(
[ReviewTopic] => Array
(
I would take a look at using an rtf library. This will give you the
control you need over your layout and allow you to specify fonts.
You'll also need a Code 3 of 9 font.
Then you can specify your text and build all the barcodes in the
format of *12348* etc.
rtf class: http://www.phpclasses.org/b
I have a helper which needs the "codecats" table data (20-40 rows)
everywhere where it is used.
i sure could ask for it in the controller:
->list('all')..
and pass it the view
there i can again pass it to the helper
but is there
a) a way to automatically pass it from the controller to the helper
Hmmm, well, that definitely solved the problem much easier. Never
though of that. Thank you very much for your help.
On Aug 18, 3:23 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote:
> 1.in production you document root should point to app/webroot.
> 2. if you have a directory in app/webroot cake w
Check carefully the meaning of "required" versus "notEmpty" (or '/\S
+/') in validation ("required" makes the field mandatory -- but can
be empty -- every time single time you call validation, whether the
field is in a form or not).
Some usage of "on" => "create" might also help.
hth
On Aug 18,
Or do this in CLI:
"php -m" to get a list of loaded modules
and
"php --ini" to get a list of ini files loaded by CLI
Those two should point you in the right direction
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Marcin
Domanski
Sent: 18.
1.in production you document root should point to app/webroot.
2. if you have a directory in app/webroot cake wil show that directory
first insted of trying to find a controller for it
HTH,
--
Marcin Domanski
http://kabturek.info
On Mon, Aug 18, 2008 at 9:49 PM, Arak Tai'Roth <[EMAIL PROTECTED]>
You might also index your aros/acos tables, according to the mode used
in Auth ...
On Aug 18, 10:51 pm, mark_story <[EMAIL PROTECTED]> wrote:
> Tiggr: How many queries is ACL component doing. Normally for a single
> check it is ~6 db calls. If you are doing more than one acl check per-
> page y
Hey,
probably (99%) you PHP CLI doesnt have mysql extension loaded . find
the php.ini responisble for cli and uncomment the mysql extension
lines.
--
Marcin Domanski
http://kabturek.info
On Mon, Aug 18, 2008 at 3:51 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I am goi
Tiggr: How many queries is ACL component doing. Normally for a single
check it is ~6 db calls. If you are doing more than one acl check per-
page you should be caching the results, so you can use them over
again. But caching is not part of the core ACL component.
-Mark
On Aug 18, 3:12 am, Tig
Problem turned out to be I had taken the 'id' field out of the
edit.ctp file. Put it back in, and everything worked fine.
Zoltan
On Aug 18, 1:38 pm, haj <[EMAIL PROTECTED]> wrote:
> I know I'm not answering to the question but a field that needs to be
> unique generally hold the same requiremen
On Aug 18, 9:47 pm, David Yell <[EMAIL PROTECTED]> wrote:
> This was solved in #cakephp
> By using $this->Model->validates($this->data['Model']['field']
>
> So big thanks to penfold_99 for sorting this for me, thanks!
That reminds me of the time someone "optimized" my code by commenting
out all
I thought that might be the solution. I was looking around at how to
write RewriteRules in .htaccess, everything I can find seems to be a
more complicated problem then what mine is, and thus a more
complicated solution. Do you have any example code or somewhere I can
see example code in regards to
This was solved in #cakephp
By using $this->Model->validates($this->data['Model']['field']
So big thanks to penfold_99 for sorting this for me, thanks!
On Aug 18, 3:26 pm, David Yell <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've been doing some work with my users model and I got to a stage
> where I
Ohh thanks for the tips!
I will test them tomorrow. The way of fetching variables through the
tag looks nice!
Thanks! I reply if i get into trouble :).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" grou
@stefanski
You did not define all the required settings so the config was not
created. Specifically, you must specify an "engine"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group,
You're right, that was clearly the way I should have handle that.
Works like a charm.
Thanks a lot
On 18 août, 15:53, Kalt <[EMAIL PROTECTED]> wrote:
> I think you are doing it the wrong way : you don't want to order your
> buildings by flat price, you want to order them by the minimum flat
> pr
Simply add a rule to your www/.htaccess, so everything starting with
portfolio/ is NOT redirected to index.php
On 18 août, 19:44, "Arak Tai'Roth" <[EMAIL PROTECTED]> wrote:
> So, I have this problem and wasn't even sure what to search for to
> find a solution, so I thought I would ask here.
>
> I
Hey,
http://www.opensource.org/licenses/mit-license.php
...
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to u
So, I have this problem and wasn't even sure what to search for to
find a solution, so I thought I would ask here.
In my main directory, I have the normal cake folders app, cake, docs,
and vendors.
However, I also have a directory called portfolio. What I want is when
a user types in http://www.
On Mon, Aug 18, 2008 at 1:30 PM, bigboss0101 <[EMAIL PROTECTED]> wrote:
>
> Hi friends,
> Cakephp is released under MIT lincense. Can we use cakephp to develop
> commercial applications or only those applications that should be
> released under an MIT license or an opensource?
> Thanks a lot for u
Hi friends,
Cakephp is released under MIT lincense. Can we use cakephp to develop
commercial applications or only those applications that should be
released under an MIT license or an opensource?
Thanks a lot for ur guidance.
--~--~-~--~~~---~--~~
You received this
I know I'm not answering to the question but a field that needs to be
unique generally hold the same requirement on an edit?
For the real answer, it's working here. Sorry for not helping..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I would suggest to carefully read the manual, where it talks about
data validation ;)
On Aug 18, 10:26 am, David Yell <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've been doing some work with my users model and I got to a stage
> where I was creating a method to change a users password to avoid the
> d
In my model I'm doing something like:
var $validate = array(
'slug' => array('rule' => 'isUnique', 'on' => 'create',
'message' =>
'This title slug has already been taken.'),
'venue_type_id' => array('numeric'),...
Creating a new record works fine.
Now the
using $html->url() for images/js/css will give you the wrong path if
you are not using mod_rewrite. For anything in the webroot, you should
use $html->webroot();
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePH
1. Use cakephp to do this dirty work!
2. Use $html->url() to create your urls... it will create true
absolute urls, even if your cake app is a few levels deep.
eg.
use this as your controller/action path to send to flash
echo $html->url('/images/getImagesForFlash/');
and then in your getImages
Hi,
I've been doing some work with my users model and I got to a stage
where I was creating a method to change a users password to avoid the
default edit screen from having a populated password and such. Either
way I ended up with a change_password method and view, this works
great.
On this page
Hi everyone,
I am going through David Golding's new book "Beginning CakePHP" and
have found it extremely helpful up until the Bake section.
I have built a scaffolded blog, so I know that my DB connections are
correct. And the paths to my app are correct in Terminal. However,
when I go to bake
I think you are doing it the wrong way : you don't want to order your
buildings by flat price, you want to order them by the minimum flat
price. Here is my solution :
// controllers/buildings_controller.php
function index() {
// Trick to have LEFT JOIN in the query
$this->Building->unbindMode
Jeremy,
You shouldn't wrap entire form->input() calls in __() as you will have
to translate all the HTML as well, which can lead to nightmare town
quickly. Better would be to just wrap the label field in __() so you
only need to translate the label string.
$form->input('User.password', array('s
I've been digging into caching issues lately as I've seen a terrible
slow down recently. My problem was that I broke the file & dir caching
on my Windows machine by incorrectly loading a vendor file from
bootstrap.php. So even when debug = 0, it was still rebuilding the
cake_core_dir_map & cake_co
OK, I have tried things out on a very simple app, and have the
database switching working from a constructor in app_model. But I am
back to my initial problem of needing a way to direct the logic from
the controller somehow.
What I am intending to do is to access a family of controllers through
a
Hello,
I'm trying to use on a find query the 'group' and 'order' parameters,
but the two seems not to work well together (or at least not the way I
would).
I have a simple structure like this :
Model 'Building' (id, name)
Model 'Flat' (id, building_id, price)
(and Flat belongsTo Building, obviou
Options.
1. Each input is invariably encased in a DIV. Set a width to half that
of the container, and then float:left.
2. Put half the inputs in one DIV and the other half in another DIV.
Float the DIVs.
3. Create a table with two columns, put half the inputs in one cell
and half the inputs in ano
Hi Pettor
It won't actually solve your particular problem (probably due to
security issues in Flash ?), but...
You should definitely pass the cake path variables to Flash through
HTML/Javascript. For example (in your tag):
(it may depend on the way you embed your Flash app, ie swfobject has a
m
Of course your solution is better and this is what I do too. I just
wanted to show Lauren how to do with her own setup.
On 18 août, 14:43, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> Hi Kalt,
>
> > @jon : the "unpaid" status should not be in the Payments but in the
> > Purchases
>
> ahh, yes - she
Hi
Just look at the source :
http://api.cakephp.org/libs_2model_2model_8php-source.html#l00949
Model::read is only a wrapper for Model::find, which, as Dardo said,
and as mentionned in the API
(http://api.cakephp.org/class_model.html), populates Model::$data...
("find" doesn't do that)
It's just
Hi Kalt,
> @jon : the "unpaid" status should not be in the Payments but in the
> Purchases
ahh, yes - she wants all Purchases that have no payments made - I was
really just trying to illustrate how containable can be used instead
of the old hasOne/belongsTo hack.
a far easier solution to the pr
Hi,
i use the requestAction funktion with a parameter. The value of the
parameter is 0.
My cake version is 1.2.0.7296 RC2.
Controller:
$action='/repairs/getData/0';
$this->set('repairs', $this->requestAction($action));
I get this error:
Warning (2): Missing argument 1 fo
Hi, i have a strange problem with a Flash script and CakePHP.
The Flash load images from paths that the database keeps. Because i
have no clue how to make Flash work togheter with the CakePHP
framework i wrote a simple read.php file that just connects to the
database, grabs the paths and prints t
Hi
On Mon, Aug 18, 2008 at 3:51 AM, skilled_dreamer <[EMAIL PROTECTED]> wrote:
>'rule'=> array('minLenght', 3),
I guess it should be minLength...
+
Clément
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
@jon : the "unpaid" status should not be in the Payments but in the
Purchases
On 18 août, 14:03, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> Hi Lauren,
>
> providing you're using 1.2, a less hacky way would be to use the
> Containable behaviour.
>
> $this->Purchase->Behaviors->attach('Containable'
Whenever I user $form->input in templates invariably it outputs one
below the other
How do I make a 2 column form using $form->input tags ?
Malcolm
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To
Hi Lauren,
providing you're using 1.2, a less hacky way would be to use the
Containable behaviour.
$this->Purchase->Behaviors->attach('Containable');
$results = $this->Purchase->find('all', array(
'conditions'=>array('Purchase.account_id' => $account_id,
'Payment.id' => null),
'
Can't get IBM tut#2 to restrict product addition to logged-in users.
This is the products_controller:
function add() {if (!empty($this->data)) {
$this->Product->create();
if ($this->Product->save($this->data)) {
$dealer = $this->Product->Dealer->read(null,
Hi all,
I upgrade to the latest release candidate but that didn't fix it so I
decided to trace the code for requestAction(). Anway, that led me to
View::_render() and what I did to correct my problem was to put
header('Content-Type: text/html;
charset='.Configure::read('App.encoding'));
after th
For now, you defined the following relations :
- Account hasMany Purchase, Payment
- Purchase hasMany Payment
Right ? Now, try this :
// controllers/purchases_controller.php
function purchases_not_paid($account_id = null)
{
// We trick the bindings
$this->Purchase->unbindModel(array('hasMan
Thanks for your answers. I played around with the duration option -
Cache::config('_cake_core_', array('duration' => 1000) and
Cache::config('_cake_model_', array('duration' => 1000) but it had no
effect, the model cache seems to be rebuild every 10 seconds, which I
found out in cake/libs/model/da
Can't get the IBM tut #2 to restrict product addition to a logged-in
dealer.
Add function is below.
function add() {if (!empty($this->data)) {
// $this->deconstruct();
$this->Product->create();
if ($this->Product->save($this->data)) {
$dealer = $this->Product->Dealer->read(null,
Hi!
> var $components = array('Acl', 'Auth', 'Email');
>
> The page load goes through the roof.
Just the same for me, but only with Acl! And it isn't slow all the
time, pages load fast when user isn't logged in, but after logging in,
all is getting worse! Loadtime goes up through the roof becaus
Hi all,
Iam a very new beginner to cakephp. Iam struggling with
multiple submit button in one form(via POST). This is my issue:
I have .ctp page with two submit button like this,
create('Task', array('action' => 'home','type' =>
'post')); ?>
submit('tasks.gif',array('name'=>'Task'));
He Brendon,
I always forget that 'on' thing ;) I tried:
'Duplicate' => array(
'rule' => array('isUnique'),
'on'=> 'create',
'message' => 'This nick is already taken. Choose
another or sign in'
)
But still is given me this
67 matches
Mail list logo