setFlash problem

2006-07-27 Thread ianh
, 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

Re: setFlash problem

2006-07-28 Thread ianh
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

datetime strings and using sanitize-cleanArray()

2006-07-31 Thread ianh
? 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

Re: Model::read() : fetch the first level with conditional argument

2006-09-03 Thread ianh
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,

Re: storing user id within every record

2007-01-16 Thread ianh
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

Re: storing user id within every record

2007-01-17 Thread ianh
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

Re: storing user id within every record

2007-01-17 Thread ianh
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

Re: storing user id within every record

2007-01-17 Thread ianh
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.

Re: Wizard creation headaches ... validation and save problems. How do I do this?

2007-01-24 Thread ianh
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

Re: web app development

2007-01-31 Thread ianh
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

Re: Email Notification

2007-02-02 Thread ianh
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

Change 4426 in newest 1.1.x.x version

2007-02-05 Thread ianh
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

Manipulating the right hand side of the conditions array in find/findAll queries

2007-02-20 Thread ianh
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 =

Re: Manipulating the right hand side of the conditions array in find/findAll queries

2007-02-21 Thread ianh
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

Beta testing invitation

2007-02-23 Thread ianh
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

Re: using sanitize together with validate for security

2007-02-26 Thread ianh
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

Re: How call database from Component?

2007-03-20 Thread ianh
. 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

Re: Data cleanup in Model

2007-03-26 Thread ianh
. 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

Re: Data cleanup in Model

2007-03-26 Thread ianh
. 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

Re: logging cake errors

2007-03-31 Thread ianh
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

Re: logging cake errors

2007-03-31 Thread ianh
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

Re: Anyone in North East England?

2009-01-09 Thread ianh
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

Re: Anyone in North East England?

2009-01-09 Thread ianh
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

Re: Paginator sort field and direction indicator?

2009-01-10 Thread ianh
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

Re: cakeError

2009-01-16 Thread ianh
? 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

Set::matches and regexp question

2008-05-24 Thread ianh
- 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

Re: Set::matches and regexp question

2008-05-25 Thread ianh
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

Re: 1.2 version 7079 quick question on mysql conditions

2008-06-01 Thread ianh
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

1.2 version 7079 quick question on mysql conditions

2008-06-01 Thread ianh
/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

Re: Templating for Shops

2008-06-02 Thread ianh
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

Re: Mailqueue handling .. or instantiating a component from a model

2008-06-06 Thread ianh
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

Re: email headers visible in content of message?

2008-06-19 Thread ianh
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

Re: wizard component question

2008-07-14 Thread ianh
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

Re: shuffle(), rand(), etc always returning same number

2009-08-04 Thread ianh
() 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

Re: shuffle(), rand(), etc always returning same number

2009-08-04 Thread ianh
+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

Re: Ideas for architecting a generic Payment Gateway in cake

2010-03-18 Thread ianh
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

Re: FPDF and FPDI with CakePHP

2008-01-19 Thread ianh
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

Re: Updating a generateList() to use find(list) - problems with syntax?

2008-01-22 Thread ianh
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

Re: Updating a generateList() to use find(list) - problems with syntax?

2008-01-22 Thread ianh
, 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

Re: Simple 1.2 Beta Form Example?

2008-01-30 Thread ianh
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

Re: html - rtf, doc, equivalent

2008-02-05 Thread ianh
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+

Re: cakeError

2009-02-07 Thread ianh
'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

Re: disabling $layaout

2007-04-10 Thread ianh
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

Re: sanitizing data with beforeValidate

2007-04-15 Thread ianh
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

Re: Multiple Models - One Controller - One Form - With Validation (code examples)

2007-04-17 Thread ianh
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

Re: sanitizing data with beforeValidate

2007-04-19 Thread ianh
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();

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
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

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
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

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
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

Re: sanitizing data with beforeValidate

2007-04-30 Thread ianh
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

Re: PayPal Payflow Pro Integration with CakePHP

2007-05-02 Thread ianh
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

Re: Dynamically Create a Model and Bind it to a Table?

2007-06-03 Thread ianh
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

Re: soap server

2007-06-05 Thread ianh
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

Re: Best practice - multipage Form

2007-06-07 Thread ianh
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

Re: Import Excel file into database

2007-06-08 Thread ianh
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

Generating PDFs - piece of useful information for the group

2007-06-08 Thread ianh
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

Re: Generating PDFs - piece of useful information for the group

2007-06-11 Thread ianh
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

Re: Does cakephp support transaction now?

2007-07-09 Thread ianh
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

Using haml in views

2007-07-15 Thread ianh
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

Re: Using haml in views

2007-07-15 Thread 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

Re: How I created a global record search

2007-08-12 Thread ianh
) 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

Re: Password edits/validation

2007-08-30 Thread ianh
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

Re: using formhelper

2007-08-31 Thread ianh
-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

Re: Capistrano + PHP deployment

2007-09-21 Thread ianh
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

Re: Capistrano + PHP deployment

2007-09-22 Thread ianh
/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

Re: Newbie, slow response, wrong tools ?

2007-10-05 Thread ianh
+ 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:

Re: Cstom patameters with pagination

2007-11-17 Thread ianh
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

Re: What are best practices to deal with meta form (abstract model)?

2007-12-06 Thread ianh
- 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

Re: Limit number of words returned in a query

2007-12-08 Thread ianh
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

Re: Extended Validation !?

2007-12-16 Thread ianh
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