If you mean escaping to HTML entities, just override the automatic
value:
$form-input('nacionalitat', array('value' = html_entities($this-
data['User']['nacionalitat'])));
I don't think there's an escape function built into the form helper,
but I could be wrong.
On 27 May 2008, at 18:22,
Hi there,
I've been investigating the skinny-controller, fat-model concept
within the CakePHP framework and wondering what the general thoughts
are to using ACL components inside a model.
In my particular setup, when a record is created (let's call it Book)
the associated chapters that reside
Hi,
I'm curious to know, why cake doesn't use the native gettext functions
than implementing own functions in php?
And an other question: it can use both versions (mo and po files).
Usually the binary format should be faster, but as it is written in
php, maybe the text format is more efficient?
Indeed it is the good old forum classic. Newb (me) confused and
frustrated that i can't figure out how to have cake installed in a
subdirectory.
This is my dir structure:
--xampp
htdocs
--bromine (non cake stuff)
--wiki (non cake stuff)
--cakephp
app
cake
If you're trying to bring an old website into Cake, now is the time to
use 1.2 instead of the old 1.1. It'll be stable very soon now (I have
faith in the dev team), so you're best off sticking with the newest
and best.
To get the information out that you're looking for, try using (in
1.2):
$i =
On May 23, 8:04 am, gbk * [EMAIL PROTECTED] wrote:
Hi,
i would like to use a javascriptcallbackfunction in the ajaxpaginator. can i
define it somehow in the options array?
my goal is simple. i would like to call the following jquery code
after a new page has returned from the server:
Can I use TreeBehavior with CakePHP Ver. 1.1.19.x? Is it also possible
to sort the node data in alphabetical order while displaying the tree?
Thanks for the advice.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I need to do some complex queries with functions involved. I can call
them with the query (or execute) method of any model, but the result
gets splitted by cake in an array, and there it gets messed up,
because cake is trying to split the results in table names and column
names.
Example:
select
On May 28, 11:14 am, David C. Zentgraf [EMAIL PROTECTED] wrote:
On 28 May 2008, at 16:57, Ralle wrote:
I have not edited any off the .htaccess files.
Then you should.
http://groups.google.com/group/cake-php/search?hl=enq=rewritebasesc...
since he can access
On May 28, 12:30 pm, weckmann [EMAIL PROTECTED] wrote:
I need to do some complex queries with functions involved. I can call
them with the query (or execute) method of any model, but the result
gets splitted by cake in an array, and there it gets messed up,
because cake is trying to split
On May 28, 10:50 am, azlanms [EMAIL PROTECTED] wrote:
Can I use TreeBehavior with CakePHP Ver. 1.1.19.x?
No
Is it also possible to sort the node data in alphabetical order while
displaying the tree?
No - unless you use findAllThreaded.
but you can sort it on the db:
On 28 May 2008, at 16:57, Ralle wrote:
I have not edited any off the .htaccess files.
Then you should.
http://groups.google.com/group/cake-php/search?hl=enq=rewritebasescoring=d
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
OK here you are:
From my example above the returned array would look like:
[0]
[users]
[id] = 1234
[name] = Johnson
[my_custom_function(users]
[id] = somesamplevalue
[1].
So, obviously he thinks that my_custom_function(users is a tables
name because it is
Thought to share it here ...
Extended the html helper to so that I can use shortcut keys when
creating links in cakephp views.
Old way:
echo $html-link( 'Link Test', array( 'controller' =
'long_controller_name', 'actions' = 'index', 'plugin' =
'long_plugin_name' ) );
New way:
echo $xhtml-link(
When was the last time you ran some maintenance on your database? Run
some optimize queries, check for possible corruption or errors with
the check query, defrag the hard drive, maybe reboot the machine if
you haven't in several months.
If the performance has just dropped recently without any
heh, I did this too (c/a/p shortcuts) but I put them in
AppModel::url() instead. It works transparently then.
On May 28, 1:29 pm, jaro [EMAIL PROTECTED] wrote:
Thought to share it here ...
Extended the html helper to so that I can use shortcut keys when
creating links in cakephp views.
Old
Hi
I have a question.
I upgrade my applications from 1.1.13 to 1.2
I have noted that the same application in 1.2 is slower than the same
application on 1.1.13.
I use $this-Model-unbind and $this-Model-recursive=-1 in my
applications.
I have two query:
1) In Cake 1.2 for use $this-Model-unbind
I am attempting to create a login system using the Auth component.
when i log in, i get redirected to the users/dashboard page that i
have specified, but then i get redirected right back to the login page
with a You are not authorized to access that location. message. Any
ideas why this is
I think the best way is to checkout the cake dir from svn:
svn co https://svn.cakephp.org/repo/branches/1.2.x.x/cake cake
then you upgrade doing: svn up
And this is what I use for keeping in touch with the latest changes,
with any feed reader:
Hi everyone. Simple problem here. I'm trying to define some
constants in a plugin which can then be referenced from a
RequestAction call to the plugin in the main part of the app. Where
should I be defining these and how would I then reference them?
Thanks in advance for any help.
I haven't done exactly that, but you can attach your own Scripts to
almost anything in the YUI calendar, and probably use other parts of
the YUI library to make a popup form. Should be perfectly possible.
On 28 May 2008, at 19:58, Kyle Decot wrote:
Well I need to be able to insert data
I'm attempting to use this on my local machin(a mac) but when I put
the following code in, when i navigate to the page, it just dowloads a
plain text file instead of displaying the page? Any reasons why this
is happening? It is the same code that is in the bakery.
// Sets height and width
Hi,
I have just started playing with Cake and had some fights with
validation. Now I am at the point where I need to use hasMany on my
simple (or maybe complex) database. I am working on a web application
for articles submission and review. For now I have two models - User
and Paper with the
Chris:
You're the man! Thanks for the tip, that worked quite nicely.
--Mike
On May 27, 1:31 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
On Tue, May 27, 2008 at 1:51 PM, Mike [EMAIL PROTECTED] wrote:
Ok, I think I solved it. The proper value was being passed into the
function after all. The
I'm currently prototyping a catalog, and got stumped by the following.
Notice I'm running cake beta 1.2.0.6311 on php 5.2.5 and mysql 5.0.51a-
community-nt on XP.
The name of the tables are in Spanish, and I'd prefer not to touch
them if at all possible.
The models:
Persona.php
?php
class
On Tue, May 27, 2008 at 12:11 PM, bondo [EMAIL PROTECTED] wrote:
I'm having problems using the native email component using templates.
It only seems to send messages to certain email addresses. I'm not
sure if this is a Cake problem or a web host (hostmonster) problem.
For example, if I send
[1]
As you said, easy-peasy:
class User extends AppModel {
var $hasMany = array(
'Paper' = array('foreignKey' = 'author_id')
);
}
[2]
It's possible, but not recommended, to do it as you suggest:
class Paper extends AppModel {
var $belongsTo = array(
'Author' = array('className'
I wonder why in AppModel... Can you share the code? :)
On May 28, 9:17 pm, grigri [EMAIL PROTECTED] wrote:
heh, I did this too (c/a/p shortcuts) but I put them in
AppModel::url() instead. It works transparently then.
On May 28, 1:29 pm, jaro [EMAIL PROTECTED] wrote:
Thought to share it
contents of htdocs\cakephp\app\views\users\register.thtml:
form action=/users/register method=post
pPlease fill out the form below to register an account/p
labelUsername:/label
?php echo $html-inputTag('User/username', array('size' =
'40' )); ?
?php echo
When you set your debug configure level above 0 (which you have done
to be able to see the relevant SQL queires), the model caches are
refreshed. When in production mode (debug level of 0), the DESCRIBE
query results are cached.
You'll have to be more specific when saying 'is slower than the
Hi Rasmus
You need to use the $form-create() method to generate your form tag
(details depend on the Cake version you use, but it's all clearly
documented in the api). The generated tag will automatically add the
cake base before and this action to /cakephp/users/register...
Otherwise, the form
useing YUI I found a nice little pop that fills the field you add it
to. i adjust the coding alittle bit so that the years is also
changable:
in the view i have:
?php echo $javascript-link('calendar'); ?
?php echo $html-css('calendar'); ?
on the form input use:
'class' = 'calendarSelectDate'
Well, I uploaded the site to my servers and I still get the same
result. It just downloads a text file with the source code in it
instead of displaying the page. I ran the page through the W3C
validator and it comes back with 90 some errors, but if I take out the
code, it has zero errors. Does
Hmm, okay. Thanks :) I'll take a look at it.
But, i'd expect a normal form to send me to: localhost/cakephp/users/
register/users/register since the form is places at localhost/cakephp/
users/register...
On 28 Maj, 17:42, clemos [EMAIL PROTECTED] wrote:
Hi Rasmus
You need to use the
I've run into the same problem but never learned how to get around it.
I have one site that I very much want to re-write for Cake but it
relies on many custom functions in Postrgresql. I thought that I might
take a stab at it later this summer, using only Model::query(), but
I'm not sure it's
On May 28, 6:14 pm, Ralle [EMAIL PROTECTED] wrote:
Hmm, okay. Thanks :) I'll take a look at it.
But, i'd expect a normal form to send me to: localhost/cakephp/users/
register/users/register since the form is places at localhost/cakephp/
users/register...
You don't expect the form action to
I have change a bit of code but only not important (for example
loadModule with App::import('Model', .); , I have inserted the
RequestHandler )
I don't have instruments for mesaurement the execution of script.
But I can see clearly the the loading of the same page (a very simple
page) is
The scenario leveille brings up is the one I'm in. This is more of an
extranet than an intranet. The server is off-site, and is being
accessed by many people who all share the same IP.
My solution was this:
1: upon entry to user login form, check if user's IP is associated
with a threshold
I'm working with Cake right now, and I thought that ACL was my answer
to this question, but it seems that Cake's ACL (ACL in general, I
suppose) only deals with roles, etc:
It should be noted that ACL is *not* a system that is meant to
authenticate users. You should already have a way to store
With debug=2 the queries are exaclty equal except for the DESCRIBE
operation on the joinTable.
Perhaps it'is a my feeling.
Exist a instrument for evalute the time loading of a scripts?
Is it possible to use eAccelarator with Cake 1.2?
On 28 Mag, 18:43, [EMAIL PROTECTED]
[EMAIL PROTECTED]
On May 28, 2008, at 10:57 AM, 703designs wrote:
I'm working with Cake right now, and I thought that ACL was my answer
to this question, but it seems that Cake's ACL (ACL in general, I
suppose) only deals with roles, etc:
It should be noted that ACL is *not* a system that is meant to
I'm sorry, but duh. I wasn't leveling any criticism, and I'm well
aware that the two are separate.I must have made myself unclear. In
any case, I'll take a look at Chris' tutorial. It's a bit old, can I
expect it to work with recent nightlies?
On May 28, 1:13 pm, John David Anderson [EMAIL
On Wed, May 28, 2008 at 1:22 PM, 703designs [EMAIL PROTECTED] wrote:
I'm sorry, but duh. I wasn't leveling any criticism, and I'm well
aware that the two are separate.I must have made myself unclear. In
any case, I'll take a look at Chris' tutorial. It's a bit old, can I
expect it to work
On May 28, 12:58 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
With debug=2 the queries are exaclty equal except for the DESCRIBE
operation on the joinTable.
As I stated previously, when debug = 0 these queries are cached.
Perhaps it'is a my feeling.
Exist a instrument for evalute the time
You mention putting putting the auth component in app_controller.php.
From the manual, The AppController class can be defined in /app/
app_controller.php and it should contain methods that are shared
between all of your application’s controllers. It extends the
Controller class which is a
Have a look at the CakePHP AppController, it is in
cake/libs/controller/app_controller.php:
On Wed, May 28, 2008 at 2:44 PM, 703designs [EMAIL PROTECTED] wrote:
You mention putting putting the auth component in app_controller.php.
From the manual, The AppController class can be defined in
Hi Everyone:
Ok, I've really done my research in groups and on the Cake site, but I
need a little help. I'm installing my Cake application on another
server (not my local machine) and I'm having a bit of a problem
getting it to run correctly. I think I need to use an Apache alias,
but I'm not
Hi All.
While CakePHP provides an EXCELLENT framework for coding PHP apps.
When it comes to tools which help aid in the design phase of
application development, some of you might have adopted some
techniques to streamline the analysis and design phase.
For creating databases and CakePHP models,
I assumed it already had some methods and attributes. Good to know
that I can freely edit AppModel and AppController.
On May 28, 1:54 pm, Dardo Sordi Bogado [EMAIL PROTECTED] wrote:
Have a look at the CakePHP AppController, it is in
cake/libs/controller/app_controller.php:
On Wed, May 28,
I usually put this function in config/boostrap.php
http://bin.cakephp.org/view/405751361
On Wed, May 28, 2008 at 9:29 AM, jaro [EMAIL PROTECTED] wrote:
Thought to share it here ...
Extended the html helper to so that I can use shortcut keys when
creating links in cakephp views.
Old way:
what about Router::url() ?
-MI
On Wed, 2008-05-28 at 15:25 -0300, Dardo Sordi Bogado wrote:
I usually put this function in config/boostrap.php
http://bin.cakephp.org/view/405751361
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Hi,
I've been trying to get caching in cake to work, tried looking in the
manual but that chapter hasn't been written yet.
So, what I've done is enabled caching in core.php by uncommenting:
Configure::write('Cache.check', true);
And this is also in core.php
I assumed it already had some methods and attributes. Good to know
that I can freely edit AppModel and AppController.
Yes App(Model|Controller|Helper) are well defined points of extension,
cake is amazing.
On May 28, 1:54 pm, Dardo Sordi Bogado [EMAIL PROTECTED] wrote:
Have a look at the
I am attempting to implement obAuth into my application but i'm having
a problem with the password field. when I submit the form, I get:
Notice (8): Undefined index: password [APP/controllers/components/
ob_auth.php, line 37]
Code | Context
$data = array(
username = test
)
what about Router::url() ?
My function is just a comodity for me, I usually use it like this:
echo $form-create('Model', array( 'url' = url('ThingsController',
'crazyActionName')));
It's just a shorter form of array('controller' = 'ThingsController',
'action' = 'crazyActionName')
- Dardo
This is my first time playing around with cake, and I am using 1.2
beta.
I have three models (part, part_unit, part_unit_conversion) and one
controller (parts). The models are very simple, but I have defined
relationships in them...part belongsTo part_unit, part hasMany
part_unit_conversion.
I keep getting this error:
Fatal error: Call to undefined function NewADOConnection() in D:
\websites\MYDOMAIN\cake\libs\model\datasources\dbo\dbo_adodb.php on
line 113
Here is my connection in database.php (credentials masked):
var $default = array('driver' = 'adodb',
Chris' tutorials are definitely still relevant.
In case you haven't seen it yet, I have created a sample website with
downloadable source code,
which demonstrates the integration of Auth and ACL in a CakePHP
project:
http://aranworld.com/article/170/cakephp-acl-and-auth-sample-website
This
Hi Mike
You should first try to get some more info about what is going wrong,
for exemple by setting debug level to at least 1 in your
app/config/core.php... You'll get at least the error messages, and it
will probably help you to figure this out.
++
Clément
On Wed, May 28, 2008 at 7:34
Hi Crazy
On my app (1.2), caching generates files in a subdirectory /app/tmp/cache/views.
You may need to create it if it doesn't exist, and also make sure it
is writable, as well as the whole tmp directory I guess.
Hope it helps
Clément
On Wed, May 28, 2008 at 8:43 PM, Crazy [EMAIL
Hi gaeb
On Wed, May 28, 2008 at 8:17 PM, gaeb [EMAIL PROTECTED] wrote:
p.s. I am adding the uses line so I can get a list of acceptable
part_units so I can populate a select field on an add view. Should I
not be doing it this way?
A proper and simpler way to access the PartUnit model and
I have traced this down to the fact that $this-Part-read() returns
nothing when $uses is set.
On May 28, 2:17 pm, gaeb [EMAIL PROTECTED] wrote:
This is my first time playing around with cake, and I am using 1.2
beta.
I have three models (part, part_unit, part_unit_conversion) and one
Thanks! A
On May 26, 6:31 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote:
You can put anything you want in your ~/config/bootstrap.php it is
included automatically on each request.
What I usually do in my bootstrap is:
if (file_exists(CONFIGS.'bootstrap.projectname.php'))
correction to my last post...it returns 1, not nothing.
On May 28, 2:17 pm, gaeb [EMAIL PROTECTED] wrote:
This is my first time playing around with cake, and I am using 1.2
beta.
I have three models (part, part_unit, part_unit_conversion) and one
controller (parts). The models are very
Hi Clément:
Thanks for the response. Doing that does lead me to some additional
clues. I've gotten beyond the original problem. Now, I just have to
deal access denied errors when the app attempts to connect to the
mysql database.
I have the correct login name and password as well as database
Hey folks .. OP here ..
Curious if anyone has any insight on this problem that is still
plaguing my app! Any assistance would be MUCH appreciated.
John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
I made that folder and it makes a _php file in it, but other wize
nothing happends, did I miss something?
On 28 mei, 22:32, clemos [EMAIL PROTECTED] wrote:
Hi Crazy
On my app (1.2), caching generates files in a subdirectory
/app/tmp/cache/views.
You may need to create it if it doesn't
I've been struggling for a while to try to figure out a way to load a
component dynamically, that is, not having it in the $components array
but load it based on input.
I can load the component itself fine using a variety of methods
(App::import, etc), but no components within get *their*
On Wed, May 28, 2008 at 12:14 PM, Kyle Decot [EMAIL PROTECTED] wrote:
Well, I uploaded the site to my servers and I still get the same
result. It just downloads a text file with the source code in it
instead of displaying the page.
That'll happen if your webserver isn't configured properly
Get rid of the $uses line. It's incorrect usage.
On Wed, May 28, 2008 at 3:42 PM, gaeb [EMAIL PROTECTED] wrote:
correction to my last post...it returns 1, not nothing.
On May 28, 2:17 pm, gaeb [EMAIL PROTECTED] wrote:
This is my first time playing around with cake, and I am using 1.2
beta.
That's the cached index file, believe it or not. Try moving around to
different actions and you should see their cached versions show up as
well.
On Wed, May 28, 2008 at 5:56 PM, Crazy [EMAIL PROTECTED] wrote:
I made that folder and it makes a _php file in it, but other wize
nothing happends,
Hi Mike
Your database config is probably wrong.
The hostname is often localhost, but depending on your web hosting
it may be different.
If so, nobody here can help you about that, except your web hosting admin...
++
Clément
On Wed, May 28, 2008 at 10:42 PM, Mike [EMAIL PROTECTED] wrote:
Hi John
I'm not sure I understand fully your problem, but it seems weird to me
that Cake would rewrite the domain in your urls : routers, helpers,
redirects in Cake don't care about domains and subdomains...
Maybe you could give us a few more information about your auth method,
your upload
On May 28, 5:29 pm, John R [EMAIL PROTECTED] wrote:
Hey folks .. OP here ..
Curious if anyone has any insight on this problem that is still
plaguing my app! Any assistance would be MUCH appreciated.
John
Have you tried peeking at the session and seeing what (if any) address
is located at
I've got a sample of how I setup my auth component on my blog at:
http://php.abdullahsolutions.com/2008/03/using-proper-auth-component-in-cakephp.html
On Wed, May 28, 2008 at 10:10 PM, Dardo Sordi Bogado [EMAIL PROTECTED]
wrote:
It depends on how you setup the auth component.
On Wed, May 28,
hi,
Your solution is the very workable, and I have implemented it
successfully, unfortunately due to certain requirement it cannot be
redirect.
so my only solution, I went to the cake lib folder found the session
helper class, and reimplemented the write method, I know this is bad,
but really
cakephp is great great great framework!
compare to symfony, it is more easy to develop, product, and install!
i personally like it very much~~~
but when the 1.2 stable is release?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Wed, May 28, 2008 at 10:05 PM, kknd [EMAIL PROTECTED] wrote:
but when the 1.2 stable is release?
When it's ready.
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard
I randomly get the following error:
Warning: realpath() [function.realpath]: open_basedir restriction in
effect. File(/usr/lib64/php) is not within the allowed path(s)
I've tried every solution I could find searching the google group
(changing core files, adding code to app/webroot/index.php,
A release candidate is expected soon. I read that a beta is due soon
as well, but that wouldn't make much sense (a beta was released on
January 1st). From the RC, it's only a matter of time. Last Saturday
was 1.2's feature freeze, so we're getting very close.
On May 28, 10:22 pm, Chris Hartjes
Erm, it seems like the $scripts_for_layout var is populated before the
elements are rendered so it doesn't contain the scripts which you add
it in an element.
My scenario:
/posts/view/123
and in view.ctp:
$this-element('456')
and in 456.ctp:
$javascript-link('somefile', false)
It doesn't
81 matches
Mail list logo