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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
>
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
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.
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
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
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
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
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
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
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
$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
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::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
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
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
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
$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
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'
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
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
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
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..
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`
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
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
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
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
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
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'
55 matches
Mail list logo