Hello,
I'm stumbling through my first CakePHP project, and have hit a bit of
a snag. The system that involves the following models:
Product hasMany Revisions
Revision hasMany Answers
Each answers is of type Question
Answers can have supporting documents
I have a form that will input one new pr
http://www.nabble.com/form-helper-dateTime-(cake-1.2)-t4070834.html
On Jul 12, 5:00 pm, pete <[EMAIL PROTECTED]> wrote:
> hi,
> is there a way to set the minYear, maxYear for dateTime?
>
> dateTime('dateTime','DMY',24,null,null); ?>
>
> i want to reduce the number of years within the form
>
> tha
In CakePHP the model class is used as an interface to the database -
the actual data you get back is always associative arrays. If you
have a fullname() function that perhaps concatenates your first and
surnames, you could have
class YourModel
{
function fullname( $id ){
// get the data
$name = $numberfour["MyModel"]["fullname"];
Try doing: print_r($numberfour)
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On 7/20/07, youthoftoday <[EMAIL PROTECTED]> wrote:
>
>
> I'm new to cakePHP, but experienced with Rails. I can't find the
> answer to the following anywhere.
>
> Let
Hi Felix,
It can be done for sure, but in there I was meaning something "built-
in" where you could play/rules the different parts of the framework
itself We all fail in the same trap in such "workflow" concept,
that is "it has no end to what can be added" :-)
On Jul 21, 2:14 am, Felix Geis
I'm developing such an engine right now. It allows the company to take
the items from their orders through different steps from order
processing, to production to shipment. All steps require different stuff
to be done to the items, certificates to be printed out, etc.. So yes
you can do this in
I am not good at example, but I'll try ...(In a business sector that I
know a bit)..
Let's say you are in a banking environnement, you have an application
to capture loans and process them. In order to make decision, you
would probably call external sources of data (risk estimation), some
of the
Has anyone successfully used Sortable.create with cake 1.2.
I have prototype included but it does not recognized the object
Sortable.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To pos
On 7/20/07, francky06l <[EMAIL PROTECTED]> wrote:
>
> I like the idea of workflow engine or "rules" engine. Actually, Cake
> is a framework to design application, but having the user (or
> parameters) designing is own "flow" once the application is done is a
> step further.
I still don't get it.
Well, maybe the $hashMethod will be included in Auth component
later ...
your solution is similar to mine, except to keep the possibility of
another hashMethod
On Jul 21, 12:57 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Here was my (not so pretty solution)
>
> In controllers/compon
have a look to Nate's articles about this, especially the 3rd
section :
http://cake.insertdesignhere.com/posts/view/17
On Jul 20, 7:55 pm, Joshua Benner <[EMAIL PROTECTED]> wrote:
> Put $javascript->link in the view instead of the [EMAIL PROTECTED]:Is there a
> way to only include a javascript
Here was my (not so pretty solution)
In controllers/components/mycustomauthcomponent.php:
The in the app_controller:
var $components = array ('Acl', 'Mycustomauth');
$this->Mycustomauth->authorize = 'actions';
...etc...
It appears to work (not getting parentNode() to execute, but I think
Delete all files in the tmp/cache/model directory.
On Jul 21, 12:06 am, RTigger <[EMAIL PROTECTED]> wrote:
> Sorry, I should've tested this sooner, it does work if I specify the
> column in an array as an argument with the findAll($condition,
> $fields) method. I'm assuming this does mean that
renderElement('representation_type_select', array('id' => $id))
On Jul 20, 8:26 pm, peterhf <[EMAIL PROTECTED]> wrote:
> I have an, representation_type_select.thtml, which consists of a
> selectTag.
>
> $html->selectTag(
> $model_name . '/type_' . $id,
>
I like the idea of workflow engine or "rules" engine. Actually, Cake
is a framework to design application, but having the user (or
parameters) designing is own "flow" once the application is done is a
step further.
The danger is to become very complex and degrading performances.
In my mind, it wou
Well, I had a chat with Gwoo yesterday about this. Actually the
security object accept 3 hash methods : sha1 (default), md5 and
sha256..
The idea, with a derived Auth, to declare $var hashMethod = 'sha1';
Overwrite the hashPassword function with :
function hashpassword($password)
{
Security::has
Sorry, I should've tested this sooner, it does work if I specify the
column in an array as an argument with the findAll($condition,
$fields) method. I'm assuming this does mean that the fields for the
model are cached somehow (which makes sense, instead of running a desc
query every time), but ho
Hi All,
N00b question I'm sure, as I'm just maintaining someone else's cakephp
project, but I've run into a problem:
I have a table that is tied to a model. I've added another column to
the end of the table (IsFile tinyint(1)), but after running a model-
>findAll($condition) in my controller it
Hello! I am a developer at the University of Richmond; we are an
Oracle shop. I am testing Cake for some projects we have planned and
am using the Oracle driver (the version in 1.2alpha). To learn Cake's
functionality I'm walking through the 15 minute Blog tutorial from the
manual. I am having
i am using the previous version of cakephp, i dont understand why
francky said for 1.2 only, any explanation for that, i would like to
know since im using the previous version thanks
On Jul 19, 11:07 pm, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
> > @Felix, yes you right for cake 1.2, sorry
>
Can you provide more information on how you overwrote the hash method
(Auth::password()) in AuthComponent *without* actually touching the
cakephp core code?
I've been tearing my hair out attempting to do this. I would think you
could create a component (e.g., CustomAuth) and override the method,
On 7/20/07, Kunthar <[EMAIL PROTECTED]> wrote:
> 2. If cake claims to be a real alternative MVC it has to own workflow
> engine internal,
What does having it's own internal workflow engine have to do with
Cake's implementation of MVC?
Chris Hartjes
Senior Developer
Cake Development Corporation
Hello all,
I need to manage some conditional behaviour for my app. Samples;
1. customer adds new campaign to discount product x and also want to
show banner in selected pages,
2. if basket.order.totals > 100 USD then do some favour to him,
3. check conditions and send email to some customers, etc
Is there any tutorial about i18n on static templates for Cake 1.1?
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@googlegroups.com
To unsubscri
Hello
Does ionCube's encoder works okay with CakePHP ?
/Regards Christian Winther
Nb. This is ment as a phun !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group,
I have an, representation_type_select.thtml, which consists of a
selectTag.
selectTag(
$model_name . '/type_' . $id,
array(
'option_1' => 'option_1',
.
According to cakephp's core library model_php[4|5].php
beforeValidate() gets called on every save, regardless of whether its
an update or new row.
not sure about telling whether its new or an update -- the save()
function seems to use $this->exists()
On Jul 20, 8:20 am, phirschybar <[EMAIL PROTE
On 7/20/07, mutabor <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I am wondering does anybody know a Cake based sites with a lot of
> traffic? A kind of big sites. And how good and fast Cake behaves with
> such conditions?
>
Mozilla's FireFox addons site uses it
http://addons.mozilla.org
I won't r
Maybe I should have phrased my last post differently:
* *CakePHP is not an application*, it's a framework
* You can build applications with CakePHP
* How well those applications perform is largely the responsibility
of the developer
* Looking at other big cake site tells you
Seems a rather long-winded way of doing it. Instead you can use
cakephp's standard generateList(), and use afterFind to generate the
arrays you want pass in.
Paul Herron has a good article on this:
http://www.paulherron.net/articles/view/cakephp_afterfind_psuedofields
On 7/20/07, mithnik <[EM
>
> I am wondering does anybody know a Cake based sites with a lot of
> traffic? A kind of big sites. And how good and fast Cake behaves with
> such conditions?
No all traffic goes to:
http://groups.google.com/groups/search?q=cakephp+high+traffic for some
reason these days ... : /
-- Felix
-
Put $_javascript_->link in the view instead of the layout?
[EMAIL PROTECTED] wrote:
Is there a way to only include a _javascript_ file in certain selected
views. I have it as being included in the default layout with link('tooltip')."\n"; ?> but I it's causing errors
on views I don't
Is there a way to only include a javascript file in certain selected
views. I have it as being included in the default layout with link('tooltip')."\n"; ?> but I it's causing errors
on views I don't need it on. I'm using cake 1.2.x if that makes a
difference.
Matt
--~--~-~--~~
http://snook.ca is built on cakephp and gets a good amount of traffic.
For a list of other sites:
http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
On Jul 20, 10:32 am, mutabor <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I am wondering does anybody know a Cake based sites
Hi guys,
I am wondering does anybody know a Cake based sites with a lot of
traffic? A kind of big sites. And how good and fast Cake behaves with
such conditions?
Thanks, Kostya.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
I'm new to cakePHP, but experienced with Rails. I can't find the
answer to the following anywhere.
Let's say I have a model for which I've defined a custom function, for
example one that joins concatenates two fields. I retrieve this object
from the database and I want to call a method. For insta
Maybe a suggestion which does not infects performance;
1. Add a collumn to the photoset table containing the number of photos
in the set. You can use this in your users/view action with no loss of
performance
2. When adding or deleting photos to a set this collumn in the
photoset model needs to b
Sorry, my post was not about labels or div's.
The input tag transforms Model.Fieldname to a forminput named
Model.Fieldname with the value of the fieldname applied to it, for
example $Article['title']
$form->input('Article.title') will become http://bakery.cakephp.org/articles/view/multiple-rule
I want to use beforeValidate() to make some edits to data before it
gets validated (combining 2 input fields, etc.).
Does beforeValidate get called on EVERY save, including on UPDATE? Or
just the initial save?
What is the best practice here. If I want to just look for an initial
SAVE, rather tha
Does anyone know why views that have no layout ($this->layout = false)
don't get cached?
I'm caching many of my pages, but there's one which uses a special
layout, so in order to make it cache, I have to create a layout just
for this one view, and then it works. Any ideas?
--~--~-~--~-
I have found a way here in the google group (don't memorize the exact
source though):
input('player.vorname', array('div' => false,
'label' => false));?>
The options in the secon parameter prevent the input function to
automatically wrap a div tag and the column name as label around the
input ta
Hi all,
I needed a function to return more than one value for a key so this is
what I have done. I hope it will helps someone.
/**
* Generates an array with keys defined by $keyPath and
concatenated values from $valuePath
*
* @param array $conditions limites the arra
I just submitted my first patch to CakePHP. I was thinking some of you
might like it.
https://trac.cakephp.org/ticket/2942
Look in the comments as it's not my ticket.
So what does it do? Well, it makes the default aliases for ACL nodes
configurable - and yes, they are dynamic. It's very useful if
If you have User associated, you might already have the info in $this-
>data.
Here's an example:
class Message extends AppModel
{
var $name = 'Message';
var $belongsTo = array('User');
}
class MessagesController extends Appcontroller
{
function view($id)
{
$result = $this-
Hi,
I managed to override the default layout and individual templates
locally but cannot get it
working live:
I did this by setting the layout at the top of my custom template
files...
I have overridden my error handler to mail some messages before
calling parent methods, but I guess I am
Hi,
I managed to override the default layout locally but cannot get it
working live:
I did this by setting the layout at the top of my custom template
files...
Seems a bit bollox to have to override a whole error handler just to
use custom layouts and templates, maybe this will get fixed
> There is already a Enhancement ticket in the trac for this
> athttps://trac.cakephp.org/ticket/2405(along with a few other dateTime
> enhancements).
>
> If you want it now you can apply the patch in the ticket.
Thanks for the link. The first attachment already includes a patch for
my problem.
Hi,
On Jul 19, 10:16 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Sorry guys did not know "errors always use the default layouts".
>
> On Jul 18, 12:00 am, phpjoy <[EMAIL PROTECTED]> wrote:
>
> > that's great to know, "errors always use the default layouts". :)
> > didn't see it in the manual..
Hey Geoff,
Thanks for your reply. I guess your approach is the best possible one.
I do not like it tremendously though. Thanks to CakePHP's associations
all photosets are automatically part of a user data-array. So we
already have them, and therefore would rather not findAll them again.
Also, sin
If you are asking about access control - which user role can perform
what action - have a look on the Frequent Discussions page for ACL and
Auth.
http://groups.google.com/group/cake-php/web/frequent-discussions
Geoff
--
http://lemoncake.wordpress.com
On Jul 20, 1:52 am, Cacho <[EMAIL PROTECTED]
Option 3. From the model via the controller e.g.
Users controller.
$this->set('photosets', $this->User->PhotoSet-
>findWithCount($conditions));
PhotSet Model
function findWithCount($conditions){
$this->recursive = -1; //stops all associations
$photosets = $this->findAll($conditions); // if
Looks like you are right, I read the source a little closer. I saw
that input was just using dateTime() and assume you could pass along a
the format option, but when you get to the switch statement MDY is
hardcoded.
There is already a Enhancement ticket in the trac for this at
https://trac.cakep
Hey cakeFreak,
I have a slightly different approach for development bypassing. I
have a condition like
if (Config::read()) {
$this->Auth->allow();
}
This checks if CAKE_DEBUG is greater than 0 and bypass authentication
and authorization.
Personally I think it is safer than the extra propert
Hello,
I'm dealing with the following dilemma, simply cannot decide what's
the best approach. Your $0.02 is highly appreciated!
Consider the following structure: User hasMany Photoset, which in turn
hasMany Photo.
The UserController has a view (/users/view/{id}) action, which shows
the user's d
If we could use something like $form->input('TransTitle.fra.content')
that would be nice. Using this produces a form input but the value is
lost.
We can write some logic (like I have shown in my recent posts about
this topic) to loop through the TransTitle & TransContent array, but
this seems not
Hi,
I have a pretty basic question that I've still not gotten through to
after these past weeks of plunging into Cake and I thought I might
find some help here. How do you guys mostly go around to finding the
associated User to a user_id? I seem to do this so often that at the
very least uses('Use
On Jul 20, 1:02 am, Geoff Ford <[EMAIL PROTECTED]> wrote:
> It is possible, you misread what speccy was saying. Use what you have
> and add a dateFormat key in the options array
I tried to add the dateFormat key yesterday before posting my question
and I tried it 2 minutes ago. Both times the se
Very interested in reading this! thankyou to those involved.
MIke
On 18/07/07, margin <[EMAIL PROTECTED]> wrote:
>
> Update: I downloaded the source code and uploaded a complete zip:
>
> http://download.yousendit.com/BE0382DB2EB95D0F
>
>
> >
>
--
Mike Gr
Hey Geoff Ford,
cheers for the tutorial!
Great!
I just modified a bit you beforeFilter function in the AppController
to basically allow access to all controllers during development with
ease!
--
I have a similar problem:
I have a Tag model that has a HABM association with Post and Photos.
I wanna to retrieve 2 separate pagination results for the records for
a given Tag, iin order to display the reults with 2 pagination blocks
via Ajax on the same page.
I'm trying to call 2 separate fun
Can you spot an action where this problem happen ? I mean does that
happen randomly on different action ?
Did you also check the Apache log ?
On Jul 20, 5:47 am, cdomigan <[EMAIL PROTECTED]> wrote:
> Greetings!
>
> I'm having an intermittent problem (ie very difficult to debug :-)
> with CakePHP
61 matches
Mail list logo