vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Improved Who's Online Display (https://vborg.vbsupport.ru/showthread.php?t=38576)

TWTCommish 06-06-2002 02:35 PM

I'm looking at the code now...what did you say the problem was? Which link is giving you trouble?

Kars10 06-06-2002 02:40 PM

...$userinfo[where] = "Schaut sich das Profil an von <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";


and here is the problem. It looks like: schaut sich das profil an von >>mr.x<<. If i click on mr.x ill get a message that this user are not registered.

TWTCommish 06-06-2002 03:01 PM

I'm not sure what's wrong, but to make sure the link works, replace this:

PHP Code:

if ($user[username]) { 

with this:

PHP Code:

if (intval($user[userid])) { 


Kars10 06-06-2002 03:08 PM

Thank you Chris. I will try it. :D

FleaBag 06-19-2002 10:27 PM

Running well on 2.2.6 apart from 1 issue with the profile userid, it doesn't put the number of the member in the hyperlink.

TWTCommish 06-20-2002 12:21 AM

Replace this...
Code:

$user  = $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
...with this...
Code:

$user  = $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1]));

FleaBag 06-20-2002 05:31 AM

Thanks Chris. Nobody viewing profiles for me to check at the moment, but I'm sure it works! :)

FleaBag 06-20-2002 09:53 AM

It doesn't say the name of the person who's profile they are viewing at all now... I'm gonna check my online.php just to be sure everything is as it should be.

FleaBag 06-20-2002 09:59 AM

Right everything is as it should be, all the file edits are done. Did you deliberately remove that feature Chris? If so wouldn't it be better to have the member name without the link, if it isn't easy to do? I have no idea what I'm talking about by the way. :)

TWTCommish 06-20-2002 12:44 PM

The whole block of code should look like this:

Code:

    case 'getinfo':
      $userid = explode('userid=', $userinfo[location]);
      $user  = $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
     
        if ($user[username] && $user[userid]) {
          $userinfo[where] = "Viewing Profile of <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";
        } else {
          $userinfo[where] = "Viewing Profile of a Forum Member";
        }
       
      break;

Anyway, you can always test it without anyone else: just view a profile, and make the next page you go to be the Who's Online page. That's how I tested it. :)


All times are GMT. The time now is 07:47 PM.

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.01087 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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