vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Using vbulletin as login for custom pages (https://vborg.vbsupport.ru/showthread.php?t=186039)

KaivanRijswijk 07-22-2008 04:52 PM

Using vbulletin as login for custom pages
 
I have created a few custom pages that are only accesable for administrators, i want to use vbulletin to check if a person is a administrator or not or if he is logged in or not.

I know phpbb has these scripts, but i cant find them from vbulletin. Is there anybody that can help me??

Thanx :D

Milad 07-22-2008 07:36 PM

include global.php

Dismounted 07-23-2008 10:18 AM

If they are custom scripts already including global.php, you can use this to check. (Put this after your call to global.php.)
PHP Code:

if (!is_member_of($vbulletin->userinfo6))
{
    
print_no_permission();



KaivanRijswijk 07-23-2008 10:23 AM

So if i include global.php and that code its only accesable as administrator?

Because i dont need the template to be included :)

Dismounted 07-23-2008 10:31 AM

Yes.

KaivanRijswijk 07-23-2008 10:32 AM

Quote:

Originally Posted by Dismounted (Post 1582172)
Yes.

Thank you very much for this info :)


All times are GMT. The time now is 07:09 AM.

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.01037 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_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