vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to make a non-vb page not accessible to cetrain usergroups? (https://vborg.vbsupport.ru/showthread.php?t=51329)

Mijae 04-07-2003 11:33 PM

How to make a non-vb page not accessible to cetrain usergroups?
 
So far, my gallery is for registered members only, which works with this simple code:

Code:

<?php
require("global.php");
// unregistered error message
        if ($bbuserinfo[userid]==0) {
          eval("standarderror(\"".gettemplate("galleryerror")."\");");
        }
?>

What I want is only registered members who have activated their account to be able to view them, and those who registered but not activated their account will get a specific error telling them to activate (like galleryerror_activate)

Also, is possible I could use another method: my gallery currently has only 130 images (but most of my site's hits go there), so I would like the first 1-25 images accessible for all registered users who have activated their account, then 26-50 for users with >X posts, then 51-75 with >XX and so on. Would this be possible or it would depend on my gallery script? If this is too much to ask for, I'd be satisfied with the first request ;)

mr e 04-08-2003 02:37 AM

Code:

if ($bbuserinfo['userid'] == 0 or $bbuserinfo['userid'] ==3) {
will make it so if there userid is 0 or 3 (awaiting email conformation) they will get the error

Mijae 04-08-2003 08:44 AM

Should have figured out that myself, thanks :P

Going to try that out after I clean my PC from viruses :(

Xenon 04-08-2003 09:23 AM

it's $bbuserinfo['usergroupid'] and not $bbuserinfo['userid'] ;)


All times are GMT. The time now is 06:39 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.01525 seconds
  • Memory Usage 1,709KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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