Re: when I have set the Configure::write('debug', 0), how can I let a new model can be use.

2009-03-10 Thread Rimoe
hi,

everyone, I want to comment the (Configure::write('Cache.disable', true);)
in my core.php
but if I do it I will get the error:
The requested address *'/'* was not found on this server.

why is it? and what should I do?

I feel mysite is very slow.

Thanks

Rimoe



2009/3/10 Mauricio Morales 

>
> You can manually delete the tmp/cache/models/* data.
>
> Are you sure that your table was created with the same DB user that
> Cake's App uses?... It could be a permission problem.
>
> On Mar 9, 4:36 pm, Rimoe  wrote:
> > Thank you for your answer,
> > so I have use the (Cache::clear()) in my controller,
> > but it has no anything has happened.
> > where should i invoke the Cache::clear()?
> > do you know,
> > then, i have set the Turn on  of (Configure::write('Cache.disable',
> true);)
> > but now I can't turn off it, if I do it, my site will not run.
> >
> > what should I do,  can you tell me more detail?
> >
> > thank you very much.
> >
> > sincerely
> >
> > rimoe
> >
> > 2009/3/9 Dardo Sordi Bogado 
> >
> >
> >
> > > > I have set (Configure::write('debug', 0)) in my core.php,
> > > > now I  added a table,
> > > > but the cake can't find the model, and can't use the new model,
> > > > In the situation, what should I do?
> >
> > > clear the cache!
> >
> > > > and I want to use the information of debug,
> > > > but I don't want to let it show in page, only show in a file,
> > > > what can I do.
> >
> > > You can create a custom datasource extending the one you are using but
> > > loggin the sql queries instead of dumping them at the end of page. Ex:
> > >http://bin.cakephp.org/view/503102878
> >
> > > HTH,
> > > - Dardo Sordi.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Form Helper, default value

2009-03-10 Thread Matthieu

Hi!

Id like to choose a default value for this form element et I dont know
how? (exemple: defautl value: 01-01-1980 of Day-Month-YearÉ

echo $form->input('birthdate', array('dateFormat' => 'DMY',
'timeFormat' => 'none', 'minYear' => date('Y') - 100, 'maxYear' => date
('Y') - 6));

thks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: the blog post problem

2009-03-10 Thread bilal

Hi Jon,

all three htaccess files are there, but i still have to type index.php
to access, this is how my .htaccess files looks like


   RewriteEngine on
   RewriteRule^$ app/webroot/[L]
   RewriteRule(.*) app/webroot/$1 [L]


thanks for helping out

On Mar 10, 6:40 am, Jon Bennett  wrote:
> Hi bilaliz,
>
> > its WAMP server that i have installed on my notebook, the way i
> > learned to deploy was to simply download cake and copy all files in to
> > the www folder and i should able to see the default cake index, and
> > indeed that worked ..
> > so for example my views are in D:\wamp\www\app\views\posts
>
> As it's a WAMP server, I would expect you not to need 'index.php' in
> the URLs. Do you have the required 3 .htaccess files in place?
>
> Cheers,
>
> Jon
>
> --
>
> jon bennett
> w:http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Paginator localhost vs. remote server URL generates differently.

2009-03-10 Thread bee

This is very odd, when i upload my code from my local machine to my
server, and test out the Paginator on the remote server, the URL is
incorrectly rendered for the paginator, page 2 on the remote server.

On localhost, the url for page 2 of my query works properly and
displays this:
http://localhost/.../.../findChildren/1/page:2

However, when I upload to the server, the "/1/" does NOT appear page 2
link.
Instead,
http://www.mywebsite.com/.../findChildren/page:2


The code I use for paginator VIEW is below: (it is EXACTLY THE SAME
for both the localhost and the server)

echo $paginator->numbers();


The code in the controller is as follows:
var $paginate = array(
'limit' => 4 ,
'order' => array(
'Event.name' => 'asc'
)
);


function findChildren($id=null)
{

$events = $this->paginate('Event', array('category_id' =>
$id) );
$this->set('events',$events);

}


So, it is strange, because i NEVER wrote the code for the path of URL,
so this must be a setting somewhere in the config?
I am a newbie, so please excuse me for my confusion and ignorance.
I appreciate your help in advance.
Thanks
Christy

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: How to create models for complex database designs like this?

2009-03-10 Thread yodi

Your models is Movie hasMany Cast, Celebrity hasMany Cast dan Cast
belongsTo both of Movie and Celebrity, right?

if you wants show moview on view.ctp on Cast and included celebrity
info, it's simple! you can use contain behavior this is for example:
movies_controller.php : (controller)
function view($id=null){
..
$movies = $this->Movie->getInfo($id);
$this->set(compact('movies'));
}

movie.php : (model)
var $actAs = array('Containable);

function getInfo($id){
$result = $this->find('all',array(
'conditions'=>array('Movie.id'=>$id),
'contain'=>array('Cast'=>array(

'fields'=>array('role'),'Celebrity'=>array('fields'=>array('name'))
))
));

return $result;
}

For details, you can reading about containable on book.cakephp.org

On Tue, 2009-03-10 at 17:50 -0700, Rajesh wrote:
> Is there any other way to redefine database to meet the requirements?
> Please help me on this...
> 
> 
> On Mar 8, 5:40 pm, Rajesh  wrote:
> > I am working on movie site. Client have movie records in following
> > structure.
> >
> > CREATE TABLE IF NOT EXISTS `movies` (
> >   `id` int(50) NOT NULL AUTO_INCREMENT,
> >   `movieName` varchar(500) NOT NULL,
> >   `year` int(11) DEFAULT NULL,
> >   PRIMARY KEY (`id`)
> > ) ENGINE=MyISAM  DEFAULT CHARSET=utf8  ;
> > -- 
> > CREATE TABLE IF NOT EXISTS `celebrities` (
> >   `id` int(11) NOT NULL AUTO_INCREMENT,
> >   `name` varchar(250) NOT NULL,
> >   PRIMARY KEY (`id`)
> > ) ENGINE=MyISAM  DEFAULT CHARSET=utf8  ;
> > -- 
> > CREATE TABLE IF NOT EXISTS `casts` (
> >   `movie_id` int(50) NOT NULL,
> >   `role` varchar(200) DEFAULT NULL,
> >   `celebrity_id` int(11) NOT NULL DEFAULT '0',
> >   KEY `movieid` (`movie_id`)
> > ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
> >
> > As you can see movies has casts, casts table contains movie_id and
> > celebrity_id. celebrities master table is for storing all master
> > celebrity names.
> >
> > Now my problem is i have created models for movie and celebrity like
> > movie hasmany cast. In movie page aim getting movie details along
> > related casts. But celebrity_is is showing id instead of name how
> > can i get celebrity name instead of id. Please help me.
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: ACL and Auth with additional checking

2009-03-10 Thread brian

Thanks for posting all this. I've just started--yesterday--trying to
work out how to go about something similar. I haven't used ACL at all
and I was really confused about row-level access. It looks like I'll
be able to adapt your code for my use. The one big difference is that
I'll need to control a model that implements TreeBehavior (think
folder hierarchy).

One thing I'd change is in su_index(): put the check on group_id at
the top to avoid all that logic.

function su_index()
{
$conditions = null;

if ($this->Auth->user('group_id') == 4)
{
$papers = array();
$user_id = $this->Auth->user('id');
$nodes = $this->Acl->Aro->findByForeignKeyAndModel($user_id,
'User');

foreach ($nodes['Aco'] as $node)
{
if ($node['model'] === 'Paper')
{
$papers[] = $node['foreign_key'];
}

// Get children from volumes
if ($node['model'] === 'Volume')
{
$children = 
$this->Acl->Aco->children($node['id']);

foreach ($children as $child)
{
$papers[] = 
$child['Aco']['foreign_key'];
}
}
}
$conditions = array('Paper.id' => $papers);
}

$this->set('papers', $this->paginate($conditions));
}


Although, if it were my project, I'd make the admin group ID 1. If you
later add more groups you'll run into problems.

Having said _that_, though, I have to say that I'm a bit confused
about how this is supposed to work. If it's an admin, you want all
files to show up, otherwise, check ACL for access. You're getting the
$user_id from the session, but it appears that this is an admin-only
method. (Is 'su' your admin prefix?) If you want that an admin can see
the allowed Papers for a particular user, I'd think you'd need to pass
the ID as a param.

Did I read that correctly?

On Sun, Mar 1, 2009 at 1:43 PM, Aidan Lister  wrote:
>
> The final piece of the puzzle.
>
> The only thing remaining was displaying the list of papers and volumes
> that a user had access to, instead of all the papers/volumes.
>
>     // papers_controller.php
>    function su_index()
>    {
>        $papers = array();
>        $user_id = $this->Auth->user('id');
>        $nodes = $this->Acl->Aro->findByForeignKeyAndModel($user_id,
> 'User');
>        foreach ($nodes['Aco'] as $node) {
>            if ($node['model'] === 'Paper') {
>                $papers[] = $node['foreign_key'];
>            }
>
>            // Get children from volumes
>            if ($node['model'] === 'Volume') {
>                $children = $this->Acl->Aco->children($node['id']);
>                foreach ($children as $child) {
>                    $papers[] = $child['Aco']['foreign_key'];
>                }
>            }
>        }
>        $conditions = array('Paper.id' => $papers);
>
>        if ($this->Auth->user('group_id') == 4) {
>            $conditions = null;
>        }
>
>        $this->set('papers', $this->paginate($conditions));
>    }
> ?>
>
> The same applies to the volumes controller, but a little simpler as
> you don't need the hierarchy.
>
> There must be an easier way to retrieve a set of Model records given
> an ARO and a parent ACO, but I couldn't find it.
>
> If anyone has any tips/suggestions, let me know.
>
> HTH,
> Aidan
>
>
> On Mar 2, 12:13 am, Aidan Lister  wrote:
>> For the archives, this is a step-by-step on how I solved the problem:
>>
>> Rather than controllers/Papers/view/n which becomes unwieldy given you
>> have to create an ACO for each action, I instead created an ACO for
>> each row in my two models. Thanks to markstory for the suggestion.
>>
>> I created the following ACO heirachy:
>>     Papers//
>>
>> This allowed me to give editors access to a volume, which
>> automatically gives access to the papers inside. This is the beauty of
>> ACLs.
>>
>> I created the ACO tree like so (using acltool, a custom cake shell
>> component):
>>
>> >     // $ cake acltool aco_models
>>     function aco_models()
>>     {
>>         $this->out('Starting models sync');
>>         $Paper  = ClassRegistry::init('Paper');
>>         $Volume = ClassRegistry::init('Volume');
>>
>>         // Create the root node
>>         $root_alias = 'papers';
>>         $this->Aco->create();
>>         $this->Aco->save(array('parent_id' => null, 'model' => null,
>> 'alias' => $root_alias));
>>         $aco_root = $this->Aco->id;
>>
>>         // Iterate all the volumes
>>         $volumes = $Volume->findAll();
>>         foreach ($volumes as $volume) {
>>             // Create a node for th

Re: MooTools Ajax with Cake

2009-03-10 Thread Arak Tai'Roth

Also not to be an ass. But I have effects working, you are right there
is tons of documentation. I was just checking if anyone had any cool
ideas I hadn't thought of.

I also did get it working just fine with multiple elements of the same
name.

Copy and pasting can lead to a lot of issues with no understanding I
agree. However it gets you something to work on right away and gives
you a more practical way to learn, and for me, that's far more useful.

On Mar 10, 10:56 am, mark_story  wrote:
> Not to be an ass, but mootools has tons of documentation, examples and
> tutorials.  You can find lots of information on how you use effects in
> the mootools docss.  Furthermore if you have more than one element
> with the same ID don't expect anything to work properly.  In addition
> Element.load() does do an AJAX request.  Just as a GET instead of a
> POST type request.  But if you are new to Ajax and Mootools, I would
> start with the docs, copy+pasting is going to lead to lots of these
> type issues.
>
> -Mark
>
> On Mar 9, 4:39 pm, "Arak Tai'Roth"  wrote:
>
> > Well it looks like I got it all working. Now I just need to figure out
> > how to add some kind of effect to it. If anyone has any advice on
> > that, that would be perfect.
>
> > On Mar 9, 11:43 am, "Arak Tai'Roth"  wrote:
>
> > > So I completely revamped the code in my ajax file to this:
>
> > > window.addEvent('domready', function()
> > > {
> > >         $('ajax_replace').addEvent('click', function(event)
> > >         {
> > >                 event.stop();
>
> > >                 var req = new Request(
> > >                 {
> > >                         method: 'get',
> > >                         url: $('ajax_replace').get('href'),
> > >                         data: { 'do' : '1' },
> > >                         onComplete: function(response)
> > >                         {
> > >                                 $('about_descriptioncontent').set('html', 
> > > response);
> > >                         }
> > >                 }).send();
> > >         });
>
> > > });
>
> > > It now kinda works. I had an onRequest portion in there and that was
> > > triggering, and the content was changing, it was incredibly messed up
> > > (ie. wasn't outputting what I was expecting it to). However this only
> > > works for the first of my links, the other ones don't do anything at
> > > all.
>
> > > On Mar 9, 11:25 am, "Arak Tai'Roth"  wrote:
>
> > > > I don't want to do a simple GET request, I do want this as AJAX,
> > > > that's just the code I found. I am extremely new to MooTools, never
> > > > used it before this, in addition I am new to using AJAX period.
>
> > > > One thing I just realized and am slightly confused about. With the
> > > > code $('ajax_replace) I am under the understanding that I am
> > > > referencing the element id = ajax_replace. However I have multiples of
> > > > those on this page, 4 right now, likely more later once I have this
> > > > working. How does it know which one to add the event too (I want it
> > > > added to all of them) and how does it know which one to get the URL
> > > > from?
>
> > > > I am assuming it doesn't know, and might be the reason why things
> > > > aren't working.
>
> > > > On Mar 9, 11:06 am, mark_story  wrote:
>
> > > > > Well I would start with seeing if the Selector is working? does the
> > > > > click event even fire? I use mootools quite often, and there is
> > > > > nothing in cake that prevents you from doing so. Why aren't you just
> > > > > using Element.load() instead?  If you only want to do a simple GET
> > > > > request, I would just do
>
> > > > > window.addEvent('domready', function() {
> > > > >   $('ajax_replace').addEvent('click', function(event) {
> > > > >     event.stop();
> > > > >     $('about_descriptioncontent').load(this.get('href'));
> > > > >   }
>
> > > > > });
>
> > > > > Or you can keep your existing code, but you may want to prevent the
> > > > > default browser action anyways.  As you won't see the ajax result, as
> > > > > the default action will still happen.
>
> > > > > -Mark
>
> > > > > On Mar 9, 12:03 pm, "Arak Tai'Roth"  wrote:
>
> > > > > > Also considering I am using multiple links I tried this as well:
>
> > > > > > url: $$('a.ajax_replace').get('href'),
>
> > > > > > and
>
> > > > > > $$('a.ajax_replace').addEvent('click', function()
>
> > > > > > and then changing the id's to classes. I was thinking this might 
> > > > > > work,
> > > > > > but alas, it did not either.
>
> > > > > > On Mar 9, 9:19 am, "Arak Tai'Roth"  wrote:
>
> > > > > > > Yea, I'm sorry, I had fixed that problem a little while ago, that
> > > > > > > isn't the solution to the problem, it's still not working, and the
> > > > > > > page is still trying to load instead of working via AJAX.
>
> > > > > > > This is my code for the buttons I am making if that makes a
> > > > > > > difference.
>
> > > > > > > echo $html->link($html->image('/img/about/uploads/thumb.small.' .
> > > > > > > $links['About']['pict

Re: Turning $_GET/$_POST into named params

2009-03-10 Thread Casey Stark

I've been searching for the best way to do this for a while and I
agree with Martin now. I really wish cake had a more elegant solution,
but this one is definitely the cleanest and fastest.

Just so it's out there, I extended this idea to take care of the
entire query string (what cake calls params['pass']). I don't know if
my code is the best since this is my first cake project ever but it
definitely works well.

function searchParse() {
$paramString ='';

// Cycle through each param
foreach($this->params['url'] as $arg => $val) {
// Make sure we skip url
if($arg !== 'url')
$paramString .= '/'.$arg.':'.$val;
}

// Redirect to the search action with all the named params
$this->redirect('search'.$paramString);
}

On Feb 11, 2:30 am, Martin Westin  wrote:
> Hi Miles,
> One way that works really well is to have a "proxy" action accepting
> the initial search. This action reorganizes the get or post 
> parametersintonamedones and redirects to the "real" action. It sound a bit
> convoluted but it is a pretty common technique that offers a lot of
> flexibility
>
> In its simplest form it could simply look like:
>
> function proxy_search() {
>         if ( !empty($this->params['url']['name']) ) {
>                 $this->redirect('search/name:'.$this->params['url']['name']);
>         }
>
> }
>
> On Feb 11, 9:40 am, Miles J  wrote:
>
> > So I have a search/browse system thats pluggedintopagination.
> > Everything works fine as a $_POST, the data is returned and paginated
> > BUT the second I resort the results using the pagination, I lose all
> > the search queries/terms.
>
> > How can I turn $_GETor $_POSTintonamedparamsso that they are
> > continually passed to pagination?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Use Controller in Helper

2009-03-10 Thread wolf net
Controller: $this->set('controller', $this);
view: $controller->action();

2009/3/11 mscdex 

>
> On Mar 10, 12:29 pm, bäckerlehrling  wrote:
> > Now how can i acces the CustomController in the CustomHelper to call
> > the CustomController's CustomComponent Method getTest()? How would you
> > do this?
>
> I would do a call to $this->set() in your controller to set a variable
> to be used in the view which contains the results of getTest().
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Info from Auth

2009-03-10 Thread Sergei

You have to do it by hands, using find() and beforeAction() on some
actions where you need profile info. Auth doesn't get related data.

On 11 мар, 05:47, "Dave Maharaj :: WidePixels.com"
 wrote:
> Does anyone know how to get user variables from the Auth from a different
> Table?
>
> [Auth] => Array
>
>         (
>
>             [User] => Array
>
>                 (
>
>                     [id] => 6
>
>                     [username] => mary
>
>                     [email] =>
>
>                     [group_id] => 4
>
>                     [created] => 2009-03-10 14:29:45
>
>                     [modified] => 2009-03-10 14:29:45
>
>                     [last_login] => 2009-03-10
>
>                 )
>
>         )
>
> For example here Mary is User ID 6 she belongs to Group 4 which in this case
> is a TEACHER so she has a TEACHER profile which has an ID of 3. How can I
> take the Auth id 6 to find her Teacher ID in the TEACHER TABLE?
> Thanks
> Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: How to create models for complex database designs like this?

2009-03-10 Thread Rajesh

Is there any other way to redefine database to meet the requirements?
Please help me on this...


On Mar 8, 5:40 pm, Rajesh  wrote:
> I am working on movie site. Client have movie records in following
> structure.
>
> CREATE TABLE IF NOT EXISTS `movies` (
>   `id` int(50) NOT NULL AUTO_INCREMENT,
>   `movieName` varchar(500) NOT NULL,
>   `year` int(11) DEFAULT NULL,
>   PRIMARY KEY (`id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8  ;
> -- 
> CREATE TABLE IF NOT EXISTS `celebrities` (
>   `id` int(11) NOT NULL AUTO_INCREMENT,
>   `name` varchar(250) NOT NULL,
>   PRIMARY KEY (`id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8  ;
> -- 
> CREATE TABLE IF NOT EXISTS `casts` (
>   `movie_id` int(50) NOT NULL,
>   `role` varchar(200) DEFAULT NULL,
>   `celebrity_id` int(11) NOT NULL DEFAULT '0',
>   KEY `movieid` (`movie_id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
>
> As you can see movies has casts, casts table contains movie_id and
> celebrity_id. celebrities master table is for storing all master
> celebrity names.
>
> Now my problem is i have created models for movie and celebrity like
> movie hasmany cast. In movie page aim getting movie details along
> related casts. But celebrity_is is showing id instead of name how
> can i get celebrity name instead of id. Please help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Anywhere to get Previous release of cakephp

2009-03-10 Thread mscdex

On Mar 10, 2:24 pm, Robin  wrote:
> Is there anyway I can download a 1.2 alpha version of the cake? I am
> trying to upgrade my previous-built 1.2-alpha application to the new
> build, somehow lost my backup. Anyone knows where I can download the
> earlier versions? Thanks a lot!

Why are you wanting the alpha If you are upgrading to the latest
stable?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Notice (8): Undefined index - Trying to pull data from 3 related table in one view

2009-03-10 Thread mscdex

On Mar 10, 5:13 pm, JamesF  wrote:
> so it is selecting the right tables at first!  any ideas guys?

Without knowing what your controller action is doing when it sets the
$listing variable, I would guess you aren't specifying a high enough
'recursive' value or if you are using the Containable behavior, you
haven't specified 'State' in your 'contain' array in your call to
$this->Model->find().
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Use Controller in Helper

2009-03-10 Thread mscdex

On Mar 10, 12:29 pm, bäckerlehrling  wrote:
> Now how can i acces the CustomController in the CustomHelper to call
> the CustomController's CustomComponent Method getTest()? How would you
> do this?

I would do a call to $this->set() in your controller to set a variable
to be used in the view which contains the results of getTest().
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: 1.2 + Xampp +debug on = page loads of 10s+

2009-03-10 Thread Miles J

I use XAMPP all the time and mine works extremely well. Can we see
your vhosts?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Use Controller in Helper

2009-03-10 Thread Miles J

Thats completely against the concept, why on earth are you doing it
that way? Helpers are used for view support, Components are used for
controller support.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Join us at MySQL conference, April 20-23, Santa Clara, CA

2009-03-10 Thread Gwoo

We are excited that CakePHP was invited to the DotOrg pavilion for the
MySQL conference, April 20-23, Santa Clara, CA. Gwoo and Mark Story
will be attending and there are two other booth openings that need to
be filled.

So, now we have the first ever CakePHP booth pass give away. All
community members are encouraged to reply. Preference will be given to
those who have contributed in irc, group, bakery, etc.

If you are interested in helping in the booth, join #cakephp on
irc.freenode.net and send gwoo a message. If gwoo does not answer,
send a private message with your email. Please, reply before Friday,
March 13. The winners will be announced here on Monday, March 16.

We have one conference pass that will be shared between the booth pass
holders, so you should be able to attend at least one talk. In
addition, we all know this is will be a great networking opportunity
with the some of the biggest players in the open source community. You
will have to cover your own expenses, but it's worth every penny. As
an added bonus, you will receive a spiffy new CakePHP t-shirt.

See you in Santa Clara.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Info from Auth

2009-03-10 Thread Dave Maharaj :: WidePixels.com
Does anyone know how to get user variables from the Auth from a different
Table?
 
[Auth] => Array

(

[User] => Array

(

[id] => 6

[username] => mary

[email] => 

[group_id] => 4

[created] => 2009-03-10 14:29:45

[modified] => 2009-03-10 14:29:45

[last_login] => 2009-03-10

)



)


 
For example here Mary is User ID 6 she belongs to Group 4 which in this case
is a TEACHER so she has a TEACHER profile which has an ID of 3. How can I
take the Auth id 6 to find her Teacher ID in the TEACHER TABLE?
Thanks
Dave

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Notice (8): Undefined index - Trying to pull data from 3 related table in one view

2009-03-10 Thread JamesF

this is for a listing-per-city type site (real estate etc)

i have three tables
--

states
cities
listings


relationships

state hasMany city
city hasMany listing
city belongsTo state
listing belongsTo city

in my default view i get this error when i try and pull information
from the state table:
Notice (8): Undefined index:  State [APP/views/listings/index.ctp,
line 29]

it pulls just fine from the cities table and the listings table.



here are my model classes:








--



here is the relevant code in my VIEW //index.ctp
--



image( $listing['Listing']['thumb_url'],
array('alt' => 'Thumnbail'))?>  










any time i reference $listing['State']['state_name'] or $listing
['State']['state_abbrev'] i get the error.
 Notice (8): Undefined index:  State [APP/views/listings/index.ctp,
line 29] and
Notice (8): Undefined index:  State [APP/views/listings/index.ctp,
line 30]

the raw sql
--

Nr  Query   Error   AffectedNum. rows   Took (ms)
1   DESCRIBE `listings` 8   8   1
2   DESCRIBE `cities`   3   3   1
3   DESCRIBE `states`   3   3   1
4   SELECT `Listing`.`id`, `Listing`.`agent_id`, `Listing`.`city_id`,
`Listing`.`listing_description`, `Listing`.`zip_code`,
`Listing`.`listing_features`, `Listing`.`thumb_url`,
`Listing`.`mainimage_url`, `City`.`id`, `City`.`city_name`,
`City`.`state_id` FROM `listings` AS `Listing` LEFT JOIN `cities` AS
`City` ON (`Listing`.`city_id` = `City`.`id`) WHERE 1 = 1   8   
8   0

so it is selecting the right tables at first!  any ideas guys?

thanks for your help

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Error running the Cake bake script

2009-03-10 Thread Hans van Domselaar

Hi everyone,

I am new with cakephp and tried the first examples of cakephp.org
At some point I have to bake the Db Acl tables in the database with
the cake script.
The folder where the script is located is in my Windows system path.
The exact message is: Undefined variable: args in C:\Documents and ...
\cake\console\cake.php on line 579.
then it says:
CakePHP Console: Error: This file has been loaded incorrectly and
cannot continu
e.Error: Please make sure that \cake\console is in your system
path,Error: and c
heck the manual for the correct usage of this command.Error: (http://
manual.cake
php.org/)

As I already mentioned, \cake\console is in my system path.
I use Windows XP SP3, Apache 2.2, MySQL 5, PHP 4.4.9 and CakePHP 1.2

I really hope that someone can help me out, here.
Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Use Controller in Helper

2009-03-10 Thread bäckerlehrling

Hello Backers,

Im Stuck with this, how would you implement this:

I made a CustomController wich method test() calls CustomComponent-
>getTest()
I made a CustomComponent wich methods are setTest() getTest().
I made a CustomHelper wich method is getTest() wich should call the
CustomComponent->getTest()

Now how can i acces the CustomController in the CustomHelper to call
the CustomController's CustomComponent Method getTest()? How would you
do this?

There is no controller available in the Helper! Did they forget to
implement this or is this against the concept?

Thanks for any help!

Greetings

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Pass textbox value as an argument in an ajax link

2009-03-10 Thread Nicolas

Hello,

I'm new to CakePHP and I've been searching a lot to accomplish this
simple task, pass the value of a textbox as an argument in my ajax
link

text('description', array('name'=>'descbox'))); ?>

link('SAVE', array('controller'=>'produits',
'action'=>'add_desc', ARGUMENT_HERE)..

But I have no idea how to pass the textbox value to the second line of
code!?

Anyone can help me with this??

Thanks in advance

Nicolas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: create profile linked with user_id

2009-03-10 Thread brian

On Tue, Mar 10, 2009 at 1:38 AM, mscdex  wrote:
>
> If the user is logged in and has a valid session where their ID is
> stored, IMHO it's a better idea to leave out the hidden user_id field
> and set the $this->data['Profile']['user_id'] manually to the value
> stored in the session right before calling $this->Profile->save or
> $this->Profile->saveAll.

True, although if it's an admin who's editing the form we'll want the
user_id to be in a hidden field. And the SecurityComponent can make
sure that that value isn't fiddled with.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Anywhere to get Previous release of cakephp

2009-03-10 Thread Robin

Is there anyway I can download a 1.2 alpha version of the cake? I am
trying to upgrade my previous-built 1.2-alpha application to the new
build, somehow lost my backup. Anyone knows where I can download the
earlier versions? Thanks a lot!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: including CSS in the emails sent by CakePHP Email component

2009-03-10 Thread brian

On Tue, Mar 10, 2009 at 1:23 PM, K3  wrote:
>
> hi,
>
> when i set some css rules in the email layout(used when sending email
> with cake's email component) they are not applied on the reciepient
> email client. How can i set colors(and other css rules) etc in the
> email tepmplate?

You would have to link to the stylesheet. However, I recommend not
doing so because it will not work for webmail clients, eg. gmail,
yahoo, hotmail, etc. All of these load your HTML email part within
their own page REWRITING PARTS OF IT. As such, using external
stylesheets is a non-starter because it will be stripped out for
many--if not most--of your recipients. Inline style blocks are also
likely to be removed (I can't remember the details for each client
because I never do this).

The solution is to use inline style attributes within the HTML
elements (eg. style="..."). Yes, every paragraph, anchor, header,
whatever needs style info. It sucks mightily but that seems to be the
only way to keep your styles. What I've been doing is applying the
styles to the markup using regexps.

This is why I've been trying to talk clients out of HTML newsletters.
RSS is a better technology, anyway.

And always be sure to send a plaintext part (Cake gets this wrong,
IMHO, by offering to send HTML-only emails. Bad, bad, bad. There
should be no such thing.)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: How to create models for complex database designs like this?

2009-03-10 Thread Rajesh

any solution?

On Mar 9, 3:32 pm, nhathoang nhathoang 
wrote:
> According to me ,your mean use hasmany to get  informations of movies and
> celebrities with related cast, And you want in [Cast] =>
> [index]][celebrity_id ] to be replaced [Cast] => [index][celebrity_name],
> but in fact it can't,
>
> relationship in model has all 5 fields  class name, foreign key,
> condition,field,dependent, there is not any field to concern replace name.
>
> 2009/3/9 Joe Critchley 
>
>
>
> > Would it not be better to structure it through a HABTM relationship,
> > using "Cast" as your 'with' model?
>
> > So, Movie HABTM Celebrity through Cast.
> > and Celebrity HABTM Movie through Cast.
>
> > On Mar 8, 12:40 pm, Rajesh  wrote:
> > > I am working on movie site. Client have movie records in following
> > > structure.
>
> > > CREATE TABLE IF NOT EXISTS `movies` (
> > >   `id` int(50) NOT NULL AUTO_INCREMENT,
> > >   `movieName` varchar(500) NOT NULL,
> > >   `year` int(11) DEFAULT NULL,
> > >   PRIMARY KEY (`id`)
> > > ) ENGINE=MyISAM  DEFAULT CHARSET=utf8  ;
> > > -- 
> > > CREATE TABLE IF NOT EXISTS `celebrities` (
> > >   `id` int(11) NOT NULL AUTO_INCREMENT,
> > >   `name` varchar(250) NOT NULL,
> > >   PRIMARY KEY (`id`)
> > > ) ENGINE=MyISAM  DEFAULT CHARSET=utf8  ;
> > > -- 
> > > CREATE TABLE IF NOT EXISTS `casts` (
> > >   `movie_id` int(50) NOT NULL,
> > >   `role` varchar(200) DEFAULT NULL,
> > >   `celebrity_id` int(11) NOT NULL DEFAULT '0',
> > >   KEY `movieid` (`movie_id`)
> > > ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
>
> > > As you can see movies has casts, casts table contains movie_id and
> > > celebrity_id. celebrities master table is for storing all master
> > > celebrity names.
>
> > > Now my problem is i have created models for movie and celebrity like
> > > movie hasmany cast. In movie page aim getting movie details along
> > > related casts. But celebrity_is is showing id instead of name how
> > > can i get celebrity name instead of id. Please help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Paginate this, please

2009-03-10 Thread Xoubaman

After some desperating waste of hours, I've found (¿?) a solution

Instead of paginate the Robot model, I paginate the Rating model
containing Robot:

$this->paginate = array('Rating' =>
array('fields' => array('AVG(Rating.rating) AS range_avg',
'Robot.*'),
'conditions' => array('Rating.created >' => date('Y-m-d', 
strtotime
("-1 week"))),
'limit' => 10,
'group' => array('Rating.robot_id'),
'order' => array('range_avg' => 'desc'),
'contain' => array('Robot')));

The resulting query works fine and I have my robots sorted by their
range_avg, but a problem solved implies new wild problems: the
paginator does'nt paginate anything. Im my view i have

$nav_pags = $paginator->prev('<<', null, '').' '.$paginator->numbers
();
$nav_pags .= ' '.$paginator->next('>>', null, '').'';

but nav_pags is empty.

I've considered override the paginate method as said in the custom
query part of the doc, but in the same view I want to show the robots
filtered by average ratings (avg) or number of uses (count), and can
not override the method twice.

Suggestions?

Sorry for possible english mistakes.

On Mar 10, 12:51 pm, Xoubaman  wrote:
> Instead of putting here a bunch of code of my own, I'll ask you to
> tell me the way you'd manage this:
>
> Robot hasMany Rating
> Robot has many other models linked.
>
> Robot has some fields with info.
> Rating has id, rating (integer), user_id and created
>
> I want to paginate all robots' fields with their average rating from a
> week to now without quering any other model than Rating.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: need help with views

2009-03-10 Thread brian

On Tue, Mar 10, 2009 at 10:07 AM, Alfredo Quiroga-Villamil
 wrote:
>
> I believe one way to achieve this is by using:
>
> $this->render()
>
> http://api.cakephp.org/class/app-controller#method-AppControllerrender
>
> from your controller and render the view you want. This would likely
> be based on certain conditions based on your previous email. So you
> would end up with a case statement and then rendering the view you
> want.

Also, you can change $this->viewPath in the controller if your view is
under a different directory. Say you have a FoosController and the
following views.

VIEWS
  foos
view_1
view_2
  other_dir
 view_3

$this->viewPath = 'other_dir';
$this->render('view_3');

You'd likely not want to do that but you can use the same technique to
render an element directly:

$this->viewPath = 'elements/some_dir';
$this->render('some_element');

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: REST web service problem

2009-03-10 Thread Brendon Kozlowski

A Google search would be very helpful to you, so long as you also
include the correct version number in your search.  Most likely you've
downloaded Cake v1.2, whereas the Bakery article you've mentioned
points to version 1.1 - there are some subtle yet important
differences in how each of these versions work.  The tutorial will not
work with version 1.2.

http://www.littlehart.net/atthekeyboard/2007/04/11/doing-radar-in-cakephp/
^ That's an example with a BETA version of 1.2.  I *think* the only
difference would be in how the "renderElement()" method is now simply
called "element()".

I didn't verify the contents of this tutorial piece, but I BELIEVE
that this is also version 1.2 code:
http://c7y.phparch.com/c/entry/1/art,cakephp-rest


On Mar 10, 2:59 am, lakers fan  wrote:
> Hello,
>
>       Has anyone tried REST webservice with CakePhp?. I tried the tutorial in 
> bakery, which doesnt work.. I get Object not found error. Am I missing 
> anything in routes?. I m new to cake. I thought I can just create the files 
> as mentioned in tutorial and it will work.. but it didnt. Any help would be 
> great. Or can someone give an alternate link to a working web service?
>
> http://bakery.cakephp.org/articles/view/restful-web-services-with-cak...
>
> Thanks,
>
> Bharani
>
> _
> Hotmail® is up to 70% faster. Now good news travels really 
> fast.http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_0...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



including CSS in the emails sent by CakePHP Email component

2009-03-10 Thread K3

hi,

when i set some css rules in the email layout(used when sending email
with cake's email component) they are not applied on the reciepient
email client. How can i set colors(and other css rules) etc in the
email tepmplate?

thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: I wanna catch an controller object

2009-03-10 Thread mark_story

On Mar 10, 10:02 am, persivo_cunha  wrote:
> Hi,
>
> I have one controller called SetupController and, inside it, i need to
> call one function that is in another controller. but i can' t catch
> other controllers inside SetupController to do this call.
>
> I tried use Configure::listObjects, but it just returns the
> controller's name, and not the objects.
>
> Is there any way to do what i want to?

I think you need a bigger net then..

What you are doing is not going to work easily.  Controllers don't
call each other, because it usually signals poor application design /
code in the wrong place. You can probably use requestAction() to do
what you want, but it will still be hacky.

-Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: I wanna catch an controller object

2009-03-10 Thread Martin Westin


Doing something like this:
$ctrlObject =& ClassRegistry::init('MyController');
would get you an instance, only probably not a "working one" with the
model and components and things.

/Martin


On Mar 10, 5:09 pm, persivo_cunha  wrote:
> No one of these three ways could solve my problem. I can't put inside
> models.
>
> Inside AppControllers, i have three interfaces. Each subclass must say
> which concrete class that implements interface must be called. But i
> just know which concrete class in runtime. So, three setInterfaces was
> put inside AppControllers. and for each controller,  in runtime, i
> have to indicate the concrete classes. I created an controller called
> SetupController, it will be this work, but i cant acess another
> controllers from it.
>
> I could not note how the answers above can help me, because a need the
> objects.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: MooTools Ajax with Cake

2009-03-10 Thread mark_story

Not to be an ass, but mootools has tons of documentation, examples and
tutorials.  You can find lots of information on how you use effects in
the mootools docss.  Furthermore if you have more than one element
with the same ID don't expect anything to work properly.  In addition
Element.load() does do an AJAX request.  Just as a GET instead of a
POST type request.  But if you are new to Ajax and Mootools, I would
start with the docs, copy+pasting is going to lead to lots of these
type issues.

-Mark

On Mar 9, 4:39 pm, "Arak Tai'Roth"  wrote:
> Well it looks like I got it all working. Now I just need to figure out
> how to add some kind of effect to it. If anyone has any advice on
> that, that would be perfect.
>
> On Mar 9, 11:43 am, "Arak Tai'Roth"  wrote:
>
> > So I completely revamped the code in my ajax file to this:
>
> > window.addEvent('domready', function()
> > {
> >         $('ajax_replace').addEvent('click', function(event)
> >         {
> >                 event.stop();
>
> >                 var req = new Request(
> >                 {
> >                         method: 'get',
> >                         url: $('ajax_replace').get('href'),
> >                         data: { 'do' : '1' },
> >                         onComplete: function(response)
> >                         {
> >                                 $('about_descriptioncontent').set('html', 
> > response);
> >                         }
> >                 }).send();
> >         });
>
> > });
>
> > It now kinda works. I had an onRequest portion in there and that was
> > triggering, and the content was changing, it was incredibly messed up
> > (ie. wasn't outputting what I was expecting it to). However this only
> > works for the first of my links, the other ones don't do anything at
> > all.
>
> > On Mar 9, 11:25 am, "Arak Tai'Roth"  wrote:
>
> > > I don't want to do a simple GET request, I do want this as AJAX,
> > > that's just the code I found. I am extremely new to MooTools, never
> > > used it before this, in addition I am new to using AJAX period.
>
> > > One thing I just realized and am slightly confused about. With the
> > > code $('ajax_replace) I am under the understanding that I am
> > > referencing the element id = ajax_replace. However I have multiples of
> > > those on this page, 4 right now, likely more later once I have this
> > > working. How does it know which one to add the event too (I want it
> > > added to all of them) and how does it know which one to get the URL
> > > from?
>
> > > I am assuming it doesn't know, and might be the reason why things
> > > aren't working.
>
> > > On Mar 9, 11:06 am, mark_story  wrote:
>
> > > > Well I would start with seeing if the Selector is working? does the
> > > > click event even fire? I use mootools quite often, and there is
> > > > nothing in cake that prevents you from doing so. Why aren't you just
> > > > using Element.load() instead?  If you only want to do a simple GET
> > > > request, I would just do
>
> > > > window.addEvent('domready', function() {
> > > >   $('ajax_replace').addEvent('click', function(event) {
> > > >     event.stop();
> > > >     $('about_descriptioncontent').load(this.get('href'));
> > > >   }
>
> > > > });
>
> > > > Or you can keep your existing code, but you may want to prevent the
> > > > default browser action anyways.  As you won't see the ajax result, as
> > > > the default action will still happen.
>
> > > > -Mark
>
> > > > On Mar 9, 12:03 pm, "Arak Tai'Roth"  wrote:
>
> > > > > Also considering I am using multiple links I tried this as well:
>
> > > > > url: $$('a.ajax_replace').get('href'),
>
> > > > > and
>
> > > > > $$('a.ajax_replace').addEvent('click', function()
>
> > > > > and then changing the id's to classes. I was thinking this might work,
> > > > > but alas, it did not either.
>
> > > > > On Mar 9, 9:19 am, "Arak Tai'Roth"  wrote:
>
> > > > > > Yea, I'm sorry, I had fixed that problem a little while ago, that
> > > > > > isn't the solution to the problem, it's still not working, and the
> > > > > > page is still trying to load instead of working via AJAX.
>
> > > > > > This is my code for the buttons I am making if that makes a
> > > > > > difference.
>
> > > > > > echo $html->link($html->image('/img/about/uploads/thumb.small.' .
> > > > > > $links['About']['picture'], array('alt' => 
> > > > > > $links['About']['name'])),
> > > > > > '/about/view/' . $links['About']['id'], array('id' => 
> > > > > > 'ajax_replace'),
> > > > > > false, false)
>
> > > > > > I'm not so sure the problem is with the javascript, I mean it 
> > > > > > totally
> > > > > > could be, however I have found a few AJAX tutorials in MooTools, and
> > > > > > the code I have is relatively copied. However I have found no
> > > > > > tutorials anywhere regarding using MooTools AJAX with CakePHP, so
> > > > > > what's really bothering me is the setting up the controller and how
> > > > > > the associated view(s) should be set up.
>
> > > > > > On Mar 9, 3:10 a

Re: I wanna catch an controller object

2009-03-10 Thread persivo_cunha

No one of these three ways could solve my problem. I can't put inside
models.

Inside AppControllers, i have three interfaces. Each subclass must say
which concrete class that implements interface must be called. But i
just know which concrete class in runtime. So, three setInterfaces was
put inside AppControllers. and for each controller,  in runtime, i
have to indicate the concrete classes. I created an controller called
SetupController, it will be this work, but i cant acess another
controllers from it.

I could not note how the answers above can help me, because a need the
objects.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Problems enabling Controller::persistModel

2009-03-10 Thread Javier

When I enable persistModel (hoping to gain some performance by caching
models) i get this error:
Object::__openPersistent() [object.--openpersistent]: The script tried
to execute a method or access a property of an incomplete object.
Please ensure that the class definition "DetalleReceta" of the object
you are trying to operate on was loaded _before_ unserialize() gets
called or provide a __autoload() function to load the class
definition  [CORE/cake/libs/object.php, line 275]

I get this error from cake after getting this error from xdebug:
Fatal error: Maximum function nesting level of '100' reached,
aborting! in /home/lemontech/public_html/ges/cake/libs/debugger.php on
line 165

and a table showing wath seem to be arecursive call to:
ClassRegistry::init  -> model::__construct -> model::__createLinks ->
mode::__createLinkedModel -> ClassRegistry::init
and finally a call to Debugger->handleError()

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



How to create form for hasMany field to be input?

2009-03-10 Thread Teng Yao

Hello everybody

I am writing a video sharing web site. I need the user to input video
information, every video has one or more video files, (records of
video_files only contain the path information of the files, files are
uploaded through ftp clients, and the user have to input the path
informations). The Video and VideoFile models are created as follows:

class Video extends AppModel {
  var $hasMany = array('VideoFile');

}

class VideoFile extends AppModel {
...
}

How to create a form so that the user can input all the video file
path information at the same time easily?

SQL script used to create the two tables:
CREATE TABLE videos (
id INT ...,
...
);

CREATE TABLE video_files (
id INT ...,
...
video_id INT,
...

FOREIGN KEY(video_id) REFERENCES video(id)
);

PHP code:
create('Video');
echo $form->input('title');
...
echo $form->input('VideoFile'); // <--How to write this line
echo $form->end('Add');
?>

Thanks
--Teng Yao

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Console App Path

2009-03-10 Thread Steven

Hi,

I am really having difficulties getting this to work my app folder is
located in:

D:\Webserver\bcstest\app

And I have been trying to use the schema command in console to create
the ACL tables. However it keeps failing because the Schema could not
be loaded. And I know its because of this:

Current Paths:
 -app: app
 -working: /bcstest/app
 -root: /bcstest
 -core: D:\Webserver\bcstest

I have tried various cake -app paths but can't seem to get it right,
what should I be typing?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Console App Path

2009-03-10 Thread Steven

Hi,

I am really having difficulties getting this to work my app folder is
located in:

D:\Webserver\bcstest\app

And I have been trying to use the schema command in console to create
the ACL tables. However it keeps failing because the Schema could not
be loaded. And I know its because of this:

Current Paths:
 -app: app
 -working: /bcstest/app
 -root: /bcstest
 -core: D:\Webserver\bcstest

I have tried various cake -app paths but can't seem to get it right,
what should I be typing?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: I wanna catch an controller object

2009-03-10 Thread Martin Westin

Unimaginative standard answers: :)

You can try to see if the task you need performed by the other
controller could be put into a model. Most of the real work should be
done by models.

You can also try to make a Component out of that code you need to
call.

The last resort or a quick and dirty way "forward" is to use the
dreaded requestAction() (or manually instantiating the controller
using ClassRegistry if you don't need it to act as a normal
controller).





On Mar 10, 3:02 pm, persivo_cunha  wrote:
> Hi,
>
> I have one controller called SetupController and, inside it, i need to
> call one function that is in another controller. but i can' t catch
> other controllers inside SetupController to do this call.
>
> I tried use Configure::listObjects, but it just returns the
> controller's name, and not the objects.
>
> Is there any way to do what i want to?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: 1.2 + Xampp +debug on = page loads of 10s+

2009-03-10 Thread Martin Westin


I can't remember ever seeing a definite answer as to why this is or
how to fix it... the popular way seems to be to stop using xampp and
try WAMP instead or some of those other fake-linux setups.

If you are the curious type:
The problem should be with some less common WinXP settings and Cake
that don't like each-other. Cache, system permissions... another web-
server... something.

btw. I have no idea about this problem since I very rarely run
Windows. I have just seen this question crop up regularly for months
and months.

/Martin


On Mar 10, 1:37 pm, voycey  wrote:
> Hi all,
>
> Do you have any idea why my page loads when running on my localhost
> are so high? The actual time spent on queries is normally around the
> 600ms on a page yet it takes sometimes up to 20seconds to completely
> finish loading the page.
>
> I do have debug on - and it does seem to rectify this when I turn it
> off (still not speedy).
>
> I am running cake 1.2, php5, XP and using xampp. I have pretty
> standard stuff in my cake App - am using prototype top provide JS
> functionality, and have admin routing enabled.
>
> I am accessing my cake installation using a modified HOSTS file in
> windows and virtual hosts in apache.
>
> I have tried previously suggested stuff such as turning off firebug
> but to no avail.
>
> Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



ACL for specific resources?

2009-03-10 Thread brian

Is it possible to set an ACO on specific rows? As an example, if I
have an Item table, could I have some Groups be able to read Item.43,
while not Item.44? Same goes for other CRUD operations. A lot of the
ACL information I've been seeing suggests that I can do this, but I
haven't seen any examples that go there. Am I just mis-reading this?

If so, please post a link to something that explains this, if one is known.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Recursive Count ?

2009-03-10 Thread weckmann

OK, I finally made it with this 'join' parameter, that works... but
that is not much better than using ->query   ;-) A little bit better
at least...

I still think there is a bug because I went to the IRC Cake group
yesterday evening and discussed the problem, and someone told me that
I should set up the backwards relations with HasMany to ensure Model
linking...

I did so, and it did not change a thing, Cake still thought it would
not have to JOIN the deeper models because I was not calling any of
their fields.

So, Cake is ignoring the fields used in 'conditions' for determing if
a Model is needed or not. Thats the bug.
When I was doing a normal 'find' without 'fields' I got the correct
JOINs and the whole data... but using that COUNT thing messed it up.


In the end its probably so that most people will say: If you want to
do such a complicated query, just use query, thats what its for... ;-)
I just don't like to capitulate ;-)


Thanks all.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: can't connect to database -- no reason given

2009-03-10 Thread GrantB

Oops, I muddled the terminology a bit.  Corrected message:

It turned out that my db user did not have access to the cake
database.  So it wasn't that Cake couldn't connect to the Mysql (a
stand-alone test script was able to connect just fine), but that Cake
couldn't access the database that I created.

It would be handy if the Cake DB error message was a little more
informative.  It's certainly possible for PHP to distinguish between a
failed Mysql connection and a failed database access.


On Mar 9, 5:47 pm, GrantB  wrote:
> It turned out that my db user did not have access to the cake
> database.  So it wasn't that Cake couldn't connect to the DB (a stand-
> alone test script was able to connect just fine), but that Cake
> couldn't access the table.
>
> It would be handy if the Cake DB error message was a little more
> informative.  It's certainly possible for PHP to distinguish between
> failed DB connection and failed table access.
>
> -Grant
>
> On Mar 9, 7:27 am, persivo_cunha  wrote:
>
>
>
> > if you are sure that database.php is correct, verify if your database
> > is running, because this message just shows when the cakephp really
> > can't connect with database.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: 1.2 + Xampp +debug on = page loads of 10s+

2009-03-10 Thread georg

which debug level are you running?

you can try http://thechaw.com/debug_kit it gives a break down of how
long various parts took to run
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Advanced relationships (roles on an element basis)

2009-03-10 Thread jakobjp

I'm trying to figure out how to create a system that can handle the
following:

Models: user, post, category
Roles: regular, moderator, admin

- User ("regular user") can create posts in categories.
- User ("regular user") can edit own posts.

- Multiple users can have the role "moderator" in multiple categories.
- "Moderators" can do the same things as "regular user" and edit posts
in categories they are "moderator" for.

- Multiple users can have the role "admin" in multiple categories.
- "Admins" can do the same things as "moderators", but also delete
posts in the category and edit the categories they are "admin" for.

Basically each user can be a moderator in one, an admin for another,
and a simple user in a third category.
This includes roles per element (such as user1 and user7 are
"moderator" for category3, while user7 is also "admin" for category9)
and inheritance of role-rights (Moderator can do what regular user can
do plus something more. Admin can do what moderator can (hence, also
what regular can) plus something more).

I have tried reading up on tons of material about ACL, but don't seem
to get the hang of it...

Hope a smart mind here can guide me in the right direction :-)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: l10n in cakephp > can't get app to switch language

2009-03-10 Thread jakobjp

This is weird: I can successfully change the language with $this-
>Session->write('Config.language', 'fr'); in the beforeRender()
function in apps_controller.php

Why does it not work in beforeFilter()?

Does it matter where it's being done?



On Mar 10, 2:09 pm, jakobjp  wrote:
> On Mar 10, 2:25 am, "jitka (poLK)"  wrote:
>
> > > I have created two test languages in:
> > > /app/locale/eng/LC_MESSAGES/default.php
> > > /app/locale/fre/LC_MESSAGES/default.php
>
> > php extension is reason. CakePHP assumes there plaintext .po (or
> > preferrable binary .mo) files.
>
> Yeah that was a mistake in my email. The files are already ".po" files
> in plaintext. The content is as follows (in the english one):
> msgid   "test"
> msgstr  "The Test"
>
> Both my testing language work fine when setting the language in
> core.php, but I can't switch away from the default language in the
> application controller.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: need help with views

2009-03-10 Thread Alfredo Quiroga-Villamil

I believe one way to achieve this is by using:

$this->render()

http://api.cakephp.org/class/app-controller#method-AppControllerrender

from your controller and render the view you want. This would likely
be based on certain conditions based on your previous email. So you
would end up with a case statement and then rendering the view you
want.

Regards,

Alfredo

On Tue, Mar 10, 2009 at 10:02 AM, tibit  wrote:
>
> Hi,
> i have a question about cakephp views , i want to have diferent views
> using the same function from controller.Is this possible?
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



I wanna catch an controller object

2009-03-10 Thread persivo_cunha

Hi,

I have one controller called SetupController and, inside it, i need to
call one function that is in another controller. but i can' t catch
other controllers inside SetupController to do this call.

I tried use Configure::listObjects, but it just returns the
controller's name, and not the objects.

Is there any way to do what i want to?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



need help with views

2009-03-10 Thread tibit

Hi,
i have a question about cakephp views , i want to have diferent views
using the same function from controller.Is this possible?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Multiple Record Validation

2009-03-10 Thread starkey

This turned out to be an error in my code, a typo in a variable.  Once
I fixed the variable name everything worked great!  Cake rocks!



On Mar 9, 4:58 pm, starkey  wrote:
> Hello all,
>
> I've seen several articles/posts on this and have had some success
> following them, however, now I need to validate the data and I am
> having to do too much jerry-rigging of the data to get the form to
> display the originally submitted data with the errors.
>
> For example, I have this name and select box on each row (ii is the
> increment):
> $form->input('User.'.$ii.'.name');  // User.0.name
> $form->input('User.'.$ii.'.department_id'); // User.0.department_id
>
> When the form is posted and a validation error is found with the name
> then the original name and department option are not repopulated as
> they are with single row create/update forms.
>
> I saw this was fixed in Ticket #3044 but I can't seem to get it to
> work.
>
> Would you offer some guidance?
>
> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: l10n in cakephp > can't get app to switch language

2009-03-10 Thread jakobjp



On Mar 10, 2:25 am, "jitka (poLK)"  wrote:
> > I have created two test languages in:
> > /app/locale/eng/LC_MESSAGES/default.php
> > /app/locale/fre/LC_MESSAGES/default.php
>
> php extension is reason. CakePHP assumes there plaintext .po (or
> preferrable binary .mo) files.

Yeah that was a mistake in my email. The files are already ".po" files
in plaintext. The content is as follows (in the english one):
msgid   "test"
msgstr  "The Test"

Both my testing language work fine when setting the language in
core.php, but I can't switch away from the default language in the
application controller.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



1.2 + Xampp +debug on = page loads of 10s+

2009-03-10 Thread voycey

Hi all,

Do you have any idea why my page loads when running on my localhost
are so high? The actual time spent on queries is normally around the
600ms on a page yet it takes sometimes up to 20seconds to completely
finish loading the page.

I do have debug on - and it does seem to rectify this when I turn it
off (still not speedy).

I am running cake 1.2, php5, XP and using xampp. I have pretty
standard stuff in my cake App - am using prototype top provide JS
functionality, and have admin routing enabled.

I am accessing my cake installation using a modified HOSTS file in
windows and virtual hosts in apache.

I have tried previously suggested stuff such as turning off firebug
but to no avail.

Any help would be greatly appreciated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: l10n in cakephp > can't get app to switch language

2009-03-10 Thread jakobjp

Unfortunately that didn't do the trick... :-(

On Mar 10, 1:42 am, Miles J  wrote:
> I use app import and it worked for me:
>
> App::import('Core', 'l10n');
> $l10n = new L10n();
> $l10n->get($locale);
>
> I also place it in my app controller beforeFilter(). If you are doing
> it in another controller, be sure to call parent::beforeFilter() in
> that controllers beforeFilter().

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Validate rule: multiple (CookBook -> 4.1.4.17 Multiple)

2009-03-10 Thread visskiss

Hey Paul,

I'm trying this
>     var $validate = array(
>       'Role' => array(
>         'rule' => array('multiple', array('min'=>1)),
>         'message' => 'Select one or more roles'
>       )
>     );

And it's not checking to see that at least one box is checked.  Any
ideas?

In my case it's:
var $validate = array(
'user_id' => array('numeric'),
'title' => array('notempty'),
'body' => array('notempty'),
'Category' => array(
'rule' => array('multiple', array('min' => 1))
),
'Scene' => array(
'rule' => array('multiple', array('min' => 1))
)
);

Any suggestions greatly appreciated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



ActAs Image column behavior problem

2009-03-10 Thread kaushik

I want to upload an image and a flv file using ActAs Image column
behavior. But it is giving error like that:

copy(/home6/smallbi9/public_html/subdomains/videon/app/webroot/img//
Video/7//videoFile.application/octet-stream) [function.copy]: failed
to open stream: No such file or directory [APP/models/behaviors/
image.php, line 312]

It is working good for any other type file. Any change needed in
"image.php" file to upload flv file?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Multiple foreign key references to one table

2009-03-10 Thread Vera Childs
On Tue, Mar 10, 2009 at 8:09 AM, Vera Childs  wrote:

> I rebaked everything, and the code is copied and pasted between the Member
> and Chapter models, so I don't know what would cause it to show the
> drop-down for one and not the other?
>
>
Fixed this one too, but have no clue what I did... I just rebaked the Member
controller and views one more time and magically, the state drop-down
appeared! I wonder if I edited an old copy of the model code that HTML-Kit
may have had open? I don't know. But it works now.

Btw, I am totally loving CakePHP. I started reading about it on Sunday,
wrote my first database and code on Monday, and now on Tuesday I have my
database and a basic set of forms for this project complete. I just need to
add a bit of extra logic and handle user authentication, and I'll be done.
Amazing. :)


-Vera

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: ACL creation on registration

2009-03-10 Thread Fred

Ok I figured this outIt wasn't what I thought at all and is a
stupid error, but by sharing maybe I can prevent this from happening
to someone else.

What happened is I had the model registered in my User Controller like
so:
App::import('Model','Realm');
$Realm = new Realm;

This didn't work. When I changed the code to be:
$this->User->Realm->save($data)

it works. So I guess if you have a belongsTo relationship (Realm
belongs to user) in your controller then you cannot use the
App::import and have it always work.

Fred

On Mar 10, 1:19 am, Fred  wrote:
> I am having trouble getting ACL to function properly. Everything works
> as long as you are logged in. However, now I want to dynamically
> create a user when they register (i.e. they aren't logged in). So I
> create the user (that works) and then create a realm (a realm is
> requester for ACL and basically maps users to AROs/permissions). This
> all works until I try to create a new Realm without being logged in
> (this is the only possible difference that I can see). The Realm is
> actually created in the save function, however in the AfterSave call I
> get an error in the acl.php file. I cannot figure out why this is
> happening or how to prevent it. Any help is much appreciated.
>
> Notice (8): Undefined property: Realm::$Aro [CORE\cake\libs\model
> \behaviors\acl.php, line 77]
>
> Fatal error: Call to a member function node() on a non-object in C:
> \xampp\htdocs\ispi\cake\libs\model\behaviors\acl.php on line 77
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Multiple foreign key references to one table

2009-03-10 Thread Vera Childs
On Tue, Mar 10, 2009 at 3:55 AM, boscovgrunenfeld  wrote:

> When I bake the views, I get a nice drop-down box for the Members view
> to select the chapter (Members belongsTo Chapters via the foreign key
> chapter_id), but I'm getting regular text boxes for the treasurer and
> contact of the chapter, probably because of the naming convention (I
> obviously can't call those fields member_id).
>
>
Nevermind, I solved that problem! I looked at how the chapter was working
for members, and copied that association, so now Member has a hasMany
relationship with Contact and Treasurer, foreign keys contact_id and
treasurer_id of the Chapter class. And Chapter has a belongsTo association
with Contact and Treasurer, with the same foreign keys and the Member class.
I now have drop-downs for Contact and Treasurer. My relationships don't
*sound* right to me, but they're working at the moment. :P

Now the weird problem I'm having is that I noticed I didn't have a drop-down
for state in either chapter or member (I have a states table that lists all
the US states and abbreviations). So I copied the relationships that were
getting me drop-downs, and the chapter views now have a state drop-down, but
the member views don't?!? I have the exact same code in both models... Both
Member and Chapter have belongsTo relationships with State on foreign key
state_id (and both chapters and members tables list state_id as their
foreign keys referencing states(id) in the MySQL database), and the State
model has hasMany relationships with both Chapter and Member on foreign key
state_id. I rebaked everything, and the code is copied and pasted between
the Member and Chapter models, so I don't know what would cause it to show
the drop-down for one and not the other?


-Vera

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Captcha reload problem, works in ff not in IE

2009-03-10 Thread iraj23


noone can not help me ?
-- 
View this message in context: 
http://www.nabble.com/Captcha-reload-problem%2C-works-in-ff-not-in-IE-tp17855131p22433313.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Paginate this, please

2009-03-10 Thread Xoubaman

Instead of putting here a bunch of code of my own, I'll ask you to
tell me the way you'd manage this:

Robot hasMany Rating
Robot has many other models linked.

Robot has some fields with info.
Rating has id, rating (integer), user_id and created

I want to paginate all robots' fields with their average rating from a
week to now without quering any other model than Rating.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Can error messages show only on submitted form?

2009-03-10 Thread jsmale

Thanks nhathoang.

Your solution of defining fields with different variable names &
reorganising the data in the controller is a fix to the problem. It's
not the cleanest solution but it works.

On Mar 10, 7:56 pm, nhathoang nhathoang 
wrote:
> hi jsmale, all your requirement  probable release , I have a example to
> offer you ,please download my attached file , If you don't understand , you
> can contact with me through my yahoomail nhathoangvn2...@yahoo.com, we will
> trade experience together
>
> 2009/3/10 mscdex 
>
>
>
> > On Mar 9, 11:55 pm, jsmale  wrote:
> > > Have I done something incorrectly?
>
> > It's probably because the form fields are named exactly the same for
> > both forms.
>
>
>
>  Desktop.rar
> 1KViewDownload
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Model without table

2009-03-10 Thread Walther

Just add in your model:

var $table = false;

That will tell cake that there is no table associated with that model.

On Mar 10, 10:10 am, kaushik  wrote:
> I am going to develop a section in a site, where there is no database
> operation. Only there will a form and a mail will fire on submit of
> the very form. How to design model for this section?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: the blog post problem

2009-03-10 Thread Jon Bennett

Hi bilaliz,

> its WAMP server that i have installed on my notebook, the way i
> learned to deploy was to simply download cake and copy all files in to
> the www folder and i should able to see the default cake index, and
> indeed that worked ..
> so for example my views are in D:\wamp\www\app\views\posts

As it's a WAMP server, I would expect you not to need 'index.php' in
the URLs. Do you have the required 3 .htaccess files in place?

Cheers,

Jon


-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: hasMany Issue - no data loads

2009-03-10 Thread Sanfly

I always have it set to 2 on my test system.  The page simply doesnt
load.  In firefox I get a "no data sent" error.  In IE I get a cant
find page error.

On Mar 10, 6:21 pm, mscdex  wrote:
> On Mar 9, 1:14 am, Sanfly  wrote:
>
> > Hi All
>
> > Ive been trying to get a hasMany association working, but It just wont
> > seem to work.  The pages which use this model simply wont load when I
> > try to run them
>
> What does Cake say when you have 'debug' set to 2 in config\core.php?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Newbie question: Missing controller

2009-03-10 Thread Son Dat Giang
^^
@Robin, what is your cake version? and how about your mod_rewrite.

-
Best regards !
Giang Son Dat
Mobile: +84 988114164
Email giangson...@gmail.com, giangson...@yahoo.com


On Tue, Mar 10, 2009 at 12:20 AM, Robin  wrote:

>
> I am completely new to cakephp. I am having this error message as
> following, which I cannot figure out. Anyone please point me to the
> right direction please?
>
> When I put in "http://localhost/cake/"; in my address bar, it gives me
> the following error:
>
> 
> Missing Controller
> Error: Index.php&url=Controller could not be found.
>
> Error: Create the class Index.php&url=Controller below in file: app
> \controllers\index.php&url=controller.php
>
>  class Index.php&url=Controller extends AppController {
>
>var $name = 'Index.php&url=';
> }
> ?>
> Notice: If you want to customize this error message, create app\views
> \errors\missing_controller.ctp
>
> --
> While I was playing around with the code, it seems anytime there's
> something in the url after "http://localhost/cake/";, it will give a
> missing controller error. And the controller name is just whatever
> after the "http://localhost/cake/";. For example, in the message above,
> the missed controller name is the defaulted "index.php."
>
> Anyone has any idea how to fix that? Thanks in advance!!!
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: hasMany Issue - no data loads

2009-03-10 Thread nhathoang nhathoang
I tested your data ,it isn't wrong , has many also contain invoked
information between EventSignUp and EventOptionSignUp, please send all your
relevant file to me , I will try test to help you and answer for you as soon
as, if you have yahoomail please add my one,
nhathoangvn2...@yahoo.com.

2009/3/9 Sanfly 

>
> Hi All
>
> Ive been trying to get a hasMany association working, but It just wont
> seem to work.  The pages which use this model simply wont load when I
> try to run them
>
> I have two databases:  events_signups, events_options_signups
>
> Each signup can have many different options, which is why I have the
> table events_options_signups to link them.
>
> The field in events_options_signups table has a field event_signup_id
> where I store the id of the events_signups entry it belongs to
>
> In my EventsOptionsSignup model I have a belongsTo association which
> works great:
>
> var $belongsTo = array(
>'EventsSignup' =>
>array('className' => 'EventsSignup',
>'foreignKey' =>
> 'event_signup_id',
>)
>
>);
>
> But I cant get the hasMany association to work when going the other
> way, and i need to be able to extract that data when searching by
> EventsSignup
>
> var $hasMany = array(
>'EventsOptionsSignup' =>
>array('className' => 'EventsOptionsSignup',
>'foreignKey' =>
> 'event_signup_id',
>),
>);
>
> Is there anything im doing wrong that is obvious to anyone?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Multiple foreign key references to one table

2009-03-10 Thread boscovgrunenfeld

I've been scouring the manual and this group and the web, and am not
quite understanding what I need to do here, mainly with the naming
convention and such.

I have an organization with chapters and members. Each chapter has a
contact and a treasurer (these can be the same person) that I need to
keep up with. So my Chapters table is set up with contact_id and
treasurer_id both being foreign keys to Members.id.

I set up associations, although they may or may not be correct... in
Chapters, I put:

var $belongsTo = array(
'Contact' => array('className' => 'Member',
'foreignKey' => 
'contact_id',
'conditions' => 
'',
'fields' => '',
'order' => ''
),
'Treasurer' => array('className' => 'Member',
'foreignKey' => 
'treasurer_id',
'conditions' => 
'',
'fields' => '',
'order' => ''
)
);

When I bake the views, I get a nice drop-down box for the Members view
to select the chapter (Members belongsTo Chapters via the foreign key
chapter_id), but I'm getting regular text boxes for the treasurer and
contact of the chapter, probably because of the naming convention (I
obviously can't call those fields member_id).

So how exactly should I be getting the drop-down box for those two
fields (contact and treasurer)? I assume I need to change some code in
the controller/view, since it's not automagically being produced? Or
is there some way to have Bake automagically recognize those fields
and list the Member name in a drop-down?

Thanks!

-Vera

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Can error messages show only on submitted form?

2009-03-10 Thread nhathoang nhathoang
hi jsmale, all your requirement  probable release , I have a example to
offer you ,please download my attached file , If you don't understand , you
can contact with me through my yahoomail nhathoangvn2...@yahoo.com, we will
trade experience together

2009/3/10 mscdex 

>
> On Mar 9, 11:55 pm, jsmale  wrote:
> > Have I done something incorrectly?
>
> It's probably because the form fields are named exactly the same for
> both forms.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Desktop.rar
Description: Binary data


Newbie question: Missing controller

2009-03-10 Thread Robin

I am completely new to cakephp. I am having this error message as
following, which I cannot figure out. Anyone please point me to the
right direction please?

When I put in "http://localhost/cake/"; in my address bar, it gives me
the following error:

Missing Controller
Error: Index.php&url=Controller could not be found.

Error: Create the class Index.php&url=Controller below in file: app
\controllers\index.php&url=controller.php


Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp
--
While I was playing around with the code, it seems anytime there's
something in the url after "http://localhost/cake/";, it will give a
missing controller error. And the controller name is just whatever
after the "http://localhost/cake/";. For example, in the message above,
the missed controller name is the defaulted "index.php."

Anyone has any idea how to fix that? Thanks in advance!!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Model without table

2009-03-10 Thread kaushik

I am going to develop a section in a site, where there is no database
operation. Only there will a form and a mail will fire on submit of
the very form. How to design model for this section?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: when I have set the Configure::write('debug', 0), how can I let a new model can be use.

2009-03-10 Thread Mauricio Morales

You can manually delete the tmp/cache/models/* data.

Are you sure that your table was created with the same DB user that
Cake's App uses?... It could be a permission problem.

On Mar 9, 4:36 pm, Rimoe  wrote:
> Thank you for your answer,
> so I have use the (Cache::clear()) in my controller,
> but it has no anything has happened.
> where should i invoke the Cache::clear()?
> do you know,
> then, i have set the Turn on  of (Configure::write('Cache.disable', true);)
> but now I can't turn off it, if I do it, my site will not run.
>
> what should I do,  can you tell me more detail?
>
> thank you very much.
>
> sincerely
>
> rimoe
>
> 2009/3/9 Dardo Sordi Bogado 
>
>
>
> > > I have set (Configure::write('debug', 0)) in my core.php,
> > > now I  added a table,
> > > but the cake can't find the model, and can't use the new model,
> > > In the situation, what should I do?
>
> > clear the cache!
>
> > > and I want to use the information of debug,
> > > but I don't want to let it show in page, only show in a file,
> > > what can I do.
>
> > You can create a custom datasource extending the one you are using but
> > loggin the sql queries instead of dumping them at the end of page. Ex:
> >http://bin.cakephp.org/view/503102878
>
> > HTH,
> > - Dardo Sordi.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: MooTools Ajax with Cake

2009-03-10 Thread r4zv4n

Inside #about_desctriptioncontent you can add another div which you
will fade in :)

On Mar 9, 10:39 pm, "Arak Tai'Roth"  wrote:
> Well it looks like I got it all working. Now I just need to figure out
> how to add some kind of effect to it. If anyone has any advice on
> that, that would be perfect.
>
> On Mar 9, 11:43 am, "Arak Tai'Roth"  wrote:
>
> > So I completely revamped the code in my ajax file to this:
>
> > window.addEvent('domready', function()
> > {
> >         $('ajax_replace').addEvent('click', function(event)
> >         {
> >                 event.stop();
>
> >                 var req = new Request(
> >                 {
> >                         method: 'get',
> >                         url: $('ajax_replace').get('href'),
> >                         data: { 'do' : '1' },
> >                         onComplete: function(response)
> >                         {
> >                                 $('about_descriptioncontent').set('html', 
> > response);
> >                         }
> >                 }).send();
> >         });
>
> > });
>
> > It now kinda works. I had an onRequest portion in there and that was
> > triggering, and the content was changing, it was incredibly messed up
> > (ie. wasn't outputting what I was expecting it to). However this only
> > works for the first of my links, the other ones don't do anything at
> > all.
>
> > On Mar 9, 11:25 am, "Arak Tai'Roth"  wrote:
>
> > > I don't want to do a simple GET request, I do want this as AJAX,
> > > that's just the code I found. I am extremely new to MooTools, never
> > > used it before this, in addition I am new to using AJAX period.
>
> > > One thing I just realized and am slightly confused about. With the
> > > code $('ajax_replace) I am under the understanding that I am
> > > referencing the element id = ajax_replace. However I have multiples of
> > > those on this page, 4 right now, likely more later once I have this
> > > working. How does it know which one to add the event too (I want it
> > > added to all of them) and how does it know which one to get the URL
> > > from?
>
> > > I am assuming it doesn't know, and might be the reason why things
> > > aren't working.
>
> > > On Mar 9, 11:06 am, mark_story  wrote:
>
> > > > Well I would start with seeing if the Selector is working? does the
> > > > click event even fire? I use mootools quite often, and there is
> > > > nothing in cake that prevents you from doing so. Why aren't you just
> > > > using Element.load() instead?  If you only want to do a simple GET
> > > > request, I would just do
>
> > > > window.addEvent('domready', function() {
> > > >   $('ajax_replace').addEvent('click', function(event) {
> > > >     event.stop();
> > > >     $('about_descriptioncontent').load(this.get('href'));
> > > >   }
>
> > > > });
>
> > > > Or you can keep your existing code, but you may want to prevent the
> > > > default browser action anyways.  As you won't see the ajax result, as
> > > > the default action will still happen.
>
> > > > -Mark
>
> > > > On Mar 9, 12:03 pm, "Arak Tai'Roth"  wrote:
>
> > > > > Also considering I am using multiple links I tried this as well:
>
> > > > > url: $$('a.ajax_replace').get('href'),
>
> > > > > and
>
> > > > > $$('a.ajax_replace').addEvent('click', function()
>
> > > > > and then changing the id's to classes. I was thinking this might work,
> > > > > but alas, it did not either.
>
> > > > > On Mar 9, 9:19 am, "Arak Tai'Roth"  wrote:
>
> > > > > > Yea, I'm sorry, I had fixed that problem a little while ago, that
> > > > > > isn't the solution to the problem, it's still not working, and the
> > > > > > page is still trying to load instead of working via AJAX.
>
> > > > > > This is my code for the buttons I am making if that makes a
> > > > > > difference.
>
> > > > > > echo $html->link($html->image('/img/about/uploads/thumb.small.' .
> > > > > > $links['About']['picture'], array('alt' => 
> > > > > > $links['About']['name'])),
> > > > > > '/about/view/' . $links['About']['id'], array('id' => 
> > > > > > 'ajax_replace'),
> > > > > > false, false)
>
> > > > > > I'm not so sure the problem is with the javascript, I mean it 
> > > > > > totally
> > > > > > could be, however I have found a few AJAX tutorials in MooTools, and
> > > > > > the code I have is relatively copied. However I have found no
> > > > > > tutorials anywhere regarding using MooTools AJAX with CakePHP, so
> > > > > > what's really bothering me is the setting up the controller and how
> > > > > > the associated view(s) should be set up.
>
> > > > > > On Mar 9, 3:10 am, r4zv4n  wrote:
>
> > > > > > > Hi,
>
> > > > > > > The fact that the page is loading instead of the Ajax request 
> > > > > > > being
> > > > > > > sent should signal that there's an error in your JS (if it were a 
> > > > > > > Cake
> > > > > > > err, you would have had weird responses).
>
> > > > > > > Upon closer inspection, here is the problem:
>
> > > > > > > $('ajax_replace').addEvent('click', function(
> >