Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2005, 01:22 PM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-21-2005, 10:18 PM
DRJ DRJ is offline
 
Join Date: Jan 2005
Location: California USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 02-21-2005, 11:04 PM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 03-19-2005, 04:58 PM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 05-07-2005, 11:53 PM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's been months and I'm still unable to find a way to do this. Can anyone please help?
Reply With Quote
  #6  
Old 05-08-2005, 08:38 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 05-08-2005, 12:26 PM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 05-08-2005, 01:25 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your script is stored in a different directory then the test script?
Reply With Quote
  #9  
Old 05-08-2005, 10:22 PM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 05-15-2005, 12:57 AM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:10 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.07129 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete