Does cakephp support transaction now?

2007-07-08 Thread hi and hello
In my application I sometimes have more than one database actions in an action, but when read the cakephp's docs I found little about this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post

Re: Binding my assocation on the fly to sort through a HABTM relationship...

2007-07-08 Thread francky06l
Well I did not have time to think much about the query, but maybe the bindModel could look like this : $this-Story-bindModel( array( 'hasAndBelongsToMany' = array( 'className'='Tag', 'finderQuery' = SELECT .

Re: UserDir Installation

2007-07-08 Thread francky06l
Maybe the ~ character is screwing up the rewriting. Why not RewriteBase /ssharkey ? On Jul 8, 12:17 am, Scott Sharkey [EMAIL PROTECTED] wrote: Hi All, I'm trying a top-level installation into an apache UserDir. I've read the documentation, which says to put a RewriteBase directive in the

Re: Quick admin routes question

2007-07-08 Thread Hellbot
Router::connect('/admin/', array(CAKE_ADMIN = true, 'controller' = 'photos', 'action' = 'index')); 2007/7/8, [EMAIL PROTECTED] [EMAIL PROTECTED]: I need to route '/admin' to '/admin/photos/index' in my routes table. Is this possible? I'm using CakePHP admin routes.

Re: cake, Ajax, and jquery

2007-07-08 Thread sTb
First of all,please google or use the search funktion for you question in the futur! And please read the fucking manual! ( http://manual.cakephp.org/chapter/controllers ) Read: http://groups.google.com/group/cakephp-de/browse_thread/thread/b1416e1a146ba5d7 We love to help you BUT not to write

Re: ACL

2007-07-08 Thread sTb
Thanks but http://bakery.cakephp.org/articles/view/real-world-access-control is for 1.1 and i wrote i am on 1.2 but for beginners a very good article which explains the acl logic! I already figured it out how to do it! $aro = $this-Acl-Aro;

Re: Does cakephp support transaction now?

2007-07-08 Thread sTb
Read the fucking manuall! if you want to use more models in your application read http://manual.cakephp.org/chapter/models On 8 Jul., 11:29, hi and hello [EMAIL PROTECTED] wrote: In my application I sometimes have more than one database actions in an action, but when read the cakephp's docs I

Strange url's

2007-07-08 Thread cakedude
Hi there, I was hoping someone can help me with this. I've developed a nice cake-based website which works just fine locally. However when i publish put the website online i get some really strange url's: www.mywebsite.com/chapters/view/1?CAKEPHP= For most of the site this is no problem

Re: Does cakephp support transaction now?

2007-07-08 Thread Feris Thia
On 7/8/07, sTb [EMAIL PROTECTED] wrote: Read the fucking manuall! Wow what a word ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: UserDir Installation

2007-07-08 Thread Scott Sharkey
The ~ is unix notation for home directory of, ie, in this case, home directory of ssharkey. It's standard notation for user_dir installations. In other words, the ~ is what clue's Apache to go look up that user's home directory (whereever it is) and then look in a specified directory

Re: Does cakephp support transaction now?

2007-07-08 Thread Gonzalo Servat
On 7/8/07, sTb [EMAIL PROTECTED] wrote: Read the fucking manuall! if you want to use more models in your application read http://manual.cakephp.org/chapter/models I don't think it was the most polite way of replying to the original poster, and besides you didn't understand his question. He

save 'modified' field doesn't update

2007-07-08 Thread Contrid
Hey there, I'm executing the save() method on my model, but the 'modified' field in the database table simply doesn't update. It should update automatically, right? If so...what could be the cause of this? I'll be digging into the code shortly. Just want to hear what you have to say. Best,

Re: Cakephp generates Wrong query in PHP4?

2007-07-08 Thread M
Hello Samuel, I did it and now it works in php 4 and php 5. I posted this problem because previously, after replacing findByUserId with findByUser_Id it was giving an error like it was not finding user__id in table. However I am not capable of reproducing the problem. If it happens, I will post

Re: Cakephp generates Wrong query in PHP4?

2007-07-08 Thread M
Hello Samuel, I did it and now it works in php 4 and php 5. I posted this problem because previously, after replacing findByUserId with findByUser_Id it was giving an error like it was not finding user__id in table. However I am not capable of reproducing the problem. If it happens, I will post

Digg (Pligg) CakePHP clone?

2007-07-08 Thread red
Hi everyone! Does anybody know some simple Digg/Pligg CMS clone written in CakePHP? I need to make something simmilard, but maybe somebody knows a good base for project like this? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are

Re: Strange url's

2007-07-08 Thread Gorka
Looks like the session id going along as a GET parameter, maybe you could start checking if you have disabled cookies. On 8 jul, 14:55, cakedude [EMAIL PROTECTED] wrote: Hi there, I was hoping someone can help me with this. I've developed a nice cake-based website which works just fine

Re: Does cakephp support transaction now?

2007-07-08 Thread Larry E. Masters aka PhpNut
On 7/8/07, sTb [EMAIL PROTECTED] wrote: Read the fucking manuall! if you want to use more models in your application read http://manual.cakephp.org/chapter/models This will be the first and only warning, let it happen again and I will ban you. There is no reason to use this language in the

Re: cake, Ajax, and jquery

2007-07-08 Thread Larry E. Masters aka PhpNut
On 7/8/07, sTb [EMAIL PROTECTED] wrote: First of all,please google or use the search funktion for you question in the futur! And please read the fucking manual! ( http://manual.cakephp.org/chapter/controllers ) Goodbye... -- /** * @author Larry E. Masters * @var string $userName *

Re: Strange url's

2007-07-08 Thread Samuel DeVore
it could be that your install of php has the session.use_trans_sid setting to true, if you do not have access to the php.ini file your can try adding php_flag session.use_trans_sid Off to your .htaccess file and it should clear it up. Sam D On 7/8/07, Gorka [EMAIL PROTECTED] wrote: Looks

Undefined Variable Problem

2007-07-08 Thread r557
/ view */ div class=product form action=?php echo $html-url('/ShoppingCarts/add/'); ? method=post ?php echo $html-hidden('Product/id')? h2?php echo $product['Product']['name']?/h2 ?php echo $html-image('sundaymorning_cover.jpg', array('class' =

Re: Undefined Variable Problem

2007-07-08 Thread Larry E. Masters aka PhpNut
change: $product_id = $this-$data['Product']['id']; to: $product_id = $this-data['Product']['id']; -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On 7/8/07, r557 [EMAIL PROTECTED] wrote:

Re: Undefined Variable Problem

2007-07-08 Thread r557
AHH, can't believe i missed that!!! On Jul 8, 2:12 pm, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote: change: $product_id = $this-$data['Product']['id']; to: $product_id = $this-data['Product']['id']; -- /** * @author Larry E. Masters * @var string

Re: UserDir Installation

2007-07-08 Thread Kunthar
Then why not /home/ssharkey ? Tip: Try /cake/scripts/bake.php cake bake help Helps to set up things fast. Tip2: 1.2 version promising and highly stable, just FYI On Jul 8, 5:08 pm, Scott Sharkey [EMAIL PROTECTED] wrote: The ~ is unix notation for home directory of, ie, in this case, home

Outputting Session Data

2007-07-08 Thread r557
in my function: function show() { $this-set('products', $this-Session-read('Product')); } i take the current session data and assign it to products. in the show view, this is the code: table ?php foreach ($products as $product): ? tr td?php echo $product['id'];

RE: Does cakephp support transaction now?

2007-07-08 Thread Christian \Jippi\ Winther
Hello For CakePHP 1.2 you can use my model behavior http://bakery.cakephp.org/articles/view/transaction-behavior (Should work with most databases, though it was developed for MySQL innodb) If you do not wish to use it (Might be overkill for some people), you should be able to do just

Re: ACL

2007-07-08 Thread Chris Hartjes
On 7/8/07, sTb [EMAIL PROTECTED] wrote: Thanks but http://bakery.cakephp.org/articles/view/real-world-access-control is for 1.1 and i wrote i am on 1.2 but for beginners a very good article which explains the acl logic! Acl hasn't really changed in 1.2, so those links still apply. -- Chris

Re: SWFUpload with CakePHP 1.1.x

2007-07-08 Thread Ski
Hi, I am about to cross this bridge now. I know that Flash does not use the same session as the browser, so you have to append the session id to the post url - I expect SWFUpload lets you specify the URL to upload files to - you need to append the session id to this, then there are some

sqlite3

2007-07-08 Thread mrpete2004
Anybody using cakephp with sqlite3? If so could you please outline the steps involved in adding sqlite3 support? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: UserDir Installation

2007-07-08 Thread Scott Sharkey
Kunthar wrote: Then why not /home/ssharkey ? Guys, I appreciate the attempts to help, but the ~ssharkey syntax is dictated by Apache, and is NOT optional. That's what USERDIR means... Is there anyone out there who has made this kind of an installation and can offer some kind of

Re: ACL

2007-07-08 Thread Gustavo Carreno
On 7/8/07, Chris Hartjes [EMAIL PROTECTED] wrote: Acl hasn't really changed in 1.2, so those links still apply. I beg do differ. The Tree Behavior has been introduced in ACL in 1.2 this makes it very much different. I myself tried to use the Real world access control article in 1.2 and it did

Autocomplete options in 1.2 messes up my field.

2007-07-08 Thread Jim Newfer
Hey, Well I have been using an autocomplete field for quite some time and everything has worked fine. Although I just tried to add this onto the end 'afterUpdateElement' = 'getSelectionId') ?php echo $ajax-autocomplete('User.school_id', '/users/ autocomplete', array('afterUpdateElement' =

Re: ACL

2007-07-08 Thread Geoff Ford
In 1.2 there is an AclBehavior, which I use to create Group Access. It is very simple to use. I am in the process of making a User Management Plugin for 1.2 which I am very nearly finished. However the basics of Acl in 1.2 have not changed. To use the behaviour it is as simple as using var

Re: SWFUpload with CakePHP 1.1.x

2007-07-08 Thread NicoE
I tried hacking the Cake core but then I found that it´s not necessary. I solved it adding the line $this-Session-del('Config'). I found the info @ http://www.pagebakers.nl/2006/12/19/swfupload-part-ii Thanks anyway. On 8 jul, 16:49, Ski [EMAIL PROTECTED] wrote: Hi, I am about to cross this

Re: Outputting Session Data

2007-07-08 Thread Geoff Ford
Because the print_r should be generating Array ([0] = Array([id] not just Array([id] Basically you only have one product in the session not multiple products, so when you go to do the loop, you are actually looping over the product details. Geoff -- http://lemoncake.wordpress.com On Jul 9,

Re: ACL

2007-07-08 Thread Langdon Stevenson
Hi Geoff I am looking forward to seeing your article. Regards, Langdon snip You can also do the same for user level access on your user model. As i said, I will be posting an article on this soon, along with how to use the Auth component, both of which I rely on in my Users plugin, which

Re: Outputting Session Data

2007-07-08 Thread DanielMedia
It seems that you only have one product object in session and you're looping through it as if there were many product objects in session. Thats why you're getting the weird results like U', B, N', etc. Its turning the words into an array and printing the first letter. Try this: function show() {

Re: ACL

2007-07-08 Thread Geoff Ford
@Langdon It might be a few days yet, I've got payed work that tends to get in the way :). I will also see if I can get it submitted to the Bakery as it has better support for code listings than my freebie wordpress account. Geoff -- http://lemoncake.wordpress.com On Jul 9, 9:33 am, Langdon

Re: ACL

2007-07-08 Thread Langdon Stevenson
Hi Geoff It might be a few days yet, I've got payed work that tends to get in the way :). I know the feeling :-) No hurry here, just interested to get a feel for the improvements to ACL and Cake in 1.2 I use ACL heavily at the moment in 1.1.x apps so am looking for good reasons to

Re: save 'modified' field doesn't update

2007-07-08 Thread wralph
Have you turned on debugging and checked what the generated SQL looks like, does it have the correct value? If not, then print out what data array before the save and check that its set. Failing that, post your code here. Winston --~--~-~--~~~---~--~~ You

Re: Struggling with creating a function and search an array then outputting data based upon results...

2007-07-08 Thread wralph
You could write a component for checking if the user_id is contained in the data array. So something like: ?php class VoteInfoComponent extends Object { function userVoted($data, $userid) { if (is_array($data) ) { foreach($data as $story) {

Re: cake, Ajax, and jquery

2007-07-08 Thread Larry E. Masters aka PhpNut
Excuse me? I was responding to someone who was being ignorant to you. This was the second post I have read from this user who used the type of language he did in this post. That user was in no way affiliated with the project other than being a user like yourself. The goodbye was because I banned

Re: Quick admin routes question

2007-07-08 Thread wilson
Gracias hellbot. W On Jul 8, 7:17 am, Hellbot [EMAIL PROTECTED] wrote: Router::connect('/admin/', array(CAKE_ADMIN = true, 'controller' = 'photos', 'action' = 'index')); 2007/7/8, [EMAIL PROTECTED] [EMAIL PROTECTED]: I need to route '/admin' to '/admin/photos/index' in my routes table.

Re: Quick admin routes question

2007-07-08 Thread wilson
Hmmm. Actually I couldn't get this to work for me. Perhaps, it's because I'm on 1.2x. Anyone else got a way they do this? I'll dig in the source a bit. Thanks, Wilson On Jul 8, 7:17 am, Hellbot [EMAIL PROTECTED] wrote: Router::connect('/admin/', array(CAKE_ADMIN = true, 'controller' =

Re: Struggling with creating a function and search an array then outputting data based upon results...

2007-07-08 Thread inVINCable
Hey mate! Thanks for your help but I solved the problem a couple of hours ago. What I did was first get the items, then I simply extracted the data, in this case the votes, from those items, then after that I set a variable to the funciton in_array. Then depending on the outcome of that the css

Re: Quick admin routes question

2007-07-08 Thread wilson
Ah, got it! Router::connect('/admin', array('controller'='photos','action'='index', CAKE_ADMIN = CAKE_ADMIN)); On 8 Jul, 21:30, wilson [EMAIL PROTECTED] wrote: Hmmm. Actually I couldn't get this to work for me. Perhaps, it's because I'm on 1.2x. Anyone else got a way they do this? I'll

one to one (controller to model) ?

2007-07-08 Thread Feris Thia
Hi There, Is a controller need to map one to one with a model ? Can I create a controller with no associated model ? Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: one to one (controller to model) ?

2007-07-08 Thread Gustavo Carreno
On 7/9/07, Feris Thia [EMAIL PROTECTED] wrote: Hi There, Is a controller need to map one to one with a model ? Can I create a controller with no associated model ? Yes you can. Just add var $uses = null; to your controller vars. Cheers, Gustavo Carreno --- If you know Red Hat you know Red

Re: one to one (controller to model) ?

2007-07-08 Thread Feris Thia
On 7/9/07, Gustavo Carreno [EMAIL PROTECTED] wrote: On 7/9/07, Feris Thia [EMAIL PROTECTED] wrote: Hi There, Is a controller need to map one to one with a model ? Can I create a controller with no associated model ? Yes you can. Just add var $uses = null; to your controller vars.

Re: one to one (controller to model) ?

2007-07-08 Thread Gustavo Carreno
On 7/9/07, Feris Thia [EMAIL PROTECTED] wrote: Ah great... thank you Gustavo ! You're welcome. But next time I'll wave the RTFM sign at you :) Cheers, Gustavo Carreno --- If you know Red Hat you know Red Hat, If you know Slackware you know Linux

Re: one to one (controller to model) ?

2007-07-08 Thread Feris Thia
On 7/9/07, Gustavo Carreno [EMAIL PROTECTED] wrote: On 7/9/07, Feris Thia [EMAIL PROTECTED] wrote: Ah great... thank you Gustavo ! You're welcome. But next time I'll wave the RTFM sign at you :) Ah that words. Ok, next time only if the manual doesn't have any solution then I'll