Alas, if File Upload just had a "URL only" parameter
Posted: 29 April 2008 04:03 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  45
Joined  2006-07-16

This would be really nice, as there’s no version of the extract_url plug in that I find works consistently (likely to do with interactions with the SAEF or Form Helper...)

How hard would it be to add a “URL only” parameter in the file placement part of File Upload, if the Expression Engine file upload gives you the options of embedded link or URL only?

Cheers

R o B

Profile
 
 
Posted: 30 April 2008 06:17 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

I will note this as a feature request.... though in the meantime, if you don’t need the option of either, and prefer only the URL, you can do a little hack smile

mod.file_upload.php around line 387, theoretically, you can strip out what you don’t want: rasberry

if ($data['is_image'== 1)
  
{
   $imgsrc 
"<img src=\"{filedir_".$data['id']."}".$data['file_name']."\"".$properties;
   
   
$wh '';
   
   if (
function_exists('getimagesize')) 
   
{
    $imgdim 
= @getimagesize($query->row['server_path'].$data['file_name']);
    
    if (
is_array($imgdim)) 
    
{
     $imgsrc 
.= " width=\"".$imgdim['0']."\" height=\"".$imgdim['1']."\"";
     
     
$wh "width=".($imgdim['0']+15).",height=".($imgdim['1']+15).",";
    
}
   }
   
   $imgsrc 
.= " />";

 Signature 
Profile
 
 
Posted: 30 April 2008 10:54 PM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  45
Joined  2006-07-16

Oh my! Thank you! I’ll try it when returning to that site in a bit.. right now I am distracted by one of the other projects I am juggling.

Profile