vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Invite only login page (https://vborg.vbsupport.ru/showthread.php?t=264316)

IntoVB 05-28-2011 11:42 AM

Invite only login page
 
Right so I recently installed a mod to make my forum invite only, but I'd like to have the index as a login page and nothing else which takes them tp the forum, I tried a few mods but none of them remember if the user was logged in, meaning they had to log back in every time, deluxe login seemed the best bet because it had the code to check if they were still logged in but even that didn't work. Any suggestions?

kh99 05-28-2011 03:35 PM

Seems like you could make your own index.php using this article as the base: https://vborg.vbsupport.ru/showthread.php?t=62164 or else modify your existing index.php with something like:

Code:

if ($vbulletin->userinfo['userid'])
{
    // show 'logged in' page
}
else
{
  // show register page
}


Or you could just redirect to another page, for example if your current index.php shows the member page, you could do this:

Code:

if (!$vbulletin->userinfo['userid'])
{
  $vbulletin->url = 'registerpage.php?' . $vbulletin->session->vars['sessionurl'] ;
    print_standard_redirect("Some message", false);
}


where "registerpage.php" is whatever page you want to send non-members to. (of course the register page would also have to allow login).

IntoVB 05-29-2011 01:28 AM

Ok thanks :D I'll try that out later and see how it goes

--------------- Added [DATE]1306674548[/DATE] at [TIME]1306674548[/TIME] ---------------

I tried both of those methods, the first one i couldnt figure out how to make it redirect to a page and i dunno if its just because of where in the index.php i put the second one but it wouldnt make it point to the register page


All times are GMT. The time now is 12:35 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.00951 seconds
  • Memory Usage 1,713KB
  • 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
  • (3)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