Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  check if a link (file) exists

phpMyEdit Configuration     check if a link (file) exists
Odoslať novú tému   Odpovedať na tému    
 
hiluc     Založený: 15.09.2004   Príspevky: 3  
Príspevok Zaslal: 2004-09-15 20:14
Návrat hore  Odpovedať s citátom     

A table including title,file_path,file_name
The title is 'clickable' and points to a file:
$opts['fdd']['title'] = array(
'name' => 'Title',
'escape' => false,
'sql|L' => 'concat("<a target=\"_blank\" href=\"",file_path,file_name,"\">",title,"</a>")',
);
Is it possible to check if the file exists (to make the clickable to non-clickable here in the opts[...]
declarations ?
thx, hiluc

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-09-18 22:36
Návrat hore  Odpovedať s citátom     

this is a candidate for a custom php function. finally something that cannot be done with sql concat :)

try patch from bug #127. should work, but that was a long time ago...

 
hsicard     Založený: 22.10.2003   Príspevky: 17  
Príspevok Zaslal: 2004-10-23 23:46
Návrat hore  Odpovedať s citátom     

This is actually possible using an idea of hbernard. See:
http://opensource.platon.sk/forum/projects/viewtopic.php?t=395

1- Each time you load the form, you create on the fly a temporary table with the information you need (for each record, your php script test if file exists. If yes you put the link. If not you could even put an input type=file

2- Through a virtual SQL|L field, you link your table with the temporay table you generated

I use this to manage image files.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov