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

Reply
 
Thread Tools
Details »»

Version: , by drives fast drives fast is offline
Developer Last Online: Dec 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-15-2002 Last Update: Never Installs: 0
 
No support by the author.

A little history first if I may......

I am trying to make a private files page integrate with my forum. I previously did the chat hack that basically adds a complete extra set of templates renamed and created a forum called "Private Files"....put my code in the forumdisplay template...and used access masks to allow access.

I recently found an updated process for integrating jIRC into the vbulletin with a simple php script and one custom template. This works perfect at checking for logged in status for entry. I also made my regular files page by using this method which works perfect too at ensuring that the visitor be a logged in member.

I now am trying to make my private files page use this method but I needed to be able to control who could access it.

Here's what I did.....

1) I created a custom template named "main_privatefiles"
2) I created a usergroup called "Site Supporter/Files" (I already have the perks hack installed with a usergroup called "Site Supporter")
3) I added in the modified perks hack code to recognise the new usergroup and it worked perfectly.
4) I tried to modify the main_chat.php script to authorize usergroupid 11 (which is the :Site Supporter/Files" usergroup but there is where the problem came up.

This is what the php script that looks for logged in or error_nopermission...I apologise to the author because I don't remember who it was to give credit

PHP Code:
<?php
require("global.php"); 

if( 
$bbuserid ) { 

$user $DB_site->query_first"SELECT username FROM user WHERE userid = $bbuserid); 
$bbusername $user[username]; 
eval(
"dooutput(\"".gettemplate('main_privatefiles')."\");");
} else { 
eval(
"dooutput(\"".show_nopermission()."\");"); 
// end if 
?>
What I need this script to do is allow admin, super mods, mods and usergroup 11 to view the page in template "main_privatefiles" and nobody else.

See..before.............. using the access masks...when I received a donation I had to drop the member into the "Site Supporter" usergroup and submit changes and then re-enter their member file and edit their access masks to allow them access to the private files forum.

This way....I can drop them into the usergroup 11 (Site Supporter/Files) and take care of two steps in one. When their access time expires I can then just drop the member into the usergroup 9 (Site Supporter) and they still have their perks as a supporter but do not have access to the private files page.

I hope this all made sense....I don't express my ideas well.

If anyone could help me with the above script to authorize only the admin, super mods, mods and usergroup 11, I would love you forever.

I thank you folks in advance for reading my B.S.

Show Your Support

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

Comments
  #2  
Old 01-15-2002, 03:03 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you can just change this line:
PHP Code:
if( $bbuserid ) { 
to
PHP Code:
if($bbuserinfo[usergroupid] == or $bbuserinfo[usergroupid] == or $bbuserinfo[usergroupid] == or $bbuserinfo[usergroupid] == 11) { 
Reply With Quote
  #3  
Old 01-15-2002, 03:49 AM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FANTASTIC!

You are a life saver, FWC. That did exactly what I needed it to do. I had tried something similar but had some if's in there instead of or's.

Thank you thank you thank you.
Reply With Quote
  #4  
Old 01-15-2002, 05:10 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it worked. I was going to be really embarrassed if it didn't.
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 11:01 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.04623 seconds
  • Memory Usage 2,236KB
  • Queries Executed 17 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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