Re: Comment Controller

2007-10-24 Thread francky06l

You can do it in 2 ways :

- render the same view, meaning you have to collect data again and
keep $this->data
- submit via ajax, as cakeFreak mentioned, and handle error display or
redirect in an updated div (using javascript mainly, to insert a div-
error or a new window.location for redirect). I have done this many
times without problem.

On Oct 25, 1:34 am, LW <[EMAIL PROTECTED]> wrote:
> Dixon,
> did you find a solution to this problem?
> I've been struggling with a similar situation and haven't found a way
> through it yet.
>
> Lutz
>
> On 6 Okt., 13:47, cakeFreak <[EMAIL PROTECTED]> wrote:
>
> > Did you try to load the comments form via Ajax?
>
> > Dan
>
> > On 5 Ott, 02:19, dixon_ <[EMAIL PROTECTED]> wrote:
>
> > > Hi all bakers!
>
> > > I'm developing just another CMS application to learn the Cake
> > > framework. Really impressed so far!
>
> > > I'm implementing a commenting system to my posts on the blog. I've
> > > associated Comment and Post models correctly and placed the submission
> > > form in an element that is rendered from the post view, as it should
> > > (any other suggestions?). Then I've set the form URL action to "/
> > > comment/add" where I add data to the Comment model and then
> > > redirecting the user back to the post view. Everything works so long,
> > > records are showing up and associations are being made etc...
>
> > > The problem is when a field is invalid while trying to save data in
> > > the CommentsController. How should I handle this? I cannotredirect
> > > the user back to the post view to show errors, as we are loosing all
> > > data in the redirection. I could let it auto render the default view
> > > for the "/comment/add" action (which just would be a submission form)
> > > without any Post data, but that just doesn't make sense.
>
> > > To make my problem short: Can anyone show me examples on how to add a
> > > comment from a post view, and still be able to showvalidationerror
> > > messages etc (as in normal cases)?
>
> > > Cheers from Sweden.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Tree Behavior Table Structure

2007-10-24 Thread AD7six



On Oct 25, 2:53 am, DanielMedia <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I was reading in the temp manual about the tree behavior in 1.2
> (http://tempdocs.cakephp.org/#TOC95584)
>
> Looks pretty cool. I want to start testing it out but it has no
> mention of what the database table should look like. For example a
> categories table. What fields does it expect to see?

Hi. The standard fields for MPTT logic plus the parent_id:
parent_id
lft
rght

Would love to see
> someone post an article in the bakery about the tree behavior if
> you've had some experience with it. Thanks...

Have a look at the test case in the mean time, full of examples.

hth,

AD


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread Thiago Paes
In my applications, that i have using sqlite 2, add this solution:
app_model:
function getNextId()
{
$_max = $this->query("SELECT (MAX(id) + 1) AS id FROM
{$this->table}");
$max  = $_max[0][0]['id'];

return ceil($max);
}

and, in for example, photos_controller.php:

function add() {
if ($this->data) {
...
$this->data['Photo']['id'] = $this->Photo->getNextId();
...
}
}


Sorry for my bad english to explain the idea..

Thiago Paes

---

On 10/25/07, Grant Cox <[EMAIL PROTECTED]> wrote:
>
>
> That's "easy"?  Sounds like a ridiculously over-complex idea to me...
>
>
> On Oct 25, 2:01 pm, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> > The easiest one :)
> >
> > create a table called counter with 2 field (or one,. deppend on you)
> > create table tcounter
> > :ctrtype "nameoftable"
> > :ctrvalue 0
> >
> > when you want to save (inserting) ... get the ctrvalue from the
> > tcounter first, and then insert the ctrvalue into your table :id
> > (primary key). dont forget to update the tcountr after you
> > successfully inserting (update tcountr set ctrvalue = ctrvalue + 1 )
> >
> > done :)
> >
>


-- 

Thiago Paes - WebDeveloper - Linux user: #224062
site: http://www.thiagopaes.com.br

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread Grant Cox

That's "easy"?  Sounds like a ridiculously over-complex idea to me...


On Oct 25, 2:01 pm, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> The easiest one :)
>
> create a table called counter with 2 field (or one,. deppend on you)
> create table tcounter
> :ctrtype "nameoftable"
> :ctrvalue 0
>
> when you want to save (inserting) ... get the ctrvalue from the
> tcounter first, and then insert the ctrvalue into your table :id
> (primary key). dont forget to update the tcountr after you
> successfully inserting (update tcountr set ctrvalue = ctrvalue + 1 )
>
> done :)
>


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session ID keeps regenerating in Cake-1.2.0.5875 pre-beta

2007-10-24 Thread auyongtc

Just saw that it was reported by stej in the trac ticket #3463
(https://trac.cakephp.org/ticket/3463)


On Oct 25, 11:45 am, auyongtc <[EMAIL PROTECTED]> wrote:
> Was just trying out the new Cake 1.2.0.5875 pre-beta, but I noticed
> that the session ID keeps regenerating between page requests and it
> does not retain the existing session key data.
>
> I've tested this with both 'database' and 'cake' Session.save options,
> with using all 3 (low, medium, high) Security.level options.
>
> Anyone faces the same problem? In the meantime, I shall dig in further
> for more details.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread Adwin Wijaya

The easiest one :)

create a table called counter with 2 field (or one,. deppend on you)
create table tcounter
:ctrtype "nameoftable"
:ctrvalue 0

when you want to save (inserting) ... get the ctrvalue from the
tcounter first, and then insert the ctrvalue into your table :id
(primary key). dont forget to update the tcountr after you
successfully inserting (update tcountr set ctrvalue = ctrvalue + 1 )

done :)





On Oct 25, 4:47 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello all!
>
> I'm a re-newly cake user and I'm currently trying to make my cake
> using a SQLite database.
> I'll the 15minute blog tutorial as a reference.
> Now, once I get the database connected correctly (verified and working
> with bake script), I do a simple table :
>
> CREATE TABLE posts (
> id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
> title VARCHAR(50),
> body TEXT,
> created DATETIME DEFAULT NULL,
> modified DATETIME DEFAULT NULL
> );
>
> ok, now that is a standard mysql query and it is recognised, however,
> the AUTO_INCREMENT is not a definition in sqlite. Thus when inserting
> a row using the standard posts/add , the id stays empty. Then it is
> impossible to do editing/deleting because there is no id.
>
> After reading this page :http://www.sqlite.org/autoinc.htmlthat is
> explaining the way to use the only auto-incremental feature of this
> kind of database :
> replacing "id" by the auto-generated "rowid" (and not visible throught
> SQLiteManager)
>
> I wonder if I should put a ticket about that ? So the dbo_sqlite.php
> script be updated to automatically use "rowid" insteand of "id" into
> querys.
> What is your thought about that ?
> Do I make myself clear anoff ?
> Is there someone reading this using a sqlite database ?
>
> Thanks
> David


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Handling image uploads

2007-10-24 Thread Rajesh

Hello,

I am new to cake PHP and i am using version 1.1.17. I am little
confused as to how to handle image uploads within a single form that
has other fields to capture additional information, for example
contact info and i have 2 seperate models (contact and image).

Could someone please let me know how do i implement this
functionality.

Thanks
Rajesh


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Session ID keeps regenerating in Cake-1.2.0.5875 pre-beta

2007-10-24 Thread auyongtc

Was just trying out the new Cake 1.2.0.5875 pre-beta, but I noticed
that the session ID keeps regenerating between page requests and it
does not retain the existing session key data.

I've tested this with both 'database' and 'cake' Session.save options,
with using all 3 (low, medium, high) Security.level options.

Anyone faces the same problem? In the meantime, I shall dig in further
for more details.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread Wayne Fay

David... read the URL you sent again, specifically:

If a table contains a column of type INTEGER PRIMARY KEY, then that
column becomes an alias for the ROWID. You can then access the ROWID
using any of four different names, the original three names described
above or the name given to the INTEGER PRIMARY KEY column. All these
names are aliases for one another and work equally well in any
context.

Wayne

On 10/24/07, Olexandr Melnyk <[EMAIL PROTECTED]> wrote:
> You can have auto-incremented columns with SQLite.
>
> Define a single integer column as primary key and that should do the job.
>
>
> On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hello all!
> >
> > I'm a re-newly cake user and I'm currently trying to make my cake
> > using a SQLite database.
> > I'll the 15minute blog tutorial as a reference.
> > Now, once I get the database connected correctly (verified and working
> > with bake script), I do a simple table :
> >
> > CREATE TABLE posts (
> > id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
> > title VARCHAR(50),
> > body TEXT,
> > created DATETIME DEFAULT NULL,
> > modified DATETIME DEFAULT NULL
> > );
> >
> > ok, now that is a standard mysql query and it is recognised, however,
> > the AUTO_INCREMENT is not a definition in sqlite. Thus when inserting
> > a row using the standard posts/add , the id stays empty. Then it is
> > impossible to do editing/deleting because there is no id.
> >
> > After reading this page :
> http://www.sqlite.org/autoinc.html that is
> > explaining the way to use the only auto-incremental feature of this
> > kind of database :
> > replacing "id" by the auto-generated "rowid" (and not visible throught
> > SQLiteManager)
> >
> > I wonder if I should put a ticket about that ? So the dbo_sqlite.php
> > script be updated to automatically use "rowid" insteand of "id" into
> > querys.
> > What is your thought about that ?
> > Do I make myself clear anoff ?
> > Is there someone reading this using a sqlite database ?
> >
> > Thanks
> > David
> >
> >
> > http://omelnyk.net/
> > > >
> >
>

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread Grant Cox

This is because beforeFilter runs on all requests, including on /users/
login .  So if you don't explicitly check for this (and any other
pages where you don't need to be logged in to access), then it will
see you are not logged in, and redirect you to /users/login.  This is
causing an infinite redirect loop.

So make sure you check what the current controller and action are, and
only redirect if it's somewhere the user must be logged in to access.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to render a view into a layout

2007-10-24 Thread Grant Cox

Technically, you can even call the requestAction from the view itself.

However, if possible you should avoid requestActions, as they are
slow.  And for something in your layout (ie appearing on every page),
a better solution would be to have a function in your model to load
the appropriate data (which is called by every appropriate controller
action, perhaps in the app_controller beforeFilter), and an element
being rendered in your layout to display this data.  If this is very
similar to a standalone view - there is nothing stopping you from
having that view just render the same element (so no duplication, as
there is nothing in the view).


On Oct 25, 9:31 am, pizzro <[EMAIL PROTECTED]> wrote:
> maybe you need set a $var in layout file, then call $this->set("var",
> $this->requestAction(url,array("return"))),


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how can I insert some records at a time in a model? need I call save() many times ?

2007-10-24 Thread Grant Cox

Yes, call

$this->create();
$this->save( $whatever_data );

for each one.  If you don't call create(), then the following saves
will update the first row.



On Oct 25, 9:36 am, pizzro <[EMAIL PROTECTED]> wrote:
> How can I insert some records at one time in a model? Need I call
> save() many times ?
> these data are similar.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: More HABTM : Adding another model to the filtered findAll()

2007-10-24 Thread Bob Mattax

If I just make the query, will I still have the same abilities for
pagination?  I thought I remembered reading that I wouldn't.

On Oct 24, 5:36 am, dardosordi <[EMAIL PROTECTED]> wrote:
> Maybe it's just easier to make your query.
>
> On Oct 23, 12:20 pm, Bob Mattax <[EMAIL PROTECTED]> wrote:
>
> > So, I've continued reading, and to say that I've read "all" the
> > threads on this topic would be a lie, but I'm trying.  Any help would
> > still be appreciated.
>
> > On Oct 22, 8:27 am, Bob Mattax <[EMAIL PROTECTED]> wrote:
>
> > > I've looked through and tried all of the HABTM filtering discussions,
> > > and have tried to adapt them to my needs, but I just can't seem to get
> > > it to work.  Here is the basic set of relationships that I'm trying to
> > > find results for:
>
> > > Units -> Buildings -> HABTM <- Campuses
>
> > > I'm working on making a small rental property application, and I want
> > > to be able to find the units with certain specs that match certain
> > > criteria for the unit, but also exist within a certain campus.  I've
> > > tried binding models on the fly, but I'm not getting very far.  The
> > > queries displayed in my debugging always come short of including all
> > > the joins I would have expected.
>
> > > Any help would be appreciated.
>
> > > Thanks,
> > > Bob


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Tree Behavior Table Structure

2007-10-24 Thread DanielMedia

Hi,

I was reading in the temp manual about the tree behavior in 1.2
(http://tempdocs.cakephp.org/#TOC95584)

Looks pretty cool. I want to start testing it out but it has no
mention of what the database table should look like. For example a
categories table. What fields does it expect to see? Would love to see
someone post an article in the bakery about the tree behavior if
you've had some experience with it. 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Comment Controller

2007-10-24 Thread LW

Dixon,
did you find a solution to this problem?
I've been struggling with a similar situation and haven't found a way
through it yet.

Lutz

On 6 Okt., 13:47, cakeFreak <[EMAIL PROTECTED]> wrote:
> Did you try to load the comments form via Ajax?
>
> Dan
>
> On 5 Ott, 02:19, dixon_ <[EMAIL PROTECTED]> wrote:
>
> > Hi all bakers!
>
> > I'm developing just another CMS application to learn the Cake
> > framework. Really impressed so far!
>
> > I'm implementing a commenting system to my posts on the blog. I've
> > associated Comment and Post models correctly and placed the submission
> > form in an element that is rendered from the post view, as it should
> > (any other suggestions?). Then I've set the form URL action to "/
> > comment/add" where I add data to the Comment model and then
> > redirecting the user back to the post view. Everything works so long,
> > records are showing up and associations are being made etc...
>
> > The problem is when a field is invalid while trying to save data in
> > the CommentsController. How should I handle this? I cannotredirect
> > the user back to the post view to show errors, as we are loosing all
> > data in the redirection. I could let it auto render the default view
> > for the "/comment/add" action (which just would be a submission form)
> > without any Post data, but that just doesn't make sense.
>
> > To make my problem short: Can anyone show me examples on how to add a
> > comment from a post view, and still be able to showvalidationerror
> > messages etc (as in normal cases)?
>
> > Cheers from Sweden.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



how can I insert some records at a time in a model? need I call save() many times ?

2007-10-24 Thread pizzro

How can I insert some records at one time in a model? Need I call
save() many times ?
these data are similar.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to render a view into a layout

2007-10-24 Thread pizzro

maybe you need set a $var in layout file, then call $this->set("var",
$this->requestAction(url,array("return"))),


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can $ajax-sortable drag around table rows?

2007-10-24 Thread jeko

Convention seems to be pointing towards:

Column header
Column data


Which is not what most of us are used to, but it is better in the long
run. Follow that type of markup for your tables, and you'll find that
you can drop in any kind of JS library fanciness.

On Oct 24, 6:44 pm, schneimi <[EMAIL PROTECTED]> wrote:
> I just read 
> throughhttp://wiki.script.aculo.us/scriptaculous/show/Sortable.create,
> and there is some important note about tables but also a very good
> hint.
>
> Just wrap a  around your 's and use the id of the tbody for
> sorting.
>
> schneimi schrieb:
>
> > I had the same problem and ended up in using a nested table inside a
> > ul, but I don't like it very much.
>
> > I found out that there is a tag option which can be used like $ajax-
> > >sortable('sortable_table', array('tag' => 'tr')) but it didn't work
> > as well.
>
> > On 24 Okt., 20:25, Corie <[EMAIL PROTECTED]> wrote:
> > > I have a table in which I want to sort the rows by using the drag and
> > > drop methods of $ajax->sortable, but it's not working. Are table rows
> > > even draggable, or do I have to make a nested table inside a ul?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to render a view into a layout

2007-10-24 Thread Sam Sherlock
>
> but I really need a guide right now ^_^


http://manual.cakephp.org/chapter/controllers


$this->layout = "ajax";

try putting that in your action of the controller


On 25/10/2007, David Coll <[EMAIL PROTECTED]> wrote:
>
>  Hello again!
>
> I'm absolutely newbie for sure...
>
> How can I render a view (ie. /sitelinks/index ) in my default.ctp layout ?
>
> I've tried every kind of rendering stuff I could find but, no chances..
>
> I'm not too much willing to use the renderElement function as I would like
> to access this as a self-page also.
>
> There's probably a way around, but I really need a guide right now ^_^
>
> Thanks for any help!!
>
> David
>
> >
>

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to render a view into a layout

2007-10-24 Thread David Coll
Hello again!

I'm absolutely newbie for sure...

How can I render a view (ie. /sitelinks/index ) in my default.ctp layout ?

I've tried every kind of rendering stuff I could find but, no chances.. 

I'm not too much willing to use the renderElement function as I would like to 
access this as a self-page also.

There's probably a way around, but I really need a guide right now ^_^

Thanks for any help!!

David
--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can $ajax-sortable drag around table rows?

2007-10-24 Thread schneimi

I just read through 
http://wiki.script.aculo.us/scriptaculous/show/Sortable.create,
and there is some important note about tables but also a very good
hint.

Just wrap a  around your 's and use the id of the tbody for
sorting.

schneimi schrieb:
> I had the same problem and ended up in using a nested table inside a
> ul, but I don't like it very much.
>
> I found out that there is a tag option which can be used like $ajax-
> >sortable('sortable_table', array('tag' => 'tr')) but it didn't work
> as well.
>
> On 24 Okt., 20:25, Corie <[EMAIL PROTECTED]> wrote:
> > I have a table in which I want to sort the rows by using the drag and
> > drop methods of $ajax->sortable, but it's not working. Are table rows
> > even draggable, or do I have to make a nested table inside a ul?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can $ajax-sortable drag around table rows?

2007-10-24 Thread Corie

Yea I did the same. It's not as efficient but it works well.

On Oct 24, 6:29 pm, schneimi <[EMAIL PROTECTED]> wrote:
> I had the same problem and ended up in using a nested table inside a
> ul, but I don't like it very much.
>
> I found out that there is a tag option which can be used like 
> $ajax->sortable('sortable_table', array('tag' => 'tr')) but it didn't work
>
> as well.
>
> On 24 Okt., 20:25, Corie <[EMAIL PROTECTED]> wrote:
>
> > I have a table in which I want to sort the rows by using the drag and
> > drop methods of $ajax->sortable, but it's not working. Are table rows
> > even draggable, or do I have to make a nested table inside a ul?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can $ajax-sortable drag around table rows?

2007-10-24 Thread schneimi

I had the same problem and ended up in using a nested table inside a
ul, but I don't like it very much.

I found out that there is a tag option which can be used like $ajax-
>sortable('sortable_table', array('tag' => 'tr')) but it didn't work
as well.

On 24 Okt., 20:25, Corie <[EMAIL PROTECTED]> wrote:
> I have a table in which I want to sort the rows by using the drag and
> drop methods of $ajax->sortable, but it's not working. Are table rows
> even draggable, or do I have to make a nested table inside a ul?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Empty page response

2007-10-24 Thread francky06l

The zend optimizer fails on the __("") ..I had to remove from php.ini
in order to avoid the crash ..Maybe this is linked.

On Oct 24, 11:40 pm, lemp <[EMAIL PROTECTED]> wrote:
> On Oct 24, 6:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > After install, when I go to the cake link, a blank page is returned.
>
> Had the same problem.
>
> In cake/libs/view/templates/layouts/default.ctp at line 59
>
> Replace __("CakePHP: the rapid development php framework", true) by
> any string and it will work.
>
> The same function is used on line 45, so I presume the problem is
> contextual but I don't know why yet.
>
> Someone has a suggestion?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread Olexandr Melnyk
You can have auto-incremented columns with SQLite.

Define a single integer column as primary key and that should do the job.

On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hello all!
>
> I'm a re-newly cake user and I'm currently trying to make my cake
> using a SQLite database.
> I'll the 15minute blog tutorial as a reference.
> Now, once I get the database connected correctly (verified and working
> with bake script), I do a simple table :
>
> CREATE TABLE posts (
> id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
> title VARCHAR(50),
> body TEXT,
> created DATETIME DEFAULT NULL,
> modified DATETIME DEFAULT NULL
> );
>
> ok, now that is a standard mysql query and it is recognised, however,
> the AUTO_INCREMENT is not a definition in sqlite. Thus when inserting
> a row using the standard posts/add , the id stays empty. Then it is
> impossible to do editing/deleting because there is no id.
>
> After reading this page : http://www.sqlite.org/autoinc.html that is
> explaining the way to use the only auto-incremental feature of this
> kind of database :
> replacing "id" by the auto-generated "rowid" (and not visible throught
> SQLiteManager)
>
> I wonder if I should put a ticket about that ? So the dbo_sqlite.php
> script be updated to automatically use "rowid" insteand of "id" into
> querys.
> What is your thought about that ?
> Do I make myself clear anoff ?
> Is there someone reading this using a sqlite database ?
>
> Thanks
> David
>
>
> >
>


-- 
Sincerely yours,
Olexandr Melnyk <><
http://omelnyk.net/

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread [EMAIL PROTECTED]

Hello all!

I'm a re-newly cake user and I'm currently trying to make my cake
using a SQLite database.
I'll the 15minute blog tutorial as a reference.
Now, once I get the database connected correctly (verified and working
with bake script), I do a simple table :

CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);

ok, now that is a standard mysql query and it is recognised, however,
the AUTO_INCREMENT is not a definition in sqlite. Thus when inserting
a row using the standard posts/add , the id stays empty. Then it is
impossible to do editing/deleting because there is no id.

After reading this page : http://www.sqlite.org/autoinc.html that is
explaining the way to use the only auto-incremental feature of this
kind of database :
replacing "id" by the auto-generated "rowid" (and not visible throught
SQLiteManager)

I wonder if I should put a ticket about that ? So the dbo_sqlite.php
script be updated to automatically use "rowid" insteand of "id" into
querys.
What is your thought about that ?
Do I make myself clear anoff ?
Is there someone reading this using a sqlite database ?

Thanks
David


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Empty page response

2007-10-24 Thread lemp

On Oct 24, 6:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> After install, when I go to the cake link, a blank page is returned.

Had the same problem.

In cake/libs/view/templates/layouts/default.ctp at line 59

Replace __("CakePHP: the rapid development php framework", true) by
any string and it will work.

The same function is used on line 45, so I presume the problem is
contextual but I don't know why yet.

Someone has a suggestion?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Forum / Bulletin Board written in cakephp

2007-10-24 Thread cakeFreak

Hey Jacob,

read these posts about forum/bulletins:

Building a forum plug-in
http://groups.google.com/group/cake-php/browse_frm/thread/5397f338d19a155d

CakePHP miniFORUM
http://groups.google.com/group/cake-php/browse_frm/thread/1cec189f99b27dad

CakePHP SMF integration
http://groups.google.com/group/cake-php/browse_frm/thread/e44d0a4b957f3bf0

Hope this helps!

Dan


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache error after update..

2007-10-24 Thread francky06l

Check the nightly app based application, the core contains what you
should do.

On Oct 24, 7:18 pm, Mech7 <[EMAIL PROTECTED]> wrote:
> I updated cake 1.2 from the nightly yesterday.. only now i get this:
>
> Warning: Cache not configured. Please use Cache::config(); in APP/
> config/core.php in C:\wamp\www\cake_1.2\cake\bootstrap.php on line 52
>
> Fatal error: Call to undefined method Cache::config() in C:\wamp\www
> \cake_1.2\cake\bootstrap.php on line 53
>
> Where should i configure the cache ?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange black row

2007-10-24 Thread francky06l

It's in the basic application APP available in the cake install -
cake.generic.css

On Oct 24, 5:50 pm, Daniel <[EMAIL PROTECTED]> wrote:
> It is black on black text.  There is no coloration in the source, but
> there is mention of a generic.css
> file.  Where will I find the css file ?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Loading options for a selectbox with AJAX

2007-10-24 Thread francky06l

I think for IEE you have to replace the complete select, not only the
options

On Oct 24, 5:15 pm, Guido <[EMAIL PROTECTED]> wrote:
> Hi,
> I use the AJAX-helper and Script.aculo.us to load the options for a
> selecbox2 which depends on the value in selectbox1.
>
> // view code
> echo $form->select('select1', $select1, null, array('id' => 'select1',
> 'class' => 'form-select'));
> echo $form->select('s2', null, null, array('id' => 'select2', 'class'
> => 'form-select'));
> echo $ajax->observeField('select1', array('url' => '/ajaxtest/
> getOptions','update' => 'select2'));
>
> With Opera, Firefox and Safari everythings works fine, but not with
> IE6 and IE7. IE sends the HTTP-Request and gets also the right answer
> from the server. But the loaded options does not appear in selectbox2.
> But it's possible to output the loaded options in a div container.
> I've tried Script.aculo.us 1.6 and 1.7.
>
> The output from /ajaxtest/getOptions is:
> FrauFrau & Herr option>HerrLiebe Frau
> XYZLiebe XYZ value="9">Lieber Herr XYZ
>
> Any Ideas? I'm not sure if this a problem of Script.aculo.us or a
> problem with Script.aculo.us integration in Cakephp. Maybe somebody
> had the same problem in the past?
>
> Guido


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Possible noobie error-multiple records created

2007-10-24 Thread francky06l

Very strange, I use the same version and never had this  I might
have crazy thoughts, but it seems your actions is run multiple times,
or something else going in. Also have you got some css script errors
or "links" error (js, css etc ..) ?
Can you set the debug to 2 and check the SQL code ?

On Oct 24, 10:19 pm, Buzzholio <[EMAIL PROTECTED]> wrote:
> I've gotten a few responses (which I greatly appreciate). It appears
> that this is not noobie error after all, There is something wrong with
> my setup. No matter how I do it, every time I update a record, two new
> blank records are appended. Have you ever seen this before?
>
> On Oct 23, 10:05 pm, Buzzholio <[EMAIL PROTECTED]> wrote:
>
> > Hello! I'm a long time coder (27 years) trying to get a handle on
> > Cake. I wrote the following very simple code to update a record. When
> > executed, it does update the record but also creates two new records.
> > I've tried dozens of variations and still get the same results (using
> > the pre-beta release of cake). Please tell me what I am doing wrong.
>
> > $this->Member->id = $id;
> > $this->data=$this->Member->read();
> > $this->data['Member']['bucks']=$this->data['Member']['bucks'] + 1;
> > $this->data['Member']['last']=date( 'Y-m-d H:i:s',time() );
> > $this->Member->save($this->data['Member']);
>
> > 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: flash files which load other flash files

2007-10-24 Thread Martin Wood-Mitrovski

you can set a parameter for the flash movie so it knows what its base url is.

like this :

" />

also set the "base" attribute on the embed tag to the same

here's the Adobe technote :

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_04157&sliceId=1

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Possible noobie error-multiple records created

2007-10-24 Thread Buzzholio

I've gotten a few responses (which I greatly appreciate). It appears
that this is not noobie error after all, There is something wrong with
my setup. No matter how I do it, every time I update a record, two new
blank records are appended. Have you ever seen this before?



On Oct 23, 10:05 pm, Buzzholio <[EMAIL PROTECTED]> wrote:
> Hello! I'm a long time coder (27 years) trying to get a handle on
> Cake. I wrote the following very simple code to update a record. When
> executed, it does update the record but also creates two new records.
> I've tried dozens of variations and still get the same results (using
> the pre-beta release of cake). Please tell me what I am doing wrong.
>
> $this->Member->id = $id;
> $this->data=$this->Member->read();
> $this->data['Member']['bucks']=$this->data['Member']['bucks'] + 1;
> $this->data['Member']['last']=date( 'Y-m-d H:i:s',time() );
> $this->Member->save($this->data['Member']);
>
> 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Empty page response

2007-10-24 Thread Kunthar

You can also

php_flag display_errors on

line inside of .htaccess file in your root dir and check again.
This way, you can catch all php errors.

Note: core.php already have monitoring but, sometimes it is quite
usefull to see all errors.

Kunth

On 24 Ekim, 13:22, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
> I recently installed cakephp 1.2.0.5875-pre-beta on my server.
>
> After install, when I go to the cake link, a blank page is returned.
> I have used cake 1.1 and 1.2 alpha for several months without any such
> problems.
> This happens with/without any change in database and core
> configuration changes.
>
> I have followed the steps as per the 1.2 manual.
>
> So why do we get a blank response, and not any error etc.
> Also, the server logs do not indicate any error.
> Someone please help. The server details are as below:
>
> Apache version  1.3.39 (Unix)  Linux
> PHP version  5.2.4
> MySQL version  4.1.22-standard
> The domain points to the app/webroot folder
> The .htaccess file has not been modified from its initial value.
> It is a fresh install, no new file has been added.
>
> TIA,
> Rex


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake 1.2 Pre-Beta Self-Referential Model Problem?

2007-10-24 Thread daphonz

I have a Categories Model that references itself to create Child
Categories.  It also has multiple Has Many associations with other
models that I use, such as Images, Documents, and Content.

The basic logic is that all associated models have a category_id that
keys into a child category's id, essentially placing every entry in a
child category of a parent category.

This whole system worked fine with the previous main alpha releases.
When I updated to Cake's pre-Beta, I noticed several problems.  First,
it seems that recursive association results have changed.  When I do a
findAll in Categories with my recursive level set to 2, Child
Categories are returned, but not their associated model entries.

Currently, my Categories model looks like this:

class Category extends AppModel
{
var $name = 'Category';

var $belongsTo = array('ParentCategory'=>

array('className'=>'Category',

'foreignKey'=>'parent_id'
)
);

var $hasMany = array('ChildCategory'=>

array('className'=>'Category',

'foreignKey'=>'parent_id',

'order'=>array('ChildCategory.ordering'=>'ASC'),
'dependent'=>true
),
'Content'=>
 array('className'=>'Content',
'foreignKey'=>'category_id',
'order'=>array('Content.ordering'=>'ASC'),
'dependent'=>true
 ),
'News' =>
 array('className' => 'News',
   'conditions'=> '',
   'order' =>
array('News.newsDate'=>'DESC'),
   'limit' => '',
   'foreignKey'=> 'category_id',
   'dependent' => true,
   'exclusive' => false,
   'finderQuery'   => ''
 ),
 'Image' =>
 array('className' => 'Image',
   'conditions'=> '',
   'order' =>
array('Image.ordering'=>'ASC'),
   'limit' => '',
   'foreignKey'=> 'category_id',
   'dependent' => true,
   'exclusive' => false,
   'finderQuery'   => ''
 ), etc.
}

Up until the latest alpha of Cake 1.2, any recursive findAll calls to
the Category model would return categories, category children, and the
model associations to the category children.  For example:

$this->Document->Category->recursive = 2;
$this->Document->Category-
>findAll(array('Category.model'=>'Document','Category.parent_id'=>'0'),null,array('Category.ordering'=>'ASC'));

Would return:

[2] => Array
(
[Category] => Array
(
[id] => 131
[parent_id] => 0
[numberOfChildren] =>
[options] => a:1:{i:0;s:1:"1";}
[name] => Newsletters
[teaser] =>
[description] =>
[model] => Document
[ordering] => 3
[created] => 2007-10-16 14:02:33
[modified] => 2007-10-16 14:27:26
)

[ParentCategory] => Array
(
[id] =>
[parent_id] =>
[numberOfChildren] =>
[options] =>
[name] =>
[teaser] =>
[description] =>
[model] =>
[ordering] =>
[created] =>
[modified] =>
)

[ChildCategory] => Array
(
[0] => Array
(
[id] => 132
[parent_id] => 131
[numberOfChildren] =>
[options] =>
[name] => Default
[teaser] =>
[description] =>
[model] => Document
[ordering] => 1
[created] => 2007-10-16 14:02:33
[modified] => 2007-10-16 14:02:33
 

RE: flash files which load other flash files

2007-10-24 Thread Paul Webster

Can you just not use absolute urls? /img/swf/menu.swf
Or if they need to be configurable pass them in as flash vars or xml?
There are plenty of quick web tut's out there showing how to do such things.



-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of keymaster
Sent: Thursday, 25 October 2007 6:54 a.m.
To: Cake PHP
Subject: flash files which load other flash files


On our cake site which is nearly finished, our graphics/flash
designer  has created a beautiful flash-based intro.

Normally, I have no problems embedding flash files into cake. I have
done it many times before by placing them in a subdirectory within the
cake webroot and then referencing  $this->webroot within the 
tag, like so:

" />

This time however, I received an unpleasant surprise.

The flash designer decided to do things more "efficiently" to save
load time, and he broke up his flash intro into multiple flash files,
where there is one "main" .swf which, once loaded into the browser,
requests the others as needed.

Great idea, but...

How do I get the main .swf to generate the correct cake urls?

All my .swf's are sitting in webroot/img/swf/.

I know the main .swf needs to generate an url of:

http://domain.com/img/swf/filename.swf

Our flash designer is only an artist type, not a flash developer/
programmer. I am also not a flash programmer just a well-meaning PHP/
MySQL type.

Is there any way out of this ?

I thought perhaps of the following possibilities:
1. have the flash designer combine everything into a single flash file
(but it will take much longer to load).
2. have the flash designer hardcode the cake urls of the several dozen
flash files into his main swf (lots of work and nonportable)
3. (don't know if this will work) make the cake webroot the same as
the site root so the urls will be the same (?)

Is there any simple way to do this?





__ NOD32 2611 (20071023) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Can $ajax-sortable drag around table rows?

2007-10-24 Thread Corie

I have a table in which I want to sort the rows by using the drag and
drop methods of $ajax->sortable, but it's not working. Are table rows
even draggable, or do I have to make a nested table inside a ul?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



flash files which load other flash files

2007-10-24 Thread keymaster

On our cake site which is nearly finished, our graphics/flash
designer  has created a beautiful flash-based intro.

Normally, I have no problems embedding flash files into cake. I have
done it many times before by placing them in a subdirectory within the
cake webroot and then referencing  $this->webroot within the 
tag, like so:

" />

This time however, I received an unpleasant surprise.

The flash designer decided to do things more "efficiently" to save
load time, and he broke up his flash intro into multiple flash files,
where there is one "main" .swf which, once loaded into the browser,
requests the others as needed.

Great idea, but...

How do I get the main .swf to generate the correct cake urls?

All my .swf's are sitting in webroot/img/swf/.

I know the main .swf needs to generate an url of:

http://domain.com/img/swf/filename.swf

Our flash designer is only an artist type, not a flash developer/
programmer. I am also not a flash programmer just a well-meaning PHP/
MySQL type.

Is there any way out of this ?

I thought perhaps of the following possibilities:
1. have the flash designer combine everything into a single flash file
(but it will take much longer to load).
2. have the flash designer hardcode the cake urls of the several dozen
flash files into his main swf (lots of work and nonportable)
3. (don't know if this will work) make the cake webroot the same as
the site root so the urls will be the same (?)

Is there any simple way to do this?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread [EMAIL PROTECTED]

yeah!! that worked just fine! thanks

however, now I'm getting another error by the browser:

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.

if I comment the lines:
$this->redirect('/users/login');
exit();

everything is ok.

On Oct 24, 2:18 pm, Gwoo <[EMAIL PROTECTED]> wrote:
> You should look at the example in the Manual. It does not use
> __construct(), it uses beforeFilter. The reason for this is the
> components are not loaded in the constructor of the 
> Controller.http://manual.cakephp.org/appendix/simple_user_auth


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



HABTM help... setting up Models and saving associations

2007-10-24 Thread EVan

Apologies for another HABTM help topic but I'm having trouble getting
this.

My application is very similiar to a setup where there are tables
'posts' and 'tags' where Post HABTM Tags.  The manual explains how to
set up the database for this situation and how to fill in the Model
code for Post.php however

1. What should be placed in the Model code for Tag.php? (another HABTM
statement, just vice-versa?)
2. Does there need to be a Model and Controller for the posts_tags
association table.? (I'm assuming 'No')

Then when it comes to saving the associations I use the View code from
the CakePHP manual chapter on HABTM, however

3. What code needs to go in the controller to save the associations?

Here's the code I've got that doesn't work. (it's pretty much straight
from the manual)

View Code

Write a New Post


Title:
input('Post/title')?>



Body:
textarea('Post/body')?>



Related Tags:
selectTag('Tag/Tag', $tags, null,
array('multiple' => 'multiple')) ?>





submit('Save')?>




Controller Code

function add() {
$this->set('tags', $this->Post->Tag->generateList(null, null,
null, '{n}.Tag.id', '{n}.Tag.tag'));

if (!empty($this->data)) {
if ($this->Post->save($this->data)) {
$this->flash('Your post has been saved.','/posts/index');
}
}
}

I really appreciate any help.  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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cache error after update..

2007-10-24 Thread Mech7

I updated cake 1.2 from the nightly yesterday.. only now i get this:


Warning: Cache not configured. Please use Cache::config(); in APP/
config/core.php in C:\wamp\www\cake_1.2\cake\bootstrap.php on line 52

Fatal error: Call to undefined method Cache::config() in C:\wamp\www
\cake_1.2\cake\bootstrap.php on line 53

Where should i configure the cache ?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread Gwoo

You should look at the example in the Manual. It does not use
__construct(), it uses beforeFilter. The reason for this is the
components are not loaded in the constructor of the Controller.
http://manual.cakephp.org/appendix/simple_user_auth


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread [EMAIL PROTECTED]

checkSession())
$this->layout = 'default';
else
$this->layout = 'login';
}

function checkSession() {
// If the session info hasn't been set...
if (!$this->Session->check('User')) {
// Force the user to login
$this->redirect('/users/login');
exit();
}
}
}
?>

BTW, I'm just starting to learn cake, so sorry if some questions seem
silly.

On Oct 24, 2:01 pm, Matt Kosoy <[EMAIL PROTECTED]> wrote:
> Post the code from your app controller  so we can take a look.
>
> -m
>
> On Oct 24, 2:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > I'm using cake 1.1.17, and am following the Simple User Authentication
> > example from the manual (http://manual.cakephp.org/appendix/
> > simple_user_auth), and I get the following error when I write the
> > checkSession function in the app_controller.php file:
>
> > Notice: Undefined property: PagesController::$Session in /var/www/
> > cakestuff/clientes/app/app_controller.php on line 19
>
> > Fatal error: Call to a member function check() on a non-object in /var/
> > www/cakestuff/clientes/app/app_controller.php on line 19
>
> > Anyone know what I'm doing wrong?? I've google and asked on IRC, but
> > nothing.
>
> > Thanks
> > dave


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread [EMAIL PROTECTED]

No, but I just added

var $components = array('session');

and the error continues.

On Oct 24, 1:38 pm, dardosordi <[EMAIL PROTECTED]> wrote:
> Are you using the session component?
>
> On Oct 24, 3:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > I'm using cake 1.1.17, and am following the Simple User Authentication
> > example from the manual (http://manual.cakephp.org/appendix/
> > simple_user_auth), and I get the following error when I write the
> > checkSession function in the app_controller.php file:
>
> > Notice: Undefined property: PagesController::$Session in /var/www/
> > cakestuff/clientes/app/app_controller.php on line 19
>
> > Fatal error: Call to a member function check() on a non-object in /var/
> > www/cakestuff/clientes/app/app_controller.php on line 19
>
> > Anyone know what I'm doing wrong?? I've google and asked on IRC, but
> > nothing.
>
> > Thanks
> > dave


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread Matt Kosoy

Post the code from your app controller  so we can take a look.

-m


On Oct 24, 2:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm using cake 1.1.17, and am following the Simple User Authentication
> example from the manual (http://manual.cakephp.org/appendix/
> simple_user_auth), and I get the following error when I write the
> checkSession function in the app_controller.php file:
>
> Notice: Undefined property: PagesController::$Session in /var/www/
> cakestuff/clientes/app/app_controller.php on line 19
>
> Fatal error: Call to a member function check() on a non-object in /var/
> www/cakestuff/clientes/app/app_controller.php on line 19
>
> Anyone know what I'm doing wrong?? I've google and asked on IRC, but
> nothing.
>
> Thanks
> dave


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Empty page response

2007-10-24 Thread dardosordi

Check for the Zend optimizer extension in php.ini

On Oct 24, 7:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
> I recently installed cakephp 1.2.0.5875-pre-beta on my server.
>
> After install, when I go to the cake link, a blank page is returned.
> I have used cake 1.1 and 1.2 alpha for several months without any such
> problems.
> This happens with/without any change in database and core
> configuration changes.
>
> I have followed the steps as per the 1.2 manual.
>
> So why do we get a blank response, and not any error etc.
> Also, the server logs do not indicate any error.
> Someone please help. The server details are as below:
>
> Apache version  1.3.39 (Unix)  Linux
> PHP version  5.2.4
> MySQL version  4.1.22-standard
> The domain points to the app/webroot folder
> The .htaccess file has not been modified from its initial value.
> It is a fresh install, no new file has been added.
>
> TIA,
> Rex


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Limiting Records

2007-10-24 Thread John Messingham

Thanks for the replies.

I was hoping there was a way to add 'where user_id = xx' to every
query. however the suggestions made shold help me out. So again many
thanks for your time.

John


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session problem in app_controller

2007-10-24 Thread dardosordi

Are you using the session component?

On Oct 24, 3:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm using cake 1.1.17, and am following the Simple User Authentication
> example from the manual (http://manual.cakephp.org/appendix/
> simple_user_auth), and I get the following error when I write the
> checkSession function in the app_controller.php file:
>
> Notice: Undefined property: PagesController::$Session in /var/www/
> cakestuff/clientes/app/app_controller.php on line 19
>
> Fatal error: Call to a member function check() on a non-object in /var/
> www/cakestuff/clientes/app/app_controller.php on line 19
>
> Anyone know what I'm doing wrong?? I've google and asked on IRC, but
> nothing.
>
> Thanks
> dave


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Forum / Bulletin Board written in cakephp

2007-10-24 Thread Jacob83

Hi,
is there any full-featured bulletin board written for cakephp arround?
I only find the "example" from http://cakeamfphp.rd11.org/ which is
not more than a prove of concept...
Regards,
Jacob


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Limiting Records

2007-10-24 Thread dardosordi

You can use the  callbacks beforeDelete()/ beforeFind($queryData) /
beforeSave() in the model to accomplish that.

On Oct 24, 5:32 am, John Messingham <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I am developing a small applicaton and need to limit records displayed/
> edited/deleted to just ones owned by a logged in user.
>
> I have the user id set in a session and wondered if there was a way to
> limit the records via the models. Each table has a field holding the
> user id.
>
> Many Thanks
> John Messinghamhttp://www.jmds.co.uk


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: pagination (1.2) creating wrong links on >>next from admin_index.

2007-10-24 Thread Joel Stein

It's fixed in changeset 5887!

https://trac.cakephp.org/ticket/3440
https://trac.cakephp.org/changeset/5887


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginating inside admin in new 1.2 release

2007-10-24 Thread Joel Stein

It's fixed in changeset 5887!

https://trac.cakephp.org/ticket/3440
https://trac.cakephp.org/changeset/5887


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: saveField breaks in new 1.2 release

2007-10-24 Thread francky06l

you could try in the loop :
$this->Image->set(array('id' => $ids, 'sort' => $i));
$this->Image->save();

And turn the Debug to 2 to check the SQL generated. You might also
have to turn off the cacheQueries (not sure it interferes in this
context).

On Oct 24, 5:45 pm, LW <[EMAIL PROTECTED]> wrote:
> Hi Wayne,
>
> if i do a debug($ids) it shows:
> Array
> (
> [0] => 134
> [1] => 140
> [2] => 141
> [3] => 139
> )
> which are the id's of the entries in the image-table.
> looks ok to me, that's what should be in there.
>
> also from the echo statements in the foreach-loop i can see the
> saveField gets called but returns false.
>
> I don't get it, any thoughts?
>
> Lutz
>
> On 24 Okt., 17:28, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
>
> > Looks like you're only getting a SELECT executed. Are you sure the
> > $ids variable has proper values in it -- if not, the foreach() won't
> > run and saveField() will never get called.
>
> > Add some debugging statements to your code and check the debug log
> > after executing this method a few times.
>
> > Wayne
>
> > On 10/24/07, LW <[EMAIL PROTECTED]> wrote:
>
> > > Well, I don't doubt that saveFields works in 1.2
> > > I just don't get why it's not working in my code after the update and
> > > i thought maybe something changed in the way saveField is used or
> > > something like that. I'd appreciate any help on this, what code do you
> > > need to see?
>
> > > Maybe the response i get might help:
>
> > >  > > id="cakeSqlLog_1193212061471ef89d060722_06944581" summary="Cake SQL
> > > Log" cellspacing="0" border = "0">
> > > 1 query took 0 ms
> > > 
> > > NrQueryErrorAffectedNum.
> > > rowsTook (ms)
> > > 
> > > 
> > > 1SELECT COUNT(*) AS `count` FROM `images` AS
> > > `Image`   WHERE `Image`.`id`  =  134 11 > > "text-align: right">0
> > > 
> > > 
>
> > > thanks,
> > > Lutz
>
> > > On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]>
> > > wrote:
> > > > I suggest you post your code, since Model has an awesome test coverage: 
> > > > in
> > > > cake/tests/cases/libs/model/model.test.php you can see for example the
> > > > function testSaveField() which tests for saveField() calls, and all 
> > > > tests
> > > > are succeeding. Therefore saveField() IS WORKING on 1.2.
>
> > > > -MI
>
> > > > ---
>
> > > > Remember, smart coders answer ten questions for every question they ask.
> > > > So be smart, be cool, and share your knowledge.
>
> > > > BAKE ON!
>
> > > > blog:http://www.MarianoIglesias.com.ar
>
> > > > -Mensaje original-
> > > > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> > > > de LW
> > > > Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m.
> > > > Para: Cake PHP
> > > > Asunto: Re: saveField breaks in new 1.2 release
>
> > > > Doesn't work means the db-records are not updated, the saveField data
> > > > is not saved. it doesn't give me an error message or any entry in the
> > > > cake debug log though.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Limiting Records

2007-10-24 Thread francky06l

you could use the beforeFind in app_model and add your user_id as
condition.

On Oct 24, 10:32 am, John Messingham <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I am developing a small applicaton and need to limit records displayed/
> edited/deleted to just ones owned by a logged in user.
>
> I have the user id set in a session and wondered if there was a way to
> limit the records via the models. Each table has a field holding the
> user id.
>
> Many Thanks
> John Messinghamhttp://www.jmds.co.uk


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL with acl.ini.php

2007-10-24 Thread Paolo

Hi,

I would like to use the CAke PHP ACL using the acl.ini.php file, but I
cannot make it work, and cannot find any help online. For example, now
in the file I have:

;-
;Users
;-

[user]
groups = group
deny =
allow =

;-
;Groups
;-

[group]
deny = all
allow =

Shouldn't this mean that no user can access the website? Do I have to
enable this file in some way?

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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange black row

2007-10-24 Thread Daniel

It is black on black text.  There is no coloration in the source, but
there is mention of a generic.css
file.  Where will I find the css file ?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: saveField breaks in new 1.2 release

2007-10-24 Thread LW

Hi,
I still don't know what this is ...

How could i see what happens with the saveField ?
right now i just know that the saveField command fails, i'm using an
if-clause to get a response:

function order_images(){
$this->autoRender = false;
$ids= $this->params['form']['imgList'];
$i = 1;
foreach($ids as $id){
$this->Image->id = $id;
if($this->Image->saveField('sort', $i)){
echo 'ok - '.$id;
}else{
echo 'not ok - '.$id;
}
$i++;
}
}
It gives me an 'not ok - ...' for every $id in the array.
what is the next step i could take in finding the error?

thanks,
Lutz

On 24 Okt., 09:52, LW <[EMAIL PROTECTED]> wrote:
> Well, I don't doubt that saveFields works in 1.2
> I just don't get why it's not working in my code after the update and
> i thought maybe something changed in the way saveField is used or
> something like that. I'd appreciate any help on this, what code do you
> need to see?
>
> Maybe the response i get might help:
>
>  id="cakeSqlLog_1193212061471ef89d060722_06944581" summary="Cake SQL
> Log" cellspacing="0" border = "0">
> 1 query took 0 ms
> 
> NrQueryErrorAffectedNum.
> rowsTook (ms)
> 
> 
> 1SELECT COUNT(*) AS `count` FROM `images` AS
> `Image`   WHERE `Image`.`id`  =  134 11 "text-align: right">0
> 
> 
>
> thanks,
> Lutz
>
> On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]>
> wrote:
>
> > I suggest you post your code, since Model has an awesome test coverage: in
> > cake/tests/cases/libs/model/model.test.php you can see for example the
> > function testSaveField() which tests for saveField() calls, and all tests
> > are succeeding. Therefore saveField() IS WORKING on 1.2.
>
> > -MI
>
> > ---
>
> > Remember, smart coders answer ten questions for every question they ask.
> > So be smart, be cool, and share your knowledge.
>
> > BAKE ON!
>
> > blog:http://www.MarianoIglesias.com.ar
>
> > -Mensaje original-
> > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> > de LW
> > Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m.
> > Para: Cake PHP
> > Asunto: Re: saveField breaks in new 1.2 release
>
> > Doesn't work means the db-records are not updated, the saveField data
> > is not saved. it doesn't give me an error message or any entry in the
> > cake debug log though.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: saveField breaks in new 1.2 release

2007-10-24 Thread LW

Hi Wayne,

if i do a debug($ids) it shows:
Array
(
[0] => 134
[1] => 140
[2] => 141
[3] => 139
)
which are the id's of the entries in the image-table.
looks ok to me, that's what should be in there.

also from the echo statements in the foreach-loop i can see the
saveField gets called but returns false.

I don't get it, any thoughts?

Lutz

On 24 Okt., 17:28, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> Looks like you're only getting a SELECT executed. Are you sure the
> $ids variable has proper values in it -- if not, the foreach() won't
> run and saveField() will never get called.
>
> Add some debugging statements to your code and check the debug log
> after executing this method a few times.
>
> Wayne
>
> On 10/24/07, LW <[EMAIL PROTECTED]> wrote:
>
>
>
> > Well, I don't doubt that saveFields works in 1.2
> > I just don't get why it's not working in my code after the update and
> > i thought maybe something changed in the way saveField is used or
> > something like that. I'd appreciate any help on this, what code do you
> > need to see?
>
> > Maybe the response i get might help:
>
> >  > id="cakeSqlLog_1193212061471ef89d060722_06944581" summary="Cake SQL
> > Log" cellspacing="0" border = "0">
> > 1 query took 0 ms
> > 
> > NrQueryErrorAffectedNum.
> > rowsTook (ms)
> > 
> > 
> > 1SELECT COUNT(*) AS `count` FROM `images` AS
> > `Image`   WHERE `Image`.`id`  =  134 11 > "text-align: right">0
> > 
> > 
>
> > thanks,
> > Lutz
>
> > On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]>
> > wrote:
> > > I suggest you post your code, since Model has an awesome test coverage: in
> > > cake/tests/cases/libs/model/model.test.php you can see for example the
> > > function testSaveField() which tests for saveField() calls, and all tests
> > > are succeeding. Therefore saveField() IS WORKING on 1.2.
>
> > > -MI
>
> > > ---
>
> > > Remember, smart coders answer ten questions for every question they ask.
> > > So be smart, be cool, and share your knowledge.
>
> > > BAKE ON!
>
> > > blog:http://www.MarianoIglesias.com.ar
>
> > > -Mensaje original-
> > > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> > > de LW
> > > Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m.
> > > Para: Cake PHP
> > > Asunto: Re: saveField breaks in new 1.2 release
>
> > > Doesn't work means the db-records are not updated, the saveField data
> > > is not saved. it doesn't give me an error message or any entry in the
> > > cake debug log though.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $ajax->submit() not writing script tag inside ajax called view

2007-10-24 Thread Corie

Cool extension, but it still doesn't show the 

Re: New CakePHP Releases

2007-10-24 Thread MYRZ

Hi Guys,

Great news guys, two thumbs up for all the great work on 1.2 & the
documentation.

I have one question though:

While trying to print the new documentation (on http://tempdocs.cakephp.org/),
I found that the code examples (in the boxes) can't be printed nicely.
Is it possible to place a print-friendly version somewhere?

Thanx,
Mario


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: strange black row

2007-10-24 Thread Wayne Fay

Check your CSS and the HTML source.

Wayne

On 10/24/07, Daniel <[EMAIL PROTECTED]> wrote:
>
> I am following the CakePHP tutorial from IBM and I get a single black
> row appearing in the users table.  So I added another record and then
> I get the black row again but with a second row appearing normally.
> It is like as though the text is black on black.
>
>
> >
>

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: saveField breaks in new 1.2 release

2007-10-24 Thread Wayne Fay

Looks like you're only getting a SELECT executed. Are you sure the
$ids variable has proper values in it -- if not, the foreach() won't
run and saveField() will never get called.

Add some debugging statements to your code and check the debug log
after executing this method a few times.

Wayne

On 10/24/07, LW <[EMAIL PROTECTED]> wrote:
>
> Well, I don't doubt that saveFields works in 1.2
> I just don't get why it's not working in my code after the update and
> i thought maybe something changed in the way saveField is used or
> something like that. I'd appreciate any help on this, what code do you
> need to see?
>
> Maybe the response i get might help:
>
>  id="cakeSqlLog_1193212061471ef89d060722_06944581" summary="Cake SQL
> Log" cellspacing="0" border = "0">
> 1 query took 0 ms
> 
> NrQueryErrorAffectedNum.
> rowsTook (ms)
> 
> 
> 1SELECT COUNT(*) AS `count` FROM `images` AS
> `Image`   WHERE `Image`.`id`  =  134 11 "text-align: right">0
> 
> 
>
> thanks,
> Lutz
>
>
> On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]>
> wrote:
> > I suggest you post your code, since Model has an awesome test coverage: in
> > cake/tests/cases/libs/model/model.test.php you can see for example the
> > function testSaveField() which tests for saveField() calls, and all tests
> > are succeeding. Therefore saveField() IS WORKING on 1.2.
> >
> > -MI
> >
> > ---
> >
> > Remember, smart coders answer ten questions for every question they ask.
> > So be smart, be cool, and share your knowledge.
> >
> > BAKE ON!
> >
> > blog:http://www.MarianoIglesias.com.ar
> >
> > -Mensaje original-
> > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> > de LW
> > Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m.
> > Para: Cake PHP
> > Asunto: Re: saveField breaks in new 1.2 release
> >
> > Doesn't work means the db-records are not updated, the saveField data
> > is not saved. it doesn't give me an error message or any entry in the
> > cake debug log though.
>
>
> >
>

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Routes & Controller Methods Question

2007-10-24 Thread Flipflops

I've got a question about best practice - it is about forcing
everything in a controller through a single method as a result of
wanting nice urls

I have a controller called Products (based on a table called products)
that also uses a table called product_items (products is actually a
table of product categories - but this is all in the name of nice
urls, product_items contains the actual products)

For example:

/products
(shows you a list of product categories e.g. 'Pet Foods')

/products/pet_foods
(shows you all the products within the 'Pet Foods' category)

/products/pet_foods/chappie
(shows you the detail page for chappie)


This all works fine - the way I have done it is to do the following, I
have set up the following route:

$Route->connect('/products/(.*)', array('controller' => 'products',
'action' => 'index'));


So anything gets pointed at the index method in the controller, my
code within the index method looks something like this:



function index($product_cat_url = null, $product_item_url = null) {


if($product_cat_url)
{
   // check the product cat is valid
   etc.
}

if($product_item_url)
{
   // check the product item is valid
  etc.
}

etc.



This works great - but now I want to add locations so for instance I
might have a url like:

/products/london/pet_foods
(shows you all the products within the 'Pet Foods' category in london)




Obviously I can just add more code in the index method, but then this
in itself might get really unwieldy - but it has got me thinking is
there a better way of doing this? I was Googling and found this thread
http://groups.google.co.uk/group/cake-php/browse_thread/thread/5634c96badc17bf9/d8bc12220a9658c3b#d8bc122209658c3b
which I'd forgotten about (it was for a personal project and I've
never had to finnish it) used a beforeFilter() to pass it to a
different controller - but then I might just end up duplicating loads
of code in two methods...

So in the situations like this what do people do? Is there a better
solution?

Thanks

p.s. I'm using 1.1


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Loading options for a selectbox with AJAX

2007-10-24 Thread Guido

Hi,
I use the AJAX-helper and Script.aculo.us to load the options for a
selecbox2 which depends on the value in selectbox1.

// view code
echo $form->select('select1', $select1, null, array('id' => 'select1',
'class' => 'form-select'));
echo $form->select('s2', null, null, array('id' => 'select2', 'class'
=> 'form-select'));
echo $ajax->observeField('select1', array('url' => '/ajaxtest/
getOptions','update' => 'select2'));

With Opera, Firefox and Safari everythings works fine, but not with
IE6 and IE7. IE sends the HTTP-Request and gets also the right answer
from the server. But the loaded options does not appear in selectbox2.
But it's possible to output the loaded options in a div container.
I've tried Script.aculo.us 1.6 and 1.7.

The output from /ajaxtest/getOptions is:
FrauFrau & HerrHerrLiebe Frau
XYZLiebe XYZLieber Herr XYZ

Any Ideas? I'm not sure if this a problem of Script.aculo.us or a
problem with Script.aculo.us integration in Cakephp. Maybe somebody
had the same problem in the past?

Guido


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $ajax->submit() not writing script tag inside ajax called view

2007-10-24 Thread Chris Hartjes

On 10/24/07, Corie <[EMAIL PROTECTED]> wrote:
>
> Any ideas what i'm doing wrong?

No, but have you tried using FireBug in FireFox to debug your Ajax
stuff?  Best debugging tool I've ever used for figuring out problems
with Ajax-related stuff.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $ajax->submit() not writing script tag inside ajax called view

2007-10-24 Thread Corie

Okay, I just figured out that it is writing the 

strange black row

2007-10-24 Thread Daniel

I am following the CakePHP tutorial from IBM and I get a single black
row appearing in the users table.  So I added another record and then
I get the black row again but with a second row appearing normally.
It is like as though the text is black on black.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: pagination (1.2) creating wrong links on >>next from admin_index.

2007-10-24 Thread edward

Yep, after fine combing the group discussions I found that discussion.

If anyone is also having trouble, the solution for the moment is to
apply the patch (or change the file yourself) in the ticket that was
opened here: https://trac.cakephp.org/ticket/3440


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $File->write problems in new release?

2007-10-24 Thread Dave J

Hey gwoo... thanks for the pointer.

In fact that was exactly the problem.

line 223 in /libs/file.php: $data = strtr($data, array("\r\n" =>
$lineBreak, "\n" => $lineBreak, "\r" => $lineBreak));

It inserts line endings regardless of the filetype, corrupting any
binary data in the process.

I'll open a ticket if that would help

On Oct 23, 7:07 pm, Gwoo <[EMAIL PROTECTED]> wrote:
> yeah, some changes were made for the line endings on the different OS.
> Could you write a test case. The File tests are pretty easy to follow.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: URL wrong

2007-10-24 Thread Daniel

I'm following a tutorial, I am not sure that mod_rewrite is working.
I think I will go back to the manual.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: pagination (1.2) creating wrong links on >>next from admin_index.

2007-10-24 Thread Joel Stein

You're not the only one:

http://groups.google.com/group/cake-php/browse_thread/thread/351cfba568f05fe1
https://trac.cakephp.org/ticket/3440


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: build-in acl - performance/efficiency

2007-10-24 Thread Bunter

Hi Jon,
sure all users belonging to groups.
But the thing is that every user, besides there group rights, have
edit rights on there own posts and there own userdata. That point will
fill up the acl tabels.

The question i have is: is this still the solution to go for a basic
rights app with all this overhead. How quick is cake in handeling
millions of acl entries and so on?

An other think is: what I'm I doing if i like to add to the running
system a new function edit2 that also just is accessible for the user
who is the author. Do I have to generate than all aco/aro/acl entries
for all allready existing post-documents in the system?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: build-in acl - performance/efficiency

2007-10-24 Thread Jon Bennett

> Hi everybody, we are going to rebuild a big side in cake and like to
> have some opinion on the efficiency of the acl component.
>
> Let's say we have a forum with 10.000 users and 100.000 posts.
> Everybody have to be logged in to read something.
>
> Like I understand the cake acl concept, you can grand everybody read
> access to the posts and the other user data with a few aco/aro/acl
> entries.
> But you need for every single user one aco, one aro and one acl entry
> to allow him to edit there own user data. I'm I right?
> And then you need the same amount of aro/aco/acl to allow a single
> user to edit there own posts.
> So you end up with a couple of 100.000 ' s entries (aco/aro/acl) that
> getting searched for every time you access an function.
>
> Is this a good solution for a basic application like the forum
> example?
>
> Right now we have an own access class that grants access to groups on
> every single function.
> So we ask on every function: does you group have access here?
> Additional we ask if the user_id is equal to the author_id than he has
> also edit rights. In this case we don't need additional db queries.

you can use ACL with Groups, a quick google brings up:

http://lemoncake.wordpress.com/2007/07/19/acl-with-groups/
http://bakery.cakephp.org/articles/view/user-permissions-and-cakephp-acl

hth

jon


jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Take into account of "jet lag" for "created" when saving in DB

2007-10-24 Thread Dia

I agree, modifying the core should be reserved to very specific
situations (did it for a project)

I took the easiest way (I think) to fix it :add
ini_set('date.timezone','Europe/Paris');
in a configuration file

ok, time is not stored in GMT, not the cleanest solution, I know
but my guestbook will always be in French and for any server, this PHP
directive will always indicate the same time, so I won't have problem
even if I change of server...

it is A solution, others are possible, depends on background

thanks for your help :)


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: URL wrong

2007-10-24 Thread Frank

I suppose you're not using the build-in $html->link() of $html->url()
functions? If not, have a look at them in the manual.

On Oct 23, 8:41 pm, Daniel <[EMAIL PROTECTED]> wrote:
> On the pagehttp://127.0.0.1/cake/users/registerI have a button
> register but this goes tohttp://127.0.0.1/users/registerand the page
> is not found.  How do I get around this ?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



build-in acl - performance/efficiency

2007-10-24 Thread Bunter

Hi everybody, we are going to rebuild a big side in cake and like to
have some opinion on the efficiency of the acl component.

Let's say we have a forum with 10.000 users and 100.000 posts.
Everybody have to be logged in to read something.

Like I understand the cake acl concept, you can grand everybody read
access to the posts and the other user data with a few aco/aro/acl
entries.
But you need for every single user one aco, one aro and one acl entry
to allow him to edit there own user data. I'm I right?
And then you need the same amount of aro/aco/acl to allow a single
user to edit there own posts.
So you end up with a couple of 100.000 ' s entries (aco/aro/acl) that
getting searched for every time you access an function.

Is this a good solution for a basic application like the forum
example?

Right now we have an own access class that grants access to groups on
every single function.
So we ask on every function: does you group have access here?
Additional we ask if the user_id is equal to the author_id than he has
also edit rights. In this case we don't need additional db queries.

Is the cake acl component meant to be used in such a example? Or is my
cake acl setup wrong?

Thank you for your opinion


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Empty page response

2007-10-24 Thread [EMAIL PROTECTED]

Hi,
I recently installed cakephp 1.2.0.5875-pre-beta on my server.

After install, when I go to the cake link, a blank page is returned.
I have used cake 1.1 and 1.2 alpha for several months without any such
problems.
This happens with/without any change in database and core
configuration changes.

I have followed the steps as per the 1.2 manual.

So why do we get a blank response, and not any error etc.
Also, the server logs do not indicate any error.
Someone please help. The server details are as below:

Apache version  1.3.39 (Unix)  Linux
PHP version  5.2.4
MySQL version  4.1.22-standard
The domain points to the app/webroot folder
The .htaccess file has not been modified from its initial value.
It is a fresh install, no new file has been added.

TIA,
Rex


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: More HABTM : Adding another model to the filtered findAll()

2007-10-24 Thread dardosordi

Maybe it's just easier to make your query.

On Oct 23, 12:20 pm, Bob Mattax <[EMAIL PROTECTED]> wrote:
> So, I've continued reading, and to say that I've read "all" the
> threads on this topic would be a lie, but I'm trying.  Any help would
> still be appreciated.
>
> On Oct 22, 8:27 am, Bob Mattax <[EMAIL PROTECTED]> wrote:
>
> > I've looked through and tried all of the HABTM filtering discussions,
> > and have tried to adapt them to my needs, but I just can't seem to get
> > it to work.  Here is the basic set of relationships that I'm trying to
> > find results for:
>
> > Units -> Buildings -> HABTM <- Campuses
>
> > I'm working on making a small rental property application, and I want
> > to be able to find the units with certain specs that match certain
> > criteria for the unit, but also exist within a certain campus.  I've
> > tried binding models on the fly, but I'm not getting very far.  The
> > queries displayed in my debugging always come short of including all
> > the joins I would have expected.
>
> > Any help would be appreciated.
>
> > Thanks,
> > Bob


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Take into account of "jet lag" for "created" when saving in DB

2007-10-24 Thread Beowolf

Ah, I hadn't realised it's the automagic 'created' field.

The save() function in cake/libs/model/model_phpx.php  uses date() to
add the created and modified fields.

Changing these to gmtdate() would do the trick. However, I'm not sure
what the best practice method of doing this is.

1) You could change them in that file, but that will lead to problems
maintaining and upgrading cake.
2) I think you can copy that whole save() function into cake/app/
app_model.php and then change those lines.  This will override the
core save() function without changing the original.
3) The third and best method is a super clever way that's beyond me.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Building a forum plug-in

2007-10-24 Thread cakeFreak

Hey guys,

i need a simple forum plugin as well.

If you are up for it we can build a small team, open a project on
CakeForge, and manage ourself via Trac.

Let me know if you are interested.

I wouldlike to build it for 1.2.

Dan

On Oct 23, 11:34 pm, DanielMedia <[EMAIL PROTECTED]> wrote:
> I've been thinking about this also. It would be nice to just drop in a
> plugin and instantly have a forum.
>
> On my current site, we use vBulletin but it would be really cool if it
> could be done in Cake. This way other site features could be easily
> integrated into the forums and vice versa. Instead of having that
> separation.
>
> Like someone mentioned in another post, it would probably be easy to
> create the basic forum itself. The real work would come when building
> the backend for admins to moderate and manage the forums.
>
> I think there's already a project open for a Cake-based forum on
> CakeForge but still no release to date. Good luck writing your plugin,
> that would definitely be something that I'm sure a lot of people could
> use.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Take into account of "jet lag" for "created" when saving in DB

2007-10-24 Thread Dia

thanks for your answers

@ Erich Jansen

ok, I'll try it

@ Beowolf

yeah it's a good idea, I agree with your point of view
but the problem is still the same : as the "created" field is
automatically filled in by CakePHP, how can I indicate it to use GMT ?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to REST in new CakePHP1.2

2007-10-24 Thread dizz

I am also interested on seeing how this is done. I have figured it out
somewhat but still need direction on how to pass the method/type (such
as delete) through a link similar to how RoR does it.

-Andrew

On Oct 24, 1:23 pm, "a.php.programmer" <[EMAIL PROTECTED]>
wrote:
> in new CakePHP1.2, I find Router::mapResources('Posts'); it is good
> for REST.
>
> but I don't know how to take a PUT, DELETE method in form,
>
> in FormHelper and HtmlHelper, I don't find useable funcitons.
>
> how?


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Take into account of "jet lag" for "created" when saving in DB

2007-10-24 Thread Beowolf

Alternatively, store the time in GMT and change it to French when it's
displayed.

Adding a fixed 9 hours will give you problems is the server changes
location, or when daylight saving time changes.  It's a pretty safe
bet that it doesn't change at the same time in both places.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Take into account of "jet lag" for "created" when saving in DB

2007-10-24 Thread Erich Jansen

Dia,

You can try adding either:
setenv TZ Europe/Paris
or
setenv TZ=CET

to your .htaccess files (I won't promise that it will work though)
Or you are going to have to just pass the timestamp to
strtotime("+9 hours");
when you add the comment to the database. 

Erich Jansen
[EMAIL PROTECTED]
On Wed, 2007-10-24 at 07:57 +, Dia wrote:
> hi
> 
> my website (+ guestbook) is on a west-coast USA server (DreamHost) and
> I'm French
> when someone posts a new comment on the guestbook, the "created" field
> takes the west-coast USA time
> to resolve this problem, I could just add 9h in a "beforeFilter"
> method, before diplaying the datas
> but I would prefer to have a DB with French time recorded
> 
> so I would like to know if it is possible to add a jet lag to the
> "created" field when a post is added
> 
> 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



pagination (1.2) creating wrong links on >>next from admin_index.

2007-10-24 Thread edward

I activated Configure::write('Routing.admin', 'admin'); in my core.php
file.

I have set up an admin_index.ctp view under a controller called
wolistings . (wonenlistings originally, it is dutch for apartment or
houselistings).
I access the view from here: /admin/wolistings and it works fine.
Pagination is working.

However, the next (>>next) link produces this: .xxx/admin/
wolistings/admin_index/page:2/limit:4 . And that ofcourse, doesn't
work, because the admin_index action is inserted into the url. I found
that this does work: http://limburgmarkt/admin/wolistings?page=2&limit=4
. That takes me to the second page and I get the rest of the results.
However, that link is not the one being generated automatically.

So how can I fix this? I can't figure out how to create the >>next
link properly.

This is what I have in the admin_index view for the >>next link: echo
$paginator->next('next >>', null, null, array('class'=>'disabled'));

I've also tried other varieties from other posts from this group like:
array('url' => $this->params['pass'] , into the second parameter. But
nothing works.

Is this because I'm using admin routes? Should I not use them? Or is
this fixable? 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Session problem in app_controller

2007-10-24 Thread [EMAIL PROTECTED]

I'm using cake 1.1.17, and am following the Simple User Authentication
example from the manual (http://manual.cakephp.org/appendix/
simple_user_auth), and I get the following error when I write the
checkSession function in the app_controller.php file:

Notice: Undefined property: PagesController::$Session in /var/www/
cakestuff/clientes/app/app_controller.php on line 19

Fatal error: Call to a member function check() on a non-object in /var/
www/cakestuff/clientes/app/app_controller.php on line 19

Anyone know what I'm doing wrong?? I've google and asked on IRC, but
nothing.

Thanks
dave


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: saveField breaks in new 1.2 release

2007-10-24 Thread LW

Well, I don't doubt that saveFields works in 1.2
I just don't get why it's not working in my code after the update and
i thought maybe something changed in the way saveField is used or
something like that. I'd appreciate any help on this, what code do you
need to see?

Maybe the response i get might help:


1 query took 0 ms

NrQueryErrorAffectedNum.
rowsTook (ms)


1SELECT COUNT(*) AS `count` FROM `images` AS
`Image`   WHERE `Image`.`id`  =  134 110



thanks,
Lutz


On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> I suggest you post your code, since Model has an awesome test coverage: in
> cake/tests/cases/libs/model/model.test.php you can see for example the
> function testSaveField() which tests for saveField() calls, and all tests
> are succeeding. Therefore saveField() IS WORKING on 1.2.
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de LW
> Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m.
> Para: Cake PHP
> Asunto: Re: saveField breaks in new 1.2 release
>
> Doesn't work means the db-records are not updated, the saveField data
> is not saved. it doesn't give me an error message or any entry in the
> cake debug log though.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Limiting Records

2007-10-24 Thread John Messingham

Hi,

I am developing a small applicaton and need to limit records displayed/
edited/deleted to just ones owned by a logged in user.

I have the user id set in a session and wondered if there was a way to
limit the records via the models. Each table has a field holding the
user id.


Many Thanks
John Messingham
http://www.jmds.co.uk


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Security Component HTTP digest authentication

2007-10-24 Thread jcsiegrist

Ok thanks! I thought I could use it so I don't have the password
stored in plain text. I guess it just protects the password in
transit.

On a shared host I don't like to store the passwords in plain text.
I'll just switch to auth or so...

:jc

On Oct 23, 3:00 pm, nate <[EMAIL PROTECTED]> wrote:
> You actually have to give it the password in plaintext as well in
> order for it to generate the necessary hash data.
>
> On Oct 23, 1:57 am, jcsiegrist <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
>
> > I'm trying to use the Security HTTP authentication features. While I
> > can get basic authentication to work, I just can't get digest to work.
> > I'm using 1.2r5879.
>
> > I use this call to the Security component in the beforeFilter of my
> > AppController
>
> > $this->Security->requireLogin('*', array('users' => array('admin' =>
> > 'bb5fd3344ae62a91d6aee3947fca'), 'type'=>'digest',
> > 'realm'=>'admin'));
>
> > I've tried also md5 hashing the username, but that didn't make any
> > difference. I'm guessing that I need to be doing something different
> > to my stored hash of the password and/or username. Can someone point
> > me in the right direction? Thank You.
>
> > :jc


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Take into account of "jet lag" for "created" when saving in DB

2007-10-24 Thread Dia

hi

my website (+ guestbook) is on a west-coast USA server (DreamHost) and
I'm French
when someone posts a new comment on the guestbook, the "created" field
takes the west-coast USA time
to resolve this problem, I could just add 9h in a "beforeFilter"
method, before diplaying the datas
but I would prefer to have a DB with French time recorded

so I would like to know if it is possible to add a jet lag to the
"created" field when a post is added

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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---