vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Stay Logged In while on non-vbulletin pages (https://vborg.vbsupport.ru/showthread.php?t=266202)

Eliasen 07-03-2011 02:06 PM

Stay Logged In while on non-vbulletin pages
 
Hi everyone,

I have making a website where I use the vbulletin as the backbone.

All my non-vbulletin pages includes:

PHP Code:

$curdir getcwd ();
chdir('/home/myaccount/public_html/my-website.com/forum');
require_once(
'/home/myaccount/public_html/my-website.com/forum/global.php');
chdir ($curdir);

if(
$vbulletin->userinfo['userid'] < 1){
    
header("Location: login.php");
    exit();


How can I make it, so that if you are browsing the website (the non-vbulletin pages) you won't get logged out automatically due to "inactivity"?

I hope I make sense.

Thanks!

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

No one? Can this even be done?

Eliasen 07-05-2011 05:16 PM

Anyone at all? Ideas, hints anything?

Lynne 07-05-2011 06:02 PM

You should follow this guide for your pages - [HOW TO - vB4] Create your own vBulletin page

Eliasen 07-05-2011 06:03 PM

Thanks, I will look at it now :)

kh99 07-05-2011 06:05 PM

Quote:

Originally Posted by Eliasen (Post 2216218)
Can this even be done?

I think the activity time is updated as a "shutdown query", and they normally get executed at the end when you call print_output(). But you're probably not calling that. I think you might be able to add a call to exec_shut_down() at the end of your code to take care of it. (You may have to include includes/functions.php).

Eliasen 07-05-2011 06:26 PM

Ohh I see, thanks will give it a look :)

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

Seems to work if you execute the exec_shut_down(), thanks kh99!


All times are GMT. The time now is 03:55 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.01705 seconds
  • Memory Usage 1,725KB
  • 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