Re: Problème paginator version 1.3

2011-12-28 Thread Tilen Majerle
Nice from you...but who understand your language ?? :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/27 Sabri ouni.sa...@gmail.com

 Salut pour tous,
 j'ai un problème Notice (8): Undefined variable: paginator [APP\View
 \posts\index.ctp, line 2]
 ( ! ) Fatal error: Call to a member function numbers() on a non-object
 in C:\wamp\www\concours\cake_1_3\app\View\posts\index.ctp on line 2


 View/index.ctp
  ?php
echo $paginator-numbers();
debug($articles);
 ?

 Controller/posts-controllers.php
 ?php
 class PostsController extends AppController {

var $name = 'Posts';
var $paginate =array(
'Post'  =array(
'limit' = 2,
'order' = array(
'Post.created' = 'Desc'
)
));

function index() {
 $q = $this-paginate('Post');
 $this-set('articles',$q);
}
 }
 ?

 Model/post.php et category.php
 ?php

 class Category extends AppModel
 {
var $name = 'Category';
 }

 ?
 ?php

 class Post extends AppModel
 {
var $name = 'Post';
 }

 ?



 Des solutions SVP?

 --
 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


Error saving i18n

2011-12-28 Thread Constantin.FF
I am using Behavior which beforeSave sets the title of the post. I am
using this for attachments to set title, slug, create thumbs and so
on ..

With the testing till now these are the results: Set title inside:
-Behavior beforeSave - does not save inside i18n table
-Model bofereSave - does not save inside i18n table
-Controller before $this-Attachment-save($this-data) - Working!

What are my options to use only a Behavior to set the title? I guess
that this error appears because storing entry inside i18n table
happens before setting the title in the Behavior. So first it tries to
save record inside i18n, but still there is no title and it does not
save anything. After that saving applying the Behavior, which sets the
title and saves the record in the 'attachments' table.

How to debug and see, what is the data before inserting in the model
and i18n tables? Any ideas for the error?

-- 
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: Paginate an array

2011-12-28 Thread J.
Here is my controller :

?php
class ItemsController extends AppController {
public $name = 'Items';
public $helpers = array('Html', 'Form', 'Paginator');

public function index() {
var $paginate = array(
'limit' = 5,
'order' = array(
'id' = 'asc'
)
);
$this-set('items', $this-paginate('Item')
}


and I have this in my view :

?php echo $paginator-prev(); ?
 ?php echo $paginator-numbers(); ?
?php echo $paginator-next(); ?


And I get this error message :

Parse error: syntax error, unexpected T_VAR in /Applications/MAMP/
htdocs/sparetime/app/Controller/ItemsController.php on line 7


I don't understand, can someone help me ? Thanks a lot.


On 26 déc, 17:49, Tilen Majerle tilen.maje...@gmail.com wrote:
 or for 2.0 
 this:http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html
 --
 Lep pozdrav, Tilen Majerlehttp://majerle.eu

 2011/12/26 euromark dereurom...@googlemail.com







  you are probably looking for
 http://book.cakephp.org/view/1231/Pagination

  On 26 Dez., 17:40, J. contact.mysparet...@gmail.com wrote:
   People here are of great help, so I figured out I may ask here.

   I have an Item controller (An Item is a post on my website) with this
   function :

       public function index() {
           $this-set('items', $this-Item-find('all', array('limit' =
   5 )));
       }

   When in view, I echo it out this like this :

   ?php foreach ($items as $item): ?

   Before I put out the limit of 5 elements, all my site items (lots)
   were displayed. Now it only displays 5. But how can I say that it only
   displays 5 then a link to page 2 with posts 6 - 10 then page 3
   etc... ?

   Thanks a lot. Cakephp is a very usefull tool but for someone new to
   php and coding it can be hard to know where to search.

  --
  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

-- 
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 saving i18n

2011-12-28 Thread Tilen Majerle
how do you set data in the behavior ?

do you use $Model-set() or ?

--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/28 Constantin.FF constantin...@gmail.com

 I am using Behavior which beforeSave sets the title of the post. I am
 using this for attachments to set title, slug, create thumbs and so
 on ..

 With the testing till now these are the results: Set title inside:
 -Behavior beforeSave - does not save inside i18n table
 -Model bofereSave - does not save inside i18n table
 -Controller before $this-Attachment-save($this-data) - Working!

 What are my options to use only a Behavior to set the title? I guess
 that this error appears because storing entry inside i18n table
 happens before setting the title in the Behavior. So first it tries to
 save record inside i18n, but still there is no title and it does not
 save anything. After that saving applying the Behavior, which sets the
 title and saves the record in the 'attachments' table.

 How to debug and see, what is the data before inserting in the model
 and i18n tables? Any ideas for the error?

 --
 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: Error saving i18n

2011-12-28 Thread Constantin FF
var $model = null;

function setup($model, $config = array()){
$this-settings[$model-alias] = array_merge($this-_defaults, 
$config);
$this-model = $model;
}

do i have to add $Model-set() also
On Wed, Dec 28, 2011 at 1:31 PM, Tilen Majerle tilen.maje...@gmail.com wrote:
 how do you set data in the behavior ?

 do you use $Model-set() or ?

 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2011/12/28 Constantin.FF constantin...@gmail.com

 I am using Behavior which beforeSave sets the title of the post. I am
 using this for attachments to set title, slug, create thumbs and so
 on ..

 With the testing till now these are the results: Set title inside:
 -Behavior beforeSave - does not save inside i18n table
 -Model bofereSave - does not save inside i18n table
 -Controller before $this-Attachment-save($this-data) - Working!

 What are my options to use only a Behavior to set the title? I guess
 that this error appears because storing entry inside i18n table
 happens before setting the title in the Behavior. So first it tries to
 save record inside i18n, but still there is no title and it does not
 save anything. After that saving applying the Behavior, which sets the
 title and saves the record in the 'attachments' table.

 How to debug and see, what is the data before inserting in the model
 and i18n tables? Any ideas for the error?

 --
 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

-- 
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: Paginate an array

2011-12-28 Thread J.
Found it. Seems my paginators were deprecated.

I used this :

?php echo $this-Paginator-numbers(); ?

Moreover, the VAR had to be declared before the functions.

On 28 déc, 12:29, J. contact.mysparet...@gmail.com wrote:
 Here is my controller :

 ?php
 class ItemsController extends AppController {
     public $name = 'Items';
     public $helpers = array('Html', 'Form', 'Paginator');

     public function index() {
         var $paginate = array(
             'limit' = 5,
             'order' = array(
                 'id' = 'asc'
             )
         );
         $this-set('items', $this-paginate('Item')
     }

 and I have this in my view :

 ?php echo $paginator-prev(); ?
  ?php echo $paginator-numbers(); ?
 ?php echo $paginator-next(); ?

 And I get this error message :

 Parse error: syntax error, unexpected T_VAR in /Applications/MAMP/
 htdocs/sparetime/app/Controller/ItemsController.php on line 7

 I don't understand, can someone help me ? Thanks a lot.

 On 26 déc, 17:49, Tilen Majerle tilen.maje...@gmail.com wrote:







  or for 2.0 
  this:http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html
  --
  Lep pozdrav, Tilen Majerlehttp://majerle.eu

  2011/12/26 euromark dereurom...@googlemail.com

   you are probably looking for
  http://book.cakephp.org/view/1231/Pagination

   On 26 Dez., 17:40, J. contact.mysparet...@gmail.com wrote:
People here are of great help, so I figured out I may ask here.

I have an Item controller (An Item is a post on my website) with this
function :

    public function index() {
        $this-set('items', $this-Item-find('all', array('limit' =
5 )));
    }

When in view, I echo it out this like this :

?php foreach ($items as $item): ?

Before I put out the limit of 5 elements, all my site items (lots)
were displayed. Now it only displays 5. But how can I say that it only
displays 5 then a link to page 2 with posts 6 - 10 then page 3
etc... ?

Thanks a lot. Cakephp is a very usefull tool but for someone new to
php and coding it can be hard to know where to search.

   --
   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

-- 
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: Paginate an array

2011-12-28 Thread Tilen Majerle
 public function index() {
   var $paginate = array(
   'limit' = 5,
   'order' = array(
   'id' = 'asc'
   )
   );
   $this-set('items', $this-paginate('Item')
   }

how can this works ?? :D var inside method ? :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/28 J. contact.mysparet...@gmail.com

 Found it. Seems my paginators were deprecated.

 I used this :

 ?php echo $this-Paginator-numbers(); ?

 Moreover, the VAR had to be declared before the functions.

 On 28 déc, 12:29, J. contact.mysparet...@gmail.com wrote:
  Here is my controller :
 
  ?php
  class ItemsController extends AppController {
  public $name = 'Items';
  public $helpers = array('Html', 'Form', 'Paginator');
 
  public function index() {
  var $paginate = array(
  'limit' = 5,
  'order' = array(
  'id' = 'asc'
  )
  );
  $this-set('items', $this-paginate('Item')
  }
 
  and I have this in my view :
 
  ?php echo $paginator-prev(); ?
   ?php echo $paginator-numbers(); ?
  ?php echo $paginator-next(); ?
 
  And I get this error message :
 
  Parse error: syntax error, unexpected T_VAR in /Applications/MAMP/
  htdocs/sparetime/app/Controller/ItemsController.php on line 7
 
  I don't understand, can someone help me ? Thanks a lot.
 
  On 26 déc, 17:49, Tilen Majerle tilen.maje...@gmail.com wrote:
 
 
 
 
 
 
 
   or for 2.0 this:
 http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html
   --
   Lep pozdrav, Tilen Majerlehttp://majerle.eu
 
   2011/12/26 euromark dereurom...@googlemail.com
 
you are probably looking for
   http://book.cakephp.org/view/1231/Pagination
 
On 26 Dez., 17:40, J. contact.mysparet...@gmail.com wrote:
 People here are of great help, so I figured out I may ask here.
 
 I have an Item controller (An Item is a post on my website) with
 this
 function :
 
 public function index() {
 $this-set('items', $this-Item-find('all', array('limit'
 =
 5 )));
 }
 
 When in view, I echo it out this like this :
 
 ?php foreach ($items as $item): ?
 
 Before I put out the limit of 5 elements, all my site items (lots)
 were displayed. Now it only displays 5. But how can I say that it
 only
 displays 5 then a link to page 2 with posts 6 - 10 then page 3
 etc... ?
 
 Thanks a lot. Cakephp is a very usefull tool but for someone new to
 php and coding it can be hard to know where to search.
 
--
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

 --
 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: Paginate an array

2011-12-28 Thread J.
Yes, figured out

On 28 déc, 12:55, Tilen Majerle tilen.maje...@gmail.com wrote:
  public function index() {
        var $paginate = array(
            'limit' = 5,
            'order' = array(
                'id' = 'asc'
            )
        );
        $this-set('items', $this-paginate('Item')
    }

 how can this works ?? :D var inside method ? :)
 --
 Lep pozdrav, Tilen Majerlehttp://majerle.eu

 2011/12/28 J. contact.mysparet...@gmail.com







  Found it. Seems my paginators were deprecated.

  I used this :

  ?php echo $this-Paginator-numbers(); ?

  Moreover, the VAR had to be declared before the functions.

  On 28 déc, 12:29, J. contact.mysparet...@gmail.com wrote:
   Here is my controller :

   ?php
   class ItemsController extends AppController {
       public $name = 'Items';
       public $helpers = array('Html', 'Form', 'Paginator');

       public function index() {
           var $paginate = array(
               'limit' = 5,
               'order' = array(
                   'id' = 'asc'
               )
           );
           $this-set('items', $this-paginate('Item')
       }

   and I have this in my view :

   ?php echo $paginator-prev(); ?
    ?php echo $paginator-numbers(); ?
   ?php echo $paginator-next(); ?

   And I get this error message :

   Parse error: syntax error, unexpected T_VAR in /Applications/MAMP/
   htdocs/sparetime/app/Controller/ItemsController.php on line 7

   I don't understand, can someone help me ? Thanks a lot.

   On 26 déc, 17:49, Tilen Majerle tilen.maje...@gmail.com wrote:

or for 2.0 this:
 http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html
--
Lep pozdrav, Tilen Majerlehttp://majerle.eu

2011/12/26 euromark dereurom...@googlemail.com

 you are probably looking for
http://book.cakephp.org/view/1231/Pagination

 On 26 Dez., 17:40, J. contact.mysparet...@gmail.com wrote:
  People here are of great help, so I figured out I may ask here.

  I have an Item controller (An Item is a post on my website) with
  this
  function :

      public function index() {
          $this-set('items', $this-Item-find('all', array('limit'
  =
  5 )));
      }

  When in view, I echo it out this like this :

  ?php foreach ($items as $item): ?

  Before I put out the limit of 5 elements, all my site items (lots)
  were displayed. Now it only displays 5. But how can I say that it
  only
  displays 5 then a link to page 2 with posts 6 - 10 then page 3
  etc... ?

  Thanks a lot. Cakephp is a very usefull tool but for someone new to
  php and coding it can be hard to know where to search.

 --
 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

  --
  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

-- 
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


Ajaxing a $this-Item-find('all') - twitter style.

2011-12-28 Thread J.
Long story short, I want to display all owned items on profiles, but I
don't want to paginate it.

Is it possible to display only, like 10 items with a find all, and
when the user is scrolling, it lad 10 more, and 10 more etc... like
with twitter tweets ?

Perhaps with an ajax helper ? Thanks for your time.

-- 
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: Validation + Mongo Datasource

2011-12-28 Thread RhythmicDevil
bump x 1

On Dec 27, 9:59 am, RhythmicDevil rhythmicde...@gmail.com wrote:
 Hi all,
 I am trying to get validation working for my application but I am
 getting some weirdness. I have setup a custom RBAC implementation
 using MongoDB and Ichikaway's datasource.

 https://github.com/ichikaway/mongoDB-Datasource

 I am working on validating in the Groups Model. This is my validate
 property:

     public $validate = array(
         'group' = array(
             'isUnique' = array(
                 'rule' = 'isUnique',
                 'required' = true,
                 'message' = 'Duplicate Group',
             ),
             'notEmpty' = array(
                 'rule' = 'notEmpty',
                 'required' = true,
                 'message' = 'Group name is required',
             )
         )
     );

 And I also have a validates() method

     public function validates()
     {
         parent::validates();

         var_dump($this);
     }

 So a couple of different scenarios give different results but not the
 one I need.

 1. If I wrap the Group-save() call in the controller like this:

            if ($this-Group-validates())
             {
                 if ($this-Group-save($this-data))
                 {
                     $this-flash(__('Group Created.', true),
 array('action' = 'index'));
                 }
             }

 I always get a validation error when I edit saying that the group name
 must be unique.

 2. If I dont wrap the save method in the controller and only supply
 the Model::validate property and the Model::validates() method then
 the validation works but there is no notification. I have dumped out
 the contents of the Model but I cant see anything that I can use to
 determine what validation failed.

 3. If I remove the Model::validates() method the Model acts like the
 record saves but does not actually update the record. In other words
 the record does not change unless the new data does not violate any of
 the validation rules.

 Ok so I am out in the weeds. I realize I have to do some coding to
 make this work, but I am not sure where that code should go. Does the
 Datasource have something to do with filling the validation errors
 array?

 What I really want it to make sure that the validation errors array
 gets something so I can determine what happened and inform the user.

 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: Extend ControllerTestCase

2011-12-28 Thread Matteo Landi
Excuse me for bringing up this old topic, but I have one more question.

My TestController wrapper object contains a method which tests the
authentication layer (it's a custom layer, not the one shipped within cakephp);
consequently all the controllers' tests can easily issue
$this-testAuthKeys(...) and check whether the authentication layer has been
correctly implemented by tested controllers.

The problem is that if I assign to the aforementioned function the name
``testAuthLayer'' (or ``test*'' in general), the testsuite will try and test
the method itself. Is there a way to avoid this? (other than workarounds like
$this-_testAuthKeys..)


Regards,
Matteo

On Dec/11, Matteo Landi wrote:
 Thank for the fast response:
 - placed the wrapper inside app/Lib/Test
 - added App::uses('MyWrapper...', 'Test') on top of all my controllers tests
 - changed 'extends ControllerTestCase' to 'extends MyWrapper...'
 et voila!
 
 
 Regards,
 Matteo
 
 On Sun, Dec 11, 2011 at 11:54 AM, euromark dereurom...@googlemail.com wrote:
  also create a package name for it (e.g. Test)
 
  App::uses('My...', 'Test');
  App::uses('My...', 'PluginName.Test');
 
 
  On 11 Dez., 11:52, euromark dereurom...@googlemail.com wrote:
  I place mine in the Lib folder
  either plugin (cross app) or app Lib folder.
  in 2.0 you can
 
  On 11 Dez., 11:30, Matteo Landi mat...@matteolandi.net wrote:
 
 
 
 
 
 
 
   Hi,
   where is the right place to put a class which extends and add some
   functionalities to ControllerTestCase so that I can it inside all my
   controllers tests? Imagine all my controllers tests implement a
   testAction wrapper: it would be handy to extend ControllerTestCase,
   implement such wrapper in there, and finally make all my tests extend
   MyControllerTestCase instead of the legacy one.
 
   Regards,
   Matteo
 
   --http://www.matteolandi.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
 
 
 
 
 -- 
 http://www.matteolandi.net/

-- 
http://www.matteolandi.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


Test controllers throwing exceptions

2011-12-28 Thread Matteo Landi
Hi everybody,

I have a custom exception handler for all the exceptions raised inside
controllers; when I run the controllers' testsuite, I noticed that exceptions
are propagated to the tests instead of being handled by my handler. Is this the
normal behaviour? What if I want to make some assertions on the output of the
exception produced by the handler? Is this out of the scope of ControllerTest
logic or is it ok to test that kind of things inside controller tests?


Regards,
Matteo

-- 
http://www.matteolandi.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: Problème paginator version 1.3

2011-12-28 Thread euromark
var $helpers = array('Paginator');
is probably missing (see the documentation on Pagination)


On 28 Dez., 10:32, Tilen Majerle tilen.maje...@gmail.com wrote:
 Nice from you...but who understand your language ?? :)
 --
 Lep pozdrav, Tilen Majerlehttp://majerle.eu

 2011/12/27 Sabri ouni.sa...@gmail.com







  Salut pour tous,
  j'ai un problème Notice (8): Undefined variable: paginator [APP\View
  \posts\index.ctp, line 2]
  ( ! ) Fatal error: Call to a member function numbers() on a non-object
  in C:\wamp\www\concours\cake_1_3\app\View\posts\index.ctp on line 2

  View/index.ctp
   ?php
         echo $paginator-numbers();
         debug($articles);
  ?

  Controller/posts-controllers.php
  ?php
  class PostsController extends AppController {

         var $name = 'Posts';
         var $paginate =array(
                 'Post'  =array(
         'limit' = 2,
         'order' = array(
             'Post.created' = 'Desc'
         )
     ));

         function index() {
          $q = $this-paginate('Post');
          $this-set('articles',$q);
         }
  }
  ?

  Model/post.php et category.php
  ?php

  class Category extends AppModel
  {
     var $name = 'Category';
  }

  ?
  ?php

  class Post extends AppModel
  {
     var $name = 'Post';
  }

  ?

  Des solutions SVP?

  --
  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

-- 
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: Problème paginator version 1.3

2011-12-28 Thread euromark
usually you dont need that because it is added automatically
either way, you should address it like
$this-Paginator-numbers()

On 28 Dez., 16:29, euromark dereurom...@googlemail.com wrote:
 var $helpers = array('Paginator');
 is probably missing (see the documentation on Pagination)

 On 28 Dez., 10:32, Tilen Majerle tilen.maje...@gmail.com wrote:







  Nice from you...but who understand your language ?? :)
  --
  Lep pozdrav, Tilen Majerlehttp://majerle.eu

  2011/12/27 Sabri ouni.sa...@gmail.com

   Salut pour tous,
   j'ai un problème Notice (8): Undefined variable: paginator [APP\View
   \posts\index.ctp, line 2]
   ( ! ) Fatal error: Call to a member function numbers() on a non-object
   in C:\wamp\www\concours\cake_1_3\app\View\posts\index.ctp on line 2

   View/index.ctp
    ?php
          echo $paginator-numbers();
          debug($articles);
   ?

   Controller/posts-controllers.php
   ?php
   class PostsController extends AppController {

          var $name = 'Posts';
          var $paginate =array(
                  'Post'  =array(
          'limit' = 2,
          'order' = array(
              'Post.created' = 'Desc'
          )
      ));

          function index() {
           $q = $this-paginate('Post');
           $this-set('articles',$q);
          }
   }
   ?

   Model/post.php et category.php
   ?php

   class Category extends AppModel
   {
      var $name = 'Category';
   }

   ?
   ?php

   class Post extends AppModel
   {
      var $name = 'Post';
   }

   ?

   Des solutions SVP?

   --
   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

-- 
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: Problème paginator version 1.3

2011-12-28 Thread Tilen Majerle
var $helpers = array('Paginator');
is probably missing (see the documentation on Pagination)

usually you dont need that because it is added automatically
either way, you should address it like
$this-Paginator-numbers()


euromark ?? :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/28 euromark dereurom...@googlemail.com

 usually you dont need that because it is added automatically
 either way, you should address it like
 $this-Paginator-numbers()

 On 28 Dez., 16:29, euromark dereurom...@googlemail.com wrote:
  var $helpers = array('Paginator');
  is probably missing (see the documentation on Pagination)
 
  On 28 Dez., 10:32, Tilen Majerle tilen.maje...@gmail.com wrote:
 
 
 
 
 
 
 
   Nice from you...but who understand your language ?? :)
   --
   Lep pozdrav, Tilen Majerlehttp://majerle.eu
 
   2011/12/27 Sabri ouni.sa...@gmail.com
 
Salut pour tous,
j'ai un problème Notice (8): Undefined variable: paginator [APP\View
\posts\index.ctp, line 2]
( ! ) Fatal error: Call to a member function numbers() on a
 non-object
in C:\wamp\www\concours\cake_1_3\app\View\posts\index.ctp on line 2
 
View/index.ctp
 ?php
   echo $paginator-numbers();
   debug($articles);
?
 
Controller/posts-controllers.php
?php
class PostsController extends AppController {
 
   var $name = 'Posts';
   var $paginate =array(
   'Post'  =array(
   'limit' = 2,
   'order' = array(
   'Post.created' = 'Desc'
   )
   ));
 
   function index() {
$q = $this-paginate('Post');
$this-set('articles',$q);
   }
}
?
 
Model/post.php et category.php
?php
 
class Category extends AppModel
{
   var $name = 'Category';
}
 
?
?php
 
class Post extends AppModel
{
   var $name = 'Post';
}
 
?
 
Des solutions SVP?
 
--
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

 --
 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: Ajaxing a $this-Item-find('all') - twitter style.

2011-12-28 Thread euromark
isn't that per definition a pagination? ;)
so why don't you use it then?
you dont have to make your life harder than it is

and yes - you can always set LIMIT to your desired limits
('limit'='10, 20')
but then you need to make sure you know how many there are (for
maximum) etc
so in the end I am not sure you are saving time here


On 28 Dez., 13:20, J. contact.mysparet...@gmail.com wrote:
 Long story short, I want to display all owned items on profiles, but I
 don't want to paginate it.

 Is it possible to display only, like 10 items with a find all, and
 when the user is scrolling, it lad 10 more, and 10 more etc... like
 with twitter tweets ?

 Perhaps with an ajax helper ? Thanks for your time.

-- 
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: Paginate an array

2011-12-28 Thread Sam Sherlock
You need to add ); to the end of the line where you call
$this-paginate()

In php lines end in semi-colons
You'll find it helpful if you can setup an editor that matches braces and
brackets, code hinting  code completion

Many editors have such features - Google to get the info.

- S
On 28 Dec 2011 11:29, J. contact.mysparet...@gmail.com wrote:

 Here is my controller :

 ?php
 class ItemsController extends AppController {
public $name = 'Items';
public $helpers = array('Html', 'Form', 'Paginator');

public function index() {
var $paginate = array(
'limit' = 5,
'order' = array(
'id' = 'asc'
)
);
$this-set('items', $this-paginate('Item')
}


 and I have this in my view :

 ?php echo $paginator-prev(); ?
  ?php echo $paginator-numbers(); ?
 ?php echo $paginator-next(); ?


 And I get this error message :

 Parse error: syntax error, unexpected T_VAR in /Applications/MAMP/
 htdocs/sparetime/app/Controller/ItemsController.php on line 7


 I don't understand, can someone help me ? Thanks a lot.


 On 26 déc, 17:49, Tilen Majerle tilen.maje...@gmail.com wrote:
  or for 2.0 this:
 http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html
  --
  Lep pozdrav, Tilen Majerlehttp://majerle.eu
 
  2011/12/26 euromark dereurom...@googlemail.com
 
 
 
 
 
 
 
   you are probably looking for
  http://book.cakephp.org/view/1231/Pagination
 
   On 26 Dez., 17:40, J. contact.mysparet...@gmail.com wrote:
People here are of great help, so I figured out I may ask here.
 
I have an Item controller (An Item is a post on my website) with this
function :
 
public function index() {
$this-set('items', $this-Item-find('all', array('limit' =
5 )));
}
 
When in view, I echo it out this like this :
 
?php foreach ($items as $item): ?
 
Before I put out the limit of 5 elements, all my site items (lots)
were displayed. Now it only displays 5. But how can I say that it
 only
displays 5 then a link to page 2 with posts 6 - 10 then page 3
etc... ?
 
Thanks a lot. Cakephp is a very usefull tool but for someone new to
php and coding it can be hard to know where to search.
 
   --
   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

 --
 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: Ajaxing a $this-Item-find('all') - twitter style.

2011-12-28 Thread Sam Sherlock
You can set your controller to detect ajax requests you can then set the
layout to use the ajax layout.  This outputs the $content_for_layout var
only (not like default.ctp which has html head, body)

Request  response objects and request handler are things to look at

- S
On 28 Dec 2011 12:20, J. contact.mysparet...@gmail.com wrote:

 Long story short, I want to display all owned items on profiles, but I
 don't want to paginate it.

 Is it possible to display only, like 10 items with a find all, and
 when the user is scrolling, it lad 10 more, and 10 more etc... like
 with twitter tweets ?

 Perhaps with an ajax helper ? Thanks for your time.

 --
 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


login validation does not work with $validate

2011-12-28 Thread Tomfox Wiranata
hi,

i have done this several time with register and it works, but this one
is killing me...

my form:


?php
echo $form-create('User', array('action' = 'login', 'id' =
'userLoginForm'));

echo $form-input('login_username', array( 
'label' = '', 'value'
= '', 'id' = 'UserUsername', 'value' = 'Username') );
echo $form-input('login_pw', array( 'label' = 
'', 'type' =
'password', 'id' = 'UserPw') );
echo $form-button('Einloggen', array('type' = 
'submit',
'class'='button', 'id'='loginSubmit'));

echo $form-end();
echo 'div class=error-message/div'; //field to be 
populated by
possible error message

?


my model:
=

 var $validate = array
 (


'login_username' = array(
'rule' = array('validateLogin', 'login_username'),
'message' = 'Falscher Benutzername.'
),

}

//returning false for testing
 function validateLogin($data)
{
$valid = false;
return $valid;
}



my controller function login() is empty for testingis used to have
all the validation in my controller but i didnt like the setFlash()
method for printing the error message, i want to print the messages
ajax like...so i wanna use the $validate

i cant find the problem

i appreciate the helpthanks :

-- 
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


Atypical login problem

2011-12-28 Thread azim
Dear Cooks,

I do have some serious problem with login action, which I couldn't
solve whatsoever. Our aplication is used by many schools (with any
type of local configuration). Sometimes when student try to login,
black hole appears. Based on teachers phone calls its even depends
on browser. What's far more dangerous, we recive few notifications,
that when some student want to enter website (with his/her data), cake
login as different user (it could be also admin account).

I imagine, it must be some problem with Auth and Session... but what's
next?

Thanks for any suggestions,
Artur

CakePHP 1.3

-- 
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


When can we see the cookbook in Chinese ?

2011-12-28 Thread oldbestfox2
I come from China, so I prefer reading cookbook in Chinese. Now I'm
looking forward to the Chinese version and when can we see it?
Thank you.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and 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


Cake 1.3.11: Wrong singular of 'encounter_foes'

2011-12-28 Thread Zaphod
Hi there,

I think there's a bug in 1.3.11 which converts a link of '/
encounter_foes' to the singular form 'encounter_fo' to get to the
model.
I did some research and found that line 123 of inflector.php is
responsible:
'/(o)es$/i' = '\1',

I commented it out and it worked now, but I'm not sure what for this
line was? Truely english is not my mother tongue.

Have a nice day
- Zaphod -

-- 
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 To Write Programme In PHP?

2011-12-28 Thread nir neerav
Hello Guyz,
I am new to PHP. I dont know how to start developing website in PHP.
Please I need a Step by Step Guidence From you.
Including which Tools I  need To Write Programme In PHP.

Thanx.

-- 
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


Render a view in new window from controller?

2011-12-28 Thread Chris Goodman
I am in need of a way to render a view in a new window from the
controller
Like this fake code: $this-render('posts', target=_blank)

So far my search for a solution has drawn a _blank :-)

Has anybody found a solution for this?

-- 
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 to custom belongsto in CakePHP 2?

2011-12-28 Thread Cristian Deluxe
HI i'm working with a external database (RADIUS) that follows the next
structure:

CREATE TABLE IF NOT EXISTS `radpostauth` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `pass` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `reply` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `authdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=19082 ;

and in my app i have another table that follows the CakePHP
conventions

CREATE TABLE IF NOT EXISTS `wdevices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `wcontract_id` int(11) NOT NULL,
  `device_mac` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci
NOT NULL,
  `wdevices_model_id` int(11) NOT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

What work ok with associations (ie: Wcontract, Wdevice) but i'm trying
to make an belongsto association where:

radpostauth.username = wdevices.device_mac

Currently it's works if i do a hasMany association:

class Radpostauth extends AppModel {
public $useDbConfig = 'radius';
var $name = 'Radpostauth';
public $useTable = 'radpostauth';


var $hasMany = array(
'Wdevice' = array(
'className' = 
'Wdevice',
'foreignKey' = 
false,
'finderQuery' 
= '  SELECT Wdevice.*

FROM radpostauth, wdevices AS Wdevice

WHERE radpostauth.id={$__cakeID__$}

AND Wdevice.device_mac = radpostauth.username

ORDER BY Wdevice.id DESC

LIMIT 0, 30;'

)
);
}

---

Sample return:

Array
(
[Radpostauth] = Array
(
[id] = 19061
[username] = 00:11:22:33:44:55
[pass] =
[reply] = Access-Accept
[authdate] = 2011-12-28 12:57:12
)

[Wdevice] = Array
(
[0] = Array
(
[id] = 1
[...]


But it's not the best way to do it because a radpostauth will be have
always just one Wdevice associated so i would like to know if there
are some way to do this kind of association with belongsTo, hasOne,
etc..

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: Error saving i18n

2011-12-28 Thread Constantin FF
absolutely the same result after adding
$model-set(array('title' = $title, 'body' = $title));
at the end of beforeSave

-- 
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: Render a view in new window from controller?

2011-12-28 Thread euromark
this is not possible with php


On 28 Dez., 18:26, Chris Goodman stumpfar...@gmail.com wrote:
 I am in need of a way to render a view in a new window from the
 controller
 Like this fake code: $this-render('posts', target=_blank)

 So far my search for a solution has drawn a _blank :-)

 Has anybody found a solution for this?

-- 
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: Cake 1.3.11: Wrong singular of 'encounter_foes'

2011-12-28 Thread euromark
your expectation would be encounter_foe, right?


On 28 Dez., 14:06, Zaphod beckerma2...@googlemail.com wrote:
 Hi there,

 I think there's a bug in 1.3.11 which converts a link of '/
 encounter_foes' to the singular form 'encounter_fo' to get to the
 model.
 I did some research and found that line 123 of inflector.php is
 responsible:
 '/(o)es$/i' = '\1',

 I commented it out and it worked now, but I'm not sure what for this
 line was? Truely english is not my mother tongue.

 Have a nice day
 - Zaphod -

-- 
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: When can we see the cookbook in Chinese ?

2011-12-28 Thread euromark
as soon as you are done writing it ;) i'd say


On 28 Dez., 13:32, oldbestfox2 oldbestf...@yahoo.com.cn wrote:
 I come from China, so I prefer reading cookbook in Chinese. Now I'm
 looking forward to the Chinese version and when can we see it?
 Thank you.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and 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: Atypical login problem

2011-12-28 Thread euromark
without specific code from what you wrote so far (AppController, login
action of controller etc)
it isnt possible to help you


On 28 Dez., 09:05, azim artur.zylin...@gmail.com wrote:
 Dear Cooks,

 I do have some serious problem with login action, which I couldn't
 solve whatsoever. Our aplication is used by many schools (with any
 type of local configuration). Sometimes when student try to login,
 black hole appears. Based on teachers phone calls its even depends
 on browser. What's far more dangerous, we recive few notifications,
 that when some student want to enter website (with his/her data), cake
 login as different user (it could be also admin account).

 I imagine, it must be some problem with Auth and Session... but what's
 next?

 Thanks for any suggestions,
 Artur

 CakePHP 1.3

-- 
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 To Write Programme In PHP?

2011-12-28 Thread euromark
good thing you found CAKE(C A K E)php^^
= http://book.cakephp.org/

On 28 Dez., 17:10, nir neerav nirnee...@gmail.com wrote:
 Hello Guyz,
 I am new to PHP. I dont know how to start developing website in PHP.
 Please I need a Step by Step Guidence From you.
 Including which Tools I  need To Write Programme In PHP.

 Thanx.

-- 
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 To Write Programme In PHP?

2011-12-28 Thread Justin Edwards
I'll chime in with my recommendation again.  I feel like a lobbyist now :).
  Along with learning cakephp, it would be good to understand the basic php
functions too.  Here is a link to a simple and well formed site.
http://www.w3schools.com/php/

On Wed, Dec 28, 2011 at 1:06 PM, euromark dereurom...@googlemail.comwrote:

 good thing you found CAKE(C A K E)php^^
 = http://book.cakephp.org/

 On 28 Dez., 17:10, nir neerav nirnee...@gmail.com wrote:
  Hello Guyz,
  I am new to PHP. I dont know how to start developing website in PHP.
  Please I need a Step by Step Guidence From you.
  Including which Tools I  need To Write Programnsme In PHP.
 
  Thanx.

 --
 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: When can we see the cookbook in Chinese ?

2011-12-28 Thread euromark
ops, I accidently clicked on mark as spam trying to close the window
- that seems to be irreversible. please disregard.



On 28 Dez., 20:04, euromark dereurom...@googlemail.com wrote:
 as soon as you are done writing it ;) i'd say

 On 28 Dez., 13:32, oldbestfox2 oldbestf...@yahoo.com.cn wrote:







  I come from China, so I prefer reading cookbook in Chinese. Now I'm
  looking forward to the Chinese version and when can we see it?
  Thank you.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and 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 To Write Programme In PHP?

2011-12-28 Thread Timothy O'Reilly
Not sure where to start with such a huge question.  I assume from your
question that you have very little programming experience? I am a newbie
(though tinkering for a long time). On the assumption that you are new to
web programmmg, here are some ideas.

Tools - Editors
Coda for Mac;
Notepad++ for Windows;
An FTP tool of your choice and a local server environment (MAMP or XAMP);

PHP Education
YouTube PHP - tons of free tutorials;
Udemy - Tons of low cost online courses;
CAKE Book - as per Euromarks response;
NetTuts for courses on Object Oriented Programming in PHP;

I suggest you learn some basic PHP (HTML  CSS are essential too); then do
a course on OOP, then get stuck into an MVC (CAKE) thereafter.

Then 6+ months fulltime hard work to get running and a lifetime of learning.
Regards,
Tim



On Wednesday, December 28, 2011, nir neerav nirnee...@gmail.com wrote:
 Hello Guyz,
 I am new to PHP. I dont know how to start developing website in PHP.
 Please I need a Step by Step Guidence From you.
 Including which Tools I  need To Write Programme In PHP.

 Thanx.

 --
 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


-- 
| cellphone: +18579280348 |

| 123 10th Street | San Francisco | CA 94103 |
| web: www.zign.me | skype: timothy.o.reilly | twitter: @timothyjoreilly |

-- 
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


get current url as array

2011-12-28 Thread euromark
am I missing sth or is there no url() method etc for returning the
current url as array?
I only know this way:

$urlParams = Router::getParams(true);
$urlParams = am($urlParams, $urlParams['named'],
$urlParams['pass']);
unset($urlParams['named']);
unset($urlParams['pass']);

but it seems a little bit like overhead...
does anyone know how to do that easier?
maybe we should introduce Router::urlAsArray()
with default NULL = return current ?

-- 
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: get current url as array

2011-12-28 Thread euromark
...or for any url for that matter (for adding some named/pass params
etc)

PS: I forgot
if (isset($urlParams['prefix'])) {
unset($urlParams['prefix']);
}




On 28 Dez., 21:04, euromark dereurom...@googlemail.com wrote:
 am I missing sth or is there no url() method etc for returning the
 current url as array?
 I only know this way:

                 $urlParams = Router::getParams(true);
                 $urlParams = am($urlParams, $urlParams['named'],
 $urlParams['pass']);
                 unset($urlParams['named']);
                 unset($urlParams['pass']);

 but it seems a little bit like overhead...
 does anyone know how to do that easier?
 maybe we should introduce Router::urlAsArray()
 with default NULL = return current ?

-- 
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


problems with custom datasource

2011-12-28 Thread flosky
Hi everyone,

I am writing a custom datasource with cake 2.x to get data from an api
call.
I did everything according to the twitter example in the book.
But when I run a Model-find('all') I get following error message:

Error: Database table examples for model Example was not found.

I suspect something wrong in the code of the DataSource.
This is my code for the DataSource (as you can see its pretty much
dummy code, just to get it working):

class ExampleSource extends DataSource {
 protected $_schema = array(
'tweets' = array(
'id' = array(
'type' = 'integer',
'null' = true,
'key' = 'primary',
'length' = 11,
),
'text' = array(
'type' = 'string',
'null' = true,
'key' = 'primary',
'length' = 140
),
'status' = array(
'type' = 'string',
'null' = true,
'key' = 'primary',
'length' = 140
),
)
);

/**
 * Constructor
 *
 */
public function __construct($config) {
parent::__construct($config);
}

public function read($model, $queryData = array()) {
return array('nothing' = array('id' = 1, 'text' = 'nothing',
'status' = 'success'));
}

 public function listSources() {
return array('tweets');
}

public function describe($model) {
return $this-_schema['tweets'];
}
}
?


Any hints?

Thanks, flosky

-- 
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 models with multiple tables

2011-12-28 Thread robbie
Thanks for the help.

You know, I read that section so many times, but couldn't figure out how to 
make it work right.  Then I tried it using scaffolding and it works 
perfectly.  So, now I have to figure out how to do the same without 
scaffolding.

-- 
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


Form validation error doesn't show! CPHP 1.3

2011-12-28 Thread Ersin Demirtas
Form validation error doesn't show! CPHP 1.3

I have a user model and in my user model i have

User Model

?php
class User extends AppModel {
var $name = 'User';
var $displayField = 'username';


var $validate = array(
'username' = array(
'usernameRule' = array(
'rule' = 'alphaNumeric',
'message' = 'Alphabetic and Number characters 
only'

),
'usernameRule2' = array(
'rule' = array('minLength', 6),
'message' = 'Minimum length of 6 characters'
),
),
'password' = array(
'passwordRule' = array(
'rule' = 'alphaNumeric',
'message' = 'Alphabetic and Number characters 
only'

),
'passwordRule2' = array(
'rule' = array('minLength', 6),
'message' = 'Minimum length of 6 characters'
),
)
);
}
?
in my user controller i have included from helper but doesn't show
error for username field or password field when I enter less then 6
chars..

thanks. by the way I am not getting error when I am updating a user
data but when i user user add form it works.

User Controller
---

?php
class UsersController extends AppController {

var $name = 'Users';
var $components = array('Email');
var $helpers = array('Form');

function login() {
}

function logout() {
$this-Session-destroy();
$this-redirect($this-Auth-logout());
}

   function _refreshAuth($field = '', $value = '') {
if (!empty($field)  !empty($value)) {
$this-Session-write($this-Auth-sessionKey .'.'. 
$field,
$value);
} else {
if (isset($this-User)) {
$this-Auth-login($this-User-read(false, 
$this-Auth-
user('id')));
} else {

$this-Auth-login(ClassRegistry::init('User')-findById($this-
Auth-user('id')));
}
}
}

   function forgot(){
 if (!empty($this-data)){
$user = $this-User-find('first',array('conditions' =
array('email' =$this-data['User']['email'])));
if(!empty($user)){
$newPassword = $this-_createRandomPassword(8);
$this-Email-from= 'Example supp...@example.com';
$this-Email-to  = $this-data['User']['email'];
$this-Email-subject = 'Example Password!';
$this-Email-send('Dear '.$user['User']['username'].', 
your new
password is '.$newPassword.'. Please login and update your
password.');

$this-data['User']['password'] = $this-Auth-
password($newPassword);
$this-User-id = $user['User']['id'];

$data = array(
   'User' = array(
'id'  =
$user['User']['id'],
'password'   =$this-Auth-
password($newPassword)
   )
);
$this-User-save( $data, true, array('password') );

$this-Session-setFlash('Thanks, your new password is 
been sent to
your email!');
} else {
$this-Session-setFlash(Sorry, this email doesn't 
exsits!);
}
}
}

function profile(){
$this-set('user',$this-Auth-user());

if (!empty($this-data)) {
$this-User-id = $this-Auth-user('id');


if(empty($this-data['User']['password'])){

$this-data['User']['password'] = $this-Auth-
user('password');
}
$this-User-save($this-data, 
false,
array('username','email','password'));
$this-_refreshAuth();
}

$this-Auth-login($this-Auth-user());
Cache::clear();

}


function register() {
if($this-Auth-user()){
$this-cakeError('notAllowedWhenLoggedin');
}

if (!empty($this-data)) {
$this-User-create();

Re: When can we see the cookbook in Chinese ?

2011-12-28 Thread Ersin Demirtas
I suggest you to use http://translate.google.com

On Dec 28, 12:32 pm, oldbestfox2 oldbestf...@yahoo.com.cn wrote:
 I come from China, so I prefer reading cookbook in Chinese. Now I'm
 looking forward to the Chinese version and when can we see it?
 Thank you.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and 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


File Upload Plugins

2011-12-28 Thread Timothy O'Reilly
Hi,
Does anyone have a recommendation for a File Upload plugin for use with
Cake Ver 2.0.4?

I want to upload PDF documents, store them in a folder and have the URL
location stored in my database/table.  I have been playing with a bunch of
scripts and started doing it from scratch, but of someone has done it and
has a plugin that would be great...

Thanks,
Tim
(No relation to the Publisher)
-- 
| cellphone: +18579280348 |
| 123 10th Street | San Francisco | CA 94103 |

-- 
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: File Upload Plugins

2011-12-28 Thread Điển vũ
I think better you should use your script about uploading. Uploading is 
hard to write plugin use for all case.
And It is easier to change , or add new features, even update to 3.0 
version ( in future ) , because script is yours .



-- 
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: File Upload Plugins

2011-12-28 Thread Timothy O'Reilly
Thanks for responding. Was just hoping someone had a cool plugin (with
features i havent yet thought of) that would save me writing it :)
Will do!
Tim

On Wednesday, December 28, 2011, Điển vũ meotimdi...@gmail.com wrote:
 I think better you should use your script about uploading. Uploading is
hard to write plugin use for all case.
 And It is easier to change , or add new features, even update to 3.0
version ( in future ) , because script is yours .


 --
 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


-- 
| cellphone: +18579280348 |

| 123 10th Street | San Francisco | CA 94103 |
| web: www.zign.me | skype: timothy.o.reilly | twitter: @timothyjoreilly |

-- 
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 To Write Programme In PHP?

2011-12-28 Thread sudarshana sampath
Hi,

go through the PHP manual, it is the most suitable place for PHP newbie.
http://www.php.net/manual/en/

On Thu, Dec 29, 2011 at 12:59 AM, Timothy O'Reilly 
timothy.john.orei...@gmail.com wrote:

 Not sure where to start with such a huge question.  I assume from your
 question that you have very little programming experience? I am a newbie
 (though tinkering for a long time). On the assumption that you are new to
 web programmmg, here are some ideas.

 Tools - Editors
 Coda for Mac;
 Notepad++ for Windows;
 An FTP tool of your choice and a local server environment (MAMP or XAMP);

 PHP Education
 YouTube PHP - tons of free tutorials;
 Udemy - Tons of low cost online courses;
 CAKE Book - as per Euromarks response;
 NetTuts for courses on Object Oriented Programming in PHP;

 I suggest you learn some basic PHP (HTML  CSS are essential too); then do
 a course on OOP, then get stuck into an MVC (CAKE) thereafter.

 Then 6+ months fulltime hard work to get running and a lifetime of
 learning.
 Regards,
 Tim




 On Wednesday, December 28, 2011, nir neerav nirnee...@gmail.com wrote:
  Hello Guyz,
  I am new to PHP. I dont know how to start developing website in PHP.
  Please I need a Step by Step Guidence From you.
  Including which Tools I  need To Write Programme In PHP.
 
  Thanx.
 
  --
  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
 

 --
 | cellphone: +18579280348 |

 | 123 10th Street | San Francisco | CA 94103 |
 | web: www.zign.me | skype: timothy.o.reilly | twitter: @timothyjoreilly |



  --
 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




-- 
Cheers,
Sudarshana Sampath.

-- 
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: File Upload Plugins

2011-12-28 Thread Jon Price
try this: http://milesj.me/code/cakephp/uploader
I'm using his autologin component but he has other code you might look into.

On Wed, Dec 28, 2011 at 9:02 PM, Timothy O'Reilly 
timothy.john.orei...@gmail.com wrote:

 Thanks for responding. Was just hoping someone had a cool plugin (with
 features i havent yet thought of) that would save me writing it :)
 Will do!
 Tim

-- 
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: File Upload Plugins

2011-12-28 Thread Timothy O'Reilly
Thanks Jon. Will take a look.


On Wednesday, December 28, 2011, Jon Price jonpr...@donet.com wrote:
 try this: http://milesj.me/code/cakephp/uploader
 I'm using his autologin component but he has other code you might look
into.

 On Wed, Dec 28, 2011 at 9:02 PM, Timothy O'Reilly 
timothy.john.orei...@gmail.com wrote:

 Thanks for responding. Was just hoping someone had a cool plugin (with
features i havent yet thought of) that would save me writing it :)
 Will do!
 Tim

 --
 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


-- 
| cellphone: +18579280348 |

| 123 10th Street | San Francisco | CA 94103 |
| web: www.zign.me | skype: timothy.o.reilly | twitter: @timothyjoreilly |

-- 
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


CakePHP 2.0.5 and 1.3.14 released

2011-12-28 Thread mark_story
The CakePHP core team is proud to announce the immediate availability
of CakePHP 2.0.5 [1] and CakePHP 1.3.14 [2].

In total, there were over 90 commits and 40 issues have been resolved
since 2.0.4. A complete list of the changes can be viewed on the
changelogs page [3], but a quick summary of changes that made it into
2.0.5:

- Return values were corrected in `Cache`.  False always indicates
failure, as documented.
- Cascading deletes with hasOne associations and no foreignKey work
correctly now.
- Cache files for SQLite no longer contain  in the filenames.
- Themed asset files with spaces in the file names are now served
correctly through Dispatcher.
- Double pluralization in ViewTask was corrected.
- CacheHelper had a number of issues fixed when using the callbacks
  option.
- TextHelper::excerpt() now works as documented.
- Models using `$tablePrefix` should now work correctly when lazy-
loaded.
- Routing issues with named parameters and query string parameters
have
  been fixed.
- Shell::$plugin was added so more correct help and usage
documentation
  can be generated.
- CakeEmail now correctly handles inline + normal attachments in the
same
  email.  Inline attachments also work now.

On the 1.3 branch, there were over 35 commits and 25 issues resolved
since 1.3.13.  A complete list of the changes can be viewed in the
changelogs page [4].  A quick summary of the changes made to 1.3 are:

- Asset timestamping now works for image submit buttons.
- Postgres virtualFields with literal values not work correctly.
- User defined headers are now reset by EmailComponent::reset()
- CookieComponent is now able to read cookies created by 2.0.x
  applications.
- Compatibility with PHP5.4 has been improved.
- Protocol relative URLs for assets now work correctly.
- TextHelper::excerpt() now works as documented.

We've been hard at work on the 2.1 branch and its shaping up to be a
great release.  2.1 will be fully backwards compatible with 2.0, and
add
a number of useful features.  For a list of what is complete, and what
is
planned for 2.1, see the roadmap [5] and the in-progress 2.1 migration
guide [6]

Thanks once again to the excellent CakePHP community, for all of the
outstanding work.  Without your contributions and love there would be
no
CakePHP.

- Download 2.0.5 [1]  View the changelog [3]
- Download 1.3.14 [2]  View the changelog [4]


### Links

- [1] http://github.com/cakephp/cakephp/zipball/2.0.5
- [2] http://github.com/cakephp/cakephp/zipball/1.3.14
- [3] http://cakephp.org/changelogs/2.0.5
- [4] http://cakephp.org/changelogs/1.3.14
- [5] http://cakephp.lighthouseapp.com/projects/42648/development-roadmap
- [6] 
https://github.com/cakephp/docs/blob/2.1/en/appendices/2-1-migration-guide.rst

-- 
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: When can we see the cookbook in Chinese ?

2011-12-28 Thread mark_story
Unfortunately, none of the core contributors is fluent in chinese.  If
you'd like to help translate the documentation into chinese, there is
a guide on contributing documentation.

http://book.cakephp.org/2.0/en/contributing/documentation.html

-Mark

On Dec 28, 7:32 am, oldbestfox2 oldbestf...@yahoo.com.cn wrote:
 I come from China, so I prefer reading cookbook in Chinese. Now I'm
 looking forward to the Chinese version and when can we see it?
 Thank you.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and 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: Form validation error doesn't show! CPHP 1.3

2011-12-28 Thread Ersin Demirtas
OK, I found the problem I was using this function some how this
function disables errors. please help..


  function _refreshAuth($field = '', $value = '') {
if (!empty($field)  !empty($value)) {
$this-Session-write($this-Auth-sessionKey .'.'. 
$field,
$value);
} else {
if (isset($this-User)) {
$this-Auth-login($this-User-read(false, 
$this-Auth-
user('id')));
} else {

$this-Auth-login(ClassRegistry::init('User')-findById($this-
Auth-user('id')));
}
}
}

-- 
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: Form validation error doesn't show! CPHP 1.3

2011-12-28 Thread Ersin Demirtas
I found the solution :D,

just update the required fields.

$this-_refreshAuth('username',$this-data['User']['username']);

-- 
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: Cake 1.3.11: Wrong singular of 'encounter_foes'

2011-12-28 Thread Zaphod
Yes, of course. Because its still a foe ;-)

On 28 Dez., 20:03, euromark dereurom...@googlemail.com wrote:
 your expectation would be encounter_foe, right?

 On 28 Dez., 14:06, Zaphod beckerma2...@googlemail.com wrote:







  Hi there,

  I think there's a bug in 1.3.11 which converts a link of '/
  encounter_foes' to the singular form 'encounter_fo' to get to the
  model.
  I did some research and found that line 123 of inflector.php is
  responsible:
  '/(o)es$/i' = '\1',

  I commented it out and it worked now, but I'm not sure what for this
  line was? Truely english is not my mother tongue.

  Have a nice day
  - Zaphod -

-- 
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: When can we see the cookbook in Chinese ?

2011-12-28 Thread oldbestfox2
Thank you!

On 12月29日, 上午11时21分, mark_story mark.st...@gmail.com wrote:
 不幸的是,没有能说流利的中文的核心贡献者。如果
 你想帮助文档翻译成中文,有
 贡献文件的指导。

 http://book.cakephp.org/2.0/en/contributing/documentation.html

 唛

 12月28日,7:32,oldbestfox2 oldbestf...@ yahoo.com.cn写道:

 hide_quotes =#msg_691969d66048422e“- 隐藏被引用文字 -

 - 显示引用的文字 -



 我来自中国,所以我喜欢阅读中文的食谱。现在,我
 期待中国版时,我们可以看到它?
 谢谢。

-- 
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: Cake 1.3.11: Wrong singular of 'encounter_foes'

2011-12-28 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/953/Inflections

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 28 Dec 2011, at 13:06, Zaphod wrote:

 Hi there,
 
 I think there's a bug in 1.3.11 which converts a link of '/
 encounter_foes' to the singular form 'encounter_fo' to get to the
 model.
 I did some research and found that line 123 of inflector.php is
 responsible:
 '/(o)es$/i' = '\1',
 
 I commented it out and it worked now, but I'm not sure what for this
 line was? Truely english is not my mother tongue.
 
 Have a nice day
 - Zaphod -
 
 -- 
 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: Atypical login problem

2011-12-28 Thread azim
=== app_controller.php ===
public $components = array(
'Auth' = array(
'authorize' = 'controller',
'loginAction' = '/users/login',
),
'RequestHandler',
'Security' = array(
'blackHoleCallback' = 'blackHole',
),
'Session',
'Ssl'
);
[...]
public function beforeFilter() {
parent::beforeFilter();

$this-Auth-authError = 'Odmowa dostępu.';
$this-Auth-loginError = 'Logowanie nie powiodło się.';
$this-Auth-loginBlockedUser = 'Twoje konto zostało
zablokowane, skontaktuj się z nauczycielem.';

$user = $this-Auth-user();
setGlobalSession($user);
[...]
=== END: app_controller.php ===



=== users_controller.php ===
public function login() {
if (!empty($this-data)  $this-Auth-user()) {
[...]
} else {
[...]
}
}
=== END: users_controller.php ===



On 28 Gru, 20:05, euromark dereurom...@googlemail.com wrote:
 without specific code from what you wrote so far (AppController, login
 action of controller etc)
 it isnt possible to help you

 On 28 Dez., 09:05, azim artur.zylin...@gmail.com wrote:







  Dear Cooks,

  I do have some serious problem with login action, which I couldn't
  solve whatsoever. Our aplication is used by many schools (with any
  type of local configuration). Sometimes when student try to login,
  black hole appears. Based on teachers phone calls its even depends
  on browser. What's far more dangerous, we recive few notifications,
  that when some student want to enter website (with his/her data), cake
  login as different user (it could be also admin account).

  I imagine, it must be some problem with Auth and Session... but what's
  next?

  Thanks for any suggestions,
  Artur

  CakePHP 1.3

-- 
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