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)

Admin 07-24-2002 07:07 AM

You need to add it AFTER the switch, not INSIDE.

Velocd 07-24-2002 05:19 PM

:confused: =falls over=

I have been putting the code outside of the switch statement.. The switch ends right after the default and bracket, right?

PHP Code:

 case 'printthread.php':
    
$userinfo[activity] = 'printthread';
    
$blowup explode('='$token1);
    
$threadid intval($blowup[1]);
    
$threadids .= ",$threadid";
    
$userinfo[threadid] = $threadid;
    break;
  case 
'chat.php':
    
$userinfo[activity] = 'chat';
    break;
  case 
'gallery.php':
    
$userinfo[activity] = 'gallery';
    break;
  case 
'/robots.txt':
    
$userinfo[activity] = 'spider';
    break;
  default:
    
$userinfo[activity] = 'unknown';
  } <-- switch 
ends here right?

  [
MY CODE goes here]

  return 
$userinfo;
}

  
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              ORDER BY user.username
                              "
);

  
$moderators $DB_site->query("SELECT DISTINCT userid FROM moderator");
  while (
$mods $DB_site->fetch_array($moderators)) {
    
$mod[$mods[userid]] = 1;
  } 

And in the area where it says [MY CODE goes here], I placed this:
PHP Code:

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

Changed to my URL ofcourse.

Which is outside and after the switch statement.. So I'm a bit lost :disappointed:

Admin 07-24-2002 05:26 PM

Try this:
PHP Code:

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



Velocd 07-24-2002 06:18 PM

Still no go :(
Very strange indeed.

yetdog11 08-01-2002 02:55 PM

I too would like to know the answer to this. However, we already have a custom php file included in all of our pages to include the vB membership, instead of just including global.php. So users are logged in outside of the board, basically. I assume that this means I don't have to include global.php, correct?

And then just go ahead and post the code in online.php as stated above?

Matthew Yette
matt@antsmarching.org

Velocd 08-23-2002 11:04 PM

I'm going to bump this, but just one last time. This is still an unsolved problem I can't figure out.

NTLDR 08-23-2002 11:31 PM

Have you tried including global.php in the file?

PHP Code:

chdir('./path-to-global-php');
require(
'./global.php'); 

and then modifying online.php as per any other file in the forums directory?

Velocd 08-24-2002 03:11 AM

Yup, everypage on my site is requiring global.php, mainly because I have integrated the entire site ;)

The problem is not with locations within my forums directory, it's with those outside of the directory, such as www.mysite.com/multimedia.php

Adding this in a regular fashion to online.php does not work, as discussed on the first page of this thread.

NTLDR 08-24-2002 07:43 PM

Strange, that method works fine for me.

tkeil69575 10-24-2002 01:47 PM

Hi,
NTLDR is right, it worked for me anyways.

I managed to integrate files in a new directory, which was also outside the forum location.

Just include the global in the external files and then add the locations as usual in the online.php


All times are GMT. The time now is 01:42 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.01578 seconds
  • Memory Usage 1,755KB
  • 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
  • (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