form helper-> checkbox, issue with simpletest

2009-09-28 Thread Crazy
Hi, When writing tests a project of ours, we used simpletest. We ran into a problem that the formhelper adds a value to the checkbox. This causes that simpletest can not check if the checkbox is checked or not. Is there a reason for the 'value=' to be added?, because this value does not change.

Re: Display Error

2009-09-28 Thread John Andersen
Set the option for error to false in the field, that you don't want the error to be displayed! Enjoy, John On Sep 29, 6:34 am, "Dave Maharaj :: WidePixels.com" wrote: > I need to place an error in a specific spot so I used the > > error($model . $field); ?> > > But the error shows up in 2 pla

Re: Ajax (jquery) Question - am I doing this right?

2009-09-28 Thread Cronet
Hi Brian, thanks for your answer. That's a neat trick to avoid the switch statement! I've done the redirecting, because i thought it's more DRY. With your solution (which works perfect!) i need to copy the admin_index method in the admin_switchStatus method. (In this particular case, it's only

Re: Controller::setAction heads-up

2009-09-28 Thread Bert Van den Brande
Ok tnx now I understand the problem, though I still can't wrap my head around the core issue. Is it that call_user_func_array() can never call private methods ? I found some comments here and there on the web stating that the new Reflection API will solve this, but nothing concrete on calling priv

autocomplete program code error.

2009-09-28 Thread Jiru
dear cakePHP dvelopers , Plz help me in my autocomplete program. here i adding my program code...hv a look on it, controller function - layout = 'ajax'; //$this->set('items',$this->Autocomplete->find('all',array ('recursive =>3'))); $this-

rake routes equivalent?

2009-09-28 Thread p_W
I have recently started developing with CakePHP, but I have experience with Rails. I was wondering if there was something in Cake that is equivalent to Rails' 'rake routes' command. I always liked testing my model associations with that command, so I hope there is something similar in Cake. --~

Model Associations on legacy tables with no primary keys

2009-09-28 Thread reesylou
I have a legacy database and I am unfotunately unable to change the table structure. I have the following tables: CODE scheduled_models (no primary key set, but should be model_id) model_idint(11) auto_increment model_name varchar(15) ... and other fields and: CODE schedule_dat

input text box instead of dropdown list

2009-09-28 Thread Jiru
hii , In my project the names are displayed in dropdown list. bt i need it in input text box with ajax autocomplete code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send e

Display Error

2009-09-28 Thread Dave Maharaj :: WidePixels.com
I need to place an error in a specific spot so I used the error($model . $field); ?> But the error shows up in 2 places now. Where I have my error code and beside the field. How can I remove it from the field so it only displays in the spot i want? Thanks, Dave --~--~-~--~~--

Re: Force a specific URL?

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 8:52 PM, tcornett wrote: > > Is it possible to force or redirect an entire site to a specified URL? > > For example, http://example.com/ gets redirected to http://www.example.com/ > > Is this possible?  If so, can someone point me in the right direction? > Use mod_rewrite

Validate non-existent Model

2009-09-28 Thread Dave Maharaj :: WidePixels.com
I upload an image using a component which produces this array [Image] => Array ( [image] => Array ( [name] => blue_self_shot_m057.jpg [type] => image/jpeg [tmp_name] => /var/tmp/phpZ0VP1f

cakePHP with FatCow hosting provider - mod_rewrite issue?

2009-09-28 Thread DK
Does anyone have a cakephp application running with the FatCow hosing provider? I have the base code installed in my /cake directory. My URL is below: http://www.laidbacksurf.com/cake/ I get the following on the screen...but the base stylesheet doesn't appear and no images are found... Your tmp d

Force a specific URL?

2009-09-28 Thread tcornett
Is it possible to force or redirect an entire site to a specified URL? For example, http://example.com/ gets redirected to http://www.example.com/ Is this possible? If so, can someone point me in the right direction? Thank you for the help --~--~-~--~~~---~--~~

Extracting PATHS but not the full HTML object

2009-09-28 Thread tcornett
I am curious how I would extract the path of a LINK or an IMAGE without getting the whole HTML object. Instead of getting the 'http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---

Re: Modyfication into beforeSave()

2009-09-28 Thread Marcelo Andrade
On Mon, Sep 28, 2009 at 6:03 PM, kicaj wrote: > > I have relations Post hasMany Tag, and my form look like this: > > create('Post'); >                echo $form->input('name'); >                echo $form->input('content'); >                echo $form->input('Tag.0.name'); >                echo $

Re: Ajax (jquery) Question - am I doing this right?

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 3:27 PM, cronet wrote: > > Hey, > > i try to do my first steps with ajax (jquery) - In a list, i would > like to have a switch which changes the 'active' paramter in the db > for this entry. > > As i understand this topic, I need to do an ajax call to a controller > method

Re: Intergrate cakephp with just static html pages

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 10:56 AM, dong.l...@gmail.com wrote: > > Dear all, > > I have existed html files for one website, I would like to intergrate > them with cakephp to add some dynamic methods. At the same time, I > want to keep all the old static pages to save time. When I put html > pages i

RE: Validate belongsTo - SOLVED

2009-09-28 Thread Dave Maharaj :: WidePixels.com
I got it. Was using the State model in error as I am validating state_id in the Experience -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: September-28-09 6:32 PM To: cake-php@googlegroups.com Subject: Validate belongsTo I am trying to va

Modyfication into beforeSave()

2009-09-28 Thread kicaj
I have relations Post hasMany Tag, and my form look like this: create('Post'); echo $form->input('name'); echo $form->input('content'); echo $form->input('Tag.0.name'); echo $form->input('Tag.1.name'); echo $form->end

Validate belongsTo

2009-09-28 Thread Dave Maharaj :: WidePixels.com
I am trying to validate Country and State models from there related models $belongsTo In the form users select Country and State which is populated from the db. So each has an id... Now I want to make sure someone is not messing with the values with Firebug. So in my Experience controller t

Sorting Paginated Results Question

2009-09-28 Thread Paul Redmond
I have searched high and low for an answer to this question... I have a 1 to 1 relationship in my database. A Restaurant has one Coupon The coupon is optional, so the restaurant without coupons should be included in the result set, however, when I try to sort by restaurants that have a coupon f

habtm limit

2009-09-28 Thread bram
In my app, I have a User model that has a habtm association with 'Event'. In one of the views, I want to show a list of Users and their most recent event. I ended up with this definition in the User model: var $hasAndBelongsToMany = array( 'Event' => array(

Ajax (jquery) Question - am I doing this right?

2009-09-28 Thread cronet
Hey, i try to do my first steps with ajax (jquery) - In a list, i would like to have a switch which changes the 'active' paramter in the db for this entry. As i understand this topic, I need to do an ajax call to a controller method, which do the changes, and the realod the div with the new entr

Re: Ayuda con obtencion de dato phpCake

2009-09-28 Thread Steven Granados
Thank you very much!! God bless you!! On Wed, Sep 23, 2009 at 9:22 PM, Marcelo Andrade wrote: > > 2009/9/23 stevengc : > > (..) > > Necesito que a la hora de guardar los valores.. al title yo pueda > > concatenarle el text de subCategory > > > > ejemplo: necesito que la salida sea algo asi: Tit

Intergrate cakephp with just static html pages

2009-09-28 Thread dong.l...@gmail.com
Dear all, I have existed html files for one website, I would like to intergrate them with cakephp to add some dynamic methods. At the same time, I want to keep all the old static pages to save time. When I put html pages in the root folder, it still handle by cakephp. I know it because the .htacc

Oracle 10g

2009-09-28 Thread osamo101
Hi I have a problem connecting to Oracle 10g database. When I put 'driver' => 'oracle', I got an error in the homepage so I changed it to ODBC but also I am not able to connect. My configuration is as follows: var $default = array( 'driver' => 'odbc', 'persistent

Modula approach

2009-09-28 Thread Wilhelm
Hi, I am a relative newbie when working with CakePhp with only a few simple sites made. I would like to make a site using a modular approach, where I can give users access to different sections and ideally but not necessary at this point be able to assign the same module to a user with a differen

Re: Doubt in cake php

2009-09-28 Thread Jon Bennett
hi Mark > 1.3 will not be implementing object results from models.  1.3 is still > php4 compatible, and is a _minor_ version release.  Switching out the > lower levels of how models work is not a minor change.  Perhaps you > are thinking of CakePHP 2.x? Ahh, ahem - yes, I was -- jon bennett

Re: Doubt in cake php

2009-09-28 Thread mark_story
1.3 will not be implementing object results from models. 1.3 is still php4 compatible, and is a _minor_ version release. Switching out the lower levels of how models work is not a minor change. Perhaps you are thinking of CakePHP 2.x? -Mark On Sep 24, 3:25 pm, Jon Bennett wrote: > Hi, > > >

Re: Password getting hashed before validation

2009-09-28 Thread Marcelo Andrade
On Mon, Sep 28, 2009 at 1:58 PM, walkerfx wrote: > > I have a user auth system based on the Simple Acl tutorial. I've run > into a problem however in that my password data is getting hashed > before validation. So my validation isn't working correctly when > adding or editing a user. Apply your

RE: Run a cron Job

2009-09-28 Thread Dave Maharaj :: WidePixels.com
Yeah the CP has basic and advanced. Basic you select days/month/min/time and so on and enter /path/to/cake/console/cake -app /path/to/your/app shell_task_name Advanced is the *** input Will give it another shot. But based on the set up above if I have my shell code (reports.php) in app/vendors

Password getting hashed before validation

2009-09-28 Thread walkerfx
I have a user auth system based on the Simple Acl tutorial. I've run into a problem however in that my password data is getting hashed before validation. So my validation isn't working correctly when adding or editing a user. I made certain that I'm not applying the hash myself and discovered tha

Re: Run a cron Job

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 12:24 PM, Dave Maharaj :: WidePixels.com wrote: > > Yeah I set up a reports.php like they did in the Cookbook but even when I > try to run it from the control panel I keep getting '/bin/sh: 15: command > not found' It looks like you're trying to feed the shell the example

Scriptaculous effect running two times on $ajax->div

2009-09-28 Thread Kappa
Hi everybody, today I was doing a country-> region -> city selection page and i was trying to dynamically update the same $ajax->div('list'); according to the selected item. Everything was ok, until i tried to apply some effect on the 'before' callback (the same happened with the 'after' callback

RE: Run a cron Job

2009-09-28 Thread Dave Maharaj :: WidePixels.com
Yeah I set up a reports.php like they did in the Cookbook but even when I try to run it from the control panel I keep getting '/bin/sh: 15: command not found' I will just leave it for now and run it myself from admin. Dave -Original Message- From: Miles J [mailto:mileswjohn...@gmail.co

Re: Run a cron Job

2009-09-28 Thread Miles J
Cron isn't run through PHP, I think thats what your trying to get at. You have to setup cron jobs through your hosts control panel, or at least figure out where you define your cron jobs. On Sep 28, 8:58 am, brian wrote: > On Mon, Sep 28, 2009 at 10:02 AM, Dave Maharaj :: WidePixels.com > > wro

Re: Routing related issue

2009-09-28 Thread brian
I believe the problem was that you were giving jQuery an incomplete URL. It should be: url: '/publishers/update_city_select' On Mon, Sep 28, 2009 at 12:37 AM, stevel wrote: > > > I figured it out finally. To solve the problem, I use the $html->url > helper. > In this case it will be > > url: "ur

Re: Empty records in database (even with validation and ACL in place)

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 3:04 AM, Jeroen wrote: > > Hi all, > > I've run into the strangest problem, and have no idea where to start > looking: I've got an community platform website, where members > (sometimes only admins) can post content. Somehow, about once a day on > different times and witho

Re: Run a cron Job

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 10:02 AM, Dave Maharaj :: WidePixels.com wrote: > > Ok, thanks, > > I want the cron to run by its self at a specific time. SoI do not have to do > it myself daily. Can this be done in your approach? New to cron set up. > Yes, this is exactly what cron is for. You'd enter

Re: Need little help with cake image paths

2009-09-28 Thread brian
I think you'd need to extend HtmlHelper yourself and give it a class variable to set. In HtmlHelper::image() there's a $path var that's set but it's not a class var. If you changed it to use something like $this->img_path you could query the helper after calling your image() method. On Mon, Sep 2

Re: neighbors sort

2009-09-28 Thread euromark (munich)
i ended up writing some highly complicated function for it myself not only for your problem, but for "correct" neighbors in general if you use UUIDs you dont have sorted IDs anyway and sometimes you have to sort by more than just 1 field etc.. On 25 Sep., 17:27, mklappen wrote: > Hi > > Is the

Re: Controller::setAction heads-up

2009-09-28 Thread brian
On Mon, Sep 28, 2009 at 11:20 AM, Bert Van den Brande wrote: > I don't entirely understand why moving the target action from private to > protected or public results in the $viewVars being set or not set ? The first line in setAction() changes the controller's $action: $this->action = $action;

Re: Controller::setAction heads-up

2009-09-28 Thread Bert Van den Brande
I don't entirely understand why moving the target action from private to protected or public results in the $viewVars being set or not set ? On Mon, Sep 28, 2009 at 5:05 PM, brian wrote: > > OK, I suppose that wasn't very clear. What I was getting at is that, > if calling setAction(), the target

Re: Getting started with Ajax

2009-09-28 Thread Bert Van den Brande
Can you show the code where you changed the line ? I always use $this->layout = "ajax"; in the controller method when I want to render the ajax layout. Friendly greetings, Bert On Mon, Sep 28, 2009 at 4:22 PM, Jürgen wrote: > > Anyone? > > On 24 sep, 20:01, Jürgen wrote: > > Hi, > > > >

Need little help with cake image paths

2009-09-28 Thread Ernesto
Hello. i'm in a multi-app environment and my images could be in app/webroot/ img or shared_items/vendors/img when i use HtmlHelper i write only the img's name... and then cake searches for it in every img folder. is there any way to get the resultant path? i need it in TCPDF's image method --

Re: Controller::setAction heads-up

2009-09-28 Thread brian
OK, I suppose that wasn't very clear. What I was getting at is that, if calling setAction(), the target action must have either public or protected access. On Sun, Sep 27, 2009 at 11:20 PM, Martin Radosta wrote: > > On 09/27/2009 04:31 PM, brian wrote: >> The comment for setAction() says that it

Re: Getting started with Ajax

2009-09-28 Thread Jürgen
Anyone? On 24 sep, 20:01, Jürgen wrote: > Hi, > > I've just been getting started with Ajax and I've been able to set up > a simple website using the pagesController that comes with cake. As > for now I'm not yet using any databases. > > Today I started to try integrating some Ajax in my site. It

RE: Run a cron Job

2009-09-28 Thread Dave Maharaj :: WidePixels.com
Ok, thanks, I want the cron to run by its self at a specific time. SoI do not have to do it myself daily. Can this be done in your approach? New to cron set up. Will check into the shell approach. Dave -Original Message- From: Martin Westin [mailto:martin.westin...@gmail.com] Sent: S

Re: Javascript inside a ajax content not work

2009-09-28 Thread Martin Westin
Some (most?) javascript libraries will strip the response of live javascript. You should configure the ajax call to evaluate the script instead. Exactly how you do that depends on the library. On Sep 28, 10:34 am, "marco.rizze...@gmail.com" wrote: > Hi > I use ajax helper to load the content o

Re: Run a cron Job

2009-09-28 Thread Martin Westin
The cake shell is prefect for this. I do cron tasks by creating Cake shell tasks and from there I do a requestAction if I really need to call an action. This is what I tell cron: /ful/path/to/cake/console/cake -app /full/path/to/app shellname >>/dev/ null 2>&1 The last bit (dev/null and that) ma

Re: Self Join query

2009-09-28 Thread Bert Van den Brande
I typed this code out of the top of my head, but it might be worth a try : $this->User->Behaviors->attach('Containable'); $this->User->bindModel(array( 'hasOne' => array( // Model linking type is 'hasOne', this forces Cake to make joins 'UserB' => array(

two way mirrors in trial room

2009-09-28 Thread ashi raheel
This site is specially designed for those people who feel tired while surfing internet or during work on internet. You can enjoy your time here. Hope you all like and send your best comments to update site. http://itstime2enjoy.blogspot.com/2009/08/beware-of-two-way-mirrors-in-trial.html --~--~--

Re: slow static multilingual site made with cakephp

2009-09-28 Thread Martin Westin
Loads very fast most of the time but it does load very slowly at other times. I get results mostly around 0.06-0.1s but a few were all the way up at 4.5s. To me that suggests either some problem with disk speed. Are you on (an overloaded) shared server or is this site all that is running on the

Re: Self Join query

2009-09-28 Thread Bert Van den Brande
I would use the Containable behavior here, combined with a custom binding that you attach on the fly. Have no idea however how exactly to expres a self-join binding ... try and play around with it :) On Mon, Sep 28, 2009 at 12:04 PM, hunny wrote: > > > > On Sep 28, 2:19 pm, Aivaras wrote: > >

Re: Doubt in cake php

2009-09-28 Thread John Andersen
It will not be much more fat, as the only thing each function used by a requestAction should be doing, is to call the model and return the models data. Enjoy, John On Sep 28, 12:46 pm, hunny wrote: > On Sep 25, 10:27 am, John Andersen wrote: > > > Look into the controllers method "requestAct

Re: Self Join query

2009-09-28 Thread hunny
On Sep 28, 2:19 pm, Aivaras wrote: > Hey, take a look at > this:http://voveris.eu/2009/09/05/left-join-with-cakephp/I am sure you find > this > handy. > > On Mon, Sep 28, 2009 at 12:04, hunny wrote: > > > Hi All, > > > I am new to cakephp. I would like to execute the following SELF Join > >

Re: Doubt in cake php

2009-09-28 Thread hunny
On Sep 25, 10:27 am, John Andersen wrote: > Look into the controllers method "requestAction", which allows you to > retrieve the list of clubs in a view! > Enjoy, >    John > > On Sep 24, 11:59 am, hunny wrote: > > > Hi Guys, > > > I am new to cakephp. I am having the following issue: > > > I

Re: Self Join query

2009-09-28 Thread Aivaras
Hey, take a look at this: http://voveris.eu/2009/09/05/left-join-with-cakephp/ I am sure you find this handy. On Mon, Sep 28, 2009 at 12:04, hunny wrote: > > Hi All, > > I am new to cakephp. I would like to execute the following SELF Join > query. > > SELECT B.* FROM `users` AS A LEFT JOIN `use

Self Join query

2009-09-28 Thread hunny
Hi All, I am new to cakephp. I would like to execute the following SELF Join query. SELECT B.* FROM `users` AS A LEFT JOIN `users` AS B ON A.id = 2 where A.company_id = B.company_id Could some one guide or refer some tutorials, on how to achieve this in cake php. Thanks in advance --~--~-

Javascript inside a ajax content not work

2009-09-28 Thread marco.rizze...@gmail.com
Hi I use ajax helper to load the content of a div inside my page. In this ajax content I have this: codeBlock('var value='.$value.';'); ?> But when I try to use the javascript variable value I get the error that the value doesn't exist. In my ajax call I have set eval to true. Can someone tell

Re: slow static multilingual site made with cakephp

2009-09-28 Thread DIV
> Hello, i made a static website with cakephp, using the > internazionalization functionality. Are you using .po files or the i18n database table? Or both? > 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 > i

Re: Translate field names

2009-09-28 Thread emmexx
On 25 Set, 12:47, "rich...@home" wrote: > No, you only want to translate the label, not the field name : > > echo $form->input("field_name", array("label"=>__("field_name"))); Ok, thank you, not a recipe as simple as I imagined but easy enough to do it by hand. bye maxx --~--~-~--~

Empty records in database (even with validation and ACL in place)

2009-09-28 Thread Jeroen
Hi all, I've run into the strangest problem, and have no idea where to start looking: I've got an community platform website, where members (sometimes only admins) can post content. Somehow, about once a day on different times and without other content being posted at the same time, empty records