Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-30-2001 Last Update: Never Installs: 109
 
No support by the author.

This hack was requested on vBulletin.com.

It lets you add possible locations to Who's Online, directly from the Admin CP.
This is good if you are using external hacks, that use vBulletin's system. You probably know that users browsing these external files have Unknown Location (or Main Index for non-admin viewers) next to them.

With this hack, you can easily add a new custom location with ease!
It's also designed in a way that won't let you overwrite existing locations. ('dummy protection' as I like to call it )

The locations you add are not stored in their own table, because I really felt that would be waste of space and resource.
Instead, I store the locations in the template table, in one special template dedicated to this data.
It was a lot harder to do it this way, btw.

Please let me know if you find any bugs, or if this script doesn't work with files in child folders (this is my main concern).
This can be easily remove (just undo changes to online.php), so please don't fear to try it out!

A nice screen shot is in my next post.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #182  
Old 12-31-2002, 07:27 PM
Axe's Avatar
Axe Axe is offline
 
Join Date: Dec 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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

But not working for diff subdomains.
Reply With Quote
  #183  
Old 12-31-2002, 08:03 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #184  
Old 12-31-2002, 08:18 PM
Axe's Avatar
Axe Axe is offline
 
Join Date: Dec 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #185  
Old 12-31-2002, 09:13 PM
StangMan91GT StangMan91GT is offline
 
Join Date: Aug 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #186  
Old 12-31-2002, 09:25 PM
Axe's Avatar
Axe Axe is offline
 
Join Date: Dec 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #187  
Old 12-31-2002, 11:54 PM
StangMan91GT StangMan91GT is offline
 
Join Date: Aug 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #188  
Old 01-02-2003, 09:30 PM
codewebs codewebs is offline
 
Join Date: Dec 2002
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would i make it so anything in lets say: archive/ :would say in whos online like viewing archive?
Reply With Quote
  #189  
Old 01-07-2003, 01:52 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm loving this hack - thanks Chen!
Reply With Quote
  #190  
Old 01-19-2003, 10:30 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Class hack, saves a lot of work.

Thanks FireFly.
Reply With Quote
  #191  
Old 01-26-2003, 03:16 PM
ethics ethics is offline
 
Join Date: Feb 2002
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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 ?
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 12:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05227 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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