Plugin adding to link url

2015-03-27 Thread Keith Mountifield
irrespective of what the plugin (this or any other) addes to the URL without simply putting the '/customers' path into the link, which seems bad practice to me. Thanks in advance. Keith -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP

Passing / in a url parameter with rawurlencode gets 404

2014-06-03 Thread Keith Power
I have a folder outside of webroot with important images. I am using $this-response-file in my controller successfully when I just pass in the file name. However I need to pass in part of the path as it is made up of id's. I know I can not pass / as it is so I use rawurlencode() which does

Re: HABTM Join Table Entries Disappearing

2012-10-11 Thread Keith Gorman | Class Outfit
-habtm-arrays Keith Gorman Class Outfit www.classoutfit.com On 11 Oct 2012, at 08:15, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: By default, Cake clears down the entire habtm table (for the current association) and adds back in just those that are in the current saved dataset

Re: Google Map interface question

2012-04-30 Thread Keith Gorman | Class Outfit
'); $this-render('/elements/flash/success', 'ajax'); } } } Like I said, I know this isn't exactly what you're after, but hopefully it will be of some use to you. Keith Gorman Class Outfit keithgor...@classoutfit.com www.classoutfit.com

Re: Media PLugin

2012-02-29 Thread Keith Gorman | Class Outfit
() in the Media Coupler was firing before the beforeSave() in our Users model, so it was too late to add the empty 'file' key to the array as the 'User' had already been unset by the Coupler. I've therefore had to roll the change back and go back to the drawing board for now. Keith Gorman Class Outfit

Apache mod_rewrite and AppController issues

2012-02-07 Thread Keith A
I am having two problems, but they could be related. I am just setting up cakephp 2.0 on a hostmonster isp account. The helpful config page that cake defaults to shows everything is OK except Apache mod_rewrite's 'pretty URLs' that are set up in .htaccess. The site happily accepts them as

How to Change Pre-Defined Index Page

2012-01-22 Thread Keith Yeoh
Hi there, I have been go through the research on how to change the pre-defined index page. The pre-defined index page means when you enter (http://localhost/ abc123) the Cake PHP configuration page will appear. But instead of the configuration page, I would like to have my own designed page.

Re: How to Change Pre-Defined Index Page

2012-01-22 Thread Keith Yeoh
. On 22 jan, 16:20, Keith Yeoh ysho...@gmail.com wrote: Hi there, I have been go through the research on how to change the pre-defined index page. The pre-defined index page means when you enter (http://localhost/ abc123) the Cake PHP configuration page will appear.  But instead

Re: UTF-8 and the » character

2011-06-06 Thread Keith Gorman | Class Outfit
Another option would be to use raquo; in your view file instead, as that is the correct entity name for the Right Angle Quotation character » Check out http://www.entitycode.com/#common-content for more info. Keith Gorman Class Outfit keithgor...@classoutfit.com www.classoutfit.com On 6 Jun

Re: Does $this-Email-return really works?

2011-05-21 Thread Keith Gorman | Class Outfit
'; Keith Gorman Class Outfit keithgor...@classoutfit.com http://ww.classoutfit.com On 21 May 2011, at 05:51, Louie Miranda wrote: I forgot to mention that I am using CakePHP 1.2.6 and 1.2.7. -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Fri, May

File Upload Validation

2009-09-17 Thread keith
I would just like to start by saying this is my first project using CakePHP and my second attempt at using a MVC (I just read a book on the asp.net mvc framework) framework so please bear with me. I am having a problem validating a file upload. I have a very simple project setup with 2 models

Re: File Upload Validation

2009-09-17 Thread keith
After I submit the add meda file form without selecting a file I am printing out $this-data, I end up with the following result: Array ( [MediaFile] = Array ( [uploaded_file] = Array ( [name] = [type] =

Re: Big Websites In cakePHP ?

2009-06-26 Thread Keith
I've not found MVC frameworks to scale well regardless of the one you pick. Knowing how many records you've got isn't all that helpful either because it's how you interact with them that affects performance. CakePHP is as good as any MVC out there though if you're set on using one. As others

File Upload Tutorial

2009-06-25 Thread Keith
NOTE: This is easily the most popular post from my blog, but I think it's time to just set this sucker free. If someone wants to post it to the Cake site for posterity you have my permission. I cribbed part of the process from someone else, and I hope someone will find it useful past me. I

RE: cake:nocache and uncached views

2009-02-16 Thread Keith Norris Gmail
I think Alfredo probably meant wrap just the nocache tags, like this: div id=content !-- cake:nocache -- ?php if ($session-check('Message.flash')) $session-flash(); ? !-- /cake:nocache -- ?= $content_for_layout ? /div - Keith

Re: How well I can use CakePHP for building static site ?

2009-01-12 Thread Keith
into your processes. CakePHP is a great tool, but it's not the answer for everything necessarily so just keep that mind as you move forward. - Keith On Jan 12, 10:48 am, dr. Hannibal Lecter lecter...@gmail.com wrote: Hi Sridhar, Of course you can use CakePHP to build a static site. Search

Re: HABTM Belongs_To Together?

2008-10-11 Thread Keith
and not a HABTM as well. Unless I can figure something out I'm going to go ahead and just report it to cakePHP as a bug because there are legit reasons, like the one I'm building, where you'd want a habtm with a belongs_to in the same model. - Keith On Oct 11, 8:14 am, villas [EMAIL PROTECTED] wrote: Hi

Re: HABTM Belongs_To Together?

2008-10-11 Thread Keith
So then... Does that mean that my problem is that I need to make my user_id in the projects table something like owner_id so that it won't get grouped in with the traditional habtm relationship that already exists with the user model? Thanks for the assistance. - Keith On Oct 11, 9:17 pm

Re: Reserved words

2008-10-10 Thread Keith
According to this ticket: https://trac.cakephp.org/ticket/1318 The reserved words are in the following lists - http://api.cakephp.org/annotated.html http://us3.php.net/reserved - Keith On Oct 10, 3:15 pm, Antônio Marco [EMAIL PROTECTED] wrote: Hi, there! Is Plot a CakePHP reserved word

HABTM Belongs_To Together?

2008-10-10 Thread Keith
I am running into a strange issue when I've got the following model structure: User: Has_Many: Projects HABTM: Projects Projects: Belongs_To: User HABTM: Users So...everything works fine. When I create a new project and select multiple users they are indeed associated with the project as is

Re: HABTM Belongs_To Together?

2008-10-10 Thread Keith
it is in the related users table. Any ideas? Or can you think of anything specifically I should check on outside of running the queries directly in SQL which I've done and they return the correct data. I think the problem is in the view or how the users array is being interpreted possibly. - Keith On Oct

Re: Controller/Model Question

2008-10-10 Thread Keith
You don't necessarily need another controller. You can use that field to determine which element to display on the page that way you could just create a number of different elements and load the one you need dynamically based upon which post_type in the row you're editing. - Keith On Oct 10

Re: HABTM Belongs_To Together?

2008-10-10 Thread Keith
in the array and putting it there... K = Keith = First Name M = Medlin = Last Name etc. for each of the fields. So...I'm totally confused why the following code would produce that: SQL Query: SELECT `User`.`id`, `User`.`first_name`, `User`.`last_name`, `User`.`email`, `User`.`date_created`, `User

Re: HABTM Belongs_To Together?

2008-10-10 Thread Keith
looks like it's stemming from how cakePHP is handling the array... for the belongs_to the array keys are based on field names like [id] [first_name], etc. for the HABTM array the array keys are sequential as the related users foreach loop expects. - Keith On Oct 11, 1:18 am, Keith [EMAIL PROTECTED

Re: 500 Internal Server Error - GoDaddy

2008-10-10 Thread Keith
There are a ton of great hosting services out there. I have been on Westhost for about 5 years now and have loved working with them. I've got 3 clients on Westhost and they too have loved them. I had 2 clients train me on how to do their site updates and they have been working directly with

Non-Test Fixtures

2008-10-07 Thread Keith
Is there anyway to package a non-test fixture that can be executed by CakePHP 1.2? I know how to do it for fixtures in unit testing, but I thought it might be cool to use something like that to load some dummy data into my app. I'm sure there are a number of ways to tackle this issue. Anyone

Re: Multiple Display Field

2008-10-03 Thread Keith
application with users and and admin panel will likely need at some point. - Keith On Sep 24, 11:19 am, Kanten [EMAIL PROTECTED] wrote: Well that seems simpler, but I do like the thought of having this as a behavior. /Anders On Sep 24, 4:29 pm, teknoid [EMAIL PROTECTED] wrote: I'm

HABTM - SQL Error 1062 w/ 1.2 RC3

2008-10-03 Thread Keith
I have a situation where I have a user model a department model. MODEL - User.php var $hasAndBelongsToMany = array( 'Department' = array('className' = 'Department', 'joinTable' = 'departments_users',

Re: HABTM - SQL Error 1062 w/ 1.2 RC3

2008-10-03 Thread Keith
, 01:12, Keith [EMAIL PROTECTED] wrote: I have a situation where I have a user model a department model. MODEL - User.php         var $hasAndBelongsToMany = array(                         'Department' = array('className' = 'Department

Re: ajax form validation

2008-05-23 Thread Keith
() or something like that. There is a sfFormValidation plugin for Symfony that does this, so you might take a peek at it if you need any idea conceptually how it works. - Keith On May 22, 1:34 pm, Oli [EMAIL PROTECTED] wrote: hey, can someone explain me howto validate a form using ajax? submission works

Re: Is migrations support planned for Cake?

2008-05-20 Thread Keith
Well here's the deal... I played around with Schema a bit last night. I have only a few issues with it in practice: 1. It doesn't handle autoincrement correctly in the latest nightly build when you generate a schema from an existing table. 2. The downloadable 1.2 beta has major bugs in it

Re: Is migrations support planned for Cake?

2008-05-19 Thread Keith
please. Regards, - Dardo Sordi. Other than that I agree with what Keith has written. Cheers Tarique -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com

Re: Is migrations support planned for Cake?

2008-05-19 Thread Keith
in that post. You don't label the migration sequentially. You label it based on UTC timestamp as the race condition where 2 developers generate a migration at exactly the same moment is highly unlikely. Rails 2.1 is going that way (http:// railscasts.com/episodes/107). - Keith

Re: Is migrations support planned for Cake?

2008-05-18 Thread Keith
Dardo can you elaborate on why schemas are better than migrations in iterative development? Just to address some issues here: 1. Migrations as Patches - Migrations CAN be patches. Migrations are not patches though. For example, in Joel's system you can most certainly create a migration

Re: Bake on Leopard

2008-05-17 Thread Keith
http://keithmedlin.com/?p=26 This will walk you through setting up everything you need for a working first project in Leopard. On May 17, 10:02 pm, Kyle Decot [EMAIL PROTECTED] wrote: I was wondering if someone could explain or give me an example of how to use bake on Leopard. I have my

Re: Is migrations support planned for Cake?

2008-05-17 Thread Keith
http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/ On May 17, 5:17 pm, the_woodsman [EMAIL PROTECTED] wrote: Having written my first cake test case the other day, it got me thinking that the mechanisms for creating tables, fixtures etc, and tearing them down when finished...

Testing Frameworks

2008-05-17 Thread Keith
Has anyone played around with PHPSpec (http://www.phpspec.org/)? This work is the PHP version of the RSpec (http://rspec.info/) framework that is gaining support in the Ruby world. I think the concept behind the story driven testing framework is very useful because it provides a concise way to

Re: HABTM search entries help

2008-05-17 Thread Keith
Hi Oana, Can you post some code? What do you mean by extract? It sounds like you've got your HABTM working properly, but when you try to create a view that shows conversations for a specific user the join table rows associated with that user are deleted. Is this an accurate summary of your

Re: Mac OS developper setup

2008-02-05 Thread Keith
Hi Zeugme, I did a tutorial that'll get you up and running quickly if you're on Leopard. http://keithmedlin.com/?p=26 Here's what is included: - Installing MySQL - Configuring the built in Apache PHP to handle CakePHP - Installing CakePHP 1.2 - Configuring your first site in Apache's

Re: CakePHP guide

2008-02-04 Thread Keith
Zoe, Looks promising! This is an excellent idea. I've been trying to document some of this stuff over at my blog as well. I have 2 tutorials posted for 1.2 there that you're more than welcome to use to kick-start your work if you would like. http://www.keithmedlin.com/ Regards, Keith

Re: CakePHP guide

2008-02-04 Thread Keith
This is great. Thanks! On Feb 4, 8:41 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Feb 4, 2008, at 6:23 PM, Keith wrote: On Feb 4, 11:48 am, nate [EMAIL PROTECTED] wrote: John gets little to no help from outside contributors, and the only way the community has

Re: Version 1.2 mostly-ready or not?

2008-02-03 Thread Keith
I know I'm only using 1.2 at this point because it appears to be ready for production, even if it doesn't quite have that designation yet. On Feb 3, 1:29 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Feb 2, 2008 6:01 PM, Scott [EMAIL PROTECTED] wrote: I'm considering promoting the use of

Re: Accessing Acl from a Helper

2008-01-24 Thread Keith
) ) { $this-set('aclData', $this-Acl-someDataYouNeedOnEveryPage ); } On Jan 23, 9:02 pm, Keith [EMAIL PROTECTED] wrote: I'm trying to create a helper that checks the Acl and provides edit / delete links appropriately on my index action. I keep getting an error that Acl is an undefined

Accessing Acl from a Helper

2008-01-23 Thread Keith
I'm trying to create a helper that checks the Acl and provides edit / delete links appropriately on my index action. I keep getting an error that Acl is an undefined property in the helper. Does the Acl object only exist inside the controller? Anyone run into this issue and have a work around?

Re: 1.2 Installation Error

2008-01-23 Thread Keith
Hi Longint, 1. Open up app/config/core.php 2. Scroll down to Security.salt 3. Just change 1 character in the salt and you'll be all set! 4. Save the core.php file. Possible cause: You installed cakePHP 1.2 and just opened up the app folder and began working with everything you need right

Cake Baking 'blob' column type

2008-01-15 Thread Keith
I'm working through the IBM documentation and found that when they instruct to bake the view which contains a column type of blob in the model bake just ignores it. I can CERTAINLY understand why, and have no idea why you'd want blob over text or longtext for a description, but I just wanted to

Re: Stopping Contact Form Injection?

2008-01-15 Thread Keith
, but definitely will stop spammers. - Keith On Jan 15, 10:29 pm, squidliberty [EMAIL PROTECTED] wrote: I have reason to believe that my contact form is being used to send bulk spam via an injection exploit. I'm using the PHPMailer component outlined athttp://bakery.cakephp.org/articles/view/sending-email

Validation Question

2008-01-14 Thread Keith
In the manual I see a code snippet for custom validation in a case when the application needs to validate that a username doesn't already exist in the database. This validation is written inline in the controller. Shouldn't custom validation methods be handled on the model as well? For

Re: Moving to CakePHP

2008-01-14 Thread Keith
Cool. I'll be interested to read it because we choose Symfony, but Symfony 1.1 is looking like it's getting away from true MVC while CakePHP seems to be moving to embrace a more MVC-like architecture. Our developers have some experience with Symfony 1.0x already, and definitely with OOP with PHP