XFileSharing Free - Description box
Description box
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
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
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Just tested - this is possble.
Update xdescr style in main.css:
then in xupload.js replace these 2 lines:
with
Update xdescr style in main.css:
Code: Select all
.xdescr {color: #aaa;vertical-align:top;}
Code: Select all
var new_row_descr = document.createElement( 'input' );
new_row_descr.type = 'text';
Code: Select all
var new_row_descr = document.createElement( 'textarea' );
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Easiest way is to set width/height in CSS.
Just edit this style:
Just edit this style:
Code: Select all
.fdescr {width: 300px;}
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
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
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
I guess you have txt files based XFS version. No such bug should be in SQL latest version.
In upload.cgi find
and add line below:
In upload.cgi find
Code: Select all
$fhash{file_descr} = $cg->param("$k\_descr");
Code: Select all
$fhash{file_descr} =~ s/[\n\r]//g;
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
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
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
replace
with
Code: Select all
$fhash{file_descr} =~ s/[\n\r]//g;
Code: Select all
$fhash{file_descr} =~ s/[\n\r]+/ /g;
Making it mandatory
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
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Oh sorry, I've abandoned this thread a bit, here goes quick hack:
in xupload.js find
and add below:
in xupload.js find
Code: Select all
if(!checkExt(current))return false;
Code: Select all
if(f1.elements[current.name+'_descr'].value==''){alert('Description required');return false;}
wonderful!
works like a charm!
thank you very much
thank you very much