| View previous topic :: View next topic |
| Author |
Message |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Mar 05, 2008 8:34 pm Post subject: 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 |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1055 Location: Undisclosed location
|
Posted: Mar 06, 2008 11:28 am Post subject: |
|
|
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 |
|
 |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Mar 06, 2008 12:03 pm Post subject: |
|
|
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 |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1055 Location: Undisclosed location
|
Posted: Mar 06, 2008 12:22 pm Post subject: |
|
|
Easiest way is to set width/height in CSS.
Just edit this style:
| Code: | | .fdescr {width: 300px;} |
|
|
| Back to top |
|
 |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Mar 06, 2008 1:47 pm Post subject: |
|
|
i thought that would be it, i just wanted to check that was the best way
Cheers man |
|
| Back to top |
|
 |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Mar 27, 2008 6:39 pm Post subject: |
|
|
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 |
|
 |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Apr 01, 2008 4:32 pm Post subject: |
|
|
any ideas on this yet?
Ta |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1055 Location: Undisclosed location
|
Posted: Apr 02, 2008 5:32 am Post subject: |
|
|
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 |
|
 |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Apr 02, 2008 12:18 pm Post subject: |
|
|
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 |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1055 Location: Undisclosed location
|
Posted: Apr 03, 2008 8:32 am Post subject: |
|
|
replace
| Code: | | $fhash{file_descr} =~ s/[\n\r]//g; |
with
| Code: | | $fhash{file_descr} =~ s/[\n\r]+/ /g; |
|
|
| Back to top |
|
 |
Bassman
Joined: 07 Sep 2007 Posts: 18 Location: UK
|
Posted: Apr 03, 2008 11:25 am Post subject: |
|
|
| That worked thanks! |
|
| Back to top |
|
 |
raicio
Joined: 16 Apr 2008 Posts: 2
|
Posted: Apr 16, 2008 12:19 pm Post subject: 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 |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1055 Location: Undisclosed location
|
Posted: May 05, 2008 10:25 am Post subject: |
|
|
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 |
|
 |
raicio
Joined: 16 Apr 2008 Posts: 2
|
Posted: May 05, 2008 12:40 pm Post subject: wonderful! |
|
|
works like a charm!
thank you very much |
|
| Back to top |
|
 |
|