Re: How to pass an array trough URL??

2010-03-29 Thread toka...@gmail.com
I am developing a simple public API where I need receive an array of data from other website. is there better way? no difficult to implement? Thanks Tomas On 29 bře, 19:02, Miles J wrote: > Is there a reason your passing data like this through URLs? What are > you trying to achieve? > > On Mar

Re: $useDbConfig not working

2010-03-29 Thread John Andersen
Please show the code where you are setting the $useDbConfig, and what is the name of the file in which you are doing it! Enjoy, John On Mar 30, 8:31 am, mattmemo wrote: > Hello, > I would like to have two different database configurations.  For my > Projects controller, I would like to use $de

Re: find() using multiple references to the same table

2010-03-29 Thread John Andersen
I recomend you to take a look at the CakePHP book at: http://book.cakephp.org/view/872/Joining-tables which will help you to implement my modified version of the SQL statement. Take a look, and show us your solution or any issues you may then have. Enjoy, John On Mar 30, 3:09 am, Ryan wrote: >

How can Schema Shell create new tables?

2010-03-29 Thread Martin Westin
Hi, "cake schema run update -f" always creates an ALTER TABLE statement. So how about when a new table is in the schema? I see the code really in DboMysqlBase::alterSchema() for my dbo but the same logic was found in the Postgres class. Since I am quite sure the Schema Shell would not have been re

Multi-page Surveys

2010-03-29 Thread Jeff Winifred
I'm trying to create a multi-page survey, and kind of unsure which route or direction to go, can someone point me in the right direction? Here is what I'm looking for: ** 2 types of questions, single choice and multiple choice. ** 1 question, per-page. ** It would be really nice if there was a way

URLs redirecting to /app/webroot/

2010-03-29 Thread Nat Titman
Hi, Our CakePHP 1.2 application has vBulletin forums installed in the directory $cake_base_dir/app/webroot/forums/ Most of the time this works correctly serving up standard vbseo URLs such as http://www.example.com/forums/general-discussion/ but we're intermittently seeing URLs under /forums

$useDbConfig not working

2010-03-29 Thread mattmemo
Hello, I would like to have two different database configurations. For my Projects controller, I would like to use $default, and for my Employees controller, I would like to use $server4. In my model Employee.php, I set var $useDbConfig = 'server4'; no matter what I do, I can't get these two to w

Re: Initial loading of Cake problem: Trying to get property of non-object in ...

2010-03-29 Thread Santa
What does installing WampServer 2 or Xampp have to do with it? I am getting the same thing on my 64-bit Fedora Core 12 install. The webserver is serving other pages just fine. But for some reason, cake is having some trouble. Anyone else got any better ideas? On Mar 10, 3:04 am, WebbedIT wrote: >

Re: Auth Redirect Issues

2010-03-29 Thread cricket
in AppController: $this->Auth->logoutRedirect = array('controller' => ..., 'action' => ...)); On Mar 29, 6:36 pm, "Alan Asher" wrote: > Please read carefully, My issue is not with the default behavior of when a > person is not logged in and tries to reach a page that is auth protected.   > > I am

Re: find() using multiple references to the same table

2010-03-29 Thread Ryan
Thanks for the reply. I'm sure I can make it work with an SQL query, but I'm new to Cake and I'm trying to work within the system :) Is there a way to make this complex a query work with conditions on find(), paginate(), etc, or will I need to resort to writing custom queries? ~Ryan On Mar 29,

Auth Redirect Issues

2010-03-29 Thread Alan Asher
Please read carefully, My issue is not with the default behavior of when a person is not logged in and tries to reach a page that is auth protected. I am having an issue because after the person hits logout I think that the auth component should forget the page I was just on, so when I log in

Re: CakePHP 1.3.0-RC3 unleashed

2010-03-29 Thread jacmoe
Congratulations! :) You have come a long way since the early 1.3 pre-releases. I tried upgrading my app to it some time ago, and nothing worked the way it should. Now, everything works, even the things which I never could have gotten to work using Cake 1.2 :D Great stuff. Now all we need is lots

