Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 07-24-2002, 07:07 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to add it AFTER the switch, not INSIDE.
Reply With Quote
  #12  
Old 07-24-2002, 05:19 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

=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:
Reply With Quote
  #13  
Old 07-24-2002, 05:26 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Reply With Quote
  #14  
Old 07-24-2002, 06:18 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still no go
Very strange indeed.
Reply With Quote
  #15  
Old 08-01-2002, 02:55 PM
yetdog11 yetdog11 is offline
 
Join Date: Nov 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #16  
Old 08-23-2002, 11:04 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm going to bump this, but just one last time. This is still an unsolved problem I can't figure out.
Reply With Quote
  #17  
Old 08-23-2002, 11:31 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #18  
Old 08-24-2002, 03:11 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 08-24-2002, 07:43 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange, that method works fine for me.
Reply With Quote
  #20  
Old 10-24-2002, 01:47 PM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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:38 AM.


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.04538 seconds
  • Memory Usage 2,272KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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