vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Download Files trough VB3 Member System Authorization (https://vborg.vbsupport.ru/showthread.php?t=66105)

J.C. 06-12-2004 03:20 PM

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.

eoc_Jason 06-12-2004 03:35 PM

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

J.C. 06-12-2004 11:40 PM

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,

Hialls 06-13-2004 02:36 AM

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

J.C. 06-15-2004 07:15 PM

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^_^

J.C. 06-15-2004 07:28 PM

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

Mistah Roth 06-15-2004 10:50 PM

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 :)


All times are GMT. The time now is 08:09 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.00984 seconds
  • Memory Usage 1,731KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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