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 avail

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)" wrote: > just use mt_rand() > it is not without reason the "better random value generator" > > > > ianh > > > > > EventHQ -

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

2009-08-04 Thread ianh
srand() to fix. ianh EventHQ - professional online event registration and marketing http://www.eventhq.co.uk On Aug 3, 11:25 pm, Miles J wrote: > I found this very weird bug today, and I am extremely stumped on the > problem. > > I was working on a static ad sy

Re: cakeError

2009-02-07 Thread ianh
Ps question '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 wrote: > What errors do you want to

Re: cakeError

2009-01-16 Thread ianh
0! Does anybody know what the intention behind this is please? 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 --~--~-~--~~~---~--~~ Yo

Re: Paginator sort field and direction indicator?

2009-01-10 Thread ianh
ad/thread/fb8b10a1... > > So is that the only 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 --~--~--

Re: Anyone in North East England?

2009-01-09 Thread ianh
On Jan 9, 2:32 pm, Penfold 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: Anyone in North East England?

2009-01-09 Thread ianh
at the moment! On Jan 9, 10:15 am, Penfold 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 s

Re: Anyone in North East England?

2009-01-09 Thread ianh
On Jan 9, 12:20 am, Penfold wrote: > Hi Paul, > As you want to get the idea up and running fast why not outsource > parts of the website to a third parties, for example events, there is > a poster on herehttp://www.eventhq.co.uk that does it, they might > have a web service available which would

Re: Anyone in North East England?

2009-01-08 Thread ianh
I'm South West too (Poole, Dorset) and would definitely consider a UK Cake meet a good thing. Ian Hill http://www.eventhq.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group,

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 sec

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 to the

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 syst

Re: Templating for Shops

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

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.

1.2 version 7079 quick question on mysql conditions

2008-06-01 Thread ianh
example, see http://bin.cakephp.org/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 beca

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 S

Set::matches and regexp question

2008-05-24 Thread ianh
() [function.preg-match]: 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 Goog

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: 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 proba

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

2008-01-22 Thread ianh
keyPath, valuePath, groupPath > > On Jan 22, 1:47 pm, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > Thanks for replying ian, but I'm still getting the same result: > > > Warning (512): SQL Error: 1109: Unknown table 'TagType' in order > > cla

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

2008-01-22 Thread ianh
your list method, set your models displayName and/or primaryKey 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, RichardAtHo

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=gst&q=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 > compo

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 <[EMAI

Re: Limit number of words returned in a query

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

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: 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: params['pass']); ?> options($options); ?> HTH, Ian On Nov 16, 3:13 pm, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote: > Hi, > I know there is a lot about pagination on this group,

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: User

Re: Capistrano + PHP deployment

2007-09-22 Thread ianh
> wrote: > On 9/22/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 permiss

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 permis

Re: using formhelper

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

Re: Password edits/validation

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

Re: How I created a global record search

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

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 fr

Using haml in views

2007-07-15 Thread ianh
o in the file 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?

Re: Does cakephp support transaction now?

2007-07-08 Thread ianh
' and payment code ' . $payment_code); $error_flag = true; } if(!$error_flag) { $this->{$this->modelClass}->execute( 'COMMIT' ); $this->Message->flash('Payment and associated bookings have been successfully marked as received'); } e

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 so

Generating PDFs - piece of useful information for the group

2007-06-08 Thread ianh
hy). Hope 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 f

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 ex

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 > setti

Re: soap server

2007-06-04 Thread ianh
There are three articles on implementing a SOAP server with Cake using Nusoap here: http://rossoft.wordpress.com/?s=nusoap&searchbutton=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 soa

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 chos

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: 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: 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
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 neglecte

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 bef

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: 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-15 Thread ianh
me know and I 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

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: 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" &

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 idea

Re: Data cleanup in Model

2007-03-26 Thread ianh
and I'm happy to spend a bit of time looking at it with you. 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 wh

Re: Data cleanup in Model

2007-03-25 Thread ianh
pproach? One important note, this does not clean up inputs used for search or filtering and you would need to call paranoid for those inputs. I am working on a beforeFind version of the above but it is not so quick. HTH, Ianh On Mar 24, 7:45 am, "Michael Tuzi" <[EMAIL PROTECTED]> w

Re: How call database from Component?

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

Re: afterSave callbacks

2007-03-07 Thread ianh
More info needed as MI says. Based on whats available why not do it as a beforeSave? Only one expensive write to your DB then. function beforeSave() { // assuming your data is in $this->data $this->data[MODELNAME]['total'] = $this->data[MODELNAME]['price'] * $this->data[MODELNAME]['quantity']

Re: Updated AppModel::expects() function for specifying which models should be returned

2007-02-27 Thread ianh
Hi MI, Expects is a really useful function, so would love to see the update. Could you use something like pastebin.co.uk for now? Cheers, ianh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP"

Re: using sanitize together with validate for security

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

Beta testing invitation

2007-02-23 Thread ianh
urn. Just 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, se

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 onl

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 = aa('dayofweek(Course.star

Re: Change 4426 in newest 1.1.x.x version

2007-02-05 Thread ianh
Hi, Thanks for the really quick response - much appreciated. I will work on that bit of code and see what happens. Many thanks again, Ian On 5 Feb, 12:46, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]> wrote: > I suggest you override it at the model level, this is possible... > > In the mode

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

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 observe

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 ea

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: 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: 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
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 pasted

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 recei

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: datetime strings and using sanitize->cleanArray()

2006-07-31 Thread ianh
just fantastic. 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 PR

datetime strings and using sanitize->cleanArray()

2006-07-31 Thread ianh
ter solutions? 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 [EM

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 pos

setFlash problem

2006-07-27 Thread ianh
g or is this a bug to be fixed? Thanks, 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,