Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2005, 05:21 AM
xBhp xBhp is offline
 
Join Date: Jan 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to show acvtive users from non - VB pages?

I have got a website integerated with VB. I have quite a few non - VB pages. i want that whenever users are browing those pages they should also show up in the active users list.

is there a way to do that ?
regards
Edit/Delete Message
Reply With Quote
  #2  
Old 03-23-2005, 06:43 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As long as you include global.php in your script, a vB session will be set and the user will show logged in i think.
Reply With Quote
  #3  
Old 03-23-2005, 02:25 PM
xBhp xBhp is offline
 
Join Date: Jan 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i included the global.php in a file in a folder one up of the forum folder. i got this error:

Warning: main(/talkies/global.php): failed to open stream: No such file or directory in /home2/xbhp1/public_html/posts.php on line 1

Warning: main(/talkies/global.php): failed to open stream: No such file or directory in /home2/xbhp1/public_html/posts.php on line 1

Warning: main(): Failed opening '/talkies/global.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/xbhp1/public_html/posts.php on line 1

I reckoned that this must be a relative path error, but it wasnt. no use of removing the starting backslash either. please help.
Reply With Quote
  #4  
Old 03-23-2005, 03:04 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will need to do a chdir to your forum directory prior to calling teh global.php.

PHP Code:
chdir("./forum");
require_once(
"./global.php); 
If needed chdit back after the global.
Reply With Quote
  #5  
Old 03-26-2005, 10:28 AM
xBhp xBhp is offline
 
Join Date: Jan 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i did what u said and it seemed to work, but i got this error: "Unable to add cookies, header already sent.
File: /home2/xbhp1/public_html/posts.php
Line: 3"

but when i cleared cookies the page showed up fine. if i add this code to every page it wont be possible to tell the non tech savvy users to clear the cookiea and relogin to hget rid of this unfreindly message.
Reply With Quote
  #6  
Old 03-26-2005, 11:46 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you have no page output before you put Marco's code there. Also make sure there is no spaces before the <?php at the top of the page
Reply With Quote
  #7  
Old 03-26-2005, 01:44 PM
xBhp xBhp is offline
 
Join Date: Jan 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
You will need to do a chdir to your forum directory prior to calling teh global.php.

PHP Code:
chdir("./forum");
require_once(
"./global.php); 
If needed chdit back after the global.

i tried to figure out how to chdir back. this is the php code i used but of no avail.
PHP Code:
<?PHP 
$dir 
getcwd();
chdir("../../talkies"); 
print 
$dir;
require_once(
"global.php");
chdir($dir);

 
?>
its throwing an error.

Warning: chdir(): No such file or directory (errno 2) in /home2/xbhp1/public_html/broadband/fotos/index.php on line 6
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 08:56 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.03730 seconds
  • Memory Usage 2,219KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete