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 06-12-2004, 03:20 PM
J.C.'s Avatar
J.C. J.C. is offline
 
Join Date: Apr 2003
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Download Files trough VB3 Member System Authorization

Hello,

I would like to request a simple download script that connect to vb3 member database,

so, for example:

http://www.domain.com/dl.php?=redhat.exe

when a Registered User (User Group) download that link, it allows you to download,

but if a guest tries to download that link, it will not allow you to download, but it will redirect you to home page www.domain.com

Also I want that the file's real URL/path is hidden...

So basically, the script check vb3 users db, and if the user is a registered member and loggin in, the script allow the user to download, but if the user is not loggin in or a guest, the script redirect the user to the specified website.

Can someone make this simple hack? This hack may became very very useful for some sites...or may be widely used, because any vb sites that want to offer downloads to their members can easily use this hack so that only registered members can download.

Thank you very much.
Reply With Quote
  #2  
Old 06-12-2004, 03:35 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you could do this quite easily with vB itself...

Just make a forum section for downloads, and just attach the files to a thread with the file's description and whatnot. You could use an extra usergroup if you wanted so you could differentiate between allowing members to download and guests (if you allow guests to normally view attachments).

However, be aware if you want large uploads you will have to modify the php.ini file to allow for files > 8MB (or whatever the default usually is).
Reply With Quote
  #3  
Old 06-12-2004, 11:40 PM
J.C.'s Avatar
J.C. J.C. is offline
 
Join Date: Apr 2003
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

err, I already know that

And I don't want it as an attachment... and also the files here is all large... 200MB+ - Gigs like that,
Reply With Quote
  #4  
Old 06-13-2004, 02:36 AM
Hialls's Avatar
Hialls Hialls is offline
 
Join Date: Jul 2002
Location: Reading, England
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just use something like this...
PHP Code:
if(is_member_of($bbuserinfogroupid)) {
 
header ('Location: http://www.domain.com/file.com');
 } else { 
header ('Location:http://www.domain.com');
 } 
easy as pie

Shout if you need more help
Reply With Quote
  #5  
Old 06-15-2004, 07:15 PM
J.C.'s Avatar
J.C. J.C. is offline
 
Join Date: Apr 2003
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hialls
just use something like this...
PHP Code:
if(is_member_of($bbuserinfogroupid)) {
 
header ('Location: http://www.domain.com/file.com');
 } else { 
header ('Location:http://www.domain.com');
 } 
easy as pie

Shout if you need more help
Wow thanks!

Will try that ! I'll shout if i need more help^_^
Reply With Quote
  #6  
Old 06-15-2004, 07:28 PM
J.C.'s Avatar
J.C. J.C. is offline
 
Join Date: Apr 2003
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But that code doesn't hide the true url ?

Btw, that script is for 1 file only, isnt it?

how about a script with indicators and multiple urls something like this...

for example:

download.php?file1.zip - to download file1.zip only
download.php?file2.zip - to download file2.zip only
...and so on...

Is it hard to do?

Thanks so much...!
Reply With Quote
  #7  
Old 06-15-2004, 10:50 PM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually a better way of doing it is with a popup, I saw this on a site, heres the link:

http://www.ffadvanced.com/finalfantasy/adventchildren/

try clicking any of the downloadable links, a pop up appears telling you to login or register. If someoen can make a script like that for vbulletin 3, that'd be sweet
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 01:03 PM.


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.12506 seconds
  • Memory Usage 2,223KB
  • 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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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