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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-18-2002, 09:25 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 07-19-2002, 06:11 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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';

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

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

b u m p
u
m
p
Reply With Quote
  #5  
Old 07-19-2002, 07:51 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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

*cough*
*cough*
Reply With Quote
  #8  
Old 07-20-2002, 09:59 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

*on verge of death* Firefly...need..more..of..your..help on..post #3 :dead:
Reply With Quote
  #10  
Old 07-23-2002, 11:05 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
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:42 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.04331 seconds
  • Memory Usage 2,263KB
  • 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
  • (2)bbcode_code
  • (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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete