Re: Error View in JSON?

2009-09-27 Thread Dr. Loboto
layout = 'ajax'; $error = array ('type' => 'jsonError', 'message' => $message); $this->controller->set('error', $error); $this->controller->helpers[] = 'Javascript'; $this->_outputMessage('json_error_message'); } } ?> On Sep

Re: Routing related issue

2009-09-27 Thread stevel
I figured it out finally. To solve the problem, I use the $html->url helper. In this case it will be url: "url('/publishers/update_city_select'); ?>" Perhaps this might help someone else with the same problem. cheers, Steve --~--~-~--~~~---~--~~ You received th

Routing related issue

2009-09-27 Thread stevel
I encountered an issue related to routing which I hope someone can help me understand. I have a controller called publishers and an action called search. In this search view I have an ajax form which upon change to the form select, calls an action to get the options for a second form select. When

Re: Help setting up

2009-09-27 Thread Miles J
Nothing you can really do. Its basically routing to the full absolute path instead of the mod_rewrite path, since the file DOES exist unlike the controller/action setup. I have yet to see a work around for this. On Sep 27, 5:45 pm, me me me wrote: > Did you sort this out ("app/webroot/" in the

Re: Controller::setAction heads-up

2009-09-27 Thread Martin Radosta
On 09/27/2009 04:31 PM, brian wrote: > The comment for setAction() says that it "Internally redirects one > action to another." However, it doesn't really *redirect* so much as > simply call the action using call_user_func_array(). It amounts to > about the same thing, more or less, but there's so

Re: Help setting up

2009-09-27 Thread me me me
Did you sort this out ("app/webroot/" in the URL)? I passed off a project to another company who is using shared hosting and they have this problem, also. I've never deployed a Cake app on a shared host so I'm not sure where to start on this. On Sep 23, 6:03 pm, "Dave Maharaj :: WidePixels.com"

RE: Im dumb...help! - Solved!

2009-09-27 Thread Dave Maharaj :: WidePixels.com
Thanks guys, Looks like I it was just a missing an at the end. Like I said... I'm dumb :P Thanks for you time once again. Dave -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: September-27-09 8:04 PM To: cake-php@googlegroups.com Subject:

RE: Im dumb...help!

2009-09-27 Thread Dave Maharaj :: WidePixels.com
I have the same idea set up in the admin for the user but its in reverse and it works fine. You have no favorites or Contributing Posts. Either or both have data so show the user their infoif both are empty do nothing. Dave -Original Message- From: Dave Maharaj :: WidePi

RE: Im dumb...help!

2009-09-27 Thread Dave Maharaj :: WidePixels.com
When I debug all the info is there a lot of data for that function but the 2 im look at for the if are both empty. [Post] => Array ( ) [Favorite] => Array ( ) -Original Message- From: Gonzalo Servat [mailto:gser...@gmai

Re: Im dumb...help!

2009-09-27 Thread Gonzalo Servat
On Mon, Sep 28, 2009 at 8:05 AM, Dave Maharaj :: WidePixels.com wrote: > > When I test it out I know there is no data for either. > > So in the view: > > Dummy title > If info this should show up > > > But sure enough in the view: > Dummy Title > If info this should show up What's the output o

RE: Im dumb...help!

2009-09-27 Thread Dave Maharaj :: WidePixels.com
When I test it out I know there is no data for either. So in the view: Dummy title If info this should show up But sure enough in the view: Dummy Title If info this should show up Cant figure out why the text is being rendered when both if conditions are emtpy Will try your suggestion. Tha

Re: Im dumb...help!

2009-09-27 Thread Miles J
Thats correct, so what exactly is the problem? If not try: On Sep 27, 2:51 pm, "Dave Maharaj :: WidePixels.com" wrote: > I need to run an if on 2 conditions but I cant get it to work > > > do something here if either is not empty > > && would check if both are empty but I need if either is n

Im dumb...help!

2009-09-27 Thread Dave Maharaj :: WidePixels.com
I need to run an if on 2 conditions but I cant get it to work do something here if either is not empty && would check if both are empty but I need if either is not empty. How can I do this or what have I got done wrong here? thanks, Dave --~--~-~--~~~---~--~-

Re: Layout and design

2009-09-27 Thread BeroFX
Hello, I hope you read the official manual. For any assistance in Croatian, please find me on Twitter (@IvanBernat) (lang=hr) Dobro došao! On Sep 26, 12:59 am, Ziki wrote: > Hi, > > I'm new in cake, i have question about designing, and creatinglayout > for my site, > > my site is on this domain

Re: return data from ajax controller without using an element

2009-09-27 Thread mikeottinger
very cool Miles, I'll definitely give this a spin. On Sep 27, 11:29 am, Miles J wrote: > http://www.milesj.me/resources/script/ajax-handler-component > > On Sep 27, 10:21 am, mikeottinger wrote: > > > Excellent, works like a charm, Thanks! > > > On Sep 27, 9:51 am, brian wrote: > > > > I belie

Controller::setAction heads-up

2009-09-27 Thread brian
The comment for setAction() says that it "Internally redirects one action to another." However, it doesn't really *redirect* so much as simply call the action using call_user_func_array(). It amounts to about the same thing, more or less, but there's something to keep in mind: public function som

Re: return data from ajax controller without using an element

2009-09-27 Thread Miles J
http://www.milesj.me/resources/script/ajax-handler-component On Sep 27, 10:21 am, mikeottinger wrote: > Excellent, works like a charm, Thanks! > > On Sep 27, 9:51 am, brian wrote: > > > I believe you can do: > > > $this->autoRender = $this->layout = false; > > echo $new_order; > > exit; > > > O

Re: Layout and design

2009-09-27 Thread Marcelo Andrade
On Fri, Sep 25, 2009 at 7:59 PM, Ziki wrote: > > (..) > my question is, how to create this layout where i will put some > widgets in sidebar dependent of users preferences, and content on the > left side? > > Please help!! You can use elements. http://book.cakephp.org/view/97/Elements Best reg

Re: Trouble with installation

2009-09-27 Thread Nigel
I have tried it. But I will try again. Probably with a fresh install of apache. I'll try purging everything and reinstalling. I'm pretty sure its some silly mistake that I did. I'm sure its not .htaccess or mod_overwrite. What I think is its a problem with AllowOverride thing. I'll try it a

Re: Just curious question

2009-09-27 Thread djogo
You shouldn't pull BLOB or whatever large data you got. It's better if you keep it in a separate table. If you have fields that are empty in many records, I also advocate that it's good practice to keep another table for them - even if the relationship is 1:1. This way you alway retrieve the des

Re: How to put ccs class and id tags in html helpers

2009-09-27 Thread PaulW
Hmmm, you're quite right, it was as simple as that. I had tried that but for some reason it didn't work, I must have had a typo or something. Cheers Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gro

Re: return data from ajax controller without using an element

2009-09-27 Thread mikeottinger
Excellent, works like a charm, Thanks! On Sep 27, 9:51 am, brian wrote: > I believe you can do: > > $this->autoRender = $this->layout = false; > echo $new_order; > exit; > > On Sun, Sep 27, 2009 at 3:14 AM, mikeottinger wrote: > > > Hi All, > > > Very simple question, I have a controller called

Re: Update existing Integers

2009-09-27 Thread brian
On Sun, Sep 27, 2009 at 7:47 AM, anders als wrote: > > Hi there, > > while developing some sort of app, which needs often to update an > existing databse entry (integer), e.g. "every time guy A enters my > site, guy A s counter gets +1" > > Doing this by native SQL Code is very simple "UPDATE ent

Re: return data from ajax controller without using an element

2009-09-27 Thread brian
I believe you can do: $this->autoRender = $this->layout = false; echo $new_order; exit; On Sun, Sep 27, 2009 at 3:14 AM, mikeottinger wrote: > > Hi All, > > Very simple question, I have a controller called by an ajax call that > will return a single number for its response. I couldn't find a wa

Re: 'cake schema generate' in 1.2.5

2009-09-27 Thread Serge Rodovnichenko
Thanks. That helps :) On 27 сен, 19:55, Алексей Разбаков wrote: > If you have app_model.php file in app directory > you need to move it in the root > > 2009/9/27 Serge Rodovnichenko > > > > > This shell fails to generate a schema with an error 'Missing database > > table `app_models` for model

Re: Search-Engine: Extend results with random records if there are no 'real' results

2009-09-27 Thread brian
On Sun, Sep 27, 2009 at 7:52 AM, braaan wrote: > > On 25 Sep., 20:28, brian wrote: >> On Fri, Sep 25, 2009 at 8:47 AM, braaan wrote: >> >> > i can't use ORDER BY RAND() on every page because >> > then the user would get different results on every refresh. >> >> Well, it wouldn't be very random,

Re: login attempts limit and auth

2009-09-27 Thread brian
On Sun, Sep 27, 2009 at 8:49 AM, rrd wrote: > > The interesting thing is the manual says login function will not be > used if auth autoredirect is not false. > http://book.cakephp.org/view/248/AuthComponent-Variables#autoRedirect-395 > > But it seems with default autoredirect the login function w

Run a cron Job

2009-09-27 Thread Dave Maharaj :: WidePixels.com
Trying to set up an action to run at a specific time. Found a few sites saying replace require CORE_PATH.'cake'.DS.'bootstrap.php'; in index.php but no longer appears to be there. Any good places to look where to set this up? Thanks Dave --~--~-~--~~~---~--~--

Re: How to put ccs class and id tags in html helpers

2009-09-27 Thread c...@uapub.com
I think you need do like that: image('want_to_know.png', array('title' => 'About us', 'alt' => 'About us', 'width' => '83', 'height' => '78', 'url' => 'about', 'id'=>'about_us')); ?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: 'cake schema generate' in 1.2.5

2009-09-27 Thread Алексей Разбаков
If you have app_model.php file in app directory you need to move it in the root 2009/9/27 Serge Rodovnichenko > > This shell fails to generate a schema with an error 'Missing database > table `app_models` for model AppModel' :-/ What I do wrong? :-) > > > -- Web-Design Studio "UApub" chief v

slow static multilingual site made with cakephp

2009-09-27 Thread Number 23
Hello, i made a static website with cakephp, using the internazionalization functionality. preview is at http:\\www.sunchaser.it, login/pwd is emo/emo. The initial loading is very slow, and i don't understand why, the page is very light. Any help please? can it depend because cakephp is translat

'cake schema generate' in 1.2.5

2009-09-27 Thread Serge Rodovnichenko
This shell fails to generate a schema with an error 'Missing database table `app_models` for model AppModel' :-/ What I do wrong? :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

How to put ccs class and id tags in html helpers

2009-09-27 Thread Paul Willis
Hi How do I put ccs 'class' and 'id' tags into html helpers? I have a image link like... The proper cakephp code for that would be... image('want_to_know.png', array('title' => 'About us', 'alt' => 'About us', 'width' => '83', 'height' => '78', 'url' => 'about')); ?> But what about adding

Radio button + ajax submit

2009-09-27 Thread d'plus
Cakephp 1.1.8 I want to make form autosubmit when radio button value is selected. Right now I'm using separate submit button, and code like this: echo $ajax->form('/ratings/rate/'.$photo_id, 'POST', array( 'id' => 'rate_form_'.$photo_id, 'update'=>'rating_'. $photo_id )); echo $html->radio('Rati

Re: login attempts limit and auth

2009-09-27 Thread rrd
The interesting thing is the manual says login function will not be used if auth autoredirect is not false. http://book.cakephp.org/view/248/AuthComponent-Variables#autoRedirect-395 But it seems with default autoredirect the login function works. --~--~-~--~~~---~--~--

Re: Documenting tools for final projects

2009-09-27 Thread Nejra
I'd be very interested in people's choices in this as well. phpDocumentor is a name commonly heard, but I don't like the output at all (no search, for example). I do like the official CakePHP API pages, generated by the API Generator plugin (http://thechaw.com/ api_generator), but I don't know ho

Re: Search-Engine: Extend results with random records if there are no 'real' results

2009-09-27 Thread braaan
On 25 Sep., 20:28, brian wrote: > On Fri, Sep 25, 2009 at 8:47 AM, braaan wrote: > > > i can't use ORDER BY RAND() on every page because > > then the user would get different results on every refresh. > > Well, it wouldn't be very random, otherwise, would it? you are right, i meant not a new OR

Update existing Integers

2009-09-27 Thread anders als
Hi there, while developing some sort of app, which needs often to update an existing databse entry (integer), e.g. "every time guy A enters my site, guy A s counter gets +1" Doing this by native SQL Code is very simple "UPDATE entry SET entry = + 1" or "entry = entry+1", doing this in Cake seems

Re: General organization question...

2009-09-27 Thread Hols Kay
yeah, Cake supports subfolders. See this thread for details - it's about elements, but there's stuff further down about the other bits and pieces as well. http://groups.google.com/group/cake-php/browse_thread/thread/9a1fb0bea96f2161 On Sep 27, 4:53 am, Matt Palermo wrote: > I realize that there

Re: secure link using hmtl->link helper..

2009-09-27 Thread leafchild book
I have also same issue. I tried "base" 'base'=>'https', 'base'=>'https:' and 'base'=>'https://' and echo $html->link('billing', array('base'=>'https:','controller'=>'/customers/billing_and_shipping')); then link is looks like this billing I also tried "bare" but I didn't see any different wiht

forms with names paramaters

2009-09-27 Thread jon_snow
Hello all, I'm trying to make a form that will use named parameters. Basically I want the action to be something like action="/cake/someapp/edit/id: 148". The default seems to be action="/cake/someapp/edit/148" and I couldn't find any easy way in the manual to switch to the named parameters forma

Getting code-complete to work with Aptana and CakePHP

2009-09-27 Thread Stricks
I am an experienced PHP programmer, but new to CakePHP. I have recently switched to Aptana's IDE, and am looking to get code-complete to work in their IDE. I have read some of the tips on their site, and while I see some of the code-complete working, I expected it to work in .CTP files, etc. Am I

radio button + ajaxHelper::observeField() - clicking second time no action WHY??

2009-09-27 Thread leafchild
I'm using radio button + ajaxHelper::observeField() to change display . There are about 5 radio buttons. When I click one of them first time, working fine then I click the other one, still working fine but when I click again first one I clicked, I don't see any update. If I click other radio but

return data from ajax controller without using an element

2009-09-27 Thread mikeottinger
Hi All, Very simple question, I have a controller called by an ajax call that will return a single number for its response. I couldn't find a way to return just that value without going through the process of creating an element for it and doing something like this: $this->set('value', $new_orde