Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Protected file downloads by user group Details »»
Protected file downloads by user group
Version: , by noppid noppid is offline
Developer Last Online: Sep 2015 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-31-2003 Last Update: Never Installs: 0
 
No support by the author.

Here's what I got so far...

This allows you to host files for download and only allow certain user groups to see certain files. The file is streamed to the user form a folder protected by htaccess.

So far I have been using phpmyadmin to add a file to the list. There are fields for filename, author, description, and category(group).

When the file is listed the number of downloads will be dispalyed and the file size.

Files are uploaded via ftp to a protected folder.

There is a table that records all downloads. This too is viewed in phpmyadmin currently.

For it to be a complete hack I think it needs an admin page for adding, editing, and deleting files form the list. It would be nice to to have a view and delete for the log as well.

It's handy as is if ya don't mind using phpmyadmin, but if anyone feels like taking over this could be a nice hack.

Regards

Download Now

File Type: (21.4 KB, 19 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-12-2003, 06:43 AM
Rein Masamuri's Avatar
Rein Masamuri Rein Masamuri is offline
 
Join Date: Apr 2003
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd LOVE this to be completed with an admin page!
If you get someone with some talent (i.e. I don't have any) please tell me ^_^
Reply With Quote
  #3  
Old 11-12-2003, 03:36 PM
barrywien barrywien is offline
 
Join Date: Jun 2002
Location: Durham - UK
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im up for the challenge, I have created an installation file to automatically setup the databases however when viewing fplist.php I just get vB header, footer etc however the table is empty and an error saying

Warning: Invalid argument supplied for foreach() in /home/phpcart/public_html/forum/fplist.php on line 116

Here it is: http://www.phpcart.co.uk/forum/fplist.php

Intergrating this into the Admin CP shouldnt be to hard once I solve this problem.
Reply With Quote
  #4  
Old 11-12-2003, 05:32 PM
Rein Masamuri's Avatar
Rein Masamuri Rein Masamuri is offline
 
Join Date: Apr 2003
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this going to have usergroup><= can download this ?
Reply With Quote
  #5  
Old 11-13-2003, 10:58 AM
barrywien barrywien is offline
 
Join Date: Jun 2002
Location: Durham - UK
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I edited the code to include either usergroup or depending upon how many posts the user has, but as I said, still got the above mentioned problem.
Reply With Quote
  #6  
Old 11-18-2003, 04:43 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I haven't been around. I'll take a look and try to catch up and help with that error.

EDIT:

The error is most likely caused by a typo is this block of code. The foreach uses these params to check for valid usergroups...

PHP Code:
/*********** SET YOUR GROUPS HERE ****************************/
$gadmin=6;    // admin
$g1=2;        // Registered
$g2=5;        // Super Mod
$g3=7;        // Mods
$g4=8;        // Adult Members

$fp_groups=array($g1,$g2,$g3,$g4,$gadmin); 
Take a look there or paste yours here. I'll keep an eye out to help.
Reply With Quote
  #7  
Old 11-29-2003, 01:04 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

barrywien I see this seems to be working on your site now?

Is that so?
Reply With Quote
  #8  
Old 11-29-2003, 01:38 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why construct your array like that

PHP Code:
$allowedusergroups = array(1,2,3,4,5); // add allows usergroups here 
Then check with:

PHP Code:
if(in_array($bbuserinfo['usergroupid'], explode(','$allowedusergroups)))
{
// stuff

Reply With Quote
  #9  
Old 11-29-2003, 06:10 PM
barrywien barrywien is offline
 
Join Date: Jun 2002
Location: Durham - UK
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FleaBag
barrywien I see this seems to be working on your site now?

Is that so?
No I still get the same error message. I havnt been able to fix it or find a work around.
Reply With Quote
  #10  
Old 12-04-2003, 05:28 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by barrywien
Im up for the challenge, I have created an installation file to automatically setup the databases however when viewing fplist.php I just get vB header, footer etc however the table is empty and an error saying

Warning: Invalid argument supplied for foreach() in /home/phpcart/public_html/forum/fplist.php on line 116

Here it is: http://www.phpcart.co.uk/forum/fplist.php

Intergrating this into the Admin CP shouldnt be to hard once I solve this problem.
I can't duplicate the problem you are having. Can you send or post your fplist file? I'm assuming you've modified it.
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:51 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.25116 seconds
  • Memory Usage 2,317KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete