Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4220
Latest: agolac
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 42854
Total Topics: 7464
Most Online Today: 86
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: Disable upload file i want only url file  (Read 5910 times)

0 Members and 1 Guest are viewing this topic.

Offline pasqualino77

  • Member
  • *
  • Posts: 47
    • View Profile
Disable upload file i want only url file
« on: June 04, 2015, 08:06:39 am »
Hi .. i want use only url file .. are possibile?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Disable upload file i want only url file
« Reply #1 on: June 04, 2015, 08:44:29 am »
You would need to edit the downloads.template.php and remove the upload button I think.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline pasqualino77

  • Member
  • *
  • Posts: 47
    • View Profile
Re: Disable upload file i want only url file
« Reply #2 on: June 04, 2015, 09:34:53 am »
now try :-)

Offline pasqualino77

  • Member
  • *
  • Posts: 47
    • View Profile
Re: Disable upload file i want only url file
« Reply #3 on: July 10, 2015, 03:19:49 pm »
i can't edit the file

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Disable upload file i want only url file
« Reply #4 on: July 12, 2015, 03:04:03 pm »
What error are you getting?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline pasqualino77

  • Member
  • *
  • Posts: 47
    • View Profile
Re: Disable upload file i want only url file
« Reply #5 on: July 13, 2015, 03:42:14 am »
i don't undstand what code i must delete ...

if i clear all block .. give me errore at line 1302

what part of code i must delete?

Offline pasqualino77

  • Member
  • *
  • Posts: 47
    • View Profile
Re: Disable upload file i want only url file
« Reply #6 on: July 14, 2015, 03:03:28 pm »
please can you tell me the line to delete ..

thanks

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Disable upload file i want only url file
« Reply #7 on: July 15, 2015, 08:25:31 am »
All in template_add_download
Around line 1236
Code: [Select]
echo '
  <tr class="windowbg2">
  <td align="right"><b>', $txt['downloads_form_uploadfile'], '</b>&nbsp;</td>
    <td><input type="file" size="48" name="download" />
    <br /><span class="smalltext">',$txt['downloads_txt_file_max_file_size'],Downloads_format_size($modSettings['down_max_filesize'],2),'</span>
    <div id="fileprogress" style="font-weight: bold;"> </div>
            <div id="fileProgressDiv" style="display:none; ">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td background="' . $modSettings['down_url']  . 'scripts/loader_left.gif" width="10"><img src="' . $modSettings['down_url']  . 'scripts/loader_left.gif" border="0" /></td>
<td style="background-image:url(' . $modSettings['down_url']  . 'scripts/loader_tile_blank.gif); background-repeat:repeat-x; height:30px; width:100%"><div id="progressDiv" style="background-image:url(' . $modSettings['down_url']  . 'scripts/loader_tile.gif); background-repeat:repeat-x; height:30px; width:1px"></div></td>
<td background="' . $modSettings['down_url']  . 'scripts/loader_right.gif" width="10"><img src="' . $modSettings['down_url']  . 'scripts/loader_right.gif" border="0" /></td>
</tr></table>
<div id="fileProgressMsgDiv">
<div style="float:left">
<span id="FPMeta">--</span>&nbsp;left (at <span id="FPMspeed">--</span>/sec)
</div>
<div style="float:right; text-align:right;">
<span id="FPMcurrent">--</span>/<span id="FPMtotal">--</span> (<span id="FMPpercent">0</span>%)
</div>
</div>
</div>
<div id="fileProgressIni" style="display:none; background-color:#fffff;" class="maintext"></div>
';


if (!empty($downloadSettings['additional_download_fields']))
{
$extraTextBox = '';
if ($g_manage && $downloadSettings['down_credit_system_enable'] == 1)
{
$extraTextBox = '<b>' . $txt['downloads_text_credits'] . '</b>&nbsp;<input type="text" name="filecredits[\' + fileCount  +\']" maxlength="10" size="5" value="0" />';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var allowed_files = ' . $downloadSettings['additional_download_fields'] . ';
var fileCount = 0;
function addFiles()
{
if (allowed_files <= 0)
return alert("' . $txt['err_additional_files'] . '");

setOuterHTML(document.getElementById("moreFiles"), \'<br /><input type="file" size="48" name="downfiles[\' + fileCount  +\']" />' . $extraTextBox  . '<span id="moreFiles"></span>\');
allowed_files = allowed_files - 1;
fileCount = fileCount + 1;

return true;
}
// ]]></script>
<span id="moreFiles"></span> <a href="javascript:addFiles(); void(0);">' . $txt['txt_add_more_files'] . '</a><br />';


}


echo '

    </td>
  </tr>';
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline pasqualino77

  • Member
  • *
  • Posts: 47
    • View Profile
Re: Disable upload file i want only url file
« Reply #8 on: July 15, 2015, 11:04:19 am »
thanks .. very good

 

Related Topics

  Subject / Started by Replies Last post
8 Replies
5724 Views
Last post May 30, 2007, 10:27:35 pm
by SMFHacks
4 Replies
6044 Views
Last post May 15, 2008, 11:31:51 pm
by ApplianceJunk
2 Replies
4124 Views
Last post April 01, 2009, 09:44:04 pm
by Wegg
4 Replies
3217 Views
Last post January 21, 2012, 07:57:44 pm
by Eudemon
9 Replies
5081 Views
Last post May 14, 2012, 03:44:05 pm
by ApplianceJunk

+- Recent Topics

Is the PayPal Sandbox still working? by Nicole
June 02, 2023, 06:51:18 am

Question on Completed Listing & Reserve Price by Nicole
June 01, 2023, 06:06:12 pm

[Mod]GDPR Helper by Nicole
May 29, 2023, 11:58:49 pm

RSS Feed Poster Database Error by SMFHacks
May 22, 2023, 06:26:18 pm

Errors With Older Version. by Ken.
May 09, 2023, 05:35:40 pm

Pretty Urls SEO Pro by SMFHacks
May 06, 2023, 03:30:11 pm

New Post Image Upload Error by Mike66
April 28, 2023, 07:30:28 am

Copyright Removal Key by SMFHacks
April 03, 2023, 02:44:28 pm

Converting from Aeva Media by sudhakar
April 02, 2023, 11:09:54 am

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Powered by EzPortal