vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Who's online locations to non-forum pages.. (https://vborg.vbsupport.ru/showthread.php?t=41239)

Velocd 07-18-2002 09:25 PM

Who's online locations to non-forum pages..
 
I know how to add who's online locations to any page within the forum directory, but I would also like to add them to my main homepage index.php and other non-forum pages.

In online.php, at here:
PHP Code:

case 'http://www.mysite.com/multimedia.php':
      
$userinfo[activity] = 'multimedia';
    break; 

This code doesn't work, because the case only takes filenames without the added URL prefix.

In example, it will work with this:
PHP Code:

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

But is referring to the non-existant forums/multimedia.php file.

So how might I be able to fix this?

Admin 07-19-2002 06:11 AM

You need to check $loc, and not $filename, which means you need to put the first bit of code outside (and AFTER) the switch statement.

PHP Code:

if ($loc == 'http://www.mysite.com/multimedia.php') {
    
$userinfo['activity'] = 'multimedia';



Velocd 07-19-2002 05:40 PM

I'm still receiving errors, which must mean I'm putting that bit of code you posted above in the wrong spot..

Here is the area in online.php I placed it:
PHP Code:

default:
    
$userinfo[activity] = 'unknown';
  }
  
  if (
$loc == 'http://www.mysite.com/multimedia.php') {
    
$userinfo['activity'] = 'multimedia';
  } 

Yet in my who's online, it is still saying unknown location. :(

Velocd 07-19-2002 07:45 PM

b u m p
u
m
p

Neo 07-19-2002 07:51 PM

Now how would it pick up where they are if on the other page you do not have anything connecting it to the site? so you might need to put some code in the scripts that are non-forum.

Velocd 07-19-2002 11:38 PM

Oh, lol, forgot to mention. I'm running my homepage on VBhome lite, and also I've integrated just about the rest of my site with vbulletin, so everypage is referencing to global.php. So all I need now is to figure out what Firefly suggested..

Velocd 07-20-2002 02:50 AM

*cough*
*cough*

Brad 07-20-2002 09:59 AM

the way i did this with vBindex, was to rename the vBulletins index.php to forum.php. then i edited the index.php call in online.php to say "site home", made a new call for forum.php to say "forum index".

both the forum and site now run out of the same directory. just edit the templates with links to index.php to forum.php and you sould get the effect you want. a little extra work i know but a bit easyer on me in the end.

Velocd 07-23-2002 03:53 AM

*on verge of death* Firefly...need..more..of..your..help on..post #3 :dead:

Velocd 07-23-2002 11:05 PM

Firefly in post#2 are you saying to put this code:
Code:

  if ($loc == 'http://www.mysite.com/multimedia.php') {
    $userinfo['activity'] = 'multimedia';
  }

After the second switch statements, and before the default case, as shown in post #3? Or are you referring to another piece of code? If there was just a simple way to point $loc to 'http://www.mysite.com/' and not the forum directory, I could just add 'forums/' at the start of all the cases.

ie:
Code:

case 'forums/showthread.php':
    $userinfo[activity] = showthread;
    break;



All times are GMT. The time now is 01:41 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.02379 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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