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:
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
I have used this on one of my projects:
function afterSave() {
/*
** If new record find counter
*/
if(! @$this-data['Protocolli']['id']) {
$id= $this-getLastInsertId();
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
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;
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
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'];
}
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:
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
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
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',
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
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]
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
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
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
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
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
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
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
20 matches
Mail list logo