CakePHP design tips?

2009-10-25 Thread Ixus
Hi everyone. What are your CakePHP design (architectural) tips? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Multiple Field Validation Help (notEmpty)

2009-10-25 Thread Dave
Hi everyone, All help is greatly appreciated. I am having trouble with my form validation, basically the notEmpty rule is working perfectly with my username field, but not the password field. Here is my validation array var $validate = array( 'username' = array(

Re: Multiple Field Validation Help (notEmpty)

2009-10-25 Thread David Roda
Ok, of course right after I posted this I had a bit of enlightenment: basically I am pretty sure this is occuring because Cake Automagically hashes the password field when it is being submitted. As you can see I handle this in my comparePassword method. I am guessing that the blank value is

Re: CakePHP design tips?

2009-10-25 Thread WebbedIT
Follow the MVC conventions as detailed in the book. http://book.cakephp.org/view/13/Basic-Principles-of-CakePHP On 25 Oct, 06:34, Ixus asumaw...@gmail.com wrote: Hi everyone. What are your CakePHP design (architectural) tips? --~--~-~--~~~---~--~~ You received

Re: saving habtm relationship overwriting my data

2009-10-25 Thread WebbedIT
Neither of the above controller calls can be affecting the HABTM data as you are just using save() which will not attempt to save/update associated data. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group.

Re: Multiple Field Validation Help (notEmpty)

2009-10-25 Thread David Roda
Thanks for the response paul while I will be definitley using some of your code to further improve mine, my main issue was that notEmpty was not working for the password field because Auth automagically hashes it. I have no problem with comparing the two hashed passwords. I will try with your

Re: Save data of two models different in thye same time.

2009-10-25 Thread WebbedIT
Are you sure a link would HABTM episodes (sounds more like a hasMany)? If so, you need to read the following book page: http://book.cakephp.org/view/85/Saving-Related-Model-Data-HABTM It's all about getting the field names right which then forms $this- data in the correct manner, once you've

Re: HABTM problem...

2009-10-25 Thread WebbedIT
Try using contain and doing a $result = $this-Playlist-find('first', array( 'conditions'=array('Playlist.id'=$id), 'contain'=array('Song'=array('Artist','Album')) )); Then do an echo debug($result); to see what it's fetched and how the array is structured.

Re: RSS feed with filters

2009-10-25 Thread WebbedIT
No RSS specialists within the group? would be great if someone could lnd a hand or point me elsewhere. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Good SVN Deployment Plan for CakePHP

2009-10-25 Thread David Roda
What do you need to modify in the bootstrap.php? On Sun, Oct 25, 2009 at 5:03 AM, Jon Bennett jmbenn...@gmail.com wrote: Hi Jeremy, Can anyone point me to a good solid SVN deployment howto for CakePHP and a live app? Something along the lines of how simple WordpPress explains it

Automagic Form Elements---Column Type

2009-10-25 Thread king
my Message model includes fields for a auther (varchar). I use the input() method of the FormHelper to create appropriate inputs for all of these form fields. ?php echo $form-create(); ? ?php echo $form-input('auther'); ... ? ?php echo $form-end('Add'); ? But

How to enable the right click for a single page out of the whole website?

2009-10-25 Thread TechMan
Hi all...its been few moments I just joined this group and I require a small help if possible from my fellow members of this group... Here is what I require- I am working for a website which was developed previously by somebody else using the Cake and the whole site is right click disabled and

Re: Automagic Form Elements---Column Type

2009-10-25 Thread Kyo
You can force the type of an input by specifying a type. echo $form-input('auther', array('type' = 'textarea')); hth Kyo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: HABTM problem...

2009-10-25 Thread jayarjo
I beware of using contain, 'cause I don't understand how it works yet. I know that at least some times it runs multiple queries to achieve it's goal. Thanks for the tip though. After fighting with that thing for some time I did some unbind/bind models. And got the result with single query at

Re: Good SVN Deployment Plan for CakePHP

2009-10-25 Thread Jon Bennett
Hi David, What do you need to modify in the bootstrap.php? I modify things like debug level, turn caching on. Here's what I put in the other thread: * webroot/index.php - to optionally change the location of the cake libs, http://pastie.org/667873 * config/bootstrap.php - to override core

Re: How to enable the right click for a single page out of the whole website?

2009-10-25 Thread Kyo
I guess It's not a cake question. Maybe your site is using a JavaScript code to disable right click. hth, Kyo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: CakePHP design tips?

2009-10-25 Thread Ixus
How about some tips for the intermediate-advanced CakePHP developer? On Oct 25, 3:33 pm, WebbedIT p...@webbedit.co.uk wrote: Follow the MVC conventions as detailed in the book. http://book.cakephp.org/view/13/Basic-Principles-of-CakePHP On 25 Oct, 06:34, Ixus asumaw...@gmail.com wrote:

Re: CakePHP design tips?

2009-10-25 Thread David Roda
Ixus, I'm not sure if this is exactly what you are looking for, but as I've gone through the steps of learning CakePHP, there are definitely some topics that are pretty much required for most projects but are rarely understood completely. For example are you completely familiar with the theory

How to pass custom urls to pagination methods

2009-10-25 Thread BeerMan
Hey all, I was looking through the paginator API to figure out how to add custom parameters to the url. for example the page number link, has a link such as places/lists/page: 2. I also need to send the paramenter cat_id:2 or some other number. I think i should use the url option in pagination

Errors on nginx + php-fpm, no errors on apache

2009-10-25 Thread Balrog
Hello Bakers, I have a quite weird problem. Wasted several hours on this already. I am migrating from apache 2.2 + mod_php to a nginx + php_fpm. Generally, application is working fine under both of them (they now point to the same rootdir, however i can fire apache or nginx by selecting port

Re: Paginator helper in Cake 1.3

2009-10-25 Thread dijichi
I have exactly the same problem, with mootools. Anyone got this working? On Oct 22, 10:13 pm, jacmoe jac...@mail.dk wrote: I tried Mootools, jQuery and Prototype - no luck. :) Prototype and Mootools seems to be ignored by Cake.. 'Js' = array('Prototype') or 'Js' = array('Mootools') I only

crooggo

2009-10-25 Thread cherif_Gsoul
use croogo is like drupal writing upon CakePHP is great the great fearture is the ability to create your own content type. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Uninitialized string offset notice

2009-10-25 Thread ChrisOrton
I get the exact same issue, and am curious if anyone has an answer, I'm guessing configuration I'd be grateful for any pointers Chris On Sep 29, 5:02 pm, borcho boris.nenc...@gmail.com wrote: My cakephp applications works fine on my local server. On my web server, I get the following

Manipulate the options of a form field by runtime???

2009-10-25 Thread DigitalDude
Hey, I got a simple but important question which is buggin me for days now... Simple example: echo $form-input('Model.field', array( 'label' = __('Label', true) )); This is the usual way, it's simple, it's nice and it works. What I need is a chance to manipulate this array of options by

Re: Save data of two models different in thye same time.

2009-10-25 Thread Mateusz Kaczanowski
You just to use foreach loop forach($this-data as $k=$v){ $this-Link-create(); $this-Link-save($v['Link;]); } something like this 2009/10/24 AmaReLow lucas@gmail.com How to save data of two models different in thye same time? Example: I have a model called Episode and another Link and

Re: Good SVN Deployment Plan for CakePHP

2009-10-25 Thread Richard
Hey, I have a CakePHP shell that does various things, though it integrates with Git. The script checks out, applies database migrations (using Ruckusing), and runs CakePHP unit tests. It does some other stuff, like backup databases before the migrations are applied too. This code is part of a

Re: Paginator helper in Cake 1.3

2009-10-25 Thread jacmoe
Check Marks blog: http://mark-story.com/posts/view/creating-simple-ajax-pagination-with-cakephp-1-3-and-mootools I tried it, but no luck yet. CakePhp 1.3 seems to be more picky about this than 1.2. Will bake a fresh app and make it work, and then try and backtrack my own project.. :) On Oct 25,

Re: CakePHP design tips?

2009-10-25 Thread jacmoe
I am still working on making my controllers thin and my models fat. No logic in my views, nothing but logic in my controller and all the rest in my model. I am not there yet, as I am still pretty new to MVC design, but I think it's a good design goal. On Oct 25, 7:34 am, Ixus asumaw...@gmail.com

Re: How to pass custom urls to pagination methods

2009-10-25 Thread BeerMan
Just to be clear on my problem, for example if the next link has url=../places/list/page:2 then I need to change the url to = ../places/list/page:2/cat_id:3. thank you again, -Armen On Oct 25, 11:33 am, BeerMan garej...@gmail.com wrote: Hey all, I was looking through the paginator API to

Custom route stop working without trailing '/'

2009-10-25 Thread Jesh
Just setup a custom route for users controller as below: Router::connect('/admin',array('controller' = 'admins', 'action' = 'dashboard', 'admin')); The cakphp router will work property if i enter the url as '/admin/' or '/member/'. But if without the trailing '/', the cakephp is looking for

Re: How to pass custom urls to pagination methods

2009-10-25 Thread BeerMan
Oh problem solved. nevermind. thx anyways.. On Oct 25, 3:01 pm, BeerMan garej...@gmail.com wrote: Just to be clear on my problem, for example if the next link has url=../places/list/page:2 then I need to change the url to = ../places/list/page:2/cat_id:3. thank you again, -Armen On Oct

Re: saving habtm relationship overwriting my data

2009-10-25 Thread mike
I'm certain that this line is overwriting the data in the ethnicities_seekingprofiles: $this-User-Seekingprofile-save($this-data); when I comment it out, the table has the right data. On Oct 25, 3:37 am, WebbedIT p...@webbedit.co.uk wrote: Neither of the above controller calls can be

Auto view

2009-10-25 Thread kangur91
Hi guys!. I want to do automatic view redirect. For example for all actions like add,delete layout will be layout1(not default) someone knows how to do that? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

How to cakeamfphp help needed

2009-10-25 Thread www.landed.at
http://blog.madarco.net/32/simple-cakeamfphp-how-to/ I think I have installed things correctly but I'm unsure how to proceed. The link above gives a controller script, is this instead of writing a service which is what you have to do in the regular amfphp ? I think this should be obvious to

cake amf plugin help

2009-10-25 Thread www.landed.at
https://trac.cakefoundation.org/amf/wiki From the above link I'm trying to understand what is meant by this line in the configuration * add Amf.Amf to var components in AppController, /app/ app_controller.php thanks --~--~-~--~~~---~--~~ You received this

Re: cake amf plugin help

2009-10-25 Thread www.landed.at
ok I might have solved that line with creating the file as it didnt exist with the following content. class AppController extends Controller { var $components = array('Amf.Amf'); } --~--~-~--~~~---~--~~ You received this message because you are

Re: cake amf plugin help

2009-10-25 Thread www.landed.at
now in the flex side of things the actual connect line for this tutorial is needing to be different here is the tutorial this refers to https://trac.cakefoundation.org/amf/wiki/tutorial/amf and the as code that is the service needs to be what??? nc.connect('http://localhost/cake_amf/'); -

Re: Auto view

2009-10-25 Thread O.J. Tibi
Hi, The AppController's beforeRender() callback would be the place to do that, so make sure you have a custom AppController ready. lets say: function beforeRender() { if (in_array($this-action, array('add', 'delete'))) { $this-layout = 'layout1'; } parent::beforeRender(); }

Re: Dynamic Selection of Database config based on Debug level

2009-10-25 Thread Dr. Loboto
Wrong parent call: function __construct($id = false, $table = null, $ds = null) { if($_SERVER['HTTP_HOST'] == 'xxx' || $_SERVER ['HTTP_HOST'] == 'www.xxx'){ $this-useDbConfig='production'; }

Re: Model name issues with Upload Behavior

2009-10-25 Thread Dr. Loboto
I think Meio just didn't know about it. On Oct 24, 4:04 pm, Jon Bennett jmbenn...@gmail.com wrote: Of course, have behavior that can work with multiple models is better. which is how cakephp behaviours usually work. Settings are stored with the model-alias, seems odd that Meio isn't coded

Re: $ajax-ObserveForm issue - it only appears to work once...

2009-10-25 Thread Dr. Loboto
If you replace form content simpler use ObserveField. Or maybe re- observe form on each reload. Check yourself. On Oct 24, 2:59 pm, Gaioshin wmyche...@gmail.com wrote: OK - I guess that's why when I used ObserveField, it was ok? I mean I had used ObserveField individually for the dropdowns

Re: cakephp not working, please help

2009-10-25 Thread Dr. Loboto
AllowOverride controls the use of .htaccess files, so NO, you cannot set it there. Contact your hosting provider. On Oct 25, 11:58 am, 浪漫様 rohmand...@gmail.com wrote: thanks. i have no access to Apache's httpd.conf there is any way to write the AllowOverride All in the .htaccess or something

Re: RSS feed with filters

2009-10-25 Thread Dr. Loboto
RSS is not recognized because you have PHP errors in it. They breaks XML. ampersand was an issue is not true. Instead of that strange manual operations over URL use standard GET params as before or named params. On Oct 25, 2:53 pm, WebbedIT p...@webbedit.co.uk wrote: No RSS specialists within

Re: cakephp not working, please help

2009-10-25 Thread David Roda
Alternatively you can just uncomment the line in core.php to disable the pretty urls. This makes the url's look like http://yoursite/app_dir/index.php/controller/action On Mon, Oct 26, 2009 at 12:14 AM, Dr. Loboto drlob...@gmail.com wrote: AllowOverride controls the use of .htaccess files, so

Re: cakephp not working, please help

2009-10-25 Thread 浪漫様
unfortunatelly, the hosting provider staff are just a bunch of morons that don't even know what a subdomain is [ amazing ] and don't provide SSH accounts neither [ because i can change configurations in the whole system... also amazing ]. my client is a university organization so they just