Re: Tree Behavior Issue

2012-04-27 Thread Michael Gaiser
Yep... that would cause an issue. Thanks. On Fri, Apr 27, 2012 at 9:12 PM, lowpass wrote: > public $actsAs = array('Tree'); > > Notice the lowercase s you left out. > > On Fri, Apr 27, 2012 at 7:39 PM, Michael Gaiser wrote: >> I want to use the Tree Behavior on one of my models in 2.1, but it ha

Re: CakePHP 2.1.1 Performance

2012-04-27 Thread Justin Edwards
http://xdebug.org/docs/profiler On Sat, Apr 28, 2012 at 12:16 AM, Thiago Belem wrote: > Can you provide more information about you server like os, versions, cache > setup and etc? > > Regards, > -- > > Thiago Belem > > Enviado do meu Android (e sujeito a erros do corretor automático) > Em 27/04/2

Re: CakePHP 2.1.1 Performance

2012-04-27 Thread Thiago Belem
Can you provide more information about you server like os, versions, cache setup and etc? Regards, -- Thiago Belem Enviado do meu Android (e sujeito a erros do corretor automático) Em 27/04/2012 20:17, "Mika" escreveu: > Since we upgraded our web application to Cake 2.1.1 it has literally > ki

Re: get output controller from another controller

2012-04-27 Thread lowpass
I don't know if this is all you need but these might help: $this->response->type('xml'); $this->viewPath = 'events'; $this->view = 'view'; // assuming app/views/events/view.ctp On Fri, Apr 27, 2012 at 2:45 AM, Christophe Vandeplas wrote: > Hello, > > > ( using CakePHP 2.1 ) > I'm building an ap

Re: When using the delete action what is a good way to retrieve field data?

2012-04-27 Thread lowpass
You can also create a beforeDelete method in the model itself. When it's called, the Model::id will have been set. On Fri, Apr 27, 2012 at 2:31 PM, Daniel wrote: > Don't worry I used $this->Model->find('first', ... > > Thanks. > > -- > Our newest site for the community: CakePHP Video Tutorials >

Re: Hide "previous" "next" when no pagination

2012-04-27 Thread lowpass
You should test hasPrev() and hasNext() for it to work properly regardless of the current page number. On Fri, Apr 27, 2012 at 8:32 AM, JonStark wrote: > The last solution is the easiest, > > for those interested, this works really well : > > if ($this->Paginator->hasPage(2)) { > echo (""); > ec

Re: Tree Behavior Issue

2012-04-27 Thread lowpass
public $actsAs = array('Tree'); Notice the lowercase s you left out. On Fri, Apr 27, 2012 at 7:39 PM, Michael Gaiser wrote: > I want to use the Tree Behavior on one of my models in 2.1, but it has > multiple belongsTo relationships which I think is messing it up. > > In my domain model I have ad

Re: Table name with no meaning in eglish

2012-04-27 Thread mohit kumar
just follow the Cake naming conventions for non-english words On Sat, Apr 28, 2012 at 1:11 AM, Mamdouh wrote: > Hi I'm new to CakePHP and I'm wondering if I can use as table name a > words that has no meaning in english. if yes how can I do that ? > Thank you > > -- > Our newest site for the com

Re: Pagination

2012-04-27 Thread jeremyharris
Why didn't you use the $belongsTo array I gave you? Your belongsTo has changed the aliases from MainCity to main_city, so paginating by MainCity will not work. Rename the aliases to be CamelCased and try again. Also, debug the results of $this->paginate() to make sure it includes the MainCity a

Re: Pagination

2012-04-27 Thread hill180
Here is the real example I am trying. The webpage has a list of work order that are open. Paginator->sort('Work Order ID','WorkOrder.id') ?> //works Paginator->sort('Customer','Customer.name') ?> //works Paginator->sort('City','MainCity.name') ?> //no worky Customer Model: var $belongsTo = arr

Tree Behavior Issue

2012-04-27 Thread Michael Gaiser
I want to use the Tree Behavior on one of my models in 2.1, but it has multiple belongsTo relationships which I think is messing it up. In my domain model I have added: public $actAs = array('Tree'); In my controller I have: public function index() { $data = $this->Domain->generateTreeList(nu

cakephp-mongodb validate subdocuments

2012-04-27 Thread Dmitriy Salko
Hello everybody, I'm using https://github.com/ichikaway/cakephp-mongodb in my cakephp app and want to use cake validation. But have no idea how to validate sub-documents. Did anyone do something like this before? Thanks! -- Our newest site for the community: CakePHP Video Tutorials http://t

Table name with no meaning in eglish

2012-04-27 Thread Mamdouh
Hi I'm new to CakePHP and I'm wondering if I can use as table name a words that has no meaning in english. if yes how can I do that ? Thank you -- 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

Paginate - conditions of linked model

2012-04-27 Thread Tim Nijssen
Hi, I have a model called User and a model called Connection. The User has a hasMany relation with Connection. When I use $this->paginate() I get all Users 100 with all there Connections. Nothing strange... I get all the users with there connections. But.. I want to filter de Connections. So I sti

CakePHP 2.1.1 Performance

2012-04-27 Thread Mika
Since we upgraded our web application to Cake 2.1.1 it has literally killed our server several times. In WHM the "Server load (4 CPUs)" under Service Status runs above 15 the entire time, and spikes up to 50 and as high as 70, at which point the server basically dies. The same application under ex

Re: How to call element to element

2012-04-27 Thread Sean
In main view, call: $this->element('first_element'); In 'first_element' call: $this->element('second_element'); Hope this helps On Thursday, April 26, 2012 8:26:48 AM UTC-4, nikunj kansara wrote: > > Hello, > > I want to call one elements to another elements > > example : I have view/elements

Re: Model

2012-04-27 Thread Sean
Your Consult model would use $belongsTo. ex. /** * belongsTo associations * * @var array */ public $belongsTo = array( 'Patient' => array( 'className' => 'Patient', 'foreignKey' => 'patient_id', ), );// End $belongsTo Good luck, Sean On Friday, April 27, 2012 5:33:06 AM UTC-4, alexkd wrote

Re: When using the delete action what is a good way to retrieve field data?

2012-04-27 Thread Daniel
Don't worry I used $this->Model->find('first', ... 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 with their CakePHP related questions. To unsubscribe from this group

cakePHP 2.1, ckeditor + ckfinder

2012-04-27 Thread Sean
Hello again, I am working with cakePHP 2.1.0 and have incorporated ckeditor and ckfinder. I have gotten the editor window to come up and even gotten the ckfinder "Browse Server" button to work. What I am having problems with now is that when I hit the "Browse Server" button, the window opens, b

When using the delete action what is a good way to retrieve field data?

2012-04-27 Thread Daniel
When using the delete action what is a good way to retrieve (before the actual delete) field data (from the same table) ? e.g. how to get $this->request->data fields? I had thought of using the query method, but this seems like an ugly solution: e.g. $qry = $this->Image->query('SELECT user_id FROM

Implementing jQuery File Upload in CakePHP 2.1.x

2012-04-27 Thread Hugo Dias
Hi, i'm trying to implement this plugin ( http://blueimp.github.com/jQuery-File-Upload/ ) in cakephp 2.1.x the best way possible. Here is the repository : https://github.com/hugodias/JqueryFileUpload-CakePHP its already done but now we need to review the code and let it clean as possible .

How to set jqueryObject var in default.ctp and make it works in home.ctp

2012-04-27 Thread Emiliano
Hi everybody, I'm trying to use cakephp and jquery and I have a problem. I've define the following in my default.ctp (...) $this->Js->JqueryEngine->jQueryObject = '$j'; echo $this->Html->scriptBlock('var $j = jQuery.noConflict();',array('inline' => false)); echo $this->Js->JqueryEngine->jQueryOb

Re: Hide "previous" "next" when no pagination

2012-04-27 Thread JonStark
The last solution is the easiest, for those interested, this works really well : Paginator->hasPage(2)) { echo (""); echo $this->Paginator->prev(); echo (" | "); } ?> Paginator->numbers(); ?> Paginator->hasPage(2)) { echo (" | "); echo $this->Paginator->next(); } ?> Le jeudi 26 avril 2012

Re: Hide "previous" "next" when no pagination

2012-04-27 Thread majna
even better: if ($this->Paginator->hasPage(2)) // show next prev On Thursday, April 26, 2012 8:32:27 PM UTC+2, Jeremy Burns wrote: > > You can also apply css styles to them, and use the right style to set > display: none: > > echo $this->Paginator->first('<<', array('class' => 'arrow'), null,

Re: Model

2012-04-27 Thread LITTO CHACKO
for saving data first you save in patient and after that get the maximum id from that and use it to save the consulting table so, when u have to retrieve data u have to use belongs to relation in the model of consulting.. and add patient model in that. i hope this will work > > -- > Our newest s

Model

2012-04-27 Thread alexkd
I have two tables 1)Patient2)Consulting. Consulting has foreign key patient_id. But Patient would not have Consulting_id. What relation should I use? I have to ensure saving to Consulting table after each saving of patient. i.e its essential to saving to Consulting table after the saving Patient. H

Re: Get the first link of a post ?

2012-04-27 Thread Mike Griffin
On Thu, Apr 26, 2012 at 17:53, JonStark wrote: > I'm currently trying to get the first link of a post for a specific post > format, but preg_match needs two parameters and I can't find the second... > Here is my code : The second parameter is the thing you want to find a match in, I think they ca