| Index
» Projekty
» phpMyEdit
» Fórum
» URL prefix |
 |
nepto
Založený: 06.01.2003
Príspevky: 320
Bydlisko: Phoenix, Arizona (USA)
Zaslal: 2003-09-22 13:41
Návrat hore
Odpovedať s citátom
|
Not possible AFAIK.
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2003-09-22 19:46
Návrat hore
Odpovedať s citátom
|
this would be possible with my patch posted in
http://opensource.platon.sk/projects/bug_view_advanced_page.php?f_bug_id=127
if proven stable enough to implement into base class.
with this version you can make your own output function to display the url only when desired.
like:
function foo($value) {
if($value != '') return '<a href=http://'.$value'>click here</a>;
return 'not possible'
}
opts['fdd']['colname']['output_function'] = 'foo($value)';
|
hbernard
Založený: 23.03.2003
Príspevky: 159
Bydlisko: FRANCE
Zaslal: 2003-11-21 19:30
Návrat hore
Odpovedať s citátom
|
I think this is possible with 'sql' feature in current CVS.
Something like :
$opts['fdd']['column']['sql'] = 'if((column is null)or (column = ""),"",concat("<a href=\"http://",column,"\">Click Here !</a>"))';
| marco Napísal: |
Hello,
I have a little table with 2 columns.
COLUMN1 is a text
COLUMN2 is a link to an external file
I've added the following to my phpmyedit file:
$opts['fdd']['column']['name'] = 'Download';
$opts['fdd']['column']['URL'] = 'http://$value';
$opts['fdd']['column']['URLtarget'] = '_blank';
$opts['fdd']['column']['URLdisp'] = 'Click Here';
The problem is that its ALWAYS displaying "Click Here", EVEN when the column doesn't contain any data.
How can I make the script clear that I only want it to show "Click Here" when the column contains data?
Thank you! |
|
nepto
Založený: 06.01.2003
Príspevky: 320
Bydlisko: Phoenix, Arizona (USA)
Zaslal: 2003-11-21 21:33
Návrat hore
Odpovedať s citátom
|
Yes, indeed. Very nice hack!
I wonder that I wrote earlier, that this is not possible. :)
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2003-11-22 14:46
Návrat hore
Odpovedať s citátom
|
since i do not use the view operation much, i realized it only some time later. i posted a patch which should do the job in view mode.
| josef moravek Napísal: |
output_function in MI patch is very usefull,
but only in list mode, not in detail mode
|
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|