Re: Building spell check into forms

2011-03-11 Thread chris
Thanks for the suggestion, I will take a look into it.

In regards to the previous post about why I would bother. The client
I'm producing the website for has requested the functionality. The
website will be public facing and could be viewed on a variety of OS/
Browser platforms, so I can't rely on the fact that modern browsers
have it built in.

On Mar 11, 3:20 am, Dr. Tarique Sani tariques...@gmail.com wrote:
 Check outhttp://www.afterthedeadline.com/

 HTH
 Tarique

 On Thu, Mar 10, 2011 at 10:14 PM, chris 
 chris@internetlogistics.comwrote:



  I realise that this isn't stictly a cakePHP question. But as I'm
  building my application in cakePHP, I just wanted to see if anyone had
  any advice in the area.

  I have a requirement to provide a spell check functionality in some of
  my forms. The input fields are simple 'textarea' fields.

  Looking around, there seems to be a number of solutions. Most, if not
  all, seem to be javascript front ends, with a php file that is called
  to do the spellchecking.

  The few I've looked at include

 http://code.google.com/p/jquery-spellchecker/
 http://www.phpspellcheck.com/

  I've tried the first one and can't get the demo code to work once
  downloaded, the second one the demo works fine, but I havn't gone
  further than this.

  Anyway, what I'd like to know is. Does anyone have expereince of
  adding a spell checker to their cakePHP application? And if so, are
  there any recommendations of which to use?

  Thanks

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
  athttp://groups.google.com/group/cake-php

 --
 =
 PHP for E-Biz:http://sanisoft.com
 =

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Readonly field

2011-03-11 Thread Stephen
Hi

I want to set an input box to be readonly, this is to prevent users from
editing the field, the data needs to be posted so disabled is not an option.

I know I can do this with Javascript, but I am wondering how come there
doesn't seem to be a readonly parameter?

-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


[Ask] ModalBox vs AutoComplete. Conflict or something?

2011-03-11 Thread thom
Hello,,

I'm having problem using modalBox. I have a work autocomplete in add
user script. But when i combined it using modalbox, it doesn't work.
If I access it normally, it worked. Can someone help?

##
autocomplete()
##

function autoComplete(){
$this-set('groups', $this-User-Group-find('all', array(
'conditions' = array(
'Group.name LIKE' = 
$this-data['Group']['name'].'%'
),
'fields' = array('name', 'id')
)));
//$this-layout = 'ajax';
}


##
add.ctp
##

?php
if (isset($closeModalbox)  $closeModalbox) echo div
id='closeModalbox'/div;


if ($ajax-isAjax()) {
echo $ajax-form('edit', 'post', array(
'model'= 'User',
'url'  = array('controller' = 'users', 'action' = 'add'),
'update'   = 'MB_content',
'complete' = 'closeModalbox()'
));

}else{
echo $this-Form-create('User');
}
?
fieldset
legend?php __('Add User'); ?/legend
?php
echo $this-Form-input('username');
echo $this-Form-input('password');
echo __('Group');
echo $ajax-autoComplete('Group.name', '/users/autoComplete',
array('frequency' = '0.6', 'afterUpdateElement' = 'setValuesId'));
echo $this-Form-input('group_id', array('type' = 'hidden'));
?
/fieldset
?php
echo $this-Form-end('Submit', array('class' = 'MB_focusable'));
?

My reference of doing this is
http://nerdnotes.org/2008/02/combining-modalbox-cakephp/.


-- 
Regards,,,
mastanto
http://www.mastanto.com
http://thom-sharing.blogspot.com

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Error Security::cipher()

2011-03-11 Thread Carachi
Hi cricket,
I do this:

class UsersController extends AppController {

var $name = 'Users';
var $helper = array('Html','Form');
var $components = array('Cookie');

function beforeFilter() {
parent::beforeFilter();
$this-Auth-allow(array('login','build_acl'));
}


function getUserFromCookies() {
$name = 'user';
debug($name);   //print user
$this-Cookie-write($name, 'test' ,true); //print   Warning 
(512):
You cannot use an empty key for Security::cipher()
$user = $this-Cookie-read($name);//print   Warning (512): 
You
cannot use an empty key for Security::cipher()
return;
}
}


in the other controller I use this functions to write and read

function setCookies($name, $value, $time = NULL) {
$this-Cookie-write($name, $value ,true, $time);
return;
}

function getCookies($name) {
return $this-Cookie-read($name);
}

and this works!
I don't understand why in the UsersController it doesn't works!

Thank you
bye




On 10 Mar, 23:06, cricket zijn.digi...@gmail.com wrote:
 On Thu, Mar 10, 2011 at 4:48 PM, Carachi carach...@gmail.com wrote:
  Thank you.
  after set I call this method:
      $this-Cookie-read('mycookie');
  and it return this error:
      Warning (512): You cannot use an empty key for
  Security::cipher()
  if I call with debug function so:
      debug($this-Cookie-read('mycookie'));
  doesn't return anything...

 No, we mean did you debug($name) to see that it's correct. In your
 latest example, though, you're using a literal string. So, now you
 need to ensure that $name == 'mycookie' in controller1.

 Perhaps a quicker way to handle this would be:

 $this-log($name);
 $this-Cookie-write($name, $value ,true, $time);

 other controller:
 $this-log($name);
 $this-Cookie-read($name);

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Unobtrusive Javascript validation

2011-03-11 Thread AD7six


On Mar 10, 10:29 pm, Karl Oakes kfoa...@gmail.com wrote:
 This is my first question so please be gentle... I am a complete noob with
 CakePHP, but I have used MVC frameworks before ( .Net MVC(1,2,3)). I love
 the validation rules that are setup within the model and the automagic
 client side validation that it provides, but the inline event handlers go
 against all that I have learned about JavaScript.

What js are you referring to?

IME, as soon as you want anything more than absolutely trivial js -
you're best of doing it independently of your php framework.

 Does CakePHP provide an
 unobtrusive javascript option or do I need to code this myself, many
 thanks...

Personally, I'd implement that either as a simple js regex routine or
an ajax request to validate the field(s) on change and act
appropriately.

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Readonly field

2011-03-11 Thread AD7six


On Mar 11, 9:54 am, Stephen step...@ninjacodermonkey.co.uk wrote:
 Hi

 I want to set an input box to be readonly, this is to prevent users from
 editing the field, the data needs to be posted so disabled is not an option.

 I know I can do this with Javascript, but I am wondering how come there
 doesn't seem to be a readonly parameter?

what's the difference between read-only and hidden? Or what's the
difference between showing the user a disabled input and submitting a
hidden input.

However: Why are you sending a field to the user which they can't edit
(instead of storing whatever the value is in the session, for
example,) but are apparently wanting to use the value of - It sounds
like you're about to make a big mistake: trusting user input instead
of simply not including it in the form.

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Readonly field

2011-03-11 Thread AD7six


On Mar 11, 12:44 pm, AD7six andydawso...@gmail.com wrote:
 On Mar 11, 9:54 am, Stephen step...@ninjacodermonkey.co.uk wrote:

  Hi

  I want to set an input box to be readonly, this is to prevent users from
  editing the field, the data needs to be posted so disabled is not an option.

ps readonly is simply another attribute - i.e. you just add it if that
really is what you want.

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Building spell check into forms

2011-03-11 Thread euromark
nice link - I like the afterthedeadline-style
almost better and more powerful as google I would assume
and it seems to come with a jquery plugin :)


On 11 Mrz., 09:28, chris chris@internetlogistics.com wrote:
 Thanks for the suggestion, I will take a look into it.

 In regards to the previous post about why I would bother. The client
 I'm producing the website for has requested the functionality. The
 website will be public facing and could be viewed on a variety of OS/
 Browser platforms, so I can't rely on the fact that modern browsers
 have it built in.

 On Mar 11, 3:20 am, Dr. Tarique Sani tariques...@gmail.com wrote:







  Check outhttp://www.afterthedeadline.com/

  HTH
  Tarique

  On Thu, Mar 10, 2011 at 10:14 PM, chris 
  chris@internetlogistics.comwrote:

   I realise that this isn't stictly a cakePHP question. But as I'm
   building my application in cakePHP, I just wanted to see if anyone had
   any advice in the area.

   I have a requirement to provide a spell check functionality in some of
   my forms. The input fields are simple 'textarea' fields.

   Looking around, there seems to be a number of solutions. Most, if not
   all, seem to be javascript front ends, with a php file that is called
   to do the spellchecking.

   The few I've looked at include

  http://code.google.com/p/jquery-spellchecker/
  http://www.phpspellcheck.com/

   I've tried the first one and can't get the demo code to work once
   downloaded, the second one the demo works fine, but I havn't gone
   further than this.

   Anyway, what I'd like to know is. Does anyone have expereince of
   adding a spell checker to their cakePHP application? And if so, are
   there any recommendations of which to use?

   Thanks

   --
   Our newest site for the community: CakePHP Video Tutorials
  http://tv.cakephp.org
   Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
   others with their CakePHP related questions.

   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this group
   athttp://groups.google.com/group/cake-php

  --
  =
  PHP for E-Biz:http://sanisoft.com
  =

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Readonly field

2011-03-11 Thread Zaky Katalan-Ezra
http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Readonly field

2011-03-11 Thread Stephen
Hi

I made a mistake in thinking read only works with select, I assumed my
issue was CakePHP rather than general HTML.

The disabling of fields is only a temporary blocker to prevent users
triggering a bug I am trying to fix - this bug breaks whole orders on
import, I will remove the blocker when the bug is fixed and uploaded.

The functionality of the action is still active and it still serves its
purpose, it just limits advanced features (User can still achieve the same
results through other actions)


On 11 March 2011 11:46, AD7six andydawso...@gmail.com wrote:



 On Mar 11, 12:44 pm, AD7six andydawso...@gmail.com wrote:
  On Mar 11, 9:54 am, Stephen step...@ninjacodermonkey.co.uk wrote:
 
   Hi
 
   I want to set an input box to be readonly, this is to prevent users
 from
   editing the field, the data needs to be posted so disabled is not an
 option.

 ps readonly is simply another attribute - i.e. you just add it if that
 really is what you want.

 AD

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Funny behaviour

2011-03-11 Thread heohni
Hi

I have this helper:
public function showGermanMoneyFormat($value){
$this-Number-addFormat('EUR', array('after' = ' €',
'decimals' = ',', 'thousands' = '.'));
return $this-Number-currency($value, 'EUR');
}

And I call it this way:
?php echo $this-Common-showGermanMoneyFormat($sum);?

I one case, my money value is for example -10.00
On my page it gets displayed like (10,00 €)

I have no idea, where the brackets are coming form?
I just wanted to show -10,00 € instead.
Is this from the $this-Number-addFormat() or the $this-Number-
currency()?

Looking forward to your opinions.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Readonly field

2011-03-11 Thread euromark
http://www.dereuromark.de/2010/06/23/working-with-forms/

paragraph
Default Values – hidden! or Disallowing some fields to be edited

cheers
mark


so simply pass the record along to the view and echo it (without any
form)


On 11 Mrz., 12:46, AD7six andydawso...@gmail.com wrote:
 On Mar 11, 12:44 pm, AD7six andydawso...@gmail.com wrote:

  On Mar 11, 9:54 am, Stephen step...@ninjacodermonkey.co.uk wrote:

   Hi

   I want to set an input box to be readonly, this is to prevent users from
   editing the field, the data needs to be posted so disabled is not an 
   option.

 ps readonly is simply another attribute - i.e. you just add it if that
 really is what you want.

 AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Unobtrusive Javascript validation

2011-03-11 Thread Karl Oakes
This is my first question so please be gentle... I am a complete noob with 
CakePHP, but I have used MVC frameworks before ( .Net MVC(1,2,3)). I love 
the validation rules that are setup within the model and the automagic 
client side validation that it provides, but the inline event handlers go 
against all that I have learned about JavaScript. Does CakePHP provide an 
unobtrusive javascript option or do I need to code this myself, many 
thanks...

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


How do I filter deep associations?

2011-03-11 Thread Dustin Boston
I have the following tables: binders, docs, users, docs_users. Doc
belongsTo Binder, Doc hasAndBelongsToMany User.

I want to get binders and their associated docs for the user that is
currently logged in (the associated user_id in the docs_users table).

I have tried Containable and find('all') with joins, conditions, etc.
but I can't figure out how to remove the Docs that are from Users who
are not associated in the docs_users table.

This code does NOT work:

$binders = $this-Binder-find(
'all',
array(
'joins' = array(
array(
'table' = 'binders_users',
'alias' = 'BindersUser',
'type' = 'inner',
'foreignKey' = false,
'conditions'= array(
'BindersUser.binder_id = Binder.id',
'BindersUser.user_id = ' . $this-Auth-
user('id')
)
),
array(
'table' = 'docs',
'alias' = 'Doc',
'type' = 'left',
'foreignKey' = false,
'conditions'= array(
'Doc.binder_id = Binder.id',
)
),
array(
'table' = 'docs_users',
'alias' = 'DocsUser',
'type' = 'left',
'foreignKey' = false,
'conditions'= array(
'DocsUser.doc_id = Doc.id',
'DocsUser.user_id = ' . $this-Auth-
user('id')
)
)
),
'recursive'=0
)
);
$this-set('binders', $binders);

And neither does this:

$this-Binder-recursive = 2;
$this-Binder-Behaviors-attach('Containable');
$this-Binder-contain(array(
'Branch',
'Doc' = array(
'User' = array(
'DocsUser' = array(
'conditions' = array('id = 17')
)
)
)
));
$binders = $this-Binder-find('all');

Any help from you seasoned pros would be great! Thanks! Also, that's
to those of you who have helped me on irc. I just couldn't get it
figured out and thought it justified a little more explanation.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Missing paths in URI

2011-03-11 Thread Claudio
Hello!

I ran into a problem when moving an existing CakePHP project, written
by my predecessor, from an Apache intranet server to another one
because of a hardware issue...

Moving the MySQL database was no problem at all, but all links within
the projects homepage are incomplete and therefore not working. Here's
an example:
link rel=stylesheet type=text/css href=/resdb/css/layout.css /
Guess you guys already noticed - it should be
link rel=stylesheet type=text/css href=/resdb/app/webroot/css/
layout.css /

Tried messing around with some settings both Apache and CakePHP
related, but I have to admit I won't find the solution by myself
anytime soon.

Any hints you can give me? Do you require additional information? Oh,
it's CakePHP 1.3.2 ...

Thanks in advance!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Missing paths in URI

2011-03-11 Thread Stephen
The webroot directory is exactly what it says web*root*

So any URL Request i.e. /css/style.css will access
/app/webroot/css/style.css

Check the following:


   1. Mod Rewrite is enabled
   2. The htaccess files are correct (as per the latest release)
   3. Directories have correct permissions
   4. Your apache config isn't restrictive i.e. AllowOverride or Denying
   .htaccess


Once the server is setup properly the url /css/layout.css will load from the
correct place.

If you cannot get it to work try this:

http://wwdj.wijndaele.com/getting-started-with-cakephp-without-mod_rewrite/

On 11 March 2011 12:30, Claudio claudio.la...@adiccon.de wrote:

 Hello!

 I ran into a problem when moving an existing CakePHP project, written
 by my predecessor, from an Apache intranet server to another one
 because of a hardware issue...

 Moving the MySQL database was no problem at all, but all links within
 the projects homepage are incomplete and therefore not working. Here's
 an example:
 link rel=stylesheet type=text/css href=/resdb/css/layout.css /
 Guess you guys already noticed - it should be
 link rel=stylesheet type=text/css href=/resdb/app/webroot/css/
 layout.css /

 Tried messing around with some settings both Apache and CakePHP
 related, but I have to admit I won't find the solution by myself
 anytime soon.

 Any hints you can give me? Do you require additional information? Oh,
 it's CakePHP 1.3.2 ...

 Thanks in advance!

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problems in saving form data to database

2011-03-11 Thread Alejandro Gómez Fernández
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Please, see your my.ini usually in xampp/mysql/bin.
There you can see here your mysql log is, searching this lines:

log_error   = C:/xampp/mysql/data/mysql.err
general_log_file= C:/xampp/mysql/data/mysql.log
slow_query_log_file = C:/xampp/mysql/data/mysql-slow.log

So, with this information you can see what sql instructions mysql
receibe and then you can see if cake is doing things right ;-)

Regards,



Alejandro Gomez.



El 11/03/2011 02:42, goluhaque escribió:
 No error was recorded in the Apache log file. Couldn't check the
 database log file as I didn't know where it was or how it could be
 accessed. I am using XAMPP(internal server) and a search could not
 reveal any results,
 
 On Mar 10, 5:27 pm, Afzalul Haque afzal...@gmail.com wrote:
 Haven't checked that one yet. Will do. Thanks.

 2011/3/10 Alejandro Gómez Fernández agom...@gmail.com








- --
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
others with their CakePHP related questions.

To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group
athttp://groups.google.com/group/cake-php

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNei/zAAoJEHQn9CmeN9DJc7QH/1RnL9lqUERooSi1auWB05DE
uqMSN1rBb1I1C9PjinGU6jURej/1cSohzgL6dT2LUQiL+qMvacSr85qkU88zN0Ct
SRpV01zldRXM5pbXykeNFjhjwfc+sbi62EFT6ZlJpmOhtCySD5MrVYljf05lFzN2
8NJsh2U5Gekjr3nAvj2ekYr7yp2vmulWNYw9mYmS3OIVVzTbh7+1Rr+xMQOyvFql
JVRYKuU9eJs9ZsjJdO5HzBZH41IGXKfW0WZC6LcbWoo6wQH+ImixszJjFKGnt++D
o7MdPBiDlTl06tAqQfYhkQUNhiLiPrPEPQK/1hKk6n/IrG6dABs3qRnvJKRbTIA=
=LaVx
-END PGP SIGNATURE-

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Funny behaviour

2011-03-11 Thread Alejandro Gómez Fernández
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Is the normal behavior for negative numbers in currency::number helper.
See 7.7.1 section in the manual and you will see that in options you can
define what character you want to use. The () are an acccountable
form to show negative numbers, many times, in red.
If you want to change this, set the corresponding option.

Regards,



Alejandro Gomez.





El 11/03/2011 09:16, heohni escribió:
 Hi
 
 I have this helper:
 public function showGermanMoneyFormat($value){
 $this-Number-addFormat('EUR', array('after' = ' €',
 'decimals' = ',', 'thousands' = '.'));
 return $this-Number-currency($value, 'EUR');
 }
 
 And I call it this way:
 ?php echo $this-Common-showGermanMoneyFormat($sum);?
 
 I one case, my money value is for example -10.00
 On my page it gets displayed like (10,00 €)
 
 I have no idea, where the brackets are coming form?
 I just wanted to show -10,00 € instead.
 Is this from the $this-Number-addFormat() or the $this-Number-
 currency()?
 
 Looking forward to your opinions.
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNejJoAAoJEHQn9CmeN9DJQDUIALFYuyC6JDT53Qo+7lVEEH1A
0c8Quc/MB2WHqBz8q0kgW0CYyXl1DJMP76vzQEId2k9ftG5kWBnw9gg+QQzMMhaf
oLBDlsnJjMe4bDqcG2ZyFwJ80zOJl6wznyv07B9alyUK5i0saFbMW4R8JSSXRimw
w56fW/FS9k7e8cRUjjywu/fke/1tOLOZoNpNkX5HqGhDC8HgaOZPns57nBefS/zV
9XmjkOGJFRmvGvZO5c/c+aw/OB85ko0wKOw4/E8hPbbECKcXXvL+Acamc1otDO93
pOURGttlNwsiiVQQYTtna3Mjxp+buZkUv8N4p4/WFEYKyU14MmJLTg2JonCuiqg=
=5/Kq
-END PGP SIGNATURE-

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Unobtrusive Javascript validation

2011-03-11 Thread Karl Oakes
 If I were handcoding a site I would normally create my own js validation 
script or use a jQuery validate plugin. I have just come from an ASP.net MVC 
3 learning curve that provides unobtrusive js by default. I was just 
surprised that CakePHP still produced inline js nastiness for validation. 
Remember I'm still a complete noob with CakePHP and will need to find out 
the best practise for performing js validation and overall js integration

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: Readonly field

2011-03-11 Thread Krissy Masters
Hidden or disabled means nothing if the user is smart. Firebug will allow
you to edit hidden or disabled values changing them to whatever they want.
You still need to validate everything as nothing is to be trusted coming
from the user.

K


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How do I filter deep associations?

2011-03-11 Thread Dustin Boston
There's an interesting dialog going on about this topic on Stack Overflow. 
Please 
contributehttp://stackoverflow.com/questions/5266626/how-do-i-filter-deep-associations-in-cakephp/.
 
I'm trying to work out a fairly definitive solution for this common problem. 
Thanks!!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Unobtrusive Javascript validation

2011-03-11 Thread AD7six


On Mar 11, 5:27 pm, Karl Oakes kfoa...@gmail.com wrote:
  If I were handcoding a site I would normally create my own js validation
 script or use a jQuery validate plugin. I have just come from an ASP.net MVC
 3 learning curve that provides unobtrusive js by default. I was just
 surprised that CakePHP still produced inline js nastiness for validation.

What js are you referring to?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


cakedc search plugin - slash disapears in search

2011-03-11 Thread martin
hi

i habe installed the cakedc search plugin.

if i search for a string with a slash / inside, the string is aborted
just  before the /

Example:
-
search string: name = this is the / search string

in the sql appears: WHERE `name` =  `this is the`

Question:
-
what do i have to change please, to get the whole string to the query?

Regards
Martin

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


SSL questions

2011-03-11 Thread Krissy Masters
I have not seen or found anything but is there a way to route::SSL links? An
option in the html-link(link, array( ssl = true)) or anything like that?
Click login which needs ssl but if your on a non ssl page how do you force
it without redirect?

Some links need to be ssl where some do not. I have seen a lot of forceSSL
functions:: read location if not https redirect to https// $this-here type
set up.

Has anyone seen a good component for SSL (google just gives me 2007 older
ones that I could find samples of and nothing that seemed quite promising)

Tips / tricks?

Thanks guy

K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Readonly field

2011-03-11 Thread Stephen
Hi Krissy

Enabling the fields doesn't cause a problem for us - it seemed better to
enable the basic functionality of duplicate rather than remove it all
together.

The duplicate functionality allows you to change absolutely everything so
you can duplicate say for example a Green Pepper and if desired turn it into
a Lean Steak with Peppercorn Sauce and Chunky Chips (example). Now they can
only duplicate a Vegetable to create another Vegetable i.e. Green Pepper to
Red Pepper.

Weird example, the products are not food items ;)

Full functionality will be restored when the bug is fixed, tested and
approved.

HTH explain.

-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SSL questions

2011-03-11 Thread Sam Bernard
How about you just extend the html helper and add your own link function- 
something like:

function sslLink($title, $url = null, $options = array(), 
$confirmMessage = false){
if(!$url){
$url = $title;
}

//manually set ssl domain, in case it's different than current 
domain
$sslDomain = 'https://yourdomain.com';

//Check to make sure passed url isn't already a valid url 
if(is_array($url) || !strstr($url, 'http')){
$url = $sslDomain . Router::url($url);
}
return $this-Html-link($title, $url, $options, $confirmMessage);
}

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: SSL questions

2011-03-11 Thread Krissy Masters
Nice!

 

Thanks. Will give that a shot.

 

K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cakephp 2.0 will be like this to save the data?

2011-03-11 Thread mark_story
Currently this isn't planned for 2.0, perhaps a future version.

-Mark

On Mar 10, 3:04 am, cake-learner sh.koiz...@gmail.com wrote:
 I hope we can do this oop way pretty soon to save data not the
 array( which cost me a lot of time to debug )

 $obj = new myObject();
 $obj - name = 'myname';
 $obj - save();

 $obj = myObject::load(id);
 $obj - save();

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: HABTM: has a related data

2011-03-11 Thread Angelo
Hello,

In fact i found the solution.

First of all:

I paginate in the references controller.

I solved the problem with:

$group = array();
$group[] = 'Lot.id  HAVING COUNT(Watch.id)  0';

$this-paginate['Lot'] = array(

'limit' = 50,
'contain' = array('Reference', 'Keyword', 'Watch', 'Auction'),
'group' = $group
);

$lots = $this-paginate('Lot', $conditions);

Thanks all for your help!

On 10 mar, 16:39, Sam Bernard sambern...@gmail.com wrote:
 Paginate is a controller function, not a model function- so you can't call
 it on the model.

 I'm a little confused as to what you are trying to do- what controller are
 you trying to paginate your Lot records from?

 Also, have you read the cookbook section on 
 pagination?http://book.cakephp.org/view/1231/Pagination

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


datetime field format

2011-03-11 Thread c.pfar...@gmail.com
Hola gente, tengo el siguiente problema, resulta que tengo una página en la
que uso un select con el datefield que me genera cake. Como vi se puede dar
el fromato DMY, YMD, etc, pero no se puede dar el formato de por ejemplo que
me ponga el año en vez de 2010 como 10. Conocen algúna forma de lograr esto
sin tener que parsear el dato antes de guardarlo en la Db y demás? ya que en
la db debería guardarse el formato completo (2010 para el ejemplo). Tampoco
es la idea utilizar el id que asigna ya que son varios campos diferentes con
diferentes id que asigna por defecto.
Se que cake me formatea con el tama no correcto los felds, pero por
cuestiones de estilos si o sí se tuvo que sobreescribir el estilo para que
tome otro tamaño. Alguna sugerencia?
Gracias
Christian

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Find all records from last week or this week

2011-03-11 Thread DigitalDude
Hey,

beautiful! Works really nice, I'm starting to LOVE the strtotime()-
function :)

Thanks again,

DD


On 11 Mrz., 02:32, thatsgreat2345 thatsgreat2...@gmail.com wrote:
 I'm assuming you have a column in the database called created which
 cake will fill in automatically
 If you check the book it gives you an example 
 herehttp://book.cakephp.org/#!/view/1017/Retrieving-Your-Dataunder the
 complex find conditions

 $conditions =  array( Post.created  = date('Y-m-d', strtotime(-1
 weeks)));
 $this-Model-find('all',array('conditions'=$conditions));

 On Mar 10, 4:22 pm, DigitalDude e.blumsten...@googlemail.com wrote:

  Hey,

  I just can't figure this out, but I need a find for fetching all
  records that were created thisweek or lastweek.

  To clarify this, I'm running a cronjob every sunday and create some
  reports for each user. I need to find every record that was created
  within the endingweek. When the cronjob is running sunday evening, it
  should fetch all data from theweekfrom monday till the sunday the
  cron job is running.

  Is there any chance doing this in a normal Cake find? I think with an
  SQL statement this one is not so difficult but I really hate having
  straight SQL statements within my cake applications.

  So if anyone would have a simple example for this, I would be ver
  happy!

  Regards,

  DD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Keep me logged in feature - how to do this?

2011-03-11 Thread DigitalDude
Hey,


I'm going to need a function called Keep me logged in in my app, and
I'm not sure how to do this. You've all probably seen such a feature,
I'm assuming it means that a cookie or sth else is stored on the
user's machine that will tell the browser or the cake app that a user
is still logged in with his/her data.

I know some users delete all cookies when they close their browsers
(as I do) and this feature will have no effect for them, but for all
other users I want this feature to work.

Does any one of you ever coded such a feature or has any idea where to
get information on this?

Regards,

DD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Keep me logged in feature - how to do this?

2011-03-11 Thread Ryan Schmidt
On Mar 11, 2011, at 13:13, DigitalDude wrote:

 I'm going to need a function called Keep me logged in in my app, and
 I'm not sure how to do this. You've all probably seen such a feature,
 I'm assuming it means that a cookie or sth else is stored on the
 user's machine that will tell the browser or the cake app that a user
 is still logged in with his/her data.
 
 I know some users delete all cookies when they close their browsers
 (as I do) and this feature will have no effect for them, but for all
 other users I want this feature to work.
 
 Does any one of you ever coded such a feature or has any idea where to
 get information on this?

Yup, sounds like a cookie to me. You'll probably store the username and some 
form of encrypted password in the cookie. When accessing your login page, or 
maybe every page of your site that differs based on the logged-in user, you'll 
check if logged in; if not, you'll check if this remember-me cookie exists. If 
it does, you'll hand that information off to the login process and log them in.


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SSL questions

2011-03-11 Thread rgreenphotodesign
Have you tried the Security component's  requireSecure()? It will let
you determine that based on actions. May eliminate the need to extend
or customize the HTML helper.

On Mar 11, 10:26 am, Krissy Masters naked.cake.ba...@gmail.com
wrote:
 Nice!

 Thanks. Will give that a shot.

 K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Keep me logged in feature - how to do this?

2011-03-11 Thread rgreenphotodesign
There are some 'Remember Me' add ons in the bakery. I tried one in
that past that worked fairly well.

On Mar 11, 2:36 pm, Ryan Schmidt google-2...@ryandesign.com wrote:
 On Mar 11, 2011, at 13:13, DigitalDude wrote:

  I'm going to need a function called Keep me logged in in my app, and
  I'm not sure how to do this. You've all probably seen such a feature,
  I'm assuming it means that a cookie or sth else is stored on the
  user's machine that will tell the browser or the cake app that a user
  is still logged in with his/her data.

  I know some users delete all cookies when they close their browsers
  (as I do) and this feature will have no effect for them, but for all
  other users I want this feature to work.

  Does any one of you ever coded such a feature or has any idea where to
  get information on this?

 Yup, sounds like a cookie to me. You'll probably store the username and some 
 form of encrypted password in the cookie. When accessing your login page, or 
 maybe every page of your site that differs based on the logged-in user, 
 you'll check if logged in; if not, you'll check if this remember-me cookie 
 exists. If it does, you'll hand that information off to the login process and 
 log them in.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Keep me logged in feature - how to do this?

2011-03-11 Thread Alejandro Gómez Fernández
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Depends on your requirements, you can do this simply with a cookie, or
implement something more secure, using for example, a dyndns client,
some data stored in your database, time to live stored in the cookie,
some hash stored in the cookie and the database ...  Posibly you need to
check or force the connection by ssl. There are many posibilities ...

Please, tell us what are you needed and we maybe can provide some ideas.

Regards,



Alejandro Gómez.




El 11/03/2011 16:13, DigitalDude escribió:
 Hey,
 
 
 I'm going to need a function called Keep me logged in in my app, and
 I'm not sure how to do this. You've all probably seen such a feature,
 I'm assuming it means that a cookie or sth else is stored on the
 user's machine that will tell the browser or the cake app that a user
 is still logged in with his/her data.
 
 I know some users delete all cookies when they close their browsers
 (as I do) and this feature will have no effect for them, but for all
 other users I want this feature to work.
 
 Does any one of you ever coded such a feature or has any idea where to
 get information on this?
 
 Regards,
 
 DD
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNeqfkAAoJEHQn9CmeN9DJAusH/1BBaIwv74hsBJgL9LWmezaq
k7+k5jSKY+dF12Oyk2nNF36sbRQ0M0JtS3k3k2SHdVfCuKjiFcqFIyMjl3PWwgaj
DbNDTJY6Lle7zqy4RYdoza1yIFVTkgpJ4IPtw1LpU9H8pw40Ep+nEOTK8NGaQP+i
e+vIvkM3Y9zQmlNIAPINuBkzVIjD054iCgEe3YVt7GV4TMmXuu9oDc1U8O+J/1Lf
1tUD4uxR8ZI+aWbDuFX7ENrcBnTKav6ldpGfQJtkglEUW16D48DTgR8g7P/QLuiP
b8uqdjYWKmkqBcGOokldbwpd+mtb9v+qEl9KA5uJOmo2M1FAcPu79YE1745DRgc=
=KIWV
-END PGP SIGNATURE-

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: SSL questions

2011-03-11 Thread Krissy Masters
Been trying a few things but with Security Component I get never ending
loops in the browser with blackhole forceSSL as instructed in various guides
/ tutorials so for now I am just moving on with other parts of the site.

K

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of rgreenphotodesign
Sent: Friday, March 11, 2011 7:04 PM
To: CakePHP
Subject: Re: SSL questions

Have you tried the Security component's  requireSecure()? It will let
you determine that based on actions. May eliminate the need to extend
or customize the HTML helper.

On Mar 11, 10:26 am, Krissy Masters naked.cake.ba...@gmail.com
wrote:
 Nice!

 Thanks. Will give that a shot.

 K

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Keep me logged in feature - how to do this?

2011-03-11 Thread Miles J
https://github.com/milesj/cake-auto_login

On Mar 11, 2:53 pm, Alejandro Gómez Fernández agom...@gmail.com
wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Depends on your requirements, you can do this simply with a cookie, or
 implement something more secure, using for example, a dyndns client,
 some data stored in your database, time to live stored in the cookie,
 some hash stored in the cookie and the database ...  Posibly you need to
 check or force the connection by ssl. There are many posibilities ...

 Please, tell us what are you needed and we maybe can provide some ideas.

 Regards,

 Alejandro G mez.

 El 11/03/2011 16:13, DigitalDude escribi :



  Hey,

  I'm going to need a function called Keep me logged in in my app, and
  I'm not sure how to do this. You've all probably seen such a feature,
  I'm assuming it means that a cookie or sth else is stored on the
  user's machine that will tell the browser or the cake app that a user
  is still logged in with his/her data.

  I know some users delete all cookies when they close their browsers
  (as I do) and this feature will have no effect for them, but for all
  other users I want this feature to work.

  Does any one of you ever coded such a feature or has any idea where to
  get information on this?

  Regards,

  DD

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (MingW32)
 Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/

 iQEcBAEBAgAGBQJNeqfkAAoJEHQn9CmeN9DJAusH/1BBaIwv74hsBJgL9LWmezaq
 k7+k5jSKY+dF12Oyk2nNF36sbRQ0M0JtS3k3k2SHdVfCuKjiFcqFIyMjl3PWwgaj
 DbNDTJY6Lle7zqy4RYdoza1yIFVTkgpJ4IPtw1LpU9H8pw40Ep+nEOTK8NGaQP+i
 e+vIvkM3Y9zQmlNIAPINuBkzVIjD054iCgEe3YVt7GV4TMmXuu9oDc1U8O+J/1Lf
 1tUD4uxR8ZI+aWbDuFX7ENrcBnTKav6ldpGfQJtkglEUW16D48DTgR8g7P/QLuiP
 b8uqdjYWKmkqBcGOokldbwpd+mtb9v+qEl9KA5uJOmo2M1FAcPu79YE1745DRgc=
 =KIWV
 -END PGP SIGNATURE-

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Unobtrusive Javascript validation

2011-03-11 Thread Miles J
Cake doesn't have any JS validation, so I am a bit confused here.

On Mar 11, 8:48 am, AD7six andydawso...@gmail.com wrote:
 On Mar 11, 5:27 pm, Karl Oakes kfoa...@gmail.com wrote:

   If I were handcoding a site I would normally create my own js validation
  script or use a jQuery validate plugin. I have just come from an ASP.net MVC
  3 learning curve that provides unobtrusive js by default. I was just
  surprised that CakePHP still produced inline js nastiness for validation.

 What js are you referring to?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: RE: SSL questions

2011-03-11 Thread Sam Bernard
You will want to use the security component to make sure that pages are only 
accessed via ssl... The sslLink function will generate https links but it 
won't prevent people from going to the non secure version of the page.

Additionally, if it is only a few actions that you require to be secure, you 
can use .htaccess and mod_rewrite to force ssl on certain pages.

--
Sam Bernard
sambernard.net

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: table row pay_unique_ident get identified as PayUniqueent?

2011-03-11 Thread Ryan Schmidt

On Mar 9, 2011, at 09:29, Tilen Majerle wrote:

 because of _id, if you connect 2 models, then they are connected with 
 modelalias_id in other controller so like that
 
 POST model (hasMany Comment)
 posts table:
 
 id,
 title,
 created,
 modified,
 ...other rows in table
 
 COMMENT model (belongsTo Post)
 comments table:
 
 id,
 post_id //connected with post model, but you have _ident
 created,
 modified, 
 ... all other rows...
 
 
 i Hope you understan

I do not understand. Surely _id is only a suffix -- used only at the end of a 
column name. Why then is it being abused by CakePHP in the middle of a column 
name?


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Building spell check into forms

2011-03-11 Thread Dr. Tarique Sani
On Fri, Mar 11, 2011 at 5:21 PM, euromark dereurom...@googlemail.comwrote:

 nice link - I like the afterthedeadline-style
 almost better and more powerful as google I would assume
 and it seems to come with a jquery plugin :)



Yes jquery plugin and integration with several WYSIWYG editors

FWIW there are also browser extensions and wordpress plugins available for
the same

Cheers
Tarique




 On 11 Mrz., 09:28, chris chris@internetlogistics.com wrote:
  Thanks for the suggestion, I will take a look into it.
 


-- 
=
PHP for E-Biz: http://sanisoft.com
=

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


SSL Help

2011-03-11 Thread Krissy Masters
I am only starting in on SSL and getting nowhere.

Attempting to secure 2 actions to start (will secure entire backend IF I can
get these running first)

Users Controller:

public function beforeFilter() {
parent::beforeFilter();
$this-Auth-allowedActions = array( 'login', 'logout', 'register');
$this-Auth-fields = array( 'username' = 'email', 'password' =
'security' );
$this-Security-blackHoleCallback = 'forceSSL';
$this-Security-requireSecure( 'login', 'register');
//$this-Security-requireSecure( array('login', 'register'));
$this-Auth-autoRedirect = false;
}

App Controller:

Has Security in $component array

function forceSSL() {
$this-redirect('https://' . $_SERVER['SERVER_NAME'] .
$this-here);
}

All I get is infinite never ending loop browser message.

Can anyone help as this is just the basics as the cookbook points out and
still im getting nowhere.

Thanks,

K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SSL Help

2011-03-11 Thread Dr. Tarique Sani
Just from top of the head here. Redirection from https to http mean you will
loose your session and in turn your authentication.

Most likely you are trying to redirect your user to an action which requires
authentication but is not on https, thus that action redirects the user back
to login on https your which finds your as being already authenticated and
redirects to

got it :-)

Cheers
Tarique


On Sat, Mar 12, 2011 at 11:03 AM, Krissy Masters naked.cake.ba...@gmail.com
 wrote:

 I am only starting in on SSL and getting nowhere.

 Attempting to secure 2 actions to start (will secure entire backend IF I
 can
 get these running first)

 Users Controller:

 public function beforeFilter() {
parent::beforeFilter();
$this-Auth-allowedActions = array( 'login', 'logout', 'register');
$this-Auth-fields = array( 'username' = 'email', 'password' =
 'security' );
$this-Security-blackHoleCallback = 'forceSSL';
$this-Security-requireSecure( 'login', 'register');
//$this-Security-requireSecure( array('login', 'register'));
$this-Auth-autoRedirect = false;
 }

 App Controller:

 Has Security in $component array

 function forceSSL() {
$this-redirect('https://' . $_SERVER['SERVER_NAME'] .
 $this-here);
}

 All I get is infinite never ending loop browser message.

 Can anyone help as this is just the basics as the cookbook points out and
 still im getting nowhere.

 Thanks,

 K

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
=
PHP for E-Biz: http://sanisoft.com
=

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SSL Help

2011-03-11 Thread Jeremy Burns | Class Outfit
I achieved this using a component called SSL - I can't remember where I got it 
from, but I am sure a search will turn it up. I had to alter it a bit as the 
server I used it on had all sorts of edge servers and so on, but here's my 
final implementation. The cool thing is that you have a single array in 
app_controller that determines which controllers and actions are SSLed. Hope it 
helps...

app_controller.php:

var $components = array(
'Security',
...
'Secured.Ssl' = array(
'secured' = array(
'orders' = '*',
'order_notes' = '*',
'order_items' = '*',
'users' = '*',
'questionnaires' = '*',
'customers' = '*'
)
)
...
}

ssl.php (in components)

?php

class SslComponent extends Object {

public $secured = array();

public $https = false;

public $autoRedirect = true;

public function initialize($controller, $settings = array()) {

$this-controller = $controller;
$this-_set($settings);

if ( $_SERVER['SERVER_ADDR'] == '192.0.192.1' || env('HTTPS') 
== 1 )
{
$this-https = true;
}

if ($this-autoRedirect === true) {
$secured = $this-ssled($this-controller-params);

if ($secured  !$this-https) {
$this-forceSSL();
}
elseif (!$secured  $this-https) {
$this-forceNoSSL();
}

}
}

public function ssled($params) {
if (!array_key_exists($params['controller'], $this-secured)) {
return false;
}
$actions = (array) $this-secured[$params['controller']];

if ($actions === array('*')) {
return true;
}
return (in_array($params['action'], $actions));
}

public function forceSSL() {
$server = env('SERVER_NAME');

$this-controller-redirect(https://$server{$this-controller-here});
}

public function forceNoSSL() {
$server = env('SERVER_NAME');

$this-controller-redirect(http://$server{$this-controller-here});
}

}
?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 12 Mar 2011, at 05:33, Krissy Masters wrote:

 I am only starting in on SSL and getting nowhere.
 
 Attempting to secure 2 actions to start (will secure entire backend IF I can
 get these running first)
 
 Users Controller:
 
 public function beforeFilter() {
   parent::beforeFilter();
   $this-Auth-allowedActions = array( 'login', 'logout', 'register');
   $this-Auth-fields = array( 'username' = 'email', 'password' =
 'security' );
   $this-Security-blackHoleCallback = 'forceSSL';
   $this-Security-requireSecure( 'login', 'register');
   //$this-Security-requireSecure( array('login', 'register'));
   $this-Auth-autoRedirect = false;
 }
 
 App Controller:
 
 Has Security in $component array
 
 function forceSSL() {
   $this-redirect('https://' . $_SERVER['SERVER_NAME'] .
 $this-here);
   }
 
 All I get is infinite never ending loop browser message.
 
 Can anyone help as this is just the basics as the cookbook points out and
 still im getting nowhere.
 
 Thanks,
 
 K
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SSL Help

2011-03-11 Thread Sam Bernard
You're getting infinite redirects because there is no condition in your 
forceSSL function- have it check for https first, otherwise it will just 
keep redirecting:

function forceSSL(

if(isset($_SERVER['HTTPS'])  $_SERVER['HTTPS'] == 'on') ) {
  return;
 } else {
  $this-redirect('https://' . $_SERVER['SERVER_NAME'] 
. $this-here);
 }

)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SSL Help

2011-03-11 Thread Jeremy Burns | Class Outfit
This can help, but I have found it a bit unreliable:

core.php:
Configure::write('Session.cookie_secure', false);

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 12 Mar 2011, at 05:40, Dr. Tarique Sani wrote:

 Just from top of the head here. Redirection from https to http mean you will 
 loose your session and in turn your authentication. 
 
 Most likely you are trying to redirect your user to an action which requires 
 authentication but is not on https, thus that action redirects the user back 
 to login on https your which finds your as being already authenticated and 
 redirects to
 
 got it :-)
 
 Cheers
 Tarique
 
 
 On Sat, Mar 12, 2011 at 11:03 AM, Krissy Masters naked.cake.ba...@gmail.com 
 wrote:
 I am only starting in on SSL and getting nowhere.
 
 Attempting to secure 2 actions to start (will secure entire backend IF I can
 get these running first)
 
 Users Controller:
 
 public function beforeFilter() {
parent::beforeFilter();
$this-Auth-allowedActions = array( 'login', 'logout', 'register');
$this-Auth-fields = array( 'username' = 'email', 'password' =
 'security' );
$this-Security-blackHoleCallback = 'forceSSL';
$this-Security-requireSecure( 'login', 'register');
//$this-Security-requireSecure( array('login', 'register'));
$this-Auth-autoRedirect = false;
 }
 
 App Controller:
 
 Has Security in $component array
 
 function forceSSL() {
$this-redirect('https://' . $_SERVER['SERVER_NAME'] .
 $this-here);
}
 
 All I get is infinite never ending loop browser message.
 
 Can anyone help as this is just the basics as the cookbook points out and
 still im getting nowhere.
 
 Thanks,
 
 K
 
 --
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php
 
 
 
 -- 
 =
 PHP for E-Biz: http://sanisoft.com
 =
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
  
  
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: SSL Help

2011-03-11 Thread Krissy Masters
Thanks everyone.

@Jeremy Will give this a shot. Found a SSL component I guess pre-your
modifications.

Keep you posted.

K



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problems in saving form data to database

2011-03-11 Thread ShadowCross
goluhaque:

If I'm reading your code correctly, your Post model has a validation
rule on a fieldName 'post' that must be at least one character in
length and is required (although the rule name 'minLenght' is
misspelled).  However, the form defined in your view does not have an
input for this field, which means:

1) $this-data['Post']['post'] will never be defined by the time you
execute this-Post-save(), UNLESS you have defined a default value
for the 'post' field when you created the table.

and

2) the validation error 'Question cannot be empty' will never display
when the form is rendered again.  (Field validation errors are
automatically displayed with the corresponding input() if you create
your forms using the FormHelper).

To verify, try adding the following lines in the ELSE block (where you
execute $this-Session-setFlash(__('Post user id Could not be saved',
true));
):

  Configure::write('debug', 2);
  debug($this-Post-validationErrors);


and check the value displayed in the debug block on the rendered page.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Error Security::cipher()

2011-03-11 Thread ShadowCross
In your UsersController, try adding the following lines BEFORE you
execute $this-Cookie-write():

  debug(Configure::read('Security.salt');
  debug($this-Cookie-key);

The first line displays the default key that the CookieComponent uses
(usually defined in app/config/core.php), but the second line is the
actual value that Security::cipher() actually tries to use.

If both debug values are blank, check your code for places where
Configure::write(Security.salt, ...) is being executed.  If the first
debug value is not blank, but the second one is, check your
AppController and UsersController if you are overriding the default
value for $this-Cookie-key (either by using the

  var $components= array('Cookie' = array(...));

syntax, or by

  $this-Cookie-key = ...;



On Mar 11, 2:12 am, Carachi carach...@gmail.com wrote:
 Hi cricket,
 I do this:

 class UsersController extends AppController {

         var $name = 'Users';
         var $helper = array('Html','Form');
         var $components = array('Cookie');

         function beforeFilter() {
                 parent::beforeFilter();
                 $this-Auth-allow(array('login','build_acl'));
         }

         function getUserFromCookies() {
                 $name = 'user';
                 debug($name);   //print user
                 $this-Cookie-write($name, 'test' ,true); //print   Warning 
 (512):
 You cannot use an empty key for Security::cipher()
                 $user = $this-Cookie-read($name);    //print   Warning 
 (512): You
 cannot use an empty key for Security::cipher()
                 return;
         }

 }

 in the other controller I use this functions to write and read

         function setCookies($name, $value, $time = NULL) {
                 $this-Cookie-write($name, $value ,true, $time);
                 return;
         }

         function getCookies($name) {
                 return $this-Cookie-read($name);
         }

 and this works!
 I don't understand why in the UsersController it doesn't works!

 Thank you
 bye

 On 10 Mar, 23:06, cricket zijn.digi...@gmail.com wrote:



  On Thu, Mar 10, 2011 at 4:48 PM, Carachi carach...@gmail.com wrote:
   Thank you.
   after set I call this method:
       $this-Cookie-read('mycookie');
   and it return this error:
       Warning (512): You cannot use an empty key for
   Security::cipher()
   if I call with debug function so:
       debug($this-Cookie-read('mycookie'));
   doesn't return anything...

  No, we mean did you debug($name) to see that it's correct. In your
  latest example, though, you're using a literal string. So, now you
  need to ensure that $name == 'mycookie' in controller1.

  Perhaps a quicker way to handle this would be:

  $this-log($name);
  $this-Cookie-write($name, $value ,true, $time);

  other controller:
  $this-log($name);
  $this-Cookie-read($name);

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php