Re: serving javascript instead of html

2006-10-18 Thread kain

just to clarify, if autorender is set to true $this-render() can be
skipped in default installations?
or at least this is the behaviour I've always encountered; why he needs
a render() ?


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake PHP Zend Studio Templates

2006-10-12 Thread kain

Samuel,
I didn't know that you made textmate bundles, so now I can thank you
for such work :)


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: How to distinguish empty recordset from error in findAll()

2006-10-09 Thread kain

findAll returns an array, if no data was found, an empty array.

so try to use if (!empty($members)) {}


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ms sql server

2006-10-05 Thread kain

nate, on mac I'm using mamp, did you compile manually something to get
mssql php extension to work?


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



ms sql server

2006-10-04 Thread kain

hi guys,
at this time is better to use adodb or mssql native cakephp class for
sql server?

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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ms sql server

2006-10-04 Thread kain

guys, it was a pain to get mssql_connect to work.

on windows it needed a special dll that I wasn't able to find anywhere,
so I finished up to use one provided by a colleague.

now I had to move this little customized-scaffolded baby on a suse
server.. I've read about freetds, but I'm not sure.. any advice here?

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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



action returns xml

2006-10-03 Thread kain

I use this code:

function updatemap() {
$this-RequestHandler-setAjax($this);
$this-RequestHandler-setContent('xml');
$this-render('xml');
}

that is a result of different tests.

xml.thtml is a test file that contains pure xml, I've an ajax object
that calls updatemap() and this action must return an xml file.

I've set debug to 0, but my js class tell me that it cannot parse the
file.

what's wrong? I've not seen very much of setContent around here.

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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Bakehouse anybody ??

2006-09-21 Thread kain

textmate also can do it, especially with CAKE and Subversion bundle.
if you have a mac you'll love it.


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: cake setup -- does it have to be so difficult?

2006-08-31 Thread kain


stevenL wrote:
 Thanks. Of course I read the manual. Over and over...

 I was previouswy installing Cake inside the Sites folder.
 So I am trying your method of placing a folder for cake inside
 /Library/WebServer/Documents. When I visit the cake index file there
 it's the same problem, I get the cake page but I can see that it is not
 finding the CSS file (page is unstyled).

 If I set AllowOverride to All in httpd.conf, the page breaks and I get
 a bad request error. Any clues?

I'm on Mac too, try to uses MAMP (search google)
copy the cakephp zip archive in htdocs, decompress it, you will notice
that there is a folder named cakephp_, go to your shell, cd into
htdocs, then
mv cakephp_xxx/* .
mv cakephp_xxx/.htaccess .

have a try.

--
kain
http://www.cakephpforum.com


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Problem with scaffolding in cake_1.1.5.3148 ?!?!?

2006-07-14 Thread kain


ax0rz wrote:
 hey. i tried scaffolding (for a generic PostsController) with
 cake_1.1.5.3148 and it ISN'T WORKING at my end. it just creates the
 index view perfectly, but doesn't let me add, edit or delete posts! can
 someone else confirm this?

 i switched back to cake_1.1.3.2967, and scaffolding works perfectly. is
 there a problem with cake_1.1.5.3148 ?!?!? can someone else please
 confirm this?

same problem here :)

kain


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



understanding models

2006-05-24 Thread kain

hi.
I've this:

// app/models/post.php
class Post extends AppModel {
var $name = 'Post';
var $belongsTo = 'State, Region, Province, City, User, Contract,
Tipology, Category';
}

and

// app/models/region.php
class Region extends AppModel {
var $name = 'Region';
var $belongsTo = 'State';
}

when calling $this-Region-findAll(); from controller I have the
expected results:
Array
(
[0] = Array
(
[Region] = Array
(
[id] = ABR
[name] = ABRUZZO
[code] = 13
[state_id] = IT
[superficie] = 10.794 km²
[abitanti] = 1.300.000
[densita] = 120 ab./km²
[city_id] = 49
)

[State] = Array
(
[id] = IT
[name] = ITALIA
)

)
and so on, Region is linked to State model.
I only use belongsTo for my model, but now I need extra functionality.

I need to have the number of posts for each region, posts table
contains a region_id field.
is that possible? any hints how to configure relationships between
these tables?
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Custom empty value for selectTag

2006-04-27 Thread kain

I use this:

$array_prezzi = $this-Cost-generateList('Cost.contract_id =
'.$contract_id.'', 'id ASC');
if (is_array($array_prezzi)) {
$this-set('prezzi', array('' = 'TUTTI') + 
$array_prezzi);
} else {
$this-set('prezzi', array('' = 'TUTTI'));
}


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: MySQL Standard Character CakePHP problem

2006-04-24 Thread kain

hi RosSoft,
I'm having problems with utf-8 and apache, which editor do you use and
which setting have you applied?
for views I must have the file saved with uft-8 + BOM but for files I
must have set in ANSI otherwise things doesn't work.
I should use everything (including apache) in utf-8 since I use ajax
responses that I believe are in utf-8, but this thing is letting me
down.


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---