Try to store the return value of the $html->checkbox call:
$checkboxOutput = $html->checkbox("User/news");
$saveToDB = ''.
$checkboxOutput.' (Tick for yes)';
Then save the value of $saveToDB to the database.
jp
On 30 Jan., 08:10, Unite <[EMAIL PROTECTED]> wrote:
> Hey, was wondering if anyone
I am glad to hear I am not the only one. I too have been digging
through all the mix of tutorials and old code for a week. Can anyone
who has ACL working with the latest 1.2 build give a little
explanation, or add it to the manual? In particular I am looking for
the latest ACL table structure a
Hey, was wondering if anyone can help me.
I have code from a database that uses mixed PHP and HTML. When I try
to output it (echo) it doesnt display the page correctly as theres a
echo within the DB code.
Example
Saved in DB :
checkbox("User/news"); ?> (Tick for yes)
Output on screen:
Recieve Sp
Hi,
if you want a statement like
A OR (B AND C AND D)
you can do this:
$conditions = array(
'OR' =>
array(
A,
I am also facing a similar problem. I have created associations in
Past successfully. But sometimes even though everything looks correct
but we see no sign of association.
I want to ask Is there any way of checking where we are going wrong?
On Jan 30, 9:46 am, Mac65 <[EMAIL PROTECTED]> wrote:
>
Hello everyone,
I upgraded my cakephp from 1.1.18 to 1.1.19.6305, I did a direct copy
of cake directory and I found that it causes segmentation fault in my
apache 2. After searching the entire web I couldn't find any solution
about it other than the ones which says just get the latest copy and
it
Hello,
I'm trying to generate a query with the following condition:
WHERE Lead.user_id = $user_id
OR (Lead.time_found BETWEEN '$start_time' AND '$end_time' AND
Lead.user_id IN ('0',NULL))
Here is the condition I'm using, but it's not giving the right result.
$conditions[] = array('Lea
This is using 1.2.0.6311 beta
I may be mistaken about how this should work, but I thought setting
the belongsTo variable in a model would cause it to join automatically
when using the find ('all') method on that model.
I have two models:
class Collector extends AppModel
{
var $name = 'Colle
I would probably add the length limits to the form as well, I find it
frustrating when I fill out a form and get back errors that were for
limitations I didn't know about.
I didn't see it listed anywhere, but I went ahead and documented what
can be in the $form->input() $options array:
b
Hey man, could you solve this? I'm currently having a very similar
problem.
On Nov 30 2007, 7:33 pm, Mech7 <[EMAIL PROTECTED]> wrote:
> I have in webroot index.php
>
> define ('CAKE_CORE_INCLUDE_PATH', 'C:' . DS .'wamp'. DS .'www'.
> DS .'cake_1.2');
>
> When i look at the framework even if ca
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm going to cut out a bit of this to make it simpler, but here is a
section of the code behind my users->signup page, and the
corresponding validation model.
VIEW:
create('User', array('action' => 'signup')); ?>
input('User/username', array('betw
Indeed, both do work. @Matias, what I am doing is trying to customize views
depending on the authorization level of the user viewing the system, or in
one case, the authorization level of the user in question. I am using the
othAuth component, and have 1=>Administrators, 2=>Supervisors,
3=>Moderato
Try this:
In the Model:
---
var $validate = array(
'fieldName' => array(
'rule' => array('maxLength', '8'),
'message' => 'Maximum 8 characters long',
'r
or in beforeRender, sounds more logical for views but both work.
On Jan 29, 6:50 pm, "Matias Lespiau" <[EMAIL PROTECTED]> wrote:
> I think you should be able set it in the AppController, something like:
>
> class AppController {
>
> function beforeFilter() {
>$this->set('roles',
below is the result I get trying to set acos. what am I doing wrong?
[EMAIL PROTECTED] [~/cake/AstroEmpires]# cake acl initdb
Hello daushan,
Welcome to CakePHP v1.2.0.6311 beta Console
---
Error: This command is deprecated. Please u
thanks again for your hints...i updated to the latest nightly build
which was no good idea because somehow it messed up with my auth
component...so i reverted all and just uses the dbo_.. from that build
and now the query problem is gone...
On 26 Jan., 17:36, villas <[EMAIL PROTECTED]> wrote:
> A
My form is sending data to two tables, families and family_members.
It's a registration form that will collect data relevant to the whole
family ($this->data['Family']) and to the particular family member
($this->data['FamilyMember'][]). This particular form only has two
'fieldsets' for family mem
Why just don't bake this simple example?
On 29 Sty, 22:33, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Can someone post a simple 1.2 beta example of a form w/ validation? I
> have tried all kinds of examples on various sites, but none work. I'd
> like to see the view for a simple form, an
look in my sig
--
--
(the old fart) the advice is free, the lack of crankiness will cost you
- its a fine line between a real question and an idiot
http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.sam
Can someone post a simple 1.2 beta example of a form w/ validation? I
have tried all kinds of examples on various sites, but none work. I'd
like to see the view for a simple form, and the corresponding
controller and model. If the validation could show an example of
required and maxLength rules
anybody wants to help? thanks
On Jan 28, 6:00 pm, JoeCake <[EMAIL PROTECTED]> wrote:
> Hi
>
> Sorry about the last message. I did find the file here;
>
> /private/etc/apache2/original/httpd.conf
>
> changed the AllowOveriride from None to All
>
> I have the following mod_rewrite:
> LoadModule rew
Hi everybody,
i'm a relative newbie to cakephp. Just developed my first project and
was trying to migrate to a new server, all of a sudden the paths
beyond the startpage no longer work.
working version on developement server:
http://deftec.p2-lab.com/cake/
migrated version:
http://www.deftec.de/
Hello,
I saw the example in the PDF (http://www.cakephp.org/files/OCPHP.pdf)
but I don't get how the "date" field of the posts_tags table is
populated.
Also it is not quite clear to me what the beforeSave() method in this
example does. Would you still use
$this->data['Tag']['Tag'] = array($thi
That's what I already did. When I'm not logged in and want to enter an
access controlled controller, I'm redirected to $loginAction.
But how is it possible to be redirected to $loginAction, when I'm
already logged in, but not allowed to access a controller?
--~--~-~--~~~---
Hi,
If you're querying a model whose associated models are in another DB,
does it mean it's not possible to return results in model 1 only if
they have an associated record in model 2?
Example:
User (in DB1) HABTM Groups (in DB2) [join table is in DB2]
I want to select all users who have a rec
Maybe the Auth $loginAction property is what you're looking for. Set the url
of the controller that handles login (As a string or array).
Cheers,
--
Matias Lespiau
http://www.gignus.com/
On Jan 29, 2008 4:10 PM, Braindead <[EMAIL PROTECTED]> wrote:
>
> Hello group,
>
> I'm using Auth and ACL
On Jan 29, 12:55 pm, "Matias Lespiau" <[EMAIL PROTECTED]> wrote:
> Haven't tested it, but in the send function of the EmailComponent I see this
> code:
> function send()
> // lot of code
> $__method = '__'.$this->delivery;
> return $this->$__method();
> }
> So I think it sh
Hello group,
I'm using Auth and ACL in Cake 1.2. It took quite a long time to get
it to work, but now everything is working, except one thing:
When I'm logged in and try to access a controller I don't have access
to, I'm redirected to the url I came from and get the message that I'm
not allowed
Haven't tested it, but in the send function of the EmailComponent I see this
code:
function send()
// lot of code
$__method = '__'.$this->delivery;
return $this->$__method();
}
So I think it should call the db method.
Good luck
--
Matias Lespiau
http://www.gignus.com/
On Jan 29, 12:09 pm, "Matias Lespiau" <[EMAIL PROTECTED]> wrote:
> I would do something like this:
> custom_email_component.php in my controllers/components
> App::import('Component', 'Email');
> class CustomEmailComponent extends EmailComponent {
> function __db() {
> // your cod
I think you should be able set it in the AppController, something like:
class AppController {
function beforeFilter() {
$this->set('roles', array('', 'Administrator', 'Supervisor',
'Moderator', 'Testing Team', ''));
}
}
What are you trying to achieve? Maybe that would give
I have an array of Strings, that I use in a couple of different places
throughout my cake-app, in a couple different models, and was wondering if
there was any way to declare the array such that it would be accessible from
within any view, instead of having to declare the array for each view that
u
When you use multiple rules per field you can add 'last'=>true option
to
desired validation rule. It will force cake to stop validating other
rules for
current field if a rule with that option invalidates.
On 29. Jan, 12:56 h., Reny <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have question about val
Hi i approached the problem diffrently - i have a Email model that
acts just like Email component (same api) but it doesnt render
anything (faster) only saves the data( the seted data for the view ,
template , to ,from etc) in the db.
I also have a custom shell with a task that reads a batch of e
> It's work but I'd like that when the first rule is not satisfied it
> don't try to check the second rule.
Swap the order of the two rules in the model. It checks that they're
satisfied in reverse order.
> Now it check first rule (if blank it set "required"), so it check
> second rule and it ov
I would do something like this:
custom_email_component.php in my controllers/components
App::import('Component', 'Email');
class CustomEmailComponent extends EmailComponent {
function __db() {
// your code
}
}
By setting $this->delivery to 'db' you method would be call
In our project when we need to send email we actually input it into a
database queue to be sent later via cron (a cake console app). We want
to keep the functionality of the email component but need to add a
__db (or whatever you would like to call it) method so we can choose
between 'mail', 'smtp
To make $form->input() not display any error messages, use $form-
>input('field', array('error' => false));
To not wrap the error message, use $form->error('field', null,
array('wrap' => false));
On Jan 29, 1:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hello,
> in which way I can say
Even with debug on I get the same thing. I don't think it gets far
enough to even see the debug setting. Here's the output:
400 Bad Request
Invalid request.
Again, the router settings are right out of the box ('/' goes to pages/
home), and if I specifically set the browser to pages/home everythi
Hello,
I'm using CakePHP 1.2 and I'm in this scenario in which I need to
retrieve all the authors in my "authors" table and also I need to
count the number of articles (from "articles" table) under each
author.
I already have the articleCount in where I inserted it under 'fields'
array of pagina
Hi all,
I have question about validation
I have a 'email' text input field, I check in my model that this field
isn't empty and it's unique in my db.
It's work but I'd like that when the first rule is not satisfied it
don't try to check the second rule.
Now it check first rule (if blank it set
Hello,
in which way I can say to $form->input that don't print error
message? I want to use $form->error instead...
And in which way I can sy to $form->error that it don't print ??
thanks
Francy
--~--~-~--~~~---~--~~
You received this message because you are su
AD7six you were spot on. I checked the server logs and I found some
javascript trying to preload some images with a relative path.
Thanks for the help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" grou
Hi,
When an application is not served at the root of the webserver, why is
the $this->here property not relative to the webroot property?
ex.
If I go to http://localhost/mywww/tests/cakebeta/controller/action I
get:
[webroot] => /mywww/tests/cakebeta/
[here] => /mywww/tests/cakebeta/controlle
I'm relatively new to cake.
How do I get an application to use a plugin (specifically the RSS
plugin) in v1.2? Do I need to register plugins or declare them in the
controller?
tia
leo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Hi, I am running the 1.2 beta with mysql. I am trying to setup ACL
and have been following all the common tutorials out there like
http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x
When I run the setupAcl function, as detailed in the Bakery article, I
get a SQL error about the aro.
Has anyone had any luck with Spaw Editor in CakePHP?
I've seen the TinyMCE and FCKEditor articles on Bakery, but the client
really wants the SPAW Editor.
Doesn't seem as easy as the 2 former editors in the list.
--~--~-~--~~~---~--~~
You received this message becau
Storing and calculating prices with float type isn't perfect,
particularly dividing prices or just making many math operations on
them. Make all operations for example in cents for USD or EUR and if
you want display then divide it by 100.
On 29 Sty, 13:18, lgarcia <[EMAIL PROTECTED]> wrote:
> Wh
Hi
On Jan 29, 2008 1:18 PM, lgarcia <[EMAIL PROTECTED]> wrote:
>
> Why my prices are showing up with commas
you have checked all regional before posting ?
> Sometimes i got from the DB prices with "25,43924234" instead of
> "25.43924234" ... my math operations are going wrong because of
> t
You can't capture the session ID with a route, because it's a GET
variable, it's not part of the URL. Try $_GET['CAKEPHP'] or (in your
controller) $this->params['url']['CAKEPHP'].
Also, update to the latest branch code, because the issue you're
seeing has been fixed there.
On Jan 28, 11:52 pm,
Did you have Configure::write('Cache.check', true); and uncomment in
core.php file?
On 29 ene, 01:46, tiadev <[EMAIL PROTECTED]> wrote:
> hello, i updated the nightly last release cakephp 1.2 bêta but i have
> a problem withcachewhen i separate the cake lib and the apps :
>
> wamp / cakephp /
>
Why my prices are showing up with commas
Sometimes i got from the DB prices with "25,43924234" instead of
"25.43924234" ... my math operations are going wrong because of
that
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
I think you are right, but I wish I had a confirmation.
Thanks, anyway! :-)
On 28 jan, 22:30, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> The first save is the Post the second the comment
>
> the post is save to return the post id required to save the linked comment
>
> as I understand anyway; s
On Jan 29, 11:21 am, grigri <[EMAIL PROTECTED]> wrote:
> > I'm trying to do a join that does not depend on a foreign key, but
> > uses other clauses that I provide via the conditions attribute.
> > Unfortunately I can't seem to get CakePHP to stop adding the
> > foreignKey, even when I set it to
> I'm trying to do a join that does not depend on a foreign key, but
> uses other clauses that I provide via the conditions attribute.
> Unfortunately I can't seem to get CakePHP to stop adding the
> foreignKey, even when I set it to null, an empty string or false.
What exact version are you usi
Hi all.
I have recently put live a new website using cakePHP. I am trying to
work out if there is any way of removing a potential duplicate content
issue.
The problem is that
www.example.com/ and www.example.com/index.php both resolve to the
same content. Is there any way of redirecting index.p
Hi all,
I'm just curious, I have three projects at work, websites written in
PHP, two of which are online and is about to go. I'd like to switch
them to Cake (of course), and my biggest concern is the database..
Databases for all three projects are "clones" of an oracle db from a
real-time / mis
On Jan 29, 11:29 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jan 29, 9:24 am, phantz <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey,
>
> > I added email notification into an app I was building and found that
> > every time I sent an email using phps mail() it would send six times.
>
> > So I created a
On Jan 29, 10:49 am, CrazyDave <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to do a join that does not depend on a foreign key, but
> uses other clauses that I provide via the conditions attribute.
> Unfortunately I can't seem to get CakePHP to stop adding the
> foreignKey, even when I set it
On Jan 29, 10:49 am, CrazyDave <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to do a join that does not depend on a foreign key, but
> uses other clauses that I provide via the conditions attribute.
> Unfortunately I can't seem to get CakePHP to stop adding the
> foreignKey, even when I set it
On Jan 29, 9:24 am, phantz <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I added email notification into an app I was building and found that
> every time I sent an email using phps mail() it would send six times.
>
> So I created a test function to see what was going on.
>
> function emailtest(
On Jan 28, 11:53 pm, Carl <[EMAIL PROTECTED]> wrote:
> I develop on a local server (apache via xampp) and when I point my
> browser to the root of a project (ie localhost/project) it goes to the
> htdocs/project/pages/home view as it should. But when I upload the
> site to a shared server and po
On Jan 28, 5:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> http://groups.google.com/group/CakePHP-es/browse_thread/thread/86e305...
Those extra mod_rewrite rules are completely unnecessary /unless/ like
the poster you want to your admin site to be a separate application.
If the app wa
hi all,
im trying to add the help balloons inside a view file
here they are
http://www.beauscott.com/2006/08/19/ajax-enabled-help-balloons
i added the files inside js/helpbuttons
in a layout file i added this within the tags
print $javascript->link('helpbuttons/lib/prototype/prototype.js');
pr
hi all,
im trying to add the help balloons inside a view file
here they are
http://www.beauscott.com/2006/08/19/ajax-enabled-help-balloons
i added the files inside js/helpbuttons
in a layout file i added this within the tags
print $javascript->link('helpbuttons/lib/prototype/prototype.js');
pr
Hi,
I'm trying to do a join that does not depend on a foreign key, but
uses other clauses that I provide via the conditions attribute.
Unfortunately I can't seem to get CakePHP to stop adding the
foreignKey, even when I set it to null, an empty string or false.
Here's the basic idea of what I'm
It's strange, many of us have this problem unfortunately i can't find
the solution anywhere.
--~--~-~--~~~---~--~~
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@googlegrou
Hey guys, hope I'm posting this in the right group and all...
Unless there's another way to go about this, shouldn't the Sanitize
class also include a method to un-escape sanitized data back into a
readable, user-friendly, format? Otherwise, what's the point of having
it sanitized?
I'm no big ex
You can place rules in a normal order and add 'last' => true to every
rule. This stops processing of rules when the rule is broken by the
input and allows to display this rule's message instead of the last
rule's message.
On 29 Sty, 00:39, Fanck <[EMAIL PROTECTED]> wrote:
> Thanks, you are right,
http://groups.google.com/group/cake-php/search?group=cake-php&q=table+inheritance&qt_g=Search+this+group
On Jan 28, 5:40 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> Um..yeah. Could you write that a bit clearer? I don't think anyone can
> understand what exactly is your question (at lea
Sorry I made a mistake, the correct syntax is App::import('Helper', 'Xslt');
That should work.
What's going on here is that Cake hasn't loaded your helper class so you
can't instanciate it.
On 1/28/08, Wayne Fay <[EMAIL PROTECTED]> wrote:
>
>
> That doesn't seem to change anything for me, for
Hey,
I added email notification into an app I was building and found that
every time I sent an email using phps mail() it would send six times.
So I created a test function to see what was going on.
function emailtest()
{
$address= "[EMAIL PROTECTED]";
I'm getting the following error for cache in 1.2.
Warning (512): Cache not configured properly.
Please check Cache::config(); in APP/config/core.php
[C:\web\xampp\koek\cake\libs\configure.php, line 630]
My setup is as follows.
/koekApps/
/koekApp1/
/config
/controlle
I'm getting the following error for cache in 1.2.
Warning (512): Cache not configured properly.
Please check Cache::config(); in APP/config/core.php
[C:\web\xampp\koek\cake\libs\configure.php, line 630]
My setup is as follows.
../path_to_cake_install
/koekApps/
/koekApp1/
/conf
74 matches
Mail list logo