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-30-2002, 07:06 PM
shaffer shaffer is offline
 
Join Date: Jun 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forum Permissions

Thanks

Thank you!
Reply With Quote
  #2  
Old 06-30-2002, 07:25 PM
Broekie's Avatar
Broekie Broekie is offline
 
Join Date: Dec 2001
Location: Netherlands
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about this:

Guests can see the thread titles, but when they click on it, they get the following error:
Code:
Sorry, you're not allowed to view threads when you're not logged in. Please login or <a href="register.php">Register</a>!
Attached Files
File Type: txt threadviewnotloggedin.txt (1.5 KB, 22 views)
Reply With Quote
  #3  
Old 07-12-2002, 05:19 PM
Cygnus Cygnus is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is SO close to what I want... but not quite.

I want specific user groups to be able to see all of the boards (or some at my discretion) on the site but when they click on a board that they do not have permission to see, they get the "not authorized" error that lists possible reasons.

Currently, they cannot see anything. If I switch "Can view forum" to yes in forum permissions, they can see the board but when they click on it, they get a "No posts in the last 30 days" message when this is not the case as there have been posts on that board today.

Solutions?

Thanks,
Cygnus
Reply With Quote
  #4  
Old 07-12-2002, 05:22 PM
Cygnus Cygnus is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your (Broekie) code is as follows:
Code:
// To make sure that not logged in users can't view threads
if ($bbuserinfo['usergroupid']==1) {
eval("standarderror(\"".gettemplate("error_threadviewnotloggedin")."\");");
exit;
}
// End of code
If that were changed to:
Code:
// To make sure that not logged in users can't view threads
if ($bbuserinfo['usergroupid']!=2) {
eval("standarderror(\"".gettemplate("error_threadviewnotloggedin")."\");");
exit;
}
// End of code
Where 2 is not actually 2 but the group that I want to see that board (a new group that I created)....

Would that work? Does != work in PHP or am I confusing it with ASP? <> perhaps? Anyone? Bueller?

Cygnus
Reply With Quote
  #5  
Old 07-12-2002, 06:41 PM
Cygnus Cygnus is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK... just thought of a problem with that code...

!=2 will not work as it will keep out Admins, SuperMods and Mods. I need something that will make specific boards viewable to four usergroups and produce the "no authorization" error for all other groups. Would this work:

if ($bbuserinfo['usergroupid']!=2 || 3 || 4)

Am I now throwing in another language?

Thoughts? Ideas? Help...

Cygnus
Reply With Quote
  #6  
Old 07-12-2002, 10:19 PM
Cygnus Cygnus is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah... so none of you guys know PHP?

That's kind of surprising...

Cygnus
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:04 AM.


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.06803 seconds
  • Memory Usage 2,223KB
  • Queries Executed 12 (?)
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_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete