Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2004, 05:32 PM
darkmage's Avatar
darkmage darkmage is offline
 
Join Date: Sep 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 01-25-2004, 09:14 PM
darkmage's Avatar
darkmage darkmage is offline
 
Join Date: Sep 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, but I really need this hack so I'm going to post again to bump the thread.
Reply With Quote
  #3  
Old 01-25-2004, 09:18 PM
darkmage's Avatar
darkmage darkmage is offline
 
Join Date: Sep 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-27-2004, 03:17 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can do that without a hack.

Just set the Usergroup Permissions for Guests/unregistered to: Can download attachments? NO
Reply With Quote
  #5  
Old 01-27-2004, 03:31 PM
darkmage's Avatar
darkmage darkmage is offline
 
Join Date: Sep 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-27-2004, 03:35 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();
Reply With Quote
  #7  
Old 01-27-2004, 03:40 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 01-27-2004, 04:51 PM
darkmage's Avatar
darkmage darkmage is offline
 
Join Date: Sep 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04154 seconds
  • Memory Usage 2,236KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete