Re: multi language website(help me)

2010-04-28 Thread waseem gondal
hi, this is component for multi language websites. http://bakery.cakephp.org/articles/view/p28n-the-top-to-bottom-persistent-internationalization-tutorial you can user __() with the string to treat as multi language. you can generate all language constants using i18n extract command in console.

Re: pass data from view to controller using ajax

2010-04-28 Thread MANOJ DHAMAL
Hi, I am using three combobox in .ctp file. Like ?php echo $form-select('category_id',$category_options, $category_selected,array('id'='category','class'='search_input'),false); ? ?php echo $form-select('type_id',$type_options, $type_selected,array('class'='search_input'),false); ? ?php echo

Re: Problem in using elements

2010-04-28 Thread John Andersen
That is what I wrote you! You want to show the edit form (from the edit element) in another view, that is use it within another action (controller/foo), am I correct? So in your foo action, you have to make sure that the $this-data array is filled with the same information as in the edit action -

Re: pass data from view to controller using ajax

2010-04-28 Thread Ed Propsner
I did a bit of playing around with Ajax in Cake and was able to extract field values using Prototype (it's just as easy to use JQuery or Mootools with Cake 1.3). Instead of using $ajax-observeField I used onChange= in my combo passing in the id of element I wanted to update and the action I

Re: pass data from view to controller using ajax

2010-04-28 Thread John Andersen
Thanks, then I assume that you want to gather the value from each of the select fields and send them using ajax to the server, am I correct? Assuming I am correct :) I would use javascript to get the value from each select field, probably the select fields should have an ID each, or the container

Re: pass data from view to controller using ajax

2010-04-28 Thread John Andersen
Ok, looks like Ed gave you a better answer than mine, thanks Ed :) Enjoy, John On Apr 28, 10:10 am, John Andersen j.andersen...@gmail.com wrote: Thanks, then I assume that you want to gather the value from each of the select fields and send them using ajax to the server, am I correct?

Re: pass data from view to controller using ajax

2010-04-28 Thread Ed Propsner
You bet :) It's a half decent jumping off point anyhow. On Wed, Apr 28, 2010 at 3:11 AM, John Andersen j.andersen...@gmail.comwrote: Ok, looks like Ed gave you a better answer than mine, thanks Ed :) Enjoy, John On Apr 28, 10:10 am, John Andersen j.andersen...@gmail.com wrote: Thanks,

Re: Datasource CouchDB

2010-04-28 Thread Martin Westin
This is not an answer as such, only an idea if there is no datasource already. If you feel a bit adventurous you might be able to sneak a peek at the MongoDB datasource and make a similar one for CouchDB. The two databases are not identical but I think significant parts of the datasource would be

Re: hI friends

2010-04-28 Thread rakeshyadav rakeshyadav
Hi all, i am trying to call javascript functions from my cake view file (eg.. onclick,onload ) . i want what is the proper syntax to call javascript and where i want to put my javascript file . ?php echo $html-link('Admin Store Group', '#', array( 'class'='url2_font',

Unsupported operand types

2010-04-28 Thread emanuele
Could somebody provides me some information about = $options += array('inline' = true); I found it in cake/libs/view/helpers/html.php 337 and return the Unsupported operand types error. Maybe is something related to php and its version? thanks in advance? -- Emanuele Gringeri Computer Engineer

Re: url problem(help me)

2010-04-28 Thread rakeshyadav rakeshyadav
hi friend, ?php class HhController extends AppController { var $name = 'Hh'; / here u have to specify u r view file name function myview()// example { } } ? On Mon, Apr 26, 2010 at 8:55 PM, hoss7 hoss...@gmail.com wrote: i have create

Re: url problem(help me)

2010-04-28 Thread priya dhakane
the name of the controller is always in plural form. so u have to take class name as HhsController, variable name as Hhs, save controller file with name hhs_controller Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received

Re: hI friends

2010-04-28 Thread Ed Propsner
Your syntax for calling your js looks okay. Instead of keeping the js in the same .ctp (it won't be accessible from other views, etc.) place it in it's own .js file such as myJsFunctions.js and store the file in app/webroot/js folder then include it in your default.ctp via

Re: url problem(help me)

2010-04-28 Thread Akeda Bagus
On Mon, Apr 26, 2010 at 10:25 PM, hoss7 hoss...@gmail.com wrote: but when i use some controll name in urlhttp://localhost/hh/home; i dont see this error. i want when i upload all source in my host,whene user come to my website see some default page like home page when user come to my website

Re: hI friends

2010-04-28 Thread Akeda Bagus
On Mon, Apr 26, 2010 at 1:53 PM, rakeshyadav rakeshyadav rakeshyadav@gmail.com wrote: Hi all, I am using javascript in my cake view page and trying to call that functions they are not working properly please help me. Use firebug's console to debug your JS' problems. --

Re: Root prepended to the URL on shared host

2010-04-28 Thread celery
Hi Thanks for the reply. Sorry yes that was a typo - should have been /a. However thats not the issue - I am using the html helper to generate the link. When looking at the rendered html Cake is prepending the app's root to the URL (as shown above). This also happens when using the 'url'

Re: how to add a relationship whit other key different to the PK

2010-04-28 Thread Martin Westin
You can set foreign_key to false and instead use the condition of the relationship. This is usually used for things like User.active = true and simple things like that but I think it can be used for your purpose. COme to think of it, I may be wrong. I vaguely recall an RC for Cake1.2 causing

Re: Unsupported operand types

2010-04-28 Thread emanuele
Sorry.. HtmlHelper::css() no longer has an $inline parameter. Use $options['inline']instead :) On Wed, Apr 28, 2010 at 10:44 AM, emanuele emanuel...@gmail.com wrote: Could somebody provides me some information about = $options += array('inline' = true); I found it in

Re: Problem in using elements

2010-04-28 Thread sherzo
Thanks John!! I wrote a function to load the data into the form and my edit form is working now :jumping: Thank you very much :-) -- View this message in context: http://old.nabble.com/Problem-in-using-elements-tp28380990p28386698.html Sent from the CakePHP mailing list archive at Nabble.com.

plz help me out

2010-04-28 Thread chandrasekhar reddy
I am new for cakephp plz help me out . below statements are correct or wrong . idontknow While converting this sql query into cakephp for result set and count 1. Result set $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); var

Re: plz help me out

2010-04-28 Thread Jeremy Burns
Almost... You need to run finds/counts against the model that is related to your table. For your table tblmusicprofiles your model will be Tblmusicprofile (singular, camel cased). So, for example, your find statement would be something like this: $rsProfile = $this-Tblmusicprofile-find(

plz help me out

2010-04-28 Thread chandrasekhar reddy
I am new for cakephp plz help me out . below statement are correct or wrong . idontknow While converting this sql query into cakephp for result set and count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' =

Re: plz help me out

2010-04-28 Thread Jeremy Burns
You haven't changed the table names to model names as I suggested in my last response - change them from tblmusicprofiles to Tblmusicprofile. Then run it again and post back any errors. Jeremy Burns jeremybu...@me.com On 28 Apr 2010, at 11:34, chandrasekhar reddy wrote: I am new for

plz help me out

2010-04-28 Thread chandrasekhar reddy
can i use stripslashes in cakephp directly in cakephp like php .is it work ? $txtProfileName = stripslashes($txtProfileName); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed

Re: plz help me out

2010-04-28 Thread chandrasekhar reddy
ok tahnk you On Wed, Apr 28, 2010 at 4:08 PM, Jeremy Burns jeremybu...@me.com wrote: You haven't changed the table names to model names as I suggested in my last response - change them from tblmusicprofiles to Tblmusicprofile. Then run it again and post back any errors. Jeremy Burns

Re: plz help me out

2010-04-28 Thread Jeremy Burns
See if either of these pages help: http://book.cakephp.org/view/1138/stripslashes_deep http://book.cakephp.org/view/1126/convertSlash http://book.cakephp.org/view/1183/Data-Sanitization And while I'm writing, I found these answers by doing a quick search in the online guide. You could try that

Re: need to load a paging controller through jQuery

2010-04-28 Thread John Andersen
After having read the article, I think you shouldn't have such a big issue with this! Your list action is the one being called by the ajax javascript, so it should return a normal view. Have you added the requesthandler component to your controller? Please remove the if statement in which you are

Problem with HABTM Assocation

2010-04-28 Thread Jets
Hello Frnds, I have 2 models like 'Deal' and 'Attribute'. I created HABTM relationship with these model. In my deal model class l wrote var $hasAndBelongsToMany = array( 'Attribute' = array( 'className' = 'Attribute',

Re: how to add a relationship whit other key different to the PK

2010-04-28 Thread Manolet Gmail
the problem is that i need to user the value of software_id for the query. for example, the HasMany query should be: SELECT `Mirror`.`id`, FROM `mirrors` AS `Mirror` WHERE `Mirror`.`software_id` = (6) But how i can put in the query, or in the conditions value add the id of software_id??

Updating user values in Auth component

2010-04-28 Thread WhyNotSmile
I'm using the built-in Auth component with CakePHP. In part of my site, I allow my user to update their details (e.g. email address). When I then retrieve the user information from the Auth component (using $this-Auth-user()), the details are still the old ones. Is there a way to update the

Re: pass data from view to controller using ajax

2010-04-28 Thread Marcelo Andrade
On Tue, Apr 27, 2010 at 8:57 AM, MANOJ DHAMAL manoj.dham...@gmail.com wrote: How to pass data two or more fields from view to controller by usin ajax in cakephp ? Serialize. ... , 'with'= 'Form.serializeElements(new Array($(MyField1), $(MyField2)))' -- MARCELO F ANDRADE

Database error page

2010-04-28 Thread balu
Hello, I have firebird Sql installed on my machine and integrated with cakePHP , now the problem is whenever the database is down and if debug level set to 0, i m getting site login page, i don't know where it is coming from. My objective is to display 504 temporary unavailable page instead of

Redirect mixed case URLS

2010-04-28 Thread Robert Popplewell
Hi guys Does anyone know of a decent, non htaccess way of reading in URL's that have mixed case but still point to the appropriate controller/ action ? e.g. Router::connect('/about', array('controller' = 'pages', 'action' = 'display','about')); Means I'm able to route my about page by:

wadl

2010-04-28 Thread emanuele
hello guys, somebody knows if there is some way to convert a wadl file into a php array.. By the time I was going through some stuff, inspiration hits my mind and, you know.. -- Emanuele Gringeri Computer Engineer University of Pisa Be my mirror, my sword and shield Check out the new CakePHP

Re: Containable pagination query

2010-04-28 Thread Bryan Paddock
Ah dang. Yeah in the end I made some custom queries to accomplish it. Yoh what a pain. On Tue, Apr 27, 2010 at 10:52 AM, WebbedIT p...@webbedit.co.uk wrote: Your not going to have a massive amount of joy with running calculations of this nature on the fly so I would be looking at

Re: How to make a search form with Cakephp

2010-04-28 Thread John Andersen
So it seems to me that you know what your search form should contain - now, what have you done in order to code it? Please show your current version of the search view! That way we may better be able to point you in the right direction :) Enjoy, John On Apr 28, 8:35 am, viis

Re: Updating user values in Auth component

2010-04-28 Thread John Andersen
Without changing anything in the Auth component, I do think that you could redo the login of the current user, when you have updated the users information - for example: [code] $this-Auth-login( $this-Auth-user() ); [/code] That should update the user information in the Auth session key. I

Re: wadl

2010-04-28 Thread John Andersen
A WADL file is an XML file, so just read it as that! Enjoy, John On Apr 28, 6:41 pm, emanuele emanuel...@gmail.com wrote: hello guys, somebody knows if there is some way to convert a wadl file into a php array.. By the time I was going through some stuff, inspiration hits my mind and, you

Re: Database error page

2010-04-28 Thread John Andersen
Which components are you using? Auth, Security, etc? One of them may be configured to redirect you to the login page, whenever it can not determine whether you have rights to access the requested action! Enjoy, John On Apr 28, 9:19 am, balu bdwankh...@gmail.com wrote: Hello, I have

Re: Problem with HABTM Assocation

2010-04-28 Thread John Andersen
As far as I remember :) you have to use a hasMany relationship to the AttributeDeal model (attributes_deals table) in order to make it work with additional attributes. There should be some other threads here in which this have been discussed! Enjoy, John On Apr 28, 3:17 pm, Jets

Re: need to load a paging controller through jQuery

2010-04-28 Thread cricket
On Apr 27, 3:21 pm, sherzo shahrzad.azimi...@gmail.com wrote: Hi All I'm trying to load a paging list inside a DIV in another list through ajax jQuery. lists view is working perfectly but it seems that for some reason jQuery can not load it inside a div in another view!!! This is how I do

Re: Unsupported operand types

2010-04-28 Thread Miles J
What PHP version are you using? On Apr 28, 2:43 am, emanuele emanuel...@gmail.com wrote: Sorry.. HtmlHelper::css() no longer has an $inline parameter. Use $options['inline']instead :) On Wed, Apr 28, 2010 at 10:44 AM, emanuele emanuel...@gmail.com wrote: Could somebody provides me some

Re: Cake Console Baking Model displayField?

2010-04-28 Thread John Andersen
The CakePHP usually assumes that a table column named name or title is the display field, but if you don't have one, it will ask you what to do, as you have discovered :) So if you have a column that you would like to be displayed by default, then define one. Enjoy, John On Apr 28, 9:50 pm,

Re: Updating user values in Auth component

2010-04-28 Thread Miles J
I prefer this method: http://www.milesj.me/blog/read/31/Refreshing-The-Auths-Session On Apr 28, 9:22 am, John Andersen j.andersen...@gmail.com wrote: Without changing anything in the Auth component, I do think that you could redo the login of the current user, when you have updated the users

RE: Cake Console Baking Model displayField?

2010-04-28 Thread Johnathan Iannotti
Thanks John for your input! What is the point in declaring a displayField though if you are going to bake the views and it adds the columns anyway? Thanks, -John -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of John Andersen Sent:

Problem direct linking files located in webroot

2010-04-28 Thread jgonca
Hi, I'm trying to direct link files located in a folder inside my cake app webroot but each time I try to access a file I get a blank page and I receive an e-mail from my cake app with the following message: Missing Controller Error: FilesController could not be found.(...) The files are

LinkableBehavior for CakePHP 1.3

2010-04-28 Thread Terr
Hi fellow bakers, When upgrading to CakePHP 1.3, some of you might be running into problems when with LinkableBehavior. I've got an updated version on my GitHub page that will remove the obsolete warnings and enables Linkable to be used in pagination: http://github.com/Terr/linkable. That page

Re: Getting viewVars set in a controller when using Mock objects during testing

2010-04-28 Thread william ratke
I'm still having problems accessing the viewVars for the view object while testing. I fetch the view object using the ClassRegistry but I get a /Fatal error: Call to a member function getVars() on a non-object error/. I've included my code below, if anyone has any pointers I'd really

Re: Problem direct linking files located in webroot

2010-04-28 Thread Don Drake
This looks like it might be a problem with your routes. The error suggests cake is looking for the Files controller as you would expect given your url. I had some routes that worked in 1.2.6 that stopped working in 1.3. A little messing around and their back on line. Don On Wed, Apr 28, 2010 at

Offline Documentation Mirror

2010-04-28 Thread luckysmack
While in irc at #cakephp i was talking to a few people that would like to have an offline version of the 1.3 documentation from book.cakephp.org . I was looking for the same thing as well, as I am frequently off line and would like to be able to refer to the docs. And viewing them on a phone can

Re: Offline Documentation Mirror

2010-04-28 Thread Graham Weldon
I think I have seen this request come up in the past. I can definitely see how this would be useful to users that are offline frequently, and still need to refer to documentation. I'll bring this up with the development and bakery teams, and see what the best solution is to get something like

How do I get Acl working?

2010-04-28 Thread Jon Chin
I'm having a bit of a problem getting Auth+ACL working. I've followed the Simple Acl Controlled Application example in the Cake book. It *is* correctly locking out unauthenticated users from the system. However, all authenticated users are able to access all ACOs in my site, even if the group

Re: How do I get Acl working?

2010-04-28 Thread Matthew Powell
Did you perhaps leave a $this-Auth-allow('*'); in there somewhere? Matt On Wed, Apr 28, 2010 at 21:33, Jon Chin port23u...@gmail.com wrote: I'm having a bit of a problem getting Auth+ACL working.  I've followed the Simple Acl Controlled Application example in the Cake book. It is correctly

plz help me out

2010-04-28 Thread chanducake
hi friends, i am new to cakephp . plz help me out I don't know how to write the cake php code related to the belowe postgre sql code can u help me plz . how can u find out the number of rows in particular colom in table (second statement below). i hav lot queries like this in my project .

pageTitle removal in 1.3: what about static pages?

2010-04-28 Thread Sergei
Hi, just began to work with 1.3 and noticed that there is no way to set page title ($title_for_layout) from the *view*. Yes it's possible to set it from controller action, but what about static pages for Pages controller? Pages controller has only one action 'display'. So setting title from

plz help me out

2010-04-28 Thread chanducake
hi i am new to cake php . i don't know how to write controller, model, view related to the below statements . plz help to write the whole code .for this only. i have to take the reference as this i will write the remaining code in my project. if($chkProfileType == ){$chkProfileType = 1;}

Re: plz help me out

2010-04-28 Thread Sam Sherlock
Read though the cakephp book - book.cakephp.org do the blog tutorial (a few times) search the google group (your question may well have been asked and answered before) google is a great suorce of much of the information you require eg google migrating to cakephp I know there are articles with

Re: How do I get Acl working?

2010-04-28 Thread Jon Chin
I just did a global search and I don't have that anywhere. Maybe I did something wrong in my AppController? class AppController extends Controller { var $components = array('Acl', 'Auth', 'Session'); function beforeFilter() { $this-Auth-fields = array( 'username' = 'email', 'password' =

Re: Problem direct linking files located in webroot

2010-04-28 Thread jgonca
The routes that are defined are the defaults, like in the 1.2.7 version. For the js, css and img files, the direct links are working fine... On 29 Abr, 01:47, Don Drake dreamingmin...@gmail.com wrote: This looks like it might be a problem with your routes. The error suggests cake is looking for

check box selection

2010-04-28 Thread Master Ram
Hi.. i am new to cakephp, i have check box and i want to get selected checkbox in to the next page. how to get the selected checkbox in cakephp. regards: Master Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this

Stuck again ...

2010-04-28 Thread Ed Propsner
Could someone help get me pointed in the right direction? I want to be able to set a variable in any one of my controllers/actions that is accessible by the default.ctp just like you would do for $page_title / $title_for_layout. I want to use it mainly for javascript so I would like to set the