PDA

View Full Version : Upload Hack ---- Please Read


darkmage
01-25-2004, 05:32 PM
I'm wondering if anyone could create a hack that would allow me to upload nonweb accessable files and place a link to them so users have to register before they can download. The main reason why I ask it be done this way, because uploading through php, I have to change the file upload in php, and through FTP it is much easier, and faster.

Say if the user goes to website.com/boards/download.php?file=ffxi.zip it will cause a registered user to download it, but if the user is not registered it will prompt they must register before they download.

I've been waiting for this hack to be re-released, since it use to be vB2.x.

Thanks.

darkmage
01-25-2004, 09:14 PM
Sorry, but I really need this hack so I'm going to post again to bump the thread.

darkmage
01-25-2004, 09:18 PM
https://vborg.vbsupport.ru/showthread.php?t=46963&highlight=register+download


if ( $bbuserinfo['userid']==0 || !in_array($bbuserinfo['usergroupid'], $AUTH_GROUPS) ) {
show_nopermission();

Those are the two lines of code that display and error. Hopefully someone can help me out and format that code to vB3 RC2 code.

Thanks.

KuraFire
01-27-2004, 03:17 PM
You can do that without a hack.

Just set the Usergroup Permissions for Guests/unregistered to: Can download attachments? NO

darkmage
01-27-2004, 03:31 PM
Yes, but when I try to upload a file that is over 1 MB in size, it fails. It's because of the php.ini file setting the maximum upload through php is only 1 MB. I don't have the access to change that either.

NTLDR
01-27-2004, 03:35 PM
https://vborg.vbsupport.ru/showthread.php?t=46963&highlight=register+download


if ( $bbuserinfo['userid']==0 || !in_array($bbuserinfo['usergroupid'], $AUTH_GROUPS) ) {
show_nopermission();

Those are the two lines of code that display and error. Hopefully someone can help me out and format that code to vB3 RC2 code.

Thanks.

That hack there does exactly what you have requested, just change show_nopermission(); to print_no_permission();

KuraFire
01-27-2004, 03:40 PM
Yes, but when I try to upload a file that is over 1 MB in size, it fails. It's because of the php.ini file setting the maximum upload through php is only 1 MB. I don't have the access to change that either.
then any hack will not change that. If you can't upload files larger than 1MB on the server, no hack you could install would be able to upload files larger than 1MB.

darkmage
01-27-2004, 04:51 PM
$AUTH_GROUPS = array(2,6,5,10); //which vb usergroups can access the file

Has any of the arrays I believe they're called changed since vB2.x ? Because it's not allowing me to download the file and it is giving me the following message;

Warning: in_array(): Wrong datatype for second argument in /home/ffantasy/public_html/boards/download.php on line 27


Thanks.