Paging related records in 1.2

2007-04-22 Thread abba bryant
Would anyone take the time to show me how I might be able to page related records. The situation is such that I have categories related to themselves through a parent id and the tree behavior. That is working fine for me so far. The index action uses the $this->set('categories', $this->paginate(

Re: no mod_rewrite - does it matter in the greater scheme of things?

2007-04-22 Thread Chris Hartjes
On 4/22/07, Steve Boyd <[EMAIL PROTECTED]> wrote: > > does it matter for anything else?? > It's about elegant-looking URL's. You can have your ugly URL's with a ? in it. I'll make sure mod_rewrite works with my stuff. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" @TheBallpar

no mod_rewrite - does it matter in the greater scheme of things?

2007-04-22 Thread Steve Boyd
hey im new to cake. love it. anyway i messed around with mod_rewrite for ages but could get it to work properly on my (shared) server no biggie. using index.php/controller/action urls (yeah i know i can also do ?/controller/action) my question is in the greater scheme of things does using que

is there another Star Rating code or helper to cake ?

2007-04-22 Thread fredBH
Hello guys... how r u ? I have trying to use http://rossoft.wordpress.com/2006/09/07/ajax-star-rating-helper/ withou sucess... Its to complicate and i can understand the user's posts about how to use it... So... is there another way ? or can someone send me and fully usefull example of rossoft

Re: mod_rewrite Problem

2007-04-22 Thread aldo.nievas
You could try defining something like this in your httpd.conf. You must have mod_rewrite enabled. DocumentRoot ServerName sandbox --or the name you want for your app example > AllowOverride all Then you need to define sandbox as alias of your localhost in /etc/ ho

Re: blog tutorial problem

2007-04-22 Thread aldo.nievas
Sixs, There is a mistake on Blog Tutorial index.thtml page (page 11 of blog tutorial part). It should be link('Add Post', '/posts/add/');?> instead of Add Post Hope this helps. Regards. Aldo. On Apr 16, 11:42 pm, "SIXS" <[EMAIL PROTECTED]> wrote: > I copied the code and got the first page to run

Re: Properly working with custom inflections (so that bake.php works too)

2007-04-22 Thread fhcake
Hi, I had the same problem (Cake v1.2.0.4798alpha) with bake.php and irregular inflections in german :) I solved it somehow - and with your table "artikel_categorie" it should work as follows: --- $uninflectedPlural = array(); $irregu

Re: association with mysql View

2007-04-22 Thread the_woodsman
It might be helpful if you include all the SQL being executed by Cake, and how you have defined the relationship... On Apr 21, 11:59 pm, sumanpaul <[EMAIL PROTECTED]> wrote: > Ok the situation is bit complicated (to me atleast :P) > I will try my best to explain . > > 1. I am using cake 1.2 > >

Trying to Validate Password field

2007-04-22 Thread Peter
I'm creating a user registration area and I am having difficulty doing custom validation on the Password input field. I have the following code in my controller: __ /* Custom Password Validation */ if (empty ($this->data['User']['password'])) { $this->User->inv

Re: Routing and FindAll();

2007-04-22 Thread gerbenzomp
Cool! That will save me a lot of code rewriting ;) Thanks for the reply, Mariano! I'm going to try it out! On 22 apr, 18:58, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Sure, write sitename on your AppController::beforeFilter() to the Configure > instance: > > Configure::write('site', 'siten

RE: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread Mariano Iglesias
IMO, regarding your comment on how to display negative numbers, or how to display any number for that matter, is the sole responsibility of the view. The Model should be independent of how data is to be displayed. What if the View renders the model as a PDF document? What if the view renders it

Re: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread nate
One of the classic MVC debates relates to the display of negative numbers which, in typical accounting applications are displayed in red. But which tier is responsible for deciding that? There are good arguments on both sides (especially when you consider desktop applications), and no one right

RE: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread Mariano Iglesias
Just because you have the rm command in Linux doesn't mean that you should use rm -Rf / without thinking what you are doing. Why do you say you need to change two places?? All you have to do is set it in the view, you *DON'T* have to set it in the model. "Validation error msg is not truly view t

RE: Routing and FindAll();

2007-04-22 Thread Mariano Iglesias
Sure, write sitename on your AppController::beforeFilter() to the Configure instance: Configure::write('site', 'sitename'); Then on AppModel::beforeFind() you can add a condition to set the sitename: function beforeFind($queryData) { if ($this->hasField('sitename') && !in_array('sitenam

RE: integration with other software

2007-04-22 Thread Mariano Iglesias
Drake (Drupal integration) should be: http://dev.sypad.com/projects/drake -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog:

Routing and FindAll();

2007-04-22 Thread gerbenzomp
I want different users to be able to use my whole system, and I want them to have their own sitename before the controller and action, like this: www.domain.com/sitename/controller/action/ With help from people on the forum, I've discovered I can best use this approach in routes.php: $Route->co

Bulletin board system and cakePHP

2007-04-22 Thread [EMAIL PROTECTED]
Hello bakers, I am looking for some bulletin board system to integrate into my website built on cakePHP. I have tried punbb, but it is very hard to make it work in my system. I am using three-column design and I need the side columns to remain under control of cakePHP and the mail central area und

Re: integration with other software

2007-04-22 Thread gerbenzomp
Here's some links: Wordpress: http://www.webdevkungfu.com/accessing-wordpress-with-cakephp/ ... there was another good wordpress/cake integration article, but I can't find the link right now... Joomla: http://dev.sypad.com/projects/jake/ Drupal: http://www.thinkingphp.org/2006/01/25/drake-drupa

Re: hasMany's order question

2007-04-22 Thread gerbenzomp
As far as I can see, you just forgot to set the order clause in categoriescontroller: Change: 'Blog.created DESC' to 'order' => 'Blog.created DESC' It must have been a slip of the keys, because in the BlogsController you've done it the right way. Gerben. On 21 apr, 15:20, matlin <[EMAIL PROTE

Re: I cant get my js file work?where to put js files?

2007-04-22 Thread gerbenzomp
You should put your js files in the js folder in webroot, so: app/webroot/js/myscript.js And then call it like: link('myscript'); ?> On 21 apr, 16:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > where to put js files? and how to refence it? --~--~-~--~~~---~-

Re: SWFupload

2007-04-22 Thread gerbenzomp
I suppose you followed the instructions in http://bakery.cakephp.org/articles/view/swfupload-and-multipurpose-uploader ? Make sure you've created an upload folder in the files folder in webroot: that is where the files get uploaded. So check there to see if it works. Also, play around with the se

foreign key

2007-04-22 Thread Eli
I have a problem with foreign key. I have two tables, autors and books, is a relation N:N, but this I have other table autors_books. I don´t know to do relationship. Would you help me? In "autor.php" I have array('className' => 'Book'

Diese Seite anzeigen: " Cake Apps/Sites In The Wild"

2007-04-22 Thread fiorentino
edelight, a social shopping community for products you like, gifts and wishes - revenue sharing is included - is powered by cake Klicken Sie auf http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild. Falls dies nicht funktioniert, kopieren Sie den Link und fügen ihn in die Adr

integration with other software

2007-04-22 Thread laptop
hi there, has anyone completed an integration with other software like wordpress or vbulletin?? I would like the same layout template to be used which I could do relatively easy, my main problem is that there is a little welcome box in the top right which uses my User model... any help would be a

SWFupload

2007-04-22 Thread Enchy
Hi I need some help with SWFupload for cakephp. Installed it here http://capeseo.com/admin/ The bottom form is a normal straightforward uploader. When you upload something with that it works and you can see results. The top one is the fancy flash uploader but it pretends to be working but when I

Re: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread Dr. Tarique Sani
May be at sometime in future CakePHP will have to move to a Validator interface Something like class modelNameValidator implements Validator in which the programmer will have to write the validate method and it is this Validator interface, which both Model and View have access, will contain the E

Re: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread [EMAIL PROTECTED]
as you said,why there is a way to make msg in model? and if I wanna change the validation and relate validation msg ,I think I should make changes in one place instead of two places. and in my opinion ,the validation error msg is not truly view thing.it is more close to model than to view On 4月2

RE: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread Mariano Iglesias
Models dictate business logic in regards to data, which means information such as how to fetch data, save it, or validate it. Views on the other hand dictate how that data is presented to user, which amongst other things indicate how to present data that is not validating model's business rules.

Re: when in 2.0xx using paginate,how to specific the paging conf?

2007-04-22 Thread [EMAIL PROTECTED]
anyone can help me ? On 4月21日, 下午11时21分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > like 5 items a page ,somethin like that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this g

Re: where to change or add 'This field cannot be left blank' such validate msg?

2007-04-22 Thread [EMAIL PROTECTED]
thx for both dericknwq and Mariano Iglesias. and I think dericknwq 's way is better for my consideration cause the msg living with the rule makes more sense. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake