I made a little test and I have put:
pr($this->uses);
exit();
in cake/libs/controller/controller.php __construct() function, before it
exiting.
What I discovered was that if you set $uses to null or an empty array() in
your controller
it overrides the declaration in app_controller, d
I am new to this group and would like to introduce myself. I am the
President of US AngelInvestors,an angel investor group in Silicon
Valley,and also founder of Bay Area Startup Network a networking group
in the Bay Area.
I invite you to join my network on LinkedIn, which I use much
principally.
Will that re-hash the MD5'ed password field when editing and then
saving again?
I do this at the moment:
In model:
function beforeSave() {
$password = isset($this->data['User']['password'])?$this->data['User']
['password']:"";
if (!preg_match(VALID_MD5,$password) {
$this->data['User']['pass
Having the same problem. Looked everything over don't know what the
problem could be.
- Jon
On Mar 15, 3:24 pm, "rtconner" <[EMAIL PROTECTED]> wrote:
> I cannot getacl.php to work in 1.2. I've tried the latest "stable"
> build and the latest nightly build. Both give me the same error
> -->ph
No need to jump up and down proclaiming the original message poster to
be incompetant while trumpeting CakePHP's virtues. Why don't you learn
from Mariano and provide a solution. You've done it in a few message
threads today, and it's not productive at all.
On Mar 19, 5:30 am, "Walker Hamilton" <
Hmmmokay, so the default pages controller does: var $uses = null;
Which makes me think that setting your demo app's controller to
$uses=null causes no models to load in, which then means that when it
tries to query the DB, it doesn't have any models instantiated that it
can use to do so.
So.
yes , i set it up already,
in controller i added this variable
$this->set('groupArray', $this->User->Group->generateList());
and the view
selectTag(
'User/group_id',
$groupArray,
null,
array(),
array(),
true
);
?>
now works fine.
one other qu
In your User Model you need to have
var $belongsTo = array ( 'Group' => array('className' => 'Group') );
Then in your View you could put
selectTag('User/group_id', $groups, $html-
>tagValue('User/group_id'), array(), array(), false);?>
--~--~-~--~~~---~--~~
You
Thank you Steven and Marco!
--~--~-~--~~~---~--~~
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 PROTE
I have 2 simple tables
Groups [id, name]
Users [id, name, group_id]
when admin create a new user , he has to fill in the group
I try to use selectTag() to build the Group drop down in User page,
but I have no idea how could cake do that for me ?
any snipper code / direction will help
Thanks
I succeeded connecting cakephp with adodb:
'adodb', //use "adodb"
'connect' =>
'odbc', //adodb support not only "odbc", but also
"mysql", "ldap", etc)
'host' =>
'mys
Okay! Now we're getting somewhere! What you want to do is always have
a model for your controllers. The trick is to not have a db table for
a model.
So, instead of cutting the DB->Model->Controller->View chain at
Controller, we're going to cut it at DB.
create your model, and then put this i
Hello, i'm trying to implement a login system using ajax, but i've
come across a problem.
I want to do it so that when a login is incorrect, then only a small
div below the form is shown with "invalid login" but when the login is
correct i want to update a different div with the user's account
opt
I'm really sorry that it seems I think CakePHP is wrong. I know that
it is probably my fault that I can't use it the right way. As I have
written in my first post - It's a great piece of SW.
Now I'm a bit closer to the problem. It seems that the error is
present only when I use controller without
You can simplify the test a lot, just put it like (see the use of
loadController() instead of all the junk I've just given you):
uses('controller' . DS . 'controller');
loadController('Users');
class UsersControllerTest extends UnitTestCase {
function testGetTitle() {
$c
sorry for this very newbie questions, but between bakery, here and
google, still I haven't got an answer.
let's take the blog tutorial in cakephp manual as example... when I
look at one of the post, how can I add a field for adding comments,
and how to display existing comments?
Any examples? Tu
1. Unzip simpletest at cake/vendors/simpletest (inside after installing you
should see simple test files like unit_tester.php)
2. Set up your tests on app/tests inside the appropriate directory. As a
guidance, you can set up your controller tests under
app/tests/cases/controllers/. For example, l
Sure, use the beforeSave and beforeFind on the model side.
class User extends AppModel {
// ...
function beforeSave() {
if (isset($this->data[$this->name]['password'])) {
$this->data[$this->name]['password'] =
md5($this->data[$this->name]['
There is a nice JQuery plugin that does this:
http://daemach.blogspot.com/2007/03/autosave-jquery-plugin.html
You can probably convert the code to prototype if that is your library
of choice.
HTH,
Ryan Rose
http://www.digiwize.com
On Mar 18, 3:11 pm, "Uncle Bill" <[EMAIL PROTECTED]> wrote:
> C
You should only run the first when the second will not do what you
want.
That said probably 90% of whatever you have to do should use the
second.
Sanitize is not needed as data and fields are escaped properly at the
dbo level.
--~--~-~--~~~---~--~~
You received th
Can anyone point me to some sample code that will use ajax to autosave
a form periodically? 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@go
yes! Thank you all CakePHP developers.
On Mar 18, 9:34 pm, "tracyfloyd" <[EMAIL PROTECTED]> wrote:
> Ditto.
> The Cake team is creating some amazing software here.
>
> On Mar 18, 9:49 am, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > There's so much love put into the development of Cake, that any
Maybe try DH's testing suite for Cake 1.2 ?
http://cakebaker.42dh.com/2006/12/18/testing-with-cakephp-12-a-preview/
he's got instructions.
On Mar 18, 12:58 pm, "Dat Chu" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> Does anyone know how to go about running a unit test case / suite in
> 1.2 . I
This is not a cakePHP problem so much as a programming issue. If you
learn how to hash md5's using php, you'll be able to do them in cake.
On Mar 18, 12:12 pm, "billybob" <[EMAIL PROTECTED]> wrote:
> Hi -
>
> I'm using cake's MVC approach which works really great. I like the
> ability to use the
On Mar 18, 12:59 pm, "LSL" <[EMAIL PROTECTED]> wrote:
> There is no solution? Please, CakePHP seems very cool but this is a
> problem...
>
There is a solution, but you are not providing enough information for
us to help you solve it.
Dijize was correct in his instructions provided to you, but so
There is no solution? Please, CakePHP seems very cool but this is a
problem...
L.
LSL wrote:
> Thanks, I have tried this but without success. The excerption from
> app_controller.php:
>
> var $uses=array('MenuCategory');
> function beforeFilter() {
> parent::beforeFilter();
> $th
Hi guys,
Does anyone know how to go about running a unit test case / suite in
1.2 . I can't seem to find the documentation anywhere about this.
I have version 1.2 of cake now and have put some test code under /app/
tests/cases/controllers/my_controller.test.php
How do I run it? Do I need to put
In a view file I have a 'select' dropdown.
Depending on the user selection, I want to display a different set of
additional fields ... without refreshing the page.
How is this done ? (being a js/Ajax newbie, I don't know where to
start) ? Not looking for a solution, just a quick pointer to get
g
Hi -
I'm using cake's MVC approach which works really great. I like the
ability to use the MVC and save from the controller; it makes things
nice and is very easy. I did run into a problem which I can't figure
out, however. Let's say I want to save sensitive information like a
password in the
Hello, everybody!
So I have what advantages of using of Model::query() + Sanitize::sql()
instead of using DboMysql API?
When I must use the first and when the second?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "
Yes you can
For belongsTo:
var $belongsTo = array(
'BelongClass' => array(
'classname' => 'BelongClass',
'foreignKey' => 'your_foreign_key_field_id'
)
);
var $hasMany = array(
'HasManyClass' => array(
'className' => 'HasMan
Hi Bakers,
i have a database table (table name: 'relations') which related to
other tables via a foreign key (field name: related_table_id). I want,
that whenever i fetch an entry from the table 'relation', the
associated table entry will be fetched as well (like the posts and
comments in the ma
ajusx->observeField might be what you want. I use this to load form
elements based on choices
On 3/18/07, keymaster <[EMAIL PROTECTED]> wrote:
>
> In a view file I have a 'select' dropdown.
>
> Depending on the user selection, I want to display a different set of
> additional fields ... without
you could have the after find create a format_id field on the fly and
then you would still have the id field for linking and other work.
Then you can use the format_id for display and the id for the 'work'
Sam D
On 3/18/07, Mike Digital Egg <[EMAIL PROTECTED]> wrote:
>
> Thanks for the tip, I ha
Walker's analysis makes sense. In economic terms: If by using a
framework you are able to produce the "same simple web app" in less
time, you may say that you have increased your productivity and as a
consequence you are able to reduce your costs and increase your
profit. It has nothing to do with
I don't thnk either of those support ajax editor at the time. You
might want to write a plugin for them.
However, TinyMCE is quite heavy since it does a lot of checking and
processing (its capabilities is really broad too). You might want to
go for a the lite version of TinyMCE and put it in your
I have always looked at it like this: You will pay more per hour for a
good programmer (no matter the tools they are using). You will end up
paying the same amount for a not-so-good programmer because they will
take much longer to produce the same thing that the expensive (and
hopefully, good) pro
Ditto.
The Cake team is creating some amazing software here.
On Mar 18, 9:49 am, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
> There's so much love put into the development of Cake, that anyone who
> uses it, cannot but love it! Thanks so much, Cake has been an eye-
> opener and is such a pleasure
Thanks for the tip, I have tried that and it worked. However I have
now run into a new problem which is that the code now breaks the
links.
For example:
The URL to edit a project is now: /projects/edit/FWL0001 which
doesn''t work.
I guess I need to reverse the transformation on any database que
might sounds like a stupid questions but...
if cakephp is a rapid development framework (and it looks like), does
it mean that developing a simple web app will cost less money?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
There's so much love put into the development of Cake, that anyone who
uses it, cannot but love it! Thanks so much, Cake has been an eye-
opener and is such a pleasure to work with!
Gerben.
On 18 mrt, 04:45, "phirschybar" <[EMAIL PROTECTED]> wrote:
> true that.
>
> On Mar 17, 2:38 pm, "yolabing
I seen loads of posts about the problems with IIS, but I didn't spot
anything that relates exactly to my problem (so maybe it's not a cake
problem - but IIS) - maybe there is an existing post - and I just
don't know what to search for! (in which case I do apologise in
advance)
Basically, I can't
Hey,
is it possible (with url-rewrite) to adress css-files outside the css-
folder in webroot? I want to use yui and save it in /vendors/yui. But
I cannot acces the css! I've tried it like this, but it didn't work :(
$this->controler->webroot.$this->yui_folder . DS . $file . DS .
$file . ".css";
C
Hi all,
I need some help and advice with implementing pagination in 1.2 .
I got the basic functionality working which means I have paginate()
return the correct count of items of the first page and if change the
URL to pass different page # and limit #, the page behaves as
expected.
What I am n
44 matches
Mail list logo