Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
0 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re:Mydownloads module modified
by talon39 on 2004/10/18 17:25: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.
Re: Mydownloads module modified
by suico on 2004/9/28 15:14:01

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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt_BR" lang="pt_BR"> <head> <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; 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; } </style> <title>Simcity Brasil - O Simcity4 ao som de samba!</title> </head> <body> <div align="center"> <div class="redirect"> <span class="bigtext">Seu download irá se iniciar em 5 segundos...</span> <hr /> <p> <?php Print (" Caso o Download não se inicie automaticamente <a href=$url> Clique aqui </a> "); ?> .</p> <p><A href="javascript:window.close()">Fechar esta janela!</a></p> </div> </div> </body> </html> <?php //readfile($myts->oopsHtmlSpecialChars($url)); exit(); ?>


There is still a problem: the link to the file now can be known. Norhing is perfect :(
Re: Mydownloads module modified
by suico on 2004/9/27 16:31:25

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

Someone?
Re: Mydownloads module modified
by suico on 2004/9/26 21:53:02

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

le="color: #000000"><?php 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&amp;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,$usersid, XOOPS_URL, 2, _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.
Re: Mydownloads module modified
by suico on 2004/9/14 17:04:04

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.

Who's Online

194 user(s) are online (162 user(s) are browsing Support Forums)


Members: 0


Guests: 194


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits