Re: 3.0: a peek into CakePHP's future

2012-09-14 Thread Paolo Agostinetto
The var keyword was deprecated in cake 2 (dropping PHP 4 support), you should use public instead. Using dockblock doesn't seem to me the proper way to handle model properties and configuration. Yeah, I know doctine 2 does that, but it doesn't make sense to me giving to docblocks that kind of pow

Re: Date picker for CakePHP 2.0.3

2012-08-13 Thread Paolo
Nevermind! solved it, it's working now. I changed *array('id'=>'datepicker', 'type'=>'text')* to *array('class'=>'datepicker', 'type'=>'text')* and then changed $(function() { $("#datepicker").datepicker(); }); to ** *$(function() {* * $(".datepicker").datepicker();* *})

Re: Date picker for CakePHP 2.0.3

2012-08-13 Thread Paolo
HELP! It worked fine with your step-by-step instructions, Florin. However, I'm building a "search" form where I need 2 different datepickers, but it's not working. I guess the problem is that two DOM elements can't have the same value in their ID attribute (which in this case is "datepicker")

Re: CakePhp $this->redirect $this->Session doesn't work

2012-04-23 Thread Gian Paolo Donnarumma
2012 at 12:16 PM, LITTO CHACKO wrote: > ya, i sometimes these code works perfect in localserver. but it has > problem with in main server. > pls do the things i have mention in the previous post. > * check spaces at last of controller/model > *arrange codes proper > > >

Re: CakePhp $this->redirect $this->Session doesn't work

2012-04-23 Thread Gian Paolo Donnarumma
Hi, thank you for your fast reply. The problem is that on my local webserver all works well!! I've only changed webserver from local to a domain. The application works: - direct link - DB but I have a login form that block all because redirect doesn't works. Is possible that is a session proble

Re: hasOne with missing table + habtm

2010-05-26 Thread Paolo
Hi, I managed to solve the issue by removing the whit from hasAndBelongsToMany. Thanks Paolo On May 26, 6:00 pm, John Andersen wrote: > Sorry Paolo, it is just, that when you specifies information that does > not relate to each other, then it makes it very difficult to find out >

Re: hasOne with missing table + habtm

2010-05-26 Thread Paolo
> Please try to answer the rest of my questions in my previous post! > Enjoy, >    John > > On May 26, 5:03 pm, Paolo wrote: > > > Hi, thanks for your answer. I show you the code of the models: > > > User: > > > class User extends AppModel { >

Re: hasOne with missing table + habtm

2010-05-26 Thread Paolo
) ); } ?> On May 26, 3:57 pm, John Andersen wrote: > Thank you! > > How does your find statement look like? Please show the code. > > How is your association between User and Author defined? Please show > the code. > > How is your association b

Re: hasOne with missing table + habtm

2010-05-26 Thread Paolo
:cakeError() - CORE/cake/libs/object.php, line 203 Model::setSource() - CORE/cake/libs/model/model.php, line 779 Model::__construct() - CORE/cake/libs/model/model.php, line 439 ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 148 Model::__constructLinkedModel() - CORE/cake/libs/model/m

Re: hasOne with missing table + habtm

2010-05-26 Thread Paolo
PS: I talked about the habtm relationship because if i remove that relation everything works well. On May 26, 12:37 pm, Paolo wrote: > Hi all, I have a problem in a project I'm working on. I have a table > Users with two hasOne relationships with  Author and Manager. The > Auth

hasOne with missing table + habtm

2010-05-26 Thread Paolo
Hi all, I have a problem in a project I'm working on. I have a table Users with two hasOne relationships with Author and Manager. The Author table has a htbm relation with another table. The problem I'm facing is that when querying on the users table, if there is no related author (an acceptable

Re: using Cake data in external script

2010-04-09 Thread Paolo
ly. > > On Apr 9, 9:18 am, Paolo wrote: > > > Hi all, I'm trying to use Cakephp data in an external script, I used > > to do something like this in 1.1: > > > require 'app/webroot/index.php'; > > > But it does not seem to work in 1.2, it complai

using Cake data in external script

2010-04-09 Thread Paolo
Hi all, I'm trying to use Cakephp data in an external script, I used to do something like this in 1.1: require 'app/webroot/index.php'; But it does not seem to work in 1.2, it complains about AppController missing. Is there something I need to change to make it work? Thanks Check out the new Ca

Re: CakePHP Editor/IDE

2009-08-09 Thread Paolo Portaluri
Il giorno 06/ago/09, alle ore 22:12, pomares ha scritto: > I use Coda. No code autocompletion specific to CakePHP as far as I > know on any IDE. If there is, I would love to find out about it. Look at this: http://code621.com/content/6/a-collection-of-coda-clips-for-cakephp Ciao

Re: ok in browser but no db connection via command line

2009-06-04 Thread Paolo Portaluri
for MAMP I had to change the line > $this->connection = mysql_connect($config['host'] . ':' . > $config['port'], $config['login'], $config['password'], true); in the connect function of cake/libs/model/datasources/dbo/dbo_mysql.php > $this

Re: HABTM (tags) - using a text input instead of a select.

2009-05-26 Thread Paolo Portaluri
g together > myself if anybody knows of a "cake" way of doing this, or any links > that could help it would be appreciated! Look at this: http://mrphp.com.au/code/code-category/cakephp/cakephp-1-2/working-habtm-form-data-cakephp Ciao Paolo -- Paolo Portaluri mail: po

Re: Poll: what do you hate about CakePHP?

2009-05-08 Thread paolo
If I understand correctly, what you're looking for can be easily changed with the "recursive" property of a model. For example, in the index action of my Products controller, I do something like this: function index () { $this->Product->recursive = 0; //rest of the code here... } The h

Re: CakePHP In A Subdirectory?

2009-01-26 Thread Paolo Stancato
Sometimes I have problems because I forget to set AllowOverride to All in vhost configuration... maybe it can help. Sometimes s still a pain to prepare the enviroment to start developing :S Cheers 2009/1/26 inVINCable : > > RoVo: > > Tested your solution, still no go. This time, no 500 error, bu

Re: CakePHP In A Subdirectory?

2009-01-25 Thread Paolo Stancato
Find .htaccess files (there are two) and add "RewriteBase /myapp" into mod_rewrite section. Regards 2009/1/26 inVINCable : > > Hey all, > > Very simply question but cannot seem to find the answer. I have the > directory structure and everything in tact in the normal way. However, > on my server

Re: How to exclude a field from inserts and updates

2008-10-07 Thread Paolo Stancato
Maybe you're not passing those fileds but someone else. It's quiete easy to inject new fields in a form. Cheers 2008/10/7 teknoid <[EMAIL PROTECTED]>: > > While this works fine, and makes your app more secure... the real > question is why are you passing fields that do not need saving to the > c

Print SQL Query String

2008-09-29 Thread paolo
Hello there, How can I print/display SQL Query String in the view area? Like "SELECT `posts`.`id`, `posts`.`title` ... FROM `posts` WHERE ..". Thanks.... Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

SQL Query String

2008-09-29 Thread paolo
How can I print the SQL Query String in the controller class. Ex. "SELECT `posts`.`id` FROM Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php

Re: Cake sheet

2008-08-24 Thread Paolo Stancato
2008/8/23 NOSLOW <[EMAIL PROTECTED]>: > > Here's a few more items that have been deprecated in 1.2 that are > listed on that sheet: > > Global Functions: vendor(...), cache(...) > Controller: $beforeFilter, cleanUpFields() > Model: execute(data), findAll(...); findNeighbours(...), > findCount(...)

Re: Cake sheet

2008-08-22 Thread Paolo Stancato
2008/8/23 Samuel DeVore <[EMAIL PROTECTED]>: > > > As far as I know it is, but it is for 1.1 NOT 1.2 > What I thought anyway, is a good "quick reference". Cheers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Cake sheet

2008-08-22 Thread Paolo Stancato
Hi there! Can anyone tell me if this is the last revision of the Cake sheet? http://cakephp.org/files/cakesheet.pdf Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to th

Re: ACL: allowing modifications to row to owner only

2008-07-10 Thread Paolo
check it > jusr using the User session id. It´s much simpler, and way faster. > > Cheers, > mbavio > > On Jul 8, 7:50 am, Paolo <[EMAIL PROTECTED]> wrote: > > > Ok, so I have to add the user id to every row right? > > > On 7 Lug, 23:43, francky06l <[EMAI

Re: ACL: allowing modifications to row to owner only

2008-07-08 Thread Paolo
it the user/creator to "edit" the record AND if > the creator/user_id is in the row, checking the user/creator_id of the > row against the logged in user (in Session) can be done in edit > action ..(without ACL). > > On Jul 7, 6:10 pm, Paolo <[EMAIL PROTECTED]> wrote

ACL: allowing modifications to row to owner only

2008-07-07 Thread Paolo
Hi, I need to know if it is possible by using cake ACL to allow modifications to a single row only to the original creator of that row. I'm not sure if also visibility is limited to the creator, but modification would be fine for the moment. Should I create something on my own or is it already po

Re: CakePHP full example web site?

2008-04-28 Thread Paolo Stancato
You can get bakery's source code at SVN (https://svn.cakeforge.org/svn/bakery), it helps Cheers 2008/4/28 BeroFX <[EMAIL PROTECTED]>: > > Does anyone have a link or an example of a Cake site? > > What I'd like to see is a site with a main page, md5 passwords etc. > > > > --~--~-~--

Session and cake

2008-02-25 Thread Paolo
Hi all! I created a simple user authentication form, using session. The user must insert name and password and then if these correspond to a know combination the user is logged in. To check if a user is logged I used cake session. Everything woeked fine until I tried to use php sesison in another

Re: Accessing cake session from outside

2008-02-01 Thread Paolo
_FROM_ > $this->path); > > You'll need to find out where cake is storing it, so do a quick > debug($this->path) and insert that above. Now you should be able to do > session_start(); echo $_SESSION['variable']; > > I got this infor

Accessing cake session from outside

2008-01-28 Thread Paolo
Hi! How can I access cake variables from an external php file? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe f

Re: CakePhp and Extjs tree

2008-01-27 Thread Paolo
d paste your code temporarily > somewhere before you get the tutorial happening. Shouldn't need any > explanation of what the code does, so don't worry about making it > pretty. > > Cheers, > Adam > > On Jan 25, 12:19 am, Paolo <[EMAIL PROTECTED]> wrote: > > > H

Re: CakePhp and Extjs tree

2008-01-24 Thread Paolo
have some other extjs tutorials; maybe I can > get atreetutorial up sometime. You can find my other stuff > here:http://www.ntatd.org/mark. Maybe some of it will help, since the > datagrids do cover outputting data in json format. > > hydra12 > > On Jan 22, 8:14 am, Paolo &l

CakePhp and Extjs tree

2008-01-22 Thread Paolo
Hi all! Hasanyone tried to integrate cake with extjs tree? I qould like the used to edit the structure of a menu using extjs drag and drop tools on a tree, and then get the values (for ezample, a sequence of root -> node 1, node 2-> node 3 -> node 4 and then update the parent in the db fields. Any

Re: SQL Error: 1052: Column 'id' in where clause is ambiguous

2007-12-20 Thread Paolo
Sorry, my fault! :D I didn't check exactly, that came from Foto->find('id'=>'$id'), which corrected into Foto->find('Foto.id'=>'$id') did the job. thanks anyway! Paolo On 20 Dic, 13:10, AD7six <[EMAIL PROTECTED]> wrote: > On D

Re: SQL Error: 1052: Column 'id' in where clause is ambiguous

2007-12-20 Thread Paolo
PS: i used this line to delete: $this->Foto->del($id) On 11 Dic, 17:30, AD7six <[EMAIL PROTECTED]> wrote: > On Dec 11, 5:12 pm, Paolo <[EMAIL PROTECTED]> wrote: > > > HI! > > > I'm trying to delete a row from a model, using > > Modelname->d

Re: SQL Error: 1052: Column 'id' in where clause is ambiguous

2007-12-20 Thread Paolo
`.`immobile_id` = `Immobili`.`id`) WHERE `id` = '$id' LIMIT 1 Warning: SQL Error: 1052: Column 'id' in where clause is ambiguous in ./cake/libs/model/datasources/dbo_source.php on line 437 On 11 Dic, 17:30, AD7six <[EMAIL PROTECTED]> wrote: > On Dec 11, 5:12 pm, Pa

Re: Access cake data from external php script

2007-12-14 Thread Paolo
Thank you very much for all your answer. Just a note, I'm using 1.1, the stable version. Is 1.2 ready for a develepment environment? I see it is still beta or per-beta... I will try to work itout! Thanks On 14 Dic, 02:18, zonium <[EMAIL PROTECTED]> wrote: > Paolo, > This h

Re: Access cake data from external php script

2007-12-13 Thread Paolo
could use your cake application > as web service returning xml for example. > Now if you want to return a view or part of a view, I guess you should > make an $ajax request from your external application..(take care if > you have links in the returned views).. > > hth > >

Access cake data from external php script

2007-12-13 Thread Paolo
Hi all! I created a website for a real estate agency using cake. I used cake to create the management part of the website, now I'm creating the remaining part, that one that will be available to the user. I wouldn't like to use cake for this, but would it be possible to query some page or somethi

SQL Error: 1052: Column 'id' in where clause is ambiguous

2007-12-11 Thread Paolo
HI! I'm trying to delete a row from a model, using Modelname->del($id) But I receive the error SQL Error: 1052: Column 'id' in where clause is ambiguous Why is this happening? How can i solve itP? Thanks --~--~-~--~~~---~--~~ You received this message because y

Re: Simplest usage of the new Auth component?

2007-11-07 Thread Paolo Stancato
I am having troubles with Auth component too (but after the login step). My code is very similar, except that I'm using in AppController: function isAuthorized() { // This should authorize any controller/action, even if I'm not logged in, right? return true; } But when I try to access to a

Re: CSS and Image dir skipping

2007-10-31 Thread Paolo
not being used, make sure you are including it in > your view / layout. Look in /app/views/layouts/default.ctp (or copy > the default.ctp from /cake/libs/view/templates/layouts into your /app/ > views/layouts, then modify it to include your css). > > On Oct 31, 1:29 am, Paolo <[EMAI

CSS and Image dir skipping

2007-10-30 Thread Paolo
Hi all! How cani tell cake not to look for img or css controler? I mean, in my website I setup cake in a subdir, where i also added an img folder. How can i tell cake non to try to execute an img controller? Also, I've put a css (cake.custom.css) in the css dir, but while it correctly opens cake.g

Re: Modifying "added" page

2007-10-29 Thread Paolo
ok getLastInsertID :D On 29 Ott, 15:49, Paolo <[EMAIL PROTECTED]> wrote: > I can try that, but it should also work as I said isn't it? > > On 29 Ott, 15:41, senser <[EMAIL PROTECTED]> wrote: > > > Why don't you try to set some session variable with last in

Re: Modifying "added" page

2007-10-29 Thread Paolo
Ok, now I got it. The problem is that in the data array there isn't the id, because the id is added automatically from the db or from cake I don't know (it's an autoincrement int). Is there a way I can get the id of the last inserted item? Thanks On 29 Ott, 15:49, Paolo &l

Re: Modifying "added" page

2007-10-29 Thread Paolo
I can try that, but it should also work as I said isn't it? On 29 Ott, 15:41, senser <[EMAIL PROTECTED]> wrote: > Why don't you try to set some session variable with last inserted ID > and in custom_page to read the details for this ID > > Paolo wrote: > > Hi a

Modifying "added" page

2007-10-29 Thread Paolo
Hi all! I would like to modify the page cake shows after an item has been added successfully. I 've done something like: function add() { if (empty($this->params['data'])) { $this->render();

Re: Stange chars in all apges

2007-10-29 Thread Paolo
PS: what about the strange char I get at the top of each page? I always get an m on top, has anyone had the same problem? Thanks On 29 Ott, 12:17, Paolo <[EMAIL PROTECTED]> wrote: > You're right! I changes that line and now it works! > > Thank you very much! > >

Re: Stange chars in all apges

2007-10-29 Thread Paolo
You're right! I changes that line and now it works! Thank you very much! Paolo On 29 Ott, 12:12, grigri <[EMAIL PROTECTED]> wrote: > Because there is a mistake in the regular expression. The brackets > mean matching characters, parentheses subexpressions. > > So a

Re: Stange chars in all apges

2007-10-29 Thread Paolo
x27;\1us', > > I'll check the latest version of cake and have a look on trac, if > there's nothing there I'll submit a ticket. > > On Oct 29, 10:19 am, Paolo <[EMAIL PROTECTED]> wrote: > > > I think I can do the same by using > > var $name = &qu

Re: Stange chars in all apges

2007-10-29 Thread Paolo
Clientu, so where does it take the U? Also, If i remove the "i" Client, it looks for Clients, when I add the last i it looks for Clientus... On 27 Ott, 12:59, cakeFreak <[EMAIL PROTECTED]> wrote: > Ciao Paolo, > > CakePHP speaks in English, not Italian. > > Therefore

Re: Stange chars in all apges

2007-10-27 Thread Paolo
Any help? On 26 Ott, 10:13, Paolo <[EMAIL PROTECTED]> wrote: > Hi all! > I have a problem with CAke. In every page it displays a "m" at the > top, sometimes it add something more, such as null,null,null,'Comuni/ > nome');?> > > What can be the

Re: Out of memory and findall

2007-10-27 Thread Paolo
Thanks, i didn't know I had a reference to the City row to which belongs the house! Thank you very much! On 27 Ott, 10:14, DanielMedia <[EMAIL PROTECTED]> wrote: > J. Eckert was right. If you setup your associations that way, you > should only get 1 city, 1 region and 1 state for each house. > >

Re: Out of memory and findall

2007-10-27 Thread Paolo
I'm using cake 1.1 stable version. I will have to use pagination, but my proble still remain: how can i correlate data from house to data from cities? I would still need to select all cities? On 27 Ott, 09:36, francky06l <[EMAIL PROTECTED]> wrote: > Paolo, actually maybe it's

Re: Out of memory and findall

2007-10-26 Thread Paolo
gt; you shouldn't get more information than you need if you do a > > $this->House->findAll() > > For every house you will get 1 city, 1 region, 1 state... > > On Oct 26, 12:01 pm, Paolo <[EMAIL PROTECTED]> wrote: > > > Hi all! > > I have a pr

Out of memory and findall

2007-10-26 Thread Paolo
Hi all! I have a problem using cake. I have a table that is linked to it's geographical location (i.e. house -> ... city_id city -> ... region_id region -> -... state_id) In house index action I use findAll in all tables in order to show the city, region and state in the list of houses. The proble

Stange chars in all apges

2007-10-26 Thread Paolo
Hi all! I have a problem with CAke. In every page it displays a "m" at the top, sometimes it add something more, such as null,null,null,'Comuni/ nome');?> What can be the cause of this? Also, I have a model called Clienti, I use this name in model and controller, but it complains saying it can'

Re: Model Name Magic Needed

2007-10-25 Thread Paolo
for the table name you can use var $useTable ='your_table_name'; in the model You should use the name variable in controler and model to use the same name... On 25 Ott, 16:27, MikeK <[EMAIL PROTECTED]> wrote: > OR can we just change the Catch model to be Katch model, and leave the > Catches contr

Re: Handling image uploads

2007-10-25 Thread Paolo
I have the same problem too, any help please? On 25 Ott, 05:09, Rajesh <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to cake PHP and i am using version 1.1.17. I am little > confused as to how to handle image uploads within a single form that > has other fields to capture additional informatio

ACL with acl.ini.php

2007-10-24 Thread Paolo
Hi, I would like to use the CAke PHP ACL using the acl.ini.php file, but I cannot make it work, and cannot find any help online. For example, now in the file I have: ;- ;Users ;- [user] groups = group deny = allow = ;-

Re: Dropdown in CakePHP

2007-10-17 Thread Paolo
On 17 Ott, 17:36, dw <[EMAIL PROTECTED]> wrote: > Hi Paolo, > > To accomplish this, you would first set a variable in the edit > function of the Post controller using generateList: > > $this->set('categories', $this->Post->Category->generateL

Dropdown in CakePHP

2007-10-17 Thread Paolo
Hi all! I'm new to Cake and already have a problem. I'm creating the editing page for a model. It's something like: Post id category_id ... Category id name ... so that the Post model has a "belongTo" association like: var $belongsTo = array('Category' => a

Re: Weird slowness problem.

2007-09-01 Thread Paolo Gabrielli
I would like to recommend to just try http://www.mod-top.org/ - download - compile (the module) - make php.ini to load it - look what is that take so much time - profit?!?!?! :) Paolo Gabrielli --~--~-~--~~~---~--~~ You received this message because you are

Re: Pagination works, but not well with admin routing

2007-06-02 Thread Paolo Gabrielli
On May 31, 11:03 pm, AD7six <[EMAIL PROTECTED]> wrote: > > Including the RequestHandler component with no other code does that. > The only time the above would make a difference (in principle) is if > in the app code $this->layout = 'not ajax' is called - since the > requestHandler sets the layout

Re: Pagination works, but not well with admin routing

2007-05-31 Thread Paolo Gabrielli
dler's duty to do that. Am I wrong? Is Cake's or Pagination's fault? Thanks anyway, Paolo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Pagination works, but not well with admin routing

2007-05-31 Thread Paolo Gabrielli
(with the right rows!) in the "content" div instead of loading only the changing rows. Does anybody had this problem? Or, trying to figure out by myself, when does AJAX load an entire page in the content div? Many thanks, Paolo --~--~-~--~~~---~--~~ You r

Plurals with underscore inflectios

2007-04-23 Thread Paolo Gabrielli
le to /cake/libs/inflector.php in the var $coreSingularRules '/(utent)i$/i' => '\1e', Has anyone a trail of where I'm wrong or a link/document to read about that? Or is that a bug? (unlikely, I suppose, but is what I've thinked being "forced" to modify the

Re: Template of the cakeerror

2006-10-29 Thread Paolo
yes ok but when i replace the missing_controller page i see the default layout that is localized in the layouts directory. How i can change this layout?!?! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP"

Template of the cakeerror

2006-10-24 Thread Paolo
Hi i want change the template of the error page when i invoke cakeerror... how can i do? There are an infos abount cakeerror and can i manager that? Tnx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" gro