Re: open cake projects

2010-03-29 Thread jacmoe
You could do a 'cakephp' search on GitHub, perhaps. But, Jeremy is right: The best way is to have a clear idea of what you want to make, and then search the net for the many how's. Fortunately, lots of people blog about CakePHP, so tricks of the trade is easy to come by. :) Jacob On Mar 29, 3:10 

Re: Page Model and TreeBehavior Issue

2010-03-29 Thread Andrew
After bugging the guys on IRC and not figuring anything out, I decided to try refreshing my cake directory with the latest in the 1.2.6 branch and that seemed to fix the issue. Sorry, guys. On Mar 29, 4:40 pm, AD7six wrote: > On Mar 29, 10:18 pm, Andrew wrote: > > > > > > > I use getpath() to bu

Re: Page Model and TreeBehavior Issue

2010-03-29 Thread AD7six
On Mar 29, 10:18 pm, Andrew wrote: > I use getpath() to build my breadcrumbs too, but it will get the wrong > path sometimes, like this: > > Array > ( >     [0] => Array >         ( >             [Page] => Array >                 ( >                     [id] => 821 >                 ) > >      

Re: Page Model and TreeBehavior Issue

2010-03-29 Thread Andrew
I use getpath() to build my breadcrumbs too, but it will get the wrong path sometimes, like this: Array ( [0] => Array ( [Page] => Array ( [id] => 821 ) [_explicitType] => Page ) [1] => Array

Re: DataTables, cakePHP, and Pagination through Ajax

2010-03-29 Thread Martin
Jeremy, thanks for your response. I previously used the cakePHP PaginatorHelper, and even have been able to get client side DataTables fully working. The issue, is I have over a million rows in my table, and all processing must be done on the server-side. Plus of course, I use JQuery (vs Prototype)

Re: Broken search on http://book.cakephp.org/

2010-03-29 Thread Martin
Fixed! Thanks guys!! On Mar 25, 2:25 pm, Martin wrote: > Have others noticed that the search option onhttp://book.cakephp.org/ > is broken? It no longer returns snippets of text with the search > results, just basic and repeating titles. > > Martin Check out the new CakePHP Questions site http:/

Re: find() using multiple references to the same table

2010-03-29 Thread John Andersen
You have to use the table alias for the schools table! So your joins become this: SELECT * FROM applications AS Application JOIN schools AS AppliedToSchool ON (Application.school_id = AppliedToSchool.id) JOIN students AS Student ON (Application.student_id = Student.id) JOIN schools AS FromSchool O

Re: How to pass an array trough URL??

2010-03-29 Thread Miles J
Is there a reason your passing data like this through URLs? What are you trying to achieve? On Mar 29, 9:04 am, "toka...@gmail.com" wrote: > I have solved it. pretty simple. > > examples.com/:controller/:action/? > names[]=John&names[]=Tomas&names[]=Susan > > then just call > $this->params['url']

Re: Page Model and TreeBehavior Issue

2010-03-29 Thread Jon Bennett
> I've got a Pages model that I'm using the TreeBehavior for a > hierarchy. I'm having issues, though, with the breadcrumbs coming > through incorrectly. It seems that every time I call verify(), I get > this sort of result: > >    [0] => Array >        ( >            [0] => node >            [1] =

Re: Newbie question for "best practice" on how to combine CakePHP with a (given) design

2010-03-29 Thread cricket
To add to Jeremy's comments, In your menu elements, you can refer to the present location with $this->here, so you can have logic for showing/hiding submenus, etc. and avoid having to create separate layouts for each menu situation. For my login_prompt element, I check if the user is already logg

Re: How to pass an array trough URL??

2010-03-29 Thread toka...@gmail.com
I have solved it. pretty simple. examples.com/:controller/:action/? names[]=John&names[]=Tomas&names[]=Susan then just call $this->params['url'] to get your array 'names'. PS: you can also do nested arrays like names[0] [email]=j...@example.com&names[1][email]=. Tomas On 29 bře, 11:59, "t

Page Model and TreeBehavior Issue

2010-03-29 Thread Andrew
I've got a Pages model that I'm using the TreeBehavior for a hierarchy. I'm having issues, though, with the breadcrumbs coming through incorrectly. It seems that every time I call verify(), I get this sort of result: [0] => Array ( [0] => node [1] => 827

Re: Newbie question for "best practice" on how to combine CakePHP with a (given) design

2010-03-29 Thread Jeremy Burns
Looks like a combination of layouts and elements. Don't forget you can create as many layouts as you want, and specify which one to use in your controller - either inside beforeFilter (so that it applies to all functions in the controller) or inside a controller function (which will override all

Themed Smarty View

2010-03-29 Thread balc...@gmail.com
Hi folks, I use Smarty View, but want to benefit from theme options. Since for theming cake use Theme View, I cant use both Smarty and Theme at the same time. Perhaps can combine the code but am not that familar with View eingine core. Already have a lot view done with smarty and do not want to r

Newbie question for "best practice" on how to combine CakePHP with a (given) design

2010-03-29 Thread janitor048
Hi there, I'm pretty new to CakePHP (and MVC in general for that matter) and I'm just working through the docs etc. And since the cookbook is quite informative, I think I've got a pretty good idea of what CakePHP could do for me by now. However, I would like to ask a question on best or common pr

Re: Blank page when CakePHP is uploaded to the server

2010-03-29 Thread Jeremy Burns
How about creating a really simple app with one model/controller and no security, auth, acl, routing or anything? Just see if a vanilla app works. That might help work out if it is infrastructure or code. Jeremy Burns jeremybu...@me.com On 29 Mar 2010, at 15:47, WhyNotSmile wrote: > Thanks J

Re: Blank page when CakePHP is uploaded to the server

2010-03-29 Thread WhyNotSmile
Thanks John, I tried bypassing mod_rewrite in the way you suggested, but it didn't work either. Cricket, the error log hasn't been updated since 14th March, which was before all this started. I have debug at the highest level. Jeremy, I've been caught out by that before, but checked and all is f

Re: saveAll rolling back my transactions

2010-03-29 Thread Lucca Mordente
you can't use transactions with myisam tables. change it to innoDB (or another), in which this support is present On Mar 29, 9:34 am, Ernesto wrote: > myISAM. > > i'll check OrderControllers validation errors > > On 26 Mar, 16:18, Lucca Mordente wrote: > > > > > Maybe your database table engine

Re: help me with some logic

2010-03-29 Thread Jeremy Burns
Create a form on your posts view. Include a hidden field with the value of the post id (echo $this->Form->hidden('post_id', array('value' => $this->data('Post.id')); ). When the form is submitted (by clicking the submit button inside the form) you should find the Comment.post_id field is populat

help me with some logic

2010-03-29 Thread dole.doug
I have two classes: Post and Comment. I wish to have the comment form on each post and if somebody press the submit button of a comment, that comment to be subscribed to that post. How can i do that? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP r

Re: open cake projects

2010-03-29 Thread Jeremy Burns
In my opinion you are best off creating your own problem then developing a solution for it. At least, that's how I learn. Jeremy Burns jeremybu...@me.com On 29 Mar 2010, at 14:10, dole.doug wrote: > Hi there > > I;m on the learning stage of CakePHP. I've passed the blog totorial > and i think

open cake projects

2010-03-29 Thread dole.doug
Hi there I;m on the learning stage of CakePHP. I've passed the blog totorial and i think the acl totorial is too advanced for me. Does anyone know where can i find some cakePHP based projects to analyze and learn from? Check out the new CakePHP Questions site http://cakeqs.org and help others wi

Re: saveAll rolling back my transactions

2010-03-29 Thread Ernesto
myISAM. i'll check OrderControllers validation errors On 26 Mar, 16:18, Lucca Mordente wrote: > Maybe your database table engine does not support transactions. > What engine are you using? > > Lucca Mordente > > On 26 mar, 09:28, Ernesto wrote: > > > > > Hello. > > > i have 2 models (Item and O

Re: CAKE + FLASH + XML + IMAGES

2010-03-29 Thread Sam Sherlock
Have a look at the base param of your flash object or which will set the base to an absolute path to your cake webroot depending on where your images are (and your xml too) I assume webroot/ xml/ img/ swf/ so you load xml/gallery.xml with img/gallery01/*.jpg, img/gallery02/*.jpg of

Complex(ish) find query results in the server dropping the question

2010-03-29 Thread Gideon
Hi all, I've been trying to get a relatively complex find query to work (I'll post it below) but when I am trying to test it (in both methods) I get "Server unexpectedly dropped the connection". There is nothing in the cake error logs. The only thing I get from apache is something like "[notice] c

Re: My new site freshly baked!

2010-03-29 Thread Christian Leskowsky
Looks great. How did you find working with CakePhp? Easy, frustrating, fun...? :-] On Sat, Mar 27, 2010 at 10:10 AM, drpark wrote: > Just Baked! http://www.attractionland.com (the french version is more > complete), thanks for your comments... > > Check out the new CakePHP Questions site http://c

Re: CakePHP 1.3.0-RC3 unleashed

2010-03-29 Thread Christian Leskowsky
Congrats Mark!! On Mon, Mar 29, 2010 at 3:40 AM, Jon Bennett wrote: > > The CakePHP development team is happy to announce the release the > > CakePHP 1.3.0-RC3. This release is the second last release candidate > > for 1.3.0. Since 1.3.0-RC2 was released 2 weeks ago there have been > > over 80 c

CAKE + FLASH + XML + IMAGES

2010-03-29 Thread lacenaepro...@gmail.com
HI, I have a workingswf gallery file that dynamically displays images read from an xml file. When I put all the gallery stuff in the cake environment, it doesn't work. The flash swf is detected, but it does not display images. How can I adjust the paths in the action script and in the xml file t

How to pass an array trough URL??

2010-03-29 Thread toka...@gmail.com
Hi, is there a chance to pass simple array via URL? http://example.com/name:John/name:Tom/name:Susan Then I should recieve back my array of names array('John', 'Tom', 'Susan'); Any idea how the URL should look like? Thanks Tomas Check out the new CakePHP Questions site http://cakeqs.

Re: Undefined index

2010-03-29 Thread WebbedIT
I will set up a test case for a user form and observe field when I get the chance as I'm sure it should work. Will get back to you with my findings. And to strongly second something Jeremy touched on, if using cake simply go with the conventions as much as possible, they make life so much easier.

Re: having trouble understanding associations

2010-03-29 Thread Gianluca
Johnny, if you need any help, just drop me a line and I'll try to get back to you asap. Cheers, Gian. On 26 Mar, 21:44, Johnny Ferguson wrote: > It's a little difficult to wrap my head around, but I think I see > what's going on. > > belongsTo is a many to one relation, so many PracticeInstanc

Re: form helper ESCAPING quotes character values?? a bug?

2010-03-29 Thread toka...@gmail.com
Hi, actually it is not $html->link() but $form->input() echo $form->input('ERItem.value', array('type'=>$type, 'options' => $ERItemsOptions, 'div' => false,

Re: CakePHP 1.3.0-RC3 unleashed

2010-03-29 Thread Jon Bennett
> The CakePHP development team is happy to announce the release the > CakePHP 1.3.0-RC3. This release is the second last release candidate > for 1.3.0. Since 1.3.0-RC2 was released 2 weeks ago there have been > over 80 commits and 35 tickets fixed. The plan is to have one more > release candidate,

Re: DataTables, cakePHP, and Pagination through Ajax

2010-03-29 Thread Jeremy Burns
Ajax pagination is quite simple - here's a good link using MooTools (I do exactly the same but using JQuery). Also, see the guide. Then look at the pagination section of the book, which spells out the pagination options (such as the footer text you refer to). Jeremy Burns jeremybu...@me.com On