vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Being Logged in When Outside of Forum Location (https://vborg.vbsupport.ru/showthread.php?t=76759)

greenhybrid 02-21-2005 01:22 PM

Being Logged in When Outside of Forum Location
 
What would the necessary code be that would allow visitors to be "logged in" to vBulletin without actually accessing the forums? For instance, I have my forums located at http://www.greenhybrid.com/discuss but if a member goes straight to http://www.greenhybrid.com/compare , I'd still like them to show up as a "guest" or logged in member in the Who's Online list, etc. They don't have to be prompted to log in, though.

On a side note, is it possible to define additional locations for the Who's Online list instead of having it say "unknown location?" My section at http://www.greenhybrid.com/learn is a vBulletin hack, but the Who's Online list doesn't recognize it and places them at the "unknown location" of the URL of the last image to load (a PHP-generated avatar). I'd like to be able to define this section.

Thanks in advance.

DRJ 02-21-2005 10:18 PM

you need to include global.php in the php pages you want to track where users are. then take a look at the code in functions_online.php and you need to add the location to case statements. Just copy one of the other cases and modify it.

greenhybrid 02-21-2005 11:04 PM

Okay, well I'm partially there. I included global.php in certain pages outside of the forum directory, but it doesn't appear to be tracking visitors.

On the flipside, I was able to edit functions_online.php to define the Unknown Location for my article system. Since the mod is just one file, however, I haven't yet figured out how to tell the exact location. I basically just stated that if the visitor is at article.php, they're "Browsing the Learn Section."

Now that I know requiring 'global.php' isn't the only requirement, can anyone else please help?

greenhybrid 03-19-2005 04:58 PM

It's now a month later. I've made modifications to the functions_online file for other reasons with success, but I still cannot figure this out. Global.php + adding the location is NOT doing enough.

greenhybrid 05-07-2005 11:53 PM

It's been months and I'm still unable to find a way to do this. Can anyone please help?

Marco van Herwaarden 05-08-2005 08:38 AM

To make this work you need 2 things:

In the new script you will need:
PHP Code:

define('THIS_SCRIPT''PUTHEREYOURSCRIPTNAME');
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
require_once(
'./global.php'); 

Put your scriptname in the THIS_SCRIPT define.

Then edit functions_online.php, and add a case for your new scriptname.

greenhybrid 05-08-2005 12:26 PM

Thank you thank you thank you!!!!!! Works perfectly. Exactly what I need. :)

There's also one related thing I'm trying to accomplish, if you don't mind. The system I'm using this for is a a script I coded myself that uses the user table to verify and "log in" members separately from the forums. Since I didn't know the vB code well, I had to make it separate. So, if they log in under this system, it won't be under the forum. This means they will always show up as a visitor in Who's Online.

Do you know how to drop vBulletin's user cookie and how to read it? If I can do this, I will be able to better integrate the system. Thanks.

Hmm interesting. When I put your code in a test page with nothing else, it works. But, when I put it at the top of my script, it doesn't work. Any idea why?

Marco van Herwaarden 05-08-2005 01:25 PM

Your script is stored in a different directory then the test script?

greenhybrid 05-08-2005 10:22 PM

No. But, both are outside the forums directory. That shouldn't make a difference, though.

The script does connect to a different database, though. Could this be related?

greenhybrid 05-15-2005 12:57 AM

I hate to keep digging this up from the grave, but can anyone please help?

Umpakati 05-16-2005 08:01 PM

Quote:

Originally Posted by greenhybrid
The script does connect to a different database, though. Could this be related?

Actually, yes... I had a similar problem. I'm not too good with this stuff, so I just combined everything into a single database, and now I have no problems.

greenhybrid 05-16-2005 10:18 PM

lol. I really don't think I can do that. Putting a million scripts in one database is asking for trouble.

Did you do testing to make sure that the multiple connections are causing the problem?


All times are GMT. The time now is 04:39 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.01167 seconds
  • Memory Usage 1,739KB
  • 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
  • (12)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