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
XFileSharing Pro - Change Default Upload Type?
-
- Posts: 521
- Joined: Dec 19, 2009 5:12 pm
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
now to change your default then just look at this text
do you see the end of it ??
it says Checked
remove that text "checked" and place it on the flash or other other upload you like
so you get like this
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
anyway
here is your solution
open upload.html
search for this text
Code: Select all
<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>
<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> </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>
<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> <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>
Code: Select all
<input type="radio" name="ut" value="file" onClick="changeUploadType('file')" id="r_file" checked>
it says Checked
Code: Select all
id="r_file" checked
so you get like this
Code: Select all
<input type="radio" name="ut" value="file" onClick="changeUploadType('file')" id="r_file"><label for="r_file"><TMPL_VAR lang_file_upload></label>
<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> </TMPL_IF>
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
not working
new code is looking like this
and if you change active than u have just a differrent font color but it appears the normal upload
new code is looking like this
Code: Select all
<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>
-
- Posts: 521
- Joined: Dec 19, 2009 5:12 pm
Code: Select all
id="r_file" checked
Code: Select all
Checked
Code: Select all
Class = Active
Code: Select all
<input type="button" value="<TMPL_VAR lang_file_upload>" onClick="changeUploadType('file')" id="r_file" class="active" checked>
that is just basic html for forms ... and the upload form is .. a form
Greetings From PowerChaos
The form isn't a single form.PowerChaos wrote:
that is just basic html for forms ... and the upload form is .. a form
Greetings From PowerChaos
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)