Overriding IMAGES and IMAGES_URL

2008-04-02 Thread wralph
Hi, I am on shared web hosting and I have a directory setup like so: app/ - Frontend application admin/ - Backend application cake/ - Cake core I have an add item page inside admin, which uploads images to admin/ webroot/img and I want to be able to access these from the frontend directory with

Re: cakePHP and ecommerce security reisks

2007-10-10 Thread wralph
What your talking about is security through obfuscation and it never works against a persistent hacker. There is no security risk in publishing the DB tables and fields, the risk is in the strength of the passwords for connecting to the DB and the level of access given to particular users - this h

Re: A bit of a problem with forms and JavaScript

2007-07-15 Thread wralph
Use the ID, so if you have a textarea with ID of ModelField, then access using: document.getElementById('ModelField').value = 'whatever value you wish to assign'; Winston --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: database design

2007-07-15 Thread wralph
I would go with an id field that is an auto-increment and a code field for storing your code numbers. Winston --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to ca

Re: Updating a via ajax, although getLastInsertId() or $this->Comment->id does not retrieve the last inserted record.. why?

2007-07-13 Thread wralph
The last insert id should be set straight after the call to save. What is the SQL output from the call to save? Is the data getting saved correctly? Try assigning it first before using it in the find query like so (shouldn't matter): $last_id = $this->Comment->getLastInsertId(); $this->set('comm

Re: Struggling with creating a function and search an array then outputting data based upon results...

2007-07-08 Thread wralph
You could write a component for checking if the user_id is contained in the data array. So something like: I haven't tested the above! Include this in your controller and then call as $this->voteinfo->userVoted($data, 74); It would be easy to extend this to check if a user responsed to a part

Re: save 'modified' field doesn't update

2007-07-08 Thread wralph
Have you turned on debugging and checked what the generated SQL looks like, does it have the correct value? If not, then print out what data array before the save and check that its set. Failing that, post your code here. Winston --~--~-~--~~~---~--~~ You receive

Re: Oracle and Cake 1.2 on IIS

2007-06-21 Thread wralph
Answering my own question here, but this problem is due to a bug in cake\libs\model\datasources\dbo\dbo_oracle.php for cake_1.2.0.5146alpha The problem lies in the value function I had to change default: $data2 = str_replace("'", "''", $data); return "'".$data2."'"; break; to defa

Re: Which editor you use for views ?

2007-06-20 Thread wralph
notepad++ Winston --~--~-~--~~~---~--~~ 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

Oracle and Cake 1.2 on IIS

2007-06-20 Thread wralph
Hi, Just ported my app to work on IIS, Oracle and cake_1.2.0.5146alpha. After some teething problems everything is pretty much working except one small problem. In my controller I have the following function index() { $data = $this->Sitepage->read(); $this->set('data', $data); } Which is

ajax link call very slow

2007-05-22 Thread wralph
I have an app which creates over 1500 ajax links, displays about 1000 images on one screen. It takes 7.5 seconds to load. I have ran the xdebug output through WinCacheGrind with some interesting results. HtmlHelper->image is called 1345 times and takes about 0.5 seconds. Creating the image tags

Re: Error: Saving Form to Database

2007-04-26 Thread wralph
"my boss wants a Confirmation Data page before saving." - would you not have a confirmation page after saving? You can set the data array in kanri_new() like $this->set('data', $this->params); so kanri_cnew() will have the param data. winston --~--~-~--~~~---~--

Re: Filtering/Searching/Sorting

2007-04-26 Thread wralph
Sorting: Use the AjaxHelper::sortable helper Think this uses the scriptaculous sortable library?? Filtering - not too sure what you mean by this, but maybe NeatArray::filter, which filters data from an array Winston --~--~-~--~~~---~--~~ You received this messa

Re: multiple select

2007-03-22 Thread wralph
>From the API: selectTag ( $fieldName, $ optionElements, $ selected = null, $ selectAttr = array(), $ optionAttr = null, $ showEmpty = true, $ re

Re: Adding "action" buttons

2007-03-20 Thread wralph
Check your css file for the 'actions' style, theres probably something thats stopping it from displaying. Try removing the div around the two buttons, if both display, then its the style sheet. Winston --~--~-~--~~~---~--~~ You received this message because you

Re: model::query different output with different version of php - a bug or?

2007-03-20 Thread wralph
I always make it a habit of explicitly stating the alias in all my queries like so: SELECT `Chassis`.`a.equipment_id` FROM (select `Chassis`.`equipment_id` from chassis as `Chassis` group by `Chassis`.`equipment_id` LIMIT 3); Which should give you an array like no matter which mysql/PHP version

Re: Block field using find()

2007-03-13 Thread wralph
Thanks very much for this Mariano, a very nice solution. Regards, Winston --~--~-~--~~~---~--~~ 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

Block field using find()

2007-03-13 Thread wralph
Hi, I've got a large table (large in regards the number of columns) 'applications' with 40 columns. One of those columns is a BLOB, which holds the contents of a file (held in the database as there are two sides to the application, an internal and external - both of which use the same DB, but not