Re: $session->flash(); issue

2010-06-02 Thread Jeremy Burns
You din't need to do that. Just do $session->flash(); - if there is a message set, it will display, else it won't. Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 07:40, Zahidur Rahman wrote: > Hi experts > I am facing a problem for showing flash message in my view file. > If any message is

$session->flash(); issue

2010-06-02 Thread Zahidur Rahman
Hi experts I am facing a problem for showing flash message in my view file. If any message is not found then in my view file i found array() I am using the following code in my view file : if ($session->check('Message.flash')) { $session->flash(); } Output : array() If no message set for

Re: One to Many question

2010-06-02 Thread Roland Pish
Ok, got it. I'll go for this containable behaviour right now. Thanks for you replies guys. Regards On 2 jun, 23:03, Roland Pish wrote: > Thanks Graham! > > So, this conditions array is mandatory in find method right? > > Regards > > On 2 jun, 23:01, Roland Pish wrote: > > > Thanks for your re

Re: One to Many question

2010-06-02 Thread Roland Pish
Thanks Graham! So, this conditions array is mandatory in find method right? Regards On 2 jun, 23:01, Roland Pish wrote: > Thanks for your reply Jeremy. > > I was avoiding the conditions array because I thought cake would do > the "magic" and the automatic filter. > In this specific case does ca

Re: One to Many question

2010-06-02 Thread Jeremy Burns
Graham's reply was far more comprehensive than mine and I'd go with it. I use containable as a matter of course. Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 06:01, Roland Pish wrote: > Thanks for your reply Jeremy. > > I was avoiding the conditions array because I thought cake would do

Re: One to Many question

2010-06-02 Thread Roland Pish
Thanks for your reply Jeremy. I was avoiding the conditions array because I thought cake would do the "magic" and the automatic filter. In this specific case does cake do this "magic"? or is it neccesary to pass the conditions array? Regards. On 2 jun, 22:56, Jeremy Burns wrote: > I'd try this:

Re: One to Many question

2010-06-02 Thread Graham Weldon
You need to specify your conditions as part of the find, or get associated records from a Student model find. I'd personally do this with the containable behavior. Add the 'Containable' behavior to your models. I normally add this to my AppModel (/app/app_model.php), as I use it everywhere. Set $r

Re: One to Many question

2010-06-02 Thread Jeremy Burns
I'd try this: > $foreignSchools = $this->Student->ForeignSchool->find('all', > array('conditions' => array('ForeignSchool.student_id' => 2))); (hope the number of brackets is right...) Jeremy Burns jeremybu...@me.com On 3 Jun 2010, at 05:51, Roland Pish wrote: > Hello. I don't know if I'm do

One to Many question

2010-06-02 Thread Roland Pish
Hello. I don't know if I'm doing things well, so I'll fire my question. I have a model relationship this way: Student hasMany ForeignSchool. First, I'll show my scenario, files and relevant code, then I'll explain the problem. SCENARIO: * Model file student.php (hasmany declaration): var $hasMany

Re: Advise on creating a Game with cakephp

2010-06-02 Thread Graham Weldon
Chess sounds cool. Let us know how you go with it. You could implement pieces and boards as models, Board hasMany Pieces. If you need some non-MVC classes to provide some structure and organisation for your app, you can put them into the libs directory, and App::import() them from there. Hope tha

Re: Cache / file.php / unserialize() error

2010-06-02 Thread Graham Weldon
This should be fixed in #769 http://cakephp.lighthouseapp.com/projects/42648/tickets/769 We're working towards packaging another release for this as soon as possible. Cheers, Graham Weldon (AKA: Predominant) On Wed, Jun 2, 2010 at 5:38 AM, Brent wrote: > Hello, > > I installed CakePHP 1.3.1 and

Re: Next Cakefest?

2010-06-02 Thread Graham Weldon
Hi Jeremy, Dates and location have been announced. Chicago, Illinois. September 2-5. Workshops will be on the 2nd and 3rd of September. Conference will be on the 4th and 5th of September. We hope to see you there! Cheers, Graham Weldon (AKA: Predominant) On Sun, May 2, 2010 at 7:30 PM, drpark

Re: baking 1.3.0 problems?

2010-06-02 Thread berryma4
apply this diff http://cakephp.lighthouseapp.com/projects/42648/tickets/771-wrong-core-path-in-templatephp On May 28, 5:07 am, BJ wrote: > For the more dense... which folder to where :-S > > On May 26, 9:12 am, Ben Mosher wrote: > > > > > Fixed. Move 'templates' folder up into 'libs'. Or co

Re: timeHelper

2010-06-02 Thread Matthew Powell
http://php.net/strftime Matt On Wed, Jun 2, 2010 at 18:48, bradmaxs wrote: > Does anyone know if there is a way to convert the military time output > of the niceShort method to standard time? > > Example: 13:54:01 to 1:54pm. > > Thank you, > > Brad > > Check out the new CakePHP Questions site h

Re: Miles J Uploader help

2010-06-02 Thread bradmaxs
Hey Miles, Did you ever test this? Just checking. I am going to try and maybe do a Set::extract?? Going to start tomorrow but thought I would check in. Brad On May 19, 11:37 am, Miles J wrote: > Its probably getting confused trying to load the data since both the > file input and date input

timeHelper

2010-06-02 Thread bradmaxs
Does anyone know if there is a way to convert the military time output of the niceShort method to standard time? Example: 13:54:01 to 1:54pm. Thank you, Brad Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this mess

CakePHP development firm

2010-06-02 Thread NS
Is there a list of CakePHP development firms? We are looking to engage with one for a project and would like to get recommendation from the community here. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message b

Read-only topics

2010-06-02 Thread Ian Channing
Silly question maybe - Is there a set rule when a topic becomes read- only? I've noticed that some topics on here are read-only. I've repeatedly wanted to reply to some of them but can't as they're set to read-only (you can reply to the author but not to the topic). There are topics as recent as

Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread euromark
use $this->User->find('first', array('conditions' => array('User.id' =>4))) everything else is either deprecated or used for something else On 2 Jun., 17:39, bram wrote: > The migration guide actually mentions this change in paragraph 11.1.2: > > > Model::find(first) will no longer use the id p

Re: saveAll/Save not saving associations

2010-06-02 Thread jjunior
Thanks for the reply, but when I change it to camelCase I lose my associations in the view. On Jun 2, 6:13 am, Shaz wrote: > Course has many course_tees > CourseTee belongs to course > > I thought all model class names be singular and camel cased; as in: > > Course has many CourseTee > CourseTee

Re: slider not appearing

2010-06-02 Thread calvin
http://book.cakephp.org/view/1358/AJAX On Jun 2, 10:05 am, Bryan Lim wrote: >  hi all, > > I am trying to get jquery works in my cakephp. > source:http://www.cakephp.bee.pl/ > But i cannot see the slider..What is wrong? I see no error messages. > As instructed in the site, I placed the helpers un

Re: tricky list re-ordering problem

2010-06-02 Thread cricket
On Jun 2, 12:18 am, Jeremy Burns wrote: > You mention tree behaviour but I don't see any parent, left or right fields. I haven't implemented this (yet) with Tree. I mentioned it because this is how I've done it in the past. But, in this case I can't see how to use it because, normally, everything

Re: another timeline helper question

2010-06-02 Thread Bryan Lim
has anybody used the timeline helper before? On May 31, 4:57 pm, Bryan Lim wrote: > I don understand the example parthttp://bakery.cakephp.org/leafs/view/81 > > where the view is used to render the json. > > $xpaths = array( >     'title' => '/title', >     'start' => '/from', >     'end' => '/t

[jquery helper] slider not appearing

2010-06-02 Thread Bryan Lim
hi all, I am trying to get jquery works in my cakephp. source: http://www.cakephp.bee.pl/ But i cannot see the slider..What is wrong? I see no error messages. As instructed in the site, I placed the helpers under /app/views/ helpers/ copied all the js into /app/webroot/js/ added the following int

Advise on creating a Game with cakephp

2010-06-02 Thread gmansilla
Hello, I plan to develop a table game like chess, from a MVC architecture... where do I write all the logic and validation? it would be written in a model, right? If so, these models wouldn't use any table, What if I need some classes to build the logic? would be all those classes just models? if

HTTP headers options for unit tests?

2010-06-02 Thread carcus88
I have a common controller where I like to keep logic and render it in different ways depending on how its called. For instance assume you have a controller called Foo with an action called bar that returns true in JSON or XML or renders a view depending on how it was requested. class FooControlle

Re: Login - Header location Error

2010-06-02 Thread Jeremy Burns
It looks like you are echoing or debugging something to the screen, which is then getting in the way of the headers. Jeremy Burns jeremybu...@me.com On 2 Jun 2010, at 16:37, Davor Ilic wrote: > Hi, > > my problem is the header location func when i redirect after login i get this > error: >

cakephp eclipse debugging

2010-06-02 Thread mirfan
hay guys i am starting a project in cakephp i need help how i will debug it with eclipse Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread bram
The migration guide actually mentions this change in paragraph 11.1.2: > Model::find(first) will no longer use the id property for default conditions > if > no conditions are supplied and id is not empty. Instead no conditions will be > used Check out the new CakePHP Questions site http://cakeqs.

Login - Header location Error

2010-06-02 Thread Davor Ilic
Hi, my problem is the header location func when i redirect after login i get this error: *Warning* (2): Cannot modify header information - headers already sent by (output started at /var/www/virtual/site/dev/htdocs/cake/libs/debugger.php:673) [*CORE/cake/libs/controller/controller.php*, line *746

Re: How to pass array value from one ctp file to another ctp file

2010-06-02 Thread Shaz
Use elements, you can pass values between them: $this->element('whatever', $valuetobepassed); On 2 June, 13:16, Narendra Padala wrote: > Hi flocks, > I am,  new to cake php  actually i want display one report, in the down i > put the link download link for Excel. > > For that purpose , i have to

Re: Newbie question: URL linking

2010-06-02 Thread Shaz
Try: link($html->image('linkedin.gif', array ('alt' => 'LinkedIn' , 'align' => 'bottom')), "{$user['social_media'] ['linkedin']}", array(), null, false); ?> Essentially store the value you wish to act as a URL in a variable and call that variable. Also remember PHP treats

Re: Containable() not working for $this->Model1->Model2->find('', array('contain') => 'Model3');

2010-06-02 Thread John Andersen
Ok, so what you want is: 1) The article; 2) The related comments; 3) The related comment ranks for each comment. [code] $this->Article->Comment->find( 'threaded', array( 'contain' => array('Article', 'CommentRank'), 'conditions' => array('Comment.article_id' => $id) ) ); [/cod

Re: Router not working as expected

2010-06-02 Thread Shaz
It should be: Router::connect( '/blog_post', array( 'controller' => 'posts', 'action' => 'view', 5 ) ); Notice it's only one array. On 1 June, 23:07, blasto333 wrote: > Router::connect( >     '/blog_post', >     array('controller' => 'posts'), >     array('ac

Re: saveAll/Save not saving associations

2010-06-02 Thread Shaz
Course has many course_tees CourseTee belongs to course I thought all model class names be singular and camel cased; as in: Course has many CourseTee CourseTee belongs to Course Might help? On 2 June, 01:05, jjunior wrote: > I'm having a problem trying to save/update some associated data. I've

Re: Router not working as expected

2010-06-02 Thread AD7six
On Jun 2, 12:07 am, blasto333 wrote: > Router::connect( >     '/blog_post', >     array('controller' => 'posts'), >     array('action' => 'view', 1) please link to where in the book you've seen an example that looks like that. Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Containable() not working for $this->Model1->Model2->find('', array('contain') => 'Model3');

2010-06-02 Thread Shaz
$this->Article->Comment->find( 'threaded', array( 'contain' => array('CommentRank'), 'conditions' => array('Article.id' => $id) ) ); ^^ Sorry it was a typo in the post; the code above is from my application. It does return an Array but doesn't use the containable behavi

saveAll/Save not saving associations

2010-06-02 Thread jjunior
I'm having a problem trying to save/update some associated data. I've read about a million google returns, but nothing seems to be the solution. I'm at my wit's end and hope some kind soul here can help. I'm using 1.3.0-RC4, my database is in InnoDB. Course has many course_tees CourseTee belongs

Router not working as expected

2010-06-02 Thread blasto333
Router::connect( '/blog_post', array('controller' => 'posts'), array('action' => 'view', 1) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "Cak

Session unexpectedly dropped between pages in IE

2010-06-02 Thread philosophieLA
Hello everyone, I've come across an extremely unusual bug that my team has literally no idea how to solve. Doing some research, I found some similar solutions that I thought would work, but alas did not. Here is my situation, let me know if I can provide additional insight to help solve the proble

Cache / file.php / unserialize() error

2010-06-02 Thread Brent
Hello, I installed CakePHP 1.3.1 and a CMS app named Croogo on my Solaris server. Loading pages produces errors like this one: Notice (8): unserialize() [function.unserialize]: Error at offset 5 of 602 bytes [CORE/cake/libs/cache/file.php, line 176] Code | Context $key= "cake_core_f

Newbie question: URL linking

2010-06-02 Thread bobbiloo
In this example: link($html->image('linkedin.gif', array ('alt' => 'LinkedIn' , 'align' => 'bottom')), ' ', array(), null, false); ?> I am trying to use a field in my social_media table, entitled "linkedin," to be the url of my $html->link statement. But if I plug that php echo line in betwee

Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread Gonza
$data = $this->User->read(null, 4); that is the official way to get one row.. another possible ways: $this->User->findById(4); $this->User->find('first', array('conditions' => array('User.id' => 4))) bye, gonzalo On 2 jun, 09:09, bram wrote: > I'm porting my app from cakephp 1.2 to 1.3 and fol

Re: how i call function in cake link

2010-06-02 Thread John Andersen
Look in the CakePHP book at: http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements#link-1442 The second example is what you need! Enjoy, John On Jun 2, 2:21 pm, Dilip Godhani wrote: > e($html->link('Edit',array('controller'=>'dashboards','action'=>'partner/'.$data[$i]['Partner'

Re: how i call function in cake link

2010-06-02 Thread Narendra Padala
link('edit', array('controller'=>'dashboards', 'action'=>' 'partner/'.$data[$i]['Partner']['id']')); ?> On Wed, Jun 2, 2010 at 5:49 PM, mike karthauser wrote: > > On 2 Jun 2010, at 12:21, Dilip Godhani wrote: > > e($html->link('Edit',array('contr

Re: how i call function in cake link

2010-06-02 Thread Dilip Godhani
Sryy for but i want to call jquery function..! On Wed, Jun 2, 2010 at 5:49 PM, mike karthauser wrote: > > On 2 Jun 2010, at 12:21, Dilip Godhani wrote: > > e($html->link('Edit',array('controller'=>'dashboards','action'=>'partner/'.$data[$i]['Partner']['id']))); > ?> > > > by reading how in the b

How to pass array value from one ctp file to another ctp file

2010-06-02 Thread Narendra Padala
Hi flocks, I am, new to cake php actually i want display one report, in the down i put the link download link for Excel. For that purpose , i have to display same content for report and excel, so i was set the query results in one variable rows, using that variable i was displayed the records n

Re: how i call function in cake link

2010-06-02 Thread mike karthauser
On 2 Jun 2010, at 12:21, Dilip Godhani wrote: > e($html->link('Edit',array('controller'=>'dashboards','action'=>'partner/'.$data[$i]['Partner']['id']))); > ?> by reading how in the book http://book.cakephp.org/view/836/link -- Mike Karthäuser Managing Director - Brightstorm Ltd Email: mi..

find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread bram
I'm porting my app from cakephp 1.2 to 1.3 and followed all steps in the migration guide. Still having troubles with find queries. I have quite some queries doing: $this->User->id = 4; $data = $this->User->find('first'); Cake 1.2 builds the following query: SELECT `User`.`id`, FROM `users`

how i call function in cake link

2010-06-02 Thread Dilip Godhani
link('Edit',array('controller'=>'dashboards','action'=>'partner/'.$data[$i]['Partner']['id']))); ?> -- Dilip Godhani Jr Software Developer, Entourage Solutions e-mail: di...@entouragesolutions.com dilip.godh...@gmail.com Web.: www.entouragesolutions.com m. 9913822582 Check out the new C

Re: Release: CakePHP 1.3.1

2010-06-02 Thread Marco
For the bake problem: http://groups.google.com/group/cake-php/browse_thread/thread/fddcb1c8f628d5ee On Jun 2, 6:01 am, Quess wrote: > Beside that what you guys say I also can't bake any model files, after > baking is done model files are empty (file size = 0) so I back to > 1.3.0 > > On 30 Maj, 0

Re: cakephp.lighthouseapp.com does not show tickets

2010-06-02 Thread John Andersen
Virker fint hos mig med FF 3.6.3! Enjoy, John On May 31, 10:09 pm, desolat wrote: > When visitinghttp://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets > with Firefox 3.6.3 no tickets are shown. div at looks like that: > > Check out the new CakePHP Questions site http://cakeqs.org a

how to activate child afterDelete callbacks when i delete parent model?

2010-06-02 Thread Kei Simone
hi, i have a parent model that hasMany child models. when the child model is deleted, i need to delete the images associated with the child model. hence i want to place it in the afterDelete callback of the child model. now the association of parent with child is like this: var $hasMany = arra

Re: Release: CakePHP 1.3.1

2010-06-02 Thread Quess
Beside that what you guys say I also can't bake any model files, after baking is done model files are empty (file size = 0) so I back to 1.3.0 On 30 Maj, 02:48, Sergei wrote: > Hi, > > just tried 1.3.1 with one of my project (Cake 1.3). It instantly gave > me an errors on almost *every* page (see

Re: Order problem with deep association

2010-06-02 Thread vekija
Not sure if I understood the question, but if you want Alix to appear before Shantam you can sort the assignment array with Set::sort Assuming your data array is called $shifts, you could do it like this foreach($shifts as $i => $shift) { $shifts[$i]['Assignment'] = Set::sort($data['Assignment'