vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Upload Hack ---- Please Read (https://vborg.vbsupport.ru/showthread.php?t=60728)

darkmage 01-25-2004 05:32 PM

Upload Hack ---- Please Read
 
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/showthrea...ister+download


PHP Code:

if ( $bbuserinfo['userid']==|| !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

Quote:

Originally Posted by darkmage
https://vborg.vbsupport.ru/showthrea...ister+download


PHP Code:

if ( $bbuserinfo['userid']==|| !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

Quote:

Originally Posted by darkmage
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

PHP Code:

$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.


All times are GMT. The time now is 07:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01104 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete