News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Download RC2 / RC3

Started by Herman's Mixen, March 12, 2006, 05:49:05 PM

Previous topic - Next topic

Herman's Mixen

i will look at that in the next release but i am a little bussy right now so i haven't got the time to implent it right now just wait and be a little patient
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

GPGrieco

the error log kepps showing this error

mgtmadness   April 20, 2007, 06:42:44 PM 
24.24.69.254     13c49c60af72e5c43552456ad984610c 
http://www.awsomeforum.com/forum/smf/index.php?action=downloads 
8: Undefined index: d
File: /home/content/G/P/G/GPGrieco/html/forum/smf/Themes/default/languages/Downloads.english.php (eval?)
Line: 36

Herman's Mixen

this has to do with the the language files are the updated?
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

GPGrieco

My language files are version 1.1   

Herman's Mixen

in order that i am changing the project and maybe recode some stuff i need some time to fix those first then i will look at this error !

and have to add some language packs for different languages other than english
so the install should be more smoothly and english users shouldn't get any errors on the dutch languages files coz they don't excists there !

so i praciate emails or pm's with strings for the new language packs...

but still have testing to do with that !!

Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

niravdave

gr8 mod! works with 1.1.2 as well

are u planning to upgrade this?

features like

--Number if views /hits
--Description of the file
--Details of the file (Lond Description)
--Rating
--Date Added

Dave

Herman's Mixen

i am planning some sort of an upgrade and maybe a total rewrite with other functions
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

niravdave

how long is it going to take?

Herman's Mixen

i really don't know yet first have to make an beta before it will be released
and i need my spare time to re create an new mod
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

niravdave

yeah..gr8! this would be an amazing mod for a community forums

dave

karlbenson

#50
This modification screws up several of your files due to errors in the install.xml

I recommend that you DON'T install this modification as it stands.
(I'd consider pulling it from the modsection until its safe to use)

Some of the things are put AFTER when they are meant to go BEFORE (because in the xml format, they are reversed) for example the modifications to the language files are meant to go BEFORE the ?>. In order to do that you need to use AFTER.

Position is misspelled as postion
The effect of this is that the modification is made, but it replaces what it was meant to add after, so you lose the ?> from the end of files.


The 'd' bug is one which can easily be fixed

(theres only two changes to your download.template.php
$dir = (isset($_GET['d']) && $_GET['d'] !='') ? 'd='.trim(urldecode($_GET['d'])).'&' : '';

and replaced d='.$_GET['d] .'& in the url for the files with '.$dir .'

So My downloads.template.php now looks like.



<?php

function template_main()
{
global $context$scripturl$txt$user_info;
theme_linktree();

$rurl 'Downloads/';
$surl 'Sources/Downloadimg.php?';

function 
e($s){$p=strrpos($s,'.');return substr($s,$p+1,strlen($s));}
function 
($a,$c,$o='asc',$t=SORT_STRING){if(!isset($a[0][$c]))return $a;for ($i=0;$i<count($a);$i++)$temp[$i]=&$a[$i][$c];$o=($o=='asc')?SORT_ASC:SORT_DESC;array_multisort($temp,$o,$t,$a);return $a;}

&
nbsp; &nbsp$sb=isset($_GET['s'])?$_GET['s']:0;
&
nbsp; &nbsp$so=isset($_GET['o'])?$_GET['o']:'asc';
&
nbsp; &nbsp$st=$sb==='s'||$sb==='m'?SORT_NUMERIC:SORT_STRING;
&
nbsp; &nbsp$d=isset($_GET['d'])?urldecode($_GET['d']):'';
&
nbsp; &nbsp$d=$d!==''&&$d!=='/'?trim($d,'/').'/':'';
&
nbsp; &nbsp$p=$rurl.$d;
&
nbsp; &nbsp$h=@opendir($p);
&
nbsp; &nbsp; if(strstr($d,'../'))exit('Denied');
&
nbsp; &nbsp; if(!$h)exit('<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><td width="100%" class="titlebg">'.$txt['downloads_6'].'</td></tr></table></div>');
&
nbsp; &nbsp$F=array();$D=array();
&
nbsp; &nbsp; while(FALSE!==($f=readdir($h)))if($f[0]!=='.')if(is_dir($p.$f))$D[]=array('n'=>$f,'m'=>filemtime($p.$f),'s'=>filesize($p.$f),'t'=>'Directory');else$F[]=array('n'=>$f,'m'=>filemtime($p.$f),'t'=>e($f),'s'=>filesize($p.$f));
&
nbsp; &nbsp; if($sb){$F=s($F,$sb,$so,$st);$D=s($D,$sb,$so,$st);}
&
nbsp; &nbsp; print '<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><td colspan="5" class="titlebg">';
&
nbsp; &nbsp; print $txt['downloads_8'];
&
nbsp; &nbsp; if($d!==''){$t=explode('/',trim($d,'/'));for($i=0,$r=array(),$z='';($r[]=@$t[$i]),$z=@$t[$i];$i++) { print(implode('/',$r)!==trim($d,'/'))? ('<a href="'.$scripturl.'?action=downloads&amp;d='.implode('%2F',$r).'">'.$z.'</a> / ' ):$z;}}
&
nbsp; &nbsp$f=trim($d,'/');
&
nbsp; &nbsp; print '</td></tr><tr><td class="catbg">&nbsp;</td>'
&nbsp; &nbsp; .'<td class="catbg"><a href="'.$scripturl.'?action=downloads&amp;s=n&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_2'].'</a></td>'
&nbsp; &nbsp; .'<td class="catbg"><a href="'.$scripturl.'?action=downloads&amp;s=s&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_3'].'</a></td>'
&nbsp; &nbsp; .'<td class="catbg"><a href="'.$scripturl.'?action=downloads&amp;s=t&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_4'].'</a></td>'
&nbsp; &nbsp; .'<td class="catbg" nowrap="nowrap"><a href="'.$scripturl.'?action=downloads&amp;s=m&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_5'].'</a></td></tr>';
&
nbsp; &nbsp; for($i=0,$c='';($c=@$D[$i++]);){print '<tr><td class="windowbg"><center><img src="'.$surl.'i=dir" alt="'.$c['n'].'"/></center></td><td class="windowbg2"><a href="'.$scripturl.'?action=downloads&amp;d='.urlencode($d.$c['n']).'">'.$c['n'].'</a></td><td class="windowbg">&nbsp;</td><td class="windowbg2">&nbsp;</td><td class="windowbg">'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}
&
nbsp; &nbsp; for($i=0,$c='';($c=@$F[$i++]);){
$dir = (isset($_GET['d']) && $_GET['d'] !='') ? 'd='.trim(urldecode($_GET['d'])).'&amp;' '';
print '<tr><td class="windowbg"><center><img src="'.$surl.'i='.$c['t'].'" alt="'.$c['n'].'"/></center></td><td class="windowbg2"><a href="download.php?'.$dir.'name='.$c['n'].'">'.$c['n'].'</a></td><td class="windowbg">'.number_format($c['s']/1024,1).'KB</td><td class="windowbg2">'.$c['t'].'</td><td class="windowbg">'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}
&
nbsp; &nbsp; print '<tr><td colspan="5" class="windowbg"></td></tr></table></div>';
}
?>



Because I wanted to use this on my forum, i've fixed as many of the errors as i could (this contains the english strings only)

immortalis

I have a question about this mod.
Is there any way to set permission for this mode?
To specific user(group) who can download, and who can't

Herman's Mixen

to give access to the downloads
go to permissions --> membergroup --> can view downloads turn on/off
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

immortalis

Quote from: The Burglar! on June 04, 2007, 02:35:23 PM
to give access to the downloads
go to permissions --> membergroup --> can view downloads turn on/off


thx!

But now i have a question about permissions
Is there any way to edit that the users can view download zone, with 50 posts?
I hope you understand me ;)

ES23

I am using SMF 1.1.3

The execution of the dload package RC3 is alright and everything installs fine.The download section is ok as well,meaning I can see all the files I've uploaded onto my server.However,when I click on the file to try download,I saw a 500 Internal Server error page instead of the stuff being downloaded.

May I know where is wrong??

Herman's Mixen

is the /Download folder writeable 777 and files within that folder 755 ?
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

ES23

Quote from: The Burglar! on August 08, 2007, 06:47:37 AM
is the /Download folder writeable 777 and files within that folder 755 ?

Yes.The 500 internal server Error still occurs.

Here's the errors info I got from

2: opendir(/var/www/html/forums/Packages/temp/Downloads) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: No such file or directory
File: /var/www/html/forums/Sources/Subs-Package.php
Line: 1253

2: unlink(Downloads.english.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory
File: /var/www/html/forums/Sources/Subs-Package.php
Line: 1047

May I know what is wrong??

Herman's Mixen

create a /temp dir under the /packages dir and make it writeable 777 this is an issue with some php on some hosts or you could use the package parser for manual installation
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

ES23

#58
Quote from: The Burglar! on August 08, 2007, 06:25:25 PM
create a /temp dir under the /packages dir and make it writeable 777 this is an issue with some php on some hosts or you could use the package parser for manual installation

Ther 500 internal server is still present.I've asked my host for help and they quoted me the error from my server error log.This is ther error received -

Premature end of script headers: php-script,
referer from: http://www.website.com/index.php?action=downloads

Previously when I install,the index.template file execution failed so I only install that file manually.Btw,should I refer/use the the dloadRC3 zip file you uploaded OR the modified file on this topic,reply #50?Coz previously I used yours,I also received the "d" error as well.


ES23

Can I ask what may be the possible problems if I still face 500 internal server errors persistently while trying to download the uploaded stuff but strangely,this time round,no errors are reported on my smf forum error log??It doesn't make sense to me. :-\

Advertisement: