PHP to force the linke to be relative to the base
url 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/
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 ch
odels-together.html#ref-habtm-arrays
Keith Gorman
Class Outfit
www.classoutfit.com
On 11 Oct 2012, at 08:15, Jeremy Burns | Class Outfit
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.
nder('/elements/flash/error', 'ajax');
} else {
$this->set('message', 'The location for ' .
$['']['name'] . ' has been updated');
d it I discovered that the beforeSave() 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 bac
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 inp
Million thanks for the solution :) will keep it up to learn it and
just newly join this group.
On Jan 23, 12:40 am, "J." wrote:
> Sorry, it's home.ctp
>
> On 22 jan, 17:39, "J." wrote:
>
>
>
>
>
>
>
> > Create index.ctp in pages
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.
An
Another option would be to use "»" 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.class
itionalParams = '-f ab...@example.com';
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...@gma
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] =>
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 (ca
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 ha
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 jus
I think Alfredo probably meant wrap just the nocache tags, like this:
check('Message.flash')) $session->flash(); ?>
- Keith
--~--~-~--~~~---~--~~
You received this message because you are subscrib
complexity 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"
wrote:
> Hi Sridhar,
>
> Of course you can use CakePHP to build a
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:
gs_to 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 &
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 Wes
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:1
st entry 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`.`
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
up data that
way 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 interpre
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 th
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
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 do
4 Oct, 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(
> 'Departmen
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',
ithout resorting to
writing a bunch of extraneous methods for something any 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
;onChange()" 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
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 lik
tions conflicts.
He addresses the answer 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 (
7;t like with Joel's implementation.
>
> I know, but, can you tell me in what language they are easy to write
> and look pretty? Post an example please.
>
> Regards,
> - Dardo Sordi.
>
>
>
> > Other than that I agree with what Keith has written.
>
> &g
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 supp
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 p
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
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...
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 we
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 httpd.c
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 n
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 seen fit to contribute is with scattered, one-off
> tutorials at various levels of currency, completeness and accuracy.
I agree with Nate here. I put
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,
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 t
top-section if I want. Things like that.
>
> You can do the same with Acl stuff.
>
> if ( isset($this->Acl) )
> {
> $this->set('aclData', $this->Acl->someDataYouNeedOnEveryPage );
>
> }
>
> On Jan 23, 9:02 pm, Keith <[EMAIL PROTECTED]> wro
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 in
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?
, 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.cakep
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 m
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
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 example.
50 matches
Mail list logo