Hi all,
Is there a way to tell Cake that any model A belongsTo model B OR
model C, but NOT to B and C at the same time? (consider an Address
which can only belong to a Person or an Organization).
Regards,
Martin
--
Martin Schapendonk, [EMAIL PROTECTED]
--~--~-~--~~~
I agree broken down by
server and hosts
Sam D
On 10/4/06, John Zimmerman <[EMAIL PROTECTED]> wrote:
> On 10/4/06, Samuel DeVore <[EMAIL PROTECTED]> wrote:
> >
> > As a public notice, Mac OS X is usually configured the same way out of the
> box
> >
> > Sam D
> >
>
> This would explain some of the
On 10/4/06, Samuel DeVore <[EMAIL PROTECTED]> wrote:
As a public notice, Mac OS X is usually configured the same way out of the boxSam DThis would explain some of the problems OS X users have been posting with mod_rewrite not working.
I think we need to start a mod_rewrite FAQ section in the Cake M
As a public notice, Mac OS X is usually configured the same way out of the box
Sam D
On 10/4/06, John Zimmerman <[EMAIL PROTECTED]> wrote:
> On 9/29/06, John Zimmerman <[EMAIL PROTECTED]> wrote:
> > Does anyone have mod_rewrite working properly under Debian Etch Testing?
> >
>
> I fixed the pro
I have a table called Groups which is associated on a "one to many"
with another table called Users. Is there an efficient way of deleting
records in the Users table that are link to the one record being
deleted in the Groups table? I couldn't find a
model->delete('condition') in the API. I think
Thanks guys for all your response and suggestions.
John, now that you mentioned it, I tend to agree with you that it's
best to follow the convention, keeping a clean solution. At the same I
wanted to know how it could be done. And thanks for showing me. It
gives me a better understanding on speci
Great. I'm not sure how I missed this while reading the
documentation, but it helps me organize things. Thanks a lot
John.
-MI
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of John ZimmermanSent: Thursday, October 05, 2006
1:50 AMTo: cake-php@googlegroups.comSubj
http://manual.cakephp.org/chapter/configuration
Checkout section 4 regarding admin routes. I believe that information
can help you solve your problem. No extra coding needed.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On 9/29/06, John Zimmerman <[EMAIL PROTECTED]> wrote:
Does anyone have mod_rewrite working properly under Debian Etch Testing?
I fixed the problem the other day if anyone is interested.
In debian the default virtual host is configured with "AllowOverride
None", which means my .htaccess files were
File: models/user.php
class User extends AppModel
{
var $name = 'User';
var $validate = array(
'login' => '/[a-z0-9\_\-]{3,}$/i',
);
}
File: controllers/users_controller.php
class UsersController extends AppController
{
var $name = 'Users';
assuming that the permissions on the folder are permissive enough :)
On 10/4/06, nate <[EMAIL PROTECTED]> wrote:
>
> They are recreated automatically if they do not exist.
>
> --
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you
--~--~-~--~~
They are recreated automatically if they do not exist.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group,
hi,
Thanks..now its working
Regards,
Ritesh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send ema
I was using mysql as database up to now and had no problem.
The problem is that now I have to move to postgresql and cakephp
doesn't seem to cooperate.
I changed the settings in database.php
and I get
Your database configuration file is present.
Cake is able to connect to the database.
in the m
I make it a part of the request path and go from there
On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I plan on having many observeFields in a form, but I don't want to code
> a function for each one. I would rather just have one function that
> responds to all the obervers. But w
Actually now I am using postgres whereas before I was using mysql.
The problem I get is
Warning: pg_query(): Query failed: ERROR: Namespace
"information_schema" does not exist . in
/home/mgovadmin/cake/libs/model/dbo/dbo_postgres.php on line 111
What more do I have to do in postgres than mysql so
I plan on having many observeFields in a form, but I don't want to code
a function for each one. I would rather just have one function that
responds to all the obervers. But within the function, I need to know
which form field was the caller. Is there any way to do this? I know
you can pass a
> 'conditions' => 'user_id = ' . {$this->othAuth->user('id')},
>
> Any suggestions
> Regards
add that in controler exp findAll($this->othAuth->user('id'));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP"
I deleted the contents of app/tmp/cache/models and I think that might
have been a mistake. How do I recreate the cache?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send e
Although I do not recommend doing what you want to do just because it is not a clean solution, the following will work to render a view in the users controller from the groups view directory (notice all lower case, and the dots to go to previous directory).
$this->render('../groups/view');
--~--~-
Is it posible to delete database rows whenever the session expires?
--
Nathan Garza
AshLeaf Media | Owner
_
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726
--~--~-~--~~~---~--~~
You received this
There could be a number of issues. Put the DEBUG to 2 in your
app/core.php and try again, it should give you details on the problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this
I believe the same, but I think Asbjørn made it clear on the blog post
he linked why he was storing files on the DB.
Asbjørn, I see on your code that you have:
// app/controllers/files_controller.php
class FilesController extends AppController
{
function add()
{
if (!empty($this-
Hi Sonic and freedom
Thanks for the feedback. The Cake community has given me so much over
the last year, I am glad to be able to give something back.
I will be having a look into the DB dumping today (probably using
mysqldump and the exec function in the build file). I will keep you posted.
Holy delayed-reaction-double-post Batman!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email t
I believe this is what you're looking for:
http://www.ifisgeek.com/tutorials/show/implementing_single_table_inheritance_in_cakephp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this gr
I had trouble with native cakephp because php needs a non free library
so i used phpadodb with odbtp driver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake
Hey Neves - try looking under 'Elements' at
http://manual.cakephp.org/chapter/views
On 10/4/06, Neves <[EMAIL PROTECTED]> wrote:
> Example: I have the main layout with header/footer and a top menu.
> When I acces a link like /services, a menu appears on the side that
> shows all services.
> Whe
How can I handle nasted layouts?
Example: I have the main layout with header/footer and a top menu.
When I acces a link like /services, a menu appears on the side that
shows all services.
When I click a service like /services/web the web page will be inserted
inside the layout /services that will
My layout that is the header/menu/footer/rightSide has many logic, with
database access, etc.
Where goes the layout logic?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, sen
Indeed - the key point is that I want some users to have access to
different levels of users.
I think the key point to my question is - is it valid to use the same
database (with some selection criteria) in different models?
It feels as if it is a valid thing to do, and I can't see if it would
c
Yes - looked at that; but given that I only want an admin to be able to
manage its own users, I would be creating groups and permissions all
over the place; which would only be used once.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
A better bet is to store the files in the local filesystem, and save
pointers to the files in a database. It's supposed to be quite a bit
faster as well.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" g
I dunno what you're running, but I use no such library. I am
connecting from a Mac-based dev server to a PC (obviously)-based copy
of SQL Server 2000 with no issues, but there were some odd
configuration changes I had to make on the dev server side.
You have to read thru the user notes on the ms
I'm having an odd issue with Cake. I've extracted all the files on my
server and am getting the following error.
Fatal error: Cannot redeclare cache() in
/home/peter/public_html/cake/cake/basics.php on line 807
I tried searching to see if anyone else had experienced the same
problem, but couldn'
guys, it was a pain to get mssql_connect to work.
on windows it needed a special dll that I wasn't able to find anywhere,
so I finished up to use one provided by a colleague.
now I had to move this little customized-scaffolded baby on a suse
server.. I've read about freetds, but I'm not sure.. a
Hi
guys,
First of all, I'm
very excited to start with CakePHP. I'm in the process of building a large web
application, and have been evaluating different PHP frameworks. I ended up with
Cake PHP and Symfony. Eventhough Symfony it's a very attracting framework,
there's something about Cake
I had trouble with native cakephp because php needs a non free library
so i used phpadodb with odbtp driver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake
>>
>> riddle me this:
>> A. How does an Audioscrobbler / Last.fm component meet the 80/20
>> rule?
>
> My legal counsel has advised me not to comment on the grounds that it
> may expose me as someone thinking up a project so they could learn a
> framework.
hehe.
>
>> B. How could said componen
milicic.marko wrote:
> I need to validte my model in that way to forbide inserting two posts
> with same Title.
> OK. This is not an REGEX type of validation so I suppose I must use
> some callback function.
> I used beforeSave() CB function and returned false if I detect that
> post with that ti
maudite wrote:
> Hi there have seen a few posts in regards to binding db views to cake
> models and was wondering if this is going to be addressed in the core
> in future releases. I am using cake 1.1.8 and have implemented the
> code change listed in:
> http://groups.google.ca/group/cake-php/br
On 10/4/06, gwoo <[EMAIL PROTECTED]> wrote:
>
> riddle me this:
> A. How does an Audioscrobbler / Last.fm component meet the 80/20 rule?
My legal counsel has advised me not to comment on the grounds that it
may expose me as someone thinking up a project so they could learn a
framework.
> B. How
$this->params["styre"] should of course be $this->params["admin"] (or
whichever admin route prefix you use).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cak
Write something to the session, then check it in
AppController::beforeFilter.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsub
Help me please.
My images get's corrupted when I download them from my database. Data
type is longblob. And the add function uses addslashes.
http://cakebaker.wordpress.com/2006/04/15/file-upload-with-cakephp/
Best regards.
Asbjørn Morell
--~--~-~--~~~---~--~~
Y
$this->params["styre"] should of course be $this->params["admin"] (or
whichever admin route prefix you use).
On Oct 4, 9:52 pm, "twinkletoes" <[EMAIL PROTECTED]> wrote:
> Thanks for a pointer in the right direction, nate :)
>
> I got error messages when trying your solution, but they were fixed
>
ahhh i knew there must be a better way.
thanks gwoo.
On 05/10/06, gwoo <[EMAIL PROTECTED]> wrote:
>
> you could also create you own tags.ini.php and drop it in /app/config
> and that will override the cake core file.
>
> >
>
--~--~-~--~~~---~--~~
You received thi
Thanks for a pointer in the right direction, nate :)
I got error messages when trying your solution, but they were fixed
easily by doing a few additions:
public function beforeFilter ()
{
if (isset($this->params["styre"]))
{
$this->Security->requireLogin(
you could also create you own tags.ini.php and drop it in /app/config
and that will override the cake core file.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email t
How about moving the content to an element file (in the views/elements
folder) and then create a view for each controller that contains 'echo
$this->renderElement('elementName');'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
hear hear.
i've printed out your setup notes and am going to make it the weekend
project to attempt to emulate.
thanks heaps for sharing!
cheers,
freedom
On 05/10/06, Sonic Baker <[EMAIL PROTECTED]> wrote:
> Hi Langdon,
>
> Just wanted to say thanks for sharing this with us. I've been looking
morning mate,
i'm pretty sure you can access the HTML the HtmlHelper uses in the
following file:
/cake/config/tags.ini.php
actually, looking at it, tagErrorMsg is one of the only functions that
doesn't refer to this file at all.
in the HtmlHelper:
/cake/libs/views/helpers/html.php
you can se
Troy Schmidt wrote:
> You will call a function that will then run an AJAX call, get the
> result, and manipulate it. Based on the result you will create
> childNodes no innerHTML or replacing. Actual DOM methods. It is
> probably programming level advanced, which is below expert. Personally
>
I just confirmed that since upgraded to latest 1.1.8 it now has the
same problem regardless of PHP version or my development environments.
So, I am most certain it is a bug and have submitted to trac. Thanks.
--~--~-~--~~~---~--~~
You received this message becaus
You will call a function that will then run an AJAX call, get the
result, and manipulate it. Based on the result you will create
childNodes no innerHTML or replacing. Actual DOM methods. It is
probably programming level advanced, which is below expert. Personally
I would recommend using jQuery
riddle me this:
A. How does an Audioscrobbler / Last.fm component meet the 80/20 rule?
B. How could said component possibly be more fun than a jQuery helper?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PH
First of all, $data is a local variable, so it won't change anything
in invalidFields().
Second, even if you modify $this->data, it will not be used in invalidFields().
In the code below, after first if (empty($data)), there is passed data
or copy of $this->data.
Then at if (!empty($data)), $data
I'm just taking a guess at this, but you might be able to achieve this
with scaffolds.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
Hi All,
This is not cake-specific, though I will be building it into a
cake-based site. I have an "order form", that I want to "AJAXIFY" (?)...
The first part, fetching the customer info from the tables when they
type in their email address, is working fine. But I'm kinda stumped on
exactly
Is there a way to share a view between different controllers? I want to
avoid creating the same/similar view for each controller. So I created
a view under one controller, and would like to be able to use that from
another.
For example, I'm in the Users Controller and want to call a view from
the
Hi AD7six,Thanks for the link. I like your idea although I'm not sure if this would apply to my situation. Selenium calls the actual application in a Frame of it's own so no matter what URL I type into the address bar, it won't be passed to the application.
If I were to use your method, I'd have to
You could try adapting something like this:
http://www.noswad.me.uk/MiBlog/SwitchConstants
Cheers,
AD7six
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake
Hi Nate,I actually want to be able to have the database change last for multilple http requests, and then reset it back to the default after a variable series of events.To clarify, I want to be able to use a test database for my Selenium tests. In order to do this I'm trying to make a Selenium cont
Hi Langdon,Just wanted to say thanks for sharing this with us. I've been looking for the ideal setup and it's great to hear how and why others are using their chosen programs.Please keep us informed about how you get on with your database dumping and transferring.
Cheers,Sonic
--~--~-~--~-
What do you mean by ping my application? I deleted the contents of
app/tmp/cache/models and I think that might have been a mistake. How do
I recreate the cache?
nate wrote:
> If you ping your application once with DEBUG set to 1 (in
> app/config/core.php), all the production-mode caches will be c
Probably the native MS SQL driver.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAI
This change will last for the duration of the HTTP request (i.e. it
will work across requestAction calls). And yes, just reconnect it to
the existing database when done.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
I am working on a similar system (a shopping cart with different levels
of access). I made a single table with user information but also an
additional field for 'access level.' In the beginning of each
controller that returns access level specific data, you can check the
currently logged in user's
Hi,
Does anyone has a pointer to ajax->editor tutorial. I searched group,
cakephp website, irc, bakery and, finally, google, but nothing. There
is ajax tutorial on tada list. But its way to complicated for my
purpose. Please let me know if you any page that explains how to
implement ajax->editor.
That's pretty much how it works. Then the ownership data would be
accessible as $user_items[n]["Ownership"].
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to ca
What's showing in the wiki is really all there is to it. You set the
theme name in the controller, and all images, JavaScript and CSS are
automatically loaded from that subdirectory in webroot. (Btw, this
feature has been implemented for some time now, the wiki page is old.)
--~--~-~--
Hi all,
I'm running into a minor problem with cake. I use the
$html->tagErrorMsg function to show error messages in user input. This
function prints a with class error_message. It seems like this
output is hardcoded into the HTML helper.
The problem is this: I want to mark errorous fields with a
I have tried the default configuration of files in my home and it works
fine.
I just use the .tar.gz and place my files in folder app.
For example I have a table admins i create the appropriate
model,controller
and view. And then I access it through /something/cake/admins.
I uploaded to another s
hi guys,
at this time is better to use adodb or mssql native cakephp class for
sql server?
thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@goo
Maybe this is already passed on the list, but if so I mess it. I use
this regular expression to validate amounts in my application.
define("VALID_AMOUNT","/^(-?[0-9]+)(\.[0-9]{2})?$/");
Allows numbers, with optional 2 decimal digits and may be also a
negative number.
If someone would like it,
Good morning.
Cake 1.1.8.3544, php 4.4.0 and apache 2.0.54 (Win32).
I've always used this steps for trimming the posted data, but actually
it doesn't seems to work anymore.
In the app/app_model.php I've added this function
function beforeValidate(){
parent::beforeValidate();
//t
copy cake/app_controller.php to app/app_controller.php, edit it and add
the line
var $helpers=array('Html','Javascript')
Then $html and $javascript will be available to all controllers
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
77 matches
Mail list logo