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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-27-2008, 03:44 AM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Dynamic Who's Online Info Broken

Some products here such as the arcade hack and others have code that displays extra information in Who's Online about a user's actions.

i.e. If a user is on /file.php?action=testing

I can add the following code to online_location_unknown:

$action =& $userinfo['values']['action'];

and then display "$action" in the who's online bit.

I moved my forums to a new server and suddenly this code stopped working.

Has anybody had this happen before? Any ideas what might have stopped this from working?
Reply With Quote
  #2  
Old 12-27-2008, 04:01 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There should be two plugins to make it work. Perhaps you disabled one? This is what I do:

Create two plugins using the following hooks. Replace mypage and similar with your information.

hook online_location_process:
Code:

PHP Code:
switch ($filename)
{
    case 
'mypage.php':
        
$userinfo['activity'] = 'mypage';
        break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.


hook online_location_unknown
Code:

PHP Code:
switch ($userinfo['activity'])
{
    case 
'mypage':
        
$userinfo['where'] = '<a href="mypage.php?'.$vbulletin->session->vars[sessionurl].'">My Page</a>';
        
$userinfo['action'] = "Viewing My Page";
        
$handled true;
        break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.

Reply With Quote
  #3  
Old 12-27-2008, 04:16 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know about those plugins. The problem is this doesn't work across VB, not just in plugins.

For example, profile.php?do=editsignature usually would show "Editing Signature" in Who's Online but now it just shows "Viewing Control Panel".

This isn't a result of any code changes but simply moving to a new server. I imagine it has something to do with how PHP is configured but I have no clue what to change that would affect this.
Reply With Quote
  #4  
Old 12-27-2008, 04:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmmm, servers are a kinda vague area of knowledge for me. I am not sure what to suggest you look at. If your host is familiar with vbulletin, perhaps they may have an idea?
Reply With Quote
  #5  
Old 12-27-2008, 04:32 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very hard to troubleshoot only based on descriptions. If this also happens when your modifications are disabled, then please open a support ticket so someone can take a look. But i doubt it is server configuration related.
Reply With Quote
  #6  
Old 12-27-2008, 05:32 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
Very hard to troubleshoot only based on descriptions. If this also happens when your modifications are disabled, then please open a support ticket so someone can take a look. But i doubt it is server configuration related.
How could it not be server config related though? It worked fine on the old server and not on the new server, with zero changes besides moving to the new server. I am all ears though. By support ticket do you mean on VB.com? I have posted a thread there but didn't make a ticket yet.
Reply With Quote
  #7  
Old 12-27-2008, 05:59 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes a Support Ticket on vB.com. The easiest way to troubleshoot this is when 1 of our technicials can login to the server to see what happens.
Reply With Quote
  #8  
Old 12-27-2008, 10:41 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found the problem. PHP MySQL libraries did not match the version of MySQL installed. Reverting to the versions I had used before fixed this issue. Weird.
Reply With Quote
  #9  
Old 12-27-2008, 11:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, that's a really weird one. Glad you figured it out.
Reply With Quote
  #10  
Old 12-28-2008, 07:33 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A bt surprised that this was the cause. Somehow a cash of encodings probably.
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 07:12 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.09538 seconds
  • Memory Usage 2,260KB
  • 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_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete