vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Forum Permissions (https://vborg.vbsupport.ru/showthread.php?t=40476)

shaffer 06-30-2002 07:06 PM

Forum Permissions
 
Thanks

Thank you!

Broekie 06-30-2002 07:25 PM

1 Attachment(s)
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>!

Cygnus 07-12-2002 05:19 PM

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

Cygnus 07-12-2002 05:22 PM

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

Cygnus 07-12-2002 06:41 PM

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

Cygnus 07-12-2002 10:19 PM

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

That's kind of surprising...

Cygnus


All times are GMT. The time now is 09:28 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.00987 seconds
  • Memory Usage 1,716KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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