phpMyEdit - Viewing Bug Advanced Details [ Go Back ]
170 documentation feature always 2004-01-26 18:09 2004-11-27 23:43
michal  
 
normal  
confirmed  
open  
none  
none  
themes for fields
option to make a field behave in a special way. behavior similar to css classes, very useful for mainaning larger number of similar fields.
a separate file with themes:
$theme['date'] = array ( 'datemask' => 'd.m', 'options' => 'AVFL', 'sqlw' => '...', required => true, type => 'date' );

API
['themes']['append'] = 'date' - append specified options, if not specified in other options
['themes']['overwrite'] - overwrite options (even if specified)
0000170-themes-v0.1.php.txt (5 KB) 1970-01-01 01:33

Bug Notes
hbernard   
2004-01-26 18:22   
NB: Post 5.4 issue.
As you said, this is useful mainly for large projects with multiple forms.

Maybe better in an extension ?

And, it is maybe possible to write the merge/overwrite function outside of phpMyEdit.class.php
michal   
2004-01-26 21:30   
you are right, i will do it outside pme.class.

what's your idea about this ? will it be usefull ?
hbernard   
2004-01-29 21:24   
yes, this could be useful.

If kept simple, this just a matter of merging two arrays together.
Could be an additionnal tools, but current pme policy is to have only one main file.

Need to think more about it.
hbernard   
2004-01-29 21:51   
I think this is the same as your API request :

[PHP4 only]]

$my_theme['date'] = Array(
'name' => 'Date',
'datemask' => 'd/m/Y',
'options' => 'ACPDVFL'
);

//theme append sample

$opts['fdd']['my_date_field'] = array_merge(
$my_theme['date'],
Array(
'name'=> 'birth date',
'options' => 'RACPDLVF',
'datemask' => 'm-Y',
)
);

//theme overwrite sample

$opts['fdd']['another_date_field'] = array_merge(
Array(
'name'=> 'Project start date',
),
$my_theme['date']
);

So, put $my_themes array in an included file, and that's it ?

What would be the real help for API addition ?
michal   
2004-01-29 22:00   
that's that simple ??? i am ashamed of my php knowledge....

i will create a script based on that, thank's a lot.
hbernard   
2004-02-02 11:10   
please tell me if it does fit your needs, so I may close this bug.
hbernard   
2004-02-23 18:32   
Michal, is it ok to not mess phpMyEdit with such feature ?
michal   
2004-02-23 18:57   
yes, it can be done outside without loss of functionality, so it should be done that way.

this can be marked as solved.

where should i put how-to-do-this ? (like this and data removal protection)
hbernard   
2004-02-23 19:03   
upload in the corresponding bug report. (one clean text file, please, possibly respecting basic sgml style)

I will _resolve_ bugs when they will be in a new section of the documentation called How-to if nepto agree.

This bug has been requalified in 'documentation' Category.
hbernard   
2004-11-01 21:24   
michal, didn't you promise a how-to ? ;-)
Or shall I resolve ?
michal   
2004-11-07 23:14   
uploaded some file.
change themes definitions and include before call to 'new phpMyEditClass($opts)'

comment if successful
hbernard   
2004-11-08 08:19   
OK, thanks.

Nepto, where can we put how-to like this in the documentation (in a separate folder, maybe) ?
Or shall we implement in the main class ? It could help to build high level samples...
nepto   
2004-11-10 03:09   
There will be long-time planned "Hints & Tips" documentation section. This will be one chapter of documentation. However the uploaded file has no SGML tag at all ;-)

No problem, I will SGMLize it, but tell me guys, is DocBook so difficult to learn? :)
nepto   
2004-11-27 23:43   
Well, the uploaded file is mess :-)

Hints & Tips is created now, but this is still postponed.

I will talk with Michal about the possibilities how to get this into documentation.