Re: API 1.2 chm or pdf

2008-07-15 Thread Duncan

Try searching in this group, as there used to be one, but I think it's
outdated, whereas the online API provides code coverage for the recent
RC2 release.

On Jul 14, 10:43 pm, Wisnu Manupraba [EMAIL PROTECTED] wrote:
 dear,

 where can I get api 1.2 documentation di chm or pdf format? because i'm not
 online 24 hour a day so that i need offline api documentation

 thanks
 --
 inoex135
 I'm a newbie who want to be a hackerhttp://inoex135.wordpress.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: API 1.2 chm or pdf

2008-07-15 Thread Wisnu Manupraba
On Tue, Jul 15, 2008 at 1:23 PM, Duncan [EMAIL PROTECTED] wrote:


 Try searching in this group, as there used to be one, but I think it's
 outdated, whereas the online API provides code coverage for the recent
 RC2 release.


yup, i need the latest release one



 On Jul 14, 10:43 pm, Wisnu Manupraba [EMAIL PROTECTED] wrote:
  dear,
 
  where can I get api 1.2 documentation di chm or pdf format? because i'm
 not
  online 24 hour a day so that i need offline api documentation
 
  thanks
  --
  inoex135
  I'm a newbie who want to be a hackerhttp://inoex135.wordpress.com
 



-- 
inoex135
I'm a newbie who want to be a hacker
http://inoex135.wordpress.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



how to use self join in cake

2008-07-15 Thread kaushik

I am new in CakePHP. I am facing problem to use parent_id of category
table.

Here is my code details:
categories Table:

`categoryId` int(10) NOT NULL auto_increment,
  `categoryName` varchar(100) NOT NULL,
`parentId` int(10) NOT NULL default 0,
  `isActive` enum('Y','N') NOT NULL default 'Y',
  PRIMARY KEY  (`categoryId`)

class category extends AppModel
{
 var $name = 'Category';
 var $primaryKey = 'categoryId';
 var $validate = array(
   'categoryName'  = VALID_NOT_EMPTY,
   );

}

I want to introduce the parentID in this Model, this parentId is
actually foreign key to locate the parent category of any sub-
category. The categoryID of any parent category will be insert as
parentId column of any subcategory and in case of parent category it
will be 0.

What change I have to do in the controller to make this relation. How
i have to use this model to display all the category name with its
parent category?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: need help with CakePHP + YUI

2008-07-15 Thread Ketan Shah

well u dont need to use the YUI javascript if you want to use YUI css
grids. Both are independant of each other. Just place the yui grid css
in the css folder of webroot and link it in your layout file. You can
continue using jquery and yui grid.

hope it helps.

-Ketan
http://www.propertyjungle.in

On Jul 15, 7:47 am, bingo [EMAIL PROTECTED] wrote:
 hi all,

 Till date, I have used jquery with CakePHP and it was simple
 integrating the two as JQuery contains a javascript file. Now I am
 planning to move from JQuery to YUI as YUI has both JS and CSS which
 makes developing front end easy. But, I am not sure how to integrate
 the two as the default file structure of YUI does not confirm to the
 file structure of CakePHP for organizing JS, CSS and images.

 If you are using YUI with CakePHP, I would be thankful if you can tell
 me how did you integrate the two. I am mainly looking for information
 on how to take apart YUI files (if it is required) and place them into
 JS, CSS, and image folders of CakePHP and ofcourse do that without
 breaking YUI :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Onkeypress event

2008-07-15 Thread RJ

I want to implement the following scenario:

there are 4 text-boxes  ,when user enters his name in the first input
box, i want that data(i.e user name) to be auto-filled in the 4th
input box after validating it with database(to check uniqueness) .

For this i'll need to make an ajax request on 'onKeyUp' event. I am a
total newbie and don't know how to do it in cakephp.
any help would be appreciated.

Thanks all
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: phpThumb Helper

2008-07-15 Thread Smelly_Eddie

I with Villa. Im no cake Guru, but I would love to provide support,
and reviewing bakery submissions seems like a task I could handle.

On Jul 14, 7:09 pm, villas [EMAIL PROTECTED] wrote:
 Yes sir,  I would volunteer!  To be honest,  I would put myself in the
 bottom quartile of Cake skillfullness,  but I reckon I still know
 enough to spot abuse and give a timely thumbs up to a well-written
 article.

 I would propose a simple posting to this group would produce many
 excellent candidates for such a job and I believe the Cake team would
 have no problem choosing the best.  Put us to the test -- collectively
 we could have decent Bakery articles approved in hours not weeks!

 On Jul 14, 8:01 pm, Chris Hartjes [EMAIL PROTECTED] wrote:

  On Mon, Jul 14, 2008 at 2:55 PM, villas [EMAIL PROTECTED] wrote:

   That's such a pity if the Bakery wouldn't be supported for such an
   avoidable reason. Surely the Cake team can just increase the number of
   trusted Bakery administrators so that there is always someone on
   'duty'.  Why not have 20 reviewers,  or more?  It seems so strange in
   such an active and knowledgeable community to take 2 weeks to approve
   something.

  Does that mean you're volunteering?

  --
  Chris Hartjes
  Motto for 2008: Moving from herding elephants to handling snakes...
  @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: need help with CakePHP + YUI

2008-07-15 Thread bingo

hi

I want to use YUI JS and CSS



On Jul 15, 4:49 am, Ketan Shah [EMAIL PROTECTED] wrote:
 well u dont need to use the YUI javascript if you want to use YUI css
 grids. Both are independant of each other. Just place the yui grid css
 in the css folder of webroot and link it in your layout file. You can
 continue using jquery and yui grid.

 hope it helps.

 -Ketanhttp://www.propertyjungle.in

 On Jul 15, 7:47 am, bingo [EMAIL PROTECTED] wrote:



  hi all,

  Till date, I have used jquery with CakePHP and it was simple
  integrating the two as JQuery contains a javascript file. Now I am
  planning to move from JQuery to YUI as YUI has both JS and CSS which
  makes developing front end easy. But, I am not sure how to integrate
  the two as the default file structure of YUI does not confirm to the
  file structure of CakePHP for organizing JS, CSS and images.

  If you are using YUI with CakePHP, I would be thankful if you can tell
  me how did you integrate the two. I am mainly looking for information
  on how to take apart YUI files (if it is required) and place them into
  JS, CSS, and image folders of CakePHP and ofcourse do that without
  breaking YUI :-)- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Customizing the output of Form Helpers

2008-07-15 Thread Dardo Sordi Bogado

HtmlHelper::tags could be a posibility.

On Tue, Jul 15, 2008 at 12:20 AM, Jonathan Snook
[EMAIL PROTECTED] wrote:

 Probably your best bet is to create your own helper that uses the base
 elements like $form-text and $form-error. Wrap your own HTML around
 those. Take a look at how $form-input does it and model yours around
 it.

 -Jonathan

 On 7/14/08, Tallbrick [EMAIL PROTECTED] wrote:
  I have been hitting Google hard for any tutorials on customizing the
  output of Cake's form helpers.  Namely adjusting the output of radio
  and checkbox arrays using the 'automagic' form helpers.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: need help with CakePHP + YUI

2008-07-15 Thread Rich

Javascript files go into the js folder of webroot and Css files can go
in the css folder of webroot or just drop the build folder into the js
of webroot. Its up to you as long as you link them properly in your
layout.

On Jul 15, 7:04 am, bingo [EMAIL PROTECTED] wrote:
 hi

 I want to use YUI JS and CSS

 On Jul 15, 4:49 am, Ketan Shah [EMAIL PROTECTED] wrote:

  well u dont need to use the YUI javascript if you want to use YUI css
  grids. Both are independant of each other. Just place the yui grid css
  in the css folder of webroot and link it in your layout file. You can
  continue using jquery and yui grid.

  hope it helps.

  -Ketanhttp://www.propertyjungle.in

  On Jul 15, 7:47 am, bingo [EMAIL PROTECTED] wrote:

   hi all,

   Till date, I have used jquery with CakePHP and it was simple
   integrating the two as JQuery contains a javascript file. Now I am
   planning to move from JQuery to YUI as YUI has both JS and CSS which
   makes developing front end easy. But, I am not sure how to integrate
   the two as the default file structure of YUI does not confirm to the
   file structure of CakePHP for organizing JS, CSS and images.

   If you are using YUI with CakePHP, I would be thankful if you can tell
   me how did you integrate the two. I am mainly looking for information
   on how to take apart YUI files (if it is required) and place them into
   JS, CSS, and image folders of CakePHP and ofcourse do that without
   breaking YUI :-)- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: need help with CakePHP + YUI

2008-07-15 Thread bingo

hi Ketan, Rich

Thanks for those hints. I got it working. Ketan as you said the JS and
CSS are independent and there is no internal referring between them.
And as Rich said, I place all the CSS files inside CSS folder and JS
files within JS folder. However, I left images within CSS folder
itself.

Here is how I organized YUI files in CakePHP

* Copied assest/skins folder from YUI into CSS/YUI/skins (left images
there itself)
* copied all functionality folders (such as layout, animation, etc)
into JS/YUI and deleted all the files except JS

Below is sample code that I think might help member understand how to
organize the code (I was trying to recreate a  layout manager sample
provided  on YUI - 
http://developer.yahoo.com/yui/examples/layout/page_layout.html
)

echo $html-css(array(
  'yui/reset-fonts-grids',
  'yui/skins/sam/resize',
  'yui/skins/sam/layout',
  'yui/skins/sam/button'
)
);
echo $javascript-link(array(
'yui/yahoo/yahoo-min',
'yui/event/event-min',
'yui/dom/dom-min',
'yui/element/element-beta-min.js',
'yui/dragdrop/dragdrop-min.js',
'yui/animation/animation-min.js',
'yui/resize/resize-beta-min.js',
'yui/animation/animation-min.js',
'yui/layout/layout-beta-min.js'
)
);


On Jul 15, 7:46 am, Rich [EMAIL PROTECTED] wrote:
 Javascript files go into the js folder of webroot and Css files can go
 in the css folder of webroot or just drop the build folder into the js
 of webroot. Its up to you as long as you link them properly in your
 layout.

 On Jul 15, 7:04 am, bingo [EMAIL PROTECTED] wrote:



  hi

  I want to use YUI JS and CSS

  On Jul 15, 4:49 am, Ketan Shah [EMAIL PROTECTED] wrote:

   well u dont need to use the YUI javascript if you want to use YUI css
   grids. Both are independant of each other. Just place the yui grid css
   in the css folder of webroot and link it in your layout file. You can
   continue using jquery and yui grid.

   hope it helps.

   -Ketanhttp://www.propertyjungle.in

   On Jul 15, 7:47 am, bingo [EMAIL PROTECTED] wrote:

hi all,

Till date, I have used jquery with CakePHP and it was simple
integrating the two as JQuery contains a javascript file. Now I am
planning to move from JQuery to YUI as YUI has both JS and CSS which
makes developing front end easy. But, I am not sure how to integrate
the two as the default file structure of YUI does not confirm to the
file structure of CakePHP for organizing JS, CSS and images.

If you are using YUI with CakePHP, I would be thankful if you can tell
me how did you integrate the two. I am mainly looking for information
on how to take apart YUI files (if it is required) and place them into
JS, CSS, and image folders of CakePHP and ofcourse do that without
breaking YUI :-)- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: MSSQL ntext problem

2008-07-15 Thread bitkidoku

When I change the source it works fine. But when I try to extend the
driver I get the same error saying:
Warning (2): mssql_query() [function.mssql-query]: Query failed [CORE
\cake\libs\model\datasources\dbo\dbo_mssql.php, line 176]

I changed the database config to 'my_mssql'. And created the following
extension. I am obviously missing something but what?

- CODE START -
?php
require (LIBS . 'model' . DS . 'datasources' . DS . 'dbo' . DS .
'dbo_mssql.php');

class DboMyMssql extends DboMssql {

var $description = MSSQL DBO Extension Driver;

// override this method to make ntext problem solved
function fields($model, $alias = null, $fields = array(), $quote =
true) {
if (empty($alias)) {
$alias = $model-alias;
}
$fields = parent::fields($model, $alias, $fields, false);
$count = count($fields);

$fieldDescription = $this- describe($model); // edit by b.e.d .
ref: https://trac.cakephp.org/attachment/ticket/4287/mssql_cake.patch

if ($count = 1  $fields[0] != '*'  strpos($fields[0],
'COUNT(*)') === false) {
for ($i = 0; $i  $count; $i++) {
$prepend = '';

if (strpos($fields[$i], 'DISTINCT') !== false) {
$prepend = 'DISTINCT ';
$fields[$i] = 
trim(str_replace('DISTINCT', '', $fields[$i]));
}
$fieldAlias = count($this-__fieldMappings);

if (!preg_match('/\s+AS\s+/i', $fields[$i])) {
if (strpos($fields[$i], '.') === false) 
{
$this-__fieldMappings[$alias . 
'__' . $fieldAlias] = $alias .
'.' . $fields[$i];
// edit by b.e.d start
//-$fieldName  = 
$this-name($alias . '.' . $fields[$i]);
//-$fieldAlias = 
$this-name($alias . '__' . $fieldAlias);
if 
($fieldDescription[$fields[$i]]['type'] == 'text')
{
$fieldName  = 
CAST(CAST(.$this-name($alias) . '.' . $this-
name($fields[$i]) . AS VARCHAR(8000)) AS TEXT);
$fieldAlias = 
$this-name($alias . '__' . $fieldAlias);
}
else
{
$fieldName = 
$this-name($alias) . '.' . $this-
name($fields[$i]);
$fieldAlias = 
$this-name($alias . '__' . $fieldAlias);
}
// edit by b.e.d end
} else {
$build = explode('.', 
$fields[$i]);

$this-__fieldMappings[$build[0] . '__' . $fieldAlias] =
$fields[$i];
$fieldName  = 
$this-name($build[0] . '.' . $build[1]);
$fieldAlias = 
$this-name(preg_replace(/^\[(.+)\]$/, $1,
$build[0]) . '__' . $fieldAlias);
}
if ($model-getColumnType($fields[$i]) 
== 'datetime') {
$fieldName = 
CONVERT(VARCHAR(20), {$fieldName}, 20);
}
$fields[$i] =  {$fieldName} AS 
{$fieldAlias};
}
$fields[$i] = $prepend . $fields[$i];
}
}
return $fields;
}
}
?
- CODE END -

On Jul 11, 3:38 pm, Nate [EMAIL PROTECTED] wrote:
 You don't need to change the source.  Just extend the driver and
 override the correct method.

 On Jul 10, 8:45 pm, bitkidoku [EMAIL PROTECTED] wrote:

  Thank you very much :-) I did a change in the source in a similar way.
  It is dirty but it works.

  On Jul 11, 12:32 am, James K [EMAIL PROTECTED] wrote:

   Oh, PS - I modified the hack so that it only runs when it recognizes
   an XML type from SQL 2005. If you change my
   $fieldDescription[$fields[$i]]['type'] == 'xml' to
   $fieldDescription[$fields[$i]]['type'] == 'text', it should work for
   ntext fields in general.

   - James

   On Jul 10, 12:34 pm, James K [EMAIL PROTECTED] wrote:

The official word from the CakePHP team is that CakePHP 

Re: Onkeypress event

2008-07-15 Thread Kyle Decot

That's going to get to be a lot of requests I would think. I suggest
either checking on submit, or having a Check Availability button.
Here is the code to put the value of one field into another. That
should get you started.

echo $form-
input(username,array(onkeydown=document.getElementById('input4').value=this.value));
// second input...
// third input
echo $form-input(username_again,array(id=input4));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread RJ

Thanks for the reply.. The client side requirement is achieved...
but i want to make a check whether the user-name is already registered
on the fly(i.e ajax call  on onkey event) .how to do that ?

On Jul 15, 5:28 pm, Kyle Decot [EMAIL PROTECTED] wrote:
 That's going to get to be a lot of requests I would think. I suggest
 either checking on submit, or having a Check Availability button.
 Here is the code to put the value of one field into another. That
 should get you started.

 echo 
 $form-input(username,array(onkeydown=document.getElementById('input4').value=this.value));

 // second input...
 // third input
 echo $form-input(username_again,array(id=input4));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-15 Thread lucaspirola

hi,

thanks to publish your results
with that bug.

see ya!

On Jul 15, 1:39 am, haj [EMAIL PROTECTED] wrote:
 So, I basically saved all UTF-8 files without BOM and now things works
 beautifully.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread Siegfried Hirsch

what about trying with the $ajax-observeField helper.

On Tue, Jul 15, 2008 at 2:45 PM, RJ [EMAIL PROTECTED] wrote:

 Thanks for the reply.. The client side requirement is achieved...
 but i want to make a check whether the user-name is already registered
 on the fly(i.e ajax call  on onkey event) .how to do that ?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Embed images to HTML-mails

2008-07-15 Thread Meloy

Hi,

I'm using cake's email-component to send multipart emails which works
fine so far.
But how do I add an image to the HTML-part?

I tried to do something like this in the layout:
?php e($html-image('logo.gif')); ?
But it just gives me an img src='... but not the actual image.

What am I doing wrong?

Regards
Meloy

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Customizing the output of Form Helpers

2008-07-15 Thread RichardAtHome

Also, you can manually add the html tags and not rely on the helper.

That said, the helper is *very* flexible and can accommodate a lot of
customisations :-)

On Jul 15, 12:33 pm, Dardo Sordi Bogado [EMAIL PROTECTED]
wrote:
 HtmlHelper::tags could be a posibility.

 On Tue, Jul 15, 2008 at 12:20 AM, Jonathan Snook

 [EMAIL PROTECTED] wrote:

  Probably your best bet is to create your own helper that uses the base
  elements like $form-text and $form-error. Wrap your own HTML around
  those. Take a look at how $form-input does it and model yours around
  it.

  -Jonathan

  On 7/14/08, Tallbrick [EMAIL PROTECTED] wrote:
   I have been hitting Google hard for any tutorials on customizing the
   output of Cake's form helpers.  Namely adjusting the output of radio
   and checkbox arrays using the 'automagic' form helpers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: how to use self join in cake

2008-07-15 Thread Siegfried Hirsch

Did you take a look to this posting in the bakery ?

http://bakery.cakephp.org/articles/view/coding-a-self-join-in-a-cake-application

On Tue, Jul 15, 2008 at 10:01 AM, kaushik [EMAIL PROTECTED] wrote:
 I want to introduce the parentID in this Model, this parentId is
 actually foreign key to locate the parent category of any sub-
 category. The categoryID of any parent category will be insert as
 parentId column of any subcategory and in case of parent category it
 will be 0.

 What change I have to do in the controller to make this relation. How
 i have to use this model to display all the category name with its
 parent category?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread RJ

it doesn't work i guess ... i want to make ajax calls on 'onkeyup'
event
how to use $ajax-observeField for the same??

On Jul 15, 6:04 pm, Siegfried Hirsch [EMAIL PROTECTED]
wrote:
 what about trying with the $ajax-observeField helper.

 On Tue, Jul 15, 2008 at 2:45 PM, RJ [EMAIL PROTECTED] wrote:

  Thanks for the reply.. The client side requirement is achieved...
  but i want to make a check whether the user-name is already registered
  on the fly(i.e ajax call  on onkey event) .how to do that ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread Siegfried Hirsch

I use frequecy for 1 seconds updates with the ajax call. Thats the way to handle
it without putting a burden on the server with every key stroke ;)

On Tue, Jul 15, 2008 at 3:11 PM, RJ [EMAIL PROTECTED] wrote:

 it doesn't work i guess ... i want to make ajax calls on 'onkeyup'
 event
 how to use $ajax-observeField for the same??

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread RJ

hey got it when i put frequency of 1 sec , it gives the desired
result.
But as Mr Decot mentioned, it could be a lot on server...

Thanks all

On Jul 15, 6:15 pm, Siegfried Hirsch [EMAIL PROTECTED]
wrote:
 I use frequecy for 1 seconds updates with the ajax call. Thats the way to 
 handle
 it without putting a burden on the server with every key stroke ;)

 On Tue, Jul 15, 2008 at 3:11 PM, RJ [EMAIL PROTECTED] wrote:

  it doesn't work i guess ... i want to make ajax calls on 'onkeyup'
  event
  how to use $ajax-observeField for the same??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Auth login redirect unreliable?

2008-07-15 Thread jhicks

That will only work as long as the browser supports HTTP_REFERER.

On Jul 6, 2:52 pm, Chez17 [EMAIL PROTECTED] wrote:
 Using Eric's post, I created a very simple way to get the Auth
 component to redirect to the referring page no matter what. I think
 its userful:

 ?php
 class UsersController extends AppController
 {
     var $name = Users;

     var $components = array(Auth);

     function beforeFilter()
     {
         $this-Auth-autoRedirect = false;
     }

     function login()
     {
         $this-redirect($_SERVER['HTTP_REFERER']);
     }

 }

 On Jul 2, 1:56 pm, Rich [EMAIL PROTECTED] wrote:

  that worked perfectly for me. thanks Eric!

  On Jul 2, 12:32 pm, Eric [EMAIL PROTECTED] wrote:

   I had a similar problem and here is what I did.

   1. Change your setupAuth function like this
   function setupAuth(  )
   {
   ...
   $this-Auth-loginRedirect = '/users/loginRedirect';
   $this-Auth-autoRedirect = false; // -- handle redirecting yourself

   }

   2. create a loginRedirect action which determines where to go after a
   login has succeeded

   function loginRedirect()
   {
    $this-log('users/LoginRedirect()', LOG_DEBUG);
    if (parent::getAuthGroup() ===  ADMIN)
    {
     $this-log('--redirecting to admin', LOG_DEBUG);
     $this-redirect('/admin/myCtrl/index');
    }
    else
    {
     $this-log('--redirecting to normal', LOG_DEBUG);
     $this-redirect('/myCtrl/index');

   }

   3. Your login action is pretty simple then

   function login()
   {
    if ($this-Auth-login())
    {
      $this-loginRedirect();
    }
    else
    {
     if (!empty($this-data))
       $this-Session-setFlash($this-Auth-loginError);
    }

   }

   I think you can get the page that the user was trying to access via
   the session, and redirect there, but taking them to the front page
   works for me
   .
   Hopefully this helps.

   -Eric

   On Jul 2, 10:44 am, leo [EMAIL PROTECTED] wrote:

On 2 Jul, 17:27, dr. Hannibal Lecter [EMAIL PROTECTED] wrote:

 I see what you mean, but I'm not sure that you can put 'action' = '/'
 or 'controller' = '/'.

Sorry, I missed that. Nope, I wouldn't want to be doing that even if
it was valid.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



[Question]About PHP i18n !

2008-07-15 Thread ghostjackyo

Excuse me !
I want to ask some question about PHP i18n !
Now i make some code with .po file !
But it was zh_TW word !
Does it have some tool can changed it to en_US ! (auto translation)

This was some code !

EX :


#: i18n_lang.php:18
msgid 繁體中文
msgstr 

#: i18n_lang.php:19
msgid 英文
msgstr 

#: i18n_lang.php:20
msgid 登入
msgstr 

#: i18n_lang.php:21
msgid 登入者帳號
msgstr 

#: i18n_lang.php:22
msgid 登入者密碼
msgstr 

#: i18n_lang.php:23
msgid 語系
msgstr 

#: i18n_lang.php:25
msgid 沒有執行權限
msgstr 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: [Question]About PHP i18n !

2008-07-15 Thread morris

I've been using Poedit http://www.poedit.net/ to create my
translated .po files from a po template file (.pot).

I haven't used any auto-translaters though I imagine there are some
out there. I doubt it would be a seamless translation though.

Poedit does have some fuzzy/suggestive translations and translation
memory when you are working in an existing .po file.

good luck!


ghostjackyo wrote:
 Excuse me !
 I want to ask some question about PHP i18n !
 Now i make some code with .po file !
 But it was zh_TW word !
 Does it have some tool can changed it to en_US ! (auto translation)

 This was some code !

 EX :


 #: i18n_lang.php:18
 msgid �c�餤��
 msgstr 

 #: i18n_lang.php:19
 msgid �^��
 msgstr 

 #: i18n_lang.php:20
 msgid �n�J
 msgstr 

 #: i18n_lang.php:21
 msgid �n�J�̱b��
 msgstr 

 #: i18n_lang.php:22
 msgid �n�J�̱K�X
 msgstr 

 #: i18n_lang.php:23
 msgid �y�t
 msgstr 

 #: i18n_lang.php:25
 msgid �S��v��
 msgstr 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: API 1.2 chm or pdf

2008-07-15 Thread aranworld

I'm sure the developers will release it as soon as Day 2.0 is
released.  You know, the one with 26 hours instead of 24.

I agree that this would be a good thing to have, but instead of just
demanding it, why don't you offer to put in some of the work needed to
create it?

On Jul 14, 11:29 pm, Wisnu Manupraba [EMAIL PROTECTED] wrote:
 On Tue, Jul 15, 2008 at 1:23 PM, Duncan [EMAIL PROTECTED] wrote:

  Try searching in this group, as there used to be one, but I think it's
  outdated, whereas the online API provides code coverage for the recent
  RC2 release.

 yup, i need the latest release one



  On Jul 14, 10:43 pm, Wisnu Manupraba [EMAIL PROTECTED] wrote:
   dear,

   where can I get api 1.2 documentation di chm or pdf format? because i'm
  not
   online 24 hour a day so that i need offline api documentation

   thanks
   --
   inoex135
   I'm a newbie who want to be a hackerhttp://inoex135.wordpress.com

 --
 inoex135
 I'm a newbie who want to be a hackerhttp://inoex135.wordpress.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



how to fire ajax observeField rules for an initial value?

2008-07-15 Thread Howard Glynn
I'm continuing to refactor code with 1.2RC2 and latest cake learnings!

I've got an $ajax-observeField(...) working nicely watching a select list.
When the
option changes, a more lengthy description is dynamically updated into a div
on the page to help the user.

But... when you first load the page, there has not been a changeEvent yet,
so the description
for the initially selected item does not show up.

I guess you could write some raw javascript to observe load events, but
this does not seem
very elegant, and essentially would repeat the observeField code

Are there any neat cake tricks in the ajax helper callbacks or options that
would force
this observation to fire itself and load the description when the form is
first loaded?

Cheers, Howard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: About PHP i18n !

2008-07-15 Thread ghostjackyo

Oh !
Thanks !
I will try it today !
I hope i can use it work !

On 7月15日, 下午10時51分, morris [EMAIL PROTECTED] wrote:
 I've been using Poedithttp://www.poedit.net/to create my
 translated .po files from a po template file (.pot).

 I haven't used any auto-translaters though I imagine there are some
 out there. I doubt it would be a seamless translation though.

 Poedit does have some fuzzy/suggestive translations and translation
 memory when you are working in an existing .po file.

 good luck!



 ghostjackyo wrote:
  Excuse me !
  I want to ask some question about PHP i18n !
  Now i make some code with .po file !
  But it was zh_TW word !
  Does it have some tool can changed it to en_US ! (auto translation)

  This was some code !

  EX :

  #: i18n_lang.php:18
  msgid �c�餤��
  msgstr 

  #: i18n_lang.php:19
  msgid �^��
  msgstr 

  #: i18n_lang.php:20
  msgid �n�J
  msgstr 

  #: i18n_lang.php:21
  msgid �n�J�̱b��
  msgstr 

  #: i18n_lang.php:22
  msgid �n�J�̱K�X
  msgstr 

  #: i18n_lang.php:23
  msgid �y�t
  msgstr 

  #: i18n_lang.php:25
  msgid �S��v��
  msgstr - 隱藏被引用文字 -

 - 顯示被引用文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: API 1.2 chm or pdf

2008-07-15 Thread DanielMedia

If you have Adobe Acrobat or something similar installed you can just
go to book.cakephp.org and hit File - Print - Adobe PDF... Instead
of sending it to your default printer. But make sure you select the
all on one page option in the manual first. Usually ends up being a
6 or 7 MB pdf from what I remember last time I did it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Customizing the output of Form Helpers

2008-07-15 Thread Lance Willett

Tallbrick,
In CakePHP 1.1 there was a method to override the default HTML output
by placing a file called tags.ini.php in your /app/config directory.
In CakePHP 1.2, that same override can be achieved by using creating a
file called tags.php in /app/config. There is one extra step for
1.2, though, which is adding an app-wide helper file (which loads that
tag override file).

See
http://groups.google.com/group/cake-php/browse_thread/thread/ef3892bbe6c936c7/0297f67bf702f72a?hl=enlnk=gstq=tags.php#0297f67bf702f72a
for the original discussion, and also see Trac ticket 2081 for the fix
(https://trac.cakephp.org/ticket/2081).

I've moved away from using custom HTML overrides via the tags.php file
to just doing my best with the default HTML that CakePHP spits out. In
most cases it works great. Also, as RichardAtHome mentioned, the Form
helper is pretty flexible. For example, if you want just the basic
radio button in a `div` element, you would do this:

 ?php echo $form-input('Model.field', array('type' = 'radio',
'options' = array('label' = 'This is an option.'))); ?

If you wanted to wrap your own element around the radio input and
label, do something like this:

 p class=myClass?php echo $form-radio('Model.field',
array('label' = 'This is an option.')); ?/p

The second method works great since you are wrapping the default HTML
in a custom wrapper for use as a CSS hook.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread Joel Perras

Problem with using onkeydown for this is that the # of DB requests is
directly proportional to the length of the name being input; setting a
freq. of 1 sec seems like a good solution.  However, I can usually
input my name in less than a second.  Try performing the action on an
onblur instead of onkeydown; that'll retain the same functionality,
but reduce the # of requests to the DB.

-J.

On Jul 15, 9:27 am, RJ [EMAIL PROTECTED] wrote:
 hey got it when i put frequency of 1 sec , it gives the desired
 result.
 But as Mr Decot mentioned, it could be a lot on server...

 Thanks all

 On Jul 15, 6:15 pm, Siegfried Hirsch [EMAIL PROTECTED]
 wrote:

  I use frequecy for 1 seconds updates with the ajax call. Thats the way to 
  handle
  it without putting a burden on the server with every key stroke ;)

  On Tue, Jul 15, 2008 at 3:11 PM, RJ [EMAIL PROTECTED] wrote:

   it doesn't work i guess ... i want to make ajax calls on 'onkeyup'
   event
   how to use $ajax-observeField for the same??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Embed images to HTML-mails

2008-07-15 Thread Lance Willett

 But it just gives me an img src='... but not the actual image.

That HTML image element is a reference to the image; browsers and HTML-
enabled email readers will display it correctly. When you say not the
actual image, do you mean:

(1) the image doesn't display correctlty in the email you sent?
(2) the HTML code itself shows up in the email display instead of the
image?

For (1): Check that the image path is correct ('logo.gif' should be in
your /app/webroot/img/ directory). Also, some email programs don't
show images by default, so it might look broken.

For (2): Ensure that the email program you are using to read the sent
email supports images and HTML formatting. If you are trying to read
an HTML email in plain text, you will undoubtedly see some HTML code.

If you want to send the email with both plain text (no images) and
HTML (images, layout, etc), take a look at the built-in Email
component in CakePHP: http://book.cakephp.org/view/176/email.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Embed images to HTML-mails

2008-07-15 Thread Jonathan Snook

On Tue, Jul 15, 2008 at 6:04 AM, Meloy [EMAIL PROTECTED] wrote:
 But how do I add an image to the HTML-part?

 I tried to do something like this in the layout:
 ?php e($html-image('logo.gif')); ?
 But it just gives me an img src='... but not the actual image.

 What am I doing wrong?

You're not doing anything *wrong*, per se, but the CakePHP Email
component wasn't really designed to do this. You may be able to pull
it off by attaching the image and referencing the ID of that image in
your HTML part but I forget how to do that (it's not really covered
these days and, from what I hear, is flagged as spam more often than
not.)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Auth Redirect based on Active

2008-07-15 Thread deizel.

You could also just solve this with a check in the controller, instead
of relying on the auth component or model validation to tell you this.
Examples can be found in this article:

http://www.jonnyreeves.co.uk/2008/06/cakephp-activating-user-account-via-email/

On Jul 7, 5:55 pm, Kyle Decot [EMAIL PROTECTED] wrote:
 I want to be able to redirect my users to a Your Account is not yet
 active page if active is set to 0. I know there is userScope which
 will not allow them to login, but how to I redirect them afterwards?
 Thank you as always for the help.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Trying to map findAll to $form-select()

2008-07-15 Thread Igor

Could anyone point me in the right direction with this one please?

I'm trying to pass some values to my view...

$stages = $this-Stage-findAll(
  null, array('id', 'name'), null, null
);
$this-set('stages', $stages);

... this is what's being passed...

Array
(
[0] = Array
(
[Stage] = Array
(
[id] = 2
[name] = Stage 2
)
)

[1] = Array
(
[Stage] = Array
(
[id] = 3
[name] = Stage 3
)
)

)

Unfortunately $form-select('stageID', $stages, null, array(),
'Stage'); outputs some strangeness.

Is it possible to map this array in such a way so the output looks
something like the example below? Or is it a matter of passing right
query to findAll() to produce a asimpler array?

select
  option value=2Stage 2/option
  option value=3Stage 3/option
/select

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: another transaction question

2008-07-15 Thread Flávio_GO_BRZ

English version:
We don't must forget to code before or in begin of 'try' this:

 $this-modelA-begin()// This code will start the transaction



Versão em Português:
Não devemos esquecer de codificar antes ou no começo do 'try' o
seguinte:

 $this-modelA-begin()// Inicia a transação

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Trying to map findAll to $form-select()

2008-07-15 Thread Chris Hartjes

On Tue, Jul 15, 2008 at 10:39 AM, Igor [EMAIL PROTECTED] wrote:
 Is it possible to map this array in such a way so the output looks
 something like the example below? Or is it a matter of passing right
 query to findAll() to produce a asimpler array?

 select
  option value=2Stage 2/option
  option value=3Stage 3/option
 /select


$this-Stage-find('list') should generate an array that you can pass
to form-select()


-- 
Chris Hartjes
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Embed images to HTML-mails

2008-07-15 Thread Lance Willett

 but the CakePHP Email component wasn't really designed to do this.

@Jonathan Snook
Sending images in HTML email with the Email component works just fine;
you don't need to send it as an attachment. And yes, if you have a
very large amount of images, it might get marked as spam by the
recipient email client (but that's a differerent topic for a different
day).

@Meloy
Make sure that the image path is not relative, but instead pointing to
a live production image.

Example of the image reference in the email view file:
 ?php e($html-image('http://live-site.com/logo.gif')); ?

Note the http://live-site.com/; addition so that CakePHP doesn't use
the relative path.

I tested this just now with with CakePHP 1.2.x.x revision 7333 and it
works as expected in HTML-aware email clients (Gmail, Mail,
Thunderbird).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Embed images to HTML-mails

2008-07-15 Thread Jonathan Snook

On Tue, Jul 15, 2008 at 2:25 PM, Lance Willett [EMAIL PROTECTED] wrote:

 but the CakePHP Email component wasn't really designed to do this.

 @Jonathan Snook
 Sending images in HTML email with the Email component works just fine;
 you don't need to send it as an attachment. And yes, if you have a
 very large amount of images, it might get marked as spam by the
 recipient email client (but that's a differerent topic for a different
 day).

Let me clarify since I think you missed what I was trying to say. Yes,
you can link to images hosted on the interwebs just fine and the
CakePHP component will work just fine to accomplish this. What the
person is asking to do, however, is have the image encoded within the
email as part of a multi-part email. This is different than what you
are suggesting.

Anyways, after trying to track down more info on this for the original
poster, look into Swift. Here's an example of doing an embedded image:
http://swiftmailer.org/wikidocs/v3/tutorials/embedding_images

-Jonathan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: MSSQL ntext problem

2008-07-15 Thread Nate

If the code above is the same as the method you patched in the core,
then it should work fine.  Try examining the query output, and/or
running the query in Enterprise Manager to get to a more informative
error message.

On Jul 15, 8:22 am, bitkidoku [EMAIL PROTECTED] wrote:
 When I change the source it works fine. But when I try to extend the
 driver I get the same error saying:
 Warning (2): mssql_query() [function.mssql-query]: Query failed [CORE
 \cake\libs\model\datasources\dbo\dbo_mssql.php, line 176]

 I changed the database config to 'my_mssql'. And created the following
 extension. I am obviously missing something but what?

 - CODE START -
 ?php
 require (LIBS . 'model' . DS . 'datasources' . DS . 'dbo' . DS .
 'dbo_mssql.php');

 class DboMyMssql extends DboMssql {

         var $description = MSSQL DBO Extension Driver;

         // override this method to make ntext problem solved
         function fields($model, $alias = null, $fields = array(), $quote =
 true) {
                 if (empty($alias)) {
                         $alias = $model-alias;
                 }
                 $fields = parent::fields($model, $alias, $fields, false);
                 $count = count($fields);

                 $fieldDescription = $this- describe($model); // edit by 
 b.e.d .
 ref:https://trac.cakephp.org/attachment/ticket/4287/mssql_cake.patch

                 if ($count = 1  $fields[0] != '*'  strpos($fields[0],
 'COUNT(*)') === false) {
                         for ($i = 0; $i  $count; $i++) {
                                 $prepend = '';

                                 if (strpos($fields[$i], 'DISTINCT') !== 
 false) {
                                         $prepend = 'DISTINCT ';
                                         $fields[$i] = 
 trim(str_replace('DISTINCT', '', $fields[$i]));
                                 }
                                 $fieldAlias = count($this-__fieldMappings);

                                 if (!preg_match('/\s+AS\s+/i', $fields[$i])) {
                                         if (strpos($fields[$i], '.') === 
 false) {
                                                 $this-__fieldMappings[$alias 
 . '__' . $fieldAlias] = $alias .
 '.' . $fields[$i];
                                                 // edit by b.e.d start
                                                 //-$fieldName  = 
 $this-name($alias . '.' . $fields[$i]);
                                                 //-$fieldAlias = 
 $this-name($alias . '__' . $fieldAlias);
                                                 if 
 ($fieldDescription[$fields[$i]]['type'] == 'text')
                                                 {
                                                         $fieldName  = 
 CAST(CAST(.$this-name($alias) . '.' . $this-name($fields[$i]) . AS 
 VARCHAR(8000)) AS TEXT);

                                                         $fieldAlias = 
 $this-name($alias . '__' . $fieldAlias);
                                                 }
                                                 else
                                                 {
                                                         $fieldName = 
 $this-name($alias) . '.' . $this-name($fields[$i]);

                                                         $fieldAlias = 
 $this-name($alias . '__' . $fieldAlias);
                                                 }
                                                 // edit by b.e.d end
                                         } else {
                                                 $build = explode('.', 
 $fields[$i]);
                                                 
 $this-__fieldMappings[$build[0] . '__' . $fieldAlias] =
 $fields[$i];
                                                 $fieldName  = 
 $this-name($build[0] . '.' . $build[1]);
                                                 $fieldAlias = 
 $this-name(preg_replace(/^\[(.+)\]$/, $1,
 $build[0]) . '__' . $fieldAlias);
                                         }
                                         if 
 ($model-getColumnType($fields[$i]) == 'datetime') {
                                                 $fieldName = 
 CONVERT(VARCHAR(20), {$fieldName}, 20);
                                         }
                                         $fields[$i] =  {$fieldName} AS 
 {$fieldAlias};
                                 }
                                 $fields[$i] = $prepend . $fields[$i];
                         }
                 }
                 return $fields;
         }}

 ?
 - CODE END -

 On Jul 11, 3:38 pm, Nate [EMAIL PROTECTED] wrote:

  You don't need to change the source.  Just extend the driver and
  override the correct method.

  On Jul 10, 8:45 pm, bitkidoku [EMAIL PROTECTED] wrote:

   Thank you very much :-) I did a change in the source in a similar way.
   It is dirty but it works.

   On Jul 11, 12:32 am, James K [EMAIL PROTECTED] wrote:

Oh, PS - I modified the 

Re: ACL

2008-07-15 Thread Stinkbug

 Can anyone let me know, the use of ACL in cakephp, and howz we can
 implement that ?

It's not an easy thing to wrap your head around.  However, it's really
powerful.  If you read the Understanding How ACL Works you should
get a pretty good idea how powerful, flexible, and maintainable it
is.  It took my quit some time to figure it all out, but it's the only
thing that worked for our application.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Call JavaScript function in Ajax view

2008-07-15 Thread Pierre MARCOURT
Hello,

I am using CakePHP v1.1 and it seems that for some reason, I am not able 
to call JavaScript function in an Ajax View.
Is there something I have to do for that ?

Thanks.

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Cake bake does not recognize relationships?

2008-07-15 Thread Mech7

Does anybody know what could be wrong.. if I would bake my model /
controllers / views for users
it will just put a input text box for usergroup_id and in the model it
just says:

?php
class Users extends AppModel {
var $name = 'Users';
}
?

Here is the table setup..

---
CREATE TABLE `usergroups` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(120) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `username` varchar(120) NOT NULL,
  `password` varchar(120) NOT NULL,
  `usergroup_id` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `fk_usergroup_id` (`usergroup_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
---

Does anybody know why it would not recognize the other table?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



CakePHP and JW FLV player problem

2008-07-15 Thread thegoodbyte

I have this issue with cake.First let me explain how it works  : JLW
player embedded into the page.As you load the page, the player shows
up.Then I have custom links that pass the movie url to the player.
it all works fine as long as the debug mode is more then zero (0).As
soon as I switch to the production mode (means 0), the player does not
show up on the page load.It only shows (and plays the file) when you
click one of the links.
What is the problem ? I need to see in the production mode the player.
Is it cache ? security ?
Thanks for any suggestion.
BTW, the links are passed through jquery ...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Configure::write

2008-07-15 Thread kik

Hi,

I'm new to cakephp and I was reading the tutorial about
Configure::write and Configure::read. As far as I understand when you
use Configure::write it's storing a data in the config file and the
data is permanently stored. But when I try to get the data from
another controller or even another action of the same controller I'm
not able to read the value. It seems that I'm able to get the value
only from the same action that writes to Configure. Does this mean
that Configure::write does not store the information permanently? For
instance I have an action:

index() {
Configure::write('example', 'myname');
}
and then:

view() {
Configure::read('example');
}
Basically I'm not able to get the value of Example(which is 'myname')
from any other action than index. If I try to read the value from
view() it does not return anything.

I will be thankfrul if someone explains to me how this works! Thank
you in advance for any suggestions!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Configure::write

2008-07-15 Thread Gonzalo Servat
On Tue, Jul 15, 2008 at 4:02 PM, kik [EMAIL PROTECTED] wrote:


 [..snip..]
 ... As far as I understand when you
 use Configure::write it's storing a data in the config file and the
 data is permanently stored.


Nope. As far as I know, Configure::write() 'writes' the variable into the
Configure instance.


 But when I try to get the data from
 another controller or even another action of the same controller I'm
 not able to read the value.


If you are expecting to write in one call then read in another call, then
you probably want to use sessions for that.


 It seems that I'm able to get the value
 only from the same action that writes to Configure. Does this mean
 that Configure::write does not store the information permanently? For
 instance I have an action:


As above, that's correct. It does not store information permanently.

I will be thankfrul if someone explains to me how this works! Thank
 you in advance for any suggestions!


This is my understanding of the Configure class.

Group: If I gave any wrong info, please feel free to correct me.

- Gonzalo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: ACL with multi-group membership?

2008-07-15 Thread Stinkbug

Not sure if this will help you out or not, but I can explain what I've
done in our application.  I thought about a way to have the same user
under two different departments.  What I really starting thinking
about it though, I found it wasn't necessary (at least in my case).

I have something like this.

Aros

Department.1
-User.1
-User.2
Department.2
-User.3
-User.4

Acos

Department.1
-blog
-page
Department.2
-blog
-page

Now I can give Department.1 (Aro) access to Department.1 (Aco).  Now,
let's say User.1 (Aro) needs access to the same things that Department.
2 (Aro) has access to.  Because all my Aros are grouped by Departments
too...  Even though User.1 isn't a part of the Department.2 group, I
can still give User.1 access to the Aco Deparment.2.  Now User.1 has
access to everything that Department.2 has access to.

The only time I can think of where this might be a problem is if you
wanted to give Department.2 (Aro) access to Department.3 (Aco).  User.
1 (Aro) won't have access to it unless you say it can. It will still
only have access to Department.2.

In your case you could set up a structure like this:

Aros

Millennium Falcon
-Crew
--Han
--Chewie
-Passangers
--Luke
--R2D2

Acos

Guns
Engines
Lounge
Cockpit

Now Crew (Aro) could have access to everything.  Passangers could have
access to Lounge.  And R2D2 could have access to Guns and Engines.

Another good way to think about...  There can't be more than one of me
in this world.  Having more than one of me would be trouble.  I have
access to my job and my office.  If I get fired I shouldn't have
access to it anymore, but if there were two of me, even though I got
fired, I might still have access to my job and office.  It's bad
news.  The same goes for the ACL.  There should never be two Hans...
there's only one, that can have access to many different things.

Hope that's not to confusing.  Hope it helps.

On Jul 14, 3:34 am, CrazyDave [EMAIL PROTECTED] wrote:
 Hi,

 I want to use the ACL component in CakePHP and have got things up and
 running thanks to some blog posts by Mark Story and LemonCake.  I do
 have a query about the ACL and if it's capable of users belong to
 multiple groups?

 I found two previous posts on the subject:

 http://groups.google.com/group/cake-php/browse_thread/thread/2c219ca5...

 http://groups.google.com/group/cake-php/browse_thread/thread/633e56e4...

 Both state that this isn't possible with CakePHP's ACL, has this
 changed or will this ever change?

 For example (taken from phpgacl) something like this where Han is a
 member of two groups.

 Default: DENY ALL
   Millennium Falcon Passengers
     |-Crew [ALLOW: ALL]
     | |-Han
     | |-Chewie [DENY: Engines]
     |-Passengers [ALLOW: Lounge]
     | |-Jedi [ALLOW: Cockpit]
     | | |-Obi-wan
     | | |-Luke [ALLOW: Guns]
     | |-R2D2
     | |-C3PO
     |-Engineers [ALLOW: Engines, Guns]
       |-Han
       |-R2D2

 Thanks,
 Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Authentication: logged user data

2008-07-15 Thread Janoma

Thanks!

I wasn't using Auth in a proper way, though it's quite straightforward
actually.

On 14 jul, 18:03, Sam Sherlock [EMAIL PROTECTED] wrote:
 http://book.cakephp.org/view/172/authentication

 2008/7/14 Janoma [EMAIL PROTECTED]:



  Hello,

  I have two models: User and News. Each element in the News table has a
  user associated with it (the author). How do I obtain the username of
  the currently logged user? I have tried several things, but I can't
  find where the session info is stored.

  Thanks for your help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Embed images to HTML-mails

2008-07-15 Thread Lance Willett

 Let me clarify since I think you missed what I was trying to say.
 This is different than what you are suggesting.

Sorry for hijacking the thread—I did indeed misunderstand Meloy's
question. And yes, you are right in saying that the Email component is
not designed to embed images in emails.

 Anyways, after trying to track down more info on this for the original
 poster, look into Swift. Here's an example of doing an embedded 
 image:http://swiftmailer.org/wikidocs/v3/tutorials/embedding_images

There is a 1.1.x.x Bakery article on SwiftMailer Component
Tutorial (http://bakery.cakephp.org/articles/view/swiftmailer-
component-tutorial), but I'm not sure if that would or work well with
a 1.2.x.x app. At the bottom of the tutorial, there is a section
called Bonus where the author explains how to embed an image using
Swift.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Embed images to HTML-mails

2008-07-15 Thread Renan Gonçalves
If you want put the full url, you can do this:
?= FULL_BASE_URL . $html-image()) ?

I think its more simple and less weight than embed image on a email.


[]'s

On Tue, Jul 15, 2008 at 5:34 PM, Lance Willett [EMAIL PROTECTED] wrote:


  Let me clarify since I think you missed what I was trying to say.
  This is different than what you are suggesting.

 Sorry for hijacking the thread—I did indeed misunderstand Meloy's
 question. And yes, you are right in saying that the Email component is
 not designed to embed images in emails.

  Anyways, after trying to track down more info on this for the original
  poster, look into Swift. Here's an example of doing an embedded image:
 http://swiftmailer.org/wikidocs/v3/tutorials/embedding_images

 There is a 1.1.x.x Bakery article on SwiftMailer Component
 Tutorial (http://bakery.cakephp.org/articles/view/swiftmailer-
 component-tutorialhttp://bakery.cakephp.org/articles/view/swiftmailer-component-tutorial),
 but I'm not sure if that would or work well with
 a 1.2.x.x app. At the bottom of the tutorial, there is a section
 called Bonus where the author explains how to embed an image using
 Swift.


 



-- 
Renan Gonçalves - Software Engineer
Cell Phone: +55 11 8633 6018
MSN: [EMAIL PROTECTED]
São Paulo - SP/Brazil

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Cake bake does not recognize relationships?

2008-07-15 Thread Renan Gonçalves
Recognize relationships based on InnoDB relationships is planned to CakePHP
2.0.
https://trac.cakephp.org/wiki/Proposals/2.0ToDoList


[]'s

On Tue, Jul 15, 2008 at 4:07 PM, Mech7 [EMAIL PROTECTED] wrote:


 Does anybody know what could be wrong.. if I would bake my model /
 controllers / views for users
 it will just put a input text box for usergroup_id and in the model it
 just says:

 ?php
 class Users extends AppModel {
var $name = 'Users';
 }
 ?

 Here is the table setup..


 ---
 CREATE TABLE `usergroups` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(120) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY  (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `username` varchar(120) NOT NULL,
  `password` varchar(120) NOT NULL,
  `usergroup_id` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `fk_usergroup_id` (`usergroup_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 ---

 Does anybody know why it would not recognize the other table?
 



-- 
Renan Gonçalves - Software Engineer
Cell Phone: +55 11 8633 6018
MSN: [EMAIL PROTECTED]
São Paulo - SP/Brazil

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Test Suite: parsing a CSV file, where to store file?

2008-07-15 Thread Renan Gonçalves
Fixtures are for Model tests.
I think a more standard place to put the CSV file is on temporary
directory (/tmp) or on a webroot/files directory.


[]'s

On Mon, Jul 14, 2008 at 10:35 PM, Grant Cox [EMAIL PROTECTED] wrote:


 I do the same, and keep the file in fixtures.  Makes sense to me :)


 On Jul 15, 8:33 am, aranworld [EMAIL PROTECTED] wrote:
  I need to create a test case for the parsing of a tab delimited file.
  Would it make sense to put the test version of this CSV file in the
  fixtures directory of my test suite?  Or is there a more standard
  place to put a file like this?
 



-- 
Renan Gonçalves - Software Engineer
Cell Phone: +55 11 8633 6018
MSN: [EMAIL PROTECTED]
São Paulo - SP/Brazil

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Configure::write

2008-07-15 Thread Renan Gonçalves
And... if you wanna store this data permanently you must save on a local
file.
To do it, use Configure::store and Configure::load


[]'s

On Tue, Jul 15, 2008 at 4:36 PM, Gonzalo Servat [EMAIL PROTECTED] wrote:

 On Tue, Jul 15, 2008 at 4:02 PM, kik [EMAIL PROTECTED] wrote:


 [..snip..]
 ... As far as I understand when you
 use Configure::write it's storing a data in the config file and the
 data is permanently stored.


 Nope. As far as I know, Configure::write() 'writes' the variable into the
 Configure instance.


 But when I try to get the data from
 another controller or even another action of the same controller I'm
 not able to read the value.


 If you are expecting to write in one call then read in another call, then
 you probably want to use sessions for that.


 It seems that I'm able to get the value
 only from the same action that writes to Configure. Does this mean
 that Configure::write does not store the information permanently? For
 instance I have an action:


 As above, that's correct. It does not store information permanently.

 I will be thankfrul if someone explains to me how this works! Thank
 you in advance for any suggestions!


 This is my understanding of the Configure class.

 Group: If I gave any wrong info, please feel free to correct me.

 - Gonzalo


 



-- 
Renan Gonçalves - Software Engineer
Cell Phone: +55 11 8633 6018
MSN: [EMAIL PROTECTED]
São Paulo - SP/Brazil

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Test Suite: parsing a CSV file, where to store file?

2008-07-15 Thread aranworld

Thanks.  I just knew there had to be some conflicting opinions on
this.  A webroot/files/tests directory maybe makes some sense?  tmp
seems wierd, because the file shouldn't get deleted.

-Aran

On Jul 15, 2:47 pm, Renan Gonçalves [EMAIL PROTECTED] wrote:
 Fixtures are for Model tests.
 I think a more standard place to put the CSV file is on temporary
 directory (/tmp) or on a webroot/files directory.

 []'s

 On Mon, Jul 14, 2008 at 10:35 PM, Grant Cox [EMAIL PROTECTED] wrote:

  I do the same, and keep the file in fixtures.  Makes sense to me :)

  On Jul 15, 8:33 am, aranworld [EMAIL PROTECTED] wrote:
   I need to create a test case for the parsing of a tab delimited file.
   Would it make sense to put the test version of this CSV file in the
   fixtures directory of my test suite?  Or is there a more standard
   place to put a file like this?

 --
 Renan Gonçalves - Software Engineer
 Cell Phone: +55 11 8633 6018
 MSN: [EMAIL PROTECTED]
 São Paulo - SP/Brazil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Echo Fields of Article Ceator/Modifer in View

2008-07-15 Thread double07

Got this sorted if anybody was interested, my use of foreignKey was
wrong...

News Model:
var $belongsTo = array ('Creator' = array(
   'className' = 'User',
   'foreignKey' = 'creator_id',
   ),
   'Modifier' = array(
   'className' = 'User',
   'foreignKey' = 'modifier_id',
   ),
   );

To echo out in the view:
?php echo $news['Creator']['firstname']. .$news['Creator']
['lastname'] ?
?php echo $news['Modifier']['firstname']. .$news['Modifier']
['lastname'] ?

That simple!

Thanks for your input James!


On Jul 11, 8:13 am, double07 [EMAIL PROTECTED] wrote:
 So the News items should Belong To a user. The problem I see is that
 you can't seem to define a local key?

 My code in the News controller should look like this yeah?

 var $belongsTo = array('Creator' = array(
                                                 'className' = 'User',
                                                 'foreignKey' = 'user_id',
                                                 'localKey' = 'creator_id', 
 //can't seem to define this?
                                                 ),
                                   'Modifier' = array(
                                                 'className' = 'User',
                                                 'foreignKey' = 'user_id',
                                                 'localKey' = 'modifer_id', 
 //can't seem to define this?
                                                 ),

         );

 How can I define the local key?

 On Jul 9, 10:02 pm, James K [EMAIL PROTECTED] wrote:

  You would need to define a relationship in your news model to the
  user's model via the id set by the behaviour. This will tell cake how
  to pull the related models from a find call on the news model (http://
  book.cakephp.org/view/66/models#associations-linking-models-to-78).

  You'll also want to look in the manual for more information on the new
  containable behaviour built into the release candidates of CakePHP 1.2
  for how to narrow down what fields/models you want returned (http://
  book.cakephp.org/view/474/containable)

  Good luck,

  - James

  On Jul 9, 12:26 am, double07 [EMAIL PROTECTED] wrote:

   Hi All,

   This seems like a real n00b question, but here goes. I'm working on an
   app which has articles - in my case news - and users who create/modify
   the news articles. Now I found this nifty little behaviour 
   -http://blog.loadsys.com/2008/05/02/automagically-setting-user-id-of-r...
   - which automagically records the user id in the news record when
   somebody adds or edits a news item. So I've got the user id of the
   creator/modifier in the news article record... lovely.

   So, how then do I use that id in the creator/modifer to grab say the
   name/email/username of the user and echo it out in a view? At first I
   was thinking it would be a relationship, but now I'm thinking I need
   to do something in the news controller?

   If anyone could point me in the right direct that would be much
   appreciated. Any examples would be helpful.

   TIA.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Onkeypress event

2008-07-15 Thread RJ

yes onblur wld be a good option..but m not able to find how to do
that in cakephp.
could any one help in this as to how to make an ajax call on any
event(onBlur.onclick,etc)

-RJ

On Jul 15, 10:37 pm, Joel Perras [EMAIL PROTECTED] wrote:
 Problem with using onkeydown for this is that the # of DB requests is
 directly proportional to the length of the name being input; setting a
 freq. of 1 sec seems like a good solution.  However, I can usually
 input my name in less than a second.  Try performing the action on an
 onblur instead of onkeydown; that'll retain the same functionality,
 but reduce the # of requests to the DB.

 -J.

 On Jul 15, 9:27 am, RJ [EMAIL PROTECTED] wrote:

  hey got it when i put frequency of 1 sec , it gives the desired
  result.
  But as Mr Decot mentioned, it could be a lot on server...

  Thanks all

  On Jul 15, 6:15 pm, Siegfried Hirsch [EMAIL PROTECTED]
  wrote:

   I use frequecy for 1 seconds updates with the ajax call. Thats the way to 
   handle
   it without putting a burden on the server with every key stroke ;)

   On Tue, Jul 15, 2008 at 3:11 PM, RJ [EMAIL PROTECTED] wrote:

it doesn't work i guess ... i want to make ajax calls on 'onkeyup'
event
how to use $ajax-observeField for the same??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Incorrect integer value ''

2008-07-15 Thread Preloader

Hello Bakers,

this problem was issued in another post:

http://tinyurl.com/6oeb9z

But it's not possible to answer anymore.

This issue still seems not be resolved. Could anyone find the
corresponding ticket on trac?

Regards, Christoph :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Global data

2008-07-15 Thread Joe

Your best bet is to probably set a constant in the bootstrap.php file.

On Jul 15, 11:39 pm, RJ [EMAIL PROTECTED] wrote:
 In my project , i want some data to be available globally i.e
 informations like smtp-host,application name and several configuration
 settings so that i don't have to hard-code it in my program but
 directly read from the global variable.This would help me when i
 deploy it on client side, i'll just change the global variables and it
 would reflect in my application.
 How to achieve the same in cakephp

 Thanks,
 RJ
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---



Re: Global data

2008-07-15 Thread Sudhir Porwal

Hey,

You can use the Configure class of cakephp to store your settings in 
configuration files like cake do for storing its 
configurations('config/database.php' , 'config/core.php' etc..).

See the api for the class (located at 'cake/libs/configure.php')for more 
details

regards,
Sudhir

RJ wrote:
 In my project , i want some data to be available globally i.e
 informations like smtp-host,application name and several configuration
 settings so that i don't have to hard-code it in my program but
 directly read from the global variable.This would help me when i
 deploy it on client side, i'll just change the global variables and it
 would reflect in my application.
 How to achieve the same in cakephp

 Thanks,
 RJ
 

   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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?hl=en
-~--~~~~--~~--~--~---