Re: Mydownloads module modified
  • 2004/8/16 11:35

  • nnoel

  • Just popping in

  • Posts: 7

  • Since: 2004/7/25


when I try your modified module, it seems that I can't save the allowed mime types...
as a consequence, when I test the upload, the system says that the mime type is not allowed (even for gif files)

can you help me?

ps I had aleady the same response with a 1.03 version found on the net. I'm working with the XOOPS 2.0.7. The phpinfo() on my hosted site tells me that register_globals are on(!)

Re: Mydownloads module modified
  • 2004/8/19 15:49

  • Booga

  • Not too shy to talk

  • Posts: 124

  • Since: 2003/11/29

hey samuels....have you finished your exams already LOL?? How did they go mate??

Is he still with us??

Re: Mydownloads module modified
  • 2004/8/19 17:26

  • nnoel

  • Just popping in

  • Posts: 7

  • Since: 2004/7/25

I found that there is a definition conflict with the wf-section v2 module. mimetypes is defined in both xoops_version files...
one solution could be the replacement of each occurence of the variable in the mydownloads modules (4places):

in my config:
$modversion['config'][14]['name'] = 'mimetypes';

$allowed_mimetypes = $xoopsModuleConfig['mimetypes'];

$allowed_mimetypes = $xoopsModuleConfig['mimetypes'];

$allowed_mimetypes = $xoopsModuleConfig['mimetypes'];

I tested the hack and it's working (so far) but I will shift to wf-downloads

Re: Mydownloads module modified
  • 2004/8/19 18:06

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30

We have changed the way we deal with mimetypes in WF-Sections v2.0.2 and this should stop the conflict between the two modules.

Re: Mydownloads module modified
  • 2004/9/4 2:31

  • taokrieger

  • Just popping in

  • Posts: 36

  • Since: 2002/10/29

I am having a problem. I cannot upload files larger than around 300K or so. Anything larger than about 300K, I get a "page cannot be displayed" - not even a blank page!

Before you tell me to check my settings, my "maximum upload size" is 200000000.

And in my php.ini:
max_post_size, memory_limit, upload_max_filesize are all 200M, file_uploads is ON and Max_execution_time is 180.

What am I missing???

Re: Mydownloads module modified
  • 2004/9/14 17:04

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24

Hi samuels. I would like to congratulate you for this great module.

I want to ask you a question about a problem I have have with it:

It happens only when I have a big file (3MB 4MB ...).

I click the download
It opens a white page
Only 3 4 minutes after the download dialog box opens.

If I simply had a direct link to the download it would open right away.
Can I do something for clicking on the download and not opening a white page but directly the download dialog box , or just make this time shorter?

Sorry for the bad english.

Re: Mydownloads module modified
  • 2004/9/26 21:53

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24

Maybe if I can show you the code you can help me with it?

include "../../mainfile.php";
$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
$lid intval($HTTP_GET_VARS['lid']);
$cid intval($HTTP_GET_VARS['cid']);

if ( 
$xoopsModuleConfig['check_host'] ) {
$goodhost      0;
$referer       parse_url(xoops_getenv('HTTP_REFERER'));
$referer_host  $referer['host'];
    foreach ( 
$xoopsModuleConfig['referers'] as $ref ) {
        if ( !empty(
$ref) && preg_match("/".$ref."/i"$referer_host) ) {
$goodhost "1";
    if (!
$goodhost) {
redirect_header(XOOPS_URL "/modules/mydownloads/singlefile.php?cid=$cid&lid=$lid"20_MD_NOPERMISETOLINK);

$sql sprintf("UPDATE %s SET hits = hits+1 WHERE lid = %u AND status > 0"$xoopsDB->prefix("mydownloads_downloads"), $lid);
$result $xoopsDB->query("SELECT url,groupid, usersid FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid AND status>0");
$url,$groupid,$usersid) = $xoopsDB->fetchRow($result);

$download explode($separator,$url);

if (!
preg_match("/^ed2k*:///i"$url) && $download[1]=='') {
Header("Location: $url");
header("Content-Disposition: attachment; filename=$download[1]");


Please, it really is important for me , if you know how to help me, do it.

Re: Mydownloads module modified
  • 2004/9/27 16:31

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24

Maybe it could open a new page saying that the download will start automatically and having a link to the file?


Re: Mydownloads module modified
  • 2004/9/28 15:14

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24

Well I found a pseudo solution for me and if it can be of any use to someone here are my changes:
if (!preg_match("/^ed2k*:///i", $url) && $download[1]=='') {
//    Header("Location: $url");
    //header("Location: $download[1]");
    //header("Content-Disposition: attachment; filename=$download[1]");
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt_BR" lang="pt_BR">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Refresh" content="2;url=<?php Print ("$url"); ?>" />
<style type="text/css">
                body {
                               background-color : #fcfcfc;
                               color: #000000;
                               font-weight: normal;
                               font-size: 12px;
                               font-family: Trebuchet MS,Verdana, Arial, Helvetica, sans-serif;
                               margin-left: 0px;
                               margin-top: 0px;
                               margin-right: 0px;
                               margin-bottom: 0px;
    .redirect {
        width: 70%;
        margin: 110px;
        text-align: center;
        padding: 15px;
                                border-right: #e0e0e0 1px solid;
                                border-top: #e0e0e0 1px solid;
                                border-left: #e0e0e0 1px solid;
                                color: #666666;
                                border-bottom: #e0e0e0 1px solid;
                                background-color: #f6f6f6;
                                text-align: center;
    .redirect a:link {
        color: #666666;
        text-decoration: none;
        font-weight: bold;
    .redirect a:visited {
        color: #666666;
        text-decoration: none;
        font-weight: bold;
    .redirect a:hover {
        color: #999999;
        text-decoration: underline;
        font-weight: bold;
        height: 3px;
        border: 3px #E18A00 solid;
        filter : Alpha(Opacity=100,FinishOpacity=10,Style=2);
        width: 95%;
                span.bigtext { font-size: 16px; font-weight: bold; }
<title>Simcity Brasil - O Simcity4 ao som de samba!</title>
<div align="center">

<div class="redirect">
  <span class="bigtext">Seu download irá se iniciar em 5 segundos...</span>
  <hr />
Print (" Caso o Download não se inicie automaticamente <a href=$url> Clique aqui </a> "); 
  <p><A href="javascript:window.close()">Fechar esta janela!</a></p>




There is still a problem: the link to the file now can be known. Norhing is perfect :(

Re:Mydownloads module modified
  • 2004/10/18 17:25

  • talon39

  • Just popping in

  • Posts: 94

  • Since: 2002/6/13

Is this module still being worked on? I tried the version from the initial download link in this thread. I found 2 things that keep this module form solving my problem. I hoping some has a solution.

The biggest problem is that If I upload a .pdf file for example, when it gets clicked the browser atempts to save the file rather than display it. And before you ask, yes I have adobe reader installed, yes it displays pdfs in the browser every else. Not a client side issue.
I suspect the module uses the file title rather than the actual file name when the link is clicked. This is the most important feature for me next to the ability to upload the files.

The other problem, is that it doesn't seem to allow me to set permissions for who can submit documents. At least I could see where to do it. I fould how to limit who can access the download, but see to have missed where to set submit permissions.



Lost Password? Register now!

Who's Online

56 user(s) are online (45 user(s) are browsing Support Forums)

Members: 0

Guests: 56



Goal: $100.00
Due Date: Jan 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits