Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Unit Converter for DownloadsII Details »»
Unit Converter for DownloadsII
Version: 1.00, by Arcade Fire Arcade Fire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.0.2 Rating:
Released: 03-06-2010 Last Update: Never Installs: 38
Supported Template Edits
Re-useable Code Translations  

This template change is for the product


DownloadsII

by RS_Jelle

What makes this modification?

adds a unit conversion when a user upload a new file through a link. Thus, you can fill in box size in bytes, converted directly from larger units (Mb, Gb), preventing the box is empty on input size.


Instructions:

1. Open downloads2_file_addit template.
2.
Replaces all content by this:

Code:
<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&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})">
    <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>
                <div class="blockrow">
                         <div align="center"><font style='font-size: 30px;' face='Verdana, Arial, Helvetica, sans-serif'><b>Unit Converter</b></font><hr></div>
<p align="left">With this unit converter, you can go from bytes to gigabytes through Kbs. and Mbs. with a single click.</p>
<p align="left">It is very intuitive to use, enter the amount you want in the corresponding box and click the button underneath.
  <script language="JavaScript">
<!--

  function convert(f) {
    f.kb.value=Math.round(f.byte.value/1024*100000)/100000
    f.mb.value=Math.round(f.byte.value/1048576*100000)/100000
    f.gb.value=Math.round(f.byte.value/1073741824*100000)/100000
     
  }

function convertkb(f) {
    f.byte.value=Math.round(f.kb.value*1024*100000)/100000
    f.mb.value=Math.round(f.kb.value/1024*100000)/100000
    f.gb.value=Math.round(f.kb.value/1048576*100000)/100000
     
  }

function convertmb(f) {
    f.byte.value=Math.round(f.mb.value*1048576*100000)/100000
    f.kb.value=Math.round(f.mb.value*1024*100000)/100000
    f.gb.value=Math.round(f.mb.value/1024*100000)/100000
     
  }

function convertgb(f) {
    f.byte.value=Math.round(f.gb.value*1073741824*100000)/100000
    f.kb.value=Math.round(f.gb.value*1048576*100000)/100000
    f.mb.value=Math.round(f.gb.value*1024*100000)/100000
     
  }
  

// -->

</script>
</p>

<form>
  <div align="center">
    <table border="1" style="dashed" border-color="#ccc" bgcolor="#ffffff" cellpadding="3" cellspacing="3">
      <tr> 
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">Byte</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Kilobyte&nbsp;&nbsp;</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Megabyte&nbsp;&nbsp;</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Gigabyte&nbsp;&nbsp;</font></td>

      </tr>
      <tr> 
        <td align="center"> 
          <input type="text" size="10"
        name="byte" value="0">
        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="kb" value="0">
        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="mb" value="0">

        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="gb" value="0">
        </td>
      </tr>
      <tr> 
        <td align="center"> 
          <input type="button" name="B2" value="   &gt;   "
        onClick="convert(this.form)">
        </td>
        <td align="center"> 
          <input type="button" name="B22" value="   &lt; &gt;   "
        onClick="convertkb(this.form)">

        </td>
        <td align="center"> 
          <input type="button" name="B23" value="   &lt; &gt;   "
        onClick="convertmb(this.form)">
        </td>
        <td align="center"> 
          <input type="button" name="B24" value="   &lt;   "
        onClick="convertgb(this.form)">
        </td>
      </tr>
    </table>

  <br></div>
</form>
        </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>
3. Click to Mark as Installed.


Screenshot:



Conflicts: "Add File" button doesn't work after installation (working on it)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
gec100

Comments
  #12  
Old 04-18-2011, 07:53 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, have long turned to the Verson 3.8 on my forum.

Try to fix it in the next few days, a localhost installation which.

Sorry for the inconvenience,

Arcade Fire.
Reply With Quote
  #13  
Old 05-11-2011, 03:58 PM
billstelling's Avatar
billstelling billstelling is offline
 
Join Date: Apr 2011
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep, thanks for this one. had a few members request it. for anyone interested i did an english translation of the downloadsII extras mod in the mods section.
https://vborg.vbsupport.ru/showpost....6&postcount=35
Reply With Quote
  #14  
Old 05-17-2011, 03:41 PM
bajrice bajrice is offline
 
Join Date: Dec 2010
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this,... just add this on the bottom in downloads2_file_addit

Code:
<!--  -->
<div id="kostenlosejavascripts" align="center"></div>
<br />
<!--  -->
Reply With Quote
  #15  
Old 06-08-2011, 12:19 PM
CaptCom CaptCom is offline
 
Join Date: Apr 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the conflicting: "Add File" button doesn't work after installation fixed?
Reply With Quote
  #16  
Old 06-12-2011, 11:59 AM
pizzamargherita pizzamargherita is offline
 
Join Date: Aug 2010
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"Add file" button doesn't work with this mod...
Useful, but not ready to use.
Reply With Quote
  #17  
Old 06-19-2011, 03:20 AM
BioTek BioTek is offline
 
Join Date: Oct 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here I edit the code so it will work. You may have to edit the table color to match your site.
Code:
<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&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})">
    <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>
                <div class="blockrow">
                         <div align="center"><font style='font-size: 30px;' face='Verdana, Arial, Helvetica, sans-serif'><b>Unit Converter</b></font><hr></div>
<p align="left">With this unit converter, you can go from bytes to gigabytes through Kbs. and Mbs. with a single click.</p>
<p align="left">It is very intuitive to use, enter the amount you want in the corresponding box and click the button underneath.
  <script language="JavaScript">
<!--

  function convert(f) {
    f.kb.value=Math.round(f.byte.value/1024*100000)/100000
    f.mb.value=Math.round(f.byte.value/1048576*100000)/100000
    f.gb.value=Math.round(f.byte.value/1073741824*100000)/100000
     
  }

function convertkb(f) {
    f.byte.value=Math.round(f.kb.value*1024*100000)/100000
    f.mb.value=Math.round(f.kb.value/1024*100000)/100000
    f.gb.value=Math.round(f.kb.value/1048576*100000)/100000
     
  }

function convertmb(f) {
    f.byte.value=Math.round(f.mb.value*1048576*100000)/100000
    f.kb.value=Math.round(f.mb.value*1024*100000)/100000
    f.gb.value=Math.round(f.mb.value/1024*100000)/100000
     
  }

function convertgb(f) {
    f.byte.value=Math.round(f.gb.value*1073741824*100000)/100000
    f.kb.value=Math.round(f.gb.value*1048576*100000)/100000
    f.mb.value=Math.round(f.gb.value*1024*100000)/100000
     
  }
  

// -->

</script>
</p>

  <div align="center">
    <table border="1" style="dashed" border-color="#ccc" bgcolor="#ffffff" cellpadding="3" cellspacing="3">
      <tr> 
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">Byte</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Kilobyte&nbsp;&nbsp;</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Megabyte&nbsp;&nbsp;</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Gigabyte&nbsp;&nbsp;</font></td>

      </tr>
      <tr> 
        <td align="center"> 
          <input type="text" size="10"
        name="byte" value="0">
        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="kb" value="0">
        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="mb" value="0">

        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="gb" value="0">
        </td>
      </tr>
      <tr> 
        <td align="center"> 
          <input type="button" name="B2" value="   &gt;   "
        onClick="convert(this.form)">
        </td>
        <td align="center"> 
          <input type="button" name="B22" value="   &lt; &gt;   "
        onClick="convertkb(this.form)">

        </td>
        <td align="center"> 
          <input type="button" name="B23" value="   &lt; &gt;   "
        onClick="convertmb(this.form)">
        </td>
        <td align="center"> 
          <input type="button" name="B24" value="   &lt;   "
        onClick="convertgb(this.form)">
        </td>
      </tr>
    </table>

  <br></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>
Reply With Quote
Благодарность от:
synseal
  #18  
Old 08-17-2011, 05:53 AM
gec100's Avatar
gec100 gec100 is offline
 
Join Date: Jun 2011
Location: Zagreb, Croatia
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm no coder but i'm sure that there are some variables to use for this to be integrated in the style instead of hardcoding.
Reply With Quote
  #19  
Old 12-13-2014, 10:56 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The "Add File" button has fixed?

Thanks.
Reply With Quote
  #20  
Old 03-15-2016, 12:30 PM
Duke49th Duke49th is offline
 
Join Date: Sep 2014
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange - I cant like this post.

Anyway....thanks a lot BioTek. This is the fix for the "add file" Button. Works great in vB 4.2.3

Quote:
Originally Posted by BioTek View Post
Here I edit the code so it will work. You may have to edit the table color to match your site.
Code:
<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&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})">
    <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>
                <div class="blockrow">
                         <div align="center"><font style='font-size: 30px;' face='Verdana, Arial, Helvetica, sans-serif'><b>Unit Converter</b></font><hr></div>
<p align="left">With this unit converter, you can go from bytes to gigabytes through Kbs. and Mbs. with a single click.</p>
<p align="left">It is very intuitive to use, enter the amount you want in the corresponding box and click the button underneath.
  <script language="JavaScript">
<!--

  function convert(f) {
    f.kb.value=Math.round(f.byte.value/1024*100000)/100000
    f.mb.value=Math.round(f.byte.value/1048576*100000)/100000
    f.gb.value=Math.round(f.byte.value/1073741824*100000)/100000
     
  }

function convertkb(f) {
    f.byte.value=Math.round(f.kb.value*1024*100000)/100000
    f.mb.value=Math.round(f.kb.value/1024*100000)/100000
    f.gb.value=Math.round(f.kb.value/1048576*100000)/100000
     
  }

function convertmb(f) {
    f.byte.value=Math.round(f.mb.value*1048576*100000)/100000
    f.kb.value=Math.round(f.mb.value*1024*100000)/100000
    f.gb.value=Math.round(f.mb.value/1024*100000)/100000
     
  }

function convertgb(f) {
    f.byte.value=Math.round(f.gb.value*1073741824*100000)/100000
    f.kb.value=Math.round(f.gb.value*1048576*100000)/100000
    f.mb.value=Math.round(f.gb.value*1024*100000)/100000
     
  }
  

// -->

</script>
</p>

  <div align="center">
    <table border="1" style="dashed" border-color="#ccc" bgcolor="#ffffff" cellpadding="3" cellspacing="3">
      <tr> 
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">Byte</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Kilobyte&nbsp;&nbsp;</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Megabyte&nbsp;&nbsp;</font></td>
        <td align="center"><font size="4" face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;Gigabyte&nbsp;&nbsp;</font></td>

      </tr>
      <tr> 
        <td align="center"> 
          <input type="text" size="10"
        name="byte" value="0">
        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="kb" value="0">
        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="mb" value="0">

        </td>
        <td align="center"> 
          <input type="text" size="10"
        name="gb" value="0">
        </td>
      </tr>
      <tr> 
        <td align="center"> 
          <input type="button" name="B2" value="   &gt;   "
        onClick="convert(this.form)">
        </td>
        <td align="center"> 
          <input type="button" name="B22" value="   &lt; &gt;   "
        onClick="convertkb(this.form)">

        </td>
        <td align="center"> 
          <input type="button" name="B23" value="   &lt; &gt;   "
        onClick="convertmb(this.form)">
        </td>
        <td align="center"> 
          <input type="button" name="B24" value="   &lt;   "
        onClick="convertgb(this.form)">
        </td>
      </tr>
    </table>

  <br></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>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04640 seconds
  • Memory Usage 2,397KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete