News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Download System

Started by SMFHacks.com Team, October 31, 2007, 06:55:37 PM

Previous topic - Next topic

ne.miguelito

it only wanted to allow the sending of certain files, for example by extension (.rar .zip), somebody knows as to make?

rtyug

#221
"Downloads.php"

example!!!! I do not remember exactly
function AddDownload()
{


$valid_types =  array("gif","jpg", "png", "jpeg");
if (in_array($ext, $valid_types))




utillize an array
regular expression here

rtyug

Quote from: myaicons on January 31, 2008, 11:43:13 PM
does anybody know how to add a link on the users profile to show their uploaded downloads?

I took interest, it is necessary to search in a code

it is difficult to find

ne.miguelito

Quote from: rtyug on February 01, 2008, 04:49:24 PM
"Downloads.php"

example!!!! I do not remember exactly
function AddDownload()
{


$valid_types =  array("gif","jpg", "png", "jpeg");
if (in_array($ext, $valid_types))




utillize an array
regular expression here


I don't understand...

rtyug

$valid_types =  array("rar","zip");
if (in_array($filename, $valid_types))

fatal_error($txt['downloads_error_no_download'],false);



function AddDownload2()
{
global $ID_MEMBER, $txt, $db_prefix, $scripturl, $modSettings, $boarddir, $sourcedir, $gd2, $user_info, $boardurl;

isAllowedTo('downloads_add');

if (empty($modSettings['down_path']))
{
$modSettings['down_path'] = $boarddir . '/downloads/';
}
// Check if downloads path is writable
if (!is_writable($modSettings['down_path']))
fatal_error($txt['downloads_write_error'] . $modSettings['down_path']);


$title = htmlspecialchars($_REQUEST['title'],ENT_QUOTES);
$description = htmlspecialchars($_REQUEST['description'],ENT_QUOTES);
$keywords = htmlspecialchars($_REQUEST['keywords'],ENT_QUOTES);
$cat = (int) $_REQUEST['cat'];
$fileurl = htmlspecialchars($_REQUEST['fileurl'],ENT_QUOTES);
$allowcomments = isset($_REQUEST['allowcomments']) ? 1 : 0;
$sendemail = isset($_REQUEST['sendemail']) ? 1 : 0;
$filesize = 0;

GetCatPermission($cat,'addfile');


// Check if downloads are auto approved
$approved = (allowedTo('downloads_autoapprove') ? 1 : 0);

// Allow comments on file if no setting set.
if (empty($modSettings['down_commentchoice']))
$allowcomments = 1;


$valid_types =  array("rar","zip");
if (in_array($filename, $valid_types))

fatal_error($txt['downloads_error_no_download'],false);






if ($title == '')
fatal_error($txt['downloads_error_no_title'],false);
if ($cat == '')
fatal_error($txt['downloads_error_no_cat'],false);

if ($modSettings['down_set_enable_multifolder'])
CreateDownloadFolder();

...........................


myaicons

Quote from: rtyug on February 01, 2008, 04:55:19 PM
Quote from: myaicons on January 31, 2008, 11:43:13 PM
does anybody know how to add a link on the users profile to show their uploaded downloads?

I took interest, it is necessary to search in a code

it is difficult to find

owwww  :(



Quote
$valid_types       =  array("rar","zip");
if (in_array($filename, $valid_types))

fatal_error($txt['downloads_error_no_download'],false);

so just list the file types you want to allow in the array?
i scratch your back you scratch my back...
funny thing about my back is its located on my...


rtyug

how to look who how many did GET information in what amount?

and that under a signature

ne.miguelito

Doesn´t work, i can send any kind of files...

myaicons

i scratch your back you scratch my back...
funny thing about my back is its located on my...

rtyug

Quotetext/html  text/plain  text/richtext  image/gif   image/jpeg  image/tiff  audio/basic  audio/32kadpcm   audio/  video/mpeg  video/quicktime  multipart/mixed   multipart/alternate  multipart/  application/octet-stream   application/msword  application/postscript  message/digest   

I do not know how to settle an archive

I Perl love

:D


myaicons

#232
my server has this off as a default... why does t have to be on?

register_globals = On


also...

where in the files do i edit the code for... post creation after a download has been approved?

i wanted to add a few lines so that i can customize what the post is saying about the download


please assist
i scratch your back you scratch my back...
funny thing about my back is its located on my...

myaicons

#233

Quote1.0.3
!Fixed showing filesize on download page if file is a remote url.

the file size is not showing for me for remote url  :( 
in fact its not even showing the zero number (Filesize: 0kb) 
why? and how to fix?


also.... how come when the download (wav) is from a remote url it just forwards to a player page and not the file download popup???

i would like the remote url download to also open as a dile download popup...

can anyone let me know.... thanks!!!
i scratch your back you scratch my back...
funny thing about my back is its located on my...

jossanaijr

Is there a way to put the boxes "Recent Downloads", "Most Viewed", "Most Commented" and "Top Rated" in the main page inside the "INFO CENTER"?  Or at least list ONE of each category in a section called something like "Downloads"?

myaicons

$valid_types       =  array("rar","zip");
if (in_array($filename, $valid_types))

fatal_error($txt['downloads_error_no_download'],false);



this doesent work  :(
i scratch your back you scratch my back...
funny thing about my back is its located on my...

CoNTeCAuTR

Only SmF And TRap

lonrot

Is there a way to hide the file address, and instead of it show a php address?

vbgamer45

Quote from: lonrot on February 04, 2008, 01:55:15 PM
Is there a way to hide the file address, and instead of it show a php address?
I belive the mod already does this for files that are stored on the forum.
For remote files this would be a little tricky.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

LOLwut

how would I edit the max file size in my php ?

How do I make it so I can only upload. Rar, zip and 7z
www.TizeMe.com

The #1 place to show off your website/forum/blog/youtube channel, you name it!

- ALL FOR FREE.

Advertisement: