Hello,
I'am started using cake two weeks ago. I'am very happy, that I found a
framework which gives me almost the same possibilities as RoR does, and
which is, for the first time, easy to use. I'am very familiar to PHP
and OOP and I can almost do erverything I like when I want to write a
Hi all,
I need to pass a datetime string from a form to be stored on the
database as -MM-DD hh:mm:ss (i.e. datetime format in MySQL).
I then put code to clean the $this-data array in the app_model to try
to setup automatic cleaning of all saved data. What I found was that
because
I then put code to clean the $this-data array in the app_model to try
to setup automatic cleaning of all saved data. What I found was that
because cleanArray() cleans everything without mercy, including html
encoding on everything, it encoded the hyphens in teh datetime format
(not the
kdbdallas ha scritto:
OK, I am hoping this is my last question, but no promises. :-)
How do I tell a view in my controller to use a different layout.
In my layouts DIR I have default.thtml and secondary.thtml.
What do I put in the controller file to specifiy which layout to use?
you can
Is there an elegant way to build the list of selected items to feed the $html-selectTag() in a HABTM relation ??I ended with for instance: $materials_selected_designations = array(); for($i=0; $i sizeof($this-params['data']['Material']); $i++){
After a few bug fixes in the tagging system we are proud to release
Beta 2 of the cheeseCake Photoblog V1.0
No new features were added (hey its a Beta! )
I would like to thank Vladislav Sournine for all the work he did on
hunting the bugs down
Download from:
Does anyone have any complete examples? I just can't seem to get this
thing working. I'd also like to pass in the minChar variable - any
chance of doing this?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Tarique,
Demo is at http://sanisoft-demo.com/cheesecake/
Looks nice!
On a related note, we may be running out of 'cake' words for
cake projects, so people should reserve them ASAP:
[EMAIL PROTECTED]:~$ perl -ne print if /cake[^\'s]/ /usr/share/dict/words
cake
caked
cheesecake
coffeecake
On Mon, 31 Jul 2006 02:34:29 -0700
AD7six [EMAIL PROTECTED] wrote:
Why use sanitize at all? Data sent to the DB get´s escaped anyway, so
it´s not exactly necessary. I thought the intention of the sanitize
class was for example, so you could still escape your custom sql
queries easily.
Well,
OK, I commented out the check for isAjax in the component and got it
working - not sure why it's not Ajax but it is so it works. I'd
still like to set the minChar, though - any thoughts? Thanks...
--~--~-~--~~~---~--~~
You received this message because you are
Hey! I'm having major trouble integrating the sessions between Cake
phpBB2.
1) My phpBB2 installation is in /app/webroot/phpBB.
2) The DocumentRoot in httpd.conf is set to /app/webroot.
I've tried accessing $_SESSION directly in /phpBB/login.php (ie- when
the user logs in successfully,
I have to get in a template some code generated from a controller
(Lavoro).
I have write:
pspan class=dicituraCliente :/span ?php echo
$this-controller-Lavoro-getLavoro(); ?/p
But php return an error :
Fatal error: Call to a member function on a non-object in
I am attempting to upgrade to the newest version of CakePHP from a beta
version. I am using Oracle using dbo. When I run any route, I get the
error:
Fatal error: Call to a member function MetaType() on a non-object in
...\cake\libs\model\dbo\dbo_adodb.php on line 298
Does this ring a bell to
Actually it'd be more like this:
if ($this-Session-check('layout')) {
$this-layout = $this-Session-read('layout');
}
but that's controller code. You should, however, still be able to use
$this-layout in your view templates.
--~--~-~--~~~---~--~~
You
Either make sure you're setting session.auto_start in php.ini, or
you're calling session_start( ) before trying to access $_SESSION.
Also, Cake will only use $_SESSION to store session data if
CAKE_SESSION_SAVE is set to 'php' in app/config/core.php.
http://api.cakephp.org/class_ajax_helper.html#023c127898fec19debbb715010383935
You should be able to pass 'minChar' in the $options array.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to
Do you have ADOdb installed in /vendors?
--~--~-~--~~~---~--~~
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
Good advice. I'll try it.
Thank you!
--~--~-~--~~~---~--~~
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
nate ha scritto:
but that's controller code. You should, however, still be able to use
$this-layout in your view templates.
Sure ... but is better in controller than in view ;)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Jul 31, 2006, at 9:06 AM, alepane wrote:
I have to get in a template some code generated from a controller
(Lavoro).
I have write:
pspan class=dicituraCliente :/span ?php echo
$this-controller-Lavoro-getLavoro(); ?/p
But php return an error :
Fatal error: Call to a member function on
nate wrote:
Do you have ADOdb installed in /vendors?
Yes. I have ADOdb installed in /vendors. It
was working before I tried upgrading.
Does the upgrade need to be a certain revision level?
--Dave
--~--~-~--~~~---~--~~
You received this message
Grant Cox wrote:
What you are doing (the commented out line) is a good way to do it.[...]
Great. I just wanted to make sure I wasn't doing something wrong.
The only thing to improve it would be to manually run the
Judge-validates($this-data) and User-validates($this-data), before
attempting
Hello!
I have read in a post about the Validator script at
http://www.webtest.wvu.edu/users/cbscharf/validator/, and given that I
had some problems with the wiki's advanced validation w/ params
(http://wiki.cakephp.org/tutorials:advanced_validation:advance_validation_with_parameters),
I thought
Hi,
Is possible to have hierarchical controllers like:
/admin/blog/edit/1 where admin is a folder with others controllers
related do the admin of the site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP
There is an admin routing feature you might want to look at
http://manual.cakephp.org/chapter/4 in section 4
It's a different way to do what you might be thinking about. And no I
do not believe that there is builtin support for hierarchical
controllers
Sam D
On 7/31/06, Neves [EMAIL
Plugins are an easy way to organize things too, a plugin is a mini,
self contained app
see http://manual.cakephp.org/chapter/13
Cheers,
AD7six
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To
Scope confusion?
The following works:
?php
function printUpDown($html_helper)
{
echo $html_helper-image('up.gif');
echo $html_helper-image('down.gif');
}
?
p?php printUpDown($html) ?/p
Geoff wrote:
When i use the html helper in an element it works fine if it is called
directly. If,
Hi everyone, I'm trying to do something like this:
findAllByFieldName(), in a relation hasAndBelongsToMany, so I don't
have a field to look for, do you know which method should I use to do
this?
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message
On Jul 31, 2006, at 2:37 PM, [EMAIL PROTECTED] wrote:
Hi everyone, I'm trying to do something like this:
findAllByFieldName(), in a relation hasAndBelongsToMany, so I don't
have a field to look for, do you know which method should I use to do
this?
Give us a more concrete example - what
On Jul 31, 2006, at 2:53 PM, [EMAIL PROTECTED] wrote:
OK, I have Post and Category, they both hasAndBelongsToMany each
other,
how can I get all posts in one category,
$this-Category-find('id = '.$id);
and all categories inone Post,
$this-Post-find('id = '.$id);
that's the question
I have posted and readed many times about character encoding. But most
of the times the responses are incomplete and confusing is there a good
tutorial for this.
I have made a simple script with cakephp the index.thtml view is like
this
?
echo Año, canción
?
and the output is:
A?o, canci?n
I
But there is only one problem
when I use the ajax autocomplete it still uses UTF8 for encoding my
query string to the database and I can't make querys with characters
like (Ñ,ñ..etc). Can someone give a GOOD explenantion about character
encoding.
Using which browser(s)?
-- John
How about this,
If the encoding for your files == charset meta tag in html == database
encoding
Then you won't get any pr?blems.
If you are not using UTF-8 you will get pr?blems with AJAX updates
if you use UTF-8 database connection you need to execute set names
'UTF8' as your first mysql
The bom got cleaned, so I'll give it another try
If you get the text being output you have BOMs at the
If you get the text ï » ¿ without the spaces output to screen..
you have BOMs..
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi,
Firstly, ISO8859-1 (or Latin-1) has rather limited character set[1]
and you should consider sticking with Unicode (in your case UTF-8)
Can someone give a GOOD explenantion about character encoding.
The eminent Joel Spolsky gives an excellent guide[1] to character
encodings from the
I've been reading about all types of security vulnerabilities common in
online applications, and realized that my application had some rather
large XSS holes. I found that using the Sanitize function 'cleanArray'
did a nice job in removing all? of the vulnerabilities, but I am
curious whether it
I was looking throught the ACL documentation and became very interested
in using it. My question is as follows:
Is there a way for a user to be part of multiple groups? for example,
if i have a user named john, i want him to be in both the UsersA and
UsersB group. PageA which allows UsersA
Is there a way for a user to be part of multiple groups?
Yes and no. ARO's and ACO's are organized in a tree-based fashion, so
if a node is a child of another node, it inherits that node's
permissions as well as the permissions of any node which the parent
node is a child of. However, the
A voting system:
Model Ballot: hasMany Options,Votes
Model Option: belongsTo Ballot
Model Vote: belongsTo Ballot
Model User: hasMany Votes
^^Im sort of new to MVC, hopefully those associations are OK!
Now: some controller code for viewing a ballot:
I tried:
$this-Ballot-id =
Thanx for the help given with the theme.
--~--~-~--~~~---~--~~
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
Oh yea, one more question
When I do
$this-Ballot-id = $someID;
$this-Ballot-read();
I get a huge array with ['Ballot'], ['Options'], and
Say I wanted to return only the (['Ballot'] and ['Options']) or
(['Ballot'] and ['Votes']),
Is there a method/way that
Regarding your section question, and pulling only certain
information...
Check out:
http://api.cakephp.org/class_model.html#c2d8fb14f5398c85452d978bd013436f,
which is the API page for FindAll(). One of the parameters is
'fields', where you can specify fields returned. I'm not certain, but
you
I'm not certain, but
you might be able to specify something like:
array('ballots.*', 'options.*')
That doesn't work. I think that's for returing one field from the model
that the controller is associated with. I want something very similar
by to get a particular from a associated Model,
Hey Nate - when I pass in minChar, it adds it to the text field and not
the Ajax call:
echo
$ajax-autocomplete('Entity/name','/entities',array('size'='40','minChar'='4'))
produces:
input name=data[Entity][name] size=40 minChar=4 id=EntityName
autocomplete=off value= type=text /
div
There are some associations in my app. But I don't need to use it every
time.
What should I do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
Sorry, it should actually be 'minChars', not 'minChar'. That's why the
key wasn't being recognized by AjaxHelper.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email
Could you be more specific when you say...
'You don't need to use it every time?'
Are you saying you don't want the query to run everytime? (aka, enable
some type of caching)
_RK
Daniel King wrote:
There are some associations in my app. But I don't need to use it every
time.
What should I
On Jul 31, 2006, at 6:57 PM, Daniel King wrote:
There are some associations in my app. But I don't need to use it
every
time.
What should I do?
Set the recursive var to 0 before making find calls.
$this-ModelName-recursive = 0;
$this-ModelName-find();
-- John
http://api.cakephp.org/class_model.html#c2d8fb14f5398c85452d978bd013436f
See the $recursive parameter. You can set it to 0 to disable hasMany
and hasAndBelongsToMany associations, or -1 to disable all associations.
--~--~-~--~~~---~--~~
You received this
Thanks Nate - that was it - the thing works brilliantly now. And now
for something completely different:
I used CSS to set a max-height and overflow:auto for the returned list,
so if the results are lengthy, I get a scrollable list. Of course, IE
(pre-7) does not recognize max-height but
Hello all,
I am trying to update the content of a div (details) based on the
article title that was clicked. Below is my code for the view
(test.thtml) and the generated code. The problem is that when I click
on article title, nothing happens. Even the controller function
specified in the
51 matches
Mail list logo