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

  • nnoel

  • Just popping in

  • Posts: 7

  • Since: 2004/7/25


hi,

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(!)

132
Booga
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??

133
nnoel
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:
----------------------------------------
\modules\mydownloads\xoops_version.php(239):
$modversion['config'][14]['name'] = 'mimetypes';

\modules\mydownloads\submit.php(103):
$allowed_mimetypes = $xoopsModuleConfig['mimetypes'];

\modules\mydownloads\admin\index.php651):
$allowed_mimetypes = $xoopsModuleConfig['mimetypes'];

\modules\mydownloads\admin\index.php(1032):
$allowed_mimetypes = $xoopsModuleConfig['mimetypes'];
----------------------------------------

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


134
Catzwolf
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.

135
taokrieger
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???

136
suico
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.

137
suico
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";
include_once(
"./include/functions.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";
            break;
        }
    }
    if (!
$goodhost) {
        
redirect_header(XOOPS_URL "/modules/mydownloads/singlefile.php?cid=$cid&lid=$lid"20_MD_NOPERMISETOLINK);
        exit();
    }
}

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

    
$separator="-_MYDWONLOADSPRO_-";
    
$download explode($separator,$url);

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


exit();


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

138
suico
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?

Someone?

139
suico
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]");
?>
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Print ("$url"); ?>" />

                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;
                                text-align:center;
                                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;
                 }
    hr{
        height: 3px;
        border: 3px #E18A00 solid;
        filter : Alpha(Opacity=100,FinishOpacity=10,Style=2);
        width: 95%;
    }
                span.bigtext { font-size: 16px; font-weight: bold; }

Simcity Brasil - O Simcity4 ao som de samba!





  Seu download irá se iniciar em 5 segundos...

  
  


    Print (" Caso o Download não se inicie automaticamente $url> Clique aqui  "); 
?> 
  .


  

Fechar esta janela!






    


    
    
//readfile($myts->oopsHtmlSpecialChars($url));


exit();
?>


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

140
talon39
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.

Login

Who's Online

221 user(s) are online (138 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits