RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
Change Default Upload Type?

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



Joined: 04 Nov 2011
Posts: 6

PostPosted: Nov 04, 2011 12:45 pm    Post subject: Change Default Upload Type? Reply with quote

I wanna use flash upload instead of normal upload as main upload how can i do that?

i searched the forum but couldnt find anything just a thread where the admin say its already answered
Back to top
View user's profile Send private message
sharing1



Joined: 04 Nov 2011
Posts: 6

PostPosted: Nov 05, 2011 1:46 pm    Post subject: Reply with quote

nobody?
Back to top
View user's profile Send private message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 06, 2011 12:05 am    Post subject: Reply with quote

i can not find it eather , so probaly it does not exist or we search wrong

anyway
here is your solution

open upload.html
search for this text
Code:


<div id="utmodes">
<input type="radio" name="ut" value="file" onClick="changeUploadType('file')" id="r_file" checked><label for="r_file"><TMPL_VAR lang_file_upload></label> &nbsp;
<TMPL_IF mmff><input type="radio" name="ut" value="ff" onClick="changeUploadType('ff')" id="r_ff"><label for="r_ff"><TMPL_VAR lang_upload_flash></label> &nbsp; </TMPL_IF>
<input type="radio" name="ut" value="url" onClick="changeUploadType('url')" id="r_url"><label for="r_url"><TMPL_VAR lang_url_upload></label> &nbsp;
<TMPL_IF mmrr><input type="radio" name="ut" value="rs" onClick="changeUploadType('rs')" id="r_rs"><label for="r_rs"><TMPL_VAR lang_free_rs_leech></label></TMPL_IF>
<TMPL_IF mmtt> &nbsp; <input type="radio" name="ut" value="tt" onClick="changeUploadType('tt')" id="r_tt"><label for="r_tt"><TMPL_VAR lang_form_torrent></label></TMPL_IF>
</div>

now to change your default then just look at this text
Code:

<input type="radio" name="ut" value="file" onClick="changeUploadType('file')" id="r_file" checked>

do you see the end of it ??
it says Checked
Code:

 id="r_file" checked

remove that text "checked" and place it on the flash or other other upload you like
so you get like this
Code:

<input type="radio" name="ut" value="file" onClick="changeUploadType('file')" id="r_file"><label for="r_file"><TMPL_VAR lang_file_upload></label> &nbsp;
<TMPL_IF mmff><input type="radio" name="ut" value="ff" onClick="changeUploadType('ff')" id="r_ff" checked><label for="r_ff"><TMPL_VAR lang_upload_flash></label> &nbsp; </TMPL_IF>


and then your default upload will always be the upload methode that you putted checked on

please note , DO NOT CHECK 2 THINGS AT THE SAME TIME
so be sure to check your code and that only 1 line contains "checked"

Greetings From PowerChaos
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
sharing1



Joined: 04 Nov 2011
Posts: 6

PostPosted: Nov 06, 2011 8:36 am    Post subject: Reply with quote

not working

new code is looking like this

Code:
<div id="utmodes">
<input type="button" value="<TMPL_VAR lang_file_upload>" onClick="changeUploadType('file')" id="r_file" class="active">
<TMPL_IF mmff>
<input type="button" value="<TMPL_VAR lang_upload_flash>" onClick="changeUploadType('ff')" id="r_ff">
</TMPL_IF>
<input type="button" value="<TMPL_VAR lang_url_upload>" onClick="changeUploadType('url')" id="r_url">
<TMPL_IF mmrr>
<input type="button" value="<TMPL_VAR lang_free_rs_leech>" onClick="changeUploadType('rs')" id="r_rs">

</TMPL_IF>
<TMPL_IF mmtt>
<input type="button" value="<TMPL_VAR lang_form_torrent>" onClick="changeUploadType('tt')" id="r_tt" style="margin:0">
</TMPL_IF>
</div>

and if you change active than u have just a differrent font color but it appears the normal upload
Back to top
View user's profile Send private message
nyan



Joined: 28 Oct 2010
Posts: 121

PostPosted: Nov 06, 2011 1:46 pm    Post subject: Reply with quote

a quick dirty way to do this would be to put
<script type="text/javascript">
changeUploadType('ff');
</script>
at the bottom of upload_form.html
Back to top
View user's profile Send private message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 06, 2011 2:08 pm    Post subject: Reply with quote

Code:
id="r_file" checked 

Code:
 Checked


checked = selected button

Code:

Class = Active

that part is just CSS -> shows a color if it is selected

Code:

<input type="button" value="<TMPL_VAR lang_file_upload>" onClick="changeUploadType('file')" id="r_file" class="active" checked>

thats how it need to look

that is just basic html for forms ... and the upload form is .. a form

Greetings From PowerChaos
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
sharing1



Joined: 04 Nov 2011
Posts: 6

PostPosted: Nov 06, 2011 6:15 pm    Post subject: Reply with quote

like i said its not working..i already tried these simple things as first step

but the other solution is working maybe not pretty but it does the work..thanks
Back to top
View user's profile Send private message
nyan



Joined: 28 Oct 2010
Posts: 121

PostPosted: Nov 06, 2011 9:37 pm    Post subject: Reply with quote

PowerChaos wrote:


that is just basic html for forms ... and the upload form is .. a form

Greetings From PowerChaos

The form isn't a single form.
There are 2 to 4 forms, depending on your mods, which all are loaded.
By default one form-div is displayed via display:block; or the visibility style. the rest are display:none (or visibility:none);
via javascript you can then change the style attributes with document.divname.element.style.display = block, none;
this is what the changeuploadtype function does.
If you want to do it in a clean way you can swap around these block's and none's but it's quite some effort to figure it all out (it's in xupload.js in my xfs 1.5)
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 Pro 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