SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
Description box

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing
View previous topic :: View next topic  
Author Message
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Mar 05, 2008 8:34 pm    Post subject: Description box Reply with quote

Hi
After you browse to a file the description box appears, can this be made bigger, multiline if possible so it is more like a message box?

I use XlFilesharing standard not pro at the moment.

cheers
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1055
Location: Undisclosed location

PostPosted: Mar 06, 2008 11:28 am    Post subject: Reply with quote

Just tested - this is possble.

Update xdescr style in main.css:
Code:
.xdescr  {color: #aaa;vertical-align:top;}


then in xupload.js replace these 2 lines:
Code:
var new_row_descr = document.createElement( 'input' );
new_row_descr.type = 'text';

with
Code:
var new_row_descr = document.createElement( 'textarea' );
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Mar 06, 2008 12:03 pm    Post subject: Reply with quote

Thanks for your quick response.

I have made those changes thank you, is it possible to adjust the vertical size of the textarea to say 5 rows/lines etc.

Thanks for your help it is much appreciated.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1055
Location: Undisclosed location

PostPosted: Mar 06, 2008 12:22 pm    Post subject: Reply with quote

Easiest way is to set width/height in CSS.
Just edit this style:
Code:
.fdescr {width: 300px;}
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Mar 06, 2008 1:47 pm    Post subject: Reply with quote

i thought that would be it, i just wanted to check that was the best way

Cheers man
Back to top
View user's profile Send private message
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Mar 27, 2008 6:39 pm    Post subject: Reply with quote

Hi
After trying this for a while we now have some problems.
It would seem that if the user presses the return key, i.e inserts line breaks in the description text it causes the following problems.

1: The delete id is not valid- can't delete files now

2: Sometimes the password box appears on the download page even though no password has been entered.

3: On the downloads page, Downloads should display 0 at first, but now it has random text there, if you download the file and refresh the page it then shows 1, which is normal.

I have tried it with no line breaks in the description and it all works as normal, so it looks like its the line breaks.

My users do like the description box being more like a message box, but they are all using line breaks in the description, like this post is layed out etc.

Can we do anything about this?

Cheers
Back to top
View user's profile Send private message
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Apr 01, 2008 4:32 pm    Post subject: Reply with quote

any ideas on this yet?

Ta
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1055
Location: Undisclosed location

PostPosted: Apr 02, 2008 5:32 am    Post subject: Reply with quote

I guess you have txt files based XFS version. No such bug should be in SQL latest version.

In upload.cgi find
Code:
$fhash{file_descr} = $cg->param("$k\_descr");

and add line below:
Code:
$fhash{file_descr} =~ s/[\n\r]//g;
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Apr 02, 2008 12:18 pm    Post subject: Reply with quote

Hi Pilgrim thanks for your response.

I tried what you said and it removes the line breaks etc.

It still causes one problem only on the download page, the description has the spaces between the words removed where the line break was also.

message entered was:
Hi
just testing this line break thingy

cheers
bassman

on the success links page it looks like this after the line breaks have been removed

Hi just testing this line break thingy cheers bassman

on the download page it looks like this

Hijust testing this line break thingycheersbassman

nearly there though

thanks in advance for your help
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1055
Location: Undisclosed location

PostPosted: Apr 03, 2008 8:32 am    Post subject: Reply with quote

replace
Code:
$fhash{file_descr} =~ s/[\n\r]//g;

with
Code:
$fhash{file_descr} =~ s/[\n\r]+/ /g;
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Apr 03, 2008 11:25 am    Post subject: Reply with quote

That worked thanks!
Back to top
View user's profile Send private message
raicio



Joined: 16 Apr 2008
Posts: 2

PostPosted: Apr 16, 2008 12:19 pm    Post subject: Making it mandatory Reply with quote

Hello! I am quite satisfied about Xfilesharing, but it would really be great if I could make the Description field mandatory. Do you have any quick tips? Thanx
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1055
Location: Undisclosed location

PostPosted: May 05, 2008 10:25 am    Post subject: Reply with quote

Oh sorry, I've abandoned this thread a bit, here goes quick hack:
in xupload.js find
Code:
if(!checkExt(current))return false;

and add below:
Code:
if(f1.elements[current.name+'_descr'].value==''){alert('Description required');return false;}
Back to top
View user's profile Send private message Visit poster's website AIM Address
raicio



Joined: 16 Apr 2008
Posts: 2

PostPosted: May 05, 2008 12:40 pm    Post subject: wonderful! Reply with quote

works like a charm!

thank you very much
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group