XFileSharing Pro - Making export links show thumbs 1- Page 2

Powerfull XFileSharing version

Moderator: admin

Message
Author
Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#16 Postby Jesse202 » Aug 27, 2012 2:49 pm

hmmm anyone else?

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#17 Postby Jesse202 » Aug 30, 2012 11:16 pm

bump? Tried support. they said no idea. This seems so basic. Why would exporting links not give thumbs? You get thumbs when you upload. Why would it only provide names when exporting?

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#18 Postby Jesse202 » Sep 26, 2012 6:18 pm

anyone else?

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#19 Postby Jesse202 » Sep 29, 2012 2:54 pm

how can this not be part of the image mod? I still cannot wrap my head around why you people think users would want names or files and not thumbs?

verzing
Posts: 141
Joined: Mar 02, 2011 7:00 pm

#20 Postby verzing » Oct 21, 2012 8:05 am

If you already have image mod, make sure you are Enable it,
login to ftp open file XFileconfig.cgi and find

Code: Select all

 # Show images instantly
 image_mod => '1',


make sure its # 1 , if its empty you can put number 1 then click save .
It should work. Im just fixed for my site.[/code]

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#21 Postby Jesse202 » Nov 25, 2012 6:42 am

I've changed this code:

###########################
$file->{download_link} = $ses->makeFileLink($file);
if($c->{image_mod} && $file->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i)
{
$ses->getThumbLink($file);
}
else
{
$file->{fsize} = $ses->makeFileSize($file->{file_size});
}
###########################


to this code:

###########################
$file->{download_link} = $ses->makeFileLink($file);
if($c->{image_mod} && $file->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i)
{
$ses->getThumbLink($file);
}
else
{
$ses->getThumbLink($file);
$file->{fsize} = $ses->makeFileSize($file->{file_size});
}
###########################

And now it is working. Noticed that it is failing the if statement:

if($c->{image_mod} && $file->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i)

It is saying that IF the variable $c->{image_mod} exists AND the filename ends with one of the supported extensions, THEN execute the getThumbLink subroutine. The variable $file->{thumb_url} only exists if that subroutine is executed. The "push" statements that follow the code above are compacted if statements. It EITHER shows the first part before the : or the 2nd part depending on if $file->thumb_url exists.


It is possible you can change the code in XFileConfig.pm line 105 to:

image_mod => '1',

OneManCrew
Posts: 12
Joined: Mar 07, 2013 5:52 pm

#22 Postby OneManCrew » Apr 18, 2013 9:51 am

I agree, this should be a part of the image mod.

I didn't manage to get it to work.. can you explain further more.. what template do you edit so the thumb will appear after the image / images were uploaded?

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#23 Postby Jesse202 » Apr 18, 2013 12:16 pm

The above is not a template file. It's the index.cgi file


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests