Welcome, Guest. Please Login or Register.
November 26, 2024, 09:25:02 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  Who's Online Show #'s as Identities « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: Who's Online Show #'s as Identities  (Read 452 times)
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Who's Online Show #'s as Identities
« on: February 25, 2003, 03:26:54 PM »
Reply with quote

Greetings again,

My who's online table looks like this:
Identity/Logtime
1103632083/1046185847
1/1046185847
1045389068/1046185999
1106141799/1046185369

This causes this green link on members name to spit out something like this:
/community/index.php?action=viewprofile;user=1

I'm using a completely unmodified (for these parts anyway) version of 1.5.1 (not sure what build).  The #1 might indicate user #.  And I'm guessing it's 1.5.1 related because this is a new problem.

Thanks,
Justin.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's Online Show #'s as Identities
« Reply #1 on: February 26, 2003, 12:21:36 AM »
Reply with quote

You did not upload all the source files.

-[Unknown]
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #2 on: March 02, 2003, 07:09:52 PM »
Reply with quote

Just in case that was it... I downloaded the RC1 build and uploaded it in it's entirety, ran the upgrade.php and set all my settings.  Everything else works perfectly fine... but I'm still getting #'s instead of names in the Who's Online box.  I am doing calls from outside the forum using the command "WhosOnline()" and I'm not sure what the command is under yabb, such as the <menubar> sort of thing.  (I know that's not a real one).

Anyway, any other ideas sir?  In case I didn't say it before, this is a new problem as of installing a 1.5.0+ build.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's Online Show #'s as Identities
« Reply #3 on: March 02, 2003, 07:12:39 PM »
Reply with quote

Does your SSI.php include the following?

$request4 = mysql_query("SELECT realName, memberGroup FROM {$db_prefix}members WHERE (ID_MEMBER='$identity') LIMIT 1") or database_error(__FILE__, __LINE__);

-[Unknown]
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #4 on: March 02, 2003, 07:21:52 PM »
Reply with quote

word for word :)
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #5 on: March 02, 2003, 07:30:19 PM »
Reply with quote

My forum software is completely untouched except for the settings, the full yabbse path in ssi (things that have to be touched) and then I changed font size to 1 in the recent topics.  Otherwise what I've got on the web is exactly as packaged.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's Online Show #'s as Identities
« Reply #6 on: March 02, 2003, 08:37:35 PM »
Reply with quote

Might you be willing to provide a link?

-[Unknown]
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #7 on: March 02, 2003, 09:43:21 PM »
Reply with quote

Sure, sorry about that!  The site is:

The New Vision Studios Community

The site is based strongly around the SSI functions and global username, so anywhere in the site you'll find the menubar, who's online, shoutbox, and so on.  

In the forums (because I don't know the <whosonline> sort of way of calling it, I'm calling it in the template.php using this:

<? include 'http://www.nvstudios.com/community/whosonline.php'; ?>

This .php code reads as follows:


<?php

$ssiphpver 
'YaBB SE 1.5.1RC1';

/*******************************   Settings   ********************************/
   
$full_yabbse_path '/home/nvstudios/community';   // if in same folder as yabb board can be left 
                        // as '.'
   
$num_recentTopics '8';   // number of topics to display in list of 
                        // recent topics
   
$num_topBoards '10';      // number of boards to display in board list
   
$num_topicsViews '10';   // number of topics to show in list of topics
                        // sorted by number of views
   
$num_topicsReplies '10';   // number of topics to show in list of topics
                        // sorted by number of replies
   
$logOnlinePresence false;   // When showing whosOnline() should the user
                        // requesting the page also be shown as online?
   
$menuBarStyle '0';      // 0: Automatically determine menu style using 
                        //    forum settings (default)
                        // 1: Use text menu
                        // 2: Use image menu
/*****************************************************************************/

if(strlen($QUERY_STRING)>0)
{
   
$str = (substr($QUERY_STRING,0,5)=="url=/")?$HTTP_SERVER_VARS["REDIRECT_QUERY_STRING"]:$QUERY_STRING;
   
$query_strings split("[;&]",URLdecode($str));
   foreach (
$query_strings as $tmp)
   {
      list(
$key,$value) = explode("=",$tmp);
      
$GLOBALS[$key] = $value;
   }
}

include_once (
$full_yabbse_path '/Settings.php');
include_once (
$full_yabbse_path '/SSI.php');
$dbcon mysql_connect($db_server$db_user$db_passwd);
mysql_select_db($db_name);

include_once (
$full_yabbse_path '/Sources/Errors.php');
include_once (
$full_yabbse_path '/Sources/Subs.php');
include_once (
$full_yabbse_path '/Sources/Load.php');

WriteLog();    

whosonline();
?>


Outside of the forums, everything is generated by PHP that already has the SSI.php loading in it anyway, so it's done using the command whosonline() directly.  All logins, in any case, are handled directly with the software as written.  No modification has been done to anything in that software, as I mentioned above.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's Online Show #'s as Identities
« Reply #8 on: March 02, 2003, 10:07:46 PM »
Reply with quote

You should be using a path, and doing it like this:

<?php
//beginning of file
include '/home/nvstudios/community/SSI.php';

// stuff....

whosonline();

// stuff....

?>

And... I see this on the sidebar: Who's Online?
13 Guests, 1 Users
KakarisMaelstrom

So, erm... what's the problem?

-[Unknown]
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #9 on: March 03, 2003, 12:09:01 AM »
Reply with quote

Basically the link should read:

http://www.nvstudios.com/community/index.php?action=viewprofile;user=KakarisMaelstrom

But instead it reads:
http://www.nvstudios.com/community/index.php?action=viewprofile;user=1

The number is the member id#.  The guests entry reads something like 64253212 which I'd guess is some kind of random indentifier, you can see a sample of the data in the log_online table at the start of this post.  I'm not sure where it's happening, but it's putting id#'s in the
instead of the names, and this is in the table itself, not just the output.

Anywhere else on the site, we don't have that problem.  And it's showing the member name in the box... just the wrong link.

I'm looking over the related code, basically an example of what the whosonline() spits out and it's:


$tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"red\">$tmp2[realName]</font></a>";


So what I'm getting is that it's calling identity for the link, and the this $tmp2[realName] for the membername... question is... why?  Would it be possible to have it switch the identity to the realname bit or something else?
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's Online Show #'s as Identities
« Reply #10 on: March 03, 2003, 12:16:31 AM »
Reply with quote

SSI.php:

Find:
$request4 = mysql_query("SELECT realName, memberGroup FROM {$db_prefix}members WHERE (ID_MEMBER='$identity') LIMIT 1") or database_error(__FILE__, __LINE__);

Replace:
$request4 = mysql_query("SELECT realName, memberGroup, memberName FROM {$db_prefix}members WHERE (ID_MEMBER='$identity') LIMIT 1") or database_error(__FILE__, __LINE__);

Find:
         if ($tmp2['memberGroup'] == "Administrator")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"red\">$tmp2[realName]</font></a>";
         elseif ($tmp2['memberGroup']=="Global Moderator")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"blue\">$tmp2[realName]</font></a>";
         elseif ($tmp2['memberGroup']=="YaBB SE Developer")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"green\">$tmp2[realName]</font></a>";
         elseif ($tmp2['memberGroup']=="Mod Team")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\"><font color=\"orange\">$tmp2[realName]</font></a>";
         else
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$identity\">$tmp2[realName]</a>";


Replace:
         if ($tmp2['memberGroup'] == "Administrator")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$tmp2[memberName]\"><font color=\"red\">$tmp2[realName]</font></a>";
         elseif ($tmp2['memberGroup']=="Global Moderator")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$tmp2[memberName]\"><font color=\"blue\">$tmp2[realName]</font></a>";
         elseif ($tmp2['memberGroup']=="YaBB SE Developer")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$tmp2[memberName]\"><font color=\"green\">$tmp2[realName]</font></a>";
         elseif ($tmp2['memberGroup']=="Mod Team")
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$tmp2[memberName]\"><font color=\"orange\">$tmp2[realName]</font></a>";
         else
            $tmpusers[] = "<a href=\"$scripturl?action=viewprofile;user=$tmp2[memberName]\">$tmp2[realName]</a>";


-[Unknown]
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #11 on: March 03, 2003, 12:24:12 AM »
Reply with quote

And just for the record, using the following bit of code in template.php...

<?
include '/home/nvstudios/community/SSI.php';

whosonline(); ?>


... results in the page not being able to load at all.

This bit of code....

<? include 'http://www.nvstudios.com/community/SSI.php';
whosonline(); ?>


... results in the following error: Fatal error: Call to undefined function: whosonline() in /home/nvstudios/community/template.php on line 179

This is why I have been handling it through a separate php file altogether.  I'm not sure if this is because of something related to my server or what, but I'm pretty sure this is unrelated to the problem of it writing #'s into my table instead of member names.
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #12 on: March 03, 2003, 12:29:12 AM »
Reply with quote

That seems to have fixed the problem entirely (the #'s instead of names)!  Is it something server specific ... something I should report over at Soulforge.... ?

My table still reads:
2603233110 1046651619
1074552870 1046650167
1103632083 1046651613
1074552841 1046650520
7 1046651613
2160937352 1046651605


But, the who's online has the correct name so it's fine by me.  I'm guessing this is something implemented in the 1.5.0 anyway considering the table calls for "int(11)" in the identity spot now.

Thanks so much and if you do know what the deal is I'd love to know :)
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's Online Show #'s as Identities
« Reply #13 on: March 03, 2003, 12:58:21 AM »
Reply with quote

The table data is fine....

It is indeed a bug.  I've fixed it... it will be in the next release.

-[Unknown]
Logged
nvstudios
Jr. Member
**
Posts: 61


I'm a llama!

Re:Who's Online Show #'s as Identities
« Reply #14 on: March 03, 2003, 02:36:17 AM »
Reply with quote

Wow, glad to help then!  Thanks you for all of your assistance with this, our forums are back to 100% now :)
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Who's Online Show #'s as Identities « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.062 seconds with 20 queries.