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 05-26-2004, 05:21 AM
JAB Creations's Avatar
JAB Creations JAB Creations is offline
 
Join Date: May 2002
Location: Orlando Florida, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default X online Users (full site)

Hello...

I recently converted my site to PHP. I want to link my php pages to VB and have VB be able to count the total number of active users and guests around my entire site. Then I want to be able to php print how many active users are online.

Not just people on the forums of course.
Reply With Quote
  #2  
Old 08-02-2004, 03:44 AM
danrak danrak is offline
 
Join Date: Dec 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you found out how to do this yet? I'm trying to figure out how to do this also.
Reply With Quote
  #3  
Old 08-02-2004, 07:45 PM
JAB Creations's Avatar
JAB Creations JAB Creations is offline
 
Join Date: May 2002
Location: Orlando Florida, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I have...

Plus I will tell you how to do something extra that you'll be interested in!

<?php chdir("/home/youruser/www/forum"); require_once('global.php'); ?>

Just put that anywhere on the PHP files. I use frames so I only put this on pages with content, not frame borders.

Now once you do this you're going to see ...

Unknown Location
/fiction/fiction-artwork.php

Unfortunitly there is only one slow but sure way to fix this if you care to of course...

This is a VB Hack, so be sure to...

1.) Back up the original VB file; I do save oringal files in a BAK folder.
2.) Back up your hacked file once you have it working!
3.) Make sure you can upload the original file in case it screws anything up!

Ok, you will want to edit includes/functions_online.php. Also an important note DONT edit pages online, always edit them locally on your computer. This idea has led to many great disasters in the past, thankfully not to me!

There are two parts you will have to edit...I will just copy and paste two pages I have modded, and the code before it. So you just have to look for the code and mod it for your own page....

/////Mod 1 (of 2)//////////

case 'index':
$userinfo['action'] = $vbphrase['viewing_index'];
$userinfo['where'] = "<a href=\"$vboptions[forumhome].php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
break;
case 'home-about':
$userinfo['action'] = 'Home Section';
$userinfo['where'] = "<a href=\"http://www.jabcreations.com/home/home-about.php\">About</a>";
break;
case 'home-articles':
$userinfo['action'] = 'Home Section';
$userinfo['where'] = "<a href=\"http://www.jabcreations.com/home/home-articles.php\">Articles</a>";
break;

\\end mod part 1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Now you will have to scroll down a bit...

/////mod part 2/////////////

case 'forumdisplay.php':
$userinfo['activity'] = 'forumdisplay';
break;

case 'attachment.php':
$userinfo['activity'] = 'attachment';
break;

case '/':
case '':
case 'home-about.php':
$userinfo['activity'] = 'home-about';
break;
case 'home-articles.php':
$userinfo['activity'] = 'home-articles';
break;


\\\\\\\\end mod part 2\\\\\\\\\\

My home section is in a different folder that is on the same level as my VB folder. I don't think you have to worry as it will use that file wherever it is on your page.

Your result will be like this....

Guest
03:42 PM
Home Section
Latest News

Guest
03:41 PM
Home Section
Downloads

Enjoy ! :classic:
Reply With Quote
  #4  
Old 08-02-2004, 09:12 PM
danrak danrak is offline
 
Join Date: Dec 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. I will have to try this out.
Reply With Quote
  #5  
Old 08-02-2004, 09:38 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes for vb to track your other files just require_once('./global.php'); and it should track the file. Also to show locations correctly in whos online just edit /includes/functions_online.php
Reply With Quote
  #6  
Old 08-19-2004, 06:02 PM
jfreyholtz jfreyholtz is offline
 
Join Date: Dec 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
yes for vb to track your other files just require_once('./global.php'); and it should track the file. Also to show locations correctly in whos online just edit /includes/functions_online.php
Any idea why this wouldn't work? I have global included on every page in my site (and have login avail. on them), but users don't show up on the Whos Online bit until they actually go into the forums.
Reply With Quote
  #7  
Old 08-19-2004, 08:01 PM
JAB Creations's Avatar
JAB Creations JAB Creations is offline
 
Join Date: May 2002
Location: Orlando Florida, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you are defining your server path in absolute...

instead of....

../../file.php

use...
/home/shared_server_username/www/vbfolder/thefileyouwant.php

Full example....
<?php chdir("/home/jabsite/www/community"); require_once('global.php'); ?>
Reply With Quote
  #8  
Old 08-20-2004, 12:29 PM
jfreyholtz jfreyholtz is offline
 
Join Date: Dec 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JAB Creations
Make sure you are defining your server path in absolute...

instead of....

../../file.php

use...
/home/shared_server_username/www/vbfolder/thefileyouwant.php

Full example....
<?php chdir("/home/jabsite/www/community"); require_once('global.php'); ?>
Yeah, that's what I'm doing. This, to be precise:

chdir("/home/virtual/site1/fst/var/www/html/forums");
require_once("./global.php");

Login works on all pages using this, but the users aren't showing up on Who's Online (nor in the sessions table in the db), unless they actually go into the forums.
Reply With Quote
  #9  
Old 08-20-2004, 02:04 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are you actually running any queries in that file?
Reply With Quote
  #10  
Old 08-20-2004, 02:16 PM
ChessMess ChessMess is offline
 
Join Date: Jul 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would something like this cause a slowdown on the forums for high traffic sites?
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 11:02 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.05141 seconds
  • Memory Usage 2,257KB
  • 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
  • (2)bbcode_quote
  • (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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete