Anyway my problem is that Im attempting to create a simple music file hosting website using vBulletin 4 with the use of a very useful add-on called DownloadsII. Unfortunately my webhost has restricted the ability to change the max file upload in php.ini without upgrading my account so what Im attempting to do is replace the standard upload utility that comes with downloadsII with a flash one I found.
Im not too good with coding so I need some help placing and integrating this flash uploader so that it works in harmony with the rest of the site.
The flash uploader : http://wiki.solmetra.com/uploader
The page shows that it can be used easily with php but Im having trouble configuring it as I dont know much about it.
The site I want it integrated with:
http://deset.globalgranary.com/downloads.php?do=add (you may need to sign up as I havent fully grasped how to fully customise VBulletin)
Ive navigated to styles > downloads templates > downloads_file_addit but from there im not sure what to do ( which Is shown below) Ive tried replacing the first 12 lines with the code provided in the flash uploaders wiki, but when checking the page after refreshing, the upload button is still there and no sign of the flash one.
If you require more details please do not hesitate to ask.
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- <!--
- function uploading_file()
- {
- if (document.getElementById('uploadfield').value != '' && document.getElementById('title').value != '')
- {
- document.getElementById('uploadbusy').style.display = 'block';
- }
- }
- //-->
- </script>
- <form class="vbform block" enctype="multipart/form-data" action="downloads.php?do=<vb:if condition="$_GET['do']=='edit'">edit&id={vb:raw file.id}<vb:else />add</vb:if>" method="post" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(this.title.value, {vb:raw vboptions.postminchars})">
- <vb:if condition="$show['errors']">
- <div class="blockbody errorblock">
- <h2 class="blockhead">{vb:rawphrase dl2_errors_occured_when_submitted}:</h2>
- <ul class="blockrow error">
- {vb:raw errorlist}
- </ul>
- </div>
- </vb:if>
- <h2 class="blockhead">{vb:raw dlcustomtitle}</h2>
- <div class="blockbody formcontrols">
- <div class="blockrow">
- <label for="title">{vb:rawphrase dl2_file_name}:</label>
- <div><input type="text" class="primary textbox" name="title" id="title" value="{vb:raw newfile.title}" maxlength="50" tabindex="1" /></div>
- </div>
- <div class="blockrow">
- <label for="dlauthor_ctrl">{vb:rawphrase dl2_author}:</label>
- <div id="dlauthor" class="popupmenu nomouseover noclick nohovermenu">
- <textarea class="primary textbox popupctrl" id="dlauthor_ctrl" name="author" rows="1" cols="50" tabindex="1">{vb:raw newfile.author}</textarea>
- </div>
- <vb:if condition="$vboptions['dl2namesugg'] != 'disabled'">
- <script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script>
- <script type="text/javascript">
- <!--
- dlauthor_sugg = new vB_AJAX_NameSuggest('dlauthor_sugg', 'dlauthor_ctrl', 'dlauthor');
- dlauthor_sugg.allow_multiple = <vb:if condition="$vboptions['dl2namesugg'] == 'multiple'">true<vb:else />false</vb:if>;
- //-->
- </script>
- </vb:if>
- </div>
- {vb:raw messagearea}
- <div class="blockrow">
- <label for="category">{vb:rawphrase dl2_category}:</label>
- <div>
- <select class="primary" name="category" id="category" tabindex="1">
- {vb:raw category_select}
- </select>
- </div>
- </div>
- <div class="blockrow">
- <label for="cb_pin"><input type="checkbox" name="pin" id="cb_pin" value="1" tabindex="1" {vb:raw pinned} /> {vb:rawphrase dl2_pinned}</label>
- </div>
- </div>
- <vb:if condition="$_GET['do'] == 'edit'">
- <h2 class="blockhead">{vb:rawphrase dl2_assign_new_uploader}</h2>
- <div class="blockbody formcontrols">
- <div class="blockrow">
- <label for="dlassign_ctrl">{vb:rawphrase dl2_new_uploader}:</label>
- <p class="description">{vb:rawphrase dl2_assign_new_match}</p>
- <div id="dlassign" class="popupmenu nomouseover noclick nohovermenu">
- <input type="text" class="textbox popupctrl" id="dlassign_ctrl" name="uploader" value="{vb:raw newfile.uploader}" tabindex="1" />
- </div>
- <vb:if condition="$vboptions['dl2namesugg'] == 'disabled'">
- <script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script>
- </vb:if>
- <script type="text/javascript">
- <!--
- snc = new vB_AJAX_NameSuggest('snc', 'dlassign_ctrl', 'dlassign');
- //-->
- </script>
- </div>
- </div>
- </vb:if>
- <h2 class="blockhead">{vb:rawphrase dl2_upload_or_link_to}</h2>
- <div class="blockbody formcontrols">
- <vb:if condition="$show['uploadfiles']">
- <div class="blockrow">
- <label for="uploadfield">{vb:rawphrase dl2_upload_a_file}:</label>
- <p class="description" id="uploadbusy" style="display:none"><img class="inlineimg" src="{vb:stylevar imgdir_misc}/progress.gif" alt="" /> {vb:rawphrase dl2_uploading_file_please_wait}</p>
- <vb:comment><input type="hidden" name="MAX_FILE_SIZE" value="{vb:raw inimaxattach}" /></vb:comment>
- <div><input type="file" class="primary textbox" name="upload" id="uploadfield" tabindex="1" /></div>
- </div>
- </vb:if>
- <vb:if condition="$show['linktofiles']">
- <div class="blockrow">
- <label for="link">{vb:rawphrase dl2_link_to_a_file}:</label>
- <div><input type="text" class="primary textbox" name="link" id="link" maxlength="250" tabindex="1" <vb:if condition="$newfile['link']">value="{vb:raw newfile.url}"</vb:if> /></div>
- </div>
- <div class="blockrow">
- <label for="size">{vb:rawphrase dl2_link_file_size}:</label>
- <div><input type="text" class="textbox" name="size" id="size" maxlength="10" tabindex="1" <vb:if condition="$newfile['link']">value="{vb:raw newfile.size}"</vb:if> /></div>
- </div>
- </vb:if>
- </div>
- <div class="blockfoot actionbuttons">
- <div class="group">
- <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
- <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
- <input type="submit" onclick="uploading_file()" class="button" name="submit" value="{vb:raw dlcustomtitle}" accesskey="s" tabindex="1" />
- </div>
- </div>
- </form>