By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,729 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,729 IT Pros & Developers. It's quick & easy.

Help integrating a flash uploader with a vbulletin mod!

P: 27
I have tried asking for help on multiple forums including VB with no responses.

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
  1. <script type="text/javascript">
  2. <!--
  3. function uploading_file()
  4. {
  5.     if (document.getElementById('uploadfield').value != '' && document.getElementById('title').value != '')
  6.     {
  7.         document.getElementById('uploadbusy').style.display = 'block';
  8.     }
  9. }
  10. //-->
  11. </script>
  12.  
  13. <form class="vbform block" enctype="multipart/form-data" action="downloads.php?do=<vb:if condition="$_GET['do']=='edit'">edit&amp;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})">
  14.     <vb:if condition="$show['errors']">
  15.     <div class="blockbody errorblock">
  16.         <h2 class="blockhead">{vb:rawphrase dl2_errors_occured_when_submitted}:</h2>
  17.         <ul class="blockrow error">
  18.             {vb:raw errorlist}
  19.         </ul>
  20.     </div>
  21.     </vb:if>
  22.  
  23.     <h2 class="blockhead">{vb:raw dlcustomtitle}</h2>
  24.     <div class="blockbody formcontrols">
  25.  
  26.         <div class="blockrow">
  27.             <label for="title">{vb:rawphrase dl2_file_name}:</label>
  28.             <div><input type="text" class="primary textbox" name="title" id="title" value="{vb:raw newfile.title}" maxlength="50" tabindex="1" /></div>
  29.         </div>
  30.  
  31.         <div class="blockrow">
  32.             <label for="dlauthor_ctrl">{vb:rawphrase dl2_author}:</label>
  33.             <div id="dlauthor" class="popupmenu nomouseover noclick nohovermenu">
  34.                 <textarea class="primary textbox popupctrl" id="dlauthor_ctrl" name="author" rows="1" cols="50" tabindex="1">{vb:raw newfile.author}</textarea>
  35.             </div>
  36.  
  37.             <vb:if condition="$vboptions['dl2namesugg'] != 'disabled'">
  38.             <script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script>
  39.             <script type="text/javascript">
  40.             <!--
  41.                 dlauthor_sugg = new vB_AJAX_NameSuggest('dlauthor_sugg', 'dlauthor_ctrl', 'dlauthor');
  42.                 dlauthor_sugg.allow_multiple = <vb:if condition="$vboptions['dl2namesugg'] == 'multiple'">true<vb:else />false</vb:if>;
  43.             //-->
  44.             </script>
  45.             </vb:if>
  46.         </div>
  47.  
  48.         {vb:raw messagearea}
  49.  
  50.         <div class="blockrow">
  51.             <label for="category">{vb:rawphrase dl2_category}:</label>
  52.             <div>
  53.                 <select class="primary" name="category" id="category" tabindex="1">
  54.                 {vb:raw category_select}
  55.                 </select>
  56.             </div>
  57.         </div>
  58.  
  59.         <div class="blockrow">
  60.             <label for="cb_pin"><input type="checkbox" name="pin" id="cb_pin" value="1" tabindex="1" {vb:raw pinned} /> {vb:rawphrase dl2_pinned}</label>
  61.         </div>
  62.  
  63.     </div>
  64.  
  65.     <vb:if condition="$_GET['do'] == 'edit'">
  66.     <h2 class="blockhead">{vb:rawphrase dl2_assign_new_uploader}</h2>
  67.     <div class="blockbody formcontrols">
  68.  
  69.         <div class="blockrow">
  70.             <label for="dlassign_ctrl">{vb:rawphrase dl2_new_uploader}:</label>
  71.             <p class="description">{vb:rawphrase dl2_assign_new_match}</p>
  72.             <div id="dlassign" class="popupmenu nomouseover noclick nohovermenu">
  73.                 <input type="text" class="textbox popupctrl" id="dlassign_ctrl" name="uploader" value="{vb:raw newfile.uploader}" tabindex="1" />
  74.             </div>
  75.  
  76.             <vb:if condition="$vboptions['dl2namesugg'] == 'disabled'">
  77.             <script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script>
  78.             </vb:if>
  79.             <script type="text/javascript">
  80.             <!--
  81.                 snc = new vB_AJAX_NameSuggest('snc', 'dlassign_ctrl', 'dlassign');
  82.             //-->
  83.             </script>
  84.         </div>
  85.  
  86.     </div>
  87.     </vb:if>
  88.  
  89.     <h2 class="blockhead">{vb:rawphrase dl2_upload_or_link_to}</h2>
  90.     <div class="blockbody formcontrols">
  91.  
  92.         <vb:if condition="$show['uploadfiles']">
  93.         <div class="blockrow">
  94.             <label for="uploadfield">{vb:rawphrase dl2_upload_a_file}:</label>
  95.             <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>
  96.             <vb:comment><input type="hidden" name="MAX_FILE_SIZE" value="{vb:raw inimaxattach}" /></vb:comment>
  97.             <div><input type="file" class="primary textbox" name="upload" id="uploadfield" tabindex="1" /></div>
  98.         </div>
  99.         </vb:if>
  100.  
  101.         <vb:if condition="$show['linktofiles']">
  102.         <div class="blockrow">
  103.             <label for="link">{vb:rawphrase dl2_link_to_a_file}:</label>
  104.             <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>
  105.         </div>
  106.         <div class="blockrow">
  107.             <label for="size">{vb:rawphrase dl2_link_file_size}:</label>
  108.             <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>
  109.         </div>
  110.         </vb:if>
  111.  
  112.     </div>
  113.     <div class="blockfoot actionbuttons">
  114.         <div class="group">
  115.             <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
  116.             <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
  117.             <input type="submit" onclick="uploading_file()" class="button" name="submit" value="{vb:raw dlcustomtitle}" accesskey="s" tabindex="1" />
  118.         </div>
  119.     </div>
  120. </form>
Jun 12 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.