R: othAuth component v0.5.4.5

2007-08-20 Thread m.sbragi
Give a try even to this: http://bakery.cakephp.org/articles/view/yacca-yet-another-cake-component-for -auth Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto di Baz Inviato: lunedì 20 agosto 2007 4.10 A:

R: Auditing

2007-08-20 Thread m.sbragi
This my attempt to solve the problem (logfile is a table for auditing): function beforeSave() { $this-currentAction = $this-id ? 'Update' : 'Insert'; return true; } function afterSave() { // hope that this is not necessary // because cake has filled in the id after save

R: about row locking

2007-08-20 Thread m.sbragi
I have used this on one of my projects: function afterSave() { /* ** If new record find counter */ if(! @$this-data['Protocolli']['id']) { $id= $this-getLastInsertId();

R: validation

2007-05-31 Thread m.sbragi
What do you mean with doesn't work. For All: Be more exhausting when you place a question It could be this. if(($this-data['Client']['password'])!=($this-data['Client']['confirm_pass word'])) { $this-Client-invalidate('confirm_password'); return; } -Messaggio

Re: How to enable a CSV webservice?

2007-05-30 Thread m.sbragi
What about a view like this. I have not tested but extracted from a view in one project that is a little more complex but it is just as an example. ?php Configure::write('debug', 0); $filename = export.csv; $delimiter = ,; $fields= array(id, last, fist, email); $newline = \r\n;

Re: Date

2007-05-30 Thread m.sbragi
I suggest to use this approach: In your View: // The 2^ param 'MDY' for the sequence of selects echo $html-dateTimeOptionTag('Client/dob', 'MDY', 'NONE', $data['Client']['dob'], array(), false); In your controller $this-cleanupFields(); // automagically buld a single fields from the group of

R: adding extra fields when reading a model

2007-05-30 Thread m.sbragi
You Have 2 chance to accomplish this task 1. You can build fake field in your model afterFind() function function afterFind( $result ) { $result = parent::afterFind( $result ); foreach( $result as $k = $v ) { $result[$k]['Table']['thumb_url'] = 'thumb_' . @$v['Table']['image']; }

Re: Change the Separator Character in the dateTimeOptionTag Output?

2007-05-30 Thread m.sbragi
Ok this is the most simple solution i can think. echo str_replace('-','/',$html-dateTimeOptionTag($field,'MDY','NONE',null,array( ),false)); OR Write your own helper that extends html and use your own char. See manual for reference and search on list :) -Messaggio originale- Da:

R: Issue on software design / good practice

2007-05-26 Thread m.sbragi
mmmhh this thing let me think. Onestly I don't know what is the better way. I always use the afterFind functions to set fake fields. I think that for MVC pattern have a link between view and model is not a very good practice. Yes it is more efficient and less redundant (and we know that a

R: when I create my own layout file ,where to put all the related pics and swfs?

2007-04-21 Thread m.sbragi
To be shure to point to correct url if you have inner path from webroot or if you move your you can use this tip (so if images are correctly referenced even swf will be): If swf/ and img/ are at the same level use: $pathToSwf = $html-image('../swf/theFileIsHere.swf'); Or you simply put your

R: accessing different database from a controller

2007-04-14 Thread m.sbragi
This is a known issue. In your connections in database.php add the clause 'persistent' = false like in this example: class DATABASE_CONFIG { var $global = array( 'driver' = 'mysql', 'connect'= 'mysql_connect',

R: Two Applications sharing Models

2007-04-06 Thread m.sbragi
The simplest method to have a portable system to share source code with php is to include a file inside another. Example if you want model.php and model1.php with the same source code inside: Every changes on model.php is reflected on model1.php. file: model1.php ?php

R: Included library

2007-04-04 Thread m.sbragi
Hello Davide instead of putting a @ on functions in cake core files is better to modify app/config/core.php and set define('DEBUG', 0); that is the reccomended configuration for production site -Messaggio originale- Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED]

Two new articles on nospace blog

2007-04-04 Thread m.sbragi
There are two new articles on nospace blog waiting for approval on bakery. 1. How to translate joomla templates to cakephp layouts. 2. Create a getLastUsedId function for your models. If you are interested on reading here are the links to articles list http://blog.nospace.net/?cat=3

R: Unusual Internal Server Error problem

2007-03-31 Thread m.sbragi
maybe it's related with code in your controller. Post something -Messaggio originale- Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto di poncjusz Inviato: sabato 31 marzo 2007 9.35 A: Cake PHP Oggetto: Unusual Internal Server Error problem Hi, I've got

R: Setting up a model

2007-03-28 Thread m.sbragi
Hello christoph The error you recieve is for typo. Use uppercase model name as aliased in the query $criteria = 'Collection.user_id = \'' . $uid . '\''; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Barcode printing with cake

2007-03-28 Thread m.sbragi
If anyone of you is interested, I have just published a tutorial on my blog http://blog.nospace.net/?p=13 how to print barcode with cake using pdfb and fpdf library Comments are welcome. --~--~-~--~~~---~--~~ You received this message because you are

R: Proposal for killer app

2007-03-28 Thread m.sbragi
A framework is a product to build apps quickly and presumablly better :) but last consideration may not be true :( Second thing a fw is a product for developers and every developer (in my experience) have his/her vision of a killer apps. Why it must be a cms and not a pim or a search engines

R: where to put my functions ?

2007-03-26 Thread m.sbragi
hello feelexit Are you calling your function like this? function checktags() { return 'Bravo!'; } function add() { $retVal = $this-checktags(); } -Messaggio originale- Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto di feelexit Inviato: lunedì 26 marzo

R: webroot

2007-03-23 Thread m.sbragi
Hello korcs if you are using mod_rewrite try this: 1. Change your webroot/.htacces IfModule mod_rewrite.c RewriteEngine On RewriteBase /chocolate_cake RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] /IfModule