Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-17-2002, 07:40 PM
Kathy's Avatar
Kathy Kathy is offline
 
Join Date: Nov 2001
Location: Texas, ya'll
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Guest/Member location on non-vb pages for who's online?

I know there is a hack for who's online to be displayed on non-vb page. But I think what I'm looking for is different.

I use php for the extension of all the pages of my website, non-vb, so that I use header.inc and footer.inc for those pages...to easily update the header and footers when needed.

Is there any way to add a snip of code to keep track of guests/members on those non-vb pages using their vb session hash?

I was just thinking if there was a simple way to add a bit of code to the header...it would then show those guests/members locations on "who's online" ?

Is this already done and I don't know what to call this?

Thanks for any help you can provide.
Reply With Quote
  #2  
Old 06-17-2002, 07:55 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im note sure what you exactly mean...

Do you use templates to power your pages? If you do, then they must be in the Forum directory, am I correct?

If that is the case, do the following :

Edit online.php
===========
FIND:
PHP Code:
case 'gallery':
      
$userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>";
      break; 
AFTER IT ADD:

PHP Code:
case 'name of file':
      
$userinfo[where] = "Viewing <a href='name of file.php?s=$session[sessionhash]'>Name of the File</a>";
      break; 
THEN FIND:
PHP Code:
 case 'gallery.php':
    
$userinfo[activity] = 'gallery';
    break; 
AFTER IT ADD:
PHP Code:
 case 'name of file.php':
    
$userinfo[activity] = 'name of file';
    break; 
(Make sure you change all instances of "name of file.php" and "name of file" to the file name you chose)

Satan
Reply With Quote
  #3  
Old 06-17-2002, 08:56 PM
Kathy's Avatar
Kathy Kathy is offline
 
Join Date: Nov 2001
Location: Texas, ya'll
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, no....they aren't in the forum directory.

I have about 200 static pages of my website in addition to the vb forums. In order to ease the changes that I make to header and footer of my site, I made all the pages of my site to be like: index.php or fun.php (outside the forum directory) and I user header.inc and footer.inc.

I had just thought...in my php challenged brain of mine that I could add some php code to my headers to show members/guests on 'who's online' while viewing my static pages of the site.

So, this isn't possible? :/
Reply With Quote
  #4  
Old 06-17-2002, 10:00 PM
Kathy's Avatar
Kathy Kathy is offline
 
Join Date: Nov 2001
Location: Texas, ya'll
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OKay, what about this?

COuld I put my header.inc inside the forum directory (changing the path for the header.inc of course where needed)?

My header use the same links with session hash as my vbulletin....to make the site the same throughout all the pages, vb or static....

And once the header.inc is within the forum directory, could that then be a "file" so that I can keep track of guests/members on those pages generically like:

"Viewing website static page" (or something like that?)
Reply With Quote
  #5  
Old 06-19-2002, 08:19 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope..

even if you put all your php files under your board directory this wont work..

Vb who's online system does not work by checking the files under certain directory, it has a completely different scheme.

To make it work your only chance would be to insert :

PHP Code:
require("./global.php");
 
$action="your action here"
into all your php files then do what Hellsatan suggested and define all your new actions inside online.php.

Downsides:
* Adding this line to your existing files make them a part of vb system and by default add at least 10 SQL queries for every file called.
* since they become the part of vbsystem, the codes inside them may clash with vb codes after your adding this line. This wont effect vb, but some of your alien php files may stop working or give errors and you may need to remodify them.
Reply With Quote
Reply

Thread Tools
Display Modes

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:19 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.03670 seconds
  • Memory Usage 2,208KB
  • 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
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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