| 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: 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&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. |