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

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

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'

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

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

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

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

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

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

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.

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

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

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

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

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

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

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

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.

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

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.

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

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

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

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

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

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

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

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

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:

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

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

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

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:

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

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']);

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

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

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

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(

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

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

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

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

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

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

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

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

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

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,

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

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

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“- 隐藏被引用文字 - -

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

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', ),