Re: Issue with Form Helper array('type' => 'file')

2012-02-23 Thread jeremyharris
What behaviors are you using besides Transfer? Coupler tends to mess with the data because it expects *just* the fields in the Media.Attachment model. Try removing Coupler if it's attached (since you're not using it). Also, unit tests are your friend. It would be much easier to try things and d

Re: CakePHP Multiple field search with ALL fields being OPTIONAL

2012-02-23 Thread rchavik
Use cakedc's search plugin. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubsc

Re: Issue with Form Helper array('type' => 'file')

2012-02-23 Thread Kro
Thanks for taking the time to reply @jeremyharris. The record is still getting written but the 'Rate' data is missing. The following is an example of a saved record. As you can see the 'Rate' data is missing. Array ( [Rate] => Array ( [id] => 92 [id_ref] =>

Re: Handling data returned by multi-select box

2012-02-23 Thread jeremyharris
It sounds like your $dropdownOpts var might be incorrect. What is it when you debug? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To u

Re: It's possible to change Pagination output markup?

2012-02-23 Thread jeremyharris
Yep, look at the PaginatorHelper docs[1]. 1: http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper The book is your friend :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask

Re: Handling data returned by multi-select box

2012-02-23 Thread autnoc
I'm making a bit of headway here, but still can't figure out how to do this. Anyone have any ideas? On Feb 9, 12:46 pm, autnoc wrote: > Hi! New to this group and to Cake. > > I have a form view for adding a record that has a multi-select (echo > $this->Form->input('relatedShowList', array ('optio

Re: How I can set "class" atributte for a Form?

2012-02-23 Thread reynie...@gmail.com
Thanks it works !! Ing. Reynier Pérez Mira http://reynierpm.site90.com/ On Thu, Feb 23, 2012 at 6:06 PM, Tilen Majerle wrote: > $this->From->create('Information', array('class' => 'yourclassname')); > -- > Lep pozdrav, Tilen Majerle > http://majerle.eu > > > > 2012/2/23 reynie...@gmail.com >

Re: How I can set "class" atributte for a Form?

2012-02-23 Thread Tilen Majerle
$this->From->create('Information', array('class' => 'yourclassname')); -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/2/23 reynie...@gmail.com > Hi: > I was reading the doc for Form Helper finding how to add "class" attribute > to a tag but can't find how, can any point me in the right

How I can set "class" atributte for a Form?

2012-02-23 Thread reynie...@gmail.com
Hi: I was reading the doc for Form Helper finding how to add "class" attribute to a tag but can't find how, can any point me in the right direction? I'm generating the form with this code: "echo $this->Form->create('Information');" Ing. Reynier Pérez Mira http://reynierpm.site90.com/ -- Our new

Re: The classic "Fatal error: Call to a member function find() on a non-object" for newbie

2012-02-23 Thread jeremyharris
No problem. Sometimes it helps to have another person look at it :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from th

Re: Chat with CakePHP...

2012-02-23 Thread majna
http://sandbox2.pseudocoder.com/demo/chat -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to ca

Re: The classic "Fatal error: Call to a member function find() on a non-object" for newbie

2012-02-23 Thread reynie...@gmail.com
Ohhh thanks I miss this part now it works. Ing. Reynier Pérez Mira http://reynierpm.site90.com/ On Thu, Feb 23, 2012 at 5:48 PM, jeremyharris wrote: > It's because the item Country does not exist on Information. Models are > always singular, so where you have Countries defined in your Informa

Re: The classic "Fatal error: Call to a member function find() on a non-object" for newbie

2012-02-23 Thread jeremyharris
It's because the item Country does not exist on Information. Models are always singular, so where you have Countries defined in your Information belongsTo you should have Country instead. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new Cak

Re: Error while trying to bake model for specific table

2012-02-23 Thread jeremyharris
Bake the model Person or tell your People controller to use the People model. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscr

Re: Error while trying to bake model for specific table

2012-02-23 Thread reynie...@gmail.com
And? What's the solution for this problem? How I can fix this? Ing. Reynier Pérez Mira http://reynierpm.site90.com/ On Thu, Feb 23, 2012 at 5:30 PM, jeremyharris wrote: > The model it is probably looking for is Person, which in english is the > singular of People. > > So PeopleController uses

Re: Error while trying to bake model for specific table

2012-02-23 Thread jeremyharris
The model it is probably looking for is Person, which in english is the singular of People. So PeopleController uses the Person model -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help ot

HABTM relationship

2012-02-23 Thread jholcomb
I am having a problem with an HABTM that has a forth table involved. Here's the break down Individuals AccountsTrailers AccountsTrailersIndividuals AccountHolders AccountsTrailersIndividuals has a field account_holder_id so that I can associate an individual with an accountstrailer the error I

AuthComponent and Session information not available in one of my controllers

2012-02-23 Thread Heather Walters
I have written my cake app to log in registered users and it works great on view pages where there is a db model associated with a User. However, on my main pages that aren't necessarily accessing some model (the PagesController where pages are things like upcoming events, contact us, about, etc),

Re: is this possible ? Seeking advice from mysql gurus :)

2012-02-23 Thread Miloš Vučinić
Thanks a lot ! Also I just wanted to post one other way to do this because I googled and just found out. before your query just post smth like this.. $this->Custommer->hasMany['Payment']['order'] = 'id DESC'; $this->Custommer->hasMany['Payment']['limit'] = 2; you can also place conditions there

Re: Setting Class or ID property for Form Radio Input Label

2012-02-23 Thread mike karthauser
On 23 Feb 2012, at 18:49, Blues Clues wrote: > Hi: > I am completely lost with this. > > I am using Form helper in CakePHP and embedded a Radio input into it. > The problem is that I need to set either class or id property for the > label next to Radio to control it using css. > > My code look

CakePHP Multiple field search with ALL fields being OPTIONAL

2012-02-23 Thread Web Tester
Hello all, i am implementing multiple search box with all parameter optional I am doing with postConditions here is my controller code $conditions = $this->postConditions($this->data, array( 'job_title' => 'LIKE',

Re: Setting Class or ID property for Form Radio Input Label

2012-02-23 Thread mike karthauser
On 23 Feb 2012, at 18:49, Blues Clues wrote: > Hi: > I am completely lost with this. > > I am using Form helper in CakePHP and embedded a Radio input into it. > The problem is that I need to set either class or id property for the > label next to Radio to control it using css. > > My code looks

Setting Class or ID property for Form Radio Input Label

2012-02-23 Thread Blues Clues
Hi: I am completely lost with this. I am using Form helper in CakePHP and embedded a Radio input into it. The problem is that I need to set either class or id property for the label next to Radio to control it using css. My code looks like this. "Contract", "Remnant" => "Remnant"); echo

Re: Error: Index.phpController could not be found

2012-02-23 Thread Stephen
You don't need any files in controllers for the application to work correctly, the files needed out of the box are already stored in /cake/ (The core engine if you wish). The homepage as I said (localhost/cakephp/) is linked to /cake/libs/controller/pages_controller.php and inside this controller

Problems with cake bake

2012-02-23 Thread reynie...@gmail.com
Hi: I'm trying to bake one of my DB tables and this is what I'm doing: 1) Create (M)odel for TblInformations table 2) Create (M)odel for TblInformationTypes table 3) Create (V)iew for TblInformationTypes table but at this step I get stucked and this error appear: Error: Database table information

Re: Error: Index.phpController could not be found

2012-02-23 Thread amg55nj
Installed 2.1 RC and still getting same error but now showing a stack trace if that will help. Missing Controller *Error: **Index.phpController* could not be found. *Error: *Create the class *Index.phpController* below in file: app\Controller\Index.phpController.php http://localhost/cakephp/i

Re: Error: Index.phpController could not be found

2012-02-23 Thread amg55nj
Thanks for the reply. They all have .htaccess files and made those changes to no success. I am reading through and trying what is suggested in this guide: http://book.cakephp.org/2.0/en/installation/advanced-installation.html but not having any success. My app\Controller directory has no file

Re: Error: Index.phpController could not be found

2012-02-23 Thread Stephen
Check your root, app and webroot directories to see if they actually contain a .htaccess file. Ensure your apache server configuration actually has the following (seeing as it's localhost, allow everything?): Options FollowSymLinks AllowOverride All Order deny,allow Allow from all Ensure the fol

Re: Error: Index.phpController could not be found

2012-02-23 Thread amg55nj
Opening that goes directly to http://localhost/cakephp/index.php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this

Re: Error: Index.phpController could not be found

2012-02-23 Thread Tilen Majerle
http://localhost/cakephp / open just this ! -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/2/23 amg55nj > http://localhost/cakephp -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questi

Re: Using $content_for_layout how :-(

2012-02-23 Thread Justin Edwards
https://github.com/search?q=cakephp+twitter+bootstrap&type=Everything&repo=&langOverride=&start_value=1 On Thu, Feb 23, 2012 at 9:37 AM, jeremyharris wrote: > To include CSS and JS, use the HtmlHelper[1]. This will include files from > /webroot/css and /webroot/js > > $content_for_layout holds th

Re: Error: Index.phpController could not be found

2012-02-23 Thread amg55nj
http://localhost/cakephp/index.php I enabled mod rewrites and uncommented the line for time after following a installation tutorial. But still getting that error... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site ht

Re: Using $content_for_layout how :-(

2012-02-23 Thread jeremyharris
To include CSS and JS, use the HtmlHelper[1]. This will include files from /webroot/css and /webroot/js $content_for_layout holds the content from the rendered view. All you need to do is echo it in the layout. There isn't anything more that you need to do with it. 1: http://book.cakephp.org/2

Re: Issue with Form Helper array('type' => 'file')

2012-02-23 Thread jeremyharris
What do you mean by corrupted? It should fail gracefully and stop the save process if there's an error. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP relate

Re: Saving a field with every operation in controllers

2012-02-23 Thread jeremyharris
Depends what you mean by "make an action." Do you want to modify the timestamp each time they modify the database, or do you want to modify the timestamp each time they call an action, like /controller/action? If it's the first, then use a behavior. There are a few "logging" behaviors out there

Re: is this possible ? Seeking advice from mysql gurus :)

2012-02-23 Thread jeremyharris
You can do this in a single find() call, using containable. (It will still create many mysql queries because that's just the way it needs to be done, however it will filter all the data for you). Something like: $this-> Customer ->find('all', array( 'conditions' => array( 'Customer.id' =>

Re: Having strange problem with debug()

2012-02-23 Thread jeremyharris
That is weird, seeing as debug() uses print_r(). Try debug($results, false) to see what you get. If it shows info, the problem lies in the html entity encoding. Maybe you have html in your results that just cause it to look like nothing's there (view source to see what's really there). -- Our

Saving a field with every operation in controllers

2012-02-23 Thread socrates
hi every one i think it is a bad question, but i think that some one can help me in this, i need to modify a time stamp and probably other fiels in the user profile, every time a user make an action, i think that the right place is to add a component to the AppController and following the inheritan

Re: Styles and JS not loaded

2012-02-23 Thread reynie...@gmail.com
Ok sorry for that my bad I'm using ->script when should be ->css miss this mail :-( Ing. Reynier Pérez Mira http://reynierpm.site90.com/ On Thu, Feb 23, 2012 at 9:19 AM, reynie...@gmail.com wrote: > Hi: > I'm trying to use Twitter Bootstrap for the look & feel of my application > but I must doi

Re: Why data isn't showed?

2012-02-23 Thread reynie...@gmail.com
Fine, it works now and I understand well this part, cheers and thanks Tilen Ing. Reynier Pérez Mira http://reynierpm.site90.com/ On Thu, Feb 23, 2012 at 8:55 AM, Tilen Majerle wrote: > read manual again ! > > models names are Country (singularized and camelized), and controllers are > Countrie

Styles and JS not loaded

2012-02-23 Thread reynie...@gmail.com
Hi: I'm trying to use Twitter Bootstrap for the look & feel of my application but I must doing something wrong because does not work :-(. I've created a file called default.ctp under View/Layouts folder and in this file I use this code for styles: Html->script('bootstrap.min.css'); ?> B

Re: App::uses Question

2012-02-23 Thread heohni
?? Now I am totally lost. On 23 Feb., 14:37, Tilen Majerle wrote: > yes, because components can be used ONLY in controllers, if you need this > somewhere else, use Library :) > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2012/2/23 heohni > > > > > > > > > Dear Tilen, > > > How can I

Re: App::uses Question

2012-02-23 Thread heohni
Dear Tilen, How can I make it then useable? $Functions = new FunctionsComponent(); is not working... On 23 Feb., 14:28, Tilen Majerle wrote: > first, App::uses has following: App::uses('NameOfAClass', 'Path'); so in ur > case it should be > App::uses('FunctionsComponent', 'Controller/Component'

Re: App::uses Question

2012-02-23 Thread Tilen Majerle
first, App::uses has following: App::uses('NameOfAClass', 'Path'); so in ur case it should be App::uses('FunctionsComponent', 'Controller/Component');, if you're using this component in plugin, use App::uses('FunctionsComponent', 'PluginName.Controller/Component'); where do u want to use this com

Re: Why data isn't showed?

2012-02-23 Thread Tilen Majerle
read manual again ! models names are Country (singularized and camelized), and controllers are CountriesController (pluralized)) -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/2/23 reynie...@gmail.com > OK, I made some changes to my DB structure and also to my code but still > getting e

Chat with CakePHP...

2012-02-23 Thread Maicon Pinto
Hello, I'm working with cakephp, and I want to develop a chat. Does anyone here have a simple tutorial how to tip? Thanks... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others wi

is this possible ? Seeking advice from mysql gurus :)

2012-02-23 Thread Miloš Vučinić
Hi :) so far I haven't had any really complex querys so there is one now and I seek for the advice on how to handle it. Now I now how to fix this redneck style (several queries etc, or one big and then filter in controller), however I am looking for a little more elegant solution. I have a model

Re: Why data isn't showed?

2012-02-23 Thread reynie...@gmail.com
OK, I made some changes to my DB structure and also to my code but still getting errors, see below what I'm doing now. 1) Change the table from countries to country and also rename the composite PK from country_id to id 2) Change code in the Model, now looks like this: Country->id = $id; if ($th

App::uses Question

2012-02-23 Thread heohni
HI, I want to use a component function within my model, now in V2.1. how can I do that? Is it right that I need t use this: App::uses('Functions', 'Component'); But what else do I need to use $this->Functions->needfullthing()? -- Our newest site for the community: CakePHP Video Tutorials htt

Re: Why data isn't showed?

2012-02-23 Thread reynie...@gmail.com
So because CakePHP doesn't support compsite PK then the solution need to be change the field country_id for id and also in all the tables. Reading the conventions for Models I get one doubt and goes to oneToMany relations. If I have one relation oneToMany between tables candidate and education and

Re: Why data isn't showed?

2012-02-23 Thread Tilen Majerle
http://book.cakephp.org/2.0/en/getting-started/cakephp-conventions.html look here, cakephp conventions -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/2/23 reynie...@gmail.com > Hi Tilen, I not understand your point here. As you said I have country_id > as PK and my table is Countries no

Re: Why data isn't showed?

2012-02-23 Thread reynie...@gmail.com
Hi Tilen, I not understand your point here. As you said I have country_id as PK and my table is Countries not Country so my model code is this one (Countries.php): class Countries extends AppModel { public $name = 'Countries'; } then if I use $this->Country->id = $id doesn't work and if I use $t

Issue with Form Helper array('type' => 'file')

2012-02-23 Thread Kro
I am saving a Rate record and an associated image using the Media plugin (https://github.com/davidpersson/media). Everything works fine when an image is added, when an image isn't added the Rate record gets corrupted. The array is as follows: Array ( [Rate] => Array ( [enabled] => 0 [is_corporate

Re: Media Plugin of David Persson is for cake 1.3 and for cake 2.0?

2012-02-23 Thread Rodrigo Rodrigues Moyle
Have you tried this plugin: https://github.com/josegonzalez/upload/tree/2.0 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscrib

Re: simple auth in 2.0

2012-02-23 Thread pablosky
Thank you very much. I had read the documentation and I do not really understand. But I had not read the example. It all works correctly. On 23 feb, 09:53, heohni wrote: > http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-examp... > Simple Authentication and Authorization Applicati

Re: Why data isn't showed?

2012-02-23 Thread Tilen Majerle
you have "country_id" as your primary key in table ? and "Countries" for modelname ? it should be "Country" right ? :) $this->Countries->country_id = $id; //this is wrong here should be ALWAYS "id", so $this->Countries->id = $id; but u should use camelized and singularized name, so $this->Countr

Using $content_for_layout how :-(

2012-02-23 Thread reynie...@gmail.com
Hi every, I'm newbie using CakePHP and have several doubts and here I come with two of them. I'm trying to use Twitter Bootstrap to build my application Layout, now: - I've created the file View/Layouts/default.ctp and inside in the code I need to use $content_for_layout ($this->fetch it's o

Re: problems with belongsTo and hasMany...

2012-02-23 Thread Stephen
try the following: $hasMany = array('Profile'); $belongsTo = array('User'); Cheers On 22 February 2012 19:02, Miguel Ángel Moreno Armenteros < miguel.s.addr...@gmail.com> wrote: > Hello, i know this subject comes over and over but I couldnt find the > solution.. > Im a beginner and iam testing

Re: simple auth in 2.0

2012-02-23 Thread heohni
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html Simple Authentication and Authorization Application Tutorial On 22 Feb., 21:23, pablosky wrote: > Hello, > > I used CakePHP 1.3 and now I come to CakePHP 2.0. > > Do not know how to do a simple authentication system

Re: Error: Index.phpController could not be found

2012-02-23 Thread Stephen Speakman
Quick summary (Do read the docs!) www.site.com/ - cake/libs/controllers/pages_controller.php OR CREATE - app/controllers/pages_controller.php - PagesController::display() www.site.com/users/ - app/controllers/users_controller.php - UsersController::index() www.site.com/users/login - app/c

Re: Yn: Error: Index.phpController could not be found

2012-02-23 Thread heohni
the error is in here: class Index.phpController extends AppController { I guess put into your address bar localhost/index.php just try http://localhost On 23 Feb., 10:30, Ersin Demirtas wrote: > This is a really big problem people don't read the documentation. Please > read the documentation ju

Re: Initialize Session within a component

2012-02-23 Thread heohni
class P28nComponent extends Component { var $components = array('Session'); On 23 Feb., 02:39, lowpass wrote: > > class P28nComponent extends Object { > > Are you using Cake 2.x? If so, update the component to extend the > Component class instead of Object. -- Our newest site for the commun

Re: Having strange problem with debug()

2012-02-23 Thread heohni
print_r() is return all array data... why not debug() ?? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, s