vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add Who's Online locations from Admin CP (https://vborg.vbsupport.ru/showthread.php?t=32849)

Axe 12-31-2002 07:27 PM

Okies, I found the post I was talking about...

https://vborg.vbsupport.ru/showthrea...&postid=276405

But not working for diff subdomains.

NTLDR 12-31-2002 08:03 PM

This hack won't do that, and I for one have never managed to hack it in so I can have more than one index.php.

Axe 12-31-2002 08:18 PM

hmm...

I wonder if there's a way to hack it so it stores the complete path to the file instead of just the filename, then just mod the online.php to go with full paths.

StangMan91GT 12-31-2002 09:13 PM

I was able to get the Who's Online to track users across many of the main section pages of our site, but I had to hack the online.php myself to make it function the way I wanted. I couldn't find any pre-existing hack that would do it.

Axe 12-31-2002 09:25 PM

Well, that's what I'm tryin' to figure out how to do :)

So what hacks did you make to online.php? And does it work for complete URLs? Not just filenames & relative paths?

StangMan91GT 12-31-2002 11:54 PM

The who's online code has a variable called strpos($userinfo[location]), what I did was modify the existing case structure logic to both look for additional filenames and use the above variable, under a default case statement, within a large if - elseif structure to also parse for URL paths. Then you set up additional $userinfo[activity] value tags. In another case structure in the online.php code, it uses these activity labels/tags to determine what to output on the who's online listing.

View the attached code that I am currently running and you'll see what I did. Just duplicate what I am doing, but with your own filenames or URL paths on your site. Then you just include the following SSI tag at the end of each HTML file on your site. For this to work correctly without having to change all your file extensions to .shtml, just edit your Apache config or your IIS script/ISAPI configuration to make it parse all .html files for SSI commands in addition to .shtml files.

Code:

For Apache:
<!--#include virtual="/Tracker.php"-->

For IIS you might have to use:
<!--#exec cgi="/Tracker.php"-->

This file is in the root of my site and simply contains the following:

<?
  require('X:/Absolute root Path to Vb/global.php');
?>

This was just a quicky hard coded hack to make it do this. I think a much better thing to do, and something that should be in Vb any ways, is added functionality to the admin interface that would let you build a list of URL's and filenames (stored in the database) of locations anywhere on your site (even on subdomains) and a corresponding URL to use as a link. Then if you just include some tracking code, or the global.php file, on all your pages it would have this functionality out of the box. The Who's Online code would just use what it pulls from that database table to compare/parse against its variables. This would make the Who's Online much more flexible and greatly expand it's functionality.

codewebs 01-02-2003 09:30 PM

how would i make it so anything in lets say: archive/ :would say in whos online like viewing archive?

Natch 01-07-2003 01:52 PM

I'm loving this hack - thanks Chen!

Martin64 01-19-2003 10:30 PM

Class hack, saves a lot of work. :)

Thanks FireFly. :D

ethics 01-26-2003 03:16 PM

[QUOTE]Originally posted by chad777
When I goto view who's online after adding about 6 locations.
I get this error

Fatal error: Call to a member function on a non-object in /home/snarfpro/public_html/forums/online.php on line 128

Any Ideas ?


All times are GMT. The time now is 01:12 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.01154 seconds
  • Memory Usage 1,735KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete