Re: requestAction wants view from requested controller

2011-03-27 Thread mlecho
"controller" => > $this->controller, "action" => $this->action), array('pass' => > array($this->actionParams))); >     $this->set("data", $data); >         $this->render("/elements/api"); >     return true; >

requestAction wants view from requested controller

2011-03-27 Thread mlecho
hi, i am building an api plugin for my webapp...i have almost everything working well except for the actual rendering. The plugin will authenticate and then essentially, from the url, do an action , grab the data, and return it as xml or json. An exmaple url might be: http://webapp.local/api/?token

adding ajax inputs to a form

2010-02-18 Thread mlecho
hi, i have a page where i am adding dynamic input sets to an existing form . The model relationships are as such: Place->hasMany cities so, in the form, the rendered page would have the Place -input: name -input: region -input: weather -Cities: -input[0]: name -input[0]: region -input[0]: weather

twitter and cake- Rate limit exceeded

2010-01-20 Thread mlecho
hi. i have a script that pulls the feeds of a specific person in my following list. I have tried to approaches , both of which over time produce the same results. The first attempt was to use the Twittersource from the bakery(http://bakery.cakephp.org/articles/view/ twitter-datasource). The second

filter by hasMany results

2009-11-19 Thread mlecho
hi, i have a query that pulls all the hasMany models associated to this class. So, for example, Team hasMany Riders. function roster($id) { //set recursive to 1 for team members $data = $this->Team->find($id,array("recursive"=>0)); $this->se

Re: not getting belongsTo objects

2009-11-09 Thread mlecho
n > > On Oct 30, 3:54 pm, mlecho wrote: > > > > > hi- i am so close on this one > > > Imagine three models...Event , Venue, and EventType. Currently, Event > > belongsTo Venue. Each event has a specific venue at which it will > > occur. If i nav to events

Re: javascript helper adding slashed to JSON object output

2009-11-07 Thread mlecho
ah- echo stripslashes($javascript->object($data)); seems to do the trick unless there is a better way? On Nov 7, 9:09 am, mlecho wrote: > hi, i am using the javascript helper to generate JSON feeds. It works > great, except for one thing...if a json property has  a value that is >

javascript helper adding slashed to JSON object output

2009-11-07 Thread mlecho
hi, i am using the javascript helper to generate JSON feeds. It works great, except for one thing...if a json property has a value that is an absolute url, cakephp wants to escape all the slashes...exampe: {"flag_img":"http:\/\/www.website.com\/themes\/images\/country\/ countryimage.png"} how c

not getting belongsTo objects

2009-10-30 Thread mlecho
hi- i am so close on this one Imagine three models...Event , Venue, and EventType. Currently, Event belongsTo Venue. Each event has a specific venue at which it will occur. If i nav to events/view/2, i get the expected Event object and it's Venue object. Great. It makes since in my mind that

cake and amfphp

2009-04-10 Thread mlecho
i recently installed the amfphp framework into cake. When i go the amfbrowser, i get this: Fatal error: Call to undefined function loadcontroller() in / Applications/MAMP/htdocs/SITE/webroot/amfbrowser/config.inc.php on line 75 any thoughts on where to start debugging this? i took the framework

Re: altering the email validation

2009-04-03 Thread mlecho
Duh- sorry http://book.cakephp.org/view/150/Custom-Validation-Rules On Apr 3, 11:11 am, mlecho wrote: > hi...i am using the email validation feature for a few forms in my > application. Today, we discovered a client was getting a failure from > an email following a pattern lik

altering the email validation

2009-04-03 Thread mlecho
hi...i am using the email validation feature for a few forms in my application. Today, we discovered a client was getting a failure from an email following a pattern like so: per...@website-a.com the "-" seems to throw the error. Is there a way i can alter the regex or the validation rule? --~--~-

$scripts_for_layout breaks in seperated header

2009-01-31 Thread mlecho
hi- in my app, i have sperated the header and footer as new elements (header.ctp/footer.ctp). The default.ctp uses $this->element('header') for example, to retrieve the header. I am doing this becuase i have to change headers/footers from layout to layout (sometimes). Anyway, by seperating the h