Start by familiarizing yourself with CakePHP conventions for MVC and
databases. Then compare the existing database to those conventions and
work your way from there. Build toy projects to develop your
understanding before you start migrating the larger, more complex
site.
Use the API and manual
On Jul 10, 3:19 am, b logica [EMAIL PROTECTED] wrote:
If the blank option is not selected, how, then, is the blank
displayed? Or, do you just mean that, while a blank option is
included in the select list, it's not selected?
Also, are you 100% certain that that field in that particular row
OOPS! I sorted it out! the problem was I had array('empty' = '')
(ie. empty string) instead of TRUE
soz my bad, Im new to Cake (that's my excuse anyhoo...)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
thanks, i'll try that.
On 8 Lug, 18:28, mbavio [EMAIL PROTECTED] wrote:
This topic has to have at least 100 threads in this group. I wonder
why dont you just search before starting a new one. It would be faster
for you, and better for the quality of the group...
Anyway, I´m going to answer
Hi,
Searched for a similar post but none seem to mention my problem.
The ACO is as follows:
[1] Users
[2] dashboard
I have granted the group 'employees' permission to [2] directly. I
have granted the group 'admin' permission to [1]. Since the the admin
group is parent of employees both
I use CakePHP 1.2 and I want to create an ajax-based form that submits
to a different controller.
Say I have a Users controller and a Projects controller.
Inside one of the views of my Users controller, I want to create a
form that submits to one of the actions of the Projects controller, so
I
Hello Cake-World,
i red allready the threats about this discussion but nothing helped
for me...
My Problem:
I got an AJAX-Link on my Page. It's placed in a table which is in an
AJAX-Form. The Link works fine. BUT if i submit the form and the page
reloaded by the form, the AJAX-Link is dead. On
Any one please just tell me why this happens ?
My table name is directories
My controller - directories_controller.php
class DirectoriesController extends AppController
{
var $name = 'Directories';
var $scaffold;
}
my model - directory.php
class Directory extends Appmodel
{
var
Hi
I had converted my application into cakephp 1 to cakephp 1.2, in
cakephp 1 i can get the controller object and calling function like
this calling $this-controller-H2Auth-getPracticeName(), now here
in cakephp 1.2 when i do this i get the message Undefined property:
View::$controller
$this-params['controller'] should be able to get the name of the controller
for you :-P
Hope that's what your looking for!
Good luck!
In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)
On Thu, Jul 10, 2008 at 05:57, babar [EMAIL PROTECTED] wrote:
Hi
Hi guys,
I'm having some issues with the controller tests and working with my
controllers which return xml data.
My controller path is something like:
http://example.com/controller/returnXML/sample.xml
The controller's returnXML function will render a view with full XML
data in it.
In our
I assume you're expecting edit to correspond to the update field? I
was fairly certain Cake would interpret edit as an equivalent for
update, but try changing the ACO call from /users/edit to /users/
update and see if that works.
- James
On Jul 10, 5:12 am, Mattijs [EMAIL PROTECTED] wrote:
Hi,
Actually, I've just double checked the API and I don't even know if
it'll accept a CRUD value as part of the ARO object. the check
function expects an ARO, an ACO and an action (*, add, update, edit,
delete, etc) as a separate parameter. You might want to try that as
well.
- James
On Jul 10,
I agree with James to a large extent.
I have been pleasantly surprised at how well CakePHP applications
scale and how easy it has been to fix bottlenecks when they have
appeared. You can very easily make quick alterations and re-factor
code when everything is structured well.
Some anecdotal
Did you get an answer? Or do you have a solution?
If so, could you post it?
I'm having the same problem.
Jos
On 19 mei, 13:26, David Christopher Zentgraf [EMAIL PROTECTED] wrote:
Sorry for being a bit short there. :-)
I think I get this kind of array when using finderQueries.
Cake seems to
If that's a direct copy paste you have a space in your Model name:
class Directory extends Appmodel
{
var $name= 'Directory ';
var $primaryKey = 'directory_id';
}
O=O var $name= 'Directory[SPACE]';
--~--~-~--~~~---~--~~
You received this
On 7/10/08, babar [EMAIL PROTECTED] wrote:
I had converted my application into cakephp 1 to cakephp 1.2, in
cakephp 1 i can get the controller object and calling function like
this calling $this-controller-H2Auth-getPracticeName(), now here
in cakephp 1.2 when i do this i get the
http://bin.cakephp.org/saved/33005
On Wed, Jul 9, 2008 at 2:25 AM, AD7six [EMAIL PROTECTED] wrote:
On Jun 5, 8:25 pm, Adam Friedman [EMAIL PROTECTED] wrote:
Hi folks
I was trying to get Simplepie component working (http://
bakery.cakephp.org/articles/view/simplepie-cakephp-component),
And its AppModel instead of Appmodel
On Thu, Jul 10, 2008 at 9:37 AM, Jonathan Snook
[EMAIL PROTECTED] wrote:
If that's a direct copy paste you have a space in your Model name:
class Directory extends Appmodel
{
var $name= 'Directory ';
var $primaryKey = 'directory_id';
}
What is your opinion about www.bestplanetsneakers.com?
bestplanetsneakers is a legit online shopping store providing
authentic items for men and women. bestplanetsneakers.com is retailer
of designer footwear servicing Canada,USA,U.K. and others.
http://www.bestplanetsneakers.com offers FREE
Fixtures are used to make database tables. If you are planning on
using database sessions this will work well. However, as to making a
Session Object. I'm not sure what you are trying to accomplish, if
you need examples of testing Session Classes in Cake, there are many
core tests for each of
That's excellent. Who's code is this originally? David's? I'd like to
add that to the Book.
On 7/10/08, Dardo Sordi Bogado [EMAIL PROTECTED] wrote:
http://bin.cakephp.org/saved/33005
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I finally figured it out or at least one way of doing it.
Step 1 - Unbind the HABTM with the Associate model
Step 2 - Save User model data
Step 3 - bind HABTM with Associate model
Step 4 - save data['User']['id'] = getLastInsertID - for the
automagic to happen!!!
Step 5 - Save Associate data
I saw it in this group for the first time, thread:
http://groups.google.com/group/cake-php/browse_thread/thread/67666750b8b1486e/3fc76910087d7ea2
I think is David's.
On Thu, Jul 10, 2008 at 10:35 AM, Jonathan Snook
[EMAIL PROTECTED] wrote:
That's excellent. Who's code is this originally?
Right, which I did, and it fixed the problem, but the main WTF was
that the errors spit out by cake bake gave no inclination of the
issues I was really having.
Not until I really dug into the errors and the problem did I realize
that I had created a class called File (which seemed perfectly fine
You might indeed be right about this example (/users/edit/) so I tried
to access /users/anotheraction/ and got the exact same results. So far
I have been testing with my change of the code (replacing OR with AND)
and the results I get so far seem to be correct;
The function check is succesfully
On Jul 10, 3:46 pm, benjam [EMAIL PROTECTED] wrote:
Right, which I did, and it fixed the problem, but the main WTF was
that the errors spit out by cake bake gave no inclination of the
issues I was really having.
Not until I really dug into the errors and the problem did I realize
that I
I have a Persona (Person) model, which has fields nombres,
apellidos and razon_social (names, surnames and company_name). I
wanted to create good-looking select lists that showed the
company_name or (if it was not set) surnames, names. I then created a
virtual field nombre_completo (full_name)
Hi everyone,
I have a problem using my existing MSSQL DB. I get the following
error:
SQL Error: Unicode data in a Unicode-only collation or ntext data
cannot be sent to clients using DB-Library (such as ISQL) or ODBC
version 3.7 or earlier. [CORE\cake\libs\model\datasources
\dbo_source.php, line
On Jul 9, 5:03 pm, Sir Tabs [EMAIL PROTECTED] wrote:
Thanks for the help Mark. Answered my questions, and I'm that much
closer to figuring out what I'm after.
I guess as a follow-up, I'm curious about using $this-render(). I'm
playing around with an $ajax-form(), and I just want to take the
Hello,
I'm newie, I've a problem (and a solution) for use localization in
variable $validate in models.
I'll ilustrate the problem with an example, I want to make something
like this:
code
var $validate = array
(
status = array
(
Another model and controller work fine with the following:
$this-set('personas', $this-Email-Persona-generateList(null, null,
null, {n}.Persona.idpersona, {n}.Persona.nombre_completo));
As far as I understood the docs, the list should be generated
automatically with the id and displayField,
Your actions need to be added to the ARO trees in the database if they
don't correspond to a default CRUD value (and like I just said, I
don't think that even works since there's a separate action field).
Try adding your actions to the database?
- James
On Jul 10, 9:53 am, Mattijs [EMAIL
On Jul 10, 4:05 pm, Adriano Varoli Piazza [EMAIL PROTECTED] wrote:
Another model and controller work fine with the following:
$this-set('personas', $this-Email-Persona-generateList(null, null,
null, {n}.Persona.idpersona, {n}.Persona.nombre_completo));
As far as I understood the docs, the
table names are the plural of the model name by convention (by which I
mean you can change it)
Admittedly, I've often wondered why models don't use the naming
convention like all other objects: ExampleModel extends AppModel. It'd
help with namespacing. (Of course, by now, it's probably too
Could some one please help me setup my home page.
i have a static page to be set as homepage with some hyperlinks.
i am new to php aswell as cakephp.
where should i place the home.ctp file,
then should i have a controller to that.
--~--~-~--~~~---~--~~
You
Hi Emilio!
I'll ilustrate the problem with an example, I want to make something
like this:
code
var $validate = array
(
status = array
(
rule = numeric,
rule = array (range, -1, 101),
If you trace the net traffic with firebug, does the server answer with
the correct javascript? and does the browser include the javascript
next to the anchor?. I'm experiencing some similar situation.
Pere.
On Jul 10, 11:59 am, Ben [EMAIL PROTECTED] wrote:
Hello Cake-World,
i red allready
home.ctp goes in views/pages/
no you don't need a controller for static pages unless your overiding it
(which I'd say your not [at this stage anyway])
- S
2008/7/10 [EMAIL PROTECTED] [EMAIL PROTECTED]:
Could some one please help me setup my home page.
i have a static page to be set as
Hi,
I've been wanting to include some extra functionality in a model but
wanted to know the best CakePHP way of going about things.
For example we've got controllers and components, then views and
helpers.
I want my model to behave as normal but say use something like a
helper to process the
Something like this should work just fine:
$html-meta('rss', '/articles.rss', array('title' = 'Latest Articles
Feed'));
On Jul 9, 9:47 pm, Siebren Bakker [EMAIL PROTECTED] wrote:
Firefox has a nice feature where if the author of a site adds the
appropriate linking to the head of their
On Wed, Jul 9, 2008 at 10:04 PM, Siebren Bakker
[EMAIL PROTECTED] wrote:
on a side note: @Chris, the reason why I wanted to see if there was a way to
do it through cake, is two fold: 1) it's a fair bit less text to put into
the code file, making the file itself shorter, and 2) I am still a
You can always provide a base class other than AppModel that contains
the extra methods you need for text processing.
class TextModel extends AppModel {
function textProcessing(){...}
}
class Article extends TextModel
{
function save(...){
$this-textProcessing(...);
...
The problem is, when i put html codes in the $html-textarea
fields, it actually outputs the html codes, how can i stop it from
outputting the actual html and only show the html codes in plain text?
Are you trying to enter HTML values into the value attribute for the
textarea? Or is your
If you trace the net traffic with firebug, does the server answer with
the correct javascript? and does the browser include the javascript
next to the anchor?. I'm experiencing some similar situation.
Hello Pere.
Firebug doesn't even want to response anything in net traffic by
clicking the
Thanks for the reply Reggie :)
That's cleared things up for me, think I'll take your approach as it
makes perfect and simple sense to me.
Noticed this blog entry by CakeBaker about a similar issue but I'm
more than happy to use the extra classes as a solution ;)
1) create files:
/app/views/pages/home.ctp
/app/views/pages/mystaticpage.ctp
2) open file /app/config/routes.php, which route any specific url to
corresponding page. Edit following codes:
Router::connect('/', array('controller' = 'pages', 'action' =
'display',
1) create files:
/app/views/pages/home.ctp
/app/views/pages/mystaticpage.ctp
2) open file /app/config/routes.php, which route any specific url to
corresponding page. Edit following codes:
/*** this is for http://localhost/app/ ***/
Router::connect('/', array('controller' =
The official word from the CakePHP team is that CakePHP does not
support ntext fields. You're stuck using the text casting hack. I'm
using MS SQL myself, and have had to use it, unfortunately.
I'm using 1.2 RC2 and have successfully gotten that same hack to work
- you have to change it a bit to
I'm not sure if this is the correct solution but it worked for me.
just put ../projects/add/ instead of /projects/add
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email
As expected by Pere it was a similar situation.
The mainpage was reloaded by an AJAX.Updater. This one was the reason
for the problem. After adding the option 'evalScripts : true'
everything works fine.
Thanks for all activated brain waves at all!
Ben
P.S.: If someone got this problem and
Hi Mark,
thanks for the reply.
I should probably correct my first post, I'm actually just using
cookies not sessions.
What I'm trying to test is pretty much this functionality in one of my
controllers:
?php
class SomeController extends AppController {
var components = array('Cookie');
Now I think I have the feel for the process: each action that is
called attempts, through automagic, to render the screen with it's
particular view file. If I use Ajax to call the particular action, and
use the 'update' option and specify a DOM item, then the action will
render it's view code
You could use beforeSave
On Jul 10, 9:30 am, CrazyDave [EMAIL PROTECTED] wrote:
Hi,
I've been wanting to include some extra functionality in a model but
wanted to know the best CakePHP way of going about things.
For example we've got controllers and components, then views and
helpers.
I
Hi all
I have a vendor class I've put in \root\vendors\phpbb.php
Which contains the class:
class PHPBB_Login {
}
And am referencing it in my code with the following:
App::import(Vendor, PHPBB_Login, array(file=phpbb.php));
(which I think is right)
But when I try an instance the class with:
@Allessandro, that would not work, you can't initialize model variable
with a function call.
@Emilio, I did post a ticket on this a while ago with a solution (as
you described), it has been introduced and removed after (probably
because it does not cover all needs etc..). I end up writing the
On Jul 10, 5:58 pm, CrazyDave [EMAIL PROTECTED] wrote:
Thanks for the reply Reggie :)
That's cleared things up for me, think I'll take your approach as it
makes perfect and simple sense to me.
Noticed this blog entry by CakeBaker about a similar issue but I'm
more than happy to use the
btw: if you're doing what I think you're doing, I'd love to see the
final result. To get login working for a PHPBB integration, I ended up
just using curl to do a post request and then pass the session cookies
onto the end user. A little hackish but it worked.
On 7/10/08, RichardAtHome [EMAIL
I'm trying to figure out how to build a query with a condition that
effects the other Model in a HABTM relationship.
To clarify:
Let's say we have to models: Model1 and Model2 which are defined as
follows
var $hasAndBelongsToMany = array(
'Model2' =
Hello everyone. I am new to the CakePHP discussion group, and also to
PHP. I want to start my own blog, but I dont want to use a system
such as WordPress. I feel this is a good way to introduce myself to
PHP, CMS, etc.
I've been reading various sites, and from what I see most have me
I pasted my code here (only the interesting points):
http://bin.cakephp.org/view/2137985698
if someone could say me what I'm doing wrong, please...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
Well, since this is a CakePHP discussion group . . you could try this
one http://book.cakephp.org/view/219/blog
On Jul 10, 2:22 pm, ToxicInflux [EMAIL PROTECTED] wrote:
Hello everyone. I am new to the CakePHP discussion group, and also to
PHP. I want to start my own blog, but I dont want to
try
App::import(Vendor, PHPBB_Login, false, null, 'phpbb.php');
On Thu, Jul 10, 2008 at 1:21 PM, RichardAtHome [EMAIL PROTECTED] wrote:
Hi all
I have a vendor class I've put in \root\vendors\phpbb.php
Which contains the class:
class PHPBB_Login {
}
And am referencing it in my code
Maybe you could use the router:: url with the true parameter,
ie:
new Ajax.Updater('usersprojects', router::url('/users/projects/add'
true),
Did not try, but seems it could be clean ..
hth
On Jul 10, 6:36 pm, Kyle Decot [EMAIL PROTECTED] wrote:
I'm not sure if this is the correct solution
Oh, PS - I modified the hack so that it only runs when it recognizes
an XML type from SQL 2005. If you change my
$fieldDescription[$fields[$i]]['type'] == 'xml' to
$fieldDescription[$fields[$i]]['type'] == 'text', it should work for
ntext fields in general.
- James
On Jul 10, 12:34 pm, James K
I was going to suggest this as well. The beforeSave function fires
before save/validation and you can access $this-data and modify it as
you see fit. As long as you return true, the script will continue none
the wiser.
- James
On Jul 10, 1:20 pm, Joe [EMAIL PROTECTED] wrote:
You could use
Hi,
When I use hasAndBelongsToMany, but my join table had other attibutes,
how I save this fields?
For example:
customers (id)
products (id)
-- customers_products(id, customer_id, product_id, quantity,
total_price) --
When I save a customer I want save relational products too, with
quantity
Somebody knows how to add support to extensions on lighttpd, maybe its
the rewrite rule, but everytime i try to parse any extension like
a .js or .rss i get a 404.
Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Do you use mod_magnet + cleanurl-v6.lua to rewrite on lighttpd?
If not save http://bin.cakephp.org/view/181101 in a file and add
mod_magnet to your server.modules list in lighttpd.conf
And add
magnet.attract-physical-path-to = ( %s ) to your vhost / lighttpd.conf
where %s is the
Thanks, my question is, how can i stop the script from out putting the
html code when its inserted through the comments box?
It appears that you are using a JavaScript comment form preview
script, which unfortunately I can't help you with—and if it *is* a
JavaScript issue it's probably not a
Hello,
There seems to be an error with CakePHP 1.2 RC1 and RC2 when trying to
redirect pages. I have a simple $this-redirect(/users/login);
Firefox complains with the following:
The page isn't redirecting properly - Firefox has detected that the
server is redirecting the request for this
Jonathan: In that sense, print stylesheets aren't much of a priority for most
projects. This depends heavily on user
expectations and type of project.
In my experience using CakePHP I've always created my own stylesheets,
and thus have never noticed the lack of default print styles. I'd
I'm still getting used to cakePHP and the MVC, and I had a question
about good practices when updating an element on a page with an Ajax
action.
Currently I have $ajax-observeField() watching the fields of my form,
checking to see that the information the user types in is valid. The
data is
wow,
i got the same problem,
and that surprise because app
was fine...
any news about this problem?
thks!
On Jul 8, 11:00 pm, haj [EMAIL PROTECTED] wrote:
Hi,
Using 1.2 and I'm doing a simple model saving page then $this-
redirect(), I get the header error telling:
Warning (2): Cannot
i re-create all structure and works fine,
maybe its something wih end of file or encoding of file,
or windows :S
any other news i post here
see ya!
On Jul 10, 11:28 pm, lucaspirola [EMAIL PROTECTED] wrote:
wow,
i got the same problem,
and that surprise because app
was fine...
any news
On Fri, Jul 11, 2008 at 12:12 AM, Jonathan Snook [EMAIL PROTECTED]
wrote:
btw: if you're doing what I think you're doing, I'd love to see the
final result. To get login working for a PHPBB integration, I ended up
just using curl to do a post request and then pass the session cookies
onto the
Thanks for your reply.
It doesn't look like end of file for I usually make return code etc
visible on my editor but I should check again anyways. Yes, I'm
running it on the XP, and basically all files are UTF-8...
If anything I'm missing people could think of, I'd appreciate any
input.
On Jul
77 matches
Mail list logo