Re: Select box broken after upgrade

2011-06-19 Thread madusanka hettiarachchi
hi CRUSH,
i ddnt get you clearly! can u explain it! u mean my controller class and
view class should be changed as u said???


Ganganath Hettiarachchi

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Select box broken after upgrade

2011-06-19 Thread CRUSH
Jeremy,
Not working. I changed it to:

 Controller 
$mediaTypes = $this->Media->MediaType->find('list');
$this->set(compact('$mediaTypes'));

 View 
echo $this->Form->input('media_type_id');

and made the model change. Here is what it is outputting:

Media Type




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Select box broken after upgrade

2011-06-19 Thread CRUSH
Ganganath, I think your controller should be musics and your view
should be music_id

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Select box broken after upgrade

2011-06-19 Thread madusanka hettiarachchi
hi guys,


Hi CRUSH, Did you get solve your problem? I have same as you! I did the
changes which Jeremy said, bt It gives error like this,

Undefined property: Album::$Music
[*APP\controllers\albums_controller.php*, line *69*]
Code

function index(){//$lists =
$this->Album->Music->find('list',array('fields'=>array('id','name')));
   $musicsList = $this->Album->Music->find('list');

AlbumsController::index() - APP\controllers\albums_controller.php, line 69
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83


*Fatal error*: Call to a member function find() on a non-object in *
D:\xampp\htdocs\...\app\controllers\albums_controller.php* on line *69
*
here are my codes

view:::
echo $form->input('music_track_id', array('label' => 'Music Track'));

controller:::

$musicsList = $this->Album->Music->find('list'); //(line 69)
   $this->set(compact('musicsList'));

can any body help me?

Ganganath Hettiarachchi

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread Phang Mulianto
just use notepad...  wtf..



On Mon, Jun 20, 2011 at 1:29 PM, CRUSH  wrote:

> Komodo is the best I've used so far.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Select box broken after upgrade

2011-06-19 Thread Jeremy Burns | Class Outfit
The variable should be called $mediaTypes, so do 
$this->set(compact('mediaTypes')); instead.

Also, consider going to the MediaType model and setting var $displayField = 
'type'; - then you don't need to specify the fields in the find; a simple 
$mediaTypes = $this->Media->MediaType->find('list'); will do.

On 20 Jun 2011, at 06:16, CRUSH wrote:

> Hey,
> I have spent hours troubleshooting this stupid problem. Tried many
> combinations of names. This code gave me a select box with the media
> types in the view in version 1.2. In version 1.3 it gives me an empty
> select box. By debugging the "$media_types" I can see that the Find
> call is getting the correct rows but that's as far as I know how to
> debug. Any thoughts?
> 
>  Controller 
> $media_types = $this->Media->MediaType->find('list',
> array('fields'=>array('MediaType.id', 'MediaType.type')));
> $this->set(compact('media_types'));
> 
>  View 
> echo $form->input('media_type_id', array('label' => 'Media Type'));
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread CRUSH
Komodo is the best I've used so far.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread CRUSH
Ha ha!

> eg "What editor would you use to build a site like facebook?"

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Select box broken after upgrade

2011-06-19 Thread CRUSH
Hey,
I have spent hours troubleshooting this stupid problem. Tried many
combinations of names. This code gave me a select box with the media
types in the view in version 1.2. In version 1.3 it gives me an empty
select box. By debugging the "$media_types" I can see that the Find
call is getting the correct rows but that's as far as I know how to
debug. Any thoughts?

 Controller 
$media_types = $this->Media->MediaType->find('list',
array('fields'=>array('MediaType.id', 'MediaType.type')));
$this->set(compact('media_types'));

 View 
echo $form->input('media_type_id', array('label' => 'Media Type'));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread Sam Sherlock
it could be worse.

eg "What editor would you use to build a site like facebook?"

 - S




On 20 June 2011 05:39, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Oh no - not again!
>
> On 20 Jun 2011, at 02:27, Robert wrote:
>
> > What editor or IDE do you find has the best CakePHP integration?
> >
> > --
> > Robert
> >
> >
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org Check out the new CakePHP Questions site
> http://ask.cakephp.org and help others with their CakePHP related
> questions.
> >
> >
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread Jeremy Burns | Class Outfit
Oh no - not again!

On 20 Jun 2011, at 02:27, Robert wrote:

> What editor or IDE do you find has the best CakePHP integration?
> 
> -- 
> Robert
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org Check out the new CakePHP Questions site 
> http://ask.cakephp.org and help others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread Sathia S
Aptana. try this link
http://aptana.com/products/studio3



-- 
Regards

sathia
http://www.sathia27.wordpress.com

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: What editor?

2011-06-19 Thread Ryan Schmidt
Please see recent extremely long thread on this topic:

http://groups.google.com/group/cake-php/browse_thread/thread/83f01effcc10dc7

Let's try not to have all that again.


On Jun 19, 2011, at 20:27, Robert wrote:

> What editor or IDE do you find has the best CakePHP integration?



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Accessing controller from view/ element

2011-06-19 Thread Dr. Loboto
Retrieve it in controller and set to view. Do it at beforeRender(),
for example.

On Jun 18, 12:39 pm, thom  wrote:
> I'd like to create a header that contain data from database. But I'm
> stucked at how to load the data from the database. I already tried
> requestAction, but since it's not recommended, I am considering to
> leave it. I rarely got my page error though, said error in limit-reach
> or similar.
>
> Is there any way to do retrieve the data?
> Thank you.
>
> --
> Regards,,,
> mastanto 
> (thom_)http://mynameisthom.tumblr.comhttp://mynameisthom.blogspot.comhttp://www.twitter.com/mastanto_

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


What editor?

2011-06-19 Thread Robert

What editor or IDE do you find has the best CakePHP integration?

--
Robert


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.



To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Displaying comments in the Index page

2011-06-19 Thread nurvzy
The issue you're running into is in the default index view and
controller action you have recursive set to 0 for speed reasons. A
quick fix would be to set that value higher to retrieve comments
associated with posts.

A better solution would be to use the Containable behavior and limit
it to just 3 comments and what fields you intend on showing.

Use those Google skills and checkout the cookbook docs for
containable, there's an example that's almost exactly what you need
written for you.

Good luck,
Nick
On Jun 19, 7:29 am, Paul Wheatley  wrote:
> Hi,
>
> Can anyone tell me how i can show comments for a post on the index.ctp page?
>
> Basically what i am trying to do it create a panel under each post title that 
> will display the comments.  In this format...
>
> Post A title
> Post A snippet content
>         Comment 1
>         Comment 2
>         Comment 3
>
> Post B title
> Post B snippet content
>         Comment 1
>         Comment 2
>         Comment 3
>
> Post C title
> Post C snippet content
>         Comment 1
>         Comment 2
>         Comment 3
>
> etc...
>
> But when i use this code to display the comments (under each post title)...
>
>                                          $i = 0;
>                         foreach ($course['Comment'] as $comment):
>                         $class = null;
>                         $say = $comment['say_id'];
>                         $usrid = $comment['user_id'];
>                         if ($i++ % 2 == 0) {
>                                 $class = ' class="altrow"';
>                         }
>                 ?>
>                                  $comment['name'];?>
>                                 
>                                 Published by  $comment['commenter'];?> on 
>                 
>
> I get the following error on the page...
>
> Notice (8): Undefined index:  Comment [APP/views/posts/index.ctp, line 29]
> I am guessing that this is because the index page hasn't pulled in the 
> Comment controller so i looked at the view portion of the posts controller 
> and i can't find how/where it pulls in use of the comment controller.  I am 
> throughly confused.
>
> I have googled heavily for the answer and i can't find anything, i can only 
> assume that it is a simple solution that no one ever (apart from me) has 
> gotten stuck with it before.
>
> Paul

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Site Relaunch using Cake 1.3

2011-06-19 Thread ibejohn818
I'm going to be relaunching a very large website tonight at midnight.
I took a spaghetti code mess of a site and re-vamped the site using
Cake 1.3

Some advanced media service and such were programmed into the site.
It's using multiple domains, and use shared Models, Controllers, Etc
as well as a custom made ACL using the Auth component

Out site serves around 40-50 million page views, 15-20 million uniques
a month, and 20 mill in video views a month.

The site is using the Rackspace cloud servers offering.

The site will be running on 15 4gb centos web-nodes Apache 2, php 5.3
(latest)
3 databases (1 master 2 load balanced slaves)

Did some very cleaver dev'ing on this project.

I will be willing to share my experiences and feedback possibly for
the benefit of the cakephp core team in the next week or two.

But for now, i gotta re-launch a very large and important website.

12:00am PST June 20 2011

http://theberrics.com


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Displaying comments in the Index page

2011-06-19 Thread Paul Wheatley
Hi,

Can anyone tell me how i can show comments for a post on the index.ctp page?

Basically what i am trying to do it create a panel under each post title that 
will display the comments.  In this format...

Post A title
Post A snippet content
Comment 1
Comment 2
Comment 3

Post B title
Post B snippet content
Comment 1
Comment 2
Comment 3

Post C title
Post C snippet content
Comment 1
Comment 2
Comment 3

etc...

But when i use this code to display the comments (under each post title)...




Published by  on 


I get the following error on the page...

Notice (8): Undefined index:  Comment [APP/views/posts/index.ctp, line 29]
I am guessing that this is because the index page hasn't pulled in the Comment 
controller so i looked at the view portion of the posts controller and i can't 
find how/where it pulls in use of the comment controller.  I am throughly 
confused.

I have googled heavily for the answer and i can't find anything, i can only 
assume that it is a simple solution that no one ever (apart from me) has gotten 
stuck with it before.

Paul

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php