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 08-27-2003, 09:20 PM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Who's Online Assistance

I integrated the Who's Online to generate the listing across the entire site and not just the forums using the require global.php line.

My question is, where do I start to make the changes so those viewing pages outside of the forum are not Unknown Location but shows the location?

In online.php I find:

Code:
case 'online':
      $userinfo[where] = "Viewing <a href='online.php?s=$session[sessionhash]'>Who's Online</a>";
      break;
Lines for each area of the forum. Where do I define a case if a member is viewing a page outside of the forum?

Thanks,

Syl...
Reply With Quote
  #2  
Old 08-27-2003, 11:36 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, it only shows Unknown Location for administrators, but regular members just see <forum_name> Index

Find
PHP Code:
  case 'gallery.php':
    
$userinfo[activity] = 'gallery';
    break; 
in online.php, and you'll see that that's where you specify the filenames.

You have to add a new filename there, and also at the location you posted.
Reply With Quote
  #3  
Old 08-28-2003, 01:36 AM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok. The "case" confused me because I thought this was a variable of some sort, already pre-defined elsewhere and I couldn't understand how it was working.

I've spent so long reading other threads about getting the Who's Online to work across the entire site, tried FireFly's Who's Online Admin hack...nothing was working.

Got a fix for subdirectories?

yoursite.com/sub_dir/filename.shtml does not work via the online.php.

Files within the forum and root of the site work fine, anything in another directory do not.

Now I'm really stumped.

I am calling in the global.php as I am able to see that I'm listed in the Who's Online except whenever I am on a page that is within a sub-directory from the root of the site, it lists me as being at the Main Index.

I've tried

[code]case = '/directory/filename'[code] and nothing.

Syl...
Reply With Quote
  #4  
Old 08-28-2003, 08:46 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You first assign the variable value according to visited pages file name. See the lines around 580. Eg.

PHP Code:
 case 'memberlist.php':
    
$userinfo[activity] = 'memberlist';
    break; 
Then in the section you mentioned, you check the variable value and display the who is online text like:
PHP Code:
    case 'memberlist':
      
$userinfo[where] = "Viewing <a href='memberlist.php?s=$session[sessionhash]'>Memberlist</a>";
      break; 
This will work ok unless you have a file name clashing with a vbulletin file name. It is not very usual to have one except you are using "index.php" in your external directory. If this is the case rename it to "main.php" or something to avoid the clash.
Reply With Quote
  #5  
Old 08-28-2003, 11:25 AM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, now it works! I had the second part that both you and Gary W. mentioned but I didn't have the first part in your post Logican.

Thanks for the help, working as it should and with sub-directories.

Syl...
Reply With Quote
  #6  
Old 08-28-2003, 01:13 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, I already had that part in my post as well
Reply With Quote
  #7  
Old 08-30-2003, 04:13 AM
afterglow's Avatar
afterglow afterglow is offline
 
Join Date: Aug 2003
Location: Tokyo, Japan
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi there! wonder if ur successful in putting the scripts to work in your page. if so, can u share?

regards,
afterglow
Reply With Quote
  #8  
Old 08-30-2003, 10:48 PM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well all I did was use the Who's Online on Non-VB Pages hack that is found in the database. I don't have the link handy but you can do a search for it. Search for ONLINE and it's on the 1st or 2nd page.

Since the ./global.php function is already required for the Who's Online to display on all your non-vb pages, all you'll need to do is include it into those non-vb pages.

Syl...
Reply With Quote
  #9  
Old 08-30-2003, 11:31 PM
afterglow's Avatar
afterglow afterglow is offline
 
Join Date: Aug 2003
Location: Tokyo, Japan
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I'll do the search. Anyway, I can't find hacks that's made to work under vb 3.0 beta5 . most of the hacks available are made to work under 2.3 and below.

I just purchased ver 3 and found out there's not much hack available for this version.

Amori
Reply With Quote
  #10  
Old 08-31-2003, 03:01 AM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sure there will be but the question still remains. Will the authors of the more popular hacks for 2.3.0 and below rewrite their code for VB 3? If not, I don't know how many people will want to switch over and possibly miss out on some of the better hacks currently available.

Only time will tell.

Syl...
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 01:17 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.08261 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
  • (1)bbcode_code
  • (3)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
  • (1)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