| View previous topic :: View next topic |
| Author |
Message |
sharing1
Joined: 04 Nov 2011 Posts: 6
|
Posted: Nov 04, 2011 12:45 pm Post subject: Change Default Upload Type? |
|
|
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 |
|
 |
sharing1
Joined: 04 Nov 2011 Posts: 6
|
Posted: Nov 05, 2011 1:46 pm Post subject: |
|
|
| nobody? |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Nov 06, 2011 12:05 am Post subject: |
|
|
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>
<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>
|
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>
<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>
|
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 |
|
 |
sharing1
Joined: 04 Nov 2011 Posts: 6
|
Posted: Nov 06, 2011 8:36 am Post subject: |
|
|
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 |
|
 |
nyan
Joined: 28 Oct 2010 Posts: 121
|
Posted: Nov 06, 2011 1:46 pm Post subject: |
|
|
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 |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Nov 06, 2011 2:08 pm Post subject: |
|
|
| Code: | | id="r_file" checked |
checked = selected button
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 |
|
 |
sharing1
Joined: 04 Nov 2011 Posts: 6
|
Posted: Nov 06, 2011 6:15 pm Post subject: |
|
|
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 |
|
 |
nyan
Joined: 28 Oct 2010 Posts: 121
|
Posted: Nov 06, 2011 9:37 pm Post subject: |
|
|
| 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 |
|
 |
|