, Ianh
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options
Fab stuff, works like a charm and I haven't found any errors elsewhere
from that change to a core file either. Cheers both gwoo and stuckshut.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post
?
Thx, ianh
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more
If we use this hard-coded conditions in the model but want to override
it on a case-by-case basis (e.g. in an app I'm developing 'delete'
means set a boolean field to 1 so things can be undeleted by the admin)
is that a use for bind/unbind model?
Thanks, Ian
Mikee Freedom wrote:
Hey Felipe,
I use the observable models approach/code given in the Bakery to get
data like user IDs out of the session (othAuth as it happens) and into
submitted data before saving to the model.
http://bakery.cakephp.org/articles/view/96
Ian
--~--~-~--~~~---~--~~
You
See http://bin.cakephp.org/view/1828423735
I think the reason it doesnt work out of the box is because a method
was left out. Make sure you include a getxxxModel() in your controller
where xxx is the name of your controller and then call this function
from the observing component.
I have
I cannot see a way other than to put getxxModel into each controller, I
guess you could possibly call the component once in the app_controller
components array (although I don't as I have a feeling it is not good
practice). Ian
--~--~-~--~~~---~--~~
You received
Looks good - as something to try for the future, you can also leverage
other model callbacks like afterSave, beforeDelete etc etc really
easily. Ian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
Hi there is a form wizard component around somewhere that is really
good for standard wizard style screens. The wizard allows you to move
backwards and forwards between pages and also allows you to set up each
page (e.g. prepare dropdown lists with generateList type finds on the
database and also
Hi,
Second that - don't do one database per user. However you can have one
model use different tables for each account. By way of example, I am
nearly finished a (cake-based) app that allows users to put custom
fields in their forms. Of the various approaches, I chose to set up a
new table for
Hi All,
Fully agree that the way to use model callbacks for things like
sending emails is to use observers - there is a tutorial on the Bakery
on this. It is such a flexible way of doing things that I have started
to put quite a lot of business logic that might otherwise go elsewhere
into
Hi all,
Can anybody explain to me please why change 4426 was needed (disabling
loadinfo on models where useTable was false)?
I ask because I have I have an app that sets the table for one model
dynamically depending on the logged in user ID. This change breaks
that part of the app.
If I remove
Hi all,
I'm working on an app to allow people to book courses online. I want
users to be able to select courses by the day on which they are held.
I have a start date (in datetime format) and have been trying to
create a conditions array a bit like this:
$conditions =
Worked a treat - thanks so much. Ian
On 21 Feb, 00:04, AD7six [EMAIL PROTECTED] wrote:
On Feb 21, 8:54 am, ianh [EMAIL PROTECTED] wrote:
Hi all,
I'm working on an app to allow people to book courses online. I want
users to be able to select courses by the day on which they are held
ping me an email or reply to this thread and I will point you in
the right direction.
Cheers, Ianh
--~--~-~--~~~---~--~~
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
practices for
sanitization/validation.
Cheers, ianh
--~--~-~--~~~---~--~~
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
.
Then simply do $Mytable = $this-common-getModel('MyTable');
Thereafter you can do whatever you need, e.g. $results = $MyTable-
findall();
ianh
On 20 Mar, 13:35, Aldo [EMAIL PROTECTED] wrote:
Hello
I'm trying to make a database call from a component, but independent
from controller
.
HTH, Ianh
On Mar 24, 7:45 am, Michael Tuzi [EMAIL PROTECTED] wrote:
I thought that data cleaning should be done prior to a save, so I
tried using stripAll in the model as follows:
function beforeSave()
{
require_once('sanitize.php');
$cleaner = new Sanitize
.
Ianh
On Mar 26, 12:12 pm, Michael Tuzi [EMAIL PROTECTED] wrote:
@ianh
I followed your instructions, but I am now getting an SQL error during
validation! I don't understand how, why or where the query takes
place, but the error I get shows that a query ('__sanitize') is being
made to the db
I don't think there is any way to make Cake do detailed logs of errors
internal to the framework. You could put a beforeFilter action in your
app_controller that detects if Cake has detected an error and does
some appropriate action, or you could write your own logs component/
plugin etc.
No
II stand corrected an am always happy to learn something new - thanks
chap. ianh
On 31 Mar, 13:23, AD7six [EMAIL PROTECTED] wrote:
On Mar 31, 11:12 am, AD7six [EMAIL PROTECTED] wrote:
On Mar 31, 11:02 am, ianh [EMAIL PROTECTED] wrote:
I don't think there is any way to make Cake do
ianwtas...@gmail.com wrote:
Ianh have you got any plans to implement a api so third parties script
creation of the events etc?
I would be interested in that for a project im currently working on.
Definitely have plans to implement a 'proper' API. Its slow though for
the usual reasons (features
On Jan 9, 2:32 pm, Penfold ianwtas...@gmail.com wrote:
hi ianh,
whats your skype id?
Ian Tasker
My skype id is ian_at_portlanddata
ianh
http://www.eventhq.co.uk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
option? A giant switch statement?
http://blog.awpny.com/2008/04/cakephp-12-pagination-note/ about half
way down the page is a more simple option. Not yet tested it as only
discovered it yesterday but will be trying it out on Monday.
Ianh
--~--~-~--~~~---~--~~
You
?
Anyway, as Mike says above, the solution Im now using is to include a
Configure::write('debug', 1); line wherever I call cakeError for a
custom method.
Thx, ianh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
-
match'function.preg-match/a]: No ending delimiter '/' found]
severity errors.
Am I missing something on how to do this or can it simply not be done
at the moment?
Cheers. ianh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Thanks for the suggestion, I didnt know that about XPath. Doubling the
braces didn't work for me Im afraid.
On May 25, 4:16 am, b logica [EMAIL PROTECTED] wrote:
Just a guess: Set uses XPath expressions, which require doubling the
braces: {{4}}
On Sat, May 24, 2008 at 4:50 PM, ianh [EMAIL
That did the trick - many thanks and also for the timeline link - I
hadnt found that before.
ianh
On Jun 1, 1:24 pm, Marcin Domanski [EMAIL PROTECTED] wrote:
Hey,
while using nightlise (ot branch HEAD) its good to follow the
timeline:https://trac.cakephp.org/timeline?changeset=onmilestone
/saved/32951 where I have
pasted in a method and the SQL output I get from that method.
If anybody can see what I am doing wrong or shed some light I would be
grateful!
ianh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
it is tiny and therefore super-easy to get working and to understand.
Or you could get adventurous and look at http://www.liquidmarkup.org/
from Shopify (Ruby on Rails) and see what ideas you get from that open-
source templating language...
ianh
On Jun 2, 1:15 pm, Max [EMAIL PROTECTED] wrote:
Thank you
Send with a cron job called via the Cake console. You need to have an
emailer task (on the bakery or you can grab my copy at
http://bin.cakephp.org/saved/33206) and a shell file to be called (a
slimmed down version of one I use is at temporarily at
http://bin.cakephp.org/view/2108771248).
My
Now you come to mention it, I get exactly the same thing as listed in
http://bin.cakephp.org/view/743099631 where emails sent as text
include headers. No idea why at the moment!
ianh
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I have a fair bit using the olders form wizard component (I think
there are two versions floating around now).
Basically each 'step' in the form has two methods associated with it,
a method to display the page and an optional ,ethod to validate that
specific page. If you return false from the
() to fix.
ianh
EventHQ - professional online event registration and marketing
http://www.eventhq.co.uk
On Aug 3, 11:25 pm, Miles J mileswjohn...@gmail.com wrote:
I found this very weird bug today, and I am extremely stumped on the
problem.
I was working on a static ad
+1, I had forgotten about mt_rand() for some reason.
On Aug 4, 11:41 am, euromark (munich) dereurom...@googlemail.com
wrote:
just use mt_rand()
it is not without reason the better random value generator
ianh
EventHQ - professional online event registration
I built a generic gateway for EventHQ (www.eventhq.co.uk) where users
can plug in their payment gateway details and hook the app up to their
merchant account. It supports Authorize.net, Moneris, SagePay,
Barclaycard ePDQ, PayPal (standard and payments pro). It handles both
payments and (where
Also see
http://groups.google.com/group/cake-php/browse_thread/thread/24196c7482ad2015/57bf84dfab5c910a?lnk=gstq=pdf+debug#57bf84dfab5c910a
On Jan 18, 9:28 pm, Takuo SHIONO [EMAIL PROTECTED] wrote:
Hello Gianluca,
In may case, we put FPDF into vendors directory. Then we generate
component
properties to whatever you want to have returned.
ianh
On Jan 22, 12:55 pm, manish [EMAIL PROTECTED] wrote:
http://groups.google.com/group/cake-php/browse_thread/thread/996efa1f...
On Jan 22, 4:20 pm, RichardAtHome [EMAIL PROTECTED] wrote:
Hi All
I've just upgraded a project to the latest
, the TagTypes table is not being included so the order
by fails.
On Jan 22, 1:17 pm, ianh [EMAIL PROTECTED] wrote:
Try:
$tags = $this-Output-Tag-find
(
list,
array
(
order=array(TagType.name, Tag.name ASC)
)
);
The list method is now clever enough
Good list of options; just to note that in the 1.2 beta 'between' has
been replaced with 'separator' and 'selected' has been replaced with
'value' - at least for radio buttons and checkboxes - not tested for
other input types.
On Jan 30, 2:15 am, jonknee [EMAIL PROTECTED] wrote:
I would
I have been using http://paggard.com/projects/doc.generator/ and its
predecessor for several years. This is a commercial PHP class and can
easily be slotted into Cake. The chap gives excellent support but the
script does cost (about $99 at the moment). I have programs that
routinely generate 100+
'Is this really the desired behavior? It doesn't
seem to be documented?' still stands, although this thread and your
blog post have been exceptionally useful in showing how to workaround
the issue.
ianh
On Feb 6, 6:30 pm, teknoid teknoid.cake...@gmail.com wrote:
What errors do you want to display
Somewhere in the manual or the API there are two possiblities you can
use in your controller method, either:
$this-autoRender = false; // will tell the method not to render
anything, e.g. if no data is being returned
or $this-layout = 'ajax'; // will tell the method to use a blank
layout which
will paste up a
newer version somewhere. Ianh
On 15 Apr, 04:29, Poncho [EMAIL PROTECTED] wrote:
Hello all,
I'm trying to automaticallysanitizeand reformat phone and fax
numbers, so I knocked these model methods together but Ican't seem to
get it working.
function formatPhoneNumbers
I'm going to quickly tell you what I found, there is so much in your
post though that I cannot get into it all. Here are some pointers
though that I hope will move you forward.
1) In Cake 1.1.x the method you have used is more or less how its
done, there is no magic save multi models as far as I
http://pastebin.co.uk/13204
Usage:
Place method in your app_model and call with the beforeValidate
callback also placed in your app_model
function beforeValidate()
{
$this-__sanitize($this-data);
return true;
}
In every model of your app include the var $allowedChars = array();
Hi Graham - thanks for giving the function a whirl. If you can still
see the data after sanitization then the most obvious thing to ask is
are you calling it correctly? It must look like this:
function beforeValidate()
{
$this-__sanitize($this-data);
return true;
}
It is vital that the
No worries - let me know how the function works out for you and any
improvements you think might be warranted. Ian
On Apr 30, 11:01 am, gmwebs [EMAIL PROTECTED] wrote:
Thanks Ian...
I had the return true in the beforeValidate() but I was trying
something in beforeSave() and had neglected to
Interesting point. Perhaps it would be better if the function gets
called beforeSave() instead?
On Apr 30, 12:47 pm, gmwebs [EMAIL PROTECTED] wrote:
How would I echo the sanitized input in my form rather than the
unsanitized input? If a user were to input non-alphanumeric characters
in a
Yes - it is for this reason that I call the function in
beforeValidate, because an isUnique query using unchanged data which
then gets changed is not ideal. My approach with usernames and
passwords is to say by the field what characters are not allowed and
then confirm what got saved to the DB in
I'm working on something similar to this for an app I'm building and
then there is also the Bakesale project.
At the moment I have a Paypal integration and an Authorize.net (AIM)
integration done and both have been working really well for event
registrations through eventhq.co.uk. I also need to
Hi,
Yes the OP's original question can be answered using a single model
and before each use setting the table dynamically with $this-model
name-setSource(table name); I know, I have an event registration web
application (http://www.eventhq.co.uk) running on exactly this model!
The reason I chose
There are three articles on implementing a SOAP server with Cake using
Nusoap here:
http://rossoft.wordpress.com/?s=nusoapsearchbutton=go%21
@John - how did you go about auth? Using the Nusoap approach above
ended up creating a 40-char API key which has to be submitted and
verified before a
If you are using Cake 1.1.x then look up the form wizard on the
cakeforge. I don't know whether it works for 1.2 but I see no reason
why it shouldn't.
On Jun 7, 10:13 am, wewo [EMAIL PROTECTED] wrote:
Dear all,
What would be your implementation recommendation (controller side) for
setting up
you will find plug-and-play scripts, I think
you are going to need to do some work and testing on this yourself.
Cheers, Ianh
On Jun 8, 8:16 am, Nelson [EMAIL PROTECTED] wrote:
Hi there,
I am working on a page which let users to upload excel files
(generated with excel 2k/2k3/XP
that helps someone somewhere, sometime.
Ianh
--~--~-~--~~~---~--~~
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
Hi,
I would but the Bakery is not letting me login - I think this has
already been flagged elsewhere in the group. Ianh
On Jun 8, 8:34 pm, Samuel DeVore [EMAIL PROTECTED] wrote:
Can you add that as a comment on the article and when I have a few minutes
and make some more updates
as received');
}
else
{
$this-{$this-modelClass}-execute( 'ROLLBACK' );
$this-Message-flash('Error #8827; Payment and associated
bookings were not marked as recieved due to a database error',
'error');
}
Does that make sense? Ianh
On Jul 8, 8:07 pm, Christian \Jippi\ Winther [EMAIL PROTECTED
structure, how does it get called etc?
Also, The HamlView class has .ctp (cake 1.2) template extensions hard
coded in. If I can get it working, I will change this to a class
property so you can use either 1.1 or 1.2. But, is it possible to use
HamlView in 1.1?
Thanks, Ianh
Ignore that - its just appeared in the Bakery (http://
bakery.cakephp.org/articles/view/haml-markup-haiku). Still like to
know what others think though,
On Jul 15, 12:44 pm, ianh [EMAIL PROTECTED] wrote:
Hi all,
I just came across the Haml parser snippets on CakeForge from Adeel
Khan:
http
) it cannot yet do fuzzy
searches, i.e. the equivalent of LIKE statements.
Cheers, Ianh
On Aug 12, 8:54 am, kabturek [EMAIL PROTECTED] wrote:
That will be a lot of findAlls... and LIKE is a db killer;) Also you
would like to set recursive to -1 when searching.
This is a little out of scope but some
when a rule should be applied (on create, on update).
Ianh
On Aug 30, 7:36 am, Al PropNut [EMAIL PROTECTED] wrote:
Using v1.2.xxx, I'm trying to figure out how to manage password edits.
Currently, I have password validation set as VALID_NOT_EMPTY. That
works fine when I add a record
-input('year')); ? and see where
that gets you.
If it is 1.1 then I don't know as I stopped using it as soon as I
realised how much better 1.2 is already.
Ianh
On Aug 31, 12:10 pm, rtanz [EMAIL PROTECTED] wrote:
how can i translate this into cake code? with the form helper
labelYear
input
Suitably inspired and with absolutely no ruby experience whatsoever
(how hard could it be?!) I just sat down, installed ruby and
capistrano and wrote a simple deployment script for an app that:
1. archives the current version as a tar file
2. exports the latest version from SVN
3. sets the
/07, ianh [EMAIL PROTECTED] wrote:
capistrano and wrote a simple deployment script for an app that:
1. archives the current version as a tar file
2. exports the latest version from SVN
3. sets the permissions on the tmp folder;
and now you should share it :)
Tarique
+ lots to AD7six's suggestion to look at your asociations between
models. You can find that Cake will pull huge amounts of data out at a
time. For example, if you have something like User hasMany Task and
Task belongsTo User and you set recursive to 2 or 3, you can get a
data structure like:
Tell your options array in your view what params you want to pass.
This is a code fragment from my applications:
?php $options = aa('update', 'paged_data_container', 'url', $this-
params['pass']); ?
?php $paginator-options($options); ?
HTH, Ian
On Nov 16, 3:13 pm, Charlie van de Kerkhof [EMAIL
- how and where do I deal with validation?
1. Create a model with whatever name but put in a class property of
var $useTable = false; Cake will happily use this model without
complaining that there is no DB table.
2. Put your validation rules in this model and run validation as you
would any
in
the longer term
ianh
On Dec 8, 1:20 pm, Dilbert [EMAIL PROTECTED] wrote:
Let's say I have an article with a text field that is the full
content. How can I have a preview of the text in the home page
limiting the numbers of phrases or words (a bit like in drupal)?
Thank you
There is also a conditional validation behaviour around somewhere. It
is not listed on the bakery but you can find references to it through
Google. I have a customised version if you want it else if someone
else knows where it has got to that would be great.
On Dec 15, 10:29 pm, Adam Royle
70 matches
Mail list logo