Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 64
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 123
Total: 123

Author Topic: Disable upload file i want only url file  (Read 7269 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: 16436
    • 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: 16436
    • 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: 16436
    • 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
5960 Views
Last post May 30, 2007, 10:27:35 pm
by SMFHacks
4 Replies
7052 Views
Last post May 15, 2008, 11:31:51 pm
by ApplianceJunk
2 Replies
5462 Views
Last post April 01, 2009, 09:44:04 pm
by Wegg
4 Replies
4167 Views
Last post January 21, 2012, 07:57:44 pm
by Eudemon
9 Replies
6320 Views
Last post May 14, 2012, 03:44:05 pm
by ApplianceJunk

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal