Welcome, Guest. Please Login or Register.
July 05, 2025, 10:57:21 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Who's online « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Who's online  (Read 863 times)
liquid
Noobie
*
Posts: 3


I'm a llama!

Who's online
« on: December 30, 2003, 12:02:13 AM »
Reply with quote

YaBB SE Version: 1.5.4
PHP Version:
MySQL Version:
Server Platform:
Link to Forum: http://www.puntingworld.com/index.php

Problem Description:
Hi guys, How do I get my forum to show who's online
at the top of the forum.As in actually showing the members names that are logged on and then the number of members and then also the amount of guests online .

I don't mean by looking at the foot of the page but totally independent to that? Is it a script that we need?

If you take a look at the forum we'd like it to be able to show all that are online at the time we're looking at it and would like it showing beneath the ladies banners.

Any help would be much appreciated

L
I
Q
U
I
D
Logged
Peter Duggan
Llama Chameleon
Global Moderator
YaBB God
*****
Posts: 1793


You come and go...

WWW
Re:Who's online
« Reply #1 on: December 30, 2003, 12:48:51 AM »
Reply with quote

Did you follow up my reply to your earlier question in the Graphics and Templates board?

Quote from: Peter Duggan on December 29, 2003, 11:23:51 AM
In which case, I'd start by checking out Who's Online by Gobalopper and User Browsing by Spaceman-Spiff! :)
Logged

Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:Who's online
« Reply #2 on: December 30, 2003, 01:39:44 AM »
Reply with quote

isn't the ssi function enough?

http://www.puntingworld.com/ssi_examples.php
http://www.puntingworld.com/ssi_examples.shtml

here's a good explanation on how to use them
http://www.yabbse.org/community/index.php?board=140;action=display;threadid=20295;start=0#msg133714

follow the steps explained by Spaceman-Spiff to get your SSI working properly :)
« Last Edit: December 30, 2003, 01:41:02 AM by Anguz » Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
liquid
Noobie
*
Posts: 3


I'm a llama!

Re:Who's online
« Reply #3 on: December 30, 2003, 09:07:24 PM »
Reply with quote

Quote from: Peter Duggan on December 30, 2003, 12:48:51 AM
Did you follow up my reply to your earlier question in the Graphics and Templates board?

Quote from: Peter Duggan on December 29, 2003, 11:23:51 AM
In which case, I'd start by checking out Who's Online by Gobalopper and User Browsing by Spaceman-Spiff! :)

Hello Peter, I'd lost where i'd posted that.
Thank you for your patience and I shall now endeavour to try to sort it out and i'll come back and let you know how i got on.

Thank you.

Logged
mi_amigo
Noobie
*
Posts: 17


Live. From the North Sea.

WWW
Re:Who's online
« Reply #4 on: January 01, 2004, 01:45:13 AM »
Reply with quote

YaBB SE Version: 1.5.4  Supermod 0817
PHP Version: 4.3.3
MySQL Version: 4.0.16
Server Platform: Redhat 9.0  Apache 1.3.29
Link to Forum: http://www.puntingworld.com/index.php

Morning guys, I'm Liquids partner in crime. Happy new year to everyone.

I've tried spaceman-spiff's suggestion and I have the following problem when I run ssi_examples.php.


Warning: main(/home/miamigo/domains/puntingworld.com/public_html/community/home/miamigo/domains/puntingworld.com/public_html/Settings.php): failed to open stream: No such file or directory in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 47

Warning: main(): Failed opening '/home/miamigo/domains/puntingworld.com/public_html/community/home/miamigo/domains/puntingworld.com/public_html/Settings.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 47

Warning: mysql_connect(): Access denied for user: 'apache@localhost' (Using password: NO) in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 56
Access denied for user: 'apache@localhost' (Using password: NO)


Now, line 47 is exactly as it appears in the YaBB Directory line in prefs & settings. That is: /home/miamigo/domains/puntingworld.com/public_html

Quite what the line 56 error is beats me. I assume it's because I can't log in to the database. I don't know enough to know what to modify here though.

Any thoughts would be very gratefully received.

Many thanks.
Logged

If you always tell people that you're stupid, often they'll be pleasantly surprised!
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's online
« Reply #5 on: January 01, 2004, 04:36:16 AM »
Reply with quote

You've doubled up the path in SSI.php.

-[Unknown]
Logged
mi_amigo
Noobie
*
Posts: 17


Live. From the North Sea.

WWW
Re:Who's online
« Reply #6 on: January 01, 2004, 08:14:33 AM »
Reply with quote

Thanks.

If you mean what I think you mean, I can't see that I have. This is the relevant chunk of code (lines 47 to 59):


include_once ($full_yabbse_path . '/home/miamigo/domains/puntingworld.com/public_html/Settings.php');
// Connect to the database - either pconnect or std - Gxx
if (isset($db_connect) && $db_connect == 1)
{
   $dbcon = mysql_pconnect($db_server, $db_user, $db_passwd) or die(mysql_error());
   mysql_select_db($db_name) or die(mysql_error());
}
else
{
$dbcon = mysql_connect($db_server, $db_user, $db_passwd) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$db_connect = 0;
}
Logged

If you always tell people that you're stupid, often they'll be pleasantly surprised!
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's online
« Reply #7 on: January 01, 2004, 10:12:25 AM »
Reply with quote

include_once ($full_yabbse_path . '/home/miamigo/domains/puntingworld.com/public_html/Settings.php');

Should be:

include_once ($full_yabbse_path . '/Settings.php');

-[Unknown]
Logged
mi_amigo
Noobie
*
Posts: 17


Live. From the North Sea.

WWW
Re:Who's online
« Reply #8 on: January 01, 2004, 02:41:11 PM »
Reply with quote

OK, thanks for your patience. Now I see what you mean. I should have gone to bed last night!

I now have the ssi.php lines 29-59 as this:

/*******************************   Settings   ********************************/
   $full_yabbse_path = $_SERVER["DOCUMENT_ROOT"] . '';   // if in same folder as yabb board can be left
                        // as '.'
   $num_recentTopics = '5';   // 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
/*****************************************************************************/

include_once ($full_yabbse_path . '/settings.php');
// Connect to the database - either pconnect or std - Gxx
if (isset($db_connect) && $db_connect == 1)
{
   $dbcon = mysql_pconnect($db_server, $db_user, $db_passwd) or die(mysql_error());
   mysql_select_db($db_name) or die(mysql_error());
}
else
{
$dbcon = mysql_connect($db_server, $db_user, $db_passwd) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$db_connect = 0;
}



But I still get an error, like this:


Warning: main(/home/miamigo/domains/puntingworld.com/public_html/settings.php): failed to open stream: No such file or directory in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 47

Warning: main(): Failed opening '/home/miamigo/domains/puntingworld.com/public_html/settings.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 47

Warning: mysql_connect(): Access denied for user: 'apache@localhost' (Using password: NO) in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 56
Access denied for user: 'apache@localhost' (Using password: NO)


Sorry to be such a nuisance. I think I've been staring at this for too long, you could try hitting me with a hammer!
Logged

If you always tell people that you're stupid, often they'll be pleasantly surprised!
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's online
« Reply #9 on: January 01, 2004, 03:54:41 PM »
Reply with quote

Well, $full_yabbse_path should be set to the full path. (not document root always...)

$full_yabbse_path = '/home/miamigo/domains/puntingworld.com/public_html';

Second, it *NEEDS* to be '/Settings.php' not '/settings.php'.  In linux filesystems, those are completely different files.

So:
include_once ($full_yabbse_path . '/Settings.php');

-[Unknown]
Logged
mi_amigo
Noobie
*
Posts: 17


Live. From the North Sea.

WWW
Re:Who's online
« Reply #10 on: January 03, 2004, 09:26:41 PM »
Reply with quote

OK, thanks for that. We're getting somewhere but it's a two steps forward, one back approach!

I now get the following result from running ssi_examples.php


Parse error: parse error in /home/miamigo/domains/puntingworld.com/public_html/SSI.php on line 32

YaBB SE SSI.php Functions
Current Version 1.5.1

This file is used to demonstrate the capabilities of SSI.php using PHP include function.
The examples the include tag, then the results of it. Examples are separated by horizontal rules.

--------------------------------------------------------------------------------
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
To use SSI.php in your page add at the very top of your page before the <html> tag on line 1:
<?php require("/SSI.php"); ?> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------

Recent Topic Function: <? recentTopics(); ?>

Fatal error: Call to undefined function: recenttopics() in /home/miamigo/domains/puntingworld.com/public_html/ssi_examples.php on line 27


Relevant line in ssi.php is:

   $num_recentTopics = '5';

Relevant line in ssi_examples.php is:

   <?php recentTopics(); ?>


ssi_examples.shtml gives similar results for the whole range of functions.

Sorry to be such a pain!
Logged

If you always tell people that you're stupid, often they'll be pleasantly surprised!
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's online
« Reply #11 on: January 03, 2004, 09:31:19 PM »
Reply with quote

Now you have a parse error.  Can you post lines 28 to 36?

-[Unknown]
Logged
mi_amigo
Noobie
*
Posts: 17


Live. From the North Sea.

WWW
Re:Who's online
« Reply #12 on: January 03, 2004, 09:51:15 PM »
Reply with quote

27 to 36 in ssi.php

$ssiphpver = 'YaBB SE 1.5.1';

/*******************************   Settings   ********************************/
   $full_yabbse_path = '/home/miamigo/domains/puntingworld.com/public_html'   // if in same folder as yabb board can be left
                        // as '.'
   $num_recentTopics = '5';   // 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


Logged

If you always tell people that you're stupid, often they'll be pleasantly surprised!
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Who's online
« Reply #13 on: January 04, 2004, 05:47:32 AM »
Reply with quote

There should be a semicolon at the end of this:

$full_yabbse_path = '/home/miamigo/domains/puntingworld.com/public_html'

Before the comment... so:

$full_yabbse_path = '/home/miamigo/domains/puntingworld.com/public_html';

-[Unknown]
Logged
mi_amigo
Noobie
*
Posts: 17


Live. From the North Sea.

WWW
Re:Who's online
« Reply #14 on: January 11, 2004, 12:13:37 PM »
Reply with quote

Thank you for spotting that. Must get some new glasses.

The ssi_examples work fine now.

I just need to work out how to include it on my board. I want it to appear at the top of each page, tried putting an include into the template but it just throws up errors all the time.
Logged

If you always tell people that you're stupid, often they'll be pleasantly surprised!
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Who's online « 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.132 seconds with 20 queries